コード例 #1
0
 public function view($id)
 {
     $user_model = new UsersModel();
     $event_model = new EventsModel();
     $recommend_model = new RecommendModel();
     $weibo_model = new WeiboModel();
     $user = $user_model->find($id);
     $recommended_users = $recommend_model->users_by_user($id);
     $events = $event_model->select_by_user($id);
     $weibo = $weibo_model->select_weibo_by_user($id);
     $related_ngo_model = new RelatedNgosModel();
     $this->assign('user', $user);
     $this->assign('events', $events);
     $this->assign('rec_users', $recommended_users);
     $this->assign('related_ngos', $related_ngo_model->select_by_user_id($id));
     $this->assign('weibo', $weibo);
     $this->display();
 }
コード例 #2
0
ファイル: UserController.php プロジェクト: lilhorse/cocoa
 public function sendweiboAction()
 {
     if (!$_POST) {
         die;
     }
     $weiboModel = new WeiboModel();
     $token = $weiboModel->token($this->userid);
     if (!$token) {
         die("notoken");
     }
     $c = new SaeTClientV2(WB_AKEY, WB_SKEY, $token);
     $ret = $c->update($_POST["weibocontent"]);
     if ($ret) {
         return "ok";
     }
 }