summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdownload.inc37
-rwxr-xr-xdwsim_flowsheet.module43
-rwxr-xr-xemail.inc10
-rwxr-xr-xflowsheet_details.inc4
-rwxr-xr-xpdf/cert_new.inc62
-rwxr-xr-xpdf/list_flowsheet_certificate.inc4
6 files changed, 62 insertions, 98 deletions
diff --git a/download.inc b/download.inc
index d52982c..5b54648 100755
--- a/download.inc
+++ b/download.inc
@@ -25,11 +25,6 @@ function dwsim_flowsheet_download_solution_file()
$solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM dwsim_flowsheet_solution_files lmsf JOIN dwsim_flowsheet_solution lms JOIN dwsim_flowsheet_experiment lme JOIN dwsim_flowsheet_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id LIMIT 1", array(
':solution_id' => $solution_file_id
));
- /*$query = db_select('dwsim_flowsheet_solution_files');
- $query->fields('dwsim_flowsheet_solution_files');
- $query->condition('id', $solution_file_id);
- $query->range(0, 1);
- $solution_files_q = $query->execute();*/
$solution_file_data = $solution_files_q->fetchObject();
header('Content-Type: ' . $solution_file_data->filemime);
//header('Content-Type: application/octet-stram');
@@ -41,7 +36,6 @@ function dwsim_flowsheet_download_dependency_file()
{
$dependency_file_id = arg(3);
$root_path = dwsim_flowsheet_path();
- //$dependency_file_q = db_query("SELECT * FROM {dwsim_flowsheet_dependency_files} WHERE id = %d LIMIT 1", $dependency_file_id);
$query = db_select('dwsim_flowsheet_dependency_files');
$query->fields('dwsim_flowsheet_dependency_files');
$query->condition('id', $dependency_file_id);
@@ -57,28 +51,19 @@ function dwsim_flowsheet_download_solution()
{
$solution_id = arg(3);
$root_path = dwsim_flowsheet_path();
- /* get solution data */
- //$solution_q = db_query("SELECT * FROM {dwsim_flowsheet_solution} WHERE id = %d", $solution_id);
$query = db_select('dwsim_flowsheet_solution');
$query->fields('dwsim_flowsheet_solution');
$query->condition('id', $solution_id);
$solution_q = $query->execute();
$solution_data = $solution_q->fetchObject();
- //$experiment_q = db_query("SELECT * FROM {dwsim_flowsheet_experiment} WHERE id = %d", $solution_data->experiment_id);
$query = db_select('dwsim_flowsheet_experiment');
$query->fields('dwsim_flowsheet_experiment');
$query->condition('id', $solution_data->experiment_id);
$experiment_q = $query->execute();
$experiment_data = $experiment_q->fetchObject();
- //$solution_files_q = db_query("SELECT * FROM {dwsim_flowsheet_solution_files} WHERE solution_id = %d", $solution_id);
- /*$query = db_select('dwsim_flowsheet_solution_files');
- $query->fields('dwsim_flowsheet_solution_files');
- $query->condition('solution_id', $solution_id);
- $solution_files_q = $query->execute();*/
$solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM dwsim_flowsheet_solution_files lmsf JOIN dwsim_flowsheet_solution lms JOIN dwsim_flowsheet_experiment lme JOIN dwsim_flowsheet_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id", array(
':solution_id' => $solution_id
));
- //$solution_dependency_files_q = db_query("SELECT * FROM {dwsim_flowsheet_solution_dependency} WHERE solution_id = %d", $solution_id);
$query = db_select('dwsim_flowsheet_solution_dependency');
$query->fields('dwsim_flowsheet_solution_dependency');
$query->condition('solution_id', $solution_id);
@@ -92,11 +77,10 @@ function dwsim_flowsheet_download_solution()
while ($solution_files_row = $solution_files_q->fetchObject())
{
$zip->addFile($root_path . $solution_files_row->directory_name . '/' . $solution_files_row->filepath, $CODE_PATH . str_replace(' ', '_', ($solution_files_row->filename)));
- } //$solution_files_row = $solution_files_q->fetchObject()
+ }
/* dependency files */
while ($solution_dependency_files_row = $solution_dependency_files_q->fetchObject())
{
- //$dependency_file_data = (db_query("SELECT * FROM {dwsim_flowsheet_dependency_files} WHERE id = %d LIMIT 1", $solution_dependency_files_row->dependency_id))->fetchObject();
$query = db_select('dwsim_flowsheet_dependency_files');
$query->fields('dwsim_flowsheet_dependency_files');
$query->condition('id', $solution_dependency_files_row->dependency_id);
@@ -129,7 +113,6 @@ function dwsim_flowsheet_download_experiment()
$experiment_id = (int) arg(3);
$root_path = dwsim_flowsheet_path();
/* get solution data */
- //$experiment_q = db_query("SELECT * FROM {dwsim_flowsheet_experiment} WHERE id = %d", $experiment_id);
$query = db_select('dwsim_flowsheet_experiment');
$query->fields('dwsim_flowsheet_experiment');
$query->condition('id', $experiment_id);
@@ -141,7 +124,6 @@ function dwsim_flowsheet_download_experiment()
/* creating zip archive on the server */
$zip = new ZipArchive;
$zip->open($zip_filename, ZipArchive::CREATE);
- //$solution_q = db_query("SELECT * FROM {dwsim_flowsheet_solution} WHERE experiment_id = %d AND approval_status = 1", $experiment_id);
$query = db_select('dwsim_flowsheet_solution');
$query->fields('dwsim_flowsheet_solution');
$query->condition('experiment_id', $experiment_id);
@@ -150,15 +132,9 @@ function dwsim_flowsheet_download_experiment()
while ($solution_row = $solution_q->fetchObject())
{
$CODE_PATH = 'CODE' . $solution_row->code_number . '/';
- // $solution_files_q = db_query("SELECT * FROM {dwsim_flowsheet_solution_files} WHERE solution_id = %d", $solution_row->id);
$solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM dwsim_flowsheet_solution_files lmsf JOIN dwsim_flowsheet_solution lms JOIN dwsim_flowsheet_experiment lme JOIN dwsim_flowsheet_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.solution_id = :solution_id", array(
':solution_id' => $solution_row->id
));
- /* $query = db_select('dwsim_flowsheet_solution_files');
- $query->fields('dwsim_flowsheet_solution_files');
- $query->condition('solution_id', $solution_row->id);
- $solution_files_q = $query->execute();*/
- // $solution_dependency_files_q = db_query("SELECT * FROM {dwsim_flowsheet_solution_dependency} WHERE solution_id = %d", $solution_row->id);
while ($solution_files_row = $solution_files_q->fetchObject())
{
$zip->addFile($root_path . $solution_files_row->directory_name . '/' . $solution_files_row->filepath, $EXP_PATH . $CODE_PATH . str_replace(' ', '_', ($solution_files_row->filename)));
@@ -170,7 +146,6 @@ function dwsim_flowsheet_download_experiment()
$solution_dependency_files_q = $query->execute();
while ($solution_dependency_files_row = $solution_dependency_files_q->fetchObject())
{
- //$dependency_file_data = (db_query("SELECT * FROM {dwsim_flowsheet_dependency_files} WHERE id = %d LIMIT 1", $solution_dependency_files_row->dependency_id))->fetchObject();
$query = db_select('dwsim_flowsheet_dependency_files');
$query->fields('dwsim_flowsheet_dependency_files');
$query->condition('id', $solution_dependency_files_row->dependency_id);
@@ -205,7 +180,6 @@ function dwsim_flowsheet_download_lab()
$lab_id = arg(3);
$root_path = dwsim_flowsheet_path();
/* get solution data */
- //$lab_q = db_query("SELECT * FROM {dwsim_flowsheet_proposal} WHERE id = %d", $lab_id);
$query = db_select('dwsim_flowsheet_proposal');
$query->fields('dwsim_flowsheet_proposal');
$query->condition('id', $lab_id);
@@ -217,7 +191,6 @@ function dwsim_flowsheet_download_lab()
/* creating zip archive on the server */
$zip = new ZipArchive();
$zip->open($zip_filename, ZipArchive::CREATE);
- //$experiment_q = db_query("SELECT * FROM {dwsim_flowsheet_experiment} WHERE proposal_id = %d", $lab_id);
$query = db_select('dwsim_flowsheet_experiment');
$query->fields('dwsim_flowsheet_experiment');
$query->condition('proposal_id', $lab_id);
@@ -225,7 +198,6 @@ function dwsim_flowsheet_download_lab()
while ($experiment_row = $experiment_q->fetchObject())
{
$EXP_PATH = 'EXP' . $experiment_row->number . '/';
- //$solution_q = db_query("SELECT * FROM {dwsim_flowsheet_solution} WHERE experiment_id = %d AND approval_status = 1", $experiment_row->id);
$query = db_select('dwsim_flowsheet_solution');
$query->fields('dwsim_flowsheet_solution');
$query->condition('experiment_id', $experiment_row->id);
@@ -234,15 +206,9 @@ function dwsim_flowsheet_download_lab()
while ($solution_row = $solution_q->fetchObject())
{
$CODE_PATH = 'CODE' . $solution_row->code_number . '/';
- //$solution_files_q = db_query("SELECT * FROM {dwsim_flowsheet_solution_files} WHERE solution_id = %d", $solution_row->id);
$solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM dwsim_flowsheet_solution_files lmsf JOIN dwsim_flowsheet_solution lms JOIN dwsim_flowsheet_experiment lme JOIN dwsim_flowsheet_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id", array(
':solution_id' => $solution_row->id
));
- /*$query = db_select('dwsim_flowsheet_solution_files');
- $query->fields('dwsim_flowsheet_solution_files');
- $query->condition('solution_id', $solution_row->id);
- $solution_files_q = $query->execute();*/
- //$solution_dependency_files_q = db_query("SELECT * FROM {dwsim_flowsheet_solution_dependency} WHERE solution_id = %d", $solution_row->id);
$query = db_select('dwsim_flowsheet_solution_dependency');
$query->fields('dwsim_flowsheet_solution_dependency');
$query->condition('solution_id', $solution_row->id);
@@ -256,7 +222,6 @@ function dwsim_flowsheet_download_lab()
/* dependency files */
while ($solution_dependency_files_row = $solution_dependency_files_q->fetchObject())
{
- //$dependency_file_data = (db_query("SELECT * FROM {dwsim_flowsheet_dependency_files} WHERE id = %d LIMIT 1", $solution_dependency_files_row->dependency_id))->fetchObject();
$query = db_select('dwsim_flowsheet_dependency_files');
$query->fields('dwsim_flowsheet_dependency_files');
$query->condition('id', $solution_dependency_files_row->dependency_id);
diff --git a/dwsim_flowsheet.module b/dwsim_flowsheet.module
index a122f17..43f8f8d 100755
--- a/dwsim_flowsheet.module
+++ b/dwsim_flowsheet.module
@@ -465,6 +465,28 @@ function dwsim_flowsheet_menu()
),
'file' => 'pdf/cert_new.inc'
);
+ $items['flowsheeting-project/certificates_custom'] = array(
+ 'title' => 'List of Flowsheet Custom Certificates',
+ 'description' => 'List of flowsheet Custom Certificates',
+ 'page callback' => '_list_flowsheet_custom_certificates',
+ 'access arguments' => array(
+ 'list flowsheet custom certificates'
+ ),
+ 'file' => 'pdf/list_mentor_certificates.inc'
+ );
+ $items['flowsheeting-project/certificates_custom/pdf'] = array(
+ 'title' => 'Download Certificate',
+ 'description' => 'Download Certificate',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array(
+ 'generate_pdf'
+ ),
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array(
+ 'generate pdf'
+ ),
+ 'file' => 'pdf/mentor_cert_pdf.inc'
+ );
$items["flowsheeting-project/certificates/verify"] = array(
"title" => "Certificate Verification",
"page callback" => "verify_certificates",
@@ -474,6 +496,15 @@ function dwsim_flowsheet_menu()
'type' => MENU_CALLBACK,
'file' => 'pdf/verify_certificates.inc'
);
+ /*$items["flowsheeting-project/certificates_custom/verify"] = array(
+ "title" => "Certificate Verification",
+ "page callback" => "verify_custom_certificates",
+ "access arguments" => array(
+ "verify certificates"
+ ),
+ 'type' => MENU_CALLBACK,
+ 'file' => 'pdf/verify_certificates.inc'
+ );
/* $items["dwsim_flowsheet/code_approval/dependency/ajax"] = array(
"title" => "Ajax callbacks",
"page callback" => "dwsim_flowsheet_dependency_approval_ajax",
@@ -536,6 +567,18 @@ function dwsim_flowsheet_permission()
'dwsim flowsheet generate abstract' => array(
'title' => t('dwsim flowsheet generate abstract'),
'restrict access' => TRUE
+ ),
+ "list flowsheet certificates" => array(
+ "title" => t("list flowsheet certificates"),
+ "description" => t("Allows users to list flowsheet certificates.")
+ ),
+ "list flowsheet custom certificates" => array(
+ "title" => t("list flowsheet custom certificates"),
+ "description" => t("Allows users to list flowsheet custom certificates.")
+ ),
+ "generate pdf" => array(
+ "title" => t("Generate pdf"),
+ "description" => t("Allows users to Generate pdf.")
)
);
// return array('dwsim flowsheet create proposal', 'dwsim flowsheet manage proposal', 'dwsim flowsheet edit proposal', 'dwsim flowsheet approve proposal', 'dwsim flowsheet propose solution', 'dwsim flowsheet approve code', 'dwsim flowsheet bulk manage abstract', 'dwsim flowsheet bulk delete code', 'dwsim flowsheet upload code', 'dwsim flowsheet download code', 'administer dwsim flowsheet', 'dwsim flowsheet generate lab');
diff --git a/email.inc b/email.inc
index 10124c9..da04468 100755
--- a/email.inc
+++ b/email.inc
@@ -134,7 +134,7 @@ FOSSEE,IIT Bombay', array(
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
$user_data = user_load($params['dwsim_flowsheet_proposal_approved']['user_id']);
- $url = 'http://dwsim.fossee.in/flowsheeting-project/coding-guidelines-flowsheeting';
+ $url = 'https://dwsim.fossee.in/flowsheeting-project/coding-guidelines-flowsheeting';
if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
@@ -167,7 +167,7 @@ Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_n
Project Title : ' . $proposal_data->project_title . '
Name of compound for which process development is carried out : ' . $proposal_data->process_development_compound_name . '
-Please ensure that ALL the guidelines for coding at http://dwsim.fossee.in/flowsheeting-project/coding-guidelines-flowsheeting are strictly followed. Refer http://dwsim.fossee.in/flowsheeting-project/flowsheeting-internship for the further procedure for submission of the project. Kindly ensure that the flowsheet and abstract are submitted within 1 month.
+Please ensure that ALL the guidelines for coding at https://dwsim.fossee.in/flowsheeting-project/coding-guidelines-flowsheeting are strictly followed. Refer https://dwsim.fossee.in/flowsheeting-project/flowsheeting-internship for the further procedure for submission of the project. Kindly ensure that the flowsheet and abstract are submitted within 1 month.
You can upload your abstract using abstract submission interface.
@@ -222,7 +222,7 @@ Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_n
Project Title : ' . $proposal_data->project_title . '
Kindly access this link to download the same.
-http://dwsim.fossee.in/flowsheeting-project/completed-flowsheet
+https://dwsim.fossee.in/flowsheeting-project/completed-flowsheet
You can now download your e-certificate after logging into the DWSIM website: dwsim.fossee.in. On the left-hand side panel, go to User Dashboard > Flowsheet Certificates > Download. In case of any difficulties, kindly let us know.
@@ -380,7 +380,7 @@ Experiment Title : ' . $experiment_data->title . '
Solution number : ' . $solution_data->code_number . '
Caption : ' . $solution_data->caption . '
-Please ensure that ALL the codes follow guidelines at http://dwsim.fossee.in/dwsim-flowsheet-project/dwsim-flowsheet-guidelines
+Please ensure that ALL the codes follow guidelines at https://dwsim.fossee.in/dwsim-flowsheet-project/dwsim-flowsheet-guidelines
Best Wishes,
@@ -472,7 +472,7 @@ Dear !user_name,
You have uploaded following dependency files :
' . $dependency_files . '
-Please ensure that ALL the codes follow guidelines at http://dwsim.fossee.in/dwsim-flowsheet-project/dwsim-flowsheet-guidelines
+Please ensure that ALL the codes follow guidelines at https://dwsim.fossee.in/dwsim-flowsheet-project/dwsim-flowsheet-guidelines
Best Wishes,
diff --git a/flowsheet_details.inc b/flowsheet_details.inc
index 0e30692..30ec87b 100755
--- a/flowsheet_details.inc
+++ b/flowsheet_details.inc
@@ -11,12 +11,12 @@ function dwsim_flowsheet_completed_proposals_all()
$result = $query->execute();
if ($result->rowCount() == 0)
{
- $output .= "Work has been completed for the following flow sheets. We welcome your contributions. For more details, please visit ".l("http://dwsim.fossee.in/flowsheeting-project","http://dwsim.fossee.in/flowsheeting-project")."<br>"."<h4>"."If you are looking for flowsheeting project ideas, ".l("click here","http://dwsim.fossee.in/flowsheeting-ideas",array('attributes' => array('class' => array('flash_content'))))."</h4>"."<hr>";
+ $output .= "Work has been completed for the following flow sheets. We welcome your contributions. For more details, please visit ".l("https://dwsim.fossee.in/flowsheeting-project","https://dwsim.fossee.in/flowsheeting-project")."<br>"."<h4>"."If you are looking for flowsheeting project ideas, ".l("click here","https://dwsim.fossee.in/flowsheeting-ideas",array('attributes' => array('class' => array('flash_content'))))."</h4>"."<hr>";
} //$result->rowCount() == 0
else
{
- $output .= "Work has been completed for the following flow sheets. We welcome your contributions. For more details, please visit ".l("http://dwsim.fossee.in/flowsheeting-project","http://dwsim.fossee.in/flowsheeting-project")."<br>"."<h4>"."If you are looking for flowsheeting project ideas, ".l("click here","http://dwsim.fossee.in/flowsheeting-ideas",array('attributes' => array('class' => array('flash_content'))))."</h4>"."<hr>";
+ $output .= "Work has been completed for the following flow sheets. We welcome your contributions. For more details, please visit ".l("https://dwsim.fossee.in/flowsheeting-project","https://dwsim.fossee.in/flowsheeting-project")."<br>"."<h4>"."If you are looking for flowsheeting project ideas, ".l("click here","https://dwsim.fossee.in/flowsheeting-ideas",array('attributes' => array('class' => array('flash_content'))))."</h4>"."<hr>";
$preference_rows = array();
$i = 1;
while ($row = $result->fetchObject())
diff --git a/pdf/cert_new.inc b/pdf/cert_new.inc
index 5ea85db..ca5b46e 100755
--- a/pdf/cert_new.inc
+++ b/pdf/cert_new.inc
@@ -11,30 +11,13 @@ function generate_pdf()
':uid' => $user->uid,
':proposal_id'=>$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();*/
+ $data3 = $query3->fetchObject();
if($data3){
if($data3->uid != $x){
drupal_set_message('Certificate is not available','error');
return;
}
}
- /*$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();
- if($data4->example_count == 0) {
- drupal_set_message('Certificate is not available','error');
- return;
- }
- $number_of_example = $data4->example_count;*/
$gender = array(
'salutation' => 'Mr. /Ms.',
'gender' => 'He/She'
@@ -60,20 +43,11 @@ function generate_pdf()
$pdf->AddPage();
$image_bg = $mpath . "/pdf/images/bg_cert.png";
$pdf->Image($image_bg, 0, 0, $pdf->w, $pdf->h);
- //$pdf->Rect(5, 5, 267, 207, 'D');
$pdf->SetMargins(18, 1, 18);
- //$pdf->Line(7.0, 7.0, 270.0, 7.0);
- //$pdf->Line(7.0, 7.0, 7.0, 210.0);
- //$pdf->Line(270.0, 210.0, 270.0, 7.0);
- //$pdf->Line(7.0, 210.0, 270.0, 210.0);
$path = drupal_get_path('module', 'dwsim_flowsheet');
- //$image1 = $mpath . "/pdf/images/dwsim_logo.png";
$pdf->Ln(15);
- //$pdf->Cell(200, 8, $pdf->Image($image1, 105, 15, 0, 28), 0, 1, 'C');
$pdf->Ln(20);
$pdf->SetFont('Arial', 'BI', 25);
- //$pdf->SetTextColor(139, 69, 19);
- //$pdf->Cell(240, 8, 'Certificate of Participation', '0', 1, 'C');
$pdf->Ln(26);
$pdf->SetFont('Arial', 'BI', 12);
$pdf->SetTextColor(0, 0, 0);
@@ -86,7 +60,6 @@ function generate_pdf()
$pdf->SetFont('Arial', 'I', 12);
if (strtolower($data3->branch) != "others") {
$pdf->SetTextColor(0, 0, 0);
- //$pdf->Cell(240, 8, 'from ' . $data3->university . ' has successfully', '0', '1', 'C');
$pdf->MultiCell(240, 8, 'from ' . $data3->university . ' has successfully', '0','C');
$pdf->Ln(0);
$pdf->Cell(240, 8, 'completed Internship under DWSIM Flowsheeting Project.', '0', '1', 'C');
@@ -99,13 +72,10 @@ function generate_pdf()
$pdf->Ln(0);
$pdf->Cell(240, 8, ' using DWSIM .The work done is available at', '0', '1', 'C');
$pdf->Cell(240, 4, '', '0', '1', 'C');
- $pdf->SetX(120);
+ $pdf->SetX(120);
$pdf->SetFont('', 'U');
$pdf->SetTextColor(139, 69, 19);
- $pdf->write(0, 'http://dwsim.fossee.in/', 'http://dwsim.fossee.in/');
- //$pdf->Ln(0);
- //$pdf->Cell(240, 8, 'Book: ' . $data2->book . ', Author: ' . $data2->author . '.', '0', '1', 'C');
- //$pdf->MultiCell(240, 8, 'Book: ' . $data2->book . ', Author: ' . $data2->author . '.', '0','C');
+ $pdf->write(0, 'https://dwsim.fossee.in/', 'https://dwsim.fossee.in/');
$pdf->Ln(0);
} //strtolower($data3->branch) != "others"
else {
@@ -114,10 +84,6 @@ function generate_pdf()
$pdf->Ln(0);
$pdf->Cell(240, 8, 'completed Internship under DWSIM Flowsheeting Project', '0', '1', 'C');
$pdf->Ln(0);
- //$pdf->Cell(240, 8, 'He/she has coded ' . $number_of_example . ' solved examples using DWSIM from the', '0', '1', 'C');
- //$pdf->Ln(0);
- //$pdf->Cell(240, 8, 'Book: ' . $data2->book . ', Author: ' . $data2->author . '.', '0', '1', 'C');
- //$pdf->Ln(0);
}
$proposal_get_id = 0;
$UniqueString = "";
@@ -133,13 +99,14 @@ function generate_pdf()
$UniqueString = generateRandomString();
$query = "
INSERT INTO dwsim_flowsheet_qr_code
- (proposal_id,qr_code)
+ (proposal_id,qr_code,custom_qr_code)
VALUES
- (:proposal_id,:qr_code)
+ (:proposal_id,:qr_code,:custom_qr_code)
";
$args = array(
":proposal_id" => $proposal_id,
- ":qr_code" => $UniqueString
+ ":qr_code" => $UniqueString,
+ ":custom_qr_code" => NULL
);
$result = db_query($query, $args, array(
'return' => Database::RETURN_INSERT_ID
@@ -148,20 +115,12 @@ function generate_pdf()
else {
$UniqueString = $DBString;
}
- $codeContents = "http://dwsim.fossee.in/flowsheeting-project/certificates/verify/" . $UniqueString;
+ $codeContents = "https://dwsim.fossee.in/flowsheeting-project/certificates/verify/" . $UniqueString;
$fileName = 'generated_qrcode.png';
$pngAbsoluteFilePath = $tempDir . $fileName;
$urlRelativeFilePath = $path . "/pdf/temp_prcode/" . $fileName;
QRcode::png($codeContents, $pngAbsoluteFilePath);
- /*$pdf->Cell(240, 4, '', '0', '1', 'C');
- $pdf->SetX(88);
- $pdf->write(0, 'The work done is available at ');
- $pdf->SetFont('', 'U');
- $pdf->SetTextColor(139, 69, 19);
- $pdf->write(0, 'http://dwsim.fossee.in/', 'http://dwsim.fossee.in/');
- $pdf->SetFont('', '');*/
$pdf->SetTextColor(0, 0, 0);
- //$pdf->write(0, '.', '.');
$pdf->Ln(30);
$pdf->SetX(198);
$pdf->SetFont('', '');
@@ -169,8 +128,6 @@ function generate_pdf()
$pdf->SetY(-85);
$pdf->SetX(200);
$pdf->Ln(16);
- //$sign = $path . "/pdf/images/sign.png";
- //$pdf->Image($sign, $pdf->GetX(), $pdf->GetY() - 20, 50, 0);
$pdf->Cell(240, 8, 'Prof. Kannan M. Moudgalya', 0, 1, 'R');
$pdf->SetX(199);
$pdf->SetFont('Arial', '', 10);
@@ -186,7 +143,6 @@ function generate_pdf()
$pdf->SetX(29);
$pdf->SetY(-50);
$image4 = $path . "/pdf/images/bottom_line.png";
- //$pdf->Image($image4, $pdf->GetX(), $pdf->GetY(), 20, 0);
$pdf->SetY(-50);
$pdf->SetX(80);
$image3 = $path . "/pdf/images/iitb.png";
@@ -217,7 +173,7 @@ function generate_pdf()
} //!feof($fp)
fclose($fp);
unlink($file);
- drupal_goto('flowsheeting-project/certificate');
+ //drupal_goto('flowsheeting-project/certificate');
return;
}
function generateRandomString($length = 5)
diff --git a/pdf/list_flowsheet_certificate.inc b/pdf/list_flowsheet_certificate.inc
index 41da56f..3be5e3f 100755
--- a/pdf/list_flowsheet_certificate.inc
+++ b/pdf/list_flowsheet_certificate.inc
@@ -9,7 +9,7 @@ function _list_flowsheet_certificates()
if ($exist_id){
if ($exist_id->id) {
if ($exist_id->id < 3) {
- drupal_set_message('<strong>You need to propose a flowsheet <a href="http://dwsim.fossee.in/flowsheeting-project/proposal">Flowsheet Proposal</a></strong> or if you have already proposed then your flowsheet is under reviewing process', 'status');
+ drupal_set_message('<strong>You need to propose a flowsheet <a href="https://dwsim.fossee.in/flowsheeting-project/proposal">Flowsheet Proposal</a></strong> or if you have already proposed then your flowsheet is under reviewing process', 'status');
return '';
} //$exist_id->id < 3
else {
@@ -48,7 +48,7 @@ function _list_flowsheet_certificates()
}
} //$exist_id->id
else {
- drupal_set_message('<strong>You need to propose a flowsheet <a href="http://dwsim.fossee.in/flowsheeting-project/proposal">Flowsheet Proposal</a></strong> or if you have already proposed then your flowsheet is under reviewing process', 'status');
+ drupal_set_message('<strong>You need to propose a flowsheet <a href="https://dwsim.fossee.in/flowsheeting-project/proposal">Flowsheet Proposal</a></strong> or if you have already proposed then your flowsheet is under reviewing process', 'status');
$page_content = "<span style='color:red;'> No certificate available </span>";
return $page_content;
}