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


PHP GWF_Session::getSessID方法代码示例

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


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

示例1: setSessOffline

 public static function setSessOffline(Module_Chat $module)
 {
     $sessid = GWF_Session::getSessID();
     $table = new self(false);
     if (false === ($row = $table->getRow($sessid))) {
         # Unknown row
         return true;
     }
     return $row->saveVar('chaton_timeleft', time());
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:10,代码来源:GWF_ChatOnline.php

示例2: getCart

 public static function getCart()
 {
     $sessid = GWF_Session::getSessID();
     if (false !== ($cart = self::table(__CLASS__)->selectFirst("orderc_sessid='{$sessid}'"))) {
         return $cart;
     } else {
         $cart = new self(array('orderc_uid' => GWF_Session::getUserID(), 'orderc_sessid' => $sessid));
         if (false === $cart->insert()) {
             return false;
         }
         return $cart;
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:GWF_ShoppingCart.php

示例3: generateSolution

 public static function generateSolution($random, $letters_only = false, $lowercase = false, $length = 12)
 {
     if (false === ($user = GWF_Session::getUser())) {
         $username = GWF_Session::getSessID();
     } else {
         $username = $user->getVar('user_name');
     }
     $md5 = strtoupper(md5($random . $random . $username . $random . $random));
     if ($letters_only === true) {
         $md5 = str_replace(self::$SEARCH, self::$REPLACE, $md5);
     }
     if ($lowercase === true) {
         $md5 = strtolower($md5);
     }
     return substr($md5, 2, $length);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:16,代码来源:WC_CryptoChall.php

示例4: lsb_gen_image

function lsb_gen_image($solution)
{
    if (false === ($image = imagecreatefrompng(LSB_IMAGE_PATH))) {
        return GWF_WEB_ROOT . 'error/Can_not_create_img';
    }
    if (false === imageistruecolor($image)) {
        return GWF_WEB_ROOT . 'error/Image_not_true_color';
    }
    lsb_write_string($image, 0, $solution);
    //	lsb_write_string($image, 1, $solution);
    //	lsb_write_string($image, 2, $solution);
    $sessid = GWF_Session::getSessID();
    $out_path = "challenge/training/stegano/LSB/temp/{$sessid}.png";
    // 	$out_path = 'dbimg/lsb/'.$sessid.'.png';
    imagepng($image, $out_path);
    imagedestroy($image);
    return $out_path;
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:18,代码来源:index.php

示例5: setWatching

 public static function setWatching(GWF_ForumThread $thread, $cut)
 {
     $tid = $thread->getID();
     # Insert current spectator
     //		GDO::table(__CLASS__);
     $row = new self(array('fowa_sess' => GWF_Session::getSessID(), 'fowa_time' => time(), 'fowa_tid' => $tid));
     if (false === $row->replace()) {
         return false;
     }
     # Delete old
     $cut = time() - $cut;
     if (false === $row->deleteWhere("fowa_time<{$cut}")) {
         return false;
     }
     # Set new amount
     if (false === $thread->saveVar('thread_watchers', $row->countRows("fowa_tid={$tid}"))) {
         return false;
     }
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:20,代码来源:GWF_ForumVisitors.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: chdir

<?php

chdir('../../');
define('GWF_PAGE_TITLE', 'Snake');
define('CHEAT_SNAKE_SCORE', 300000);
require_once 'challenge/html_head.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
    $chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 4, 'challenge/snake/index.php', false);
}
$chall->showHeader();
htmlTitleBox($chall->lang('title'), $chall->lang('info', array(CHEAT_SNAKE_SCORE, 'CGI_Highscore.php', 'http://snake.gizmore.org', 'http://snake.gizmore.org/CGI_Highscore.php')));
echo '<div class="box box_c">' . PHP_EOL;
echo '<applet code="SnakeApplet.class" archive="snake.jar?v=1.06" width="500" height="400"><param name="sessid" value="' . GWF_HTML::display(GWF_Session::getSessID()) . '" ></param></applet>' . PHP_EOL;
echo '</div>' . PHP_EOL;
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
开发者ID:sinfocol,项目名称:gwf3,代码行数:16,代码来源:index.php

示例8: chdir

<?php

chdir('../../../../');
require_once 'protected/config.php';
require_once '../gwf3.class.php';
$gwf = new GWF3(getcwd(), array('website_init' => true, 'autoload_modules' => true, 'load_module' => false, 'get_user' => true, 'do_logging' => true, 'blocking' => true, 'no_session' => false, 'store_last_url' => true, 'ignore_user_abort' => true));
//GWF_Session::start();
//GWF_Language::init();
//GWF_HTML::init();
$wechall = GWF_Module::loadModuleDB('WeChall');
require_once GWF_CORE_PATH . 'module/WeChall/WC_CryptoChall.php';
$jpg_path = 'challenge/training/stegano/attachment/the.jpg';
$jpg_file = file_get_contents($jpg_path);
$solution = WC_CryptoChall::generateSolution('YouLikeAttachmentEh', true, false);
$zip_path = GWF_PATH . 'extra/temp/steganoattach/' . GWF_Session::getSessID() . '.zip';
$zip = new GWF_ZipArchive();
if (false === $zip->open($zip_path, GWF_ZipArchive::CREATE)) {
    die('zip error 1');
}
if (false === $zip->addFromString('solution.txt', $solution)) {
    die('zip error 2');
}
if (false === $zip->close()) {
    die('zip error 3');
}
$jpg_file .= file_get_contents($zip_path);
unlink($zip_path);
header('Content-Type: image/jpeg');
echo $jpg_file;
die;
开发者ID:sinfocol,项目名称:gwf3,代码行数:30,代码来源:attachment.php


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