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


PHP Application_Model_DbTable_DbGlobal::geVehicleById方法代码示例

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


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

示例1: createSessionBookingCityTour

 function createSessionBookingCityTour($data, $step = 1)
 {
     $this->clearSessionBYStep($step);
     $session_step = new Zend_Session_Namespace('bookcitytour');
     if ($step == 1) {
         $session_step->package_id = $data;
         $session_step->package_name = $this->getPackageCityTourById($data);
         $session_step->max_hour = $this->getMaxHourByPackageId($data);
         //to show max hour in front
         $session_step->step1 = 1;
         $session_step->step2 = 0;
         $session_step->step3 = 0;
         $session_step->step4 = 0;
         $session_step->point_step = 1;
     } elseif ($step == 2) {
         $session_step->point_step = 2;
         $data['return_date'] = $data['pickup_date'];
         $session_step->pickup_date = empty($data['pickup_date']) ? null : $data['pickup_date'];
         $session_step->pickup_time = empty($data['pickup_time']) ? null : $data['pickup_time'];
         $session_step->pickup_mins = empty($data['pickup_mins']) ? null : $data['pickup_mins'];
         $session_step->step2 = 1;
         $session_step->return_date = empty($data['return_date']) ? null : $data['return_date'];
         $session_step->return_time = empty($data['return_time']) ? null : $data['return_time'];
         $session_step->return_mins = empty($data['return_mins']) ? null : $data['return_mins'];
         $db = new Application_Model_DbTable_DbGlobal();
         $session_step->vehiclevaliable = $db->getAllAvailableVehicle($data);
     } elseif ($step == 3) {
         $session_step->point_step = 3;
         $session_step->step3 = 1;
         $session_step->vehicle_id = $data;
         //$data get parram store value only not array
         $session_step->price = $this->getPriceBYPackageandVehicle($data, $session_step->package_id);
         $db = new Application_Model_DbTable_DbGlobal();
         $array = array('pickup_date' => $session_step->pickup_date, 'return_date' => $session_step->pickup_date, 'return_time' => $session_step->pickup_time . ":" . $session_step->pickup_mins);
         $session_step->guideavaliable = $db->getAvailableDriver($array);
         $row = $db->geVehicleById($data);
         $session_step->vehicle_name = $row["make"] . " " . $row["model"] . " " . $row["sub_model"];
         $session_step->reff = $row["reffer"];
     } elseif ($step == 4) {
         $session_step->point_step = 4;
         $session_step->step4 = 1;
         if (!empty($data)) {
             //if select guide/
             $row = $this->getGuideNormalPrice($data);
             $guideprice = $row['c_normalprice'];
             $guidename = $row['first_name'] . '-' . $row['last_name'];
             $guide_id = $row["id"];
             //$session_step->guide_id =$guide_id;
         } else {
             $guideprice = 0;
             $guidename = 'None';
             $guide_id = 'None';
         }
         $session_step->guidename = $guidename;
         $session_step->guideprice = $guideprice;
         $session_step->guideid = $guide_id;
     } elseif ($step == 5) {
         $session_step->point_step = 5;
         $session_step->step5 = 1;
     } elseif ($step == 6) {
         $session_step->point_step = 6;
         $session_step->step6 = 1;
     }
     return true;
     // 		if(!empty($session_step_one->step2)){
     // 			$session_step_one->vehicle_id=$data['vehicle_id'];
     // 		}
     // 		$session_step_one->step2 = null;
     // 		$session_step_one->step3 = null;
 }
开发者ID:samlanh,项目名称:lynacr,代码行数:70,代码来源:Dbbookingcitytour.php

示例2: vehicleAction

 public function vehicleAction()
 {
     $id = $this->getRequest()->getParam("id");
     $db = new Application_Model_DbTable_DbGlobal();
     $data = $db->geVehicleById($id);
     $this->view->showdata = $data;
     $this->view->rows = $db->getallSemilarVehicle();
 }
开发者ID:samlanh,项目名称:lynacr,代码行数:8,代码来源:IndexController.php

示例3: createSessionTaxiBooking

 function createSessionTaxiBooking($data, $step = 1)
 {
     // 		$this->clearSessionBYStep($step);
     $session = new Zend_Session_Namespace('taxibooking');
     if ($step == 1) {
         $session->point_step = 1;
         $session->step1 = 1;
         $session->step2 = 0;
         $session->step3 = 0;
         $session->step4 = 0;
         $data['return_date'] = $data['pickup_date'];
         // 			$data['return_time']=$data['pickup_time'].":".$data['pickup_mins'];//must get max hour plus with pick up
         $session->pickup_date = empty($data['pickup_date']) ? null : $data['pickup_date'];
         $session->pickup_time = empty($data['pickup_time']) ? null : $data['pickup_time'];
         $session->pickup_mins = empty($data['pickup_mins']) ? null : $data['pickup_mins'];
         $session->return_date = empty($data['return_date']) ? null : $data['return_date'];
         $session->return_time = empty($data['return_time']) ? null : $data['return_time'];
         // 			$session->return_mins =empty($data['return_mins'])? null : $data['return_mins'];
         $session->from_location = empty($data['from_location']) ? 0 : $data['from_location'];
         $session->to_location = empty($data['to_location']) ? 0 : $data['to_location'];
         $session->trip_way = $data['trip_way'];
         $session->from_locationname = $this->getLocationNameById($data['from_location']);
         $session->to_locationname = $this->getLocationNameById($data['to_location']);
         $db = new Application_Model_DbTable_DbGlobal();
         $session->vehiclevaliable = $db->getAllAvailableVehicle($data);
     } elseif ($step == 2) {
         $session->point_step = 2;
         $session->step2 = 1;
         $session->vehicle_id = $data;
         //$data get parram store value only not array
         $row = $this->getTaxiPriceByLocation($data, $session->from_location, $session->to_location);
         if ($session->trip_way == 1) {
             $taxiprice = $row['price'] + $row['price'] * $row['tax'] / 100;
         } else {
             $taxiprice = $row['round_trip'] + $row['round_trip'] * $row['tax'] / 100;
         }
         $session->taxi_price = $taxiprice;
         $db = new Application_Model_DbTable_DbGlobal();
         $array = array('pickup_date' => $session->pickup_date, 'return_date' => $session->pickup_date, 'return_time' => $session->pickup_time . ":" . $session->pickup_mins);
         $session->guideavaliable = $db->getAvailableDriver($array);
         $row = $db->geVehicleById($data);
         $session->vehicle_name = $row["make"] . " " . $row["model"] . " " . $row["sub_model"] . "(" . $row["reffer"] . ")";
         $session->time = $this->getTimeArrived($data, $session->from_location, $session->to_location);
     } elseif ($step == 3) {
         $session->point_step = 3;
         $session->step3 = 1;
         $session_user = new Zend_Session_Namespace('customer');
         $session->user_id = $session_user->customer_id;
         $session->user_name = $session_user->customer_name;
     } elseif ($step == 4) {
         $session->point_step = 4;
         $session->step4 = 1;
     }
     return true;
 }
开发者ID:samlanh,项目名称:lynacr,代码行数:55,代码来源:Dbbookingtaxi.php


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