disable_paging = true; $_loan_hist->table_ID = 'loanhist'; $_loan_hist->setSQLColumn('l.item_code AS \''.__('Item Code').'\'', 'b.title AS \''.__('Title').'\'', 'l.loan_date AS \''.__('Loan Date').'\'', 'l.return_date AS \''.__('Return Date').'\''); $_loan_hist->setSQLorder('l.loan_date DESC'); $_criteria = sprintf('m.member_id=\'%s\' AND l.is_lent=1 AND is_return=1 ', $_SESSION['mid']); $_loan_hist->setSQLCriteria($_criteria); /* callback function to show overdue */ function showOverdue($obj_db, $array_data) { $_curr_date = date('Y-m-d'); if (simbio_date::compareDates($array_data[3], $_curr_date) == $_curr_date) { #return ''.$array_data[3].' '.__('OVERDUED').''; } else { return $array_data[3]; } } // modify column value #$_loan_hist->modifyColumnContent(3, 'callback{showOverdue}'); // set table and table header attributes $_loan_hist->table_attr = 'align="center" class="memberLoanList" cellpadding="5" cellspacing="0"'; $_loan_hist->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"'; $_loan_hist->using_AJAX = false; // return the result $_result = $_loan_hist->createDataGrid($dbs, $_table_spec, $num_recs_show); $_result = '
'.$_loan_hist->num_rows.' '.__('item(s) loan history').'
'."\n".$_result; return $_result; } /* Experimental Loan History - end */ // show all #echo '

'.__('Your Loan History').'

'."\n"; #echo showLoanHist(); $download = '

'.__('Your Loan History').'

'."\n"; $download .= showLoanHist(); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=loan_history.html"); header("Content-Type: text/html"); #header("Content-Transfer-Encoding: binary"); echo $download; exit(); } ?>