MODPATH/database/classes/kohana/database/pdo.php [ 160 ]
155 // This benchmark is worthless
156 Profiler::delete($benchmark);
157 }
158
159 // Convert the exception in a database exception
160 throw new Database_Exception(':error [ :query ]',
161 array(
162 ':error' => $e->getMessage(),
163 ':query' => $sql
164 ),
165 $e->getCode());
-
MODPATH/database/classes/kohana/database/query.php [ 275 ] » Kohana_Database_PDO->query(arguments)
0
integer 1
1
string(79) "SELECT * FROM `sline_spot_ticket_price` WHERE ticketid= AND `day` >= 1711641600"
2
bool FALSE
3
array(0)
270 return new Database_Result_Cached($result, $sql, $as_object, $object_params); 271 } 272 } 273 274 // Execute the query 275 $result = $db->query($this->_type, $sql, $as_object, $object_params); 276 277 if (isset($cache_key) AND $this->_lifetime > 0) 278 { 279 // Cache the result array 280 Kohana::cache($cache_key, $result->as_array(), $this->_lifetime);
-
DOCROOT/plugins/spot/classes/model/spot/ticket/price.php [ 57 ] » Kohana_Database_Query->execute()
52 */ 53 public static function get_price_status($suit) 54 { 55 $suitid=$suit['id']; 56 $day=strtotime(date('Y-m-d',time()+intval($suit["day_before"])*24*3600)); 57 $arr = DB::select()->from('spot_ticket_price')->where("ticketid=$suitid")->and_where('day', '>=', $day)->execute()->as_array(); 58 //存在报价 59 if(!empty($arr)) 60 { 61 //有库存 62 $arr2 = DB::select()->from('spot_ticket_price')->where("ticketid=$suitid")->and_where('day', '>=', $day)->and_where('number', '!=', 0)->execute()->as_array();
-
DOCROOT/plugins/spot/classes/model/spot/suit.php [ 38 ] » Model_Spot_Ticket_Price::get_price_status(arguments)
0
array(47) ( "id" => NULL "spotid" => NULL "title" => NULL "tickettypeid" => NULL "sellprice" => integer 0 "ourprice" => integer 0 "memberdayprice" => NULL "paytype" => NULL "award" => NULL "description" => NULL "addtime" => NULL "modtime" => NULL "displayorder" => NULL "number" => NULL "bnum" => NULL "mnum" => NULL "buylimitnummin" => NULL "buylimitnummax" => NULL "iscanrefund" => NULL "refundBeforeValidEndDay" => NULL "refundInfo" => NULL "eticketType" => NULL "eticketsmssign" => NULL "eticketsmstemplet" => NULL "startdate" => NULL "enddate" => NULL "jifencomment" => NULL "jifentprice" => NULL "jifenbook" => NULL "dingjin" => NULL "lastoffer" => NULL "day_before" => NULL "hour_before" => NULL "minute_before" => NULL "supplierlist" => NULL "need_confirm" => NULL "pay_way" => NULL "auto_close_time" => NULL "status" => NULL "get_ticket_way" => NULL "effective_days" => NULL "refund_restriction" => NULL "refuse_msg" => NULL "fill_tourer_type" => NULL "fill_tourer_items" => NULL "create_type" => NULL "interface_code" => NULL )
33 } 34 $priceArr = Model_Spot::get_minprice($v['spotid'], $v['id']); 35 $v['ourprice'] = $priceArr['price'];//最低价 36 $v['sellprice'] = $priceArr['sellprice'];//原价 37 //报价状态 38 $price_status=Model_Spot_Ticket_Price::get_price_status($v); 39 $v['price_status'] = $price_status; 40 $tickettype_name = DB::select('kindname')->from('spot_ticket_type')->where('id','=',$v['tickettypeid'])->execute()->get('kindname'); 41 $v['tickettype_name'] = $tickettype_name; 42 $v['paytype_name'] = Model_Member_Order::get_paytype_name($v['paytype']); 43 $v['day_before_des']='';
-
DOCROOT/plugins/spot/classes/model/spot/suit.php [ 14 ] » Model_Spot_Suit::format_suit_info(arguments)
0
array(1) ( 0 => array(47) ( "id" => NULL "spotid" => NULL "title" => NULL "tickettypeid" => NULL "sellprice" => integer 0 "ourprice" => integer 0 "memberdayprice" => NULL "paytype" => NULL "award" => NULL "description" => NULL "addtime" => NULL "modtime" => NULL "displayorder" => NULL "number" => NULL "bnum" => NULL "mnum" => NULL "buylimitnummin" => NULL "buylimitnummax" => NULL "iscanrefund" => NULL "refundBeforeValidEndDay" => NULL "refundInfo" => NULL "eticketType" => NULL "eticketsmssign" => NULL "eticketsmstemplet" => NULL "startdate" => NULL "enddate" => NULL "jifencomment" => NULL "jifentprice" => NULL "jifenbook" => NULL "dingjin" => NULL "lastoffer" => NULL "day_before" => NULL "hour_before" => NULL "minute_before" => NULL "supplierlist" => NULL "need_confirm" => NULL "pay_way" => NULL "auto_close_time" => NULL "status" => NULL "get_ticket_way" => NULL "effective_days" => NULL "refund_restriction" => NULL "refuse_msg" => NULL "fill_tourer_type" => NULL "fill_tourer_items" => NULL "create_type" => NULL "interface_code" => NULL ) )
9 * @return array 10 */ 11 public static function suit_info($suitId) 12 { 13 $suit = ORM::factory('spot_ticket',$suitId)->as_array(); 14 $suit_formats=self::format_suit_info(array($suit)); 15 $suit=$suit_formats[0]; 16 $suit['dingjin'] = Currency_Tool::price($suit['dingjin']); 17 $suit['paytype_name'] = Model_Member_Order::get_paytype_name($suit['paytype']); 18 $tickettype_name = DB::select('kindname')->from('spot_ticket_type')->where('id','=',$suit['tickettypeid'])->execute()->get('kindname'); 19 $suit['tickettype_name'] = $tickettype_name;
-
DOCROOT/plugins/spot/classes/controller/pc/spot.php [ 151 ] » Model_Spot_Suit::suit_info(arguments)
0
string(3) "303"
146 //防止空提交 147 if (empty($productId) || empty($suitId)) { 148 $this->request->redirect($this->request->referrer()); 149 } 150 //套餐信息 151 $suitInfo = Model_Spot_Suit::suit_info($suitId); 152 //预订日期 153 $useDate = Arr::get($_GET, 'usedate'); 154 $cur_time = time(); 155 if (is_null($useDate)) { 156 $sql = "select * from sline_spot_ticket_price a left join sline_spot_ticket b on a.ticketid=b.id where a.ticketid='{$suitId}' and a.number!=0 and a.day>({$cur_time}+b.day_before*24*3600-case when (b.hour_before=0 and b.minute_before=0) then 24*3600 else (3600*b.hour_before+b.minute_before*60) end) order by a.day asc limit 1";
-
{PHP internal call} » Controller_Pc_Spot->action_book()
-
SYSPATH/classes/kohana/request/client/internal.php [ 116 ] » ReflectionMethod->invoke(arguments)
0
object Controller_Pc_Spot(7)
{ private _typeid => integer 5 private _cache_key => string(56) "http://www.tycts.com/spot/book/?suitid=303&productid=165" protected cmsurl => string(1) "/" public _data => array(4) ( "cmsurl" => string(1) "/" "webname" => string(24) "太原市中国旅行社" "typeid" => integer 5 "channelname" => string(6) "门票" ) public params => array(1) ( "" => integer 0 ) public request => object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
public response => object Response(5){ protected _callback => NULL protected _uri => string(26) "spot(/<action>(/<params>))" protected _regex => array(1) ( "params" => string(2) ".*" ) protected _defaults => array(3) ( "action" => string(5) "index" "controller" => string(4) "spot" "directory" => string(2) "pc" ) protected _route_regex => string(60) "#^spot(?:/(?P<action>[^/.,;?\n]++)(?:/(?P<params>.*))?)?$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }{ }
protected _body => NULL protected _directory => string(2) "pc" protected _controller => string(4) "spot" protected _action => string(4) "book" protected _uri => string(9) "spot/book" protected _external => bool FALSE protected _params => array(0) protected _get => array(2) ( "suitid" => string(3) "303" "productid" => string(3) "165" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}{ protected _status => integer 200 protected _header => object HTTP_Header(0)
}{ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }111 throw new HTTP_Exception_404('The requested URL :uri was not found on this server.', 112 array(':uri' => $request->uri())); 113 } 114 115 $method = $class->getMethod('action_'.$action); 116 $method->invoke($controller); 117 118 // Execute the "after action" method 119 $class->getMethod('after')->invoke($controller); 120 } 121 catch (Exception $e)
-
SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)
0
object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _callback => NULL protected _uri => string(26) "spot(/<action>(/<params>))" protected _regex => array(1) ( "params" => string(2) ".*" ) protected _defaults => array(3) ( "action" => string(5) "index" "controller" => string(4) "spot" "directory" => string(2) "pc" ) protected _route_regex => string(60) "#^spot(?:/(?P<action>[^/.,;?\n]++)(?:/(?P<params>.*))?)?$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }{ }
protected _body => NULL protected _directory => string(2) "pc" protected _controller => string(4) "spot" protected _action => string(4) "book" protected _uri => string(9) "spot/book" protected _external => bool FALSE protected _params => array(0) protected _get => array(2) ( "suitid" => string(3) "303" "productid" => string(3) "165" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}59 public function execute(Request $request) 60 { 61 if ($this->_cache instanceof HTTP_Cache) 62 return $this->_cache->execute($this, $request); 63 64 return $this->execute_request($request); 65 } 66 67 /** 68 * Processes the request passed to it and returns the response from 69 * the URI resource identified.
-
SYSPATH/classes/kohana/request.php [ 1160 ] » Kohana_Request_Client->execute(arguments)
0
object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _callback => NULL protected _uri => string(26) "spot(/<action>(/<params>))" protected _regex => array(1) ( "params" => string(2) ".*" ) protected _defaults => array(3) ( "action" => string(5) "index" "controller" => string(4) "spot" "directory" => string(2) "pc" ) protected _route_regex => string(60) "#^spot(?:/(?P<action>[^/.,;?\n]++)(?:/(?P<params>.*))?)?$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }{ }
protected _body => NULL protected _directory => string(2) "pc" protected _controller => string(4) "spot" protected _action => string(4) "book" protected _uri => string(9) "spot/book" protected _external => bool FALSE protected _params => array(0) protected _get => array(2) ( "suitid" => string(3) "303" "productid" => string(3) "165" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}1155 throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', array( 1156 ':uri' => $this->_uri, 1157 )); 1158 } 1159 1160 return $this->_client->execute($this); 1161 } 1162 1163 /** 1164 * Returns whether this request is the initial request Kohana received. 1165 * Can be used to test for sub requests.
-
DOCROOT/index.php [ 135 ] » Kohana_Request->execute()
130 /** 131 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 132 * If no source is specified, the URI will be automatically detected. 133 */ 134 echo Request::factory() 135 ->execute() 136 ->send_headers(TRUE) 137 ->body(); 138 139 }