/[nuke]/html/counter.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /html/counter.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Fri Sep 22 07:22:13 2000 UTC (23 years, 7 months ago) by dpavlin
Branch: dbp, MAIN
CVS Tags: r3_6, HEAD
Changes since 1.1: +0 -0 lines
import of version 3.6

1 <?php
2
3 ######################################################################
4 # PHP-NUKE: Web Portal System
5 # ===========================
6 #
7 # Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
8 # http://www.ncc.org.ve/php-nuke.php
9 #
10 # This modules is to make some stats like browser, OS and hits
11 #
12 # This program is free software. You can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License.
15 ######################################################################
16
17 include("config.php");
18 mysql_pconnect("$dbhost", "$dbuname", "$dbpass");
19 @mysql_select_db("$dbname") or die ("Unable to select database");
20 if((ereg("Nav", $HTTP_USER_AGENT)) || (ereg("Gold", $HTTP_USER_AGENT)) || (ereg("X11", $HTTP_USER_AGENT)) || (ereg("en-US", $HTTP_USER_AGENT)) || (ereg("Netscape", $HTTP_USER_AGENT))) $browser = "Netscape";
21 elseif(ereg("MSIE", $HTTP_USER_AGENT)) $browser = "MSIE";
22 elseif(ereg("Lynx", $HTTP_USER_AGENT)) $browser = "Lynx";
23 elseif(ereg("Opera", $HTTP_USER_AGENT)) $browser = "Opera";
24 elseif(ereg("WebTV", $HTTP_USER_AGENT)) $browser = "WebTV";
25 elseif(ereg("Konqueror", $HTTP_USER_AGENT)) $browser = "Konqueror";
26 elseif((eregi("bot", $HTTP_USER_AGENT)) || (ereg("Google", $HTTP_USER_AGENT)) || (ereg("Slurp", $HTTP_USER_AGENT)) || (ereg("Scooter", $HTTP_USER_AGENT)) || (eregi("Spider", $HTTP_USER_AGENT)) || (eregi("Infoseek", $HTTP_USER_AGENT))) $browser = "Bot";
27 else $browser = "Other";
28
29 if(ereg("Win", $HTTP_USER_AGENT)) $os = "Windows";
30 elseif((ereg("Mac", $HTTP_USER_AGENT)) || (ereg("PPC", $HTTP_USER_AGENT))) $os = "Mac";
31 elseif(ereg("Linux", $HTTP_USER_AGENT)) $os = "Linux";
32 elseif(ereg("FreeBSD", $HTTP_USER_AGENT)) $os = "FreeBSD";
33 elseif(ereg("SunOS", $HTTP_USER_AGENT)) $os = "SunOS";
34 elseif(ereg("IRIX", $HTTP_USER_AGENT)) $os = "IRIX";
35 elseif(ereg("BeOS", $HTTP_USER_AGENT)) $os = "BeOS";
36 elseif(ereg("OS/2", $HTTP_USER_AGENT)) $os = "OS/2";
37 elseif(ereg("AIX", $HTTP_USER_AGENT)) $os = "AIX";
38 else $os = "Other";
39
40 mysql_query("update counter set count=count+1 where type='total' or var='$browser' or var='$os'");
41
42 ?>

  ViewVC Help
Powered by ViewVC 1.1.26