diff options
author | prashantsinalkar | 2016-11-24 17:15:56 +0530 |
---|---|---|
committer | prashantsinalkar | 2016-11-24 17:15:56 +0530 |
commit | ec373279a2725ab55f95e4aa7202bd432f258cc8 (patch) | |
tree | 72091040049cb9ce70f9470d10629ae64afe140c /pdf/generate_pdf.inc | |
parent | 8255c9098d5a6f560ac9cd978d933a77c6f9b7ea (diff) | |
download | scilab_textbook_companion-ec373279a2725ab55f95e4aa7202bd432f258cc8.tar.gz scilab_textbook_companion-ec373279a2725ab55f95e4aa7202bd432f258cc8.tar.bz2 scilab_textbook_companion-ec373279a2725ab55f95e4aa7202bd432f258cc8.zip |
added example count on cerfificate
Diffstat (limited to 'pdf/generate_pdf.inc')
-rwxr-xr-x | pdf/generate_pdf.inc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pdf/generate_pdf.inc b/pdf/generate_pdf.inc index fee2d96..e65f2c6 100755 --- a/pdf/generate_pdf.inc +++ b/pdf/generate_pdf.inc @@ -15,6 +15,15 @@ function generate_pdf() ':prop_id' => $proposal_id )); $data3 = $query3->fetchObject(); + $query4 = db_query("SELECT COUNT( tce.id ) AS example_count FROM textbook_companion_example tce + LEFT JOIN textbook_companion_chapter tcc ON tce.chapter_id = tcc.id + LEFT JOIN textbook_companion_preference tcpe ON tcc.preference_id = tcpe.id + LEFT JOIN textbook_companion_proposal tcpo ON tcpe.proposal_id = tcpo.id + WHERE tcpo.proposal_status =3 AND tce.approval_status =1 AND tce.approval_status=1 AND tcpo.id = :prop_id", array( + ':prop_id' => $proposal_id + )); + $data4 = $query4->fetchObject(); + $number_of_example = $data4->example_count; $gender = array( 'salutation' => 'Mr. /Ms.', 'gender' => 'He/She' @@ -75,7 +84,7 @@ function generate_pdf() $pdf->Ln(0); $pdf->Cell(240, 8, 'completed Internship under Scilab Textbook Companion', '0', '1', 'C'); $pdf->Ln(0); - $pdf->Cell(240, 8, 'He/she has coded '. $number_of_example .'solved examples using Scilab from the', '0', '1', 'C'); + $pdf->Cell(240, 8, 'He/she has coded '. $number_of_example .' solved examples using Scilab from the', '0', '1', 'C'); $pdf->Ln(0); $pdf->Cell(240, 8, 'book: ' . $data2->book . ', Author: ' . $data2->author . '.', '0', '1', 'C'); $pdf->Ln(0); @@ -87,7 +96,7 @@ function generate_pdf() $pdf->Ln(0); $pdf->Cell(240, 8, 'completed Internship under Scilab Textbook Companion', '0', '1', 'C'); $pdf->Ln(0); - $pdf->Cell(240, 8, 'He/she has coded '. $number_of_example .'solved examples using Scilab from the', '0', '1', 'C'); + $pdf->Cell(240, 8, 'He/she has coded '. $number_of_example .' solved examples using Scilab from the', '0', '1', 'C'); $pdf->Ln(0); $pdf->Cell(240, 8, 'textbook: ' . $data2->book . ', Author: ' . $data2->author . '.', '0', '1', 'C'); $pdf->Ln(0); |