コード例 #1
0
ファイル: BizBaseModule.class.php プロジェクト: macall/jsd
 /**
  * 验证用户权限
  */
 protected function check_auth()
 {
     $ajax = intval($_REQUEST['ajax']);
     $s_account_info = $GLOBALS['account_info'];
     if (intval($s_account_info['id']) == 0) {
         showBizErr("没有登录商户账户,请先登录!", $ajax, url("biz", "user#login"));
     } else {
         //获取权限进行判断
         if (!check_module_auth(MODULE_NAME)) {
             showBizErr("没有操作模块的权限,请更换有权限的账户登录!", $ajax);
         }
     }
 }
コード例 #2
0
ファイル: ajaxModule.class.php プロジェクト: macall/jsd
 public function do_verify_delivery()
 {
     global_run();
     $s_account_info = $GLOBALS['account_info'];
     if (intval($s_account_info['id']) == 0) {
         $data['status'] = 1000;
         ajax_return($data);
     }
     if (!check_module_auth("goodso")) {
         $data['status'] = 0;
         $data['info'] = "权限不足";
         ajax_return($data);
     }
     $id = intval($_REQUEST['id']);
     $supplier_id = intval($s_account_info['supplier_id']);
     $delivery_notice = $GLOBALS['db']->getRow("select n.* from " . DB_PREFIX . "delivery_notice as n left join " . DB_PREFIX . "deal_location_link as l on l.deal_id = n.deal_id where n.order_item_id = " . $id . " and n.is_arrival = 1 and  l.location_id in (" . implode(",", $s_account_info['location_ids']) . ")  order by n.delivery_time desc");
     if ($delivery_notice && NOW_TIME - $delivery_notice['delivery_time'] > 24 * 3600 * ORDER_DELIVERY_EXPIRE) {
         require_once APP_ROOT_PATH . "system/model/deal_order.php";
         $res = confirm_delivery($delivery_notice['notice_sn'], $id);
         if ($res) {
             $data['status'] = true;
             $data['info'] = "超期收货成功";
             ajax_return($data);
         } else {
             $data['status'] = 0;
             $data['info'] = "收货失败";
             ajax_return($data);
         }
     } else {
         $data['status'] = 0;
         $data['info'] = "订单不符合超期收货的条件";
         ajax_return($data);
     }
 }