/homepages/46/d829343105/htdocs/letstravel/en_ly/protected/controllers/TopController.php(1347)
1335 // //} 1336 // 1337 // } 1338 // 1339 // 1340 // 1341 //return $rate; 1342 //} 1343 1344 //使用雅虎实时汇率接口 1345 function ExchangeRate($from_Currency,$to_Currency) 1346 { 1347 header("Content-type: textml; charset=utf-8"); 1348 /* 雅虎汇率已挂 1349 $rate = Yii::app()->cache->get($from_Currency.'_'.$to_Currency); 1350 if($rate===false){ 1351 $all=$from_Currency.$to_Currency; 1352 $file = fopen("http://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=$all=x",'r'); //参数s=EURCNY, 欧元换人民币, 根据需要更换 1353 while ($data = fgetcsv($file)) //读取CSV文件里的每一行内容 1354 { 1355 $goods_list[] = $data; 1356 } 1357 $shijian = $goods_list[0][2] .' '. $goods_list[0][3]; //根据 quotes.csv文件得到的数据, 当前时间 在3,4列位置 1358 $rate = $goods_list[0][1]; 1359 //根据 quotes.csv文件得到的数据, 汇率 在2列位置
#0 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/protected/controllers/TopController.php(1347): header("Content-type: textml; charset=utf-8") 1342 //} 1343 1344 //使用雅虎实时汇率接口 1345 function ExchangeRate($from_Currency,$to_Currency) 1346 { 1347 header("Content-type: textml; charset=utf-8"); 1348 /* 雅虎汇率已挂 1349 $rate = Yii::app()->cache->get($from_Currency.'_'.$to_Currency); 1350 if($rate===false){ 1351 $all=$from_Currency.$to_Currency; 1352 $file = fopen("http://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=$all=x",'r'); //参数s=EURCNY, 欧元换人民币, 根据需要更换 |
#1 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/protected/controllers/TopController.php(1154): TopController->ExchangeRate("USD", "GBP") 1149 }else{ 1150 if($rateConfigModel){ 1151 1152 if($rateConfigModel->autochange == 1){//使用实时汇率 1153 //echo '/2'; 1154 $rate = $this->ExchangeRate($from_Currency,$to_Currency);//暂时关闭 1155 1156 if(!$rate){ 1157 1158 $rateModel = Rate::model()->find(array('select'=>'rate','condition'=>"code='$to_Currency'")); 1159 $rate = $rateModel->rate; |
#2 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/protected/controllers/MarketController.php(111): TopController->getRateValue("USD", "GBP") 106 $usd=DaytripsOrder::model()->findAll(array('condition'=>"status=1 and rate='USD'")); 107 $eur=DaytripsOrder::model()->findAll(array('condition'=>"status=1 and rate='EUR'")); 108 $GBP=$this->addall($gbp); 109 $USD=$this->addall($usd); 110 $EUR=$this->addall($eur); 111 $haspay=$GBP+$this->getRateValue('USD','GBP')*$USD+$this->getRateValue('EUR','GBP')*$EUR; 112 $setamount=DaytripsAmount::model()->find(1); 113 if($setamount && $setamount->status==1){ 114 $addamount=$setamount->amount; 115 }else{ 116 $addamount=0; |
#3 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/framework/web/actions/CInlineAction.php(49): MarketController->actionPwyc() 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 else 49 return $controller->$methodName(); 50 } 51 52 } |
#4 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/framework/web/CController.php(308): CInlineAction->runWithParams(array()) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#5 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/framework/web/CController.php(286): CController->runAction(CInlineAction) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#6 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#7 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/framework/web/CWebApplication.php(282): CController->run("pwyc") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#8 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/framework/web/CWebApplication.php(141): CWebApplication->runController("market/pwyc") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#9 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/framework/base/CApplication.php(180): CWebApplication->processRequest() 175 public function run() 176 { 177 if($this->hasEventHandler('onBeginRequest')) 178 $this->onBeginRequest(new CEvent($this)); 179 register_shutdown_function(array($this,'end'),0,false); 180 $this->processRequest(); 181 if($this->hasEventHandler('onEndRequest')) 182 $this->onEndRequest(new CEvent($this)); 183 } 184 185 /** |
#10 |
+
–
/homepages/46/d829343105/htdocs/letstravel/en_ly/index.php(14): CApplication->run() 09 defined('YII_DEBUG') or define('YII_DEBUG',true); 10 // specify how many levels of call stack should be shown in each log message 11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 12 13 require_once($yii); 14 Yii::createWebApplication($config)->run(); 15 16 17 function isRedirect($redirecturl) 18 { 19 if(isset($_COOKIE['letsravel_area'])){ |