query('SELECT i.item_code, i.call_number, loc.location_name, stat.*, i.site FROM item AS i LEFT JOIN mst_item_status AS stat ON i.item_status_id=stat.item_status_id LEFT JOIN mst_location AS loc ON i.location_id=loc.location_id WHERE i.biblio_id='.$id); if ($copy_q->num_rows < 1) { echo ''.__('There is no item/copy for this title yet').''; } else { echo '
'.$copy_d['item_code'].' | '; echo ''.$copy_d['call_number'].' | '; echo ''.$copy_d['location_name']; if (trim($copy_d['site']) != "") { echo ' ('.$copy_d['site'].')'; } echo ' | '; echo ''; /* DEPRECATED $_rules = @unserialize($copy_d['rules']); */ if ($loan_stat_q->num_rows > 0) { $loan_stat_d = $loan_stat_q->fetch_row(); echo ''.__('Currently On Loan (Due on').date($sysconf['date_format'], strtotime($loan_stat_d[0])).')'; //mfc } else if ($copy_d['no_loan']) { echo ''.__('Available but not for loan').' - '.$copy_d['item_status_name'].''; } else { echo ''.__('Available').(trim($copy_d['item_status_name'])?' - '.$copy_d['item_status_name']:'').''; } $loan_stat_q->free_result(); echo ' | '; echo '