<?php
include_once 'settings.php';
$crapVarr = 'F@#&$^*FG^&F^#$&#&D$%%#$D%&$^%#&';
include "_init.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<script type="text/javascript" src="changeStyle.js"></script>
		<title><?php echo $publicname; ?></title>
		<meta http-equiv="Content-Type" content="text/html; charset=unicode" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
		<link rel="stylesheet" type="text/css" href="css/bar.css" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
		<!--<script type="text/javascript" src="js/jquery.confirm.js"></script>
		<script type="text/javascript" src="js/jquery.corner.js"></script>-->
		<!--<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>-->
		
		<!--
		<script type="text/javascript">                                         
			$(document).ready(function() {
				$("#main").corner("20px");
				$(".details").corner("5px");
				$(".roundedButton").corner("20px");
				$(".submenu").corner("5px bottom");
				$(".info, .success, .warning, .error, .validation").corner("5px");
				$("#menu, #footer").corner("10px");
				$("#sidebar, #content").corner("10px");
			});
		</script>-->

	</head>
	<body<?php if(!isset($_GET["module"])) echo " onload=\"$('#content').load('modules/news.php');\""; ?>><?php if($showtopbar)echo'
<div id="athens_bar" style="-moz-box-shadow: 0px 0px 10px #8b008b;	-webkit-box-shadow: 0px 0px 10px #8b008b;">
	
	<div id="athens_bar_content">
			<div id="athens_bar_logo"><a href="'.$projectsite.'"><img src="images/bar_logo.png" /></a></div>
			<div id="athens_bar_menu">
			<div><a href="index.php"><img src="images/bar_home.png" /></a></div>
			<div><a href="'.$forumlink.'"><img src="images/bar_forum.png" /></a></div>
<background="/images/background_2.jpg">
		</div>
	</div>'; ?>
</div>

		<div id="wrapper">
			
				<div id="header"></div>
				<div id="wrapper2">
				<div id="menu">
					
					<a class="link" href="index.php?module=news" onclick="event.preventDefault(); $('#content').load('modules/news.php');">Neues</a><img src="images/devider.png" />
					<a class="link" href="http://invisible-online.forumieren.com/"<?php echo $forumlink; ?>">Forum</a><img src="images/devider.png" />
					<a class="link" href="index.php?module=signup">Anmelden</a><img src="images/devider.png" />
					<a class="link" href="index.php?module=guides" onclick="event.preventDefault(); $('#content').load('modules/guides.php');">Connect Guide</a><img src="images/devider.png" />
					<a class="link" href="index.php?module=contact" onclick="event.preventDefault(); $('#content').load('modules/contact.php');">Kontakt</a>
				</div>
				
				<div id="main" >
				<?php
				if($sidebarstatus){
				?>
					<div id="sidebar" style="-moz-box-shadow: 0px 0px 10px #8b008b;	-webkit-box-shadow: 0px 0px 10px #8b008b;">
						<?php
						if($menu["itemdb"])echo"<div class=\"title\"><a href=\"index.php?module=items\" onclick=\"event.preventDefault(); $('#content').load('modules/items.php');\">Items Database</a></div><br />";
						if($menu["topplayers"])echo"<div class=\"title\"><a href=\"index.php?module=top\" onclick=\"event.preventDefault(); $('#content').load('modules/top.php');\">Top 100 Spieler</a></div><br />";
						if($menu["topguilds"])echo"<div class=\"title\"><a href=\"index.php?module=topguilds\" onclick=\"event.preventDefault(); $('#content').load('modules/topguilds.php');\">Top 100 Gilden</a></div><br />";
						if($menu["bugs"])echo"<div class=\"title\"><a href=\"index.php?module=bugs\" onclick=\"event.preventDefault(); $('#content').load('modules/bugs.php');\">Bugs</a></div><br />";
						if($menu["downloads"])echo"<div class=\"title\"><a href=\"index.php?module=downloads\" onclick=\"event.preventDefault(); $('#content').load('modules/downloads.php');\">Downloads</a></div><br />";
						if($menu["topplayers"])echo"<div class=\"title\"><a href=\"index.php?module=newuser\" onclick=\"event.preventDefault(); $('#content').load('modules/newuser.php');\">Neuste User</a></div><br />";
						if($menu["cashshop"])echo"<div class=\"title\"><a href=\"usercp/index.php?\">UserCp</a></div><br />";
						if($menu["topplayers"])echo"<div class=\"title\"><a href=\"index.php?module=media\" onclick=\"event.preventDefault(); $('#content').load('modules/media.php');\">Media</a></div><br />";


						?>
						<div class="title">Server Information</div>
						<p>
							<b>Exp rate:</b> x20<br />
							<b>Item Drop:</b> 25%<br />
							<b>Lvl Cap:</b> 130<br />
						</p>
						<p>
							<b>Start Geld:</b> 100 Silber<br />
						</p>
						
						<?php
						$mssql_link = @mssql_connect( $servername . "\\" . $dbname , $dbuser, $dbpass );
						if(!$mssql_link)showMessage('info', 'Registration is temporarly offline');
						?>
						
						<div class="title">Server Status</div>
						<table style="border:0px;">
							<?php if($pingfeature) echo'
							<tr style="height:18px;"><td><b>Ping:</b></td><td id="ping"><img src="images/loading.gif"></td></tr>'; ?>
							<tr style="height:18px;"><td><b>Login:</b></td><td id="login"><img src="images/loading.gif"></td></tr>
							<tr style="height:18px;"><td><b>World:</b></td><td id="world"><img src="images/loading.gif"></td></tr>
							<tr style="height:18px;"><td><b>Zone #1:</b></td><td id="zone1"><img src="images/loading.gif"></td></tr>
							<tr style="height:18px;"><td><b>Zone #2:</b></td><td id="zone2"><img src="images/loading.gif"></td></tr>
							<tr style="height:18px;"><td><b>Zone #3:</b></td><td id="zone3"><img src="images/loading.gif"></td></tr>
							<tr style="height:18px;"><td><b>Online Players:</b></td><td id="online"><img src="images/loading.gif"></td></tr>
						</table>
						<?php echo"<script>
						$(document).ready(function(){
							$('#ping').load('server_info.php?ip=$remoteip&action=0');
							$('#login').load('server_info.php?ip=$localip&action=2');
							$('#world').load('server_info.php?ip=$localip&action=3');
							$('#zone1').load('server_info.php?ip=$localip&action=4');
							$('#zone2').load('server_info.php?ip=$localip&action=5');
							$('#zone3').load('server_info.php?ip=$localip&action=6');
							$('#online').load('server_info.php?ip=0&action=8');
							
							setInterval(\"$('#ping').load('server_info.php?ip=$remoteip&action=0')\",$inter1);
							setInterval(\"$('#login').load('server_info.php?ip=$localip&action=2')\",$inter2);
							setInterval(\"$('#world').load('server_info.php?ip=$localip&action=3')\",$inter3);
							setInterval(\"$('#zone1').load('server_info.php?ip=$localip&action=4')\",$inter4);
							setInterval(\"$('#zone2').load('server_info.php?ip=$localip&action=5')\",$inter5);
							setInterval(\"$('#zone3').load('server_info.php?ip=$localip&action=6')\",$inter6);
							setInterval(\"$('#online').load('server_info.php?ip=0&action=8')\",$inter7);
						});
						</script>"; ?>
						
						
						
						<div class="title">Vote4Us</div>
						<p>
							<center>
								<a href="<?php echo $votelink; ?>"><img border="0" src="<?php echo $votepic; ?>" alt="Vote4Us" /></a>
							</center>
							<br />
						</p>
					</div>
					<?php } ?>
					<div id="content" style="-moz-box-shadow: 0px 0px 10px #8b008b;	-webkit-box-shadow: 0px 0px 10px #8b008b;<?php if(!$sidebarstatus)echo "width:620px;"; ?>">
						<?php
							switch( $_GET['module'] )
							{
								/*case "news":
										include "modules/news.php";
									break;
								*/
								case "signup":
										include "modules/signup.php";
									break;
									
								/*case "downloads":
										include "modules/downloads.php";
									break;
									*/
								/*case "contact":
										include "modules/contact.php";
									break;
									*/
								/*case "goals":
										include "modules/goals.php";
									break;
									*/
								/*case "top":
										include "modules/top.php";
									break;
								*/
								case "items":
										include "modules/items.php";
									break;
									
								case "mall":
										include "modules/mall.php";
									break;
								
								/*case "bugs":
										include "modules/bugs.php";
									break;
									*/							
								/*case "downloads":
										include "modules/downloads.php";
									break;
								*/
								/*case "guides":
										include "modules/guides.php";
									break;
								*/
								/*default:
										include "modules/news.php";
									break;*/

							}
						?>
					</div>
				</div>
				
				<div id="footer">&copy; 2010-<?php echo date("Y") . " " . $publicname; ?>. All rights are reserved.<br /></div>
			</div>
		</div>
	</body>
</html>