From 36f955737f8938df2286388fb067e3d735269b5e Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 9 May 2017 17:23:35 +0530 Subject: modified display completed books --- display_books.inc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/display_books.inc b/display_books.inc index 18e531e..5ef8d9a 100755 --- a/display_books.inc +++ b/display_books.inc @@ -84,7 +84,6 @@ function _textbook_companion_list_of_new_category_display($category_id = NULL) $query->fields('list_of_category'); $query->condition('id', $category_id); $category_list = $query->execute(); - $category .= ""; return $category; } +/* Display Completed books */ function tbc_completed_books_all() { $category_id = NULL; $output = ""; $output = "

Category

"; - $output .= "
"; + $output .= "

"; $output .= _textbook_companion_list_of_new_category($category_id); - $output .= "

"; + $output .= "
"; $result_count = db_query("SELECT pe.book FROM textbook_companion_preference pe LEFT JOIN textbook_companion_proposal po ON pe.proposal_id = po.id WHERE po.proposal_status =3 AND pe.approval_status =1 AND pe.category>0"); $row_count = $result_count->rowCount(); $output .= "

Total number of completed books :  " . $row_count . "

"; $output .= "
"; $result_category = db_query("SELECT * FROM list_of_category WHERE category_id !=0"); $row_category_count = $result_category->rowCount(); + $output .= "

    "; for ($i = 1; $i <= $row_category_count; $i++) { - $output .= "
    " . _textbook_companion_list_of_new_category_display($i) . "
    "; + $output .= "
    " . _textbook_companion_list_of_new_category_display($i) . "

    "; } //$i = 1; $i <= $row_category_count; $i++ + $output .= "

"; return $output; } -- cgit