diff options
Diffstat (limited to 'pdf/list_all_certificates.inc')
-rwxr-xr-x | pdf/list_all_certificates.inc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pdf/list_all_certificates.inc b/pdf/list_all_certificates.inc index 19dede5..a65aa47 100755 --- a/pdf/list_all_certificates.inc +++ b/pdf/list_all_certificates.inc @@ -51,7 +51,14 @@ return ''; } */ function _list_all_certificates() { + global $user; + if (!$user->uid) + { + drupal_set_message('Log in to download the certificate ', 'error'); + drupal_goto(''); + return; + } /*$query_id =db_query("SELECT id FROM textbook_companion_proposal WHERE proposal_status=3 AND uid=".$user->uid); $exist_id = db_fetch_object($query_id);*/ $query = db_select('textbook_companion_proposal'); @@ -64,13 +71,6 @@ function _list_all_certificates() $exist_id = $result->fetchObject(); if ($exist_id->id) { - if ($exist_id->id < 3) - { - drupal_set_message('<strong>You need to propose a book <a href="/proposal">Book Proposal</a></strong>', 'status'); - return ''; - } - else - { $search_rows = array(); global $output; $output = ''; @@ -109,10 +109,9 @@ function _list_all_certificates() return ''; } } - } 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="/textbook-companion/proposal">Book Proposal</a></strong>', 'status'); return ''; } } |