Just configured from Wine's GIT

svn path=/; revision=1
This commit is contained in:
2009-10-09 00:08:02 +00:00
commit 2782475c4f
3000 changed files with 59244 additions and 0 deletions

41
include/appdb.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
function log_category_visit($catId)
{
global $REMOTE_ADDR;
$result = query_parameters("SELECT * FROM catHitStats WHERE ip = '?' AND catId = '?'",
$REMOTE_ADDR, $catId);
if($result && query_num_rows($result) == 1)
{
$oStatsRow = query_fetch_object($result);
query_parameters("UPDATE catHitStats SET count = count + 1 WHERE catHitId = '?'",
$oStatsRow->catHitId);
} else
{
query_parameters("INSERT INTO catHitStats (appHitId, time, ip, catId, count) ".
"VALUES (?, ?, '?', '?', '?')",
"null", "null", $REMOTE_ADDR, $catId, "1");
}
}
function log_application_visit($appId)
{
global $REMOTE_ADDR;
$result = query_parameters("SELECT * FROM appHitStats WHERE ip = '?' AND appId = '?'",
$REMOTE_ADDR, $appId);
if($result && query_num_rows($result) == 1)
{
$stats = query_fetch_object($result);
query_parameters("UPDATE appHitStats SET count = count + 1 WHERE appHitId = '?'",
$stats->appHitId);
} else
{
query_parameters("INSERT INTO appHitStats (appHitId, time, ip, appId, count) ".
"VALUES (?, ?, '?', '?', '?')",
"null", "null", $REMOTE_ADDR, $appId, "1");
}
}
?>