23 require_once(
'Zend/Auth.php');
24 require_once(
'Tweet.php');
25 require_once(
'TweetTable.php');
26 require_once(
'Profile.php');
27 require_once(
'User.php');
28 require_once(
'UserTable.php');
33 require_once(
'SendForm.php');
34 $request = $this->getRequest();
36 'action' =>
'/index/send',
38 'goto' => $request->getRequestUri(),
44 if (!Zend_Auth::getInstance()->hasIdentity())
45 $this->_helper->redirector(
'index',
'login');
50 return $this->render(
'index');
58 $profile=Zend_Auth::getInstance()->getIdentity();
60 $newcount=$user->getFollowStreamCount();
69 $profile=Zend_Auth::getInstance()->getIdentity();
70 $request=$this->getRequest();
74 return $this->render(
'index');
76 $this->view->data=$user->getFollowStream($request->getParam(
'cutoff'),
78 if (count($this->view->data)<$limit)
79 $this->view->new_cutoff_time=0;
81 $this->view->new_cutoff_time=$user->getCutoffTime();
82 return $this->render(
'index');
88 $request=$this->getRequest();
89 $profile=Zend_Auth::getInstance()->getIdentity();
91 $this->view->show=
'mine';
94 return $this->render(
'index');
96 $this->view->data=$user->getMyStream($request->getParam(
'cutoff'), $limit);
97 if (count($this->view->data)<$limit)
98 $this->view->new_cutoff_time=0;
100 $this->view->new_cutoff_time=$user->getCutoffTime();
101 return $this->render(
'index');
107 $request=$this->getRequest();
108 $profile=Zend_Auth::getInstance()->getIdentity();
110 $this->view->show=
'following';
113 return $this->render(
'index');
115 $this->view->data=$user->getFollowing($request->getParam(
'cutoff'), $limit);
116 if (count($this->view->data)<$limit)
117 $this->view->new_cutoff_time=0;
119 $this->view->new_cutoff_time=$user->getCutoffTime();
120 return $this->render(
'index');
126 $request=$this->getRequest();
127 $profile=Zend_Auth::getInstance()->getIdentity();
129 $this->view->show=
'followers';
132 return $this->render(
'index');
134 $this->view->data=$user->getFollowers($request->getParam(
'cutoff'), $limit);
135 if (count($this->view->data)<$limit)
136 $this->view->new_cutoff_time=0;
138 $this->view->new_cutoff_time=$user->getCutoffTime();
139 return $this->render(
'index');
144 $request = $this->getRequest();
147 if (!$request->isPost())
148 return $this->_helper->redirector(
'index',
'index');
152 if (!$form->isValid($request->getPost())) {
153 $this->view->form = $form;
154 $val=$form->getValues();
155 return $this->_helper->redirector->gotoUrl($val[
'goto']);
158 $val=$form->getValues();
161 $profile=Zend_Auth::getInstance()->getIdentity();
163 $t->setMessage($val[
'message']);
168 return $this->_helper->redirector->gotoUrl($val[
'goto']);
Copyright (C) 2007-2015 Hypertable, Inc.