mirror of
https://github.com/Newnetirc/idlerpg-web.git
synced 2026-11-06 12:55:38 +00:00
first commit
This commit is contained in:
commit
21e4690338
31 files changed
+2349
No files matched your search
+35
@@ -0,0 +1,35 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p class="small">
|
||||
Questions? Comments? Suggestions? Bugs?
|
||||
<a href="contact.php"><?php print $admin_email?></a> or <?php print $admin_nick?>@IRC.
|
||||
<?php
|
||||
$hits = file("hits.db");
|
||||
$fp = fopen("hits.db", "w");
|
||||
$thispage = explode("/",$_SERVER['PHP_SELF']);
|
||||
$thispage = array_pop($thispage);
|
||||
if ($fp == false) {
|
||||
echo "Error: could not open file hits.db.";
|
||||
}
|
||||
foreach ($hits as $line) {
|
||||
list($page,$numhits,$date) = explode("\t",trim($line));
|
||||
if ($page == $thispage) {
|
||||
++$numhits;
|
||||
echo " $numhits hits since $date";
|
||||
$found = 1;
|
||||
}
|
||||
if ($fp) {
|
||||
fwrite($fp,"$page\t$numhits\t$date\n");
|
||||
}
|
||||
}
|
||||
if (!$found && $fp) {
|
||||
echo " 1 hit since ".date("M j, Y",time());
|
||||
fwrite($fp,$thispage."\t1\t".date("M j, Y",time())."\n");
|
||||
}
|
||||
fclose($fp);
|
||||
?>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user