diff options
author | prashantsinalkar | 2016-08-25 17:42:42 +0530 |
---|---|---|
committer | prashantsinalkar | 2016-08-25 17:42:42 +0530 |
commit | 7dcdb012ebb835dadaf645a95aff3ce07561978a (patch) | |
tree | 2f9ece9576edd1f0885c8d0fa503a892c8f5868b | |
parent | 2b1d2388486dd66aabdc8138befac022e46df7ef (diff) | |
download | scilab_textbook_companion-7dcdb012ebb835dadaf645a95aff3ce07561978a.tar.gz scilab_textbook_companion-7dcdb012ebb835dadaf645a95aff3ce07561978a.tar.bz2 scilab_textbook_companion-7dcdb012ebb835dadaf645a95aff3ce07561978a.zip |
modified the status message and clean the code
-rwxr-xr-x | pdf/list_all_certificates.inc | 55 |
1 files changed, 2 insertions, 53 deletions
diff --git a/pdf/list_all_certificates.inc b/pdf/list_all_certificates.inc index 57d1a49..a3dc24a 100755 --- a/pdf/list_all_certificates.inc +++ b/pdf/list_all_certificates.inc @@ -1,54 +1,4 @@ <?php -/* function _list_all_certificates() -{ -global $user; -$uid1 = $user->uid; - -$query2 = db_query("SELECT * FROM {textbook_companion_proposal} WHERE proposal_status=3 AND uid=".$user->uid); -$data2 = db_fetch_object($query2); -if($data2->id) -/*while($data2 = db_fetch_object($query2)) -{*/ -/* if($data2->id) -{ -$search_rows = array(); -global $output; -$output = ''; -$query3 = db_query("SELECT * FROM textbook_companion_preference WHERE approval_status=1 AND proposal_id=".$data2->id); - -while ($search_data3 = db_fetch_object($query3)) -{ -$search_rows[] = array($search_data3->isbn,$search_data3->book,$search_data3->author,l('Download Certificate', 'certificate/generate_pdf/'.$search_data3->id)); -} -if ($search_rows) -{ -$search_header = array('ISBN', 'Book Name', 'Author', 'Download Certificates'); -$output = theme_table($search_header, $search_rows); -return $output; -} -else -{ -echo("Error"); -return ''; -} -} -else -{ -$query3 = db_query("SELECT * FROM {textbook_companion_proposal} WHERE uid=".$user->uid); -$data3 = db_fetch_object($query3); -if($data3) -{ -drupal_set_message('<strong>Your book is still under Review!</strong>', 'status'); -return ''; -} -else -{ -drupal_set_message('<strong>You need to propose a book <a href="/proposal">Book Proposal</a></strong>', 'status'); -return ''; -} -} -//} -} */ function _list_all_certificates() { global $user; @@ -60,7 +10,7 @@ function _list_all_certificates() { if ($exist_id->id < 3) { - drupal_set_message('<strong>You need to propose a book <a href="/proposal">Book Proposal</a></strong>', 'status'); + drupal_set_message('<strong>You need to propose a book <a href="http://www.scilab.in/book_proposal">Book Proposal</a></strong> or if you have already proposed then your book is under reviewing process', 'status'); return ''; } //$exist_id->id < 3 else @@ -106,8 +56,7 @@ function _list_all_certificates() } //$exist_id->id else { - drupal_set_message('<strong>You need to propose a book <a href="/proposal">Book Proposal</a></strong>', 'status'); + drupal_set_message('<strong>You need to propose a book <a href="http://www.scilab.in/book_proposal">Book Proposal</a></strong> or if you have already proposed then your book is under reviewing process', 'status'); return ''; } } -?> |