summaryrefslogtreecommitdiff
path: root/pdf/cert_new.inc
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/cert_new.inc')
-rwxr-xr-xpdf/cert_new.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/pdf/cert_new.inc b/pdf/cert_new.inc
index 609e4d7..701e8ba 100755
--- a/pdf/cert_new.inc
+++ b/pdf/cert_new.inc
@@ -7,14 +7,15 @@ function generate_pdf()
global $user;
$x = $user->uid;
$proposal_id = arg(3);
- $query2 = db_query("SELECT id FROM dwsim_flowsheet_proposal WHERE approval_status=3 AND uid= :uid", array(
- ':uid' => $user->uid
+ $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
));
- $data2 = $query2->fetchObject();
- $query3 = db_query("SELECT * FROM dwsim_flowsheet_proposal WHERE approval_status=3 AND uid= :uid", array(
+ $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');