📄 access.inc.php
字号:
<?php
class Access
{
function Access()
{
if($_SESSION['auth'])
{
/*
* Modified: 11/23/05
* Justin Osterholt
* Settings sql as global in function
*/
GLOBAL $sql;
$query = $sql->query("INSERT INTO access (id, session, host, filename, method, level, date) VALUES ('{$_SESSION['auth']['id']}', '{$_SESSION['auth']['sid']}', '{$_SESSION['auth']['host']}', '" . basename($_SERVER['SCRIPT_FILENAME']) . "', '" . $this->method() . "', '{$_SESSION['auth']['admin']}', NOW())") or die(mysql_error());
}
}
function method()
{
switch($_SERVER['REQUEST_METHOD'])
{
case 'GET':
$this->method = TRUE;
break;
case 'POST':
$this->method = FALSE;
break;
}
return $this->method;
}
}
$access = new Access;
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -