/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/user/controllers/IndexController.php(278): Member::model() 273 * 判断是否开放浏览权限 274 * @param integer $uid 用户id 275 * return string 返回是否开放权限 276 */ 277 public function actionCheckopen($uid){ 278 $open = Member::model()->getRows('open','id = '.$uid); 279 return $open[0]['open']; 280 } 281 282 /** 283 * ajax查询登录用户是否关注指向用户 |
#9 |
+
–
/data/travel_from_112_124_34_134/travel/front/protected/modules/user/controllers/IndexController.php(61): IndexController->actionCheckopen("20711") 56 $loginUid = $_SESSION['uid']; //获取登录用户的id 57 }else { 58 $loginUid = 0; 59 } 60 if($loginUid != $uid){ 61 if(!$this->actionCheckopen($uid)){ 62 //$this->render('deny'); 63 //exit(); 64 }else{ 65 /*添加访客记录*/ 66 $this->actionAddvisitor($uid,$loginUid); |
#10 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/actions/CInlineAction.php(50): IndexController->actionIndex() 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 } |
#11 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CController.php(309): CInlineAction->runWithParams(array("user/index/index/uid/20711" => "", "uid" => "20711")) 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; |
#12 |
+
–
/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(); |
#13 |
+
–
/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); |
#14 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CWebApplication.php(276): CController->run("index") 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))); |
#15 |
+
–
/data/travel_from_112_124_34_134/travel/framework/web/CWebApplication.php(135): CWebApplication->runController("user/index/index/uid/20711") 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. |
#16 |
+
–
/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 /** |
#17 |
+
–
/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(); |