示例#1
0
 public function competence1()
 {
     $ajaxAcc = commonAct::ajaxAccess();
     if (!$ajaxAcc) {
         self::$errCode = "1003";
         self::$errMsg = "您无用户颗粒(添加、修改)权限!";
         return false;
     }
     $userid = isset($_POST["userid"]) ? post_check($_POST["userid"]) : '';
     $visacc = isset($_POST["visacc"]) ? post_check($_POST["visacc"]) : '';
     if (empty($userid)) {
         self::$errCode = "1001";
         self::$errMsg = "用户参数非法";
         return false;
     }
     if (empty($visacc)) {
         self::$errCode = "1002";
         self::$errMsg = "可见帐号内容非法";
         return false;
     }
     $userarr = explode(",", $userid);
     foreach ($userarr as $userid) {
         $userid = is_numeric($userid) ? $userid : 0;
         if (empty($userid)) {
             self::$errCode = "1000";
             self::$errMsg = "单个用户ID参数非法";
             return false;
         }
         $data = array("user_id" => $userid, "power_ids" => $visacc);
         $res = UserCompetenceModel::competence($data);
         self::$errCode = UserCompetenceModel::$errCode;
         self::$errMsg = UserCompetenceModel::$errMsg;
     }
     return $res;
 }
示例#2
0
 public function view_addOrder()
 {
     $OmAccountAct = new OmAccountAct();
     $state = isset($_GET['state']) ? post_check($_GET['state']) : '';
     $this->smarty->assign('state', $state);
     //平台
     //$platform_lsit = OmAvailableModel::getTNameList("om_platform","*","where is_delete=0");
     $platform_lsit = $OmAccountAct->act_getPlatformListByPower();
     $tmpPlatformList = array();
     foreach ($platform_lsit as $value) {
         if (in_array($value['id'], array(3))) {
             $tmpPlatformList[] = $value;
         }
     }
     $platform_lsit = $tmpPlatformList;
     $this->smarty->assign('platform_lsit', $platform_lsit);
     //账号
     //$account_lsit = OmAvailableModel::getTNameList("om_account","*","where is_delete=0 and platformId=3");
     $account_lsit = $OmAccountAct->act_getAccountListByPlatform();
     $account_lsit = array();
     $this->smarty->assign('account_lsit', $account_lsit);
     //物流
     $Shiping = CommonModel::getCarrierList();
     $this->smarty->assign('Shiping', $Shiping);
     $toplevel = 2;
     //一级菜单的序号
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = 21;
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('toptitle', '订单添加');
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $this->smarty->display('orderAdd.htm');
 }
示例#3
0
 public function view_printOptimal()
 {
     $list = isset($_GET['list']) ? post_check($_GET['list']) : '';
     $this->smarty->assign('list', $list);
     if ($_POST['route_index']) {
         $userName = $_SESSION['userName'];
         if (empty($list)) {
             echo "请选择需要生成索引的列表";
             exit;
         }
         $GroupRouteAct = new GroupRouteAct();
         $group_index = $GroupRouteAct->act_groupIndex();
         $this->smarty->assign('status', $group_index);
         $order_count = GroupRouteModel::getRouteIndexNum("where user='******'");
         $this->smarty->assign('count', $order_count);
         $this->smarty->assign('group_bool', 1);
     }
     $navlist = array(array('url' => '', 'title' => '首页'), array('url' => 'index.php?mod=orderWaitforPrint&act=printList', 'title' => '打印发货单'), array('url' => 'index.php?mod=PrintOrder&act=printOptimal', 'title' => '订单最优打印'));
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('toptitle', '订单最优打印');
     $this->smarty->assign('secnev', 1);
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $toplevel = 2;
     //顶层菜单
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = '22';
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->display('printOrder.htm');
 }
示例#4
0
 function act_sureAdd()
 {
     $data = array();
     $property_arr = array();
     $id = post_check(trim($_POST['standardId']));
     $is_open = post_check(trim($_POST['isopen']));
     $data['sampleTypeId'] = post_check(trim($_POST['typeId']));
     $data['sName'] = post_check(trim($_POST['sName']));
     $data['minimumLimit'] = post_check(trim($_POST['minimumLimit']));
     $data['maximumLimit'] = post_check(trim($_POST['maximumLimit']));
     $data['sizeCodeId'] = post_check(trim($_POST['codeId']));
     $data['userId'] = $_SESSION['sysUserId'];
     $data['createdTime'] = time();
     if (empty($id)) {
         $data['is_open'] = 0;
         $insertid = SampleStandardModel::insertRow($data);
         if ($insertid) {
             return true;
         } else {
             return false;
         }
     } else {
         $updatedata = SampleStandardModel::update($data, "and id='{$id}'");
         if ($updatedata) {
             return true;
         } else {
             return false;
         }
     }
 }
示例#5
0
 public function view_updateScrappedProducts()
 {
     if (!isset($_SESSION['sysUserId'])) {
         //检测用户是否登陆
         header('location:index.php?mod=login&act=index');
         exit;
     }
     $scrappedProductsAct = new ScrappedProductsAct();
     $scrappedId = isset($_GET['scrappedId']) ? post_check($_GET['scrappedId']) : '';
     if (empty($scrappedId)) {
         //为空时,跳转到列表页面,输出错误信息
         $status = '审核失败,id为空';
         header("location:index.php?mod=scrappedProducts&act=getScrappedProductsList&status={$status}");
         exit;
     }
     $now = time();
     $set = "SET scrappedStatus='1',processTime='{$now}' ";
     $where = "WHERE id='{$scrappedId}' ";
     $affectRow = $scrappedProductsAct->act_updateScrappedProducts($set, $where);
     if ($affectRow) {
         $status = '审核成功';
     } else {
         $status = '审核失败';
     }
     header("location:index.php?mod=scrappedProducts&act=getScrappedProductsList&status={$status}");
 }
示例#6
0
 function act_sureAddCurr()
 {
     $bool = array();
     $data = array();
     $id = trim($_POST['currId']);
     $data['currency'] = post_check(trim($_POST['currency']));
     $data['rates'] = post_check(trim($_POST['rates']));
     $data['userId'] = $_SESSION['sysUserId'];
     $data['modefyTime'] = time();
     if (empty($id)) {
         $bool = CurrencyModel::getCurrencyList("*", "where currency='{$data['currency']}'");
         if ($bool) {
             return 2;
         }
         $insertid = CurrencyModel::insertRow($data);
         if ($insertid) {
             return 1;
         } else {
             return false;
         }
     } else {
         $bool = CurrencyModel::getCurrencyList("*", "where id!={$id} and currency='{$data['currency']}'");
         if ($bool) {
             return 2;
         }
         $updatedata = CurrencyModel::update($data, "and id='{$id}'");
         if ($updatedata) {
             return 1;
         } else {
             return false;
         }
     }
 }
示例#7
0
 public function view_statusMenu()
 {
     $state = isset($_GET['state']) ? post_check($_GET['state']) : '';
     $this->smarty->assign('state', $state);
     $StatusMenuAct = new StatusMenuAct();
     $menu = $StatusMenuAct->act_getStatusMenuList("*", "where is_delete=0 and storeId=1");
     $this->smarty->assign('menu', $menu);
     $navlist = array(array('url' => '', 'title' => '系统设置'), array('url' => '', 'title' => '订单流程'));
     $this->smarty->assign('navlist', $navlist);
     //流程状态分组
     if (!empty($menu)) {
         $group = array();
         foreach ($menu as $info) {
             if ($info['groupId'] == '0') {
                 $group[$info['id']] = '一级分组';
                 continue;
             }
             $group_info = StatusMenuGroupModel::getMenuGroupList("statusName", "where statusCode='{$info['groupId']}'");
             $group[$info['id']] = $group_info[0]['statusName'];
         }
     }
     $this->smarty->assign('group', $group);
     $toplevel = 3;
     //一级菜单的序号
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = 39;
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('toptitle', '订单流程');
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $this->smarty->display('statusMenu.htm');
 }
示例#8
0
 function act_sureAddAttr()
 {
     $bool = array();
     $data = array();
     $id = trim($_POST['attrId']);
     $data['attributesName'] = post_check(trim($_POST['attributesName']));
     if (empty($id)) {
         $bool = OrderAttrModel::getOrderAttrList("*", "where attributesName='{$data['attributesName']}'");
         if ($bool) {
             return 2;
         }
         $insertid = OrderAttrModel::insertRow($data);
         if ($insertid) {
             return 1;
         } else {
             return false;
         }
     } else {
         $bool = OrderAttrModel::getOrderAttrList("*", "where id!={$id} and attributesName='{$data['attributesName']}'");
         if ($bool) {
             return 2;
         }
         $updatedata = OrderAttrModel::update($data, "and id='{$id}'");
         if ($updatedata) {
             return 1;
         } else {
             return false;
         }
     }
 }
示例#9
0
 /**
  * 修改供应商类型信息的函数
  * @return    $result   $result > 0 成功,否则失败 
  */
 public function editPartnerType()
 {
     $data['category_name'] = post_check($_POST['category_name']);
     $id = post_check($_POST['category_id']);
     $where = " and id = '{$id}' ";
     $result = PartnerTypeModel::update($data, $where);
     return $result;
 }
示例#10
0
 /**
  * TrackEmailStatAct::actIndex()
  * 列出符合条件的数据并分页显示
  * @param string $condition 查询条件
  * @param integer $curpage 页码
  * @param integer $pagenum 每页个数
  * @return array 
  */
 public function actIndex()
 {
     $data = array();
     $condition = '';
     $trackEmailStat = new TrackEmailStatModel();
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $timeNode = isset($_GET['timeNode']) ? post_check(trim($_GET['timeNode'])) : '';
     $condition .= "1";
     if ($type && $key) {
         if (!in_array($type, array('trackNumber', 'platAccount'))) {
             redirect_to("index.php?mod=trackEmailStat&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     if (!empty($timeNode)) {
         if (!in_array($timeNode, array('addTime', 'lastTime'))) {
             redirect_to("index.php?mod=trackEmailStat&act=index");
         }
         $startTime = isset($_GET['startTime']) ? strtotime(trim($_GET['startTime']) . " 00:00:00") : strtotime(date("Y-m-d", time()) . " 00:00:00");
         $endTime = isset($_GET['endTime']) ? strtotime(trim($_GET['endTime']) . " 23:59:59") : strtotime(date("Y-m-d", time()) . " 23:59:59");
         if ($startTime && $endTime) {
             $condition .= ' AND ' . $timeNode . " BETWEEN '" . $startTime . "' AND " . "'" . $endTime . "'";
         }
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     $total = $trackEmailStat->modListCount($condition);
     $res = $trackEmailStat->modList($condition, $curpage, $pagenum);
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //封装数据返回
     $data['key'] = $key;
     $data['type'] = $type;
     $data['lists'] = $res;
     $data['pages'] = $pageStr;
     $data['timeNode'] = $timeNode;
     $data['startTime'] = $startTime ? date('Y-m-d', $startTime) : '';
     $data['endTime'] = $endTime ? date('Y-m-d', $endTime) : '';
     self::$errCode = trackEmailStatModel::$errCode;
     self::$errMsg = trackEmailStatModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         return false;
     }
     return $data;
 }
示例#11
0
 /**
  * 编辑供应商信息的函数
  * @return    void
  */
 public function view_editType()
 {
     $category_id = post_check($_GET['id']);
     $result = PartnerTypeAct::act_getPartnerTypeInfo($category_id);
     $category_name = $result[0]['category_name'];
     $this->smarty->assign("category_id", $category_id);
     $this->smarty->assign("category_name", $category_name);
     $this->smarty->display('editPartnerType.htm');
 }
示例#12
0
 /**
  * 修改
  */
 public function view_edit()
 {
     $id = post_check($_GET['id']);
     $entity = AgreementModel::getById($id);
     //echo '<pre>';print_r($entity);exit;
     $this->smarty->assign('entity', $entity);
     $this->smarty->assign("companyTypeList", array('1' => '企业法人', '2' => '个体经营'));
     $this->smarty->assign("statusList", array('1' => '正常', '2' => '限制'));
     $this->smarty->assign('title', '修改协议');
     $this->smarty->display('editAgreement.htm');
 }
示例#13
0
 public function view_positionList()
 {
     $state = isset($_GET['state']) ? post_check($_GET['state']) : '';
     echo $state;
     echo "<br>";
     $this->smarty->assign('state', $state);
     $position_arr = array();
     $PositionAct = new PositionAct();
     $position_info = $PositionAct->act_getPositionList("*", "where storeId=1");
     if (!empty($position_info)) {
         foreach ($position_info as $position) {
             $x = $position['x_alixs'];
             $y = $position['y_alixs'];
             $z = $position['z_alixs'];
             $f = $position['floor'];
             $position_arr["({$x},{$y},{$z},{$f})"] = $position['pName'];
         }
     }
     //var_dump($position_arr);
     $this->smarty->assign('position_arr', $position_arr);
     $hang = 40;
     //一列行数
     $row_position_nums = 4;
     //一行仓位数
     $second_north_row = 6;
     //二楼北区列数
     $second_south_row = 7;
     //二楼南区列数
     $third_row = 8;
     //三楼南区列数
     $distance = 10;
     //南北区距离
     $distance_row = $row_position_nums + 1;
     //每列X坐标间隔数
     $this->smarty->assign('hang', $hang);
     $this->smarty->assign('row_position_nums', $row_position_nums);
     $this->smarty->assign('second_north_row', $second_north_row);
     $this->smarty->assign('second_south_row', $second_south_row);
     $this->smarty->assign('third_row', $third_row);
     $this->smarty->assign('distance', $distance);
     $this->smarty->assign('distance_row', $distance_row);
     $navlist = array(array('url' => 'index.php?mod=warehouseManagement&act=whStore', 'title' => '仓位设置'), array('url' => 'index.php?mod=position&act=positionList', 'title' => 'A仓管理'));
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('toptitle', 'A仓管理');
     $toplevel = 4;
     //一级菜单的序号  0 开始
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = "010";
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $this->smarty->display('positionInfo.htm');
 }
示例#14
0
 public function view_index()
 {
     $trackWarnNode = new TrackWarnNodeAct();
     $this->smarty->assign('title', '运输方式节点预警管理');
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $carrierId = isset($_GET['carrierId']) ? intval($_GET['carrierId']) : 0;
     $condition = "1";
     if ($type && $key) {
         if (!in_array($type, array('nodeName', 'trackName'))) {
             redirect_to("index.php?mod=trackWarnNode&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     if (!empty($carrierId)) {
         $condition .= " AND carrierId = '{$carrierId}'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     //每页显示的个数
     $res = $trackWarnNode->actList($condition, $curpage, $pagenum);
     $total = $trackWarnNode->actListCount($condition);
     //页面总数量
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //替换页面内容变量
     $this->smarty->assign('key', $key);
     //关键词
     $this->smarty->assign('type', $type);
     //条件选项
     $this->smarty->assign('lists', $res);
     //数据集
     $this->smarty->assign('carrierId', $carrierId);
     //运输方式ID
     $carrierList = TransOpenApiModel::getCarrier(2);
     $this->smarty->assign('carrierList', $carrierList);
     //运输方式列表
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->display('trackWarnNode.htm');
 }
示例#15
0
 public function view_index()
 {
     $condition = '';
     $partitionManage = new PartitionManageAct();
     $this->smarty->assign('title', '分区管理');
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $chid = isset($_GET['chid']) ? intval($_GET['chid']) : 0;
     //渠道ID
     $condition .= "1";
     $condition .= " AND channelId = {$chid}";
     if ($type && $key) {
         if (!in_array($type, array('partitionCode', 'partitionName'))) {
             redirect_to("index.php?mod=partitionManage&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     //每页显示的个数
     $res = $partitionManage->actList($condition, $curpage, $pagenum);
     $total = $partitionManage->actListCount($condition);
     //页面总数量
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     $carrierId = PartitionManageModel::getCarrierId($chid);
     //替换页面内容变量
     $this->smarty->assign('chid', $chid);
     //渠道ID
     $this->smarty->assign('carrierId', $carrierId);
     //运输方式ID
     $this->smarty->assign('key', $key);
     //关键词
     $this->smarty->assign('type', $type);
     //查询选项
     $this->smarty->assign('lists', $res);
     //循环赋值
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->display('partitionManage.htm');
 }
示例#16
0
 /**
  * PackageAct::getPackageOrderDetail()
  * 获取一个或多个订单详情
  * @param string $po_id 订单号
  * @return  array
  */
 public static function getPackageOrderDetail()
 {
     $poid = isset($_REQUEST["po_id"]) ? post_check($_REQUEST["po_id"]) : "";
     if (empty($poid)) {
         self::$errCode = 10000;
         self::$errMsg = "订单编号参数有误";
         return false;
     }
     $res = PackageModel::getPackageOrderDetails($poid);
     self::$errCode = PackageModel::$errCode;
     self::$errMsg = PackageModel::$errMsg;
     return $res;
 }
示例#17
0
 public function view_userPowerSave()
 {
     $username = $_POST['username'] ? post_check($_POST['username']) : "";
     $power = $_POST['power'] ? post_check($_POST['power']) : "";
     $accountManage = new AccountManageAct();
     if (!empty($username) && !empty($power)) {
         $res = $accountManage->act_userPowerSave();
         echo $res;
     } else {
         echo false;
     }
     exit;
 }
示例#18
0
 public function view_contentModify()
 {
     $contentId = isset($_GET['id']) ? post_check($_GET['id']) : '';
     $content = '';
     if ($contentId != '') {
         $cntAct = new contentAct();
         $content = $cntAct->act_getContentList('*', "where id = '{$contentId}'");
         //print_r($content);
     }
     $this->smarty->assign('contentId', $contentId);
     $this->smarty->assign('content', $content[0]['content']);
     $this->smarty->display('contentModify.htm');
 }
示例#19
0
 /**
  * 删除
  */
 public function delAgreement()
 {
     global $dbConn;
     $data = array('is_delete' => 1, 'modifyTime' => date("Y-m-d H:i:s"), 'modifyUserId' => $_SESSION['sysUserId']);
     $ids = post_check($_POST['idArr']);
     $where = "id in (" . implode(',', $ids) . ") ";
     $dataSql = array2sql($data);
     $sql = "update ph_agreement set {$dataSql} where {$where}";
     if ($dbConn->execute($sql)) {
         $arr = array('code' => 1, 'msg' => '添加成功');
     } else {
         $arr = array('code' => 0, 'msg' => '添加失败');
     }
     return json_encode($arr);
 }
示例#20
0
 function act_checkAddCoeff()
 {
     //添加系数中,ajax后台验证是否有相同系数名称、样本类型、样本大小记录
     $cName = isset($_POST['cName']) ? $_POST['cName'] : '';
     $sampleTypeId = isset($_POST['sampleTypeId']) ? post_check($_POST['sampleTypeId']) : '';
     $sizeCodeId = isset($_POST['sizeCodeId']) ? post_check($_POST['sizeCodeId']) : '';
     $where = "WHERE cName='{$cName}' AND sampleTypeId='{$sampleTypeId}' AND sizeCodeId='{$sizeCodeId}' ";
     $ret = SampleCoefficientModel::getSampleCoefficientCount($where);
     if ($ret === 0) {
         self::$errCode = "1111";
         self::$errMsg = "可以使用";
     } else {
         self::$errCode = "0000";
         self::$errMsg = "不可以使用";
     }
 }
示例#21
0
 public function view_printOptimal()
 {
     $list = isset($_GET['list']) ? post_check($_GET['list']) : '';
     $this->smarty->assign('list', $list);
     $navlist = array(array('url' => '', 'title' => '首页'), array('url' => 'index.php?mod=orderWaitforPrint&act=printList', 'title' => '打印发货单'), array('url' => 'index.php?mod=PrintOrderB&act=printOptimal', 'title' => 'B仓提货单打印'));
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('toptitle', 'B仓提货单打印');
     $this->smarty->assign('secnev', 1);
     $toplevel = 2;
     //顶层菜单
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = '22';
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->display('printOrderB.htm');
 }
示例#22
0
 public function view_index()
 {
     $countriesSmall = new CountriesSmallAct();
     $this->smarty->assign('title', '小语种国家列表管理');
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $condition = "1";
     if ($type && $key) {
         if (!in_array($type, array('countryName', 'small_country'))) {
             redirect_to("index.php?mod=countriesSmall&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     //每页显示的个数
     $res = $countriesSmall->actList($condition, $curpage, $pagenum);
     $total = $countriesSmall->actListCount($condition);
     //页面总数量
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     $code_arr = array("1" => "西班牙转英文", "2" => "法国转英文", "3" => "德文转英文", "4" => "俄文转英文", "5" => "意大利文转英文", "6" => "拉丁文转英文", "7" => "阿拉伯文转英文", "8" => "日文转英文", "9" => "韩文转英文", "10" => "泰文转英文", "11" => "葡萄牙语转英文");
     //替换页面内容变量
     $this->smarty->assign('key', $key);
     //关键词
     $this->smarty->assign('type', $type);
     //条件选项
     $this->smarty->assign('code_arr', $code_arr);
     //循环赋值
     $this->smarty->assign('lists', $res);
     //数据集
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->display('countriesSmall.htm');
 }
示例#23
0
 public function view_index()
 {
     $shippingAddress = new ShippingAddressAct();
     $this->smarty->assign('title', '发货地址管理');
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $condition = "1";
     if ($type && $key) {
         if (!in_array($type, array('addressNameCn', 'addressNameEn'))) {
             redirect_to("index.php?mod=shippingAddress&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     //每页显示的个数
     $res = $shippingAddress->actList($condition, $curpage, $pagenum);
     $total = $shippingAddress->actListCount($condition);
     //页面总数量
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //替换页面内容变量
     $this->smarty->assign('key', $key);
     //关键词
     $this->smarty->assign('type', $type);
     //循环赋值
     $this->smarty->assign('lists', $res);
     //循环赋值
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->display('shippingAddress.htm');
 }
示例#24
0
 public function view_currency()
 {
     $state = isset($_GET['state']) ? post_check($_GET['state']) : '';
     $this->smarty->assign('state', $state);
     $CurrencyAct = new CurrencyAct();
     $currency = $CurrencyAct->act_getCurrencyList("*", "where 1");
     $this->smarty->assign('currency', $currency);
     $navlist = array(array('url' => '', 'title' => '系统设置'), array('url' => '', 'title' => '汇率管理'));
     $this->smarty->assign('navlist', $navlist);
     $toplevel = 3;
     //一级菜单的序号
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = 38;
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('toptitle', '汇率列表');
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $this->smarty->display('currency.htm');
 }
示例#25
0
 public function view_property()
 {
     $state = isset($_GET['state']) ? post_check($_GET['state']) : '';
     $this->smarty->assign('state', $state);
     $OrderSettingAct = new OrderSettingAct();
     $property = $OrderSettingAct->act_getPropertyList("*", "where storeId=1");
     $this->smarty->assign('property', $property);
     $navlist = array(array('url' => '', 'title' => '系统设置'), array('url' => '', 'title' => '订单属性'));
     $this->smarty->assign('navlist', $navlist);
     $toplevel = 3;
     //一级菜单的序号
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = 36;
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('toptitle', '订单属性列表');
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $this->smarty->display('orderAttr.htm');
 }
示例#26
0
 public function view_updatependingProducts()
 {
     if (!isset($_SESSION['userId'])) {
         //检测用户是否登陆
         header('location:index.php?mod=login&act=index');
         exit;
     }
     $pendingProductsAct = new pendingProductsAct();
     $type = isset($_GET['type']) ? $_GET['type'] : '';
     $pendingId = isset($_GET['pendingId']) ? post_check($_GET['pendingId']) : '';
     $infoId = isset($_GET['infoId']) ? post_check($_GET['infoId']) : '';
     if (empty($type) || empty($pendingId) || empty($infoId)) {
         //为空时,跳转到列表页面,输出错误信息
         $status = '处理失败,信息不完整';
         header("location:index.php?mod=pendingProducts&act=getpendingProductsList&status={$status}");
         exit;
     }
     $status = 1;
     //默认状态,状态1为修改图片,2为图片完成,3为处理完成
     $select = '*';
     $where = "WHERE id='{$pendingId}' AND infoId='{$infoId}'";
     $pendingProductsList = $pendingProductsAct->act_getPendingProductsList($select, $where);
     //检测记录pendingId和infoId是否存在
     if (empty($pendingProductsList)) {
         $status = '处理失败,不存在这条记录';
         header("location:index.php?mod=pendingProducts&act=getPendingProductsList&status={$status}");
         exit;
     }
     if ($type == 'back') {
         $status = 2;
     }
     if ($type == 'return') {
         $status = 3;
     }
     $return = $pendingProductsAct->act_updatependingProducts($pendingProductsList, $status);
     //返回0或1
     $status = '处理成功';
     if ($return == 0) {
         $status = '处理失败';
     }
     header("location:index.php?mod=pendingProducts&act=getpendingProductsList&status={$status}");
 }
示例#27
0
 /**
  * UserCompetenceAct::act_Competence()
  * 添加修改用户颗粒权限
  * @return array 
  */
 public function act_Competence()
 {
     $userid = isset($_GET["userid"]) ? intval($_GET["userid"]) : 0;
     $visacc = isset($_GET["visacc"]) ? post_check(trim($_GET["visacc"])) : '';
     if (!$userid) {
         self::$errCode = "1001";
         self::$errMsg = "用户ID参数非法";
         return false;
     }
     if (empty($visacc)) {
         self::$errCode = "1002";
         self::$errMsg = "可见帐号内容非法";
         return false;
     }
     $data = array("global_user_id" => $userid, "visible_account" => $visacc);
     $result = UserCompetenceModel::Competence($data);
     self::$errCode = UserCompetenceModel::$errCode;
     self::$errMsg = UserCompetenceModel::$errMsg;
     return $result;
 }
示例#28
0
 /**
  * OrderTranUpsAct::act_export_ups_xml_info()
  * 导出选中的UPS美国专线订单信息(XML格式)
  * @param string $ids 订单编号
  * @return  array
  */
 public static function act_export_ups_xml_info()
 {
     // $ids	= isset($_REQUEST["ids"]) ? $_REQUEST["ids"] : "";
     // $ids	= array(419835,419755);
     // if (empty($ids)) {
     // self::$errCode  = 10000;
     // self::$errMsg   = "订单参数有误";
     // return false;
     // }
     $act = isset($_REQUEST["act"]) ? post_check($_REQUEST["act"]) : "";
     $mod = isset($_REQUEST["mod"]) ? post_check($_REQUEST["mod"]) : "";
     if (!AuthUser::checkLogin($mod, $act)) {
         self::$errCode = 10002;
         self::$errMsg = "对不起,您暂无权使用此功能!";
         return false;
     }
     $res = OrderTranUpsModel::export_ups_xml_info($ids);
     self::$errCode = OrderTranUpsModel::$errCode;
     self::$errMsg = OrderTranUpsModel::$errMsg;
     return $res;
 }
示例#29
0
 public function view_iqcList()
 {
     $sku = isset($_GET['sku']) ? post_check($_GET['sku']) : '';
     $IqcAct = new IqcAct();
     $where = 'where sellerId=0 and detectStatus=0 ';
     if ($sku) {
         $where .= "and sku ='{$sku}' ";
         $this->smarty->assign('sku', $sku);
     }
     $total = $IqcAct->act_getNowWhNum($where);
     $num = 200;
     //每页显示的个数
     $page = new Page($total, $num, '', 'CN');
     $where .= "order by id desc " . $page->limit;
     $iqcList = $IqcAct->act_getNowWhList('*', $where);
     if (!empty($_GET['page'])) {
         if (intval($_GET['page']) <= 1 || intval($_GET['page']) > ceil($total / $num)) {
             $n = 1;
         } else {
             $n = (intval($_GET['page']) - 1) * $num + 1;
         }
     } else {
         $n = 1;
     }
     if ($total > $num) {
         //输出分页显示
         $show_page = $page->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $show_page = $page->fpage(array(0, 2, 3));
     }
     $this->smarty->assign('show_page', $show_page);
     $this->smarty->assign('iqcList', $iqcList);
     $this->smarty->assign('secnev', '1');
     //二级导航
     $this->smarty->assign('module', 'SKU等待领取');
     $this->smarty->assign('username', $_SESSION['userName']);
     $navarr = array("<a href='index.php?mod=iqc&act=iqcList'>iqc检测领取</a>", ">>", "等待领取");
     $this->smarty->assign('navarr', $navarr);
     $this->smarty->display('iqcList.html');
 }
示例#30
0
 public function view_floorList()
 {
     $storeId = isset($_GET['storeId']) ? post_check($_GET['storeId']) : '';
     $WhFloorAct = new WhFloorAct();
     $getFloorList = $WhFloorAct->act_getFloorList("*", "where storeId={$storeId}");
     $navlist = array(array('url' => 'index.php?mod=warehouseManagement&act=whStore', 'title' => '仓库列表'), array('url' => '#', 'title' => '楼层设置'));
     //$floors = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
     $floors_DC = array(1 => '一', 2 => '二', 3 => '三', 4 => '四', 5 => '五', 6 => '六', 7 => '七', 8 => '八', 9 => '九', 10 => '十', 11 => '十一', 12 => '十二', 13 => '十三', 14 => '十四', 15 => '十五', 16 => '十六', 17 => '十七', 18 => '十八', 19 => '十九', 20 => '二十');
     $this->smarty->assign('getFloorList', $getFloorList);
     $this->smarty->assign('storeId', $storeId);
     $this->smarty->assign('floors_DC', $floors_DC);
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('toptitle', 'A仓管理');
     $toplevel = 4;
     //一级菜单的序号  0 开始
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = "010";
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $this->smarty->display('whFloorList.htm');
 }