本文整理汇总了PHP中sys_msg函数的典型用法代码示例。如果您正苦于以下问题:PHP sys_msg函数的具体用法?PHP sys_msg怎么用?PHP sys_msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sys_msg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getGoods
function getGoods($id)
{
$json = file_get_contents_curl("https://hws.alicdn.com/cache/mtop.wdetail.getItemDescx/4.1/?data=%7B%22item_num_id%22%3A%22{$id}%22%7D");
$data = json_decode($json, 1);
if ($data['data']['pages']) {
$content = "";
foreach ($data['data']['pages'] as $p) {
$content .= $p;
}
$content = str_replace("<img>", "<img src=", $content);
$content = str_replace("</img>", ">", $content);
$content = str_replace("txt", "p", $content);
}
if ($content) {
$json = file_get_contents_curl("https://hws.alicdn.com/cache/wdetail/5.0/?id={$id}");
$data = json_decode($json, 1);
$goods_name = $data['data']['itemInfoModel']['title'];
$props = $data['data']['props'];
if ($props) {
$goods_props = '';
foreach ($props as $p) {
$goods_props .= "<p>{$p['name']}:{$p['value']}</p>";
}
$content = $goods_props . $content;
}
if ($data['data']['itemInfoModel']['picsPath']) {
$imgArr = array();
foreach ($data['data']['itemInfoModel']['picsPath'] as $k => $img) {
if ($k >= $num) {
break;
}
//$imgArr[$k] = str_replace("../",ROOT_PATH,getImg($img));
$imgArr[$k] = getImg($img);
}
}
if ($_GET['do'] == 1) {
if ($istitle == 1) {
$uptitle = ",goods_name='{$goods_name}'";
}
$db->query("update {$ecs->table('goods')} set \n\t\t\t\tgoods_desc='{$content}',goods_thumb='{$imgArr[0]['thumb']}',goods_img='{$imgArr[0]['goods']}',original_img='{$imgArr[0]['source']}'{$uptitle} \n\t\t\t\twhere goods_id={$gid}");
foreach ($imgArr as $v) {
$db->query("insert into {$ecs->table('goods_gallery')} (goods_id,img_url,thumb_url,img_original) value ({$gid},'{$v[goods]}','{$v[thumb]}','{$v[source]}')");
}
} else {
include_once ROOT_PATH . 'includes/fckeditor/fckeditor.php';
$smarty->assign('content', $content);
$smarty->assign('img_list', $imgArr);
$smarty->assign('id', $id);
$smarty->assign('gid', $gid);
$smarty->assign('istitle', $istitle);
$smarty->assign('iscomment', $iscomment);
$smarty->assign('goods_name', $goods_name);
$smarty->assign('comment_list', $comment_list);
$smarty->display('gettaobaoview.html');
}
} else {
sys_msg('提取失败', 0, $link);
}
}
示例2: sys_msg
}
/* 特殊等级会员组不判断积分限制 */
if ($special_rank == 0) {
/* 检查上限有无重复 */
if (!$exc->is_only('max_points', intval($_POST['max_points']))) {
sys_msg(sprintf($_LANG['integral_max_exists'], intval($_POST['max_points'])));
}
}
$sql = "INSERT INTO " . $ecs->table('user_rank') . "( " . "rank_name, min_points, max_points, discount, special_rank, show_price" . ") VALUES (" . "'{$_POST['rank_name']}', '" . intval($_POST['min_points']) . "', '" . intval($_POST['max_points']) . "', " . "'{$_POST['discount']}', '{$special_rank}', '" . intval($_POST['show_price']) . "')";
$db->query($sql);
/* 管理员日志 */
admin_log(trim($_POST['rank_name']), 'add', 'user_rank');
clear_cache_files();
$lnk[] = array('text' => $_LANG['back_list'], 'href' => 'user_rank.php?act=list');
$lnk[] = array('text' => $_LANG['add_continue'], 'href' => 'user_rank.php?act=add');
sys_msg($_LANG['add_rank_success'], 0, $lnk);
} elseif ($_REQUEST['act'] == 'remove') {
check_authz_json('user_rank');
$rank_id = intval($_GET['id']);
if ($exc->drop($rank_id)) {
/* 更新会员表的等级字段 */
$exc_user->edit("user_rank = 0", $rank_id);
$rank_name = $exc->get_name($rank_id);
admin_log(addslashes($rank_name), 'remove', 'user_rank');
clear_cache_files();
}
$url = 'user_rank.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
} elseif ($_REQUEST['act'] == 'edit_name') {
$id = intval($_REQUEST['id']);
示例3: db_create_in
$sql .= db_create_in($_POST['checkboxs'], 'topic_id');
} elseif (!empty($_GET['id'])) {
$_GET['id'] = intval($_GET['id']);
$sql .= "topic_id = '{$_GET['id']}'";
} else {
exit;
}
$db->query($sql);
clear_cache_files();
if (!empty($_REQUEST['is_ajax'])) {
$url = 'topic.php?act=query&' . str_replace('act=delete', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
}
$links[] = array('href' => 'topic.php', 'text' => $_LANG['back_list']);
sys_msg($_LANG['succed'], 0, $links);
} elseif ($_REQUEST['act'] == 'query') {
$topic_list = get_topic_list();
$smarty->assign('topic_list', $topic_list['item']);
$smarty->assign('filter', $topic_list['filter']);
$smarty->assign('record_count', $topic_list['record_count']);
$smarty->assign('page_count', $topic_list['page_count']);
$smarty->assign('use_storage', empty($_CFG['use_storage']) ? 0 : 1);
/* 排序标记 */
$sort_flag = sort_flag($topic_list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
$tpl = 'topic_list.htm';
make_json_result($smarty->fetch($tpl), '', array('filter' => $topic_list['filter'], 'page_count' => $topic_list['page_count']));
}
/**
* 获取专题列表.
示例4: elseif
} elseif ($_REQUEST['act'] == 'batch_drop') {
admin_priv('tag_manage');
if (isset($_POST['checkboxes'])) {
$count = 0;
foreach ($_POST['checkboxes'] as $key => $id) {
$sql = "DELETE FROM " . $ecs->table('tag') . " WHERE tag_id='{$id}'";
$db->query($sql);
$count++;
}
admin_log($count, 'remove', 'tag_manage');
clear_cache_files();
$link[] = array('text' => $_LANG['back_list'], 'href' => 'tag_manage.php?act=list');
sys_msg(sprintf($_LANG['drop_success'], $count), 0, $link);
} else {
$link[] = array('text' => $_LANG['back_list'], 'href' => 'tag_manage.php?act=list');
sys_msg($_LANG['no_select_tag'], 0, $link);
}
} elseif ($_REQUEST['act'] == 'remove') {
check_authz_json('tag_manage');
include_once ROOT_PATH . 'includes/cls_json.php';
$json = new JSON();
$id = intval($_GET['id']);
/* 鑾峰彇鍒犻櫎鐨勬爣绛剧殑鍚嶇О */
$tag_name = $db->getOne("SELECT tag_words FROM " . $ecs->table('tag') . " WHERE tag_id = '{$id}'");
$sql = "DELETE FROM " . $ecs->table('tag') . " WHERE tag_id = '{$id}'";
$result = $GLOBALS['db']->query($sql);
if ($result) {
/* 绠$悊鍛樻棩蹇 */
admin_log(addslashes($tag_name), 'remove', 'tag_manage');
$url = 'tag_manage.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
示例5: sys_msg
sys_msg('操作成功', 0, $link);
} elseif ($_REQUEST['act'] == 'edit') {
$info = $db->GetRow("SELECT * FROM " . $ecs->table('goods_tag') . " WHERE tag_id='{$_REQUEST['id']}'");
$smarty->assign('ur_here', '编辑标签');
$smarty->assign('action_link', array('text' => '返回', 'href' => 'goods_tag.php?act=list&goods_id=' . $goods_id));
$smarty->assign('info', $info);
$smarty->assign('form_action', 'updata');
assign_query_info();
$smarty->display('goods_tag_info.htm');
} elseif ($_REQUEST['act'] == 'updata') {
$tag_name = trim($_POST['tag_name']);
$is = $db->GetOne("SELECT tag_id FROM " . $ecs->table('goods_tag') . " WHERE goods_id = '{$goods_id}' AND tag_name='{$tag_name}' AND tag_id != '{$_POST['id']}'");
if ($is > 0) {
sys_msg("标签名称已经存在,请修改!", 1, array(), false);
}
$db->query("UPDATE " . $ecs->table('goods_tag') . " SET tag_name = '{$tag_name}' WHERE tag_id = '{$_POST['id']}'");
$link[0]['text'] = '返回列表';
$link[0]['href'] = "goods_tag.php?act=list&goods_id={$goods_id}";
sys_msg('操作成功', 0, $link);
} elseif ($_REQUEST['act'] == 'remove') {
$id = intval($_GET['id']);
$db->query("delete from " . $ecs->table('goods_tag') . " where tag_id = '{$id}'");
$url = 'goods_tag.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
} elseif ($_REQUEST['act'] == 'edit_displayorder') {
$id = intval($_POST['id']);
$val = intval($_POST['val']);
data_update("goods_tag", array('displayorder' => $val), $id, 'tag_id');
make_json_result($val);
}
示例6: check_authz_json
check_authz_json('article_manage');
if (!isset($_POST['checkboxes']) || !is_array($_POST['checkboxes'])) {
sys_msg($_LANG['no_select_article'], 1);
}
if (!$_POST['target_cat']) {
sys_msg($_LANG['no_select_act'], 1);
}
foreach ($_POST['checkboxes'] as $key => $id) {
$exc->edit("cat_id = '" . $_POST['target_cat'] . "'", $id);
}
}
}
/* 清除缓存 */
clear_cache_files();
$lnk[] = array('text' => $_LANG['back_list'], 'href' => 'article.php?act=list');
sys_msg($_LANG['batch_handle_ok'], 0, $lnk);
}
/* 把商品删除关联 */
function drop_link_goods($goods_id, $article_id)
{
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('goods_article') . " WHERE goods_id = '{$goods_id}' AND article_id = '{$article_id}' LIMIT 1";
$GLOBALS['db']->query($sql);
create_result(true, '', $goods_id);
}
/* 取得文章关联商品 */
function get_article_goods($article_id)
{
$list = array();
$sql = 'SELECT g.goods_id, g.goods_name' . ' FROM ' . $GLOBALS['ecs']->table('goods_article') . ' AS ga' . ' LEFT JOIN ' . $GLOBALS['ecs']->table('goods') . ' AS g ON g.goods_id = ga.goods_id' . " WHERE ga.article_id = '{$article_id}'";
$list = $GLOBALS['db']->getAll($sql);
return $list;
示例7: update_configure
$filename = $_CFG[$code];
//删除文件
@unlink($filename);
//更新设置
update_configure($code, '');
/* 记录日志 */
admin_log('', 'edit', 'shop_config');
/* 清除缓存 */
clear_all_files();
sys_msg($_LANG['save_success'], 0);
}
/**
* 设置系统设置
*
* @param string $key
* @param string $val
*
* @return boolean
*/
function update_configure($key, $val='')
{
if (!empty($key))
{
示例8: implode
if (isset($value)) {
$phone .= implode(',', $value);
}
}
$msg = isset($_POST['msg']) ? $_POST['msg'] : '';
if (EC_CHARSET != 'utf-8') {
$msg = ecs_iconv(EC_CHARSET, 'utf-8', $msg);
}
$send_date = isset($_POST['send_date']) ? $_POST['send_date'] : '';
$result = $sms->send($phone, $msg, $send_date, $send_num = 13);
$link[] = array('text' => $_LANG['back'] . $_LANG['03_sms_send'], 'href' => 'sms.php?act=display_send_ui');
if ($result === true) {
sys_msg($_LANG['send_ok'], 0, $link);
} else {
@($error_detail = $_LANG['server_errors'][$sms->errors['server_errors']['error_no']] . $_LANG['api_errors']['send'][$sms->errors['api_errors']['error_no']]);
sys_msg($_LANG['send_error'] . $error_detail, 1, $link);
}
break;
// /* 显示发送记录的查询界面,如果尚未注册或启用短信服务则显示注册界面。 */
// case 'display_send_history_ui' :
// /* 检查权限 */
// admin_priv('send_history');
// if ($sms->has_registered())
// {
// $smarty->assign('ur_here', $_LANG['05_sms_send_history']);
// assign_query_info();
// $smarty->display('sms_send_history_query_ui.htm');
// }
// else
// {
// $smarty->assign('ur_here', $_LANG['register_sms']);
示例9: array
}
} else {
$result['error'] = '1';
$result['message'] = '参数为空!';
}
if ($result['error'] == '1') {
echo $json->encode($result);
} else {
if ($_REQUEST['act_from'] == 'invoice_info') {
$link_text = '发票列表';
$link_href = 'order.php?act=invoice_list';
$msg_detail = '取消开票成功!';
$msg_type = '0';
$links = array(array('text' => $link_text, 'href' => $link_href));
$auto_redirect = true;
sys_msg($msg_detail, $msg_type, $links, $auto_redirect);
} else {
$url = 'order.php?act=query&act_detail=invoice_query&' . str_replace('act=unprovide_provice', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
}
}
} elseif ($_REQUEST['act'] == 'save_inv_remark') {
admin_priv('invoice_manage');
include_once ROOT_PATH . 'includes/cls_json.php';
$json = new JSON();
$result = array('error' => 0, 'message' => '', 'content' => '');
$inv_remark = empty($_REUQEST['inv_remark']) ? '' : json_str_iconv(trim($_REUQEST['inv_remark']));
$order_id = empty($_REUQEST['inv_remark']) ? '' : json_str_iconv(trim($_REUQEST['inv_remark']));
if (!empty($inv_remark)) {
$sql = 'UPDATE ' . $GLOBALS['ecs']->table('order_info') . ' SET `inv_remark`=\'' . $inv_remark . '\'' . ' WHERE `order_id`=\'' . $order_id . '\'';
示例10: assign_query_info
$smarty->assign('form_action', $form_action);
assign_query_info();
$smarty->display('reg_field_info.htm');
} elseif ($_REQUEST['act'] == 'update') {
admin_priv('reg_fields');
/* 检查是否存在重名的会员注册项 */
if ($_POST['reg_field_name'] != $_POST['old_field_name'] && !$exc->is_only('reg_field_name', trim($_POST['reg_field_name']))) {
sys_msg(sprintf($_LANG['field_name_exist'], trim($_POST['reg_field_name'])), 1);
}
$sql = "UPDATE " . $ecs->table('reg_fields') . " SET `reg_field_name` = '{$_POST['reg_field_name']}', `dis_order` = '{$_POST['reg_field_order']}', `display` = '{$_POST['reg_field_display']}', `is_need` = '{$_POST['reg_field_need']}' WHERE `id` = '{$_POST['id']}'";
$db->query($sql);
/* 管理员日志 */
admin_log(trim($_POST['reg_field_name']), 'edit', 'reg_fields');
clear_cache_files();
$lnk[] = array('text' => $_LANG['back_list'], 'href' => 'reg_fields.php?act=list');
sys_msg($_LANG['update_field_success'], 0, $lnk);
} elseif ($_REQUEST['act'] == 'remove') {
check_authz_json('reg_fields');
$field_id = intval($_GET['id']);
$field_name = $exc->get_name($field_id);
if ($exc->drop($field_id)) {
/* 删除会员扩展信息表的相应信息 */
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('reg_extend_info') . " WHERE reg_field_id = '" . $field_id . "'";
@$GLOBALS['db']->query($sql);
admin_log(addslashes($field_name), 'remove', 'reg_fields');
clear_cache_files();
}
$url = 'reg_fields.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
} elseif ($_REQUEST['act'] == 'edit_name') {
示例11: action_insert_update
/**
* 添加/编辑客服信息的提交
*/
function action_insert_update()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $_SESSION['user_id'];
$user_id = intval($_POST['user_id']);
/* 取得客服id */
$cus_id = intval($_POST['cus_id']);
$customer = array('supp_id' => -1, 'user_id' => $_POST['user_id'], 'of_username' => $_POST['of_username'], 'cus_name' => $_POST['cus_name'], 'cus_password' => $_POST['cus_password'], 'cus_type' => $_POST['cus_type'], 'cus_enable' => $_POST['cus_enable'], 'cus_desc' => $_POST['cus_desc']);
// 判断密码是否为空
if (empty($customer['of_username'])) {
sys_msg($_LANG['error_of_username_empty']);
}
// 判断客服名称是否为空
if (empty($customer['cus_name'])) {
sys_msg($_LANG['error_cus_name_empty']);
}
// 检查聊天系统用户名是否已经绑定了其他管理员账户
if (check_of_username_binding($customer['of_username'], $customer['user_id'])) {
sys_msg($_LANG['error_of_username_binding']);
} else {
// 用户不存在则需要判断密码是否为空
if (!check_of_username_exist($customer['of_username'])) {
// 判断密码是否为空
if (empty($customer['cus_password'])) {
sys_msg($_LANG['error_password_empty']);
}
}
// 创建活更新聊天系统用户
$create_success = create_of_user($customer['of_username'], $customer['cus_password'], $customer['cus_name'], null, 10, -1);
if (!$create_success) {
sys_msg($_LANG['error_create_of_user']);
}
}
if (empty($_POST['cus_id'])) {
// 检查管理员账户是否存在
if (check_user_id_exist($user_id)) {
sys_msg($_LANG['error_user_id_exist']);
}
$customer['add_time'] = gmtime();
/* insert */
$db->autoExecute($ecs->table('chat_customer'), $customer, 'INSERT');
/* log */
admin_log(addslashes($customer['of_username']), 'add', 'chat_customer');
/* 提示信息 */
$links = array(array('href' => 'customer.php?act=add', 'text' => $_LANG['continue_add']), array('href' => 'customer.php?act=list', 'text' => $_LANG['back_list']));
sys_msg($_LANG['add_success'], 0, $links);
} else {
// 检查管理员账户是否存在
if (check_user_id_exist($user_id, $cus_id)) {
sys_msg($_LANG['error_user_id_exist']);
}
/* update */
$db->autoExecute($ecs->table('chat_customer'), $customer, 'UPDATE', "cus_id = '{$cus_id}'");
/* log */
admin_log(addslashes($customer['of_username']) . '[' . $cus_id . ']', 'edit', 'chat_customer');
/* 提示信息 */
$links = array(array('href' => 'customer.php?act=list&' . list_link_postfix(), 'text' => $_LANG['back_list']));
sys_msg($_LANG['edit_success'], 0, $links);
}
/* 显示客服列表页面 */
assign_query_info();
$smarty->display('customer_info.htm');
}
示例12: sys_msg
sys_msg('该返佣记录不存在!');
}
//入驻商资金添加日志
//writelog($rebid,1);
$sql = "update " . $GLOBALS['ecs']->table('order_info') . " set store_rebate_ispay=1 where store_rebate_id=" . $rebid . " and store_rebate_ispay=2";
$links[] = array('href' => 'supplier_store_rebate.php?act=list', 'text' => '查看本期佣金列表');
if ($GLOBALS['db']->query($sql)) {
$rebate_order = array('rebateid' => $rebid, 'username' => '平台方:' . $_SESSION['user_name'], 'type' => REBATE_LOG_ORDER, 'typedec' => '撤销分销商(仓库)全部佣金', 'contents' => '相关佣金结算订单全部撤销', 'addtime' => gmtime());
$db->autoExecute($ecs->table('store_rebate_log'), $rebate_order, 'INSERT');
$db->query("update " . $ecs->table('store_rebate') . " set status=0 where rebate_id=" . $rebid);
//修改佣金信息状态记录
$rebate_list = array('rebateid' => $rebid, 'username' => '平台方:' . $_SESSION['user_name'], 'type' => REBATE_LOG_LIST, 'typedec' => '撤销分销商(仓库)全部佣金', 'contents' => '佣金状态由可结算变冻结', 'addtime' => gmtime());
//$db->autoExecute($ecs->table('supplier_rebate_log'), $rebate_list, 'INSERT');
sys_msg($_LANG['act_ok'], 0, $links);
} else {
sys_msg('操作失败', 1, $links);
}
}
//佣金中的妥投订单
function getOkOrder()
{
global $ecs, $db, $rebate;
$result = get_filter();
if ($result === false) {
$filter['rid'] = $rid = isset($_REQUEST['rid']) && intval($_REQUEST['rid']) > 0 ? intval($_REQUEST['rid']) : 0;
$filter['add_time_start'] = !empty($_REQUEST['add_time_start']) ? local_strtotime($_REQUEST['add_time_start']) : 0;
$filter['add_time_end'] = !empty($_REQUEST['add_time_end']) ? local_strtotime($_REQUEST['add_time_end'] . " 23:59:59") : 0;
$filter['order_sn'] = isset($_REQUEST['order_sn']) ? trim($_REQUEST['order_sn']) : '';
//$and = ' rebate_id='.$rid.' and shipping_status in ('.SS_SHIPPED.','.SS_RECEIVED.')';
$and = ' store_rebate_id=' . $rid;
//$hpay_id = getPayHoudaofukuan();
示例13: admin_log
/* 删除团购活动 */
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('goods_activity') . " WHERE act_id = '{$id}' LIMIT 1";
$GLOBALS['db']->query($sql, 'SILENT');
admin_log(addslashes($group_buy['goods_name']) . '[' . $id . ']', 'remove', 'group_buy');
$del_count++;
}
}
/* 如果删除了团购活动,清除缓存 */
if ($del_count > 0) {
clear_cache_files();
}
$links[] = array('text' => $_LANG['back_list'], 'href' => 'group_buy.php?act=list');
sys_msg(sprintf($_LANG['batch_drop_success'], $del_count), 0, $links);
} else {
$links[] = array('text' => $_LANG['back_list'], 'href' => 'group_buy.php?act=list');
sys_msg($_LANG['no_select_group_buy'], 0, $links);
}
} elseif ($_REQUEST['act'] == 'search_goods') {
check_authz_json('group_by');
include_once ROOT_PATH . 'includes/cls_json.php';
$json = new JSON();
$filter = $json->decode($_GET['JSON']);
$arr = get_goods_list($filter);
make_json_result($arr);
} elseif ($_REQUEST['act'] == 'edit_deposit') {
check_authz_json('group_by');
$id = intval($_POST['id']);
$val = floatval($_POST['val']);
$sql = "SELECT ext_info FROM " . $ecs->table('goods_activity') . " WHERE act_id = '{$id}' AND act_type = '" . GAT_GROUP_BUY . "'";
$ext_info = unserialize($db->getOne($sql));
$ext_info['deposit'] = $val;
示例14: elseif
$smarty->display('stock_out_type_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
/* 权限判断 */
admin_priv('stock_out_type');
$remarks = $_POST['remarks'];
$add_time = gmtime();
$user_id = $_SESSION[admin_id];
$admin_agency_id = admin_agency_id();
$ip_addr = real_ip();
$sql = "INSERT INTO " . $ecs->table('stock_out_type') . "(remarks, add_time, user_id, if_delete, ip_addr, admin_agency_id ) " . "VALUES ('{$remarks}', '{$add_time}', '{$user_id}', '0', '{$ip_addr}', '{$admin_agency_id}')";
$db->query($sql);
clear_cache_files();
// 清除相关的缓存文件
$link[0]['text'] = "操作成功";
$link[0]['href'] = 'stock_out_type.php?act=list';
sys_msg("出库类型添加操作成功", 0, $link);
} elseif ($_REQUEST['act'] == 'query') {
check_authz_json('stock_out_type');
$type_list = get_typelist();
/*判断代理商或管理员*/
if (if_agency()) {
$smarty->assign('if_agency', if_agency());
}
$smarty->assign('type_list', $type_list['arr']);
$smarty->assign('filter', $type_list['filter']);
$smarty->assign('record_count', $type_list['record_count']);
$smarty->assign('page_count', $type_list['page_count']);
make_json_result($smarty->fetch('stock_out_type_list.htm'), '', array('filter' => $type_list['filter'], 'page_count' => $type_list['page_count']));
} elseif ($_REQUEST['act'] == 'remove') {
check_authz_json('stock_out_type');
$id = intval($_REQUEST['id']);
示例15: intval
/* 提交值 */
$rebate_id = intval($_POST['id']);
$rebate = array('pay_type' => trim($_POST['pay_type_input']), 'remark' => trim($_POST['remark']), 'pay_time' => $pay_time, 'is_pay_ok' => 1);
/* 取得供货商信息 */
$sql = "SELECT * FROM " . $ecs->table('supplier_rebate') . " WHERE rebate_id = '" . $rebate_id . "' ";
$rebate_old = $db->getRow($sql);
if (empty($rebate_old['rebate_id'])) {
sys_msg('该返佣信息不存在!');
}
/* 保存返佣信息 */
$db->autoExecute($ecs->table('supplier_rebate'), $rebate, 'UPDATE', "rebate_id = '" . $rebate_id . "'");
/* 清除缓存 */
clear_cache_files();
/* 提示信息 */
$links[] = array('href' => 'supplier_rebate.php?act=list&is_pay_ok=0', 'text' => '返回未处理佣金列表');
sys_msg('恭喜,处理成功!', 0, $links);
}
/**
* 获取供应商列表信息
*
* @access public
* @param
*
* @return void
*/
function rebate_list()
{
$result = get_filter();
if ($result === false) {
$aiax = isset($_GET['is_ajax']) ? $_GET['is_ajax'] : 0;
/* 过滤信息 */