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


PHP GWF_Session::set方法代码示例

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


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

示例1: execute

 public function execute()
 {
     if (false !== ($state = Common::getGet('rightpanel'))) {
         GWF_Session::set('WC_RIGHT_PANEL', $state > 0);
         GWF_Website::redirectBack();
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:7,代码来源:Sidebar2.php

示例2: cleanupOldTokens

 private static function cleanupOldTokens()
 {
     $tokens = GWF_Session::get(self::TOKEN_NAME);
     if (self::MAX_TOKENS < ($count = count($tokens))) {
         GWF_Session::set(self::TOKEN_NAME, array_slice($tokens, $count - self::MAX_TOKENS, self::MAX_TOKENS, true));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:7,代码来源:GWF_CSRF.php

示例3: prog2NextQuestion

function prog2NextQuestion(WC_Challenge $chall)
{
    if (false === ($user = GWF_Session::getUser())) {
        die($chall->lang('err_login'));
    }
    $solution = GWF_Random::randomKey(rand(9, 12));
    GWF_Session::set('prog2_solution', $solution);
    GWF_Session::set('prog2_timeout', microtime(true));
    //	GWF_Session::commit();
    die($solution);
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:11,代码来源:index.php

示例4: onNewPubmsg

 private function onNewPubmsg($timestamp)
 {
     if (false === ($cut = GWF_Session::getOrDefault(self::$SESS_AJAX_PUB, time()))) {
         return;
     }
     $msgs = new GWF_ChatMsg(false);
     $channel = '';
     $new = $msgs->selectAll('*', "chatmsg_to='{$channel}' AND chatmsg_time>{$cut}", 'chatmsg_time ASC');
     foreach ($new as $msg) {
         $this->echoMessage($msg);
     }
     GWF_Session::set(self::$SESS_AJAX_PUB, time());
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:Ajax_OLD.php

示例5: 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

示例6: crackcha_next

function crackcha_next(WC_Challenge $chall)
{
    if (crackcha_round_over()) {
        header('Content-Type: text/plain');
        if (false === crackcha_insert_high($chall)) {
            echo GWF_HTML::lang('ERR_DATABASE', array(__FILE__, __LINE__));
            return;
        } else {
            echo $chall->lang('msg_insert_high') . PHP_EOL;
            echo crackcha_reset($chall);
            return;
        }
    }
    require_once GWF_CORE_PATH . 'inc/3p/Class_Captcha.php';
    $chars = GWF_Random::randomKey(5, GWF_Random::ALPHAUP);
    crackcha_increase_count();
    GWF_Session::set('WCC_CRACKCHA_CHARS', $chars);
    $aFonts = array(GWF_PATH . 'extra/font/teen.ttf');
    $rgbcolor = GWF_CAPTCHA_COLOR_BG;
    $oVisualCaptcha = new PhpCaptcha($aFonts, 210, 42, $rgbcolor);
    $oVisualCaptcha->Create('', $chars);
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:22,代码来源:crackcha.php

示例7: profile

 private function profile(GWF_User $user)
 {
     if (false === ($profile = GWF_Profile::getProfile($user->getID()))) {
         return GWF_HTML::err('ERR_UNKNOWN_USER');
     }
     $watcher = GWF_User::getStaticOrGuest();
     if ($profile->isRobotHidden() && $watcher->isWebspider()) {
         return $this->module->error('err_no_spiders');
     }
     if (false === ($prof_view = GWF_Session::getOrDefault('prof_view', false))) {
         $prof_view = array();
     }
     $uid = $user->getID();
     if (!in_array($uid, $prof_view, true)) {
         $prof_view[] = $uid;
         if (false === $profile->increase('prof_views', 1)) {
             return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
         }
     }
     GWF_Session::set('prof_view', $prof_view);
     $tVars = array('user' => $user, 'profile' => $profile, 'jquery' => Common::getGet('ajax') !== false);
     return $this->module->templatePHP('profile.php', $tVars);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:23,代码来源:Profile.php

示例8: chdir

<?php

chdir('../../../');
define('GWF_PAGE_TITLE', 'The Last Hope');
require_once 'challenge/html_head.php';
require GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
    $chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 4, 'challenge/bsdhell/thelasthope/index.php', false);
}
$chall->showHeader();
if (strcasecmp(Common::getPost('answer'), 'username_password') === 0) {
    $count = GWF_Counter::getCount('WC_BSD_LH_DOLT');
    if (false === GWF_Session::getOrDefault('WC_BSD_LH_DOLT', false)) {
        $count++;
        GWF_Counter::saveCounter('WC_BSD_LH_DOLT', $count);
        GWF_Session::set('WC_BSD_LH_DOLT', '1');
    }
    echo GWF_HTML::message('The Last Hope', $chall->lang('msg_literal'), false);
    echo GWF_HTML::error('The Last Hope', $chall->lang('err_literal', array($count)), false);
} else {
    $chall->onCheckSolution();
}
htmlTitleBox($chall->lang('title'), $chall->lang('info', array('bsd_thelasthope.elf')));
formSolutionbox($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
开发者ID:sinfocol,项目名称:gwf3,代码行数:26,代码来源:index.php

示例9: setGuestNick

 public function setGuestNick($nick)
 {
     GWF_Session::set(self::$SESS_NICKNAME, $nick);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:Module_Chat.php

示例10: call_user_func

    GWF_Debug::setMailOnError(false);
    GWF_Debug::setDieOnError(false);
    $solved = call_user_func($function, $chall, $answer);
    GWF_Debug::setMailOnError(true);
    GWF_Debug::setDieOnError(true);
    if ($solved === true) {
        $level++;
        $next_func = 'train_regex_level_' . $level;
        if (!function_exists($next_func)) {
            echo GWF_HTML::message('WeChall', $chall->lang('msg_solved'), false);
            $chall->onChallengeSolved(GWF_Session::getUserID());
            $level = 1;
        } else {
            echo GWF_HTML::message('WeChall', $chall->lang('msg_next_level'), false);
        }
        GWF_Session::set('WCC_T_REGEX', $level);
    } else {
        echo GWF_HTML::error('WeChall', $chall->lang('err_wrong'), false);
    }
}
echo GWF_Box::box($chall->lang('info_' . $level), $chall->lang('title', array($level)));
formSolutionbox($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
##########
# Levels #
##########
function train_regex_level_1(WC_Challenge $chall, $answer)
{
    if ($answer === '/^$/') {
        return true;
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:index.php

示例11: zreload_func_reset

function zreload_func_reset($shellid, $args)
{
    GWF_Session::set('zreload', 1);
    zreloadClearShells();
    zreload_do_before_actions();
    return 'All cleared';
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:7,代码来源:zshellz.php

示例12: chdir

chdir('../../../../');
define('WCC_IP6_SESS', 'WCC_IP6_SESS');
define('GWF_PAGE_TITLE', 'Training: IPv6');
require_once 'challenge/html_head.php';
require_once GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
    $chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 1, 'challenge/training/www/ip6/index.php');
}
$chall->showHeader();
$wechall = Module_WeChall::instance();
$level = GWF_Session::getOrDefault(WCC_IP6_SESS, 1);
if (isset($_POST['answer']) && is_string($_POST['answer'])) {
    if (true === wcc_ip6_check_answer($chall, $_POST['answer'], $level)) {
        $_POST['answer'] = '';
        GWF_Session::set(WCC_IP6_SESS, ++$level);
        echo GWF_HTML::message('WCIPv6', $chall->lang('msg_correct', array($level)));
    } else {
        echo $wechall->error('err_wrong');
    }
}
echo GWF_Box::box($chall->lang('info_' . $level), $chall->lang('title', array($level)));
formSolutionbox($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
function wcc_ip6_check_answer(WC_Challenge $chall, $answer, $level)
{
    require_once 'solutions.php';
    if ($level === count($solutions)) {
        $ip = $_SERVER['REMOTE_ADDR'];
        if (GWF_IP6::isV6($ip)) {
开发者ID:sinfocol,项目名称:gwf3,代码行数:30,代码来源:index.php

示例13: genSolution

 private static function genSolution()
 {
     $solution = GWF_Random::randomKey(32, GWF_Random::ALPHANUMUPLOW);
     GWF_Session::set('LIV_SMI_SOL', $solution);
     return $solution;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:LIVIN_Smile.php

示例14: blightFailed

/**
 * Reset consecutive success counter.
 * @return void
 */
function blightFailed()
{
    GWF_Session::set('BLIGHT3_CONSECUTIVE', 0);
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:8,代码来源:vuln.php

示例15: uploadedFile

 private function uploadedFile(GWF_Form $form)
 {
     if (false === ($file = $form->getVar('file'))) {
         //			echo $this->module->error('err_file');
         return;
     }
     $tempname = 'dbimg/dl/' . basename($file['tmp_name']);
     if (false === ($file = GWF_Upload::moveTo($file, $tempname))) {
         echo GWF_HTML::err('ERR_WRITE_FILE', array($tempname));
     }
     GWF_Session::set(self::SESS_FILE, $file);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:12,代码来源:Add.php


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