本文整理汇总了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'])) {
示例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);
}
示例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;
?>