本文整理汇总了PHP中pathang::getHelper方法的典型用法代码示例。如果您正苦于以下问题:PHP pathang::getHelper方法的具体用法?PHP pathang::getHelper怎么用?PHP pathang::getHelper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pathang
的用法示例。
在下文中一共展示了pathang::getHelper方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: forgot
public function forgot()
{
$node = pathang::getInstance('node');
$request = pathang::getInstance('request');
$basket = pathang::getInstance('basket');
$email = $request->filterHTMLSQL('email');
$password = $request->filterHTMLSQL('password');
$n3 = $node->get('n3');
pathang::getInstance('pathang')->SITE->PAGE = 'login';
if ($email) {
$code = pathang::getModel('userlog')->setForgotCode($email);
if ($code == 2) {
$basket->set('heading', 'Error in Operation');
$basket->set('message', 'There is an error in the operation performed.
Please redo the process.');
} elseif ($code == 3) {
$basket->set('heading', 'Email Not Found');
$basket->set('message', 'Email you have provided is not registered with our
database.Please enter the correct email id and redo the process.');
} else {
$basket->set('heading', 'Reset Password Email');
$basket->set('message', 'Password reset instructions has been sent to your email. Follow
the instructions in the mail to create a new password. Please check your spam box
if in case you dont recieve a mail.');
//echo $code;
pathang::getHelper('userlog')->sendForgotPasswordMail($code, $email);
}
pathang::Render('userlog', 'forgot_message');
} elseif ($n3) {
if ($password) {
$update = pathang::getModel('userlog')->updateForgotPassword($n3, $password);
if ($update == 1) {
$basket->set('heading', 'Successfully Updated Password');
$basket->set('message', 'Your password has been successfully updated.Please
login to enter the site');
} else {
$basket->set('heading', 'Error in Operation');
$basket->set('message', 'There is an error in the operation performed.
Please redo the process.');
}
pathang::Render('userlog', 'forgot_message');
} else {
pathang::render('userlog', 'reset_password');
}
} else {
pathang::getInstance('pathang')->SITE->PAGE = 'login';
pathang::render('userlog', 'forgot');
}
}
示例2: notifications
public function notifications()
{
$basket = pathang::getInstance('basket');
$request = pathang::getInstance('request');
$snippet = $request->get('snippet');
$user = pathang::getInstance('node')->get('n1');
$limit = pathang::GetInstance('pathang')->FEEDSTACK->NOTIFICATION_CENTER_COUNT;
if ($request->get('limit')) {
$limit = $request->get('limit');
}
$liveuser = null;
if (pathang::getInstance('session')->get('liveuser')) {
$liveuser = pathang::getInstance('session')->get('liveuser')->username;
$uid = pathang::getInstance('session')->get('liveuser')->id;
}
if ($user == $liveuser) {
$notify = pathang::getModel('profile')->getUserNotifications($user, $limit);
$notifyObj = new stdclass();
if (isset($notify)) {
foreach ($notify as $a => $b) {
$notifyTemp = new stdClass();
foreach ($b as $c => $d) {
$notifyTemp->{$c} = $d;
}
$notifyTemp->time_stamp = pathang::getHelper('feedprocess')->ago($notifyTemp->time_stamp);
$notifyObj->{$a} = $notifyTemp;
}
}
$notifyTemp2 = new stdclass();
$notifyTemp2->unread = pathang::GetModel('profile')->getUnreadNotificationCount($uid);
$notifyTemp2->messages = $notifyObj;
if ($snippet) {
return $notifyTemp2;
}
$basket->set('notify', $notifyObj);
pathang::getInstance('pathang')->SITE->PAGE = 'members';
pathang::render('profile', 'notifications');
//update notifacations read
pathang::GetModel('profile')->updateReadNotifications($uid);
} else {
pathang::getInstance('pathang')->SITE->PAGE = 'login';
$basket->set('heading', 'Restricted Access');
$basket->set('message', 'You dont have enough permission to access this page.');
pathang::render('general', 'errorpage');
exit;
}
}
示例3: deleteComment
public function deleteComment()
{
$request = pathang::getInstance('request');
$comment_id = $request->get('comment_id');
//check for validity of access token
pathang::getHelper('userlog')->ajaxAuthentication();
pathang::getModel('feed')->deleteFeedComment($comment_id);
return 1;
}
示例4: deleteUser
public function deleteUser()
{
$request = pathang::GetInstance('request');
$uid = $request->get('uid');
//check for validity of access token
pathang::getHelper('userlog')->ajaxAuthentication();
$status = pathang::GetModel('userlog')->deleteUser($uid);
if ($status) {
echo '1';
} else {
echo '0';
}
}
示例5: notify
public function notify()
{
$request = pathang::GetInstance('request');
$target = $request->get('target');
$agent = $request->get('agent');
$action = $request->get('action');
$uid = $request->get('uid');
//check for validity of access token
pathang::getHelper('userlog')->ajaxAuthentication();
pathang::getModel('usermain')->saveNotification($uid, $agent, $target, $action);
}