source: irpg/trunk/htdocs/footer.php@ 1451

Last change on this file since 1451 was 1451, checked in by skalpette, 15 years ago

Import initial

File size: 1.4 KB
Line 
1 </div>
2 <div class="footer">
3 <p class="small">
4 Des questions ? Commentaires ? Suggestions ? Bugs ?
5 Contactez <a href="contact.php"><?php print $admin_email?></a> ou <?php print $admin_nick?>@IRC.
6 Pour les photos de filles nues, voyez avec <a href="mailto:jecht@nainwak.com">jechtounet</a>.
7<?php
8 $hits = file("hits.db");
9 $fp = fopen("hits.db", "w");
10 $thispage = explode("/",$_SERVER['PHP_SELF']);
11 $thispage = array_pop($thispage);
12 if ($fp == false) {
13 echo "Error: could not open file hits.db.";
14 }
15 $found = 0;
16 foreach ($hits as $line) {
17 list($page,$numhits,$date) = explode("\t",trim($line));
18 if ($page == $thispage) {
19 ++$numhits;
20 echo " Page visit&eacute;e $numhits fois depuis le $date";
21 $found = 1;
22 }
23 if ($fp) {
24 fwrite($fp,"$page\t$numhits\t$date\n");
25 }
26 }
27 if (!$found && $fp) {
28 echo " Page visit&eacute;e une fois depuis le ".strftime($dateformat,time());
29 fwrite($fp,$thispage."\t1\t".strftime($dateformat,time())."\n");
30 }
31 fclose($fp);
32?>
33
34 </p>
35 </div>
36 </body>
37</html>
Note: See TracBrowser for help on using the repository browser.