summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSashi202017-07-31 12:41:18 +0530
committerSashi202017-07-31 12:41:18 +0530
commit186f22a5a955111184dd5989864cccddeebe5493 (patch)
treeae59f2bff49beb421d10e207e01b92885e8846c5
parent10438ea035832102bd5ebbcb2f803ca5a821f4cb (diff)
downloaddwsim_flowsheet-186f22a5a955111184dd5989864cccddeebe5493.tar.gz
dwsim_flowsheet-186f22a5a955111184dd5989864cccddeebe5493.tar.bz2
dwsim_flowsheet-186f22a5a955111184dd5989864cccddeebe5493.zip
Minor Changes
-rwxr-xr-xpdf/cert_new.inc13
1 files changed, 6 insertions, 7 deletions
diff --git a/pdf/cert_new.inc b/pdf/cert_new.inc
index 701e8ba..d16f425 100755
--- a/pdf/cert_new.inc
+++ b/pdf/cert_new.inc
@@ -7,15 +7,14 @@ function generate_pdf()
global $user;
$x = $user->uid;
$proposal_id = arg(3);
- $query3 = db_query("SELECT * FROM dwsim_flowsheet_proposal WHERE approval_status=3 AND uid= :uid AND id=:proposal_id", array(
- ':uid' => $user->uid,
- ':proposal_id'=>$proposal_id
+ $query2 = db_query("SELECT id FROM dwsim_flowsheet_proposal WHERE approval_status=3 AND uid= :uid", array(
+ ':uid' => $user->uid
));
- $data3 = $query3->fetchObject();
- /*$query3 = db_query("SELECT * FROM dwsim_flowsheet_proposal WHERE approval_status=3 AND uid= :uid", array(
+ $data2 = $query2->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');
@@ -217,7 +216,7 @@ function generate_pdf()
} //!feof($fp)
fclose($fp);
unlink($file);
- drupal_goto('certificate');
+ drupal_goto('flowsheeting-project/certificates');
return;
}
function generateRandomString($length = 5)