本文整理汇总了PHP中operable_list函数的典型用法代码示例。如果您正苦于以下问题:PHP operable_list函数的具体用法?PHP operable_list怎么用?PHP operable_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了operable_list函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
if ($m_result === true) {
$result['message'] = $GLOBALS['_LANG']['act_ok'];
} else {
$result['error'] = 1;
$result['message'] = $m_result;
}
die($json->encode($result));
} elseif ($_REQUEST['act'] == 'remove_order') {
/* 检查权限 */
admin_priv('order_edit');
$order_id = intval($_REQUEST['id']);
/* 检查权限 */
check_authz_json('order_edit');
/* 检查订单是否允许删除操作 */
$order = order_info($order_id);
$operable_list = operable_list($order);
if (!isset($operable_list['remove'])) {
make_json_error('Hacking attempt');
exit;
}
$GLOBALS['db']->query("DELETE FROM " . $GLOBALS['ecs']->table('order_info') . " WHERE order_id = '{$order_id}'");
$GLOBALS['db']->query("DELETE FROM " . $GLOBALS['ecs']->table('order_goods') . " WHERE order_id = '{$order_id}'");
$GLOBALS['db']->query("DELETE FROM " . $GLOBALS['ecs']->table('order_action') . " WHERE order_id = '{$order_id}'");
$action_array = array('delivery', 'back');
del_delivery($order_id, $action_array);
if ($GLOBALS['db']->errno() == 0) {
$url = 'order.php?act=query&' . str_replace('act=remove_order', '', $_SERVER['QUERY_STRING']);
ecs_header("Location: {$url}\n");
exit;
} else {
make_json_error($GLOBALS['db']->errorMsg());
示例2: ecs_header
ecs_header("Location: aftermarket.php?act=operate_post&order_id=" . $order_id . "&operation=" . $operation . "&action_note=" . urlencode($action_note) . "&rec_id=" . $rec_id . "&ret_id=" . $ret_id . "\n");
exit;
}
} else {
/* 多个订单 */
ecs_header("Location: aftermarket.php?act=batch_operate_post&order_id=" . $order_id . "&operation=" . $operation . "&action_note=" . urlencode($action_note) . "\n");
exit;
}
}
} elseif ($_REQUEST['act'] == 'operate_post') {
/* 检查权限 */
admin_priv('aftermarket_rf_edit');
/* 取得参数 */
$order_id = intval(trim($_REQUEST['order_id']));
// 订单id
$rec_id = empty($_REQUEST['rec_id']) ? 0 : $_REQUEST['rec_id'];
//by Leah
$ret_id = empty($_REQUEST['ret_id']) ? 0 : $_REQUEST['ret_id'];
//by Leah
$operation = $_REQUEST['operation'];
// 订单操作
$order = order_info($order_id);
//订单信息
$back_order = aftermarket_info($ret_id);
//服务订单信息
/* 检查能否操作 */
$operable_list = operable_list($back_order);
if (!isset($operable_list[$operation])) {
die('Hacking attempt');
}
/* 取得备注信息 */
示例3: quick_delivery
//.........这里部分代码省略.........
$goods_list[$key]['readonly'] = 'readonly="readonly"';
}
}
}
}
$suppliers_id = 0;
$delivery['order_sn'] = trim($order['order_sn']);
$delivery['add_time'] = trim($order['order_time']);
$delivery['user_id'] = intval(trim($order['user_id']));
$delivery['how_oos'] = trim($order['how_oos']);
$delivery['shipping_id'] = trim($order['shipping_id']);
$delivery['shipping_fee'] = trim($order['shipping_fee']);
$delivery['consignee'] = trim($order['consignee']);
$delivery['address'] = trim($order['address']);
$delivery['country'] = intval(trim($order['country']));
$delivery['province'] = intval(trim($order['province']));
$delivery['city'] = intval(trim($order['city']));
$delivery['district'] = intval(trim($order['district']));
$delivery['sign_building'] = trim($order['sign_building']);
$delivery['email'] = trim($order['email']);
$delivery['zipcode'] = trim($order['zipcode']);
$delivery['tel'] = trim($order['tel']);
$delivery['mobile'] = trim($order['mobile']);
$delivery['best_time'] = trim($order['best_time']);
$delivery['postscript'] = trim($order['postscript']);
$delivery['how_oos'] = trim($order['how_oos']);
$delivery['insure_fee'] = floatval(trim($order['insure_fee']));
$delivery['shipping_fee'] = floatval(trim($order['shipping_fee']));
$delivery['agency_id'] = intval(trim($order['agency_id']));
$delivery['shipping_name'] = trim($order['shipping_name']);
/* 查询订单信息 */
$order = order_info($order_id);
/* 检查能否操作 */
$operable_list = operable_list($order);
/* 初始化提示信息 */
$msg = '';
/* 定义当前时间 */
/* 取得订单商品 */
$_goods = get_order_goods(array('order_id' => $order_id, 'order_sn' => $delivery['order_sn']));
$goods_list = $_goods['goods_list'];
/* 检查此单发货商品库存缺货情况 */
/* $goods_list已经过处理 超值礼包中商品库存已取得 */
$virtual_goods = array();
$package_virtual_goods = array();
/* 生成发货单 */
/* 获取发货单号和流水号 */
$delivery['delivery_sn'] = get_delivery_sn();
$delivery_sn = $delivery['delivery_sn'];
/* 获取当前操作员 */
$delivery['action_user'] = $_SESSION['supplier_name'];
/* 获取发货单生成时间 */
define('GMTIME_UTC', gmtime());
$delivery['update_time'] = GMTIME_UTC;
$delivery_time = $delivery['update_time'];
$sql = "select add_time from " . $GLOBALS['ecs']->table('order_info') . " WHERE order_sn = '" . $delivery['order_sn'] . "'";
$delivery['add_time'] = $GLOBALS['db']->GetOne($sql);
/* 获取发货单所属供应商 */
$delivery['suppliers_id'] = $suppliers_id;
/* 设置默认值 */
$delivery['status'] = 2;
// 正常
$delivery['order_id'] = $order_id;
/* 过滤字段项 */
$filter_fileds = array('order_sn', 'add_time', 'user_id', 'how_oos', 'shipping_id', 'shipping_fee', 'consignee', 'address', 'country', 'province', 'city', 'district', 'sign_building', 'email', 'zipcode', 'tel', 'mobile', 'best_time', 'postscript', 'insure_fee', 'agency_id', 'delivery_sn', 'action_user', 'update_time', 'suppliers_id', 'status', 'order_id', 'shipping_name');
$_delivery = array();
foreach ($filter_fileds as $value) {
示例4: pos_order_shipping
/**
* 变更订单的发货状态
*
* @access private
* @param string $brand_name
* @return array
*/
function pos_order_shipping($order_id)
{
if (!check_priviege()) {
exit;
}
$operation = 'ship';
/* 查询订单信息 */
$order = order_info($order_id);
/* 检查能否操作 */
$operable_list = operable_list($order);
if (!isset($operable_list[$operation])) {
die('Hacking attempt');
}
if ($order['order_status'] != OS_CONFIRMED) {
$post['order_status'] = OS_CONFIRMED;
$post['confirm_time'] = gmtime();
}
$post['shipping_status'] = SS_SHIPPED;
$post['shipping_time'] = gmtime();
update_order($order_id, $post);
$action_note = '[OrderHelper ' . TUNNELVERSION . '] 打印快递单';
/* 记录log */
order_action($order['order_sn'], OS_CONFIRMED, SS_SHIPPED, $order['pay_status'], $action_note);
}