1) { $page = $_GET['page']; } else { $page = 1; } $_sql = "Select c.comment, m.member_name, c.input_date from comment AS c LEFT JOIN biblio AS b ON b.biblio_id = c.biblio_id LEFT JOIN member AS m ON m.member_id = c.member_id WHERE b.biblio_id =".$_detail_id. " ORDER BY c.last_update DESC"; $commlist = $dbs->query($_sql); if ($commlist) { $_all_recs = $commlist->num_rows; } if ($_all_recs >0) { $_page = ($page -1) * $_recs_each_page; $_sql .= " Limit " . $_page. ", " . $_recs_each_page; $commlist = $dbs->query($_sql); $_list_comment .= '
'. $_all_recs . __(' comments available'). '
'; while ($_data = $commlist->fetch_assoc()) { $_list_comment .= '
'; $_list_comment .= '
'.$_data['member_name']. __(' at ') . $_data['input_date']. __(' write'). '
'; $_list_comment .= '
'. $_data['comment'] . '
'; $_list_comment .= '
'; } $_list_comment .= '
'.simbio_paging::paging($_all_recs, $_recs_each_page, $int_pages_each_set = 10, '', '_self').'
'; } if (ISSET($_SESSION['mid'])) { // Comment form $_forms = '
'; $_forms .= simbio_form_element::textField('textarea','comment','','placeholder="Add your comment" class="comment-input"'). '
'; $_forms .= ''; $_forms .= '
'; return $_list_comment.$_forms; } else { return $_list_comment; } }