/data/travel_from_112_124_34_134/travel/front/protected/modules/user/models/Member.php(22)
10 * Returns the static model of the specified AR class. 11 * @param string $className active record class name. 12 * @return Content the static model class 13 */ 14 public static function model($className = __CLASS__) { 15 return parent::model($className); 16 } 17 18 /** 19 * @return string the associated database table name 20 */ 21 public function tableName() { 22 return Yii::app()->dbu->tablePrefix.'member'; 23 } 24 25 /** 26 * 添加数据 27 * @return void 28 */ 29 public function add($data) { 30 $command = parent::$dbu->createCommand(); 31 try { 32 $command->insert(self::model()->tableName(),$data); 33 return Yii::app()->dbu->getLastInsertId(); 34 }catch (Exception $e) {
#0 |
+
–
/data/travel_from_112_124_34_134/travel/framework/db/CDbConnection.php(331): CDbConnection->open() 326 public function setActive($value) 327 { 328 if($value!=$this->_active) 329 { 330 if($value) 331 $this->open(); 332 else 333 $this->close(); 334 } 335 } 336 |
#1 |
+
–
/data/travel_from_112_124_34_134/travel/framework/db/CDbConnection.php(309): CDbConnection->setActive(true) 304 */ 305 public function init() 306 { 307 parent::init(); 308 if($this->autoConnect) 309 $this->setActive(true); 310 } 311 312 /** 313 * Returns whether the DB connection is established. 314 * @return boolean whether the DB connection is established |
#2 |
+
–
/data/travel_from_112_124_34_134/travel/framework/base/CModule.php(388): CDbConnection->init() 383 if(!isset($config['enabled']) || $config['enabled']) 384 { 385 Yii::trace("Loading \"$id\" application component",'system.CModule'); 386 unset($config['enabled']); 387 $component=Yii::createComponent($config); 388 $component->init(); 389 return $this->_components[$id]=$component; 390 } 391 } 392 } 393 |
#3 |
+
–
/data/travel_from_112_124_34_134/travel/framework/base/CModule.php(104): CModule->getComponent("dbu") 099 * @return mixed the named property value 100 */ 101 public function __get($name) 102 { 103 if($this->hasComponent($name)) 104 return $this->getComponent($name); 105 else 106 return parent::__get($name); 107 } 108 109 /** |
#4 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/modules/user/models/Member.php(22): CModule->__get("dbu") 17 18 /** 19 * @return string the associated database table name 20 */ 21 public function tableName() { 22 return Yii::app()->dbu->tablePrefix.'member'; 23 } 24 25 /** 26 * 添加数据 27 * @return void |
#5 |
+
–
/data/travel_from_112_124_34_134/travel/framework/db/ar/CActiveRecord.php(2262): Member->tableName() 2257 */ 2258 public function __construct($model) 2259 { 2260 $this->_model=$model; 2261 2262 $tableName=$model->tableName(); 2263 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2264 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2265 array('{class}'=>get_class($model),'{table}'=>$tableName))); 2266 if($table->primaryKey===null) 2267 { |
#6 |
+
–
/data/travel_from_112_124_34_134/travel/framework/db/ar/CActiveRecord.php(379): CActiveRecordMetaData->__construct(Member) 374 if(isset(self::$_models[$className])) 375 return self::$_models[$className]; 376 else 377 { 378 $model=self::$_models[$className]=new $className(null); 379 $model->_md=new CActiveRecordMetaData($model); 380 $model->attachBehaviors($model->behaviors()); 381 return $model; 382 } 383 } 384 |
#7 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/modules/user/models/Member.php(15): CActiveRecord::model("Member") 10 * Returns the static model of the specified AR class. 11 * @param string $className active record class name. 12 * @return Content the static model class 13 */ 14 public static function model($className = __CLASS__) { 15 return parent::model($className); 16 } 17 18 /** 19 * @return string the associated database table name 20 */ |
#8 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/modules/show/models/Comment.php(144): Member::model() 139 $res = $this->get($params); 140 return $res; 141 } 142 143 public function get($params){ 144 $sql = " FROM ".self::model()->tableName()." AS c LEFT JOIN ".Member::model()->tableName()." AS m"; 145 $sql .= " ON c.user_id = m.id WHERE c.status = 1 AND c.parent_id = 0"; 146 if(!empty ($params['contentId'])){ 147 $sql .= " AND c.content_id = {$params['contentId']}"; 148 } 149 if(!empty($params['or_type'])) { |
#9 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/modules/show/models/Comment.php(139): Comment->get(array("_with_replies" => 1, "_start" => 0, "or_type" => "c", "_limit" => 6, ...)) 134 $params['_limit'] = $limit; 135 if(!isset($params['star'])) { 136 $params['star'] = 0; 137 } 138 $params['contentId'] = $contentId; 139 $res = $this->get($params); 140 return $res; 141 } 142 143 public function get($params){ 144 $sql = " FROM ".self::model()->tableName()." AS c LEFT JOIN ".Member::model()->tableName()." AS m"; |
#10 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/models/CommentShow.php(38): Comment->getCommentsByContentId("12197", "c", array("_with_replies" => 1)) 33 } 34 //显示评论的模板 35 public function showComment() { 36 $a_params = array(); 37 $a_params['_with_replies'] = 1; 38 $a_comment_list['list'] = Comment::model()->getCommentsByContentId($this->i_content_id, $this->or_type, $a_params); 39 $a_comment_list['list']['content_id'] = $this->i_content_id; 40 $a_comment_list['list']['userid'] = $this->userid; 41 $a_comment_list['list']['or_type'] = $this->or_type; 42 //星星和带图片的评论统计 43 $a_comment_list['list']['star'] = $this->showCommentTotal(); |
#11 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/models/CommentShow.php(25): CommentShow->showComment() 20 **/ 21 public function showView($name) { 22 if($name == 'addcomment') { 23 $this->showAddCommentView($this->userid, $this->i_content_id, $this->or_type); 24 }else { 25 $this->showComment(); 26 } 27 } 28 29 //显示添加评论的模板 30 public function showAddCommentView($userid, $i_content_id,$or_type) { |
#12 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/models/CommentShow.php(13): CommentShow->showView("") 08 public $i_content_id; 09 public $viewname = ''; 10 public $userid = ''; 11 public $or_type = ''; 12 public function run(){ 13 $this->showView($this->viewname); 14 } 15 /*显示对应的模板 16 * 17 * $name = 'addcomment' 表示是发布,其他表示是显示当前的评论 18 * |
#13 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CBaseController.php(174): CommentShow->run() 169 return ob_get_clean(); 170 } 171 else 172 { 173 $widget=$this->createWidget($className,$properties); 174 $widget->run(); 175 return $widget; 176 } 177 } 178 179 /** |
#14 |
+
–
/data/travel_from_112_124_34_134/travel/front/themes/classic/views/destination/default/show.php(181): CBaseController->widget("CommentShow", array("i_content_id" => "12197", "userid" => 0, "or_type" => "c")) 176 </div> 177 178 </div> 179 </div> 180 <div id="allmap"></div> 181 <?php $this->widget('CommentShow',array('i_content_id'=>$show['id'],'userid'=>$userid,'or_type'=>'c'));?> 182 <?php $this->widget('CommentShow',array('viewname'=>'addcomment','userid'=>$userid,'i_content_id'=>$show['id'],'or_type'=>'c'));?> 183 </div> 184 <?php 185 $this->widget('RightSideInfo', array('a_modules'=>array('pc_rightsidebar_hotsale'=>2, 'pc_rightsidebar_hotview'=>6))); 186 ?> |
#15 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CBaseController.php(127): require("/data/travel_from_112_124_34_134/travel/front/themes/classic/vie...") 122 $data=$_data_; 123 if($_return_) 124 { 125 ob_start(); 126 ob_implicit_flush(false); 127 require($_viewFile_); 128 return ob_get_clean(); 129 } 130 else 131 require($_viewFile_); 132 } |
#16 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CBaseController.php(96): CBaseController->renderInternal("/data/travel_from_112_124_34_134/travel/front/themes/classic/vie...", array("show" => array("id" => "12197", "title" => "桂林象山景区", "keywords" => "广西,桂林,象山景区", "pc_preview" => "http://img1.taagoo.cn/images/20140616/301620402065.jpg", ...), "userid" => 0, "resource_type" => "scene"), true) 091 { 092 $widgetCount=count($this->_widgetStack); 093 if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile)) 094 $content=$renderer->renderFile($this,$viewFile,$data,$return); 095 else 096 $content=$this->renderInternal($viewFile,$data,$return); 097 if(count($this->_widgetStack)===$widgetCount) 098 return $content; 099 else 100 { 101 $widget=end($this->_widgetStack); |
#17 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CController.php(870): CBaseController->renderFile("/data/travel_from_112_124_34_134/travel/front/themes/classic/vie...", array("show" => array("id" => "12197", "title" => "桂林象山景区", "keywords" => "广西,桂林,象山景区", "pc_preview" => "http://img1.taagoo.cn/images/20140616/301620402065.jpg", ...), "userid" => 0, "resource_type" => "scene"), true) 865 */ 866 public function renderPartial($view,$data=null,$return=false,$processOutput=false) 867 { 868 if(($viewFile=$this->getViewFile($view))!==false) 869 { 870 $output=$this->renderFile($viewFile,$data,true); 871 if($processOutput) 872 $output=$this->processOutput($output); 873 if($return) 874 return $output; 875 else |
#18 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CController.php(783): CController->renderPartial("show", array("show" => array("id" => "12197", "title" => "桂林象山景区", "keywords" => "广西,桂林,象山景区", "pc_preview" => "http://img1.taagoo.cn/images/20140616/301620402065.jpg", ...), "userid" => 0, "resource_type" => "scene"), true) 778 */ 779 public function render($view,$data=null,$return=false) 780 { 781 if($this->beforeRender($view)) 782 { 783 $output=$this->renderPartial($view,$data,true); 784 if(($layoutFile=$this->getLayoutFile($this->layout))!==false) 785 $output=$this->renderFile($layoutFile,array('content'=>$output),true); 786 787 $this->afterRender($view,$output); 788 |
#19 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/modules/destination/controllers/DefaultController.php(113): CController->render("show", array("show" => array("id" => "12197", "title" => "桂林象山景区", "keywords" => "广西,桂林,象山景区", "pc_preview" => "http://img1.taagoo.cn/images/20140616/301620402065.jpg", ...), "userid" => 0, "resource_type" => "scene")) 108 109 if($this->_request->getQuery('player')){ 110 $this->layout = false; 111 $this->render('show_player',$a_data); 112 }else{ 113 $this->render('show',$a_data); 114 } 115 116 } 117 /* 118 * 单独全景页面 |
#20 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/actions/CInlineAction.php(50): DefaultController->actionShow() 45 $controller=$this->getController(); 46 $method=new ReflectionMethod($controller, $methodName); 47 if($method->getNumberOfParameters()>0) 48 return $this->runWithParamsInternal($controller, $method, $params); 49 else 50 return $controller->$methodName(); 51 } 52 53 } |
#21 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CController.php(309): CInlineAction->runWithParams(array("destination/default/show/id/destination/default/show/id/12197" => "", "id" => "12197", "default" => "show")) 304 { 305 $priorAction=$this->_action; 306 $this->_action=$action; 307 if($this->beforeAction($action)) 308 { 309 if($action->runWithParams($this->getActionParams())===false) 310 $this->invalidActionParams($action); 311 else 312 $this->afterAction($action); 313 } 314 $this->_action=$priorAction; |
#22 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CController.php(287): CController->runAction(CInlineAction) 282 * @see runAction 283 */ 284 public function runActionWithFilters($action,$filters) 285 { 286 if(empty($filters)) 287 $this->runAction($action); 288 else 289 { 290 $priorAction=$this->_action; 291 $this->_action=$action; 292 CFilterChain::create($this,$action,$filters)->run(); |
#23 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array()) 261 { 262 if(($parent=$this->getModule())===null) 263 $parent=Yii::app(); 264 if($parent->beforeControllerAction($this,$action)) 265 { 266 $this->runActionWithFilters($action,$this->filters()); 267 $parent->afterControllerAction($this,$action); 268 } 269 } 270 else 271 $this->missingAction($actionID); |
#24 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CWebApplication.php(276): CController->run("show") 271 { 272 list($controller,$actionID)=$ca; 273 $oldController=$this->_controller; 274 $this->_controller=$controller; 275 $controller->init(); 276 $controller->run($actionID); 277 $this->_controller=$oldController; 278 } 279 else 280 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 281 array('{route}'=>$route===''?$this->defaultController:$route))); |
#25 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CWebApplication.php(135): CWebApplication->runController("destination/default/show/id/destination/default/show/id/12197") 130 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 131 $_GET[$name]=$value; 132 } 133 else 134 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 135 $this->runController($route); 136 } 137 138 /** 139 * Registers the core application components. 140 * This method overrides the parent implementation by registering additional core components. |
#26 |
+
–
/data/travel_from_112_124_34_134/travel/framework/base/CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#27 |
+
–
/data/travel_from_112_124_34_134/travel/front/index.php(36): CApplication->run() 31 32 require_once($yii); 33 //全局函数 34 require_once($globals); 35 36 Yii::createWebApplication($config)->run(); |