Ejemplo n.º 1
0
                                 <td><?php 
 // echo !empty($model['BusinessCate']) ? F::msubstr($model['BusinessCate'],0,0)  : "暂无"
 ?>
                                     <?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'])) {
Ejemplo n.º 2
0
 public function actionDeletevehicle()
 {
     $cateid = $_GET['cateid'];
     $model = DealerVehicle::model()->findByPk($cateid)->delete();
     echo json_decode($model);
 }
Ejemplo n.º 3
0
Archivo: index.php Proyecto: zwq/unpei
                $brands .= '、';
            }
            ?>
                                <?php 
        }
        ?>
                                <?php 
        echo F::msubstr($brands);
        $brands = '';
        ?>
</td>
                            <td>
                                <?php 
        $dealerid = $dealer['userID'];
        if (!empty($dealerid)) {
            $dealerv = DealerVehicle::model()->findAll('userid =' . $dealerid);
            ?>
                                    <?php 
            if (!empty($dealerv)) {
                ?>
                                        <?php 
                foreach ($dealerv as $k => $showvehicle) {
                    ?>
                                            <?php 
                    $makeName = D::queryGoodsMakeInfo($showvehicle['businessMake']);
                    $carsinfo .= $makeName['makeName'] . ' ';
                    ?>
 <?php 
                    $carinfo = D::queryGoodsSeriesInfo($showvehicle['businessCar']);
                    $carsinfo .= $carinfo['seriesName'] . ' ';
                    $carsinfo .= $showvehicle['businessYear'] ? $showvehicle['businessYear'] . ' ' : '';
Ejemplo n.º 4
0
 public function actionDetail()
 {
     $model = Dealer::model()->find("userID=:userID", array(":userID" => $_GET['dealer']));
     // 机构照片
     $organphotoSql = "select id, photoName from tbl_dealer_organphoto where dealerID = " . $_GET['dealer'];
     $organphotos = DBUtil::queryAll($organphotoSql);
     $brands = DealerBrand::model()->findAll("OrganID = {$_GET['dealer']}");
     $data = array();
     foreach ($brands as $key => $brand) {
         $data[$key]['brandname'] = $brand['BrandName'];
     }
     //主营车系
     $dealerv = DealerVehicle::model()->findAll("userID=:userID", array(":userID" => $_GET['dealer']));
     //主营品类
     $cpnames = DealerCpname::model()->findAll("OrganID=:userID", array(":userID" => $_GET['dealer']));
     $this->render("detail", array('model' => $model, 'organphotos' => $organphotos, 'dealerv' => $dealerv, 'cpnames' => $cpnames, 'data' => $data));
 }
Ejemplo n.º 5
0
 public function actionDeletevehicle()
 {
     $cateid = $_GET['cateid'];
     //$sql = "delete from jpd_dealer_vehicle where id= $cateid";
     $model = DealerVehicle::model()->findByPk($cateid)->delete();
     //$result = DBUtil::execute($sql);
     echo json_decode($model);
     //echo 1;
 }