?> <?php $cpnames = MakeOrganGroupRelation::model()->findAll("userID=" . $model['userID']); //echo $model['userID']; foreach ($cpnames as $cpname) { // $cpname['father_code'].' '. $cp .= $cpname['children_code'] . ','; } echo F::msubstr($cp); $cp = ''; ?> </td> <td><?php $dealerv = DealerVehicle::model()->findAll('userid =' . $model['userID']); foreach ($dealerv as $transports) { $cars .= GoodsBrand::getName($transports['businessCar']) . ' ' . GoodsBrand::getCar($transports['businessCarModel']) . ','; } echo F::msubstr($cars, 0, 0); $cars = ''; ?> </td> <td> <?php echo !empty($model['BusinessBrand']) ? F::msubstr($model['BusinessBrand'], 0, 0) : "暂无"; ?> </td> <td> <?php if (!empty($model['userID'])) { ?> <a target="_blank" href='<?php
public function actionGetyearbyid() { echo CHtml::tag("option", array("value" => ''), '请选择年款', true); if ($_GET["car"]) { $brand = GoodsBrand::model()->find('id=' . $_GET['car']); $data = GoodsBrand::model()->findAll("car=:car", array(":car" => $brand['car'])); $data = CHtml::listData($data, "id", "year"); foreach ($data as $value => $name) { echo CHtml::tag("option", array("value" => $value), CHtml::encode($name), true); } } }
public static function getVechileByVID($vid) { $model = GoodsBrand::model()->findByPk($vid); return $model->name . $model->car; }
</td> <td ><?php echo $product['partsLevel']; ?> </td> <td > <?php echo F::msubstr($product['OENO']); // ?> </td> <td > <?php $vehicles = DealerParts::model()->findAll('pgoods_id=:pgoods_id', array('pgoods_id' => $product['id'])); foreach ($vehicles as $vehicle) { $veh .= GoodsBrand::getName($vehicle['maincate']) . GoodsBrand::getCar($vehicle['subcate']) . '-'; } echo F::msubstr($veh); $veh = ''; ?> </td> <td><?php echo F::msubstr($product['youhui'], 0, 8); //$product['youhui'] ?> </td> </tr> <?php $i++; ?>
<div class='width998 content'> <?php include 'tabs_active.php'; ?> <?php //获取汽车品牌信息 //$brand_data=TransportMake::model()->findAll(); //$brand=CHtml::listData($brand_data,"Code","Make"); $brand_data = GoodsBrand::getBrand(); $brand = CHtml::listData($brand_data, "id", "name"); ?> <div class="form-list"> <form action="<?php echo Yii::app()->createUrl("dealer/makequery/servicersearch"); ?> " method="get" name="queryForm" > <p class='form-row'> <label class="label">关键词: </label> <input class="width248 input" type="text" name="keyWord" value="<?php if ($search['keyword']) { echo $search['keyword']; } else { echo "机构名称或关键词"; } ?> " onfocus="if (value =='机构名称或关键词'){this.style.color='#000'; value =''}" onblur="if (value ==''){this.style.color='#999'; value='机构名称或关键词'}"> </p> <p class='form-row'> <label class="label">地 区: </label> <?php $state_data = Area::model()->findAll("grade=:grade", array(":grade" => 1));
/** * 获取适用车系 */ private function getcar($goodsID) { $showvehicles = DealerParts::model()->findAll('pgoods_id=' . $goodsID); if (!empty($showvehicles)) { foreach ($showvehicles as $showvehicle) { $car .= GoodsBrand::getName($showvehicle['maincate']) . '-' . GoodsBrand::getCar($showvehicle['subcate']) . ';'; } } return $car; }
/** * 根据用户ID取出所有主营车系 * Enter description here ... * @param unknown_type $userID */ public static function getVehAll($userID) { $models = self::model()->findAll("userID=:userID", array(":userID" => $userID)); $i = 1; $vehicle = ""; foreach ($models as $key => $value) { if ($i == 1) { //$vehicle=TransportMake::getMake($value->businessCar).TransportCar::getCar($value->businessCarModel); $vehicle = GoodsBrand::getName($value->businessCar) . GoodsBrand::getCar($value->businessCarModel); } else { $vehicle .= ',' . GoodsBrand::getName($value->businessCar) . GoodsBrand::getCar($value->businessCarModel); } $i++; } return $vehicle; }
if (isset($_GET['id'])) { ?> <?php $showvehicles = DealerParts::model()->findAll('pgoods_id=' . $_GET['id']); ?> <?php if (!empty($showvehicles)) { ?> <?php foreach ($showvehicles as $showvehicle) { ?> <span class='checkbox-add bg-green tag-close catespan'><span><?php GoodsBrand::showName($showvehicle['maincate']); ?> </span>-<span name='model'><?php GoodsBrand::showCar($showvehicle['subcate']); ?> </span><span onclick='xxVehicle(this)' key="<?php echo $showvehicle['id']; ?> " class='close icon-close-green xx'></span></span> <?php } ?> <?php } ?> <?php } ?> </p>