<?php
session_start();
include "language/en.php";
$title=$lang['title']; $announcement=$lang['announc']; $m=49; $n=49;

// Configurate your settings behind this line

$db_host="localhost"; $db_user="username"; $db_pass="password"; $db_name="databasename"; 				// Database settings
$url="http://www.yourwebsite.com"; 													   					// Website URL without end /				
$paypal="your@paypalaccount.com";  																		// Your Paypal (www.paypal.com) account

// You dont have to change anything behind this line

if (isset($_SESSION["user"][0])&&($_SESSION["user"][4]>1)) {$top_ad=""; $bottom_ad=""; $bottom_text="";}
function logo($title)
{echo "<embed type='application/x-shockwave-flash' width='640' height='136' src='' quality='high'></embed>";}

function menu_up()
{
global $lang;
if (isset($_SESSION["user"][1], $_GET["town"]))
{
 $loc=town_xy($_GET["town"]);
 $map_lnk="<a class='q_link' href='map.php?x=".$loc[0]."&y=".$loc[1]."'>".$lang['map']."</a>";
}
else $map_lnk="<a class='q_link' href='map.php?x=0&y=0'>".$lang['map']."</a>";
echo "<a class='q_link' href='index.php'>".$lang['home']."</a> | ";
if (!isset($_SESSION["user"][1])) echo "<a class='q_link' href='login.php'>".$lang['login']."</a> | 
<a class='q_link' href='register.php'>".$lang['register']."</a> | ";
else echo "<a class='q_link' href='logout.php'>".$lang['logout']."</a> | ";
echo $map_lnk." | <a class='q_link' href='/forum' target='blank'>".$lang['forum']."</a> | 
<a class='q_link' href='help.php'>".$lang['about']."</a> || ";
if (isset($_SESSION["user"][1])) echo "<a class='q_link' href='profile_view.php?id=".$_SESSION["user"][0]."'>".$lang['profile']."</a> | <a class='q_link' href='towns.php'>".$lang['towns']."</a> | ";
if(isset($_SESSION["user"][1], $_GET["town"]))echo " <a class='q_link' href='grotta.php?town=".$_GET["town"]."'>cave</a>";
}

function menu_down()
{
 global $lang;
 if (isset($_SESSION["user"][1], $_GET["town"])) echo "<a class='q_link' href='town.php?town=".$_GET["town"]."'>".$lang['townCenter']."</a> | <a class='q_link' href='town_stats.php?town=".$_GET["town"]."'>".$lang['statistics']."</a> | ";
 if (isset($_SESSION["user"][1])) echo "<a class='q_link' href='reports.php?page=0'>".$lang['reports']."</a> | <a class='q_link' href='messages.php?page=0'>".$lang['messages']."</a> || <a class='q_link' href='chat.php'>".$lang['chat']."</a> | ";
 if ((isset($_SESSION["user"][4]))&&($_SESSION["user"][4]>3)) echo "<a class='q_link' href='apanel.php'>".$lang['adminPanel']."</a> | ";
}

function about()
{global $bottom_text; echo $bottom_text;}

$system=array();
$system[0]=5;//chat message life, in minutes
$system[1]=5;//chat refresh time, in seconds
?>