<?php ob_start(); session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head>
	<?php
include("../../scripts.php");

include("connecting.php");

$nocounter_in_bottom = "true!!!";

if ($_SESSION[pycoins] == "yes") {
$_SESSION[pycoins] = "yes";
}

if ($_SESSION["timeonlog"] != "") {
//$_SESSION["timer"] = $_SESSION["timer"];
//$_SESSION["dage"] = $_SESSION["dage"];
//$_SESSION["month"] = $_SESSION["month"];
//$_SESSION["year"] = $_SESSION["year"];
$_SESSION["timeonlog"] = $_SESSION["time"];
}

$ip = $_SERVER[REMOTE_ADDR];

$month = date("m");
$day = date("d");
	include("connect.php");
	$db_tagwall = mysql_query("SELECT * FROM `pytox_tagwall` ORDER BY `id` DESC");
	$tagwall_numbers = mysql_query("SELECT * FROM `pytox_tagwall` ORDER BY `id` DESC");
	$db_menu = mysql_query("SELECT * FROM `pytox_menu` ORDER BY `prioritet` DESC");
	$db_nyhed = mysql_query("SELECT * FROM `pytox_nyheder` WHERE `show` LIKE '1' ORDER BY `id` DESC LIMIT 10");
	$all_nyhed = mysql_query("SELECT * FROM `pytox_nyheder` WHERE `show` LIKE '1' ORDER BY `id` DESC");
	$db_users = mysql_query("SELECT * FROM `pytox_community` ORDER BY `bruger` ASC");
	$num_nyhed = mysql_query("SELECT * FROM `pytox_nyheder` WHERE `show` LIKE '1' ORDER BY `id` DESC");
	$db_community = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' ORDER BY `bruger` ASC");
	$db_cookies = mysql_query("SELECT * FROM `pytox_community` ORDER BY `bruger` ASC");
	$overcontent_com = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' ORDER BY `bruger` ASC");
	$db_artikler = mysql_query("SELECT * FROM `pytox_artikler` WHERE `show` LIKE '1' AND `udgivet` LIKE '1' ORDER BY `id` DESC LIMIT 5");
	$all_artikler = mysql_query("SELECT * FROM `pytox_artikler` WHERE `show` LIKE '1' AND `udgivet` LIKE '1' ORDER BY `id` DESC");
	$stat_artikler = mysql_query("SELECT * FROM `pytox_artikler` WHERE `show` LIKE '1' ORDER BY `id` DESC");
	$num_artikler = mysql_query("SELECT * FROM `pytox_artikler` WHERE `udgivet` LIKE '1' AND `show` LIKE '1' ORDER BY `id` DESC");
	$db_admin = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' ORDER BY `id` ASC");
	$db_affiliates = mysql_query("SELECT * FROM `pytox_affiliates` WHERE `exist` LIKE '1' ORDER BY `navn` ASC") or die(mysql_error());

	$db_users_pycoins = mysql_query("SELECT * FROM `pytox_community` ORDER BY `coins` DESC");
$pmail_inbox_all = mysql_query("SELECT * FROM `pytox_post` WHERE `til` LIKE '$_COOKIE[user]' AND `show` LIKE '1'");
$pmail_inbox_new = mysql_query("SELECT * FROM `pytox_post` WHERE `til` LIKE '$_COOKIE[user]' AND `laest` LIKE '0' AND `show` LIKE '1'");


	$scroll_nyhed = mysql_query("SELECT * FROM `pytox_nyheder` WHERE `show` LIKE '1' ORDER BY `id` DESC LIMIT 1");
	$scroll_artikel = mysql_query("SELECT * FROM `pytox_artikler` WHERE `show` LIKE '1' AND `udgivet` LIKE '1' ORDER BY `id` DESC LIMIT 1");
	$index_nyhed = mysql_query("SELECT * FROM `pytox_nyheder` WHERE `show` LIKE '1'  ORDER BY `id` DESC LIMIT 1");
	$index_artikel = mysql_query("SELECT * FROM `pytox_artikler` WHERE `show` LIKE '1' AND `udgivet` LIKE '1' ORDER BY `id` DESC LIMIT 1");


function pycoins() {
//if ($choose == "update") {
//if ($_SESSION["pycoins"] == "yes") {

if (!isset($_COOKIE["timein"])) {
//print "123";

 if ($_COOKIE[inactive] == "yes") {
// if ($_SESSION[pycoins] == "yes") {
//print "321";

$pycoins_update = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' LIMIT 1") or die(mysql_error());

while($pycoins = mysql_fetch_array($pycoins_update)) {

$new_pycoins = $pycoins[coins]+10;

print " - ".$new_pycoins." ".$new_pycoins[id];

//mysql_query("UPDATE `pytox_community` SET `coins` = '{$new_pycoins}' WHERE `id` LIKE '{$pycoins[id]}' LIMIT 1") or die(mysql_error());

mysql_query("UPDATE `pytox_community` SET `coins` = '{$new_pycoins}' WHERE `id` LIKE '{$pycoins[id]}' LIMIT 1") or die(mysql_error());

//setcookie("timein", "yes", time()+3600, 0, $_SERVER["HTTP_HOST"], 0);
setcookie("timein", "yes", time()+3600, "/", $_SERVER["HTTP_HOST"], 0);

}//slutter while
 }// 2
}//slutter if om timein og inactive
//}//slutter if SESSION

print "<a href=\"?site=Support&amp;support=pycoins\" title=\"Her opdateres dine pycoins!\"><img src=\"../gfx/pycoins.jpg\" alt=\"Her opdateres dine pycoins!\" title=\"Her opdateres dine pycoins!\" /></a>";
//}//slutter if choose
}//slutter funktion


/*
while($check_logon_com = mysql_fetch_array($db_community)) {

if ($_COOKIE[pass] == md5($check_logon_com[kodeord]) && $_COOKIE[com] == "1") {

	if ($_COOKIE["inactive"] != "yes") {
header("Location: index.php?site=Logout&mode=inactive");
	}

}
}
*/

if (mysql_num_rows($all_artikler) == 0) {
print "Vores MySQL server er nede, vi undskylder.";
} else {

if (isset($_COOKIE[user])) {
	$db_bottom = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' LIMIT 1");
} else if (!isset($_COOKIE[user])) {
	$db_bottom = mysql_query("SELECT * FROM `pytox_community` LIMIT 1");
} else {
	$db_bottom = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' LIMIT 1");
}


	?>
<title>Højhus avisen Pytox</title>

<?php

///////////////////////
if ($ip == "83.91.50.88" ||$ip = "194.19.191.5") {
//////////////////////

if ($month == "12" && $day <= "25") {
?>
	<link rel="stylesheet" href="../xmas_style.css" type="text/css" />
<?php
} else {

 if (date("H") >= "20") {
?>
	<link rel="stylesheet" href="style_night.css" type="text/css" />
<?php
 } else {
?>
	<link rel="stylesheet" href="style.css" type="text/css" />
<?php
 }

}

//////////
}
/////////
?>
	<meta http-equiv="Author" content="Denne side er designet og programmeret af Leo B. Ørsnes" />
	<meta http-equiv="Copyright" content="Copyright, Zeekoo, 2004-2006" />
	<link rel="shortcut icon" href="../gfx/favicon.ico" />
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
	<!-- Al kode og grafik fra denne hjemmeside må kopieres, hvis blot ejerens navn står tydeligt og synligt på siden! -->
 </head>
<!--  <body onunLoad="top.location='http://www.pytox.dk<?=$_SERVER[PHP_SELF]?>?site=Logout';">-->
  <body>
<?php
///////////////////////
if ($ip == "83.91.50.88" ||$ip == "194.19.191.5") {
//////////////////////
?>
<div align="center" style="display:inline;">
<div class="toplogo">
<div align="right" class="toplogodiv">
<marquee style="width:138px;height:88px;" direction="up" scrollamount="2" onmouseover="this.stop();" onmouseout="this.start();">
<div class="small">Nyeste nyhed:</div>
<span style="color:#000;">
<?php
while($scrolli = mysql_fetch_array($scroll_nyhed)) {
if ($scrolli["show"] == 1) {
print "<strong><a href=\"?site=Nyheder\">".$scrolli[overskrift]."</a></strong>";
} else {
print "(Fejlkode: 15648)";
}
}
?>
</span>
<div class="small">Nyeste artikel:</div>
<?php
while($scrolly = mysql_fetch_array($scroll_artikel)) {
if ($scrolly["show"] == 1 && $scrolly["udgivet"] == 1) {
print "<strong><a href=\"?site=Artikler&amp;artikelid=".$scrolly[id]."\">".$scrolly[overskrift]."</a></strong>";
} else {
print "(Fejlkode: 15649)";
}
}
?>
</marquee>
</div>
</div>
<?php
//include("../../sites/get.BottomCom.php");
?>
<table class="overcontent" cellpadding="0" cellspacing="0">
 <tr>
  <td align="center" valign="center">
<?php
while($check_logon_com = mysql_fetch_array($overcontent_com)) {

if ($_COOKIE[pass] == $check_logon_com[kode] && $_COOKIE[com] == "1") {

	if ($check_logon_com["exist"] == "1") {

$useriid = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' LIMIT 1");

while ($asdjmk = mysql_fetch_array($useriid)) {
$useridentity = $asdjmk[id];
?>
Din bruger: <a style="color:#FFF; border:0px;" href="?site=Com.users&userid=<?=$asdjmk[id]?>">
<?php
print $_COOKIE[user]."</a>, ";
}
?>
dine <a href="?site=Support&amp;support=pycoins" style="color : #FFF; border:0px;">Pycoins</a>:
<?php
print $check_logon_com[coins].", ";
?>
<a href="?site=Post" style="color:#FFF; border:0px;">P-mail</a>
<?php
if (mysql_num_rows($pmail_inbox_new) != 0) {
print " - <strong><u>Du har modtaget nye beskeder</u></strong>";
}
?>
, du har været online i&nbsp;
<?php
$sekonline = time() - $_COOKIE[timer];
$minonline = floor($sekonline/60);
print $minonline." min.";
$timonline = $minonline/60;
print "&nbsp;(".round($timonline, 2)." timer)";
?>
<?php
}
}
}
?>
  </td>
 </tr>
</table>
</div>
<div align="center">
<div class="blackborder" style="border-top:0px;display:block;width:900px;">
<br />
<table class="menucontent" cellpadding="0" cellspacing="0">
 <tr>
  <td class="menu" valign="top" align="left">
<?php
//
//<div onMouseover=\"menuchangeover('menu".$db_menu_show[prioritet]."')\" onMouseout=\"menuchangeout('menu".$db_menu_show[prioritet]."')\" id=\"menu".$db_menu_show[prioritet]."\">
//
while($db_menu_show = mysql_fetch_array($db_menu)) {


if ($db_menu_show["href"] == $_GET["site"]) {

print "<div class=\"menu\">".$db_menu_show[navn]."</div>
<br />
";

} else {

print "<a href=\"?site=".$db_menu_show[href]."\" title=\"".$db_menu_show[navn]."\" class=\"menu\">".$db_menu_show[navn]."</a>
<br />
";

}


}
?>
<br />
<?php
include("../../sites/get.BottomCom_d2.php");
?>
<br />
 </td>
 <td class="content" valign="top" align="left">
<!-- HER STARTER KOMMENTARERNE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<div class="small" style="color:#F00;" align="center">
<?php
if ( $_GET["message"] ) {

if ( $_GET["message"] == "loggedout" ) {

	print "Du er nu logget korrekt ud. -".$_SESSION[tjekking1232]."<br />(Bot: Brugeren loggede ud uden problemer, tak for benyttelse af communityet!)";
} else if ( $_GET["message"] == "correctdelnew") {
	print "Nyheden blev slettet korrekt!";
} else if ( $_GET["message"] == "corretdelart") {
	print "Artiklen blev slettet korrekt!";
} else if ( $_GET["message"] == "artikeludgivet") {
	print "Artiklen blev korrekt udgivet!";
} else if ( $_GET["message"] == "correctlyafvis") {
	print "Artiklen blev korrekt afvist!";
} else if ( $_GET["message"] == "newtagcorrect") {
	print "Din besked blev oprettet med succes!";
} else if ( $_GET["message"] == "inactivelogout") {
	print "Du blev smid ud af communityet, grundet inaktivitet!";
} else if ( $_GET["message"] == "failure" ) {

	if ( $_GET["errorid"] == "81287" ) {
		print "Du er ikke logget ud... (Fejlkode: 81287)";
	} else if ( $_GET["errorid"] == "54578") {
		print "Brugernavn og kodeord passede ikke sammen, prøv igen... (Fejlkode: 54578)";
	} else if ( $_GET["errorid"] == "10348") {
		print "Brugernavnet, du forsøgte at logge ind med, findes ikke i databasen... (Fejlkode: 10348)";
	} else if ( $_GET["errorid"] == "50149") {
		print "Der skete en fejl! Nyheden blev ikke slettet korrekt! (Fejlkode: 50149)";
	} else if ( $_GET["errorid"] == "51546") {
		print "Der skete en fejl! Artiklen blev ikke slettet korrekt! (Fejlkode: 51546)";
	} else if ( $_GET["errorid"] == "27173") {
		print "Der skete en fejl! Én eller flere af felterne blev ikke udfyldt! (Fejlkode: 27173)";
	} else if ( $_GET["errorid"] == "60065") {
		print "Denne bruger er desværre blevet deaktiveret af administratorerne! (Fejlkode: 60065)";
	} else if ( $_GET["errorid"] == "64587") {
		print "Der opstod en fejl ved forsøg p&aring; at uploade en fil! (Fejlkode: 64587)";
	} else if ( $_GET["errorid"] == "18277") {
		print "De indtastede kodeord var ikke ens!";
	} else if ( $_GET["errorid"] == "54990") {
		print "Brugernavnet er optaget!";
	} else if ( $_GET["errorid"] == "54308") {
		print "Den nedskrevne valideringskode og din skrevne kode passer ikke sammen! (Fejlkode: 54308)";
	} else if ( $_GET["errorid"] == "84318") {
		print "De to kodeord skal være mindst 6 tegn lange! (Fejlkode: 84318)";
	} else if ( $_GET["errorid"] == "51308") {
		print "Reglerne for communytiet skal accepteres! (Fejlkode: 51308)";
	} else if ( $_GET["errorid"] == "54972") {
		print "Der skete en fejl... Partneren findes stadig! (Fejlkode: 54972)";
	} else if ( $_GET["errorid"] == "95549") {
		print "Der skete en fejl... Du er ikke logget ind! (Fejlkode: 54972)";
	} else {
		print "Der opstod en ukendt fejl... (Fejlkode: ingen)";
	}
}

print "<br /><br />";
}
?>
</div>
<!-- HER SLUTTER KOMMENTARERNE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<?php

$file = $_GET[site];
$_GET["site_include"] = $_GET[site];
$file_to_show = "../../sites/includer.php";
$tjek_file = "../../sites/get.".$_GET['site'].".php";

if ($_GET["site_include"] == "") {
$_GET["site_include"] = "Forsiden";
$tjek_file = "index.php";
//$file_to_show = "../../sites/includer.php";
}

if (file_exists($tjek_file)){
include($file_to_show);

} else {

print "Siden du prøvede at åbne findes ikke!<br />Denne fejl vil hurtigst muligt blive rettet!<br />(Fejlkode: 404)";
}
?>
<br />
<br />
  </td>
 </tr>
 <tr>
  <td valign="bottom" align="left">
  <?PHP
  /* OLD CHART!
<!-- chart.dk unified trackercode - v1 -->
<script type='text/javascript' src='http://www.chart.dk/js/unified.asp'></script>
<script language='javascript'>
 track_visitor(131320, '');
</script>
<noscript>
 <a href="http://www.chart.dk/ref.asp?id=131320" target="_blank">
  <img src="http://cluster.chart.dk/chart.asp?id=131320" border="0" alt="Chart.dk" class="counter" />
 </a>
</noscript>
<!-- chart.dk unified trackercode - v1 -->
 */
 ?>
 
<!-- chart.dk unified trackercode - v1 -->
<script src='http://www.chart.dk/js/unified.asp'></script>
<script language='javascript'>
 track_visitor(139003, '');
</script>
<noscript>
 <a href="http://www.chart.dk/ref.asp?id=139003" target="_blank">
  <img src="http://cluster.chart.dk/chart.asp?id=139003" border="0" alt="Chart.dk">
 </a>
</noscript>
<!-- chart.dk unified trackercode - v1 -->

  </td>
  <td valign="bottom" align="left">

<div class="small" style="color:#F00;" align="center">
<br />
<?php
//pycoins();
?>
</div>
</table>
</div>
</div>
<div align="center">
<div class="copy" style="display:inline;">© Copyright <?php print date("Y");?> Pytox. Alle rettigheder forbeholdes. | <a href="http://www.Zeekoo.dk" target="_blank" class="copy">Website by Zeekoo.dk</a></div>
</div>
<?php
//////////////////////
} else {
print "Din ip: ".$_SERVER[REMOTE_ADDR];
}
////////////////////////

}
?>
<br />
<br />
<div style="display:block;" align="center">
<a style="border:0px;" href="?site=Redirect&amp;location=http://www.hdmedia.dk" title="HD-Media"><img style="border:0px;background-color:#000;" src="gfx/hdmedia.jpg" alt="Vi elsker Hig Definition" /></a>
</div>
<br />
 </body>
</html>