Location: PHPKode > projects > SiteX > admin/overview.php
<?PHP
ob_start();
session_start();

include("../includes/globals.php.inc");
include("../includes/functions.php");
include("../lang/English.php");
if(strtolower($sxSetup['Language']) != 'english') include("../lang/".$sxSetup['Language'].".php");
include("../themes/$THEME_FOLDER/config.php.inc");

if(!userAdmin())
	loginError($sxLang['LoginRequired']);

$totalFileSize = getdirSize(str_replace('/admin/overview.php', '', $_SERVER["SCRIPT_FILENAME"]));

$query = "SELECT * FROM $DB_Photos";
$result = mysql_query($query, $Link) or queryError("506", mysql_error());
$totalPhotos = mysql_num_rows($result);

$query = "SELECT * FROM $DB_Users";
$result = mysql_query($query, $Link) or queryError("507", mysql_error());
$totalUsers = mysql_num_rows($result);

$query = "SELECT * FROM $DB_Journal";
$result = mysql_query($query, $Link) or queryError("508", mysql_error());
$totalJournals = mysql_num_rows($result);

$query = "SELECT * FROM $DB_Comments";
$result = mysql_query($query, $Link) or queryError("509", mysql_error());
$totalComments = mysql_num_rows($result);

$totalHits = 0;
$query = "SELECT * FROM $DB_Hit_Counters";
$result = mysql_query($query, $Link) or queryError("510", mysql_error());
while($ROW = mysql_fetch_object($result))
	$totalHits = $totalHits + $ROW->hits;
	
$Query = "SELECT id FROM $DB_Visitors WHERE lastvisit>'" . ($NOW-$sxThemeConfig['OnlineTimeInSeconds']) . "'";
$Result = mysql_query($Query, $Link) or queryError("2006", mysql_error());
$totalOnline = mysql_num_rows($Result);

$Query = "SELECT * FROM $DB_Visitors WHERE lastvisit>'" . ($NOW-$sxThemeConfig['OnlineTimeInSeconds']) . "' AND userid!='0'";
$Result = mysql_query($Query, $Link) or queryError("2003", mysql_error());
$membersOnline = mysql_num_rows($Result);

$Query = "SELECT * FROM $DB_Visitors WHERE lastvisit>'" . ($NOW-$sxThemeConfig['OnlineTimeInSeconds']) . "' AND userid='0'";
$Result = mysql_query($Query, $Link) or queryError("2004", mysql_error());
$guestsOnline = mysql_num_rows($Result);

$sxDirPath = realpath("../");

$sxTitleAddendum = $sxLang['AdminHeading'];
include("../themes/$THEME_FOLDER/header.php");

$totalFileSize = getdirSize(str_replace('/admin/overview.php', '', $_SERVER['SCRIPT_FILENAME']));

?>   
<div class="bodyWrapper">
   <h1 class="sxAdminHeading"><?PHP echo $sxLang['OverviewHeading']; ?></h1>
   <div class="sxAdminBreadcrumbs"><?PHP if(userAdmin()) { ?><a href="index.php"><?PHP echo $sxLang['AdminBreadcrumb']; ?><?PHP }?><?PHP if(userEditor()) { ?><a href="editor_index.php"><?PHP echo $sxLang['EditorBreadcrumb']; ?><?PHP }?></a> > <?PHP echo $sxLang['OverviewHeading']; ?></div>   
   <?PHP echoMessage($message); ?>
	<p>
	<?PHP echo $sxLang['OverviewVersion1']; ?>:&nbsp;<strong><?PHP echo $sxSetup['Version']; ?> (<?PHP echo $sxBuild; ?>)</strong><br />
	<?PHP echo $sxLang['PreferencesItemSiteName']; ?>:&nbsp;<strong><?PHP echo $sxSetup['SiteName']; ?></strong><br />
	<?PHP echo $sxLang['PreferencesItemSiteURL']; ?>:&nbsp;<strong><?PHP echo $sxSetup['Url']; ?></strong><br />
	<?PHP echo $sxLang['OverviewItemPath']; ?>:&nbsp;<strong><?PHP echo $sxDirPath; ?></strong><br />
	<a href="../setup/phpinfo.php" target="_blank"><?PHP echo $sxLang['OverviewItemPhpInfo']; ?></a>
	</p>
	
	<div class="sxSection"><?PHP echo $sxLang['OverviewItemStatistics']; ?></div>
	<?PHP echo $sxLang['OverviewItemStatsSize'] ; ?>: <strong><?PHP echo number_format($totalFileSize/1000); ?> <?PHP echo $sxByteUnits['KB']; ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsPhotos']; ?>: <strong><?PHP echo number_format($totalPhotos); ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsUsers']; ?>: <strong><?PHP echo number_format($totalUsers); ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsHits']; ?>: <strong><?PHP echo number_format($totalHits); ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsVisitors']; ?>: <strong><?PHP echo getVisitors(); ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsJournal']; ?>: <strong><?PHP echo number_format($totalJournals); ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsComments']; ?>: <strong><?PHP echo number_format($totalComments); ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsOnlineMembers']; ?>: <strong><?PHP echo number_format($membersOnline); ?></strong><br />
	<?PHP echo $sxLang['OverviewItemStatsOnlineGuests']; ?>: <strong><?PHP echo number_format($guestsOnline); ?></strong><br />
	</p>

</div>
<?PHP
include("../themes/$THEME_FOLDER/footer.php");
ob_end_flush();
?>
Return current item: SiteX