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


PHP PMA_purgeHistory函数代码示例

本文整理汇总了PHP中PMA_purgeHistory函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_purgeHistory函数的具体用法?PHP PMA_purgeHistory怎么用?PHP PMA_purgeHistory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: session_write_close

 */
require_once './libraries/relation.lib.php';
// free the session file, for the other frames to be loaded
session_write_close();
// Gets the host name
if (empty($HTTP_HOST)) {
    if (PMA_getenv('HTTP_HOST')) {
        $HTTP_HOST = PMA_getenv('HTTP_HOST');
    } else {
        $HTTP_HOST = '';
    }
}
// purge querywindow history
$cfgRelation = PMA_getRelationsParam();
if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) {
    PMA_purgeHistory($GLOBALS['cfg']['Server']['user']);
}
unset($cfgRelation);
/**
 * pass variables to child pages
 */
$drops = array('lang', 'server', 'convcharset', 'collation_connection', 'db', 'table');
foreach ($drops as $each_drop) {
    if (array_key_exists($each_drop, $_GET)) {
        unset($_GET[$each_drop]);
    }
}
unset($drops, $each_drop);
if (!strlen($GLOBALS['db'])) {
    $main_target = $GLOBALS['cfg']['DefaultTabServer'];
} elseif (!strlen($GLOBALS['table'])) {
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:index.php

示例2: PMA_setHistory

/**
 * Set a SQL history entry
 *
 * @param string $db       the name of the db
 * @param string $table    the name of the table
 * @param string $username the username
 * @param string $sqlquery the sql query
 *
 * @return void
 *
 * @access  public
 */
function PMA_setHistory($db, $table, $username, $sqlquery)
{
    $maxCharactersInDisplayedSQL = $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'];
    // Prevent to run this automatically on Footer class destroying in testsuite
    if (defined('TESTSUITE') || mb_strlen($sqlquery) > $maxCharactersInDisplayedSQL) {
        return;
    }
    $cfgRelation = PMA_getRelationsParam();
    if (!isset($_SESSION['sql_history'])) {
        $_SESSION['sql_history'] = array();
    }
    $_SESSION['sql_history'][] = array('db' => $db, 'table' => $table, 'sqlquery' => $sqlquery);
    if (count($_SESSION['sql_history']) > $GLOBALS['cfg']['QueryHistoryMax']) {
        // history should not exceed a maximum count
        array_shift($_SESSION['sql_history']);
    }
    if (!$cfgRelation['historywork'] || !$GLOBALS['cfg']['QueryHistoryDB']) {
        return;
    }
    PMA_queryAsControlUser('INSERT INTO ' . PMA_Util::backquote($cfgRelation['db']) . '.' . PMA_Util::backquote($cfgRelation['history']) . '
              (`username`,
                `db`,
                `table`,
                `timevalue`,
                `sqlquery`)
        VALUES
              (\'' . PMA_Util::sqlAddSlashes($username) . '\',
               \'' . PMA_Util::sqlAddSlashes($db) . '\',
               \'' . PMA_Util::sqlAddSlashes($table) . '\',
               NOW(),
               \'' . PMA_Util::sqlAddSlashes($sqlquery) . '\')');
    PMA_purgeHistory($username);
}
开发者ID:mercysmart,项目名称:naikelas,代码行数:45,代码来源:relation.lib.php

示例3: unset

/**
 * Defines the frameset
 */
// loic1: If left light mode -> urldecode the db name
if (isset($lightm_db)) {
    // no longer urlencoded because of html entities in the db name
    //    $db    = urldecode($lightm_db);
    $db = $lightm_db;
    unset($lightm_db);
}
$url_query = PMA_generate_common_url(isset($db) ? $db : '');
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();
if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) {
    PMA_purgeHistory($cfg['Server']['user']);
}
$phpmain_hash = md5($cfg['PmaAbsoluteUri']);
$phpmain_hash_js = time();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
echo $available_languages[$lang][2];
?>
" lang="<?php 
echo $available_languages[$lang][2];
?>
" dir="<?php 
echo $text_dir;
?>
开发者ID:Apxe,项目名称:Rubin_final,代码行数:31,代码来源:index.php


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