当前位置: 首页>>代码示例>>PHP>>正文


PHP GWF_Session::getLastURL方法代码示例

本文整理汇总了PHP中GWF_Session::getLastURL方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_Session::getLastURL方法的具体用法?PHP GWF_Session::getLastURL怎么用?PHP GWF_Session::getLastURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GWF_Session的用法示例。


在下文中一共展示了GWF_Session::getLastURL方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onVote

 private function onVote(GWF_VoteMulti $poll, $user)
 {
     $opts = Common::getPostArray('opt', array());
     $taken = array();
     $max = $poll->getNumChoices();
     foreach ($opts as $i => $stub) {
         $i = (int) $i;
         if ($i < 1 || $i > $max) {
             continue;
         }
         if (!in_array($i, $taken, true)) {
             $taken[] = $i;
         }
     }
     $count = count($taken);
     //		if ($count === 0) {
     //			return $this->module->error('err_no_options');
     //		}
     if (!$poll->isMultipleChoice() && $count !== 1) {
         return $this->module->error('err_no_multi');
     }
     if (false === $poll->onVote($user, $taken)) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return $this->module->message('msg_voted', array(htmlspecialchars(GWF_Session::getLastURL())));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:26,代码来源:VotePoll.php

示例2: execute

 public function execute()
 {
     if (false === ($user = GWF_Session::getUser()) && !$this->module->cfgGuestShouts()) {
         return GWF_HTML::err('ERR_LOGIN_REQUIRED');
     }
     if ($user !== false && $user->isWebspider()) {
         return GWF_HTML::err('ERR_NO_PERMISSION');
     }
     if (false !== ($error = $this->isFlooding())) {
         return $error;
     }
     $message = Common::getPost('message', '');
     if (false !== ($error = $this->validate_message($message))) {
         return GWF_HTML::error('Shoutbox', $error);
     }
     $entry = new GWF_Shoutbox(array('shout_id' => '0', 'shout_uid' => GWF_Session::getUserID(), 'shout_date' => GWF_Time::getDate(GWF_Date::LEN_SECOND), 'shout_uname' => GWF_Shoutbox::generateUsername(), 'shout_message' => $message));
     if (false === $entry->insert()) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     if ($this->module->cfgEMailModeration()) {
         $this->onEMailModeration($user, $entry);
     }
     $url = htmlspecialchars(GWF_Session::getLastURL());
     return $this->module->message('msg_shouted', array($url, $url));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:25,代码来源:Shout.php

示例3: redirectBack

 public static function redirectBack()
 {
     $url = GWF_WEB_ROOT;
     if (false !== ($url2 = GWF_Session::getLastURL())) {
         $url = GWF_WEB_ROOT . ltrim($url2, '/');
     }
     self::redirect($url);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:8,代码来源:GWF_Website.php

示例4: execute

 public function execute(GWF_Module $module)
 {
     if (GWF_Session::haveCookies()) {
         GWF_Session::set(GWF_Browser::SESS_DETECTION, 1);
         GWF_Session::set(GWF_Browser::SESS_RESOLUTION, array(intval(Common::getGet('w', -1)), intval(Common::getGet('h', -1))));
         GWF_Website::redirectBack();
     } else {
         $url = Common::getGet('url', GWF_Session::getLastURL());
         if ($module->cfgFallbackSessions()) {
             GWF_Session::createFallback($url);
             GWF_Website::redirect(GWF_WEB_ROOT . 'index.php?mo=GWF&me=CookieCheck&level=2&url=' . urlencode($url));
         } else {
             GWF_Website::redirectBack();
         }
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:16,代码来源:JSEnabled.php

示例5: execute

 public function execute(GWF_Module $module)
 {
     $url = Common::getGet('url', GWF_Session::getLastURL());
     switch (Common::getGet('level')) {
         case '1':
             if (GWF_Session::haveCookies() === true) {
                 GWF_Website::redirectBack();
             } elseif ($module->cfgFallbackSessions()) {
                 GWF_Session::createFallback($url);
                 GWF_Website::redirect(GWF_WEB_ROOT . 'index.php?mo=GWF&me=CookieCheck&level=2&url=' . urlencode($url));
             } else {
                 GWF_Website::redirect($url);
             }
             break;
         case '2':
             //				var_dump($_SERVER);
             GWF_Website::redirect($url);
             break;
         default:
             return GWF_HTML::err('ERR_PARAMETER', array(__FILE__, __LINE__, 'level'));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:22,代码来源:CookieCheck.php

示例6: onLoggedIn

 private function onLoggedIn(GWF_User $user, $isAjax)
 {
     $last_url = GWF_Session::getLastURL();
     if (false === GWF_Session::onLogin($user, isset($_POST['bind_ip']))) {
         return GWF_HTML::err('ERR_GENERAL', array(__FILE__, __LINE__));
     }
     require_once GWF_CORE_PATH . 'module/Login/GWF_LoginHistory.php';
     GWF_LoginHistory::insertEvent($user->getID());
     # save last login time
     $user->saveVar('user_lastlogin', time());
     if ($this->module->cfgCleanupAlways()) {
         GWF_LoginFailure::cleanupUser($user->getID());
     }
     if ($isAjax) {
         return sprintf('1:%s', GWF_Session::getSessID());
     } else {
         GWF_Session::set('GWF_LOGIN_BACK', $last_url);
         if (false !== ($lang = $user->getLanguage())) {
             GWF_Language::setCurrentLanguage($lang);
         }
         if (0 < ($fails = GWF_LoginFailure::getFailCount($user, $this->module->cfgTryExceed()))) {
             GWF_Session::set('GWF_LOGIN_FAILS', $fails);
         }
         GWF_Website::redirect(GWF_WEB_ROOT . 'welcome');
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:26,代码来源:Form.php

示例7: onVoted

 private function onVoted($user)
 {
     GWF_Hook::call(GWF_Hook::VOTED_SCORE, $user, array($this->votescore->getID(), $this->score));
     return isset($_GET['ajax']) ? $this->module->message('msg_voted_ajax') : $this->module->message('msg_voted', array(GWF_Session::getLastURL()));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:5,代码来源:Vote.php


注:本文中的GWF_Session::getLastURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。