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


PHP Area::getCity方法代码示例

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


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

示例1: actionLogincheck

 public function actionLogincheck()
 {
     Yii::import('application.modules.user.UserModule');
     Yii::import('application.modules.pap.services.DefaultService');
     $time = $_SERVER['REQUEST_TIME'];
     //$organID = Yii::app()->user->getOrganID(); 获取不到
     $organID = isset($_GET['OrganID']) ? $_GET['OrganID'] : '0';
     $UserID = isset($_GET['UserID']) ? $_GET['UserID'] : '0';
     //$username = Yii::app()->user->getState('userName');
     $username = isset($_GET['username']) ? $_GET['username'] : '0';
     $ip = isset($_GET['ip']) ? $_GET['ip'] : '127.0.0.1';
     $ipnum = sprintf("%u", ip2long($ip));
     //登陆地
     $loginaddrsql = ' select Province,City from jpd_ip where ' . $ipnum . ' between inet_aton(beginip) and inet_aton(endip)';
     $loginaddrres = Yii::app()->jpdb->createCommand($loginaddrsql)->queryRow();
     if (!$loginaddrres) {
         //系统未录入ip对应的地址
         $remind = '用户 ' . $username . ' 于 ' . date('Y-m-d H:i', $time) . ' 异常登陆';
         $warn = '用户 ' . $username . ' 于 ' . date('Y-m-d H:i', $time) . ' 异常登陆,登录IP为: ' . $ip . ',此ip在嘉配ip库中无记录。';
     } else {
         //判断用户是否在允许地登陆
         $allowloginsql = ' select ID from jpd_login_address where OrganID=' . $organID . ' and Province=' . $loginaddrres['Province'] . ' and (City=' . $loginaddrres['City'] . ' or City=0 or ' . $loginaddrres['City'] . '=0)';
         $allowloginres = Yii::app()->jpdb->createCommand($allowloginsql)->queryRow();
         if ($allowloginres) {
             //用户在允许登陆地登陆
             return;
         } else {
             //用户不在允许登陆地登陆,判断是否位于危险省份
             //用户当前登陆地址
             $loginaddr = Area::getCity($loginaddrres['Province']) . Area::getCity($loginaddrres['City']);
             $risksql = 'select ID from jpd_risk_area where Province=' . $loginaddrres['Province'] . ' and (City=' . $loginaddrres['City'] . ' or City=0)';
             $riskres = Yii::app()->jpdb->createCommand($risksql)->queryRow();
             //获取机构信息
             $organsql = 'select Province,City,Area,Address from jpd_organ where ID=' . $organID;
             $organres = Yii::app()->jpdb->createCommand($organsql)->queryRow();
             $organaddr = Area::getCity($organres['Province']) . Area::getCity($organres['City']) . Area::getCity($organres['Area']) . $organres['Address'];
             if ($riskres) {
                 //用户在危险地区登陆
                 $remind = '用户 ' . $username . ' 于 ' . date('Y-m-d H:i', $time) . ' 异常登陆';
                 $warn = '用户 ' . $username . ' 于 ' . date('Y-m-d H:i', $time) . ' 在 ' . $loginaddr . ' 登陆(该地址属于警告地址),该账号所属机构地址为: ' . $organaddr;
             } else {
                 //用户不在危险地区登陆
                 $remind = '用户 ' . $username . ' 于 ' . date('Y-m-d H:i', $time) . ' 异常登陆';
                 $warn = '用户 ' . $username . ' 于 ' . date('Y-m-d H:i', $time) . ' 在 ' . $loginaddr . ' 登陆,该账号所属机构地址为: ' . $organaddr;
             }
         }
     }
     $params['organID'] = $organID;
     $params['UserID'] = $UserID;
     $params['subject'] = '由你配用户异常登陆提醒';
     $params['remind'] = $remind;
     $params['warn'] = $warn;
     DefaultService::sendwarnemail($params);
 }
开发者ID:zwq,项目名称:unpei,代码行数:54,代码来源:UploadController.php

示例2: returnidgetaddress

 public static function returnidgetaddress($ReturnID)
 {
     $criteria = new CDbCriteria();
     $criteria->addCondition(" t.ReturnID = " . $ReturnID, "AND");
     $model = PapReturnAddress::model()->find($criteria);
     return Area::getCity($model->Province) . Area::getCity($model->City) . Area::getCity($model->Area) . $model->Address;
 }
开发者ID:zwq,项目名称:unpei,代码行数:7,代码来源:OrderreturnService.php

示例3: array

        ?>
</td>
				<td name='companyname'><?php 
        echo $dealer['organName'];
        ?>
</td>
				<td name='phone'><?php 
        echo $dealer['Phone'];
        ?>
</td>
				<td name='email'><?php 
        echo $dealer['Email'];
        ?>
</td>
				<td><?php 
        $address = Area::getCity($dealer->province) . Area::getCity($dealer->city) . Area::getCity($dealer->area) . $dealer->address;
        echo F::msubstr($address);
        ?>
</td>
				<td><?php 
        echo CHtml::button('选择', array('class' => 'btn-small', 'id' => 'opt'));
        ?>
</td>
			</tr>
		<?php 
        $i++;
    }
    ?>
	</tbody>
	<?php 
} else {
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:dealercontacts.php

示例4:

</td>
                                <td><?php 
        echo F::msubstr($model['phone']);
        ?>
</td>
                                <td><?php 
        if ($model['jiapart_ID']) {
            echo F::msubstr($model['jiapart_ID']);
        } else {
            echo "无";
        }
        ?>
</td>
                                <td><?php 
        if ($model['province']) {
            $address = Area::getCity($model['province']) . Area::getCity($model['city']) . Area::getCity($model['area']) . $model['address'];
            echo F::msubstr($address);
        } else {
            echo "无";
        }
        ?>
</td>
                                <td><?php 
        if ($model['email']) {
            echo F::msubstr($model['email']);
        } else {
            echo "无";
        }
        ?>
</td>
                                <td><?php 
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:businesscontacts.php

示例5: actionList

 public function actionList()
 {
     $province = Yii::app()->request->getParam('province');
     $city = Yii::app()->request->getParam('city');
     $brand = Yii::app()->request->getParam('brand');
     $criteria = new CDbCriteria();
     $criteria->addCondition('Identity=2 and IsBlack="0" and IsFreeze="0" and Status="1"');
     if ($province) {
         $criteria->addCondition('Province=' . $province, 'AND');
     }
     if ($city) {
         $criteria->addCondition('City=' . $city, 'AND');
     }
     if (!empty($brand)) {
         $ids = $this->getdealerbybrand($brand);
         $criteria->addInCondition('ID', $ids);
     }
     $criteria->order = 'Sort ASC';
     $organ = Organ::model()->findAll($criteria);
     $organ = array();
     if (isset($organ)) {
         foreach ($organ as $key => $val) {
             $organ[$key] = $val->attributes;
             $organ[$key]['address'] = Area::getCity($val['Province']) . Area::getCity($val['City']) . Area::getCity($val['Area']);
             $brand = PapBrand::model()->find('OrganID=:organ', array(':organ' => $val['ID']));
             $organ[$key]['brandname'] = $brand['BrandName'];
         }
     }
     echo json_encode($organ);
 }
开发者ID:zwq,项目名称:unpei,代码行数:30,代码来源:UniondealerController.php

示例6: actionSharecontact

 public function actionSharecontact()
 {
     $organID = Commonmodel::getOrganID();
     $dealer = Dealer::model()->find('userID=:userid', array(':userid' => $organID));
     $share = BusinessShare::model()->findAll('InitiatorID=:intorID and Status=2', array(':intorID' => $organID));
     foreach ($share as $key => $value) {
         $shareID .= ',' . $value['ShareID'];
     }
     $shareID = ltrim($shareID, ",");
     //查出shareID
     $sql = "select a.id,a.contact_user_id,a.customertype,\n\t\t   a.cooperationtype,a.name,a.sex,\n\t\t   a.companyname,a.phone,a.province,a.city,a.area,a.email,\n\t\t   a.weixin,a.QQ,a.create_time,a.Status,a.jiapart_ID,a.update_time,\n\t\t   (select b.category from tbl_customer_category b where a.customercategory=b.id and a.user_id={$organID}) as customercategory\n\t\t   from tbl_business_contacts a where \n\t\t   user_id='{$organID}' and Status=0  and a.contact_user_id in({$shareID})";
     if ($_POST) {
         $search['name'] = $_POST['name'];
         $search['phone'] = $_POST['phone'];
         $search['keyword'] = $_POST['keyword'];
         if ($search) {
             if ($search['name']) {
                 $sql .= " and name like'%{$search['name']}%'";
             }
             if ($search['phone']) {
                 $sql .= " and phone like '%{$search['phone']}%'";
             }
             if ($search['keyword']) {
                 $sql .= " and (companyname like '%{$search['keyword']}%') ";
             }
         }
     }
     $sql .= "order by create_time desc";
     $criteria = new CDbCriteria();
     $models = Yii::app()->db->createCommand($sql)->queryAll();
     $count = count($models);
     $pages = new CPagination($count);
     $pages->pageSize = intval($_GET['rows']);
     $pages->applylimit($criteria);
     $models = Yii::app()->db->createCommand($sql . " LIMIT :offset,:limit");
     $models->bindValue(':offset', $pages->currentPage * $pages->pageSize);
     $models->bindValue(':limit', $pages->pageSize);
     $models = $models->queryAll();
     foreach ($models as $key => $value) {
         $data[$key]['id'] = $value['id'];
         $data[$key]['Initiator'] = F::msubstr($dealer['organName']);
         $data[$key]['companyID'] = $value['contact_user_id'];
         //$data[$key]['customertype'] = $value['customertype'];
         $data[$key]['cooperationtype'] = $value['cooperationtype'];
         $data[$key]['customercategory'] = $value['customercategory'];
         $data[$key]['name'] = $value['name'];
         $data[$key]['sex'] = $value['sex'];
         $data[$key]['companyname2'] = F::msubstr($value['companyname']);
         $data[$key]['companyname'] = $value['companyname'];
         $data[$key]['phone'] = $value['phone'];
         $data[$key]['province'] = $value['province'];
         $data[$key]['city'] = $value['city'];
         $data[$key]['area'] = $value['area'];
         $data[$key]['address'] = F::msubstr(Area::getCity($value['province']) . Area::getCity($value['city']) . Area::getCity($value['area']));
         $data[$key]['email'] = $value['email'];
         $data[$key]['weixin'] = $value['weixin'];
         $data[$key]['QQ'] = $value['QQ'];
         $data[$key]['create_time'] = $value['create_time'];
         $data[$key]['Status'] = $value['Status'];
         $data[$key]['jiapart_ID'] = $value['jiapart_ID'];
         $data[$key]['update_time'] = $value['update_time'];
         //$data[$key]['checked']=true;
     }
     $rs = array('total' => $count, 'rows' => !empty($data) ? $data : array());
     echo json_encode($rs);
 }
开发者ID:zwq,项目名称:unpei,代码行数:66,代码来源:ContactController.php

示例7: isset

            <div style="clear:both"></div>
            <?php 
if ($data->Status > 1 && $data->Status != 5 && $data->Status != 6) {
    ?>
                <p class=" m-top20"><b>收货地址:</b>
                    <span class="m-left">
                        <?php 
    echo isset($returnaddress['ShippingName']) ? $returnaddress['ShippingName'] : '';
    ?>
,
                        <?php 
    echo isset($returnaddress['Mobile']) ? $returnaddress['Mobile'] : '';
    ?>
  ,
                        <?php 
    echo Area::getCity($returnaddress['Province']) . Area::getCity($returnaddress['City']) . Area::getCity($returnaddress['Area']) . $returnaddress['Address'];
    ?>
,
                        <?php 
    echo $returnaddress['ZipCode'];
    ?>
                    </span>
                </p>
            <?php 
}
?>
            <div style="clear:both"></div>
            <p class="m-top20"><b>订单信息</b></p>
            <ul class="mjxx m-top last">
                <li>订单类型:<span>已收货退货订单</span></li>
                <li>退货单编号:<span><?php 
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:orderinfo.php

示例8: foreach

                        <?php 
        foreach ($address as $key => $value) {
            ?>
                            <tr class="" >
                                <td class="width50">
                                    <input type="radio" name="addr" value="<?php 
            echo $address[$key]['ID'];
            ?>
"> </td>
                                <td><?php 
            echo $address[$key]['ZipCode'];
            ?>
</td>
                                <td style="width:170px;color:#666"> 
                                    <?php 
            $add = Area::getCity($address[$key]['State']) . Area::getCity($address[$key]['City']) . Area::getCity($address[$key]['District']) . $address[$key]['Address'] . "&nbsp; (" . $address[$key]['ContactName'] . ")收";
            echo $add;
            ?>
                                </td>
                                <td><?php 
            echo $value['Phone'];
            ?>
</td>
                                <td><a  href="javascript:void(0)" onclick="updateaddress(<?php 
            echo $value['ID'];
            ?>
)">修改本地址</a></td></tr>
                        <?php 
        }
        ?>
                    </tbody>
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:orderinfo.php

示例9: paypal

 public static function paypal($orderid)
 {
     //获取订单信息
     $order = PapOrder::model()->findByPk($orderid)->attributes;
     //获取卖家支付宝帐号
     $paypal = JpdFinancialPaypal::model()->find('OrganID=:ID', array(':ID' => $order['SellerID']));
     //获取订单收货地址
     $ship = self::getship($orderid);
     $payArr = array();
     $payArr['order_id'] = $order['ID'];
     //订单ID
     $payArr['out_trade_no'] = $order['OrderSN'];
     //订单编号
     $payArr['subject'] = $order["OrderName"];
     //订单名称
     $payArr['seller_email'] = $paypal['PaypalAccount'];
     //卖家的支付宝账号
     $payArr['body'] = '';
     //订单描述
     //        $payArr['price'] = $order['GoodsAmount']/$order['TotalAmount'];   //商品总价
     $payArr['price'] = $order['RealPrice'];
     //商品总价
     //        $payArr['price'] = $order['TotalAmount'];  //商品总价
     $payArr['logistics_fee'] = $order['ShipCost'];
     //物流费
     $payArr['receive_name'] = $ship['ShippingName'];
     //收货人信息
     $payArr['receive_address'] = Area::getCity($ship['Province']) . Area::getCity($ship['City']) . Area::getCity($ship['Area']) . $ship['Address'];
     $payArr['receive_zip'] = $ship['ZipCode'];
     //        $payArr['receive_phone'] = $ship['Mobile'];
     $payArr['receive_mobile'] = $ship['Mobile'];
     return $payArr;
 }
开发者ID:zwq,项目名称:unpei,代码行数:33,代码来源:OrderService.php

示例10: actionDetail

 public function actionDetail()
 {
     $serviceID = Yii::app()->user->getOrganID();
     $goodsid = Yii::app()->request->getParam('goods');
     $result = MallService::getredis($goodsid);
     //$payment = 1;
     //$result = MallService::getGoodByID($goodsid, $payment, 'mall');
     if ($result == 'null') {
         echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
         echo "<script>alert('该商品不存在!');window.location.href='" . Yii::app()->createUrl('pap/mall/index') . "'</script>";
         exit;
     } else {
         if ($result == 'nosale') {
             echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
             echo "<script>alert('该商品已下架!');window.location.href='" . Yii::app()->createUrl('pap/mall/index') . "'</script>";
             exit;
         }
     }
     $result['GoodsID'] = $result['ID'];
     $result['CommentNo'] = PapGoods::model()->findByPk($result['ID'])->attributes['CommentNo'];
     //商品折扣价
     if ($result['IsPro'] != 1) {
         $PriceRatio = MallService::getDisprice($result['OrganID'], $serviceID);
         if ($PriceRatio > 0 && $PriceRatio < 100) {
             $result['DisPrice'] = sprintf('%.2f', $result['Price'] * $PriceRatio / 100);
         }
     }
     $cookie = Yii::app()->request->getCookies();
     $car = array('make' => $cookie['mallmake']->value, 'series' => $cookie['mallseries']->value, 'year' => $cookie['mallyear']->value, 'model' => $cookie['mallmodel']->value);
     $carmodeltext = MallService::getCarmodeltxt($car);
     $res = array();
     if ($car['make'] && $car['series'] && $car['year'] && $car['model']) {
         $params = $car;
         $params['goodsid'] = $goodsid;
         $res = MallService::checkCarfit($params);
     }
     //店内分类
     $rows = $this->Getmaincate($result['OrganID']);
     $cate = $this->findsub($rows);
     //获取经销商客服列表
     $csparams['organID'] = $result['OrganID'];
     $csparams['type'] = 1;
     $csinfo = CsService::getcslists($csparams);
     //大类、子类、标准名称
     if (is_array($result['gcategory']) && !$result['gcategory']['BigName']) {
         $result['BigName'] = $result['gcategory']['BigName'];
         $result['SubName'] = $result['gcategory']['SubName'];
         $result['sub'] = $result['gcategory']['SubParts'];
     } else {
         $cpArr = MallService::getCategory($result['StandCode']);
         $result['BigName'] = $cpArr['BigParts'];
         $result['SubName'] = $cpArr['SubParts'];
         $result['sub'] = $cpArr['sub'];
     }
     //公告信息
     $model = new PapGoodsSendnotice();
     $sellerID = $result['OrganID'];
     $notice = $model->find("OrganID = {$sellerID}");
     //var_dump($data);die;
     //店家积分
     $result['TotalScore'] = DefaultService::getrecord($result['OrganID']);
     //店家信息
     $organInfo = Organ::model()->findByPk($result['OrganID'])->attributes;
     $result['Address'] = array(Area::getCity($organInfo['Province']), Area::getCity($organInfo['City']), Area::getCity($organInfo['Area']));
     $result['spec']['UnitName'] = GoodsUnit::model()->findByPk($result['spec']['Unit'])->attributes['UnitName'];
     //单位
     //最小交易金额
     $result['MinTurnover'] = PapOrderMinTurnover::model()->find("OrganID=:ID", array(":ID" => $result['OrganID']))->attributes['MinTurnover'];
     $this->pageTitle = Yii::app()->name . '-' . "商品详情";
     $this->render('detail', array('r' => $result, 'cate' => $cate, 'carmodeltext' => $carmodeltext, 'res' => $res, 'csinfo' => $csinfo, 'car' => $car, 'data' => $notice));
 }
开发者ID:zwq,项目名称:unpei,代码行数:71,代码来源:MallController.php

示例11: actionOrderGoods

 public function actionOrderGoods()
 {
     $this->layout = '//layouts/base';
     $goodsid = Yii::app()->request->getParam('goods');
     $version = Yii::app()->request->getParam('Version');
     $order = Yii::app()->request->getParam('Order');
     $return = Yii::app()->request->getParam('return');
     $quo = Yii::app()->request->getParam('quo');
     //版本信息
     $good = DealergoodsService::getmongoversion($goodsid, $version);
     $result = $good['GoodsInfo'];
     $result['SellerID'] = $result['OrganID'];
     if ($order) {
         $model = PapOrderGoods::model()->find(array('select' => 'ProPrice as Price,Quantity,MakeID,CarID,Year,ModelID', 'condition' => "OrderID={$order} and GoodsID={$goodsid}"))->attributes;
         $result['Quantity'] = $model['Quantity'];
         $result['Price'] = $model['Price'];
         $car = array('make' => $model['MakeID'], 'series' => $model['CarID'], 'year' => $model['Year'], 'model' => $model['ModelID']);
     } else {
         if ($return) {
             $model = PapReturnGoods::model()->find(array('select' => 'Price,OrderID', 'condition' => "ReturnID='{$return}' and GoodsID='{$goodsid}'"))->attributes;
             $result['Quantity'] = $model['Quantity'];
             $result['Price'] = $model['Price'];
             $ordermodel = PapOrderGoods::model()->find(array('select' => 'MakeID,CarID,Year,ModelID', 'condition' => "OrderID={$model['OrderID']} and GoodsID={$goodsid}"))->attributes;
             $car = array('make' => $ordermodel['MakeID'], 'series' => $ordermodel['CarID'], 'year' => $ordermodel['Year'], 'model' => $ordermodel['ModelID']);
         } else {
             if ($quo) {
                 $model = PapQuotationGoods::model()->findByPk($quo, array('select' => 'Price,Num', 'condition' => "GoodsID='{$goodsid}'"))->attributes;
                 $result['Quantity'] = $model['Num'];
                 $result['Price'] = $model['Price'];
             } else {
                 $this->redirect(array('index'));
             }
         }
     }
     //发货公告
     $model = new PapGoodsSendnotice();
     $notice = $model->find("OrganID = {$result['SellerID']}");
     //商品基本信息
     $result['GoodsID'] = $goodsid;
     $result['BrandName'] = $result['Brand'];
     $goods = PapGoods::model()->findByPk($goodsid, array('select' => 'IsSale,CommentNo'));
     $result['IsSale'] = $goods->attributes['IsSale'];
     $result['CommentNo'] = $goods->attributes['CommentNo'];
     if ($result['oeno']) {
         $oe = '';
         foreach ($result['oeno'] as $v) {
             $oe .= $v . ',';
         }
         $result['OENO'] = substr($oe, 0, -1);
     } else {
         $result['OENO'] = '';
     }
     //最小交易金额
     $result['MinTurnover'] = PapOrderMinTurnover::model()->find("OrganID=:ID", array(":ID" => $result['SellerID']))->attributes['MinTurnover'];
     //店家积分
     $result['TotalScore'] = DefaultService::getrecord($result['SellerID']);
     //店家信息
     $organInfo = Organ::model()->findByPk($result['SellerID'])->attributes;
     $result['OrganName'] = $organInfo['OrganName'];
     $result['QQ'] = $organInfo['QQ'];
     $result['Phone'] = $organInfo['Phone'];
     $result['Address'] = array(Area::getCity($organInfo['Province']), Area::getCity($organInfo['City']), Area::getCity($organInfo['Area']));
     //大类子类标准名称
     $result['StandCodeName'] = Gcategory::model()->find(array('select' => 'Name', 'condition' => "Code='{$result['StandCode']}'"))->attributes['Name'];
     $cpArr = MallService::getCategory($result['StandCode']);
     $result['BigName'] = $cpArr['BigParts'];
     $result['SubName'] = $cpArr['SubParts'];
     $result['sub'] = $cpArr['sub'];
     $result['ValidityType'] = $result['spec']['ValidityType'];
     $result['ValidityDate'] = $result['spec']['ValidityDate'];
     $result['BganCompany'] = $result['spec']['BganCompany'] ? $result['spec']['BganCompany'] : '';
     //标品
     $result['BganGoodsNO'] = $result['spec']['BganGoodsNO'] ? $result['spec']['BganGoodsNO'] : '';
     //标商
     $result['Unit'] = $result['spec']['Unit'] ? $result['spec']['Unit'] : '';
     //单位ID
     $result['UnitName'] = GoodsUnit::model()->findByPk($result['Unit'])->attributes['UnitName'];
     //单位
     $result['MinQuantity'] = $result['pack']['MinQuantity'] ? $result['pack']['MinQuantity'] : '';
     //最小包装
     // 图片
     if (!$result['img']) {
         $result['Images'][0]['ImageUrl'] = 'dealer/goods-img-big.jpg';
         $result['Images'][0]['BigImage'] = 'dealer/goods-img-big.jpg';
     } else {
         foreach ($result['img'] as $k => $v) {
             $result['Images'][$k]['MallImage'] = $v['MallImage'];
             $result['Images'][$k]['ImageUrl'] = $v['ImageUrl'];
             if (!$v['BigImage']) {
                 $result['Images'][$k]['BigImage'] = $v['ImageUrl'];
             } else {
                 $result['Images'][$k]['BigImage'] = $v['BigImage'];
             }
         }
     }
     if (!$result) {
         $this->redirect(array('index'));
     }
     $carmodeltext = MallService::getCarmodeltxt($car);
     $carfit = $car;
//.........这里部分代码省略.........
开发者ID:zwq,项目名称:unpei,代码行数:101,代码来源:OrderreviewController.php

示例12:

}
?>
                <br>
                <span>年销售额:</span>
                <?php 
echo $model['year_sales_volume'];
?>
                <br>
                <span>公司规模:</span>
                <?php 
echo $model['company_scale'];
?>
                <br>
                <span>经营地域:</span>
                <?php 
echo Area::getCity($model['operate_region']);
// $txtprovince['operate_region'];
?>
                <br>
                <span style="display:block;float:left;width:70px;">机构简介:</span>
                <span style=" word-break: break-all;display: block;float: left;width: 470px;overflow:auto;"><?php 
echo $model['synopsis'];
?>
</span>
            </div>
        </div>
        <div class='right-side h400 float-m  bg-white' style="width:386px;height:390px; margin-bottom: 15px">
            <div class="title title-dashed">
                联系方式
                <i class='icon-arr2r-white display-ib'></i>
            </div>
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:indexdetail.php

示例13: gettab

 public static function gettab($id)
 {
     $model = self::model()->find('id=:id', array(':id' => $id));
     return 'JH' . sprintf("%04d", $model->id) . ' ' . Area::getCity($model->province) . Area::getCity($model->city) . Area::getCity($model->area) . $model->address;
 }
开发者ID:zwq,项目名称:unpei,代码行数:5,代码来源:DealerAddress.php

示例14: getOrganinfo

 public static function getOrganinfo($ID, $Name = '')
 {
     $criteria = new CDbCriteria();
     $criteria->addCondition("ID = {$ID}");
     $model = Organ::model()->find($criteria);
     if ($Name == 'Address') {
         return Area::getCity($model->Province) . Area::getCity($model->City) . Area::getCity($model->Area) . $model->Address;
     } else {
         if ($Name == 'all') {
             $model->Area = Area::getCity($model->Province) . Area::getCity($model->City) . Area::getCity($model->Area);
             return $model;
         } else {
             return $model->{$Name};
         }
     }
 }
开发者ID:zwq,项目名称:unpei,代码行数:16,代码来源:ReturnorderService.php

示例15: getGoodByID

 public static function getGoodByID($id, $payment, $m = '')
 {
     Yii::app()->cache->flush();
     $criteria = new CDbCriteria();
     $criteria->condition = "t.ISdelete = 1 and t.OrganID!=''";
     // 上架的和没有删除的商品
     $criteria->with = array("img", 'spec', 'pack');
     $model = PapGoods::model()->findByPk($id, $criteria);
     if (!$model) {
         return false;
     } else {
         if ($model->IsSale == 0) {
             if ($m == 'mall') {
                 return 'nosale';
             } else {
                 return false;
             }
         }
     }
     $data = array();
     $sellerID = $model->OrganID;
     $discount = PapOrderDiscount::model()->find(array("condition" => " OrderType = 1"));
     if ($discount) {
         if ($payment == 1) {
             $dis = $discount['OrderAlipay'];
         } else {
             if ($payment == 2) {
                 $dis = $discount['OrderLogis'];
             }
         }
         if (isset($dis) && !empty($dis)) {
             $dis = $dis;
         } else {
             $dis = 100;
         }
     } else {
         $dis = 100;
     }
     //获取该经销商最小交易额
     $turnover = PapOrderMinTurnover::model()->find("OrganID=:ID", array(":ID" => $model['OrganID']));
     if ($turnover) {
         $data["MinTurnover"] = $turnover['MinTurnover'];
     }
     $data['Version'] = $model->Version;
     $data['discount'] = $dis;
     //商品基本信息
     $data['GoodsID'] = $id;
     $data['Name'] = $model['Name'];
     $data['GoodsNO'] = $model['GoodsNO'];
     $data['CommentNo'] = $model['CommentNo'];
     $data['Info'] = $model['Info'];
     $data['Memo'] = $model['Memo'];
     $data['IsSale'] = $model['IsSale'];
     $data['PartsLevel'] = $model['PartsLevel'];
     $data['code'] = $model['StandCode'];
     if ($model['BrandID']) {
         $sql = "select BrandName from pap_brand where ID={$model['BrandID']}";
         $res = Yii::app()->papdb->createCommand($sql)->queryRow();
     }
     $data['BrandName'] = $res['BrandName'];
     $organID = Yii::app()->user->getOrganID();
     //商品价格
     $priceRatio = self::getContactprice($model['OrganID'], $organID);
     $data['Price'] = $model['Price'];
     $data['LogisticsPrice'] = 0;
     $data['PriceRatio'] = $priceRatio['PriceRatio'] > 0 && $priceRatio['PriceRatio'] <= 100 ? $priceRatio['PriceRatio'] : 100;
     $data['DisPrice'] = sprintf("%.2f", $model['Price'] * $data['PriceRatio'] / 100);
     // 折扣价,小数点后面保留两位
     if ($model['IsPro'] == 1) {
         if (!is_null($model['ProPrice']) && $model['ProPrice']) {
             $data['ProPrice'] = $model['ProPrice'];
         }
     }
     //店家信息
     $organInfo = Organ::model()->findByPk($model['OrganID'])->attributes;
     $data['OrganName'] = $organInfo['OrganName'];
     $data['SellerID'] = $model['OrganID'];
     $data['QQ'] = $organInfo['QQ'];
     $data['Phone'] = $organInfo['Phone'];
     //$address = self::getOrganAddress($organInfo['Province'], $organInfo['City'], $organInfo['Area']);
     $data['Address'] = array(Area::getCity($organInfo['Province']), Area::getCity($organInfo['City']), Area::getCity($organInfo['Area']));
     //商品OE号
     $data['OENO'] = PapGoods::model()->getOENOSByGoodsID($id);
     //$data['LogisticsPrice'] = $goods['LogisticsPrice'];
     //商品大类、子类、标准名称
     $cpArr = self::getCategory($model['StandCode']);
     $data['BigParts'] = $cpArr['BigParts'];
     $data['SubParts'] = $cpArr['SubParts'];
     $data['CpName'] = $cpArr['CpName'];
     $data['sub'] = $cpArr['sub'];
     $data['BganCompany'] = $model->spec->BganCompany ? $model->spec->BganCompany : '';
     //标品
     $data['BganGoodsNO'] = $model->spec->BganGoodsNO ? $model->spec->BganGoodsNO : '';
     //标商
     $data['Unit'] = $model->spec->Unit ? $model->spec->Unit : '';
     //单位ID
     $data['UnitName'] = GoodsUnit::model()->findByPk($data['Unit'])->attributes['UnitName'];
     //单位
     $data['MinQuantity'] = $model->pack->MinQuantity ? $model->pack->MinQuantity : '';
     //最小包装
//.........这里部分代码省略.........
开发者ID:zwq,项目名称:unpei,代码行数:101,代码来源:MallService.php


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