############################################################################### # ShowClicks 0.2 # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 1 Gold - SP 1.1 # # Released: December 2001; Updated March 22, 2002 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2002 Xnull (www.xnull.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # ############################################################################### $adminplver = "1 Gold - SP 1.1"; sub ShowClickLog { &is_admin; my($totalip,$totalclick,$totalbrow,$totalos,@log,@iplist,$date,@to,@from,@info,@os,@browser,@newiplist,@newbrowser,@newoslist,@newtolist,@newfromlist,$i,$curentry); fopen(LOG, "$vardir/clicklog.txt"); @log = ; fclose(LOG); $i = 0; foreach $curentry (@log) { ($iplist[$i],$date,$to[$i],$from[$i],$info[$i]) = split(/\|/, $curentry); $i++; } $i = 0; foreach $curentry (@info) { $curentry = lc($curentry); $curentry =~ s/;/ /g; $curentry =~ s/:/ /g; $curentry =~ s/"/ /g; $curentry =~ s/\)/ /g; $curentry =~ s/_/ /g; $curentry =~ s/-/ /g; $curentry =~ s/ / /g; if( index($curentry, "googlebot") > -1) { $browser[$i] = "GoogleBot (Robot of Google)";} elsif( index($curentry, "blitzbot\@tricus.net") > -1) { $browser[$i] = "BlitzBot (Robot of Blitzsuche)";} elsif( index($curentry, "abachobot") > -1) { $browser[$i] = "AbachoBot (Robot of Abacho)";} elsif( index($curentry, "ask jeeves") > -1) { $browser[$i] = "Ask Jeeves (Robot of Ask Jeeves)";} elsif( index($curentry, "bumblebee") > -1) { $browser[$i] = "Bumblebee (Robot of Relevare Web Index)";} elsif( index($curentry, "fAST-webcrawler") > -1) { $browser[$i] = "Fast-WebCrawler (Robot of Fast Search)";} elsif( index($curentry, "fAST-webcrawler") > -1) { $browser[$i] = "Fast-WebCrawler (Robot of Fast Search)";} elsif( index($curentry, "fast webcrawler") > -1) { $browser[$i] = "Fast-WebCrawler (Robot of Fast Search)";} elsif( index($curentry, "flashget") > -1) { $browser[$i] = "FlashGet (Download Tool)";} elsif( index($curentry, "freefind") > -1) { $browser[$i] = "Freefind Spider (Robot of FreeFind)";} elsif( index($curentry, "go!zilla") > -1) { $browser[$i] = "Go!Zilla (Download Tool)";} elsif( index($curentry, "gozilla") > -1) { $browser[$i] = "Go!Zilla (Download Tool)";} elsif( index($curentry, "ia archiver") > -1) { $browser[$i] = "IA Archiver (Robot of Alexa)";} elsif( index($curentry, "mercator") > -1) { $browser[$i] = "Mercator WebCrawler (Robot of AltaVista)";} elsif( index($curentry, "da 4.0") > -1) { $browser[$i] = "Download Accelerator (Download Tool) ";} elsif( index($curentry, "da 5.0") > -1) { $browser[$i] = "Download Accelerator (Download Tool) ";} elsif( index($curentry, "hpsearch.uni-trier.de") > -1) { $browser[$i] = "HomePage (Robot of HomePageSearch)";} elsif( index($curentry, "kit-fireball") > -1) { $browser[$i] = "Kit Fireball (Robot of Fireball/a>)";} elsif( index($curentry, "firefly/") > -1) { $browser[$i] = "Firefly (Robot of Fireball/a>)";} elsif( index($curentry, "metager-linkchecker") > -1) { $browser[$i] = "Metager LinkChecker (Robot of MetaGer)";} elsif( index($curentry, "metager-prechecker") > -1) { $browser[$i] = "Metager PreChecker (Robot of MetaGer)";} elsif( index($curentry, "scooter") > -1) { $browser[$i] = "Scooter (Robot of AltaVista)";} elsif( index($curentry, "zyborg") > -1) { $browser[$i] = "Zyborg (Robot of WISEnut)";} elsif( index($curentry, "slurp\@inktomi.com") > -1) { $browser[$i] = "Slurp (Robot of Inktomi)";} elsif( index($curentry, "slysearch") > -1) { $browser[$i] = "SlySearch Crawler (Robot)";} elsif( index($curentry, "opera/3.0") > -1) { $browser[$i] = "Opera 3.0";} elsif( index($curentry, "opera/4.0") > -1) { $browser[$i] = "Opera 4.0";} elsif( index($curentry, "opera/5.") > -1) { $browser[$i] = "Opera 5.x";} elsif( index($curentry, "opera 6.") > -1) { $browser[$i] = "Opera 6.x";} elsif( index($curentry, "opera/6.") > -1) { $browser[$i] = "Opera 6.x";} elsif( index($curentry, "aol-iweng 30.") > -1) { $browser[$i] = "AOL 3.0";} elsif( index($curentry, "aol 5.0") > -1) { $browser[$i] = "AOL 5.0";} elsif( index($curentry, "aol 6.0") > -1) { $browser[$i] = "AOL 6.0";} elsif( index($curentry, "bullseye") > -1) { $browser[$i] = "Intelliseek BullsEye";} elsif( index($curentry, "emailsiphon") > -1) { $browser[$i] = "Sonic Email Siphon (eMail Collector)";} elsif( index($curentry, "mercator-") > -1) { $browser[$i] = "Mercator Web Crawler (Download Tool)";} elsif( index($curentry, "ms frontpage express 2.0") > -1) { $browser[$i] = "MS FrontPage Express 2.0";} elsif( index($curentry, "ms frontpage 3.0") > -1) { $browser[$i] = "MS FrontPage 3.0";} elsif( index($curentry, "ms frontpage 4.0") > -1) { $browser[$i] = "MS FrontPage 4.0";} elsif( index($curentry, "netscape6/6.") > -1) { $browser[$i] = "Netscape 6.x";} elsif( index($curentry, "offline explorer") > -1) { $browser[$i] = "Offline Explorer (Download Tool)";} elsif( index($curentry, "qnx voyager 2.") > -1) { $browser[$i] = "QNX Voyager 2.x";} elsif( index($curentry, "powermarks/3.") > -1) { $browser[$i] = "Powermarks 3.x";} elsif( index($curentry, "powermarks/4.") > -1) { $browser[$i] = "Powermarks 4.x";} elsif( index($curentry, "rocketwriter") > -1) { $browser[$i] = "RocketWriter";} elsif( index($curentry, "staroffice/5.") > -1) { $browser[$i] = "StarOffice 5.x";} elsif( index($curentry, "staroffice/4.") > -1) { $browser[$i] = "StarOffice 4.x";} elsif( index($curentry, "teleport pro") > -1) { $browser[$i] = "Teleport Pro (Download Tool)";} elsif( index($curentry, "thelightofadamas") > -1) { $browser[$i] = "The Light of Adamas";} elsif( index($curentry, "webcopier") > -1) { $browser[$i] = "WebCopier (Download Tool)";} elsif( index($curentry, "webreaper/") > -1) { $browser[$i] = "WebReaper (Download Tool)";} elsif( index($curentry, "websauger/") > -1) { $browser[$i] = "WebSauger (Download Tool)";} elsif( index($curentry, "webstripper/") > -1) { $browser[$i] = "WebStripper (Download Tool)";} elsif( index($curentry, "webzip/") > -1) { $browser[$i] = "WebZip (Download Tool)";} elsif( index($curentry, "wget/") > -1) { $browser[$i] = "WGet (Download Tool)";} elsif( index($curentry, "willieview") > -1) { $browser[$i] = "Willieview";} elsif( index($curentry, "www4mail") > -1) { $browser[$i] = "www4mail";} elsif( index($curentry, "www/xl") > -1) { $browser[$i] = "WWW/XL";} elsif( index($curentry, "msie 6.0") > -1) { $browser[$i] = "MS Internet Explorer 6.0";} elsif( index($curentry, "msie 5.") > -1) { $browser[$i] = "MS Internet Explorer 5.x";} elsif( index($curentry, "msie 4.") > -1) { $browser[$i] = "MS Internet Explorer 4.x";} elsif( index($curentry, "msie 3.") > -1) { $browser[$i] = "MS Internet Explorer 3.x";} elsif( index($curentry, "msie 2.") > -1) { $browser[$i] = "MS Internet Explorer 2.x";} elsif( (index($curentry, "mozilla/4.") > -1)&& (index($curentry, "compatible") == -1)) { $browser[$i] = "Netscape 4.x"} elsif( (index($curentry, "mozilla/5.") > -1)&& (index($curentry, "compatible") == -1)) { $browser[$i] = "Netscape 5.x"} elsif( index($curentry, "rpt httpclient") > -1) { $browser[$i] = "RPT HTTPClient";} else {$browser[$i] = "$curentry"} # else {$browser[$i] = "Unknown"} if( index($curentry, "windows 98") > -1) { $os[$i] = "Windows 98";} elsif( index($curentry, "aix 1") > -1) { $os[$i] = "AIX 1";} elsif( index($curentry, "aix 2") > -1) { $os[$i] = "AIX 2";} elsif( index($curentry, "aix 3") > -1) { $os[$i] = "AIX 3";} elsif( index($curentry, "aix 4.") > -1) { $os[$i] = "AIX 4.x";} elsif( index($curentry, "amigaos/mc680x0") > -1) { $os[$i] = "Amiga OS MC 680x0";} elsif( index($curentry, "amigaos/ppc") > -1) { $os[$i] = "Amiga OS Power PC";} elsif( index($curentry, "amigaos 3.") > -1) { $os[$i] = "Amiga OS 3.x";} elsif( index($curentry, "amigaos") > -1) { $os[$i] = "Amiga OS";} elsif( index($curentry, "bsd/os") > -1) { $os[$i] = "BSD OS";} elsif( index($curentry, "beos") > -1) { $os[$i] = "BEOS";} elsif( index($curentry, "cp/m") > -1) { $os[$i] = "CP/M";} elsif( index($curentry, "chimera") > -1) { $os[$i] = "Chimera";} elsif( index($curentry, "dos") > -1) { $os[$i] = "DOS";} elsif( index($curentry, "freebsd") > -1) { $os[$i] = "FREEBSD";} elsif( index($curentry, "hp ux") > -1) { $os[$i] = "HP-UX";} elsif( index($curentry, "irix") > -1) { $os[$i] = "IRIX";} elsif( index($curentry, "javaos") > -1) { $os[$i] = "JavaOS";} elsif( index($curentry, "linux 1.") > -1) { $os[$i] = "Linux 1.x";} elsif( index($curentry, "linux 2.") > -1) { $os[$i] = "Linux 2.x";} elsif( index($curentry, "linux") > -1) { $os[$i] = "Linux";} elsif( index($curentry, "mac os 8.") > -1) { $os[$i] = "Macintosh 8.x";} elsif( index($curentry, "mac powerpc") > -1) { $os[$i] = "Macintosh Power PC";} elsif( index($curentry, "mac ppc") > -1) { $os[$i] = "Macintosh Power PC";} elsif( index($curentry, "macintosh") > -1) { if ( index($curentry, "ppc") > -1) { $os[$i] = "Macintosh Power PC";} elsif( index($curentry, "68k") > -1) { $os[$i] = "Macintosh 68000";} elsif( index($curentry, "68000") > -1) { $os[$i] = "Macintosh 68000";} } elsif( index($curentry, "mac 68000") > -1) { $os[$i] = "Macintosh 68000";} elsif( index($curentry, "mac 68k") > -1) { $os[$i] = "Macintosh 68000";} elsif( index($curentry, "macintosh") > -1) { $os[$i] = "Macintosh";} elsif( index($curentry, "neos") > -1) { $os[$i] = "NEOS";} elsif( index($curentry, "netbsd") > -1) { $os[$i] = "NETBSD";} elsif( index($curentry, "nt4") > -1) { $os[$i] = "Windows NT 4.x";} elsif( index($curentry, "os/2") > -1) { $os[$i] = "OS/2";} elsif( index($curentry, "osf1") > -1) { $os[$i] = "OSF1";} elsif( index($curentry, "risc os") > -1) { $os[$i] = "RISC OS";} elsif( index($curentry, "sunos") > -1) { $os[$i] = "SunOS";} elsif( index($curentry, "unix") > -1) { $os[$i] = "Unix";} elsif( index($curentry, "vm/cms") > -1) { $os[$i] = "VM/CMS";} elsif( index($curentry, "win23") > -1) { $os[$i] = "Windows 2.x";} elsif( index($curentry, "windows 3.1") > -1) { $os[$i] = "Windows 3.1";} elsif( index($curentry, "windows 4.") > -1) { $os[$i] = "Windows 4.x";} elsif( index($curentry, "win16") > -1) { $os[$i] = "Windows 3.1";} elsif( index($curentry, "win95") > -1) { $os[$i] = "Windows 95";} elsif( index($curentry, "windows 95") > -1) { $os[$i] = "Windows 95";} elsif( index($curentry, "windows nt 4.") > -1) { $os[$i] = "Windows NT 4.x";} elsif( index($curentry, "windows nt 5.") > -1) { $os[$i] = "Windows NT 5.x";} elsif( index($curentry, "windows nt") > -1) { $os[$i] = "Windows NT";} elsif( index($curentry, "wndows nt") > -1) { $os[$i] = "Windows NT";} elsif( index($curentry, "windowsnt") > -1) { $os[$i] = "Windows NT";} elsif( index($curentry, "windows ce") > -1) { $os[$i] = "Windows CE";} elsif( index($curentry, "win98") > -1) { $os[$i] = "Windows 98";} elsif( index($curentry, "win3.1") > -1) { $os[$i] = "Windows 3.1";} elsif( index($curentry, "win32") > -1) { $os[$i] = "Windows 32bit";} elsif( index($curentry, "winme") > -1) { $os[$i] = "Windows ME";} elsif( index($curentry, "win9x/nt") > -1) { $os[$i] = "Windows 32bit";} elsif( index($curentry, "winnt/win95") > -1) { $os[$i] = "Windows 32bit";} elsif( index($curentry, "win67") > -1) { $os[$i] = "Windows";} elsif( index($curentry, "windows") > -1) { $os[$i] = "Windows";} elsif( index($curentry, "win") > -1) { if ( index($curentry, "16bit") > -1) { $os[$i] = "Windows 3.x";} elsif( index($curentry, "nt") > -1) { $os[$i] = "Windows NT";} elsif( index($curentry, "32bit") > -1) { $os[$i] = "Windows 32bit";} } elsif( index($curentry, "z80") > -1) { $os[$i] = "Z 80";} elsif( index($curentry, "z-80") > -1) { $os[$i] = "Z 80";} elsif( index($curentry, "win") > -1) { $os[$i] = "Windows";} else { $os[$i] = "Unknown (likely robots)";} $i++; } $yymain .= qq~
  $txt{'693'}

$txt{'697'}

$txt{'694'}
~; for($i = 0; $i < @iplist; $i++) { $iplist{$iplist[$i]}++; } $i = 0; while(($key, $val ) = each(%iplist)) { $newiplist[$i] = [ $key, $val ]; $i++; } @newiplist = sort{$b->[1] <=> $a->[1] || uc{$a->[0]} cmp uc{$b->[0]}} @newiplist; $totalclick = @iplist; $totalip = @newiplist; $yymain .= qq~$txt{'742'}: $totalclick
~; $yymain .= qq~$txt{'743'}: $totalip

~; for($i = 0; $i < @newiplist; $i++) { if($newiplist[$i]->[0] =~ /\S+/) { if(-e("$memberdir/$newiplist[$i]->[0].dat")) { fopen(FILE, "$memberdir/$newiplist[$i]->[0].dat"); @clicksettings = ; fclose(FILE); $clicksettings[0] =~ s/[\n\r]//g; $yymain .= "[0]\">$clicksettings[1]  ($newiplist[$i]->[1])
\n"; } else { $yymain .= "$newiplist[$i]->[0]  ($newiplist[$i]->[1])
\n"; } } } $yymain .= qq~
$txt{'695'}
~; for($i = 0; $i < @browser; $i++) { $browser{$browser[$i]}++; } $i = 0; while(($key, $val ) = each(%browser)) { $newbrowser[$i] = [ $key, $val ]; $i++; } for($i = 0; $i < @os; $i++) { $os{$os[$i]}++; } $i = 0; while(($key, $val ) = each(%os) ) { $newoslist[$i] = [ $key, $val ]; $i++; } @newbrowser = sort{$b->[1] <=> $a->[1]} @newbrowser; @newoslist = sort{$b->[1] <=> $a->[1]} @newoslist; $totalbrow = @newbrowser; $yymain .= qq~$txt{'744'}: $totalbrow

~; for($i = 0; $i < @newbrowser; $i++) { if($newbrowser[$i]->[0] =~ /\S+/) { $yymain .= "$newbrowser[$i]->[0]  ($newbrowser[$i]->[1])
\n"; } } $yymain .= qq~
$txt{'696'}
~; $totalos = @newoslist; $yymain .= qq~$txt{'745'}: $totalos

~; for($i = 0; $i < @newoslist; $i++) { if($newoslist[$i]->[0] =~ /\S+/) { $yymain .= "$newoslist[$i]->[0]  ($newoslist[$i]->[1])
\n"; } } # start top forums $yymain .= qq~
$showclicktxt{'1'}
~; for($i = 0; $i < @to; $i++) { $to{$to[$i]}++; } $i = 0; while(($key, $val ) = each(%to)) { $newtolist[$i] = [ $key, $val ]; $newmsglist[$i] = $newtolist[$i]; $newproflist[$i] = $newtolist[$i]; $i++; } @newtolist = sort{$b->[1] <=> $a->[1]} @newtolist; @newmsglist = sort{$b->[1] <=> $a->[1]} @newmsglist; @newproflist = sort{$b->[1] <=> $a->[1]} @newproflist; for($i = 0; $i < @newtolist; $i++) { if($newtolist[$i]->[0] =~ /\S+/) { if( index($newtolist[$i]->[0], "board=") > -1 && index($newtolist[$i]->[0], "action=") == -1) { my @tmpboardname2 = split(/board=/,$newtolist[$i]->[0]); $tmpboardname = $tmpboardname2[1]; if(-e("$boardsdir/$tmpboardname.dat")) { fopen(FILE, "$boardsdir/$tmpboardname.dat"); @boardsettings = ; fclose(FILE); $tmpboardname = $boardsettings[0]; } $tmpboardlink = substr($newtolist[$i]->[0],index($newtolist[$i]->[0], "?"),length($newtolist[$i]->[0])); $yymain .= "$tmpboardname  ($newtolist[$i]->[1])
\n"; } } } # start top threads $yymain .= qq~
$showclicktxt{'2'}
~; for($i = 0; $i < @newmsglist; $i++) { if($newmsglist[$i]->[0] =~ /\S+/) { if( index($newmsglist[$i]->[0], "board=") > -1 && index($newmsglist[$i]->[0], "num=") > -1 && index($newmsglist[$i]->[0], "title=") == -1 && index($newmsglist[$i]->[0], "start=") == -1) { my @tmpmsgname2 = split(/num=/,$newmsglist[$i]->[0]); my $tmpmsgname = $tmpmsgname2[1]; if(-e("$datadir/$tmpmsgname.txt")) { fopen(FILE, "$datadir/$tmpmsgname.txt"); @boardsettings = ; fclose(FILE); $tmpmsgname = substr($boardsettings[0],0,index($boardsettings[0], "|")); } $tmpmsglink = substr($newmsglist[$i]->[0],index($newmsglist[$i]->[0], "?"),length($newmsglist[$i]->[0])); $yymain .= "$tmpmsgname  ($newmsglist[$i]->[1])
\n"; } # $yymain .= "$tmpmsgname  ($newmsglist[1])
\n"; } } } # Top Profiles $yymain .= qq~
$showclicktxt{'5'}
~; for($i = 0; $i < @newproflist; $i++) { if($newproflist[$i]->[0] =~ /\S+/) { if( index($newproflist[$i]->[0], "action=viewprofile") > -1 && index($newproflist[$i]->[0], "board=") == -1) { my @tmpprofname2 = split(/username=/,$newproflist[$i]->[0]); $tmpprofname = $tmpprofname2[1]; $tmpproflink = substr($newproflist[$i]->[0],index($newproflist[$i]->[0], "?"),length($newproflist[$i]->[0])); if(-e("$memberdir/$tmpprofname.dat")) { fopen(FILE, "$memberdir/$tmpprofname.dat"); @clicksettings = ; fclose(FILE); $clicksettings[0] =~ s/[\n\r]//g; $yymain .= "$clicksettings[1]  ($newproflist[$i]->[1])
\n"; } } } } # Referrer $yymain .= qq~
$showclicktxt{'3'}
~; for($i = 0; $i < @from; $i++) { $from{$from[$i]}++; } $i = 0; while(($key, $val ) = each(%from)) { $newfromlist[$i] = [ $key, $val ]; $i++; } @newfromlist = sort{$b->[1] <=> $a->[1]} @newfromlist; for($i = 0; $i < @newfromlist; $i++) { if($newfromlist[$i]->[0] =~ /\S+/ && $newfromlist[$i]->[0] !~ m~$boardurl~i) { $yymain .= "[0] target=\"_blank\">$newfromlist[$i]->[0]  ($newfromlist[$i]->[1])
\n"; } } $yymain .= qq~
~; $yytitle = $txt{'693'}; &template; exit; } 1;