本文整理汇总了PHP中sort_flag函数的典型用法代码示例。如果您正苦于以下问题:PHP sort_flag函数的具体用法?PHP sort_flag怎么用?PHP sort_flag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sort_flag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_query
function action_query()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $_SESSION['user_id'];
$list = pre_sale_list();
$smarty->assign('pre_sale_list', $list['item']);
$smarty->assign('filter', $list['filter']);
$smarty->assign('record_count', $list['record_count']);
$smarty->assign('page_count', $list['page_count']);
$sort_flag = sort_flag($list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('pre_sale_list.htm'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
}
示例2: action_list
/**
* 客服列表
*/
function action_list()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $_SESSION['user_id'];
/* 模板赋值 */
$smarty->assign('full_page', 1);
$smarty->assign('ur_here', $_LANG['customer_list']);
$smarty->assign('action_link', array('href' => 'customer.php?act=add', 'text' => $_LANG['add_customer']));
$result = customer_list();
$smarty->assign('customer_list', $result['item']);
$smarty->assign('filter', $result['filter']);
$smarty->assign('record_count', $result['record_count']);
$smarty->assign('page_count', $result['page_count']);
$sort_flag = sort_flag($result['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
/* 显示客服列表页面 */
assign_query_info();
$smarty->display('customer_list.htm');
}
示例3: sort_flag
$smarty->assign('page_count', $list['page_count']);
$sort_flag = sort_flag($list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
assign_query_info();
$smarty->display('booking_list.htm');
}
/*------------------------------------------------------ */
//-- 翻页、排序
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'query') {
$list = get_bookinglist();
$smarty->assign('booking_list', $list['item']);
$smarty->assign('filter', $list['filter']);
$smarty->assign('record_count', $list['record_count']);
$smarty->assign('page_count', $list['page_count']);
$sort_flag = sort_flag($list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('booking_list.htm'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
}
/*------------------------------------------------------ */
//-- 删除缺货登记
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'remove') {
check_authz_json('booking');
$id = intval($_GET['id']);
$db->query("DELETE FROM " . $ecs->table('booking_goods') . " WHERE rec_id='{$id}'");
$url = 'goods_booking.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
}
/*------------------------------------------------------ */
示例4: array
$smarty->assign('ur_here', $_LANG['order_by_surplus']);
$smarty->assign('filter', $order_list['filter']);
$smarty->assign('record_count', $order_list['record_count']);
$smarty->assign('page_count', $order_list['page_count']);
$smarty->assign('full_page', 1);
$smarty->assign('action_link', array('text' => $_LANG['user_account_manage'], 'href' => 'user_account_manage.php?act=list&start_date=' . local_date('Y-m-d', $start_date) . '&end_date=' . local_date('Y-m-d', $end_date)));
/* 显示页面 */
assign_query_info();
$smarty->display('order_surplus_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
$order_list = order_list();
$smarty->assign('order_list', $order_list['order_list']);
$smarty->assign('filter', $order_list['filter']);
$smarty->assign('record_count', $order_list['record_count']);
$smarty->assign('page_count', $order_list['page_count']);
$sort_flag = sort_flag($order_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('order_surplus_list.htm'), '', array('filter' => $order_list['filter'], 'page_count' => $order_list['page_count']));
}
/**
* 获得账户变动金额
* @param string $type 0,充值 1,提现
* @return array
*/
function get_total_amount($start_date, $end_date, $type = 0)
{
$sql = " SELECT IFNULL(SUM(amount), 0) AS total_amount FROM " . $GLOBALS['ecs']->table('user_account') . " AS a, " . $GLOBALS['ecs']->table('users') . " AS u " . " WHERE process_type = {$type} AND is_paid = 1 AND a.user_id = u.user_id AND paid_time >= '{$start_date}' AND paid_time < '" . ($end_date + 86400) . "'";
$amount = $GLOBALS['db']->getone($sql);
$amount = $type ? price_format(abs($amount)) : price_format($amount);
return $amount;
}
示例5: sort_flag
$smarty->assign('article_list', $article_list['arr']);
$smarty->assign('filter', $article_list['filter']);
$smarty->assign('record_count', $article_list['record_count']);
$smarty->assign('page_count', $article_list['page_count']);
$sort_flag = sort_flag($article_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
assign_query_info();
$smarty->display('article_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
check_authz_json('article_manage');
$article_list = get_articleslist();
$smarty->assign('article_list', $article_list['arr']);
$smarty->assign('filter', $article_list['filter']);
$smarty->assign('record_count', $article_list['record_count']);
$smarty->assign('page_count', $article_list['page_count']);
$sort_flag = sort_flag($article_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('article_list.htm'), '', array('filter' => $article_list['filter'], 'page_count' => $article_list['page_count']));
}
/*------------------------------------------------------ */
//-- 添加文章
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'add') {
/* 权限判断 */
admin_priv('article_manage');
/* 创建 html editor */
create_html_editor('FCKeditor1');
/*初始化*/
$article = array();
$article['is_open'] = 1;
/* 取得分类、品牌 */
示例6: elseif
$smarty->assign('msg_list', $msg_list['msg_list']);
$smarty->assign('filter', $msg_list['filter']);
$smarty->assign('record_count', $msg_list['record_count']);
$smarty->assign('page_count', $msg_list['page_count']);
$smarty->assign('full_page', 1);
$smarty->assign('sort_msg_id', '<img src="images/sort_desc.gif">');
$smarty->assign('ur_here', $_LANG['08_unreply_msg']);
$smarty->assign('full_page', 1);
$smarty->display('msg_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
$msg_list = msg_list();
$smarty->assign('msg_list', $msg_list['msg_list']);
$smarty->assign('filter', $msg_list['filter']);
$smarty->assign('record_count', $msg_list['record_count']);
$smarty->assign('page_count', $msg_list['page_count']);
$sort_flag = sort_flag($msg_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('msg_list.htm'), '', array('filter' => $msg_list['filter'], 'page_count' => $msg_list['page_count']));
} elseif ($_REQUEST['act'] == 'remove') {
$msg_id = intval($_REQUEST['id']);
/* 检查权限 */
check_authz_json('feedback_priv');
$msg_title = $exc->get_name($msg_id);
$img = $exc->get_name($msg_id, 'message_img');
if ($exc->drop($msg_id)) {
/* 删除图片 */
if (!empty($img)) {
@unlink(ROOT_PATH . DATA_DIR . '/feedbackimg/' . $img);
}
$sql = "DELETE FROM " . $ecs->table('feedback') . " WHERE parent_id = '{$msg_id}' LIMIT 1";
$db->query($sql, 'SILENT');
示例7: sort_flag
$smarty->assign('inout_list', $inout_list['arr']);
$smarty->assign('filter', $inout_list['filter']);
$smarty->assign('record_count', $inout_list['record_count']);
$smarty->assign('page_count', $inout_list['page_count']);
$sort_flag = sort_flag($inout_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
assign_query_info();
$smarty->display('store_inout_in_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
check_authz_json('inout_in_manage');
$inout_list = get_inoutlist();
$smarty->assign('inout_list', $inout_list['arr']);
$smarty->assign('filter', $inout_list['filter']);
$smarty->assign('record_count', $inout_list['record_count']);
$smarty->assign('page_count', $inout_list['page_count']);
$sort_flag = sort_flag($inout_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('store_inout_in_list.htm'), '', array('filter' => $inout_list['filter'], 'page_count' => $inout_list['page_count']));
}
/*------------------------------------------------------ */
//-- 添加入库单
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'add') {
/* 权限判断 */
admin_priv('inout_in_manage');
/*初始化*/
$inout = array();
$inout['store_id'] = $_REQUEST['store_id'] ? intval($_REQUEST['store_id']) : 0;
if ($inout['store_id']) {
$inout['sub_id_list'] = $db->getAll("select store_id, store_name from " . $ecs->table('store_main') . " where parent_id='{$inout['store_id']}' and store_type_id=0 ");
}
示例8: assign_query_info
$smarty->assign('class_list', $class_list);
$smarty->assign('grade_list', $grade_list);
$smarty->assign('filter', $classAdmin_list['filter']);
$smarty->assign('record_count', $classAdmin_list['record_count']);
$smarty->assign('page_count', $classAdmin_list['page_count']);
$smarty->assign('full_page', 1);
$smarty->assign('sort_classAdmin_id', '<img src="images/sort_desc.gif">');
assign_query_info();
$smarty->display('classAdmin_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
$classAdmin_list = classAdmin_list($table);
$smarty->assign('classAdmin_list', $classAdmin_list['classAdmin_list']);
$smarty->assign('filter', $classAdmin_list['filter']);
$smarty->assign('record_count', $classAdmin_list['record_count']);
$smarty->assign('page_count', $classAdmin_list['page_count']);
$sort_flag = sort_flag($classAdmin_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('classAdmin_list.htm'), '', array('filter' => $classAdmin_list['filter'], 'page_count' => $classAdmin_list['page_count']));
} elseif ($_REQUEST['act'] == 'add') {
/* 检查权限 */
admin_priv('classAdmin_manage');
$smarty->assign('ur_here', "添加班级管理员");
$smarty->assign('action_link', array('text' => "班级管理员列表", 'href' => 'classAdmin.php?act=list'));
$smarty->assign('form_action', 'insert');
$class_list = class_list();
$smarty->assign('class_list', $class_list);
assign_query_info();
$smarty->display('classAdmin_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
/* 检查权限 */
admin_priv('classAdmin_manage');
示例9: sort_flag
$smarty->assign('filter', $agency_list['filter']);
$smarty->assign('record_count', $agency_list['record_count']);
$smarty->assign('page_count', $agency_list['page_count']);
/* 排序标记 */
$sort_flag = sort_flag($agency_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
assign_query_info();
$smarty->display('agency_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
$agency_list = get_agencylist();
$smarty->assign('agency_list', $agency_list['agency']);
$smarty->assign('filter', $agency_list['filter']);
$smarty->assign('record_count', $agency_list['record_count']);
$smarty->assign('page_count', $agency_list['page_count']);
/* 排序标记 */
$sort_flag = sort_flag($agency_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('agency_list.htm'), '', array('filter' => $agency_list['filter'], 'page_count' => $agency_list['page_count']));
} elseif ($_REQUEST['act'] == 'edit_agency_name') {
check_authz_json('agency_manage');
$id = intval($_POST['id']);
$name = json_str_iconv(trim($_POST['val']));
/* 检查名称是否重复 */
if ($exc->num("agency_name", $name, $id) != 0) {
make_json_error(sprintf($_LANG['agency_name_exist'], $name));
} else {
if ($exc->edit("agency_name = '{$name}'", $id)) {
admin_log($name, 'edit', 'agency');
clear_cache_files();
make_json_result(stripslashes($name));
} else {
示例10: elseif
}
} elseif ($_REQUEST['act'] == 'remove') {
check_authz_json('ad_manage');
$id = intval($_GET['id']);
$exc->drop($id);
admin_log('', 'remove', 'ads_position');
$url = 'new_position.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
} elseif ($_REQUEST['act'] == 'query') {
$position_list = get_position();
$smarty->assign('position_list', $position_list['ads']);
$smarty->assign('filter', $position_list['filter']);
$smarty->assign('record_count', $position_list['record_count']);
$smarty->assign('page_count', $position_list['page_count']);
$sort_flag = sort_flag($position_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('new_position.htm'), '', array('filter' => $position_list['filter'], 'page_count' => $position_list['page_count']));
}
/* 获取广告数据列表 */
function get_position()
{
/* 过滤查询 */
$position_name = !empty($_REQUEST['position_name']) ? trim($_REQUEST['position_name']) : '';
$filter = array();
$filter['position_name'] = $position_name;
$filter['sort_by'] = empty($_REQUEST['sort_by']) ? 'position_name' : trim($_REQUEST['sort_by']);
$filter['sort_order'] = empty($_REQUEST['sort_order']) ? 'DESC' : trim($_REQUEST['sort_order']);
$where = 'WHERE 1 ';
if ($position_name) {
$where .= ' AND position_name like \'%' . $position_name . '%\'';
示例11: sort_flag
$smarty->assign('stock_control_log', $stock_control_log['arr']);
$smarty->assign('filter', $stock_control_log['filter']);
$smarty->assign('record_count', $stock_control_log['record_count']);
$smarty->assign('page_count', $stock_control_log['page_count']);
$sort_flag = sort_flag($stock_control_log['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
assign_query_info();
$smarty->display('goods_stock_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
check_authz_json('goods_stock_list');
$stock_control_log = get_stock_control_log();
$smarty->assign('stock_control_log', $stock_control_log['arr']);
$smarty->assign('filter', $stock_control_log['filter']);
$smarty->assign('record_count', $stock_control_log['record_count']);
$smarty->assign('page_count', $stock_control_log['page_count']);
$sort_flag = sort_flag($stock_control_log['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('goods_stock_list.htm'), '', array('filter' => $stock_control_log['filter'], 'page_count' => $stock_control_log['page_count']));
} elseif ($_REQUEST['act'] == 'remove') {
$id = intval($_REQUEST['id']);
/* 检查权限 */
//check_authz_json('goods_stock_list');
/* 删除商品 */
if ($exc->drop($id)) {
clear_cache_files();
$url = 'goods_stock_list.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
}
} elseif ($_REQUEST['act'] == 'edit_costing_price') {
check_authz_json('goods_stock_list');
示例12: assign_query_info
$smarty->assign('crons_enable', $crons_enable);
$smarty->assign('full_page', 1);
$smarty->assign('ur_here', $_LANG['article_auto']);
$smarty->assign('goodsdb', $goodsdb['goodsdb']);
$smarty->assign('filter', $goodsdb['filter']);
$smarty->assign('record_count', $goodsdb['record_count']);
$smarty->assign('page_count', $goodsdb['page_count']);
assign_query_info();
$smarty->display('goods_auto.htm');
} elseif ($_REQUEST['act'] == 'query') {
$goodsdb = get_auto_goods();
$smarty->assign('goodsdb', $goodsdb['goodsdb']);
$smarty->assign('filter', $goodsdb['filter']);
$smarty->assign('record_count', $goodsdb['record_count']);
$smarty->assign('page_count', $goodsdb['page_count']);
$sort_flag = sort_flag($goodsdb['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('goods_auto.htm'), '', array('filter' => $goodsdb['filter'], 'page_count' => $goodsdb['page_count']));
} elseif ($_REQUEST['act'] == 'del') {
$goods_id = (int) $_REQUEST['goods_id'];
$sql = "DELETE FROM " . $ecs->table('auto_manage') . " WHERE item_id = '{$goods_id}' AND type = 'article'";
$db->query($sql);
$links[] = array('text' => $_LANG['article_auto'], 'href' => 'article_auto.php?act=list');
sys_msg($_LANG['edit_ok'], 0, $links);
} elseif ($_REQUEST['act'] == 'edit_starttime') {
check_authz_json('goods_auto');
if (!preg_match('/^\\d{4}-\\d{2}-\\d{2}$/', trim($_POST['val']))) {
make_json_error('');
}
$id = intval($_POST['id']);
$time = local_strtotime(trim($_POST['val']));
示例13: intval
}
if (!empty($_REQUEST['status'])) {
$cond .= " AND status = " . intval($_REQUEST['status']);
}
$sort['sort_by'] = empty($_REQUEST['sort_by']) ? 'dateline' : trim($_REQUEST['sort_by']);
$sort['sort_order'] = empty($_REQUEST['sort_order']) ? 'DESC' : trim($_REQUEST['sort_order']);
$SQL = "SELECT * FROM " . $ecs->table('verifycode') . " WHERE 1 = 1 {$cond}";
$page['record_count'] = $db->getOne($SQL);
$page = page_and_size($page);
$SQL = "SELECT * FROM " . $ecs->table('verifycode') . " WHERE 1 = 1 {$cond} ORDER BY {$sort['sort_by']} {$sort['sort_order']} LIMIT {$page['start']}, {$page['page_size']}";
$rs = $db->getAll($SQL);
$smarty->assign('list', $rs);
$smarty->assign('filter', $_REQUEST);
$smarty->assign('record_count', $page['record_count']);
$smarty->assign('page_count', $page['page_count']);
$sort_flag = sort_flag($sort);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
if ($_REQUEST['is_ajax'] == 1) {
make_json_result($smarty->fetch('verifycode.htm'), '', array('filter' => $_REQUEST, 'page_count' => $page['page_count']));
} else {
$smarty->assign('full_page', 1);
$smarty->display('verifycode.htm');
}
break;
/* 发送短信 */
/* 发送短信 */
case 'send_sms':
$send_num = isset($_POST['send_num']) ? $_POST['send_num'] : '';
if (isset($send_num)) {
$phone = $send_num . ',';
}
示例14: array
$smarty->assign('action_link', array('text' => '添加新版本号', 'href' => 'app_version.php?act=add'));
$smarty->assign('full_page', 1);
$request_log_list = request_log();
$smarty->assign('request_log_list', $request_log_list['request_log_list']);
$smarty->assign('filter', $request_log_list['filter']);
$smarty->assign('record_count', $request_log_list['record_count']);
$smarty->assign('page_count', $request_log_list['page_count']);
assign_query_info();
$smarty->display('request_log.htm');
} elseif ($_REQUEST['act'] == 'query') {
$request_log_list = request_log();
$smarty->assign('request_log_list', $request_log_list['request_log_list']);
$smarty->assign('filter', $request_log_list['filter']);
$smarty->assign('record_count', $request_log_list['record_count']);
$smarty->assign('page_count', $request_log_list['page_count']);
$sort_flag = sort_flag($request_log_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('request_log.htm'), '', array('filter' => $request_log_list['filter'], 'page_count' => $request_log_list['page_count']));
}
/* 获取版本数据列表 */
function request_log()
{
$filter = array();
/* 获得总记录数据 */
$sql = 'SELECT COUNT(*) FROM ' . $GLOBALS['ecs']->table('connector_app');
$filter['record_count'] = $GLOBALS['db']->getOne($sql);
$filter = page_and_size($filter);
/* 获得广告数据 */
$arr = array();
$sql = 'SELECT v.id,v.imei,v.phone,v.sim_sn,v.imsi,v.os,v.system_version,v.app_version,v.user_info,v.time,' . 'v.insert_time,u.user_name FROM ' . $GLOBALS['ecs']->table('connector_app') . ' as v left join ' . $GLOBALS['ecs']->table('users') . ' as u on v.user_id = u.user_id ORDER BY v.id DESC';
$res = $GLOBALS['db']->selectLimit($sql, $filter['page_size'], $filter['start']);
示例15: count
$attribute_count = count($_attribute);
$smarty->assign('attribute_count', $attribute_count);
$smarty->assign('attribute', $_attribute);
$smarty->assign('attribute_count_3', $attribute_count + 3);
$smarty->assign('product_sn', $goods['goods_sn'] . '_');
$smarty->assign('product_number', $_CFG['default_storage']);
/* 取商品的货品 */
$product = product_list($goods_id, '');
$smarty->assign('ur_here', $_LANG['18_product_list']);
$smarty->assign('action_link', array('href' => 'goods.php?act=list', 'text' => $_LANG['01_goods_list']));
$smarty->assign('product_list', $product['product']);
$smarty->assign('use_storage', empty($_CFG['use_storage']) ? 0 : 1);
$smarty->assign('goods_id', $goods_id);
$smarty->assign('filter', $product['filter']);
/* 排序标记 */
$sort_flag = sort_flag($product['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('product_info.htm'), '', array('filter' => $product['filter'], 'page_count' => $product['page_count']));
} elseif ($_REQUEST['act'] == 'product_remove') {
/* 检查权限 */
check_authz_json('remove_back');
/* 是否存在商品id */
if (empty($_REQUEST['id'])) {
make_json_error($_LANG['product_id_null']);
} else {
$product_id = intval($_REQUEST['id']);
}
/* 货品库存 */
$product = get_product_info($product_id, 'product_number, goods_id');
/* 删除货品 */
$sql = "DELETE FROM " . $ecs->table('products') . " WHERE product_id = '{$product_id}'";