本文整理匯總了PHP中Model_Users::followersUsers方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model_Users::followersUsers方法的具體用法?PHP Model_Users::followersUsers怎麽用?PHP Model_Users::followersUsers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Model_Users
的用法示例。
在下文中一共展示了Model_Users::followersUsers方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: editAgendaAction
public function editAgendaAction()
{
$request = $this->getRequest();
if (!JO_Session::get('user[user_id]')) {
if ($request->isXmlHttpRequest()) {
$this->view->redirect = WM_Router::create($request->getBaseUrl() . '?controller=users&action=login');
} else {
$this->redirect(WM_Router::create($request->getBaseUrl() . '?controller=users&action=login'));
}
} else {
Model_Users::editAgenda($request->getPost('texto'), $request->getPost('agenda_id'));
$data = Model_Users::followersUsers(JO_Session::get('user[user_id]'));
if ($data) {
foreach ($data as $key => $user) {
//add history
Model_History::addHistory($user["user_id"], Model_History::COMMENTUSER, $request->getPost('texto'));
}
}
$this->view->ok = $request->getPost('texto');
}
echo $this->renderScript('json');
}
示例2: agendaAction
public function agendaAction()
{
$this->noViewRenderer(true);
$request = $this->getRequest();
$response = $this->getResponse();
$page = (int) $request->getRequest('page');
if ($page < 1) {
$page = 1;
}
$callback = $request->getRequest('callback');
if (!preg_match('/^([a-z0-9_.]{1,})$/', $callback)) {
$callback = false;
}
if (isset($_POST['token']) && $_POST['token'] == md5($_POST['userId'])) {
$_SESSION['token'] = $_POST['token'];
JO_Session::set('token', $_POST['token']);
Model_Users::editAgenda($request->getPost('agenda'));
$data = Model_Users::followersUsers($_POST['userId']);
if ($data) {
foreach ($data as $key => $user) {
//add history
Model_History::addHistory($user["user_id"], Model_History::COMMENTUSER, $request->getPost('agenda'));
}
}
$return = array('agenda' => $request->getPost('agenda'));
} else {
//no existe la sesión / no existe el dato recibido por post / el token no es igual.
$return = array('error' => 401, 'description' => $this->translate('wrong token'));
}
if ($callback) {
$return = $callback . '(' . JO_Json::encode($return) . ')';
} else {
$response->addHeader('Cache-Control: no-cache, must-revalidate');
$response->addHeader('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
$response->addHeader('Content-type: application/json');
$return = JO_Json::encode($return);
}
$response->appendBody($return);
}