当前位置: 首页>>代码示例>>PHP>>正文


PHP UserModel::getUsernameById方法代码示例

本文整理汇总了PHP中UserModel::getUsernameById方法的典型用法代码示例。如果您正苦于以下问题:PHP UserModel::getUsernameById方法的具体用法?PHP UserModel::getUsernameById怎么用?PHP UserModel::getUsernameById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserModel的用法示例。


在下文中一共展示了UserModel::getUsernameById方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSkuDailyStatus

 public static function getSkuDailyStatus($sku)
 {
     self::initDB();
     $sql = "SELECT * FROM  `om_sku_daily_status` WHERE sku = '{$sku}' ";
     $query = self::$dbConn->query($sql);
     $goodsInfo = self::$dbConn->fetch_array($query);
     if (!$goodsInfo) {
         return false;
     }
     $goodsInfo['purchaseName'] = UserModel::getUsernameById($goodsInfo['purchaseId']);
     $goodsInfo['enableCount'] = 0;
     //OldsystemModel::getEnableGoodscount($sku);
     return $goodsInfo;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:14,代码来源:purchaseAPI.model.php

示例2: view_skuInfo

 public function view_skuInfo()
 {
     $sku = isset($_GET['sku']) ? trim($_GET['sku']) : "";
     //$spu = ExportsToXlsModel::getGoods($sku);
     $spu = GoodsModel::getSkuList($sku);
     $spu = $spu['spu'];
     $where = "where spu = '{$spu}'";
     $skuinfo = OmAvailableModel::getTNameList("pc_goods", "*", $where);
     $skuStock = array();
     foreach ($skuinfo as $key => $value) {
         $sku = $value['sku'];
         //获取库存
         $skuStock = WarehouseAPIModel::getSkuStock($sku);
         //获取料号信息
         //$skumsg = ExportsToXlsModel::getGoods($sku);
         $skumsg = GoodsModel::getSkuList($sku);
         //获取缓存表信息
         $where = "where sku='{$sku}'";
         $skuStatics = OmAvailableModel::getTNameList("om_sku_daily_status", "*", $where);
         $skuStockList = array();
         $skuStockList['nums'] = $skuStock;
         $skuStockList['sku'] = $skumsg['sku'];
         $skuStockList['spu'] = $skumsg['spu'];
         $skuStockList['goodsName'] = $skumsg['goodsName'];
         $skuStockList['goodsCost'] = $skumsg['goodsCost'];
         $skuStockList['goodsWeight'] = $skumsg['goodsWeight'];
         $skuStockList['AverageDailyCount'] = $skuStatics['AverageDailyCount'];
         $skuStockList['waitingSendCount'] = $skuStatics['waitingSendCount'];
         $skuStockList['xuniCount'] = $skuStatics['waitingSendCount'];
         $skuStockList['goodsStatus'] = $skumsg['goodsStatus'];
         $path = $skumsg['goodsCategory'];
         $cateName = GoodsModel::getCategoryInfoByPath($path);
         $skuStockList['cateName'] = $cateName['name'];
         $skuStockList['isNew'] = $skumsg['isNew'];
         $skuStockList['pmId'] = $skumsg['pmId'];
         $pmName = GoodsModel::getMaterInfoById($skumsg['pmId']);
         $skuStockList['pmName'] = $pmName['pmName'];
         //print_r($pmName);
         $pName = $skumsg['purchaseId'];
         $skuStockList['pName'] = UserModel::getUsernameById($pName);
         $skuStockList['isPacking'] = $skumsg['isPacking'];
         $skuStockList['whName'] = "深圳A仓";
         $skuStock_arr[] = $skuStockList;
     }
     $this->smarty->assign("skuStockList", $skuStock_arr);
     //print_r($skuStockList);
     $this->smarty->display("skuInfo.htm");
 }
开发者ID:ohjack,项目名称:newErp,代码行数:48,代码来源:skuInfo.view.php

示例3: combineOrder

 public static function combineOrder($orderIdArr)
 {
     self::initDB();
     BaseModel::begin();
     //开始事务
     $serchSql = "SELECT * FROM om_unshipped_order WHERE id in ('" . join("','", $orderIdArr) . "') and is_delete = 0 and storeId = 1 ";
     $querySql = self::$dbConn->query($serchSql);
     $serchSqlArr = self::$dbConn->fetch_array_all($querySql);
     //判断一:订单数量统计
     if (count($serchSqlArr) < 2) {
         self::$errCode = "1111";
         self::$errMsg = "合并订单最少需要选择两个或两个以上的订单!";
         return false;
     }
     $platfrom = omAccountModel::getPlatformSuffixById($serchSqlArr[0]['platformId']);
     $extension = $platfrom['suffix'];
     //获取后缀名称
     $temporderStatus = "";
     //相同状态一
     $temporderStatus2 = "";
     //相同状态二
     $userinfo = array();
     //订单相同条件
     $orderSn = array();
     //订单编号
     $onlineTotal = 0;
     //线上总价
     $actualTotal = 0;
     //实际收款总价
     $calcWeight = 0;
     //估算重量,单位是kg
     $calcShipping = 0;
     //估算运费
     foreach ($serchSqlArr as $selectArr) {
         $orderSn[] = $selectArr['id'];
         $onlineTotal += $selectArr['onlineTotal'];
         $actualTotal += $selectArr['actualTotal'];
         $calcWeight += $selectArr['calcWeight'];
         $calcShipping += $selectArr['calcShipping'];
         //判断二:订单被其他人 <锁定> 订单判断
         if ($selectArr['isLock'] == 1) {
             self::$errCode = "2222";
             self::$errMsg = "订单[" . $selectArr['id'] . "]已经被 [" . UserModel::getUsernameById($selectArr['lockUser']) . "] 锁定,不能合并操作。";
             return false;
         }
         //判断三:已合并订单,无法再次合并判断
         if (in_array($selectArr['combineOrder'], array(1, 2))) {
             self::$errCode = "3333";
             self::$errMsg = "订单[" . $selectArr['id'] . "]已经有订单合并操作,不能重复订单合并。";
             return false;
         }
         //判断四:已合并包裹订单,无法合并判断
         if (in_array($selectArr['combinePackage'], array(1, 2))) {
             self::$errCode = "4444";
             self::$errMsg = "订单[" . $selectArr['id'] . "]是合并包裹订单,不能订单合并操作。";
             return false;
         }
         //判断五:订单信息不相同判断
         $userinfsql = "SELECT * FROM om_unshipped_order_userInfo WHERE omOrderId = {$selectArr['id']}";
         $userinfsql = self::$dbConn->fetch_first($userinfsql);
         $tempArr = array();
         $tempArr['accountId'] = trim($selectArr['accountId']);
         $tempArr['platformUsername'] = trim($userinfsql['platformUsername']);
         $tempArr['username'] = trim($userinfsql['username']);
         $tempArr['countryName'] = trim($userinfsql['countryName']);
         $tempArr['state'] = trim($userinfsql['state']);
         $tempArr['city'] = trim($userinfsql['city']);
         $tempArr['street'] = trim($userinfsql['street']);
         $tempArr['currency'] = trim($userinfsql['currency']);
         //币种判断
         if (!empty($userinfo) && $userinfo != $tempArr) {
             self::$errCode = "5555";
             self::$errMsg = "订单信息不相同,无法合并订单操作。";
             return false;
         }
         $userinfo = $tempArr;
         //订单信息相同,进入下次比较。
         //判断六:同状态判断
         $orderStatus = "";
         //订单状态一
         $orderType = "";
         //订单状态二
         $orderStatus = $selectArr['orderStatus'];
         $orderType = $selectArr['orderType'];
         if (!empty($temporderStatus) && $temporderStatus != $orderStatus) {
             self::$errCode = "6666";
             self::$errMsg = "订单不在同一文件夹,无法合并订单操作。";
             return false;
         }
         $temporderStatus = $orderStatus;
         if (!empty($temporderStatus2) && $temporderStatus2 != $orderType) {
             self::$errCode = "6666";
             self::$errMsg = "订单不在同一文件夹,无法合并订单操作。";
             return false;
         }
         $orderExtensql = "SELECT * FROM om_unshipped_order_extension_" . $extension . " WHERE omOrderId = {$selectArr['id']}";
         $orderExtensql = self::$dbConn->fetch_first($orderExtensql);
         $temporderStatus2 = $orderType;
     }
     $insertOrder = array();
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:combineOrder.model.php

示例4: getPurchaseInfoBySku

 public static function getPurchaseInfoBySku($sku)
 {
     self::initDB();
     $sql = "SELECT purchaseId FROM  `pc_goods` WHERE sku = '{$sku}' and is_delete = 0 ";
     $query = self::$dbConn->query($sql);
     $goodsInfo = self::$dbConn->fetch_array($query);
     if (empty($goodsInfo)) {
         return false;
     }
     return UserModel::getUsernameById($goodsInfo['purchaseId']);
 }
开发者ID:ohjack,项目名称:newErp,代码行数:11,代码来源:goods.model.php

示例5: view_iqcExportExcel

 public function view_iqcExportExcel()
 {
     header("Content-type:text/html;charset=utf-8");
     $condition = array();
     $where = "";
     $sku = trim($_POST['sku']);
     $d_status = $_POST['d_status'];
     //导出类型:0->显示所以信息 1:->不良品统计表导出
     $isCombine = $_POST['isCombine'];
     //是否合并:0->需要合并   1:->默认不合并
     $sellerId = $_POST['sellerId'];
     //大卖家ID
     $j_status = $_POST['j_status'];
     //检测类型
     $t_status = $_POST['t_status'];
     //SKU分类检测
     if (!empty($_POST['startTime']) && !empty($_POST['endTime'])) {
         $startTime = strtotime(trim($_POST['startTime']));
         //开始时间
         $endTime = strtotime(trim($_POST['endTime']));
         //结束时间
         $condition[] = "checkTime BETWEEN {$startTime} AND {$endTime}";
         $startTime = trim($_POST['startTime']);
         //开始时间
         $endTime = trim($_POST['endTime']);
         //结束时间
     }
     $condition[] = "sellerId = '{$sellerId}'";
     if (!empty($j_status)) {
         $condition[] = "checkTypeID = '{$j_status}'";
     }
     if (!empty($t_status)) {
         $condition[] = "skuTypeCheckID = '{$t_status}'";
     }
     if (!empty($sku)) {
         $condition[] = "sku = '{$sku}'";
     }
     $combine = false;
     if ($d_status == 1) {
         if ($isCombine == 0) {
             $combine = true;
             $condition[] = "rejectsNum > 0 GROUP BY sku";
         } else {
             $condition[] = "rejectsNum > 0";
         }
     }
     $where = "where " . implode(" and ", $condition);
     $IqcCompleteInfoAct = new IqcCompleteInfoAct();
     $iqcCompleteInfoList = $IqcCompleteInfoAct->act_iqcCompleteInfo($where, $combine);
     //echo "<pre>"; print_r($iqcCompleteInfoList); exit;
     //检测类型
     $qcStandard = new qcStandardAct();
     $detectionTypeArrList = $qcStandard->act_detectionTypeList($this->where);
     $detectionTypeArr = array();
     foreach ($detectionTypeArrList as $listValue) {
         $detectionTypeArr[$listValue['id']] = $listValue['typeName'];
     }
     //SKU分类检测
     $qcStandard = new qcStandardAct();
     $skuTypeQcArrList = $qcStandard->act_skuTypeQcList($this->where);
     $skuTypeQcArr = array();
     foreach ($skuTypeQcArrList as $skuTypeList) {
         $skuTypeQcArr[$skuTypeList['id']] = $skuTypeList['typeName'];
     }
     //echo "<pre>";print_r($detectionTypeArrList); exit;
     $objPHPExcel = new PHPExcel();
     $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")->setLastModifiedBy("Maarten Balliauw")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file");
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', '导出类型');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B1', '料号');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('C1', '名称');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('D1', '到货数');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('E1', '检测类型');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('F1', '抽检数');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('G1', 'SKU分类检测');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('H1', '不良数');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('I1', '不良原因');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('J1', '检测人');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('K1', '检测时间');
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('L1', '大卖家');
     //echo "<pre>"; print_r($iqcCompleteInfoList); exit;
     if ($d_status == 1) {
         $objPHPExcel->setActiveSheetIndex(0)->getCell('A2')->setValueExplicit('不良品统计表', PHPExcel_Cell_DataType::TYPE_STRING);
     } else {
         $objPHPExcel->setActiveSheetIndex(0)->getCell('A2')->setValueExplicit('检测信息统计', PHPExcel_Cell_DataType::TYPE_STRING);
     }
     $a = 2;
     if (!empty($iqcCompleteInfoList)) {
         foreach ($iqcCompleteInfoList as $key => $iqcExportArr) {
             //echo $skuTypeQcArr[$iqcExportArr['skuTypeCheckID']]; echo "<br>";
             if (is_numeric($iqcExportArr['checkUser'])) {
                 $username = UserModel::getUsernameById($iqcExportArr['checkUser']);
                 if (!empty($username)) {
                     $iqcExportArr['checkUser'] = $username;
                 }
             }
             $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B' . $a, $iqcExportArr['sku']);
             //SKU导出类型修改 add by chenwei 2013.12.20
             //$objPHPExcel->setActiveSheetIndex(0)->getCell('B'.$a)->setValueExplicit($iqcExportArr['sku'], PHPExcel_Cell_DataType::TYPE_STRING);
             $objPHPExcel->setActiveSheetIndex(0)->getCell('C' . $a)->setValueExplicit(Deal_SC($iqcExportArr['goodsName']), PHPExcel_Cell_DataType::TYPE_STRING);
             $objPHPExcel->setActiveSheetIndex(0)->getCell('D' . $a)->setValueExplicit($iqcExportArr['arrivalNum'], PHPExcel_Cell_DataType::TYPE_STRING);
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:iqcInfo.view.php

示例6: act_judgeLock

 public function act_judgeLock()
 {
     $id = $_REQUEST['id'];
     $ret = OrderModifyModel::judegLock($id);
     if (!$ret) {
         self::$errCode = OrderModifyModel::$errCode;
         self::$errMsg = OrderModifyModel::$errMsg;
         return false;
     } else {
         if ($ret[0]['isLock'] != '1') {
             return true;
         } else {
             if ($ret[0]['lockUser'] != $_SESSION['sysUserId']) {
                 $account = UserModel::getUsernameById($ret[0]['lockUser']);
                 self::$errCode = "001";
                 self::$errMsg = "订单已被用户" . $account . '于' . date("Y-m-d H:i", $ret[0]['lockTime']) . '锁定!';
                 return false;
                 //失败则设置错误码和错误信息, 返回false
             } else {
                 return true;
             }
         }
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:24,代码来源:orderModify.action.php

示例7: content_5311970714c639_26047770


//.........这里部分代码省略.........
                    复制订单
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
                </span>
                <span>
                <?php 
            if ($_smarty_tpl->tpl_vars['orderData']->value['combineOrder'] == 2) {
                ?>
                    合并订单
                <?php 
            }
            ?>
                </span>
                <?php 
            if ($_smarty_tpl->tpl_vars['orderNote']->value) {
                ?>
                <span>
                备注:
                <?php 
                $_smarty_tpl->tpl_vars['ve'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['ve']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['orderNote']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['ve']->key => $_smarty_tpl->tpl_vars['ve']->value) {
                    $_smarty_tpl->tpl_vars['ve']->_loop = true;
                    ?>
                    <?php 
                    if ($_smarty_tpl->tpl_vars['ve']->value['content'] != '') {
                        ?>
                    <?php 
                        echo $_smarty_tpl->tpl_vars['ve']->value['content'];
                        ?>
&nbsp;
                    <?php 
                    }
                    ?>
                <?php 
                }
                ?>
                </span>
                <?php 
            }
            ?>
                <?php 
            if ($_smarty_tpl->tpl_vars['orderData']->value['isLock'] == 1) {
                ?>
 <span> 锁定人:<?php 
                $_smarty_tpl->tpl_vars['lockUser'] = new Smarty_variable(UserModel::getUsernameById($_smarty_tpl->tpl_vars['orderData']->value['lockUser']), null, 0);
                echo $_smarty_tpl->tpl_vars['lockUser']->value;
                ?>
 &nbsp;&nbsp; 锁定时间:<?php 
                echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['orderData']->value['lockTime'], "%Y-%m-%d %H:%I:%S");
                ?>
</span> <?php 
            }
            ?>
            </td>
        </tr>
    </table>
    <?php 
        }
        if (!$_smarty_tpl->tpl_vars['orderlist']->_loop) {
            ?>
    <span>还没有相应的订单信息哦!</span>
    <?php 
        }
        ?>
</div>
<div class="bottomvar">
	<span id="showSelectNum2"></span>
    <?php 
        if ($_smarty_tpl->tpl_vars['status']->value == '') {
            ?>
    <div class="pagination">
        <?php 
            echo $_smarty_tpl->tpl_vars['show_page']->value;
            ?>

    </div>
    <?php 
        }
        ?>
</div>
<?php 
        echo $_smarty_tpl->getSubTemplate('orderBatchMove.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('footer.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('cancelCombine.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:e0fc0587da18a0f9d9dddbffc799262be81a2ae6.file.orderindex.htm.php

示例8: view_exportsToXls1

 public function view_exportsToXls1()
 {
     error_reporting(E_ALL);
     /*$searchPlatformId			=	isset($_GET['platformId']) ? $_GET['platformId'] : '';				//搜索平台
     		$searchAccountId			=	isset($_GET['accountId']) ? $_GET['accountId'] : '';				//搜索账号
     		$searchIsNote				=	isset($_GET['isNote']) ? $_GET['isNote'] : '';						//是否有留言
     		$searchTransportationType	=	isset($_GET['transportationType']) ? $_GET['transportationType'] : '';//运输类型
     		$searchTransportation		=	isset($_GET['transportation']) ? $_GET['transportation'] : '';		//运输方式
     		$searchIsBuji				=	isset($_GET['isBuji']) ? $_GET['isBuji'] : '';						//是否补寄订单
     		$searchIsLock				=	isset($_GET['isLock']) ? $_GET['isLock'] : '';						//是否锁定
     		$searchOrderTime1			=	isset($_GET['OrderTime1']) ? $_GET['OrderTime1'] : '';				//搜索下单初始时间
     		$searchOrderTime2			=	isset($_GET['OrderTime2']) ? $_GET['OrderTime2'] : '';				//搜索下单结束时间
     		//order_detail表
     		$searchReviews				=	isset($_GET['reviews']) ? $_GET['reviews'] : '';					//是否评价
     		$searchSku					=	isset($_GET['sku']) ? $_GET['sku'] : '';							//sku
     		$searchOmOrderId			=	'';																	//订单编号
     		$searchOrderType			=	isset($_GET['selectOrderType']) ? $_GET['selectOrderType'] : '';*/
     //foreach($_GET as $k=>$v){
     //			//if(isset($_))
     //		}
     $type = isset($_GET['type']) ? trim($_GET['type']) : "";
     $order = isset($_GET['order']) ? trim($_GET['order']) : "";
     $where = " WHERE ";
     $where_arr = array();
     $accountList = $_SESSION['accountList'];
     $platformList = $_SESSION['platformList'];
     //echo "<pre>"; print_r($accountList); exit;
     $platformsee = array();
     for ($i = 0; $i < count($platformList); $i++) {
         $platformsee[] = $platformList[$i];
     }
     if ($platformsee) {
         $where_arr[] = ' da.platformId IN ( ' . join(',', $platformsee) . ' ) ';
     }
     $accountsee = array();
     for ($i = 0; $i < count($accountList); $i++) {
         $accountsee[] = $accountList[$i];
     }
     if ($accountsee) {
         $where_arr[] = ' da.accountId IN ( ' . join(",", $accountsee) . ' ) ';
     }
     if ($type == 1) {
         $arr = explode(",", $order);
         $ostatus = $arr[0];
         $otype = $arr[1];
         $where_arr[] = " da.is_delete=0 ";
         if ($ostatus) {
             $where_arr[] = " da.orderStatus='{$ostatus}' ";
         }
         if ($otype) {
             $where_arr[] = " da.orderType='{$otype}' ";
         }
         //$where = "where da.orderStatus='{$ostatus}' and da.orderType='{$otype}' and da.is_delete=0";
     } elseif ($type == 2) {
         $where_arr[] = " da.id in({$order}) ";
     }
     $where .= join(' AND ', $where_arr);
     //echo $where; exit;
     $orderarr = OrderindexModel::showSearchOrderList("om_unshipped_order", $where);
     //echo count($orderarr); exit;
     $exporter = new ExportDataExcel("browser", "xls1" . $date . ".xls");
     //echo "<pre>"; print_r($orderarr[98]);exit;
     $exporter->initialize();
     // starts streaming data to web browser
     $exporter->addRow(array("日期", "账号", "订单编号", "重量", "邮费", "运输方式", "交易号", "客户ID", "仓位号", "料号", "数量", "国家", "包裹总价值", "币种", "包装员", "挂号条码", "是/否"));
     foreach ($orderarr as $key => $value) {
         $paymentTime = date("Y-m-d", $value['orderData']['paymentTime']);
         $accountArr = OmAccountModel::accountInfo($value['orderData']['accountId']);
         $account = $accountArr['account'];
         //$account 			= $account['account'];
         $orderid = $key;
         $weight = $value['orderWarehouse']['actualWeight'];
         $shipfee = $value['orderWarehouse']['actualShipping'];
         $packagerId = $value['orderWarehouse']['packagerId'];
         $packager = UserModel::getUsernameById($packagerId);
         $transportation = CommonModel::getCarrierList();
         //所有的
         $transportationList = array();
         foreach ($transportation as $tranValue) {
             if ($tranValue['id'] == $value['orderData']['transportId']) {
                 $transport = $tranValue['carrierNameCn'];
                 break;
             }
             //$transportationList[$tranValue['id']] = $tranValue['carrierNameCn'];
         }
         //$plateform 			= exportsToXlsModel::plateformIdToName($value['orderData']['platformId']);
         $plateformArr = OmAccountModel::platformListById($value['orderData']['platformId']);
         $plateform = $plateformArr[$value['orderData']['platformId']];
         //$plateform			= $plateform['platform'];
         $transId = $value['orderExtenData']['transId'];
         $currency = $value['orderExtenData']['currency'];
         $userId = $value['orderUserInfoData']['platformUsername'];
         $countryName = $value['orderUserInfoData']['countryName'];
         $actualTotal = $value['orderData']['actualTotal'];
         $recordNumber = $value['orderData']['recordNumber'];
         $trackNumber = $value['orderTracknumber'][0]['tracknumber'];
         $orderDetails = $value['orderDetail'];
         if (count($orderDetails) == 1) {
             foreach ($value['orderDetail'] as $key => $detail) {
                 $skuId = $key;
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:exportsToXls.view.php

示例9: content_5319cba229dd99_23082575

    function content_5319cba229dd99_23082575($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_checkboxes')) {
            include 'E:\\erpNew\\order.valsun.cn\\lib\\template\\smarty\\plugins\\function.html_checkboxes.php';
        }
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/usercompense.js"></script>
<!--<div class="servar">
	
</div>-->
<div class="main">
    <div id="accordion">
    	<h3>平台账号权限控制-<?php 
        $_smarty_tpl->tpl_vars['uidUser'] = new Smarty_variable(UserModel::getUsernameById($_smarty_tpl->tpl_vars['uid']->value), null, 0);
        echo $_smarty_tpl->tpl_vars['uidUser']->value;
        ?>
</h3>
        <div>
        <form name="powerFrom" id="powerFrom" action="index.php?mod=omAccount&act=showUserCompense" method="post">
            <input type="hidden" name="action" value="accountpower" />
            <input type="hidden" id="uid" name="uid" value="<?php 
        echo $_smarty_tpl->tpl_vars['uid']->value;
        ?>
" />
            <?php 
        $_smarty_tpl->tpl_vars['viewaccountlist'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['viewaccountlist']->_loop = false;
        $_smarty_tpl->tpl_vars['pid'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['arr_all_platform_account']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['viewaccountlist']->key => $_smarty_tpl->tpl_vars['viewaccountlist']->value) {
            $_smarty_tpl->tpl_vars['viewaccountlist']->_loop = true;
            $_smarty_tpl->tpl_vars['pid']->value = $_smarty_tpl->tpl_vars['viewaccountlist']->key;
            ?>
                <?php 
            $_smarty_tpl->tpl_vars['platformName'] = new Smarty_variable($_smarty_tpl->tpl_vars['viewaccountlist']->value['platform'], null, 0);
            ?>
                <?php 
            $_smarty_tpl->tpl_vars['acountlists'] = new Smarty_variable($_smarty_tpl->tpl_vars['viewaccountlist']->value['acountlists'], null, 0);
            ?>
                <input type="checkbox" id="checkboxes_platform_<?php 
            echo $_smarty_tpl->tpl_vars['pid']->value;
            ?>
" name="checkboxes_platform[]" <?php 
            if ($_smarty_tpl->tpl_vars['visible_platform_account']->value[$_smarty_tpl->tpl_vars['pid']->value]) {
                ?>
checked='checked'<?php 
            }
            ?>
 value="<?php 
            echo $_smarty_tpl->tpl_vars['pid']->value;
            ?>
" onclick="platformCheckBox(<?php 
            echo $_smarty_tpl->tpl_vars['pid']->value;
            ?>
);" />&nbsp;<b><?php 
            echo $_smarty_tpl->tpl_vars['platformName']->value;
            ?>
</b><br>&nbsp;&nbsp;&nbsp;&nbsp;
                <?php 
            $_smarty_tpl->tpl_vars['viewaccount'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['viewaccount']->_loop = false;
            $_smarty_tpl->tpl_vars['aid'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['acountlists']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['viewaccount']->key => $_smarty_tpl->tpl_vars['viewaccount']->value) {
                $_smarty_tpl->tpl_vars['viewaccount']->_loop = true;
                $_smarty_tpl->tpl_vars['aid']->value = $_smarty_tpl->tpl_vars['viewaccount']->key;
                ?>
                	<?php 
                if ($_smarty_tpl->tpl_vars['viewaccount']->value != '') {
                    ?>
                	<input type="checkbox" id="checkboxes_account_<?php 
                    echo $_smarty_tpl->tpl_vars['aid']->value;
                    ?>
" name="checkboxes_account_<?php 
                    echo $_smarty_tpl->tpl_vars['pid']->value;
                    ?>
[]" <?php 
                    if (in_array($_smarty_tpl->tpl_vars['aid']->value, $_smarty_tpl->tpl_vars['visible_platform_account']->value[$_smarty_tpl->tpl_vars['pid']->value])) {
                        ?>
checked='checked'<?php 
                    }
                    ?>
 value="<?php 
                    echo $_smarty_tpl->tpl_vars['aid']->value;
                    ?>
" />&nbsp;<?php 
                    echo $_smarty_tpl->tpl_vars['viewaccount']->value;
                    ?>
&nbsp;&nbsp;
                    <?php 
                }
                ?>
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:0f33c32d609e0ece762a67f28d98ab66d1e9e596.file.showUserCompense.htm.php

示例10: getBookTable

 function getBookTable($title, $author)
 {
     $link = '';
     $bookModel = new BookModel();
     $userModel = new UserModel();
     $book = $bookModel->getBook($title, $author);
     $reviews = array();
     $reviews = $bookModel->getBookReview($book->idBook);
     //echo $reviews[0]->description;
     $result = '';
     $reviews_res = "";
     $r = null;
     $price = $book->price;
     require "testdb.php";
     if (isset($_SESSION['login_user'])) {
         $username = $_SESSION['login_user'];
         $query = "SELECT idUser FROM users WHERE username LIKE '{$username}'";
         $result = mysql_query($query) or die(mysql_error());
         while ($row = mysql_fetch_array($result)) {
             $idUser = $row[0];
             $query2 = "SELECT * FROM reading WHERE idUser = {$idUser} AND idBook = {$book->idBook}";
             $result2 = mysql_query($query2) or die(mysql_error());
             while ($row = mysql_fetch_array($result2)) {
                 $date = date('Y-m-d');
                 $end_date = date("Y-m-d", strtotime($row['enddate']));
                 if ($end_date > $date) {
                     $price = 0;
                 }
             }
         }
     }
     mysql_close();
     if (isset($_SESSION['login_user'])) {
         if ($price == 0) {
             $link = $book->location;
         } else {
             $link = "payment.php";
         }
     }
     if ($book != null) {
         $_SESSION['current_book'] = $book->idBook;
         $grade = 0;
         if ($book->noGrades > 0) {
             $grade = $book->grades / $book->noGrades;
         }
         $result = "\n\t\t\t\t\t<div class='row popular'>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h3>{$book->title} &#8211 {$book->author}</h3>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class='row produs'>\n\t\t\t\t\t\t\t\t<div class='produs_sus' style=''>\n\t\t\t\t\t\t\t\t\t<div class='large-4 column poza_produs'>\n\t\t\t\t\t\t\t\t\t\t<img src='{$book->cover}' width='250' height='375' alt=''>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class='large-4 column produs_centru'>\n\t\t\t\t\t\t\t\t\t\t<p><span>Publish year : </span>{$book->rYear}<br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Author : </span> <span class='al'>{$book->author}</span></a><br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Category : </span> {$book->category}<br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Publisher : </span> <span class='al'>{$book->publisher}</span></a><br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Grade : </span> <span class='al'>{$grade}</span></a><br></p>\n\t\t\t\t\t\t\t\t\t\t<form action='' method='post'>\n\t\t\t\t\t\t\t\t\t\t\t<fieldset class='rating'>\n\t\t\t\t\t\t\t\t\t\t\t\t<legend>Please rate:</legend>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star5' name='star5' value='5' /><label for='star5' title='Rocks!'>5 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star4' name='star4' value='4' /><label for='star4' title='Pretty good'>4 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star3' name='star3' value='3' /><label for='star3' title='Meh'>3 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star2' name='star2' value='2' /><label for='star2' title='Kinda bad'>2 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star1' name='star1' value='1' /><label for='star1' title='Sucks big time'>1 star</label>\n\t\t\t\t\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\t\t\t\$(function() {\n\t\t\t\t\t\t\t\t\t\tc_rate('ratem',19.4,17);\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t</div><!--end of produs_centru-->\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t<form action='' method='post'>\n\t\t\t\t\t\t\t\t<div class='large-4 column column produs_right'>\n\t\t\t\t\t\t\t\t\t<p class='pret'>\n\t\t\t\t\t\t\t\t\t\tPrice : {$price}&nbsp; Lei\n\t\t\t\t\t\t\t\t\t</p><br>\n\n\t\t\t\t\t\t\t\t\t<a href = '{$link}?title={$book->title}&author={$book->author}&current_book={$book->idBook}&link_book={$book->location}' class='button info'>Read me</a>\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</div>\n\t\t\t\n\n\t\n\t\t\t\t\t\t<div class='large-12 column'>\t\n\t\t\t\t\t\t\t<h3>Description</h3>\n\t\t\t\t\t\t\t<div class='descriere_produs'>\t\t\n\t\t\t\t\t\t\t\t<p>{$book->description}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\t\n\n\t\t\t\t\t";
         $reviews_res = "<div class = 'large-12 column'>\n\t\t\t\t\t\t\t<h3>Reviews</h3>\n\t\t\t\t\t\t\t <div class='comentarii_utilizatori'> ";
         foreach ($reviews as $r) {
             if ($r->approved == 1) {
                 $reviews_res = $reviews_res . " <div class='row'>\n\t\t\t\t\t\t<div class='large-12 column user'>" . $userModel->getUsernameById($r->idUser) . " : </div>\n\t\t\t\t\t\t<div class='large-12 column continut_comentariu'>" . $r->description . "</div><br></div>";
             }
         }
         $reviews_res = $reviews_res . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\n\t\n\t\t\t\t\t\t<div class='clear'></div> \n\t\t\t\t\t\t \n\t\t\t\t\t\t<div class='large-12 column'>             \n\t\t\t\t\t\t\t<h3>Add a review</h3>\n\t\t\t\t\t\t\t\t <form name='comentariiprodus1' action='' method='post'>          \n\t\t\t\t\t\t\t\t   \n\t\t\t\t\t\t\t\t  <div class='textar'>\n\t\t\t\t\t\t\t\t\t<div>Your review : </div>\n\t\t\t\t\t\t\t\t\t<textarea name='comment' cols='47' rows='10' class='contact_input' style='height:100px'></textarea>  \n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class='rand_jos'>\n\t\t\t\t\t\t\t\t\t<!--<a href = '#' class = 'button info'>SEND </a>-->\n\t\t\t\t\t\t\t\t\t<input class = 'button info' name='addreview' type='submit' value=' Send '>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t </form>     \n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>";
     }
     return $result . $reviews_res;
 }
开发者ID:ralucabolba,项目名称:E-Biblio,代码行数:56,代码来源:book_controller.php

示例11: act_getSkuInfo

 function act_getSkuInfo()
 {
     global $memc_obj;
     $sku_name = '';
     $cate = '';
     $sku = $_POST['sku'];
     if (is_numeric($sku) && $sku > 1000000) {
         //此sku为goods_code
         $goods_codes = WhStandardModel::goods_codeTosku($sku);
         $sku = $goods_codes['sku'];
     }
     //读取数据库
     $categoryStr = "";
     //$time1 = time();
     //SKU信息API接口
     $OmAvailableApiAct = new OmAvailableApiAct();
     $skuInfo = $OmAvailableApiAct->act_getGoodsInfoBySku($sku);
     $skuInfo = $skuInfo['data'];
     //$skuInfo       = $memc_obj->get_extral('pc_goods_'.$sku);
     $reSku = $skuInfo['sku'];
     //接口返回SKU
     $reSpu = $skuInfo['spu'];
     //接口返回SKU
     $skuName = $skuInfo['goodsName'];
     //产品描述
     $purchaseId = $skuInfo['purchaseId'];
     //采购人ID
     $goodsCategory = $skuInfo['goodsCategory'];
     //SKU分类path
     $qcCategoryListAct = new qcCategoryListAct();
     $where = 'WHERE is_delete=0 and path= "' . $goodsCategory . '"';
     $categoryList = $qcCategoryListAct->act_getCategoryList('*', $where);
     $getCategoryArr = $qcCategoryListAct->act_getCategoryArr();
     //获取产品类别列表信息
     $sampleTypeListId = empty($categoryList) ? 1 : $categoryList[0]['sampleTypeId'];
     $qcStandard = new qcStandardAct();
     $skuTypeQcArrList = $qcStandard->act_skuTypeQcList('');
     $sampleTypeList = array();
     $categoryInfo_ids = array();
     $categoryInfo = array();
     foreach ($skuTypeQcArrList as $skuTypeQcArrListValue) {
         $categoryInfo[$skuTypeQcArrListValue['id']] = $skuTypeQcArrListValue['typeName'];
         $sampleTypeList[$skuTypeQcArrListValue['id']] = $skuTypeQcArrListValue['typeName'] . "  " . $skuTypeQcArrListValue['describe'];
     }
     $goodsCategoryNameArray = explode("-", $goodsCategory);
     $goodsCategoryName = array();
     foreach ($goodsCategoryNameArray as $cvalue) {
         $goodsCategoryName[] = $getCategoryArr[$cvalue];
     }
     $goodsCategoryNameStr = join('-', $goodsCategoryName);
     //$categoryInfo_ids = array_keys($categoryInfo_ids);
     //$categoryStr = $sampleTypeList[$sampleTypeListId];
     //$img_return = $OmAvailableApiAct->act_getAllPic($reSpu, 'F');//图片接口
     //var_dump($img_return); exit;
     $data = UserCacheModel::qccenterGetErpGoodscount($sku);
     $goods_count = $data['goods_count'];
     /*$goods_location = $data['goods_location'];
     		$cguser = $data['cguser'];*/
     //$categoryL     = explode('-',$goodsCategory);
     /*foreach($category as $c_key=>$categoryArr){
     			if(in_array($categoryL[0],$categoryArr)){
     				if($c_key == '1'){
     					//SKU分类信息API接口
     					$cate			  = 1;
     					$goodsCategorySt  = $memc_obj->get_extral('pc_goods_category_'.$goodsCategory);
     					$categoryStr      = "{$goodsCategorySt['name']}:功能检测";	
     					break;
     				}else if($c_key == '2'){
     					//SKU分类信息API接口
     					$cate			  = 2;
     					$goodsCategorySt  = $memc_obj->get_extral('pc_goods_category_'.$goodsCategory);
     					$categoryStr    = "{$goodsCategorySt['name']}:尺寸质量检测";
     					break;
     				}else if($c_key == '3'){
     					//SKU分类信息API接口
     					$cate			  = 3;
     					$goodsCategorySt  = $memc_obj->get_extral('pc_goods_category_'.$goodsCategory);
     					$categoryStr    = "{$goodsCategorySt['name']}:对图检测";
     					break;
     				}
     			}else{
     				continue;	
     			}
     		}*/
     $where = "where sku='{$sku}' and is_delete=0 and sellerId=1 and getUserId='{$_SESSION['sysUserId']}' and detectStatus=1 order by getTime asc limit 1";
     $list = WhStandardModel::getNowWhList("*", $where);
     $num = $list[0]['num'];
     $infoid = $list[0]['id'];
     $goods_location = $list[0]['location'];
     $cguser = UserModel::getUsernameById($list[0]['purchaseId']);
     //$goods_count     = 'TEST';
     $where2 = "where sampleTypeId='{$sampleTypeListId}' and minimumLimit<='{$num}' and maximumLimit>='{$num}' limit 1";
     $list2 = DetectStandardModel::getNowStandardList("*", $where2);
     //如果是正常回测,获取待定回测信息备注
     $pendingInfo = PendingProductsModel::getPendingProductsList('backNote', ' WHERE infoId=' . $infoid);
     if ($pendingInfo) {
         $backNote = $pendingInfo[0]['backNote'];
     }
     //$time2 = time();
     //echo ($time2-$time1);
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:iqcDetect.action.php


注:本文中的UserModel::getUsernameById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。