$user_id = empty($_REQUEST['user_id']) ? 0 : intval($_REQUEST['user_id']); if ($user_id <= 0) { sys_msg('invalid param'); } $user = user_info($user_id); if (empty($user)) { sys_msg($_LANG['user_not_exist']); } $smarty->assign('user', $user); if (empty($_REQUEST['account_type']) || !in_array($_REQUEST['account_type'], array('user_money', 'frozen_money', 'rank_points', 'pay_points'))) { $account_type = ''; } else { $account_type = $_REQUEST['account_type']; } $smarty->assign('account_type', $account_type); $account_list = get_accountlist($user_id, $account_type); $smarty->assign('account_list', $account_list['account']); $smarty->assign('filter', $account_list['filter']); $smarty->assign('record_count', $account_list['record_count']); $smarty->assign('page_count', $account_list['page_count']); make_json_result($smarty->fetch('account_list.htm'), '', array('filter' => $account_list['filter'], 'page_count' => $account_list['page_count'])); } elseif ($_REQUEST['act'] == 'add') { /* 检查权限 */ admin_priv('account_manage'); /* 检查参数 */ $user_id = empty($_REQUEST['user_id']) ? 0 : intval($_REQUEST['user_id']); if ($user_id <= 0) { sys_msg('invalid param'); } $user = user_info($user_id); if (empty($user)) {
$smarty->assign('nav_2nd', $nav[1][$file]); $smarty->assign('nav_3rd', $nav[2]); $smarty->assign('file_name', $file); die($smarty->fetch('left.htm')); } elseif ($_REQUEST['act'] == 'goods_list') { $res = array(); if (isset($_REQUEST['ext'])) { $file = basename($_SERVER['PHP_SELF'], '.php'); $nav = list_nav(); $smarty->assign('nav_2nd', $nav[1][$file]); $smarty->assign('nav_3rd', $nav[2]); $smarty->assign('file_name', $file); $res['left'] = $smarty->fetch('left.htm'); } //给模板赋值; @($account_list = get_accountlist($goods_id, $type)); $smarty->assign('goods_list', $account_list['account']); $smarty->assign('filter', $account_list['filter']); $smarty->assign('record_count', $account_list['record_count']); $smarty->assign('page_count', $account_list['page_count']); $smarty->assign('pageprev', $account_list['filter']['page'] - 1); $smarty->assign('pagenext', $account_list['filter']['page'] + 1); $res['main'] = $smarty->fetch('goods_list.htm'); die($json->encode($res)); } elseif ($_REQUEST['act'] == 'check_stock_batch') { $goods_sn = $_GET['goods_sn']; $res['info']['id'] = $goods_sn; $res['response_action'] = 'check_stock_batch'; $sql_select = 'SELECT quantity,FROM_UNIXTIME(production_day, "%Y-%m-%d") production_day FROM ' . $GLOBALS['ecs']->table('stock_goods') . " WHERE goods_sn ='" . $goods_sn . "'"; $check_list = $GLOBALS['db']->getAll($sql_select);