本文整理汇总了PHP中simbio_datagrid::disableSort方法的典型用法代码示例。如果您正苦于以下问题:PHP simbio_datagrid::disableSort方法的具体用法?PHP simbio_datagrid::disableSort怎么用?PHP simbio_datagrid::disableSort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simbio_datagrid
的用法示例。
在下文中一共展示了simbio_datagrid::disableSort方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AND
$datagrid = new simbio_datagrid();
$datagrid->setSQLColumn('l.item_code AS \'' . __('Item Code') . '\'', 'b.title AS \'' . __('Title') . '\'', 'l.loan_date AS \'' . __('Loan Date') . '\'', 'IF(return_date IS NULL, \'<i>' . __('Not Returned Yet') . '</i>\', return_date) AS \'' . __('Returned Date') . '\'');
$datagrid->setSQLorder("l.loan_date DESC");
$criteria = 'l.member_id=\'' . $dbs->escape_string($memberID) . '\' ';
// is there any search
if (isset($_GET['keywords']) and $_GET['keywords']) {
$keyword = $dbs->escape_string($_GET['keywords']);
$criteria .= " AND (l.item_code LIKE '%{$keyword}%' OR b.title LIKE '%{$keyword}%')";
}
$datagrid->setSQLCriteria($criteria);
// set table and table header attributes
$datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
$datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
$datagrid->icon_edit = SENAYAN_WEB_ROOT_DIR . 'admin/' . $sysconf['admin_template']['dir'] . '/' . $sysconf['admin_template']['theme'] . '/edit.gif';
// special properties
$datagrid->using_AJAX = false;
$datagrid->column_width = array(1 => '70%');
$datagrid->disableSort('Return Date');
// put the result into variables
$datagrid_result = $datagrid->createDataGrid($dbs, $table_spec, 20, false);
if (isset($_GET['keywords']) and $_GET['keywords']) {
$msg = str_replace('{result->num_rows}', $datagrid->num_rows, __('Found <strong>{result->num_rows}</strong> from your keywords'));
//mfc
echo '<div class="infoBox">' . $msg . ' : "' . $_GET['keywords'] . '"</div>';
}
echo $datagrid_result;
}
// get the buffered content
$content = ob_get_clean();
// include the page template
require SENAYAN_BASE_DIR . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
示例2: array
}
} else {
$criteria .= " AND status='".$view."'";
}
if (isset($show_only_current)) {
$criteria .= ' AND checked_by=\''.$_SESSION['realname'].'\'';
}
// set criteria
$datagrid->setSQLCriteria($criteria);
// set table and table header attributes
$datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
$datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
// set delete proccess URL
$datagrid->delete_URL = $_SERVER['PHP_SELF'];
$datagrid->column_width = array('10%', '60%', '10%', '10%', '10%');
$datagrid->disableSort('Current Status');
// put the result into variables
$datagrid_result = $datagrid->createDataGrid($dbs, $table_spec, 20, false);
if (isset($_GET['keywords']) AND $_GET['keywords']) {
$msg = str_replace('{result->num_rows}', $datagrid->num_rows, __('Found <strong>{result->num_rows}</strong> from your keywords')); //mfc
echo '<div class="infoBox">'.$msg.' : "'.$_GET['keywords'].'"</div>';
}
echo $datagrid_result;
/* main content end */
}
?>
示例3: explode
$table->setCellAttr($row, 1, 'class="alterCell" valign="top" style="width: 1%;"');
$table->setCellAttr($row, 2, 'class="alterCell2" valign="top" style="width: auto;"');
// add row count
$row++;
}
// print out table
echo $table->printTable();
} else {
/* STOCK TAKE HISTORY LIST */
// table spec
$table_spec = 'stock_take AS st';
// create datagrid
$datagrid = new simbio_datagrid();
$datagrid->setSQLColumn('st.stock_take_id', 'st.stock_take_name AS \'' . __('Stock Take Name') . '\'', 'st.start_date AS \'' . __('Start Date') . '\'', 'st.end_date AS \'' . __('End Date') . '\'', 'CONCAT(\'<a class="notAJAX" href="' . SENAYAN_WEB_ROOT_DIR . FILES_DIR . '/' . REPORT_DIR . '/\', st.report_file, \'" target="_blank">\', st.report_file, \'</a>\') AS \'' . __('Report') . '\'');
$datagrid->setSQLorder('st.start_date DESC');
$datagrid->disableSort('Report');
// is there any search
if (isset($_GET['keywords']) and $_GET['keywords']) {
$keyword = $dbs->escape_string(trim($_GET['keywords']));
$words = explode(' ', $keyword);
if (count($words) > 1) {
$concat_sql = ' (';
foreach ($words as $word) {
$concat_sql .= " (stock_take_name LIKE '%{$word}%' OR init_user LIKE '%{$word}%') AND";
}
// remove the last AND
$concat_sql = substr_replace($concat_sql, '', -3);
$concat_sql .= ') ';
$datagrid->setSQLCriteria($concat_sql);
} else {
$datagrid->setSQLCriteria("stock_take_name LIKE '%{$keyword}%' OR init_user LIKE '%{$keyword}%'");
示例4: explode
$keyword = $dbs->escape_string(trim($_GET['keywords']));
$words = explode(' ', $keyword);
if (count($words) > 1) {
$concat_sql = ' (';
foreach ($words as $word) {
$concat_sql .= " (sl.log_date LIKE '%{$word}%' OR sl.log_msg LIKE '%{$word}%') AND";
}
// remove the last AND
$concat_sql = substr_replace($concat_sql, '', -3);
$concat_sql .= ') ';
$datagrid->setSQLCriteria($concat_sql);
} else {
$datagrid->setSQLCriteria("sl.log_date LIKE '%{$keyword}%' OR sl.log_msg LIKE '%{$keyword}%'");
}
}
// set table and table header attributes
$datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
$datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
// set delete proccess URL
$datagrid->delete_URL = $_SERVER['PHP_SELF'];
$datagrid->column_width = array('18%', '10%', '72%');
$datagrid->disableSort('Message');
// put the result into variables
$datagrid_result = $datagrid->createDataGrid($dbs, $table_spec, 50, false);
if (isset($_GET['keywords']) and $_GET['keywords']) {
$msg = str_replace('{result->num_rows}', $datagrid->num_rows, __('Found <strong>{result->num_rows}</strong> from your keywords'));
//mfc
echo '<div class="infoBox">' . $msg . ' : "' . $_GET['keywords'] . '"</div>';
}
echo $datagrid_result;
/* main content end */