示例#1
0
文件: promotions.php 项目: zwq/unpei
 ?>
                                     <?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 
示例#2
0
 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);
         }
     }
 }
示例#3
0
文件: Goods.php 项目: zwq/unpei
 public static function getVechileByVID($vid)
 {
     $model = GoodsBrand::model()->findByPk($vid);
     return $model->name . $model->car;
 }
示例#4
0
</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++;
        ?>
示例#5
0
文件: service.php 项目: zwq/unpei
<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">关键词:&nbsp;&nbsp;</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">地&nbsp;&nbsp;区:&nbsp;&nbsp;</label>
				<?php 
$state_data = Area::model()->findAll("grade=:grade", array(":grade" => 1));
示例#6
0
 /**
  * 获取适用车系
  */
 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;
 }
示例#7
0
 /**
  * 根据用户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;
 }
示例#8
0
文件: addpomotion.php 项目: zwq/unpei
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>