query('SELECT gmd_name FROM mst_gmd'); $ct_options = array(); $ct_options[] = array('0', __('ALL')); while ($ct_d = $ct_q->fetch_row()) { $ct_options[] = array($ct_d[0], $ct_d[0]); } echo simbio_form_element::selectList('gmd', $ct_options); ?>
query('SELECT coll_type_name FROM mst_coll_type'); $ct_options = array(); $ct_options[] = array('0', __('ALL')); while ($ct_d = $ct_q->fetch_row()) { $ct_options[] = array($ct_d[0], $ct_d[0]); } echo simbio_form_element::selectList('collType', $ct_options); ?>
query('SELECT location_name FROM mst_location'); $loc_options = array(); $loc_options[] = array('0', __('ALL')); while ($loc_d = $loc_q->fetch_row()) { $loc_options[] = array($loc_d[0], $loc_d[0]); } echo simbio_form_element::selectList('location', $loc_options); ?>
setSQLColumn('item_code AS \''.__('Item Code').'\'', 'title AS \''.__('Title').'\'', 'gmd_name AS \''.__('GMD').'\'', 'classification AS \''.__('Classification').'\'', 'coll_type_name AS \''.__('Collection Type').'\'', 'call_number AS \''.__('Call Number').'\''); $reportgrid->setSQLorder('title ASC'); // is there any search $criteria = 'status=\'m\' '; if (isset($_GET['title']) AND !empty($_GET['title'])) { $keyword = $dbs->escape_string(trim($_GET['title'])); $words = explode(' ', $keyword); if (count($words) > 1) { $concat_sql = ' AND ('; foreach ($words as $word) { $concat_sql .= " (b.title LIKE '%$word%' OR b.isbn_issn LIKE '%$word%') AND"; } // remove the last AND $concat_sql = substr_replace($concat_sql, '', -3); $concat_sql .= ') '; $criteria .= $concat_sql; } else { $criteria .= ' AND (title LIKE \'%'.$keyword.'%\')'; } } if (isset($_GET['itemCode']) AND !empty($_GET['itemCode'])) { $item_code = $dbs->escape_string(trim($_GET['itemCode'])); $criteria .= ' AND item_code LIKE \'%'.$item_code.'%\''; } if (isset($_GET['class']) AND ($_GET['class'] != '')) { $class = $dbs->escape_string($_GET['class']); $criteria .= ' AND classification LIKE \''.$class.'%\''; } if (isset($_GET['gmd']) AND !empty($_GET['gmd'])) { $gmd = $dbs->escape_string(trim($_GET['gmd'])); $criteria .= ' AND gmd_name=\''.$gmd.'\''; } if (isset($_GET['collType']) AND !empty($_GET['collType'])) { $collType = $dbs->escape_string(trim($_GET['collType'])); $criteria .= ' AND coll_type_name=\''.$collType.'\''; } if (isset($_GET['location']) AND !empty($_GET['location'])) { $location = $dbs->escape_string(trim($_GET['location'])); $criteria .= ' AND location_name=\''.$location.'\''; } $reportgrid->setSQLCriteria($criteria); // put the result into variables echo $reportgrid->createDataGrid($dbs, $table_spec, 50); echo ''; $content = ob_get_clean(); // include the page template require SB.'/admin/'.$sysconf['admin_template']['dir'].'/printed_page_tpl.php'; }