disable_paging = true; $_loan_list->table_ID = 'loanlist'; $_loan_list->setSQLColumn('l.item_code AS \''.__('Item Code').'\'', 'b.title AS \''.__('Title').'\'', 'l.loan_date AS \''.__('Loan Date').'\'', 'l.due_date AS \''.__('Due Date').'\''); $_loan_list->setSQLorder('l.loan_date DESC'); $_criteria = sprintf('m.member_id=\'%s\' AND l.is_lent=1 AND is_return=0 ', $_SESSION['mid']); $_loan_list->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_list->modifyColumnContent(3, 'callback{showOverdue}'); // set table and table header attributes $_loan_list->table_attr = 'align="center" class="memberLoanList" cellpadding="5" cellspacing="0"'; $_loan_list->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"'; $_loan_list->using_AJAX = false; // return the result $_result = $_loan_list->createDataGrid($dbs, $_table_spec, $num_recs_show); $_result = '
'.$_loan_list->num_rows.' '.__('Current Loan item(s)').'
'."\n".$_result; return $_result; } /* Experimental Loan History - end */ // show all #echo '

'.__('Your Current Loan').'

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

'.__('Your Current Loan').'

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