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


PHP ADODB_Session::encryptionKey方法代码示例

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


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

示例1: _sessionKey

 function _sessionKey()
 {
     // use this function to create the encryption key for crypted sessions
     // crypt the used key, ADODB_Session::encryptionKey() as key and session_id() as salt
     return crypt(ADODB_Session::encryptionKey(), session_id());
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:6,代码来源:adodb-session.php

示例2: define

 * 
 * @author Organisation: Queen's University
 * @author Unit: School of Medicine
 * @author Developer: Matt Simpson <matt.simpson@queensu.ca>
 * @copyright Copyright 2010 Queen's University. All Rights Reserved.
 * 
*/
$ADODB_QUOTE_FIELDNAMES = true;
// Whether or not you want ADOdb to backtick field names in AutoExecute, GetInsertSQL and GetUpdateSQL.
define("ADODB_QUOTE_FIELDNAMES", $ADODB_QUOTE_FIELDNAMES);
// Information required to start a new database connection.
$db = NewADOConnection(DATABASE_TYPE);
$db->Connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
if (defined("DEFAULT_CHARSET") && isset($ENTRADA_CHARSETS) && is_array($ENTRADA_CHARSETS) && array_key_exists(DEFAULT_CHARSET, $ENTRADA_CHARSETS)) {
    $db->Execute("SET NAMES " . $db->qstr($ENTRADA_CHARSETS[DEFAULT_CHARSET]["mysql_names"]) . " COLLATE " . $db->qstr($ENTRADA_CHARSETS[DEFAULT_CHARSET]["mysql_collate"]));
}
$db->debug = isset($DEVELOPER_IPS) && is_array($DEVELOPER_IPS) && isset($_SERVER["REMOTE_ADDR"]) && in_array($_SERVER["REMOTE_ADDR"], $DEVELOPER_IPS) && isset($_GET["debug"]) ? true : false;
@ini_set("session.name", SESSION_NAME);
@ini_set("session.gc_maxlifetime", SESSION_EXPIRES);
if (defined("ADODB_SESSION") && defined("DATABASE_SESSIONS") && DATABASE_SESSIONS) {
    require_once "Entrada/adodb/session/adodb-session2.php";
    ADODB_Session::config(SESSION_DATABASE_TYPE, SESSION_DATABASE_HOST, SESSION_DATABASE_USER, SESSION_DATABASE_PASS, SESSION_DATABASE_NAME, array("table" => "sessions"));
    ADODB_Session::encryptionKey(ENCRYPTION_KEY);
    ADODB_Session::open(false, false, false);
    ADODB_Session::optimize(true);
    ADODB_Session::expireNotify(array("PROXY_ID", "expired_session"));
    session_start();
} else {
    session_start();
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:dbconnection.inc.php

示例3: array

            </table></td>
<?php
  $heading = array();
  $contents = array();
  if (isset($info)) {
    $heading[] = array('text' => '<b>' . TABLE_HEADING_SHOPPING_CART . '</b><br />');

    if (STORE_SESSIONS == '1') {
      $sessionstable = $oostable['sessions'];

      $session_data = $dbconn->Execute("SELECT data FROM $sessionstable WHERE sesskey = '" . $info . "'");

      if (STORE_SESSIONS_CRYPT == '1') {
        include_once '../includes/lib/adodb/session/crypt.inc.php';
        $Crypt = new MD5Crypt;
        $session_data = rawurldecode($Crypt->Decrypt(reset($session_data->fields), crypt(ADODB_Session::encryptionKey(), $info)));
      } else {
        $session_data = rawurldecode($session_data->fields['data']);
      }
    } else {
      if ( (file_exists(oos_session_save_path() . '/sess_' . $info)) && (filesize(oos_session_save_path() . '/sess_' . $info) > 0) ) {
        $session_data = file(oos_session_save_path() . '/sess_' . $info);
        $session_data = trim(implode('', $session_data));
      }
    }

    $currency = unserialize(oos_get_serialized_variable($session_data, 'currency', 'string'));

    $cart = unserialize(oos_get_serialized_variable($session_data, 'cart', 'object'));

    if (isset($cart) && is_object($cart)) {
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:whos_online.php

示例4: ini_set

} else {
    ini_set('error_reporting', 0);
    // No errors
    ini_set('display_errors', '0');
    // Don't show them
    $db_logging = false;
    // True gives an admin log entry for any SQL calls that update/insert/delete, and turns on adodb's sql logging. Only for use during development!This makes a huge amount of logs! You have been warned!!
}
ini_set('url_rewriter.tags', '');
// Ensure that the session id is *not* passed on the url - this is a possible security hole for logins - including admin.
global $ADODB_CRYPT_KEY;
global $ADODB_SESSION_CONNECT, $ADODB_SESSION_USER, $ADODB_SESSION_DB;
$ADODB_SESS_CONN = '';
$ADODB_SESSION_TBL = $db_prefix . "sessions";
// We explicitly use encrypted sessions, but this adds compression as well.
ADODB_Session::encryptionKey($ADODB_CRYPT_KEY);
// The data field name "data" violates SQL reserved words - switch it to SESSDATA
ADODB_Session::dataFieldName('SESSDATA');
global $db;
connectdb();
$db->prefix = $db_prefix;
$db->logging = $db_logging;
if ($db_logging) {
    adodb_perf::table("{$db->prefix}adodb_logsql");
    $db->LogSQL();
    // Turn on adodb performance logging
}
if (!isset($index_page)) {
    $index_page = false;
}
if (!$index_page) {
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:31,代码来源:global_cleanups.php


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