mirror of
https://bitbucket.org/grumdrig/pq.git
synced 2026-09-29 16:54:01 -06:00
This is an ex post facto rendering of pq6 in its various versions in
svn, so that changes will be trackable thataway. As checked in, right here, this is PQ 6.0
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
<?
|
||||
$domain = 'progressquest';
|
||||
mysql_connect('localhost',$domain,'placenta') or die(mysql_error());
|
||||
mysql_select_db($domain) or die(mysql_error());
|
||||
mysql_query("
|
||||
CREATE TABLE IF NOT EXISTS access_log (
|
||||
time TIMESTAMP,
|
||||
ip CHAR(15),
|
||||
uri VARCHAR(100),
|
||||
user_agent VARCHAR(50),
|
||||
uid INTEGER DEFAULT 0,
|
||||
referer VARCHAR(250)
|
||||
)") or die(mysql_error());
|
||||
|
||||
if (!is_numeric($uid)) {
|
||||
$uid = rand();
|
||||
setcookie('uid', $uid, mktime(1,1,1,1,1,2030));
|
||||
}
|
||||
|
||||
$ip = mysql_escape_string($REMOTE_ADDR);
|
||||
$uri = mysql_escape_string($REQUEST_URI);
|
||||
$user_agent = mysql_escape_string($HTTP_USER_AGENT);
|
||||
$referer = mysql_escape_string($HTTP_REFERER);
|
||||
|
||||
mysql_query("INSERT INTO access_log
|
||||
(ip,uri,user_agent,uid,referer) VALUES
|
||||
('$ip','$uri','$user_agent',$uid,'$referer')") or die(mysql_error());
|
||||
?>
|
||||
Reference in New Issue
Block a user