diff options
Diffstat (limited to 'pdf')
-rwxr-xr-x | pdf/list_mentor_certificates.inc | 3 | ||||
-rwxr-xr-x | pdf/mentor_cert_pdf.inc | 12 | ||||
-rwxr-xr-x | pdf/verify_certificates.inc | 20 |
3 files changed, 22 insertions, 13 deletions
diff --git a/pdf/list_mentor_certificates.inc b/pdf/list_mentor_certificates.inc index f06efad..971bafc 100755 --- a/pdf/list_mentor_certificates.inc +++ b/pdf/list_mentor_certificates.inc @@ -14,7 +14,8 @@ function _list_flowsheet_custom_certificates() $search_rows = array(); global $output; $output = ''; - $query3 = db_query("SELECT id,project_guide_name,project_title FROM dwsim_flowsheet_proposal WHERE project_guide_name != '' AND approval_status=3"); + $query3 = db_query("SELECT id,project_guide_name,project_guide_university,project_title FROM +dwsim_flowsheet_proposal WHERE project_guide_name != '' AND project_guide_university != '' AND approval_status=3"); $i = 1; while ($search_data3 = $query3->fetchObject()) { $search_rows[] = array( diff --git a/pdf/mentor_cert_pdf.inc b/pdf/mentor_cert_pdf.inc index 9e097eb..1c59f1a 100755 --- a/pdf/mentor_cert_pdf.inc +++ b/pdf/mentor_cert_pdf.inc @@ -88,10 +88,9 @@ function generate_pdf() $query->condition('proposal_id', $proposal_id); $result = $query->execute(); $data = $result->fetchObject(); - $DBString = $data->custom_qr_code; - $qrstring = $data->qr_code; + //$DBString = $data->custom_qr_code; $proposal_get_id = $data->proposal_id; - if ($DBString == "" || $DBString == "null") { + /*if ($DBString == "" || $DBString == "null") { $UniqueString = generateRandomString(); $query = "UPDATE dwsim_flowsheet_qr_code SET custom_qr_code = :custom_qr_code WHERE proposal_id = :proposal_id"; $args = array( @@ -104,8 +103,9 @@ function generate_pdf() } //$DBString == "" || $DBString == "null" else { $UniqueString = $DBString; - } - $codeContents = 'http://dwsim.fossee-dell/flowsheeting-project/certificates/verify/' . $qrstring; + }*/ + $qrstring = $data->qr_code; + $codeContents = 'https://dwsim.fossee.in/flowsheeting-project/certificates/verify/' . $qrstring; $fileName = 'generated_qrcode.png'; $pngAbsoluteFilePath = $tempDir . $fileName; $urlRelativeFilePath = $path . "/pdf/temp_prcode/" . $fileName; @@ -129,7 +129,7 @@ function generate_pdf() $pdf->SetY(-58); $pdf->Ln(14); $pdf->SetX(10); - $pdf->Cell(0, 0, $UniqueString, 0, 0, 'C'); + $pdf->Cell(0, 0, $qrstring, 0, 0, 'C'); $pdf->SetX(29); $pdf->SetY(-50); $image4 = $path . "/pdf/images/verify_content.png"; diff --git a/pdf/verify_certificates.inc b/pdf/verify_certificates.inc index fbc4d48..8b71743 100755 --- a/pdf/verify_certificates.inc +++ b/pdf/verify_certificates.inc @@ -77,10 +77,19 @@ function verify_qrcode_fromdb($qr_code) ':uid' => $proposal_id )); $data3 = $query3->fetchObject(); - /*$query3 = db_query("SELECT * FROM {dwsim_flowsheet_proposal} WHERE approval_status=3 AND uid= :uid", array( - ':uid' => $user->uid - )); - $data3 = $query3->fetchObject();**/ + if($data3->project_guide_name){ + $page_content = ""; + $page_content .= "<h4>Participation Details</h4><table><tr><td>Name</td>"; + $page_content .= "<td>" . $data3->contributor_name . "</td></tr>"; + $page_content .= "<tr><td>Project</td>"; + $page_content .= "<td>DWSIM Flowsheeting Project</td></tr>"; + $page_content .= "<tr><td>Flowsheets completed</td>"; + $page_content .= "<td>" . $data3->project_title . "</td></tr>"; + $page_content .= "<tr><td>Project Guide</td>"; + $page_content .= "<td>" . $data3->project_guide_name . "</td></tr>"; + $page_content .= "</table>"; + } + else{ $page_content = ""; $page_content .= "<h4>Participation Details</h4><table><tr><td>Name</td>"; $page_content .= "<td>" . $data3->contributor_name . "</td></tr>"; @@ -88,9 +97,8 @@ function verify_qrcode_fromdb($qr_code) $page_content .= "<td>DWSIM Flowsheeting Project</td></tr>"; $page_content .= "<tr><td>Flowsheets completed</td>"; $page_content .= "<td>" . $data3->project_title . "</td></tr>"; - //$page_content .= "<tr><td>Book Author</td>"; - //$page_content .= "<td>" . $data2->author . "</td></tr>"; $page_content .= "</table>"; + } } //$proposal_id else { |