F:\WEBSITES\testbed\zipped\yabb_svn_new\branches\2.5.2\cgi-bin\yabb2\Admin\Admin.pl F:\WEBSITES\testbed\zipped\yabb_svn_new\trunk\cgi-bin\yabb2\Admin\Admin.pm
############################################################################### ###############################################################################
# Admin.pl                                                                    # # Admin.pm                                                                    #
  # $Date: 01.05.16 $                                                           #
############################################################################### ###############################################################################
# YaBB: Yet another Bulletin Board                                            # # YaBB: Yet another Bulletin Board                                            #
# Open-Source Community Software for Webmasters                               # # Open-Source Community Software for Webmasters                               #
# Version:        YaBB 2.5.2                                                  # # Version:        YaBB 2.6.12                                                 #
# Packaged:       October 21, 2012                                            # # Packaged:       January 5, 2016                                             #
# Distributed by: http://www.yabbforum.com                                    # # Distributed by: http://www.yabbforum.com                                    #
# =========================================================================== # # =========================================================================== #
# Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved.     # # Copyright (c) 2000-2016 YaBB (www.yabbforum.com) - All Rights Reserved.     #
# Software by:  The YaBB Development Team                                     # # Software by:  The YaBB Development Team                                     #
#               with assistance from the YaBB community.                      # #               with assistance from the YaBB community.                      #
############################################################################### ###############################################################################
  use CGI::Carp qw(fatalsToBrowser);
  use CGI qw(:standard);
  use English qw(-no_match_vars);
  use Time::Local;
  our $VERSION = '2.6.12';
   
$adminplver  = 'YaBB 2.5.2 $Revision: 1.1 $'; $adminpmver = 'YaBB 2.6.12 $Revision: 1676 $';
  LoadLanguage('Credits');
   
sub Admin {  get_template('AdminCentre'); 
   &is_admin_or_gmod;  
   
   $yymain .= qq~  sub Admin { 
<div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;">     is_admin_or_gmod(); 
  <table width="100%" cellspacing="1" cellpadding="4">  
    <tr valign="middle">  
      <td align="left" class="titlebg" colspan="2">  
       <b>$admintxt{'1'}</b>  
     </td>  
    </tr>  
    <tr valign="middle">  
      <td align="left" class="windowbg2">  
       <img alt="Admin Centre Logo" src="$defaultimagesdir/aarea.jpg" />  
      </td>  
      <td align="left" class="windowbg2">  
       $admintxt{'2'}  
     </td>  
    </tr>  
  </table>  
</div>  
   
<br />  
   
<div style="float: left; width: 49%; text-align: left;">  
   
<div class="bordercolor" style="padding: 0px; width: 95%; margin-left: 0px; margin-right: auto;">  
  <table width="100%" cellspacing="1" cellpadding="4">  
    <tr valign="middle">  
      <td align="left" class="titlebg">  
       <b>$admintxt{'6'}</b>  
     </td>  
    </tr>  
    <tr align="center" valign="middle">  
      <td align="left" class="catbg">  
       <span class="small">YaBB 2</span>  
      </td>  
    </tr>  
    <tr valign="middle">  
      <td align="left" class="windowbg2"><br />  
Ron Hartendorp, Andrew Aitken, Carsten Dalgaard, Ryan Farrington, Zoltan Kovacs, Tim Ceuppens, Shoeb Omar, Torsten Mrotz, Brian Schaefer, Juvenall Wilson, Corey Chapman, Christer Jenson, Adrian Kreher, Steve Brereton, Jeffrey Man, Boris Tjuvanov, Detlef Pilzecker, Calvin Goodman<br /><br />  
     </td>  
    </tr>  
    <tr align="center" valign="middle">  
      <td align="left" class="catbg">  
       <span class="small">YaBB 2.5.2</span>  
      </td>  
    </tr>  
    <tr valign="middle">  
      <td align="left" class="windowbg2"><br />  
Jon Baker, Derek Barnstorm, Carsten Dalgaard, John G.D. McCabe, D.A. Rorabaugh.<br />Included Mods in YaBB 2.5.2 written by Derek Barnstorm, Carsten Dalgaard, and D.A. Rorabaugh.<br /><br />  
Dedicated to the memory of Ron Hartendorp, AKA Spikecity. He left us too soon. <br /><br />  
     </td>  
    </tr>  
    <tr align="center" valign="middle">  
      <td align="left" class="catbg">  
       <span class="small">$yabbThanks</span>  
      </td>  
    </tr>  
    <tr valign="middle">  
      <td align="left" class="windowbg2"><br />  
Dave Baughman, Bjoern Berg, Corey Chapman, Peter Crouch, ejdmoo, Dave G, Christian Land, Jeff Lewis, Gunther Meyer, Darya Misse, Parham Mofidi, AstroPilot, Torsten Mrotz, Carey P, Popeye, Michael Prager, Matt Siegman, Jay Silverman, StarSaber, Marco van Veelen, Myhailo Danylenko, $yabb2Credits<br /><br />  
$noBytesHarmed<br /><br />  
     </td>  
    </tr>  
  </table>  
</div>  
   
<br />  
   
<div class="bordercolor" style="padding: 0px; width: 95%; margin-left: 0px; margin-right: auto;">  
 <script language="javascript" src="http://www.yabbforum.com/update/versioncheck.js" type="text/javascript"></script>  
 <script language="JavaScript" type="text/javascript">  
 <!-- //hide from dinosaurs  
   document.write('<table width="100%" cellspacing="1" cellpadding="4">');  
   document.write('<tr><td colspan="2" class="titlebg"><b>$admintxt{'3'}</b></td></tr>');  
   document.write('<tr><td class="windowbg2">$versiontxt{'4'}</td><td class="windowbg2"><b>$YaBBversion</b></td></tr>');  
   if (!STABLE) {  
       document.write('<tr><td colspan="2" class="titlebg">$rna</b></td></tr>');  
   } else {  
       document.write('<tr><td class="windowbg2">$versiontxt{'5'}</td><td class="windowbg2"><b>'+STABLE+'</b></td></tr>');  
       document.write('<tr><td class="windowbg2">$versiontxt{'7'}</td><td class="windowbg2"><b>'+BETA+'</b></td></tr>');  
       document.write('<tr><td class="windowbg2">$versiontxt{'8'}</td><td class="windowbg2"><b>'+ALPHA+'</b></td></tr>');  
       if (STABLE == "$YaBBversion") {  
           document.write('<tr><td colspan="2" valign="middle" class="windowbg2"><br />$versiontxt{'6'}<br /><br /></td></tr>');  
       } else {  
           document.write('<tr><td colspan="2" valign="middle" class="windowbg2"><br />$versiontxt{'2'}'+STABLE+'$versiontxt{'3'}<br /><br /></td></tr>');  
       }  
   }  
   document.write('</table>');  
 // -->  
 </script>  
 <noscript>$versiontxt{'1'}</noscript>  
</div>  
   
</div>     $my_lastlogin = GetLastLogins(); 
<div style="float: left; width: 50%; text-align: right;">  
   
<div class="bordercolor" style="padding: 0px; width: 100%; margin-left: auto; margin-right: 0px;">     $yymain .= $front_page; 
  <table width="100%" cellspacing="1" cellpadding="4">     $yymain =~ s/{yabb iFrameSupport}/$iFrameSupport/sm; 
    <tr valign="middle">     $yymain =~ s/{yabb YaBBversion}/$YaBBversion/gsm; 
      <td align="left" class="titlebg">     $yymain =~ s/{yabb lastlogins}/$my_lastlogin/sm; 
       <b>$admintxt{'4'}</b>  
     </td>  
    </tr>  
    <tr valign="middle">  
      <td align="left" class="windowbg2">  
       <iframe src="http://www.yabbforum.com/update/" frameborder="0" width="100%" height="293">$iFrameSupport</iframe>  
     </td>  
    </tr>  
  </table>  
</div>  
   
<br />  
   
<div class="bordercolor" style="padding: 0px; width: 100%; margin-left: auto; margin-right: 0px;">  
  <table width="100%" cellspacing="1" cellpadding="4">  
    <tr valign="middle">  
      <td align="left" class="titlebg">  
       <b>$admintxt{'5'}</b>  
     </td>  
    </tr>  
    <tr valign="middle">  
      <td align="left" class="windowbg2">~;  
   
   &GetLastLogins;  
   
   $yymain .= qq~  
     </td>  
    </tr>  
  </table>  
</div>~;  
   
   if (-d "./Convert") {  
       $yymain .= qq~  
<br />  
<div class="bordercolor" style="padding: 0px; width: 100%; margin-left: auto; margin-right: 0px;">  
<form name="backdelete" action="$adminurl?action=convdelete" method="post">  
<table width="100%" cellspacing="1" cellpadding="4">  
   <tr valign="middle">  
   <td align="left" class="titlebg">  
       <b>$admintxt{'7'}</b>  
   </td>  
   </tr>  
   <tr valign="middle">  
   <td align="left" class="windowbg2"><br />  
       $admintxt{'8'}<br /><br />  
   </td>  
   </tr>  
   <tr valign="middle">  
   <td align="center" class="catbg">  
       <input type="submit" value="$admintxt{'9'}" class="button" />  
   </td>  
   </tr>  
</table>  
</form>  
</div>~;  
   }  
   
   $yymain .= qq~     if ( -d './Convert' ) { 
</div>~;        $yymain .= $convert_box; 
     }
   
   require "$admindir/ModuleChecker.pl";     $yymain .= $last_div; 
   
   $yymain .= qq~     require Admin::ModuleChecker; 
<div style="float: left; padding: 0px; width: 99%; margin-left: 0px; margin-right: auto; height: 100px;">&nbsp;</div>  
~;  
   
   $yytitle = "$admin_txt{'208'}";    $yytitle = "$admin_txt{'208'}";
   &AdminTemplate;     AdminTemplate(); 
     return;
} }
   
sub DeleteConverterFiles { sub DeleteConverterFiles {
   my @convertdir = qw~Boards Members Messages Variables~;    my @convertdir = qw~Boards Members Messages Variables~;
   
   foreach $cnvdir (@convertdir) {    foreach my $cnvdir (@convertdir) {
       $convdir = "./Convert/$cnvdir";        $convdir = "./Convert/$cnvdir";
       if (-d "$convdir") {        if ( -d "$convdir" ) {
           opendir("CNVDIR", $convdir) || &admin_fatal_error("cannot_open_dir","$convdir");             opendir 'CNVDIR', $convdir 
           @convlist = readdir("CNVDIR");               || fatal_error( 'cannot_open_dir', "$convdir" ); 
           closedir("CNVDIR");             @convlist = readdir 'CNVDIR'; 
           foreach $file (@convlist) {             closedir 'CNVDIR'; 
               unlink "$convdir/$file" || &admin_fatal_error("cannot_open_dir","$convdir/$file");             foreach my $file (@convlist) { 
           }                 unlink "$convdir/$file" 
           rmdir("$convdir");                   || fatal_error( 'cannot_open_dir', "$convdir/$file" ); 
       }            }
   }             rmdir "$convdir"; 
   $convdir = "./Convert";         } 
   if (-d "$convdir") {     } 
       opendir("CNVDIR", $convdir) || &admin_fatal_error("cannot_open_dir","$convdir");     $convdir = './Convert'; 
       @convlist = readdir("CNVDIR");     if ( -d "$convdir" ) { 
       closedir("CNVDIR");         opendir 'CNVDIR', $convdir 
       foreach $file (@convlist) {           || fatal_error( 'cannot_open_dir', "$convdir" ); 
           unlink "$convdir/$file";         @convlist = readdir 'CNVDIR'; 
       }         closedir 'CNVDIR'; 
       rmdir("$convdir");         foreach my $file (@convlist) { 
   }             unlink "$convdir/$file"; 
   if (-e "./Setup.pl") { unlink("./Setup.pl"); }        }
         rmdir "$convdir";
   $yymain .= qq~<b>$admintxt{'10'}</b>~;     } 
   $yytitle = "$admintxt{'10'}";     if ( -e './Setup.pl' )        { unlink './Setup.pl'; } 
   &AdminTemplate;     if ( -e './Convert.pl' )      { unlink './Convert.pl'; } 
     if ( -e './Convert2x.pl' )    { unlink './Convert2x.pl'; }
     if ( -e './BoardConvert.pl' ) { unlink './BoardConvert.pl'; }
     if ( -e "$htmldir/Templates/Forum/setup.css" ) {
         unlink "$htmldir/Templates/Forum/setup.css";
     }
     if ( -e './Variables/ConvSettings.txt' ) {
         unlink './Variables/ConvSettings.txt';
     }
   
     $yymain .= qq~<b>$admintxt{'10'}</b>~;
     $yytitle = "$admintxt{'10'}";
     AdminTemplate();
     return;
} }
   
sub GetLastLogins { sub GetLastLogins {
   fopen(ADMINLOG, "$vardir/adminlog.txt");     fopen( ADMINLOG, "$vardir/adminlog_new.txt" ); 
   @adminlog = <ADMINLOG>;    @adminlog = <ADMINLOG>;
   fclose(ADMINLOG);    fclose(ADMINLOG);
     @adminlog = reverse sort @adminlog;
   foreach $line (@adminlog) {  
       chomp $line;     foreach my $line (@adminlog) { 
       @element = split(/\|/, $line);         chomp $line; 
       if (!${$uid.$element[0]}{'realname'}) { &LoadUser($element[0]); }    # If user is not in memory, s/he must be loaded.         @element = split /\|/xsm, $line; 
       $element[2] = &timeformat($element[2]);         if ( !${ $uid . $element[1] }{'realname'} ) { 
       $yymain .= qq~             LoadUser( $element[1] ); 
       <a href="$scripturl?action=viewprofile;username=$useraccount{$element[0]}">${$uid.$element[0]}{'realname'}</a> <span class="small">($element[1]) - $element[2]</span><br />         }    # If user is not in memory, s/he must be loaded. 
       ~;         $element[0] = timeformat( $element[0] ); 
   }         my $lookupIP = 
           ($ipLookup)
           ? qq~<a href="$scripturl?action=iplookup;ip=$element[2]">$element[2]</a>~
           : qq~$element[1]~;
         $loginadmin .= qq~
                 <a href="$scripturl?action=viewprofile;username=$useraccount{$element[1]}">${$uid.$element[1]}{'realname'}</a> <span class="small">($lookupIP) - $element[0]</span><br />
                 ~;
     }
     return $loginadmin;
} }
   
sub FullStats { sub FullStats {
   &is_admin_or_gmod;     is_admin_or_gmod(); 
   my ($numcats, $numboards, $threadcount, $messagecount, $maxdays, $totalt, $totalm, $avgt, $avgm);     my ( $numcats, $numboards, $maxdays, $totalt, $totalm, $avgm ); 
   my ($memcount, $latestmember) = &MembershipGet;     my ( $memcount, $latestmember ) = MembershipGet(); 
   &LoadUser($latestmember);     LoadUser($latestmember); 
   $thelatestmember = qq~<a href="$scripturl?action=viewprofile;username=$useraccount{$latestmember}">${$uid.$latestmember}{'realname'}</a>~;     $thelatestmember = 
   $memcount ||= 1;  qq~<a href="$scripturl?action=viewprofile;username=$useraccount{$latestmember}">${$uid.$latestmember}{'realname'}</a>~; 
     $memcount ||= 1;
   $numcats = 0;  
     $numcats = 0;
   unless ($mloaded == 1) { require "$boardsdir/forum.master"; }  
   foreach $catid (@categoryorder) {     get_forum_master(); 
       $boardlist = $cat{$catid};     foreach my $catid (@categoryorder) { 
       $numcats++;         $boardlist = $cat{$catid}; 
       (@bdlist) = split(/\,/, $boardlist);         $numcats++; 
       ($catname, $catperms, $catallowcol) = split(/\|/, $catinfo{"$catid"});         @bdlist = split /\,/xsm, $boardlist; 
         my ( $catname, $catperms, $catallowcol ) =
       foreach $curboard (@bdlist) {           split /\|/xsm, $catinfo{$catid}; 
           chomp $curboard;  
           $numboards++;         foreach my $curboard (@bdlist) { 
           push(@loadboards, $curboard);             chomp $curboard; 
       }             $numboards++; 
   }             push @loadboards, $curboard; 
         }
   &BoardTotals("load", @loadboards);     } 
   foreach $curboard (@loadboards) {  
       $totalm += ${$uid.$curboard}{'messagecount'};     BoardTotals( 'load', @loadboards ); 
       $totalt += ${$uid.$curboard}{'threadcount'};     foreach my $curboard (@loadboards) { 
   }         $totalm += ${ $uid . $curboard }{'messagecount'}; 
         $totalt += ${ $uid . $curboard }{'threadcount'};
   $avgm = int($totalm / $memcount);     } 
   &LoadAdmins;  
     $avgm = int( $totalm / $memcount );
   if ($enableclicklog) {     LoadAdmins(); 
       my (@log);  
       fopen(LOG, "$vardir/clicklog.txt");     if ($enableclicklog) { 
       @log = <LOG>;         my (@log); 
       fclose(LOG);         fopen( LOG, "<$vardir/clicklog.txt" ); 
       $yyclicks    = @log;         @log = <LOG>; 
       $yyclicks = &NumberFormat($yyclicks);         fclose(LOG); 
       $yyclicktext = $admin_txt{'692'};         $yyclicks    = @log; 
       $yyclicklink = qq~&nbsp;(<a href="$adminurl?action=showclicks">$admin_txt{'693'}</a>)~;         $yyclicks    = NumberFormat($yyclicks); 
   } else {         $yyclicktext = $admin_txt{'692'}; 
       $yyclicktext = $admin_txt{'692a'};         $yyclicklink = 
       $yyclicklink = "";  qq~&nbsp;(<a href="$adminurl?action=showclicks">$admin_txt{'693'}</a>)~; 
   }    }
   my (@elog);     else { 
   fopen(ELOG, "$vardir/errorlog.txt");         $yyclicktext = $admin_txt{'692a'}; 
   @elog = <ELOG>;         $yyclicklink = q{}; 
   fclose(ELOG);     } 
   $errorslog = @elog;     my (@elog); 
   $memcount = &NumberFormat($memcount);     fopen( ELOG, "$vardir/errorlog.txt" ); 
   $totalt = &NumberFormat($totalt);     @elog = <ELOG>; 
   $totalm = &NumberFormat($totalm);     fclose(ELOG); 
   $avgm = &NumberFormat($avgm);     $errorslog = @elog; 
   $errorslog = &NumberFormat($errorslog);     $memcount  = NumberFormat($memcount); 
     $totalt    = NumberFormat($totalt);
   $yymain .= qq~     $totalm    = NumberFormat($totalm); 
<div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;">     $avgm      = NumberFormat($avgm); 
  <table width="100%" cellspacing="1" cellpadding="4">     $errorslog = NumberFormat($errorslog); 
    <tr valign="middle">  
     <td align="left" class="titlebg">     $yymain .= qq~ 
       <img src="$imagesdir/info.gif" alt="" border="0" /> <b>$admintxt{'28'}</b>  <div class="bordercolor rightboxdiv"> 
     </td>     <table class="border-space pad-cell" style="margin-bottom: .5em;"> 
    </tr>         <tr> 
    <tr valign="middle">             <td class="titlebg"> 
     <td align="left" class="catbg">                 $admin_img{'infoimg'} <b>$admintxt{'28'}</b> 
      <i>$admin_txt{'94'}</i>             </td> 
     </td>         </tr><tr> 
    </tr>             <td class="catbg"> 
    <tr valign="middle">                 <i>$admin_txt{'94'}</i> 
     <td align="left" class="windowbg2"><br />             </td> 
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'488'}</div>         </tr><tr> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$memcount</div>             <td class="windowbg2"> 
      <br />                 <div class="pad-more"> 
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'490'}</div>                     <div class="admin-total-left">$admin_txt{'488'}</div> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$totalt</div>                     <div class="admin-total-right">$memcount</div> 
      <br />                    <br />
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'489'}</div>                     <div class="admin-total-left">$admin_txt{'490'}</div> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$totalm</div>                     <div class="admin-total-right">$totalt</div> 
      <br />                    <br />
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admintxt{'39'}</div>                     <div class="admin-total-left">$admin_txt{'489'}</div> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$avgm</div>                     <div class="admin-total-right">$totalm</div> 
      <br />                    <br />
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'658'}</div>                     <div class="admin-total-left">$admintxt{'39'}</div> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$numcats</div>                     <div class="admin-total-right">$avgm</div> 
      <br />                    <br />
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'665'}</div>                     <div class="admin-total-left">$admin_txt{'658'}</div> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$numboards</div>                     <div class="admin-total-right">$numcats</div> 
      <br />                    <br />
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$errorlog{'3'}</div>                     <div class="admin-total-left">$admin_txt{'665'}</div> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$errorslog</div>                     <div class="admin-total-right">$numboards</div> 
      <br />                    <br />
      <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'691'}&nbsp;<span class="small">($yyclicktext)</span></div>                     <div class="admin-total-left">$errorlog{'3'}</div> 
      <div style="float: left; width: 10%; text-align: right; padding-top: 2px; padding-bottom: 2px;">$yyclicks</div>                     <div class="admin-total-right">$errorslog</div> 
      <div style="float: left; width: 55%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$yyclicklink</div>                     <br /> 
      <br />&nbsp;<br />                     <div class="admin-total-left">$admin_txt{'691'}&nbsp;<span class="small">($yyclicktext)</span></div> 
     </td>                     <div class="admin-total-right">$yyclicks</div> 
    </tr>                     <div class="admin-total-left" style="width:55%">$yyclicklink</div> 
    <tr valign="middle">                 </div> 
      <td align="left" class="catbg">             </td> 
       <i>$admin_txt{'657'}</i>         </tr><tr> 
     </td>             <td class="catbg"> 
    </tr>                 <i>$admin_txt{'657'}</i> 
    <tr valign="middle">             </td> 
      <td align="left" class="windowbg2"><br />         </tr><tr> 
       <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'656'}</div>             <td class="windowbg2"> 
       <div style="float: left; width: 65%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$thelatestmember</div>                 <div class="pad-more"> 
       <br />                     <div class="admin-total-left">$admin_txt{'656'}</div> 
       <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'659'}</div>                     <div class="admin-total-mid">$thelatestmember</div> 
       <div style="float: left; width: 65%; text-align: left; padding-top: 2px; padding-bottom: 2px;">                     <br /> 
       ~;                     <div class="admin-total-left">$admin_txt{'659'}</div> 
                     <div class="admin-total-mid">~;
   # Sorts the threads to find the most recent post  
   # No need to check for board access here because only admins have access to this page  # Sorts the threads to find the most recent post 
   unless ($mloaded == 1) { require "$boardsdir/forum.master"; }  # No need to check for board access here because only admins have access to this page 
   foreach $catid (@categoryorder) {     get_forum_master(); 
       $boardlist = $cat{$catid};     foreach my $catid (@categoryorder) { 
       (@bdlist) = split(/\,/, $boardlist);         $boardlist = $cat{$catid}; 
       foreach $curboard (@bdlist) {         @bdlist = split /\,/xsm, $boardlist; 
           push(@goodboards, $curboard);         foreach my $curboard (@bdlist) { 
       }             push @goodboards, $curboard; 
   }        }
     }
   &BoardTotals("load", @goodboards);  
   # &getlog; not used here !!?     BoardTotals( 'load', @goodboards ); 
   foreach $curboard (@goodboards) {  
       chomp $curboard;     # &getlog; not used here !!? 
       $lastposttime = ${$uid.$curboard}{'lastposttime'};     foreach my $curboard (@goodboards) { 
       $lastposttime{$curboard} = &timeformat(${$uid.$curboard}{'lastposttime'});         chomp $curboard; 
       ${$uid.$curboard}{'lastposttime'} = ${$uid.$curboard}{'lastposttime'} eq 'N/A' || !${$uid.$curboard}{'lastposttime'} ? $boardindex_txt{'470'} : ${$uid.$curboard}{'lastposttime'};         $lastposttime = ${ $uid . $curboard }{'lastposttime'}; 
       $lastpostrealtime{$curboard} = ${$uid.$curboard}{'lastposttime'} eq 'N/A' || !${$uid.$curboard}{'lastposttime'} ? '' : ${$uid.$curboard}{'lastposttime'};         if ( $lastposttime =~ /^[0-9]+$/sm ) { 
       if (${$uid.$curboard}{'lastposter'} =~ m~\AGuest-(.*)~) {             $lastposttime{$curboard} = 
           ${$uid.$curboard}{'lastposter'} = $1;                 timeformat( $lastposttime ); 
           $lastposterguest{$curboard} = 1;         } 
       }         ${ $uid . $curboard }{'lastposttime'} = 
       ${$uid.$curboard}{'lastposter'} = ${$uid.$curboard}{'lastposter'} eq 'N/A' || !${$uid.$curboard}{'lastposter'} ? $boardindex_txt{'470'} : ${$uid.$curboard}{'lastposter'};           ${ $uid . $curboard }{'lastposttime'} eq 'N/A' 
       ${$uid.$curboard}{'messagecount'} = ${$uid.$curboard}{'messagecount'} || 0;           || !${ $uid . $curboard }{'lastposttime'} 
       ${$uid.$curboard}{'threadcount'} = ${$uid.$curboard}{'threadcount'} || 0;           ? $boardindex_txt{'470'} 
       $totalm += ${$uid.$curboard}{'messagecount'};           : ${ $uid . $curboard }{'lastposttime'}; 
       $totalt += ${$uid.$curboard}{'threadcount'};         $lastpostrealtime{$curboard} = 
           ${ $uid . $curboard }{'lastposttime'} eq 'N/A' 
       # determine the true last post on all the boards a user has access to           || !${ $uid . $curboard }{'lastposttime'} 
       if ($lastposttime > $lastthreadtime) {           ? q{} 
           $lsdatetime = &timeformat($lastposttime);           : ${ $uid . $curboard }{'lastposttime'}; 
           $lsposter = ${$uid.$curboard}{'lastposter'};         if ( ${ $uid . $curboard }{'lastposter'} =~ m{\AGuest-(.*)}xsm ) { 
           $lssub = ${$uid.$curboard}{'lastsubject'};             ${ $uid . $curboard }{'lastposter'} = $1; 
           $lspostid = ${$uid.$curboard}{'lastpostid'};             $lastposterguest{$curboard} = 1; 
           $lsreply = ${$uid.$curboard}{'lastreply'};         } 
           $lastthreadtime = $lastposttime;         ${ $uid . $curboard }{'lastposter'} = 
       }           ${ $uid . $curboard }{'lastposter'} eq 'N/A' 
   }           || !${ $uid . $curboard }{'lastposter'} 
   ($lssub, undef) = &Split_Splice_Move($lssub,0);           ? $boardindex_txt{'470'} 
   &ToChars($lssub);           : ${ $uid . $curboard }{'lastposter'}; 
   $yymain .= qq~<a href="$scripturl?num=$lspostid/$lsreply#$lsreply">$lssub</a> ($lsdatetime)</div>         ${ $uid . $curboard }{'messagecount'} = 
       <br />           ${ $uid . $curboard }{'messagecount'} || 0; 
       <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'684'}</div>         ${ $uid . $curboard }{'threadcount'} = 
       <div style="float: left; width: 65%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$administrators</div>           ${ $uid . $curboard }{'threadcount'} || 0; 
       <br />         $totalm += ${ $uid . $curboard }{'messagecount'}; 
       <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'684a'}</div>         $totalt += ${ $uid . $curboard }{'threadcount'}; 
       <div style="float: left; width: 65%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$gmods</div>  
       <br />         # determine the true last post on all the boards a user has access to 
       <div style="float: left; clear: left; width: 35%; text-align: left; padding-top: 2px; padding-bottom: 2px;">$admin_txt{'425'}</div>         if ( $lastposttime > $lastthreadtime ) { 
       <div style="float: left; width: 65%; text-align: left; padding-top: 2px; padding-bottom: 2px;">             $lsdatetime     = timeformat($lastposttime); 
       <script language="javascript" src="http://www.yabbforum.com/update/versioncheck.js" type="text/javascript"></script>             $lsposter       = ${ $uid . $curboard }{'lastposter'}; 
       <script language="JavaScript" type="text/javascript">             $lssub          = ${ $uid . $curboard }{'lastsubject'}; 
        <!-- //hide from dinosaurs             $lspostid       = ${ $uid . $curboard }{'lastpostid'}; 
         document.write("$versiontxt{'4'} <b>$YaBBversion</b> - $versiontxt{'5'} <b>"+STABLE+"</b> <p>");             $lsreply        = ${ $uid . $curboard }{'lastreply'}; 
        // -->             $lastthreadtime = $lastposttime; 
       </script>         } 
       <noscript>$versiontxt{'1'} <img src="http://www.yabbforum.com/images/version/versioncheck.gif" alt="" /></noscript>     } 
       </div>     ( $lssub, undef ) = Split_Splice_Move( $lssub, 0 ); 
       <br />&nbsp;<br />     ToChars($lssub); 
     </td>     $yymain .= 
    </tr>  qq~<a href="$scripturl?num=$lspostid/$lsreply#$lsreply">$lssub</a> ($lsdatetime)</div> 
  </table>                     <br /> 
</div>~;                     <div class="admin-total-left">$admin_txt{'684'}</div> 
                     <div class="admin-total-mid">$administrators</div>
                     <br />
                     <div class="admin-total-left">$admin_txt{'684a'}</div>
                     <div class="admin-total-mid">$gmods</div>
                     <br />
                     <div class="admin-total-left">$admin_txt{'425'}</div>
                     <div class="admin-total-mid">
                         <script src="$versionchk" type="text/javascript"></script>
                         <script type="text/javascript">
                             if (typeof STABLE === "undefined" || STABLE === null ) {
                                 document.write("$versiontxt{'4'} <b>$YaBBversion</b> - $versiontxt{'5'} <b>$rna</b> <p>");
                             } else {
                                 document.write("$versiontxt{'4'} <b>$YaBBversion</b> - $versiontxt{'5'} <b>"+STABLE+"</b> <p>");
                             }
                         </script>
                     </div>
                 </div>
             </td>
         </tr>
     </table>
  </div>~;
   
   $yytitle = $admintxt{'28'};    $yytitle     = $admintxt{'28'};
   $action_area = "stats";     $action_area = 'stats'; 
   &AdminTemplate;     AdminTemplate(); 
     return;
} }
   
sub LoadAdmins { sub LoadAdmins {
   &is_admin_or_gmod;     is_admin_or_gmod(); 
   my (@members, $curentry, $memdata);     my ($curentry); 
   $administrators = "";     $administrators = q{}; 
   $gmods          = "";     $gmods          = q{}; 
   &ManageMemberinfo("load");     ManageMemberinfo('load'); 
   while (($membername, $value) = each(%memberinf)) {    while ( ( $membername, $value ) = each %memberinf ) {
       ($memberrealname, undef, $memposition, $memposts) = split(/\|/, $value);         ( $memberrealname, undef, $memposition, $memposts ) = 
       if($do_scramble_id){$membernameCloaked = &cloak($membername); } else { $membernameCloaked = $membername; }           split /\|/xsm, $value; 
       if ($memposition eq "Administrator") {         if   ($do_scramble_id) { $membernameCloaked = cloak($membername); } 
           $administrators .= qq~ <a href="$scripturl?action=viewprofile;username=$membernameCloaked">$memberrealname</a><span class="small">,</span> \n~;         else                   { $membernameCloaked = $membername; } 
       }         if ( $memposition eq 'Administrator' ) { 
       if ($memposition eq "Global Moderator") {             $administrators .= 
           $gmods .= qq~ <a href="$scripturl?action=viewprofile;username=$membernameCloaked">$memberrealname</a><span class="small">,</span> \n~; qq~ <a href="$scripturl?action=viewprofile;username=$membernameCloaked">$memberrealname</a><span class="small">,</span> \n~;
       }        }
   }         if ( $memposition eq 'Global Moderator' ) { 
   $administrators =~ s~<span class="small">,</span> \n\Z~~;             $gmods .= 
   $gmods          =~ s~<span class="small">,</span> \n\Z~~;  qq~ <a href="$scripturl?action=viewprofile;username=$membernameCloaked">$memberrealname</a><span class="small">,</span> \n~; 
   if ($gmods eq "") { $gmods = qq~&nbsp;~; }        }
   undef %memberinf;     } 
     $administrators =~ s/<span class="small">,<\/span> \n\Z//sm;
     $gmods =~ s/<span class="small">,<\/span> \n\Z//sm;
     if ( $gmods eq q{} ) { $gmods = q~&nbsp;~; }
     undef %memberinf;
     return;
} }
   
sub ShowClickLog { sub ShowClickLog {
   &is_admin_or_gmod;     is_admin_or_gmod(); 
   
   if ($enableclicklog) { $logtimetext = $admin_txt{'698'}; }    if   ($enableclicklog) { $logtimetext = $admin_txt{'698'}; }
   else { $logtimetext = $admin_txt{'698a'}; }    else                   { $logtimetext = $admin_txt{'698a'}; }
   
   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" ); 
   fopen(LOG, "$vardir/clicklog.txt");     @log = <LOG>; 
   @log = <LOG>;     fclose(LOG); 
   fclose(LOG);     chomp @log; 
   
   $i = 0;     for my $i (0 .. $#log) { 
   foreach $curentry (@log) {         $log[$i]  =~ s/chr(32)//gxms; 
       ($iplist[$i], $date, $to[$i], $from[$i], $info[$i]) = split(/\|/, $curentry);         $log[$i]  =~ s/\s+//gsm; 
       $i++;         $log[$i] =~ s/^[x21-\x7E]+$//gsm; 
   }         @newlog = split /[|]/xsm, $log[$i]; 
   $i = 0;         if ($#newlog != 5 ) { next;} 
   foreach $curentry (@info) {        else {
       if ($curentry !~ /\s\(Win/i || $curentry !~ /\s\(mac/) { $curentry =~ s/\s\((compatible;\s)*/ - /ig; }             $iplist[$i] = $newlog[0]; 
       else { $curentry =~ s/(\S)*\(/; /g; }             $date = $newlog[1]; 
       if ($curentry =~ /\s-\sWin/i) { $curentry =~ s/\s-\sWin/; win/ig; }             $to[$i] = $newlog[2]; 
       if ($curentry =~ /\s-\sMac/i) { $curentry =~ s/\s-\sMac/; mac/ig; }             $from[$i] = $newlog[3]; 
       ($browser[$i], $os[$i]) = split(/\;\s/, $curentry);             $info[$i] = $newlog[4]; 
       if ($os[$i] =~ /\)\s\S/) { ($os[$i], $browser[$i]) = split(/\)\s/, $os[$i]); }             $ip[$i] = $newlog[5]; 
       $os[$i] =~ s/\)//g;         } 
       $i++;     } 
   }  
     for my $i ( 0 .. $#iplist ) {
   for ($i = 0; $i < @iplist; $i++) { $iplist{ $iplist[$i] }++; }         $iplist{ $iplist[$i] }++; 
   $i = 0;     } 
   while (($key, $val) = each(%iplist)) {  
       $newiplist[$i] = [$key, $val];     $i = 0; 
       $i++;     while ( ( $key, $val ) = each %iplist ) { 
   }         $newiplist[$i] = [ $key, $val ]; 
   $totalclick = @iplist;         $i++; 
   $totalip    = @newiplist;     } 
   for ($i = 0; $i < @newiplist; $i++) {    for my $k ( 0 .. $#iplist ) {
         for $j ( 0 .. $#newiplist ) {
       if ($newiplist[$i]->[0] =~ /\S+/ && $newiplist[$i]->[0] =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/) {            if ( $newiplist[$j]->[0] eq $iplist[$k] ) {
           $guestiplist .= qq~$newiplist[$i]->[0]&nbsp;<span style="color: #FF0000;">(<i>$newiplist[$i]->[1]</i>)</span><br />~;                 push @{$newiplist[$j]}, $ip[$k], $iplist[$i] ; 
       } else {             } 
           &LoadUser($newiplist[$i]->[0]);         } 
           if($do_scramble_id){$cloakedUserName = &cloak($newiplist[$i]->[0]); } else {$cloakedUserName = $newiplist[$i]->[0]; }     } 
           my $displayUserName = $newiplist[$i]->[0];     $totalclick = @iplist; 
           if(${$uid.$displayUserName}{'realname'} && (${$uid.$displayUserName}{'realname'} ne $newiplist[$i]->[0]))     {     $totalip    = @newiplist; 
               $displayUserName = ${$uid.$displayUserName}{'realname'};}     for my $i ( 0 .. $#newiplist ) { 
           $useriplist .= qq~<a href="$scripturl?action=viewprofile;username=$cloakedUserName">$displayUserName</a>&nbsp;<span style="color: #FF0000;">(<i>$newiplist[$i]->[1]</i>)</span><br />~;         my $lookupIP = 
       }           ($ipLookup) 
   }           ? qq~<a href="$scripturl?action=iplookup;ip=$newiplist[$i]->[2]">$newiplist[$i]->[2]</a>~ 
           : qq~$newiplist[$i]->[2]~;
   for ($i = 0; $i < @browser; $i++) { $browser{ $browser[$i] }++; }         my $lstuser = $newiplist[$i]->[0]; 
   $i = 0;         if ( $lstuser ne $newiplist[$i]->[2] && -e "$memberdir/$lstuser.vars" ) { 
   while (($key, $val) = each(%browser)) {             LoadUser( $lstuser, 'vars' ); 
       $newbrowser[$i] = [$key, $val];             if ($do_scramble_id) { 
       $i++;                 $cloakedUserName = cloak( $lstuser ); 
   }            }
   $totalbrow = @newbrowser;             else { $cloakedUserName = $lstuser; } 
   for ($i = 0; $i < @newbrowser; $i++) {             my $displayUserName = $lstuser; 
       if ($newbrowser[$i]->[0] =~ /\S+/) {             if ( 
           $browserlist .= qq~$newbrowser[$i]->[0] &nbsp;<span style="color: #FF0000;">(<i>$newbrowser[$i]->[1]</i>)</span><br />~;                 ${ $uid . $displayUserName }{'realname'} 
       }                 && ( ${ $uid . $displayUserName }{'realname'} ne $lstuser ) 
   }             ) 
             {
   for ($i = 0; $i < @os; $i++) { $os{ $os[$i] }++; }                 $displayUserName = ${ $uid . $displayUserName }{'realname'}; 
   $i = 0;             } 
   while (($key, $val) = each(%os)) {             $useriplist .= 
       $newoslist[$i] = [$key, $val];  qq~<a href="$scripturl?action=viewprofile;username=$cloakedUserName">$displayUserName</a>&nbsp;<span class="important">(<i>$newiplist[$i]->[1]</i>)</span> ($lookupIP)<br />~; 
       $i++;             } 
   }         elsif ( $newiplist[$i]->[2] ) { 
   $totalos = @newoslist;             $guestiplist .= 
   for ($i = 0; $i < @newoslist; $i++) {  qq~$lookupIP&nbsp;<span class="important">(<i>$newiplist[$i]->[1]</i>)</span><br />~; 
       if ($newoslist[$i]->[0] =~ /\S+/) {         } 
           $oslist .= qq~$newoslist[$i]->[0] &nbsp;<span style="color: #FF0000;">(<i>$newoslist[$i]->[1]</i>)</span><br />~;     } 
       }  
   }     foreach my $curentry (@info) { 
         if ( $curentry !~ /\s\(Win/ism || $curentry !~ /\s\(mac/sm ) {
   for ($i = 0; $i < @to; $i++) { $to{ $to[$i] }++; }             $curentry =~ s/\s\((compatible;\s)*/ - /igsm; 
   $i = 0;         } 
   while (($key, $val) = each(%to)) {         else { $curentry =~ s/(\S)*\(/; /gsm; } 
       $newtolist[$i] = [$key, $val];         if ( $curentry =~ /\s-\sWin/ism ) { 
       $i++;             $curentry =~ s/\s-\sWin/; win/igsm; 
   }        }
   for ($i = 0; $i < @newtolist; $i++) {        if ( $curentry =~ /\s-\sMac/ism ) {
       if ($newtolist[$i]->[0] =~ /\S+/) {             $curentry =~ s/\s-\sMac/; mac/igsm; 
           $scriptcalls .= qq~<a href="$newtolist[$i]->[0]" target="_blank">$newtolist[$i]->[0]</a>&nbsp;<span style="color: #FF0000;">(<i>$newtolist[$i]->[1]</i>)</span><br />~;         } 
       }         ( $browser[$i], $os[$i] ) = split /\;\s/xsm, $curentry; 
   }         if ( $os[$i] =~ /\)\s\S/sm ) { 
             ( $os[$i], $browser[$i] ) = split /\)\s/xsm, $os[$i];
   for ($i = 0; $i < @from; $i++) { $from{ $from[$i] }++; }        }
   $i = 0;         $os[$i] =~ s/\)//gxsm; 
   while (($key, $val) = each(%from)) {         $i++; 
       $newfromlist[$i] = [$key, $val];     } 
       $i++;  
   }    for my $i ( 0 .. $#browser ) { $browser{ $browser[$i] }++; }
   for ($i = 0; $i < @newfromlist; $i++) {     $i = 0; 
       if ($newfromlist[$i]->[0] =~ /\S+/ && $newfromlist[$i]->[0] !~ m~$boardurl~i) {    while ( ( $key, $val ) = each %browser ) {
       $message = qq~<a href="$newfromlist[$i]->[0]" target="_blank">$newfromlist[$i]->[0]</a>~;         $newbrowser[$i] = [ $key, $val ]; 
       #   &wrap;         $i++; 
       #   if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; }    }
       #   &DoUBBC;     $totalbrow = @newbrowser; 
           &wrap2;     for my $i ( 0 .. $#newbrowser ) { 
           $referlist .= qq~$message&nbsp;<span style="color: #FF0000;">(<i>$newfromlist[$i]->[1]</i>)</span><br />~;         if ( $newbrowser[$i]->[0] =~ /\S+/xsm ) { 
       }             $browserlist .= 
   }  qq~$newbrowser[$i]->[0] &nbsp;<span class="important">(<i>$newbrowser[$i]->[1]</i>)</span><br />~; 
         }
   $yymain .= qq~     } 
   
<div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;">     for my $i ( 0 .. $#os ) { $os{ $os[$i] }++; } 
  <table width="100%" cellspacing="1" cellpadding="4">     $i = 0; 
    <tr valign="middle">     while ( ( $key, $val ) = each %os ) { 
     <td align="left" class="titlebg">         $newoslist[$i] = [ $key, $val ]; 
      <img src="$imagesdir/info.gif" alt="" border="0" /> <b>$admin_txt{'693'}</b>         $i++; 
     </td>     } 
    </tr>     $totalos = @newoslist; 
    <tr valign="middle">     for my $i ( 0 .. $#newoslist ) { 
     <td align="left" class="windowbg2"><br />         if ( $newoslist[$i]->[0] =~ /\S+/xsm ) { 
      $admin_txt{'697'}$logtimetext<br /><br />             $oslist .= 
     </td>  qq~$newoslist[$i]->[0] &nbsp;<span class="important">(<i>$newoslist[$i]->[1]</i>)</span><br />~; 
    </tr>         } 
  </table>     } 
   
     for my $i ( 0 .. $#to ) { $to{ $to[$i] }++; }
     $i = 0;
     while ( ( $key, $val ) = each %to ) {
         $newtolist[$i] = [ $key, $val ];
         $i++;
     }
     for my $i ( 0 ..  $#newtolist ) {
         if ( $newtolist[$i]->[0] =~ /\S+/xsm ) {
             $scriptcalls .=
  qq~<a href="$newtolist[$i]->[0]" target="_blank">$newtolist[$i]->[0]</a>&nbsp;<span class="important">(<i>$newtolist[$i]->[1]</i>)</span><br />~;
         }
     }
   
     for my $i ( 0 .. $#from ) { $from{ $from[$i] }++; }
     $i = 0;
     while ( ( $key, $val ) = each %from ) {
         $newfromlist[$i] = [ $key, $val ];
         $i++;
     }
     for my $i ( 0 .. $#newfromlist ) {
         if (   $newfromlist[$i]->[0] =~ /\S+/xsm
             && $newfromlist[$i]->[0] !~ m{$boardurl}ism )
         {
             $message =
  qq~<a href="$newfromlist[$i]->[0]" target="_blank">$newfromlist[$i]->[0]</a>~;
   
             wrap2();
             $referlist .=
  qq~$message&nbsp;<span class="important">(<i>$newfromlist[$i]->[1]</i>)</span><br />~;
         }
     }
   
     $yymain .= qq~
  <div class="bordercolor rightboxdiv">
     <table class="border-space pad-cell" style="margin-bottom: .5em;">
         <tr>
             <td class="titlebg">
                 $admin_img{'infoimg'} <b>$admin_txt{'693'}</b>
             </td>
         </tr><tr>
             <td class="windowbg2">
                 <div class="pad-more">$admin_txt{'697'}$logtimetext</div>
             </td>
         </tr>
     </table>
</div>~; </div>~;
   
   if ($enableclicklog) {    if ($enableclicklog) {
       $yymain .= qq~        $yymain .= qq~
  <div class="bordercolor rightboxdiv">
<br />     <table class="border-space pad-cell" style="margin-bottom: .5em;"> 
         <colgroup>
<div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;">             <col span="2" style="width: 50%" /> 
  <table width="100%" cellspacing="1" cellpadding="4">         </colgroup> 
   <tr valign="middle">         <tr> 
    <td align="left" class="titlebg" colspan="2">            <td class="titlebg" colspan="2">
     <img src="$imagesdir/cat.gif" alt="" border="0" /> <b>$admin_txt{'694'}</b>                $admin_img{'cat_img'} <b>$admin_txt{'694'}</b>
    </td>            </td>
   </tr>         </tr><tr> 
   <tr valign="middle">             <td class="windowbg2" colspan="2"><br /> 
    <td align="left" class="windowbg2" colspan="2"><br />                $admin_txt{'691'}: $totalclick<br />
     $admin_txt{'691'}: $totalclick<br />                $admin_txt{'743'}: $totalip<br /><br />
     $admin_txt{'743'}: $totalip<br /><br />             </td> 
    </td>         </tr><tr> 
   </tr>             <td class="catbg center"> 
   <tr valign="middle">                 <b>$clicklog_txt{'users'}</b> 
    <td align="center" class="catbg" width="50%">             </td> 
     <b>$clicklog_txt{'users'}</b>             <td class="catbg center"> 
    </td>                 <b>$clicklog_txt{'guests'}</b> 
    <td align="center" class="catbg" width="50%">             </td> 
     <b>$clicklog_txt{'guests'}</b>         </tr><tr> 
    </td>             <td class="windowbg2 vtop"><br /> 
   </tr>                 $useriplist<br /> 
   <tr valign="middle">             </td> 
    <td align="left" class="windowbg2" valign="top" width="50%"><br />            <td class="windowbg2 vtop"><br />
     $useriplist<br />                $guestiplist<br />
    </td>            </td>
    <td align="left" class="windowbg2" valign="top" width="50%"><br />         </tr> 
     $guestiplist<br />     </table> 
    </td>  </div> 
   </tr>  <div class="bordercolor rightboxdiv"> 
  </table>     <table class="border-space pad-cell" style="margin-bottom: .5em;"> 
</div>         <tr> 
             <td class="titlebg">
<br />                 $admin_img{'cat_img'} <b>$admin_txt{'695'}</b> 
             </td>
<div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;">         </tr><tr> 
  <table width="100%" cellspacing="1" cellpadding="4">             <td class="catbg"> 
   <tr valign="middle">                 <i>$admin_txt{'744'}: $totalbrow</i> 
    <td align="left" class="titlebg">             </td> 
     <img src="$imagesdir/cat.gif" alt="" border="0" /> <b>$admin_txt{'695'}</b>         </tr><tr> 
    </td>             <td class="windowbg2"> 
   </tr>                 <div class="pad-more">$browserlist</div> 
   <tr valign="middle">             </td> 
    <td align="left" class="catbg">         </tr> 
     <i>$admin_txt{'744'}: $totalbrow</i>     </table> 
    </td>  </div> 
   </tr>  <div class="bordercolor rightboxdiv"> 
   <tr valign="middle">     <table class="border-space pad-cell" style="margin-bottom: .5em;"> 
    <td align="left" class="windowbg2"><br />         <tr> 
     $browserlist<br />             <td class="titlebg"> 
    </td>