コード例 #1
0
 public function show($id = null)
 {
     $account = $this->load_account($id);
     $this->assign('account', $account);
     $page = 1;
     if ($this->GetData('page')) {
         $page = $this->GetData('page');
     }
     $id = mysql_real_escape_string($account->id);
     $tweets = Tweet::paginate("twitter_accounts.id = '{$id}'", "tweets.publish_at DESC, tweets.id DESC", $page, 20);
     $this->assign('tweets', $tweets);
     $this->title = "Twitter Account :: {$account->name}";
     $this->render('twitter_account/show.tpl');
 }
コード例 #2
0
 public function index($id = null)
 {
     $page = 1;
     if ($this->GetData('page')) {
         $page = $this->GetData('page');
     }
     $tweets = Tweet::paginate('', 'tweets.publish_at DESC, tweets.id DESC', $page, 20);
     $this->assign('tweets', $tweets);
     $this->title = 'Tweets';
     $this->render('tweet/index.tpl');
 }