diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php index 68404c31..08bf4e33 100644 --- a/GameEngine/Database/db_MYSQL.php +++ b/GameEngine/Database/db_MYSQL.php @@ -21,7 +21,7 @@ function register($username, $password, $email, $tribe, $locate, $act) { $time = time(); $timep = (time() + PROTECTION); - $q = "INSERT INTO " . TB_PREFIX . "users (username,password,access,email,timestamp,tribe,location,act,protect) VALUES ('$username', '$password', " . USER . ", '$email', $time, $tribe, $locate, '$act', $timep)"; + $q = "INSERT INTO " . TB_PREFIX . "users (username,password,access,email,timestamp,tribe,location,act,protect,regtime) VALUES ('$username', '$password', " . USER . ", '$email', $time, $tribe, $locate, '$act', $timep, $time)"; if(mysql_query($q, $this->connection)) { return mysql_insert_id($this->connection); } else { diff --git a/Templates/Build/37_land.tpl b/Templates/Build/37_land.tpl index 803b72c8..ea27a276 100644 --- a/Templates/Build/37_land.tpl +++ b/Templates/Build/37_land.tpl @@ -71,4 +71,4 @@ - + \ No newline at end of file diff --git a/Templates/Profile/medal.php b/Templates/Profile/medal.php index f760038c..fe10cf18 100644 --- a/Templates/Profile/medal.php +++ b/Templates/Profile/medal.php @@ -9,10 +9,20 @@ //de bird if($displayarray['protect'] > time()){ -$uurover=date('H:i:s', ($displayarray['protect']-time())-3600); -$profiel = preg_replace("/\[#0]/is",'', $profiel, 1); +$secondsDiff = $displayarray['protect'] - time(); +$remainingDay = floor($secondsDiff/60/60/24); +$remainingHour = floor(($secondsDiff-($remainingDay*60*60))/3600); +$remainingMinutes = floor(($secondsDiff-($remainingDay*60*60)-($remainingHour*60*60))/60); +$remainingSeconds = floor(($secondsDiff-($remainingDay*60*60)-($remainingHour*60*60))-($remainingMinutes*60)); +if(strlen($remainingSeconds) <= 1){ +$nul1 = "0";} +if(strlen($remainingMinutes) <= 1){ +$nul2 = "0";} +if(strlen($remainingHour) <= 1){ $nul3 = "0"; } +$left="$nul3$remainingHour:$nul2$remainingMinutes:$nul1$remainingSeconds"; +$profiel = preg_replace("/\[#0]/is",'', $profiel, 1); } else { -$geregistreerd=date('d-m-Y', ($displayarray['timestamp'])); +$geregistreerd=date('d-m-Y', ($displayarray['regtime'])); $profiel = preg_replace("/\[#0]/is",'', $profiel, 1); } diff --git a/Templates/multivillage.tpl b/Templates/multivillage.tpl index 87493665..0f7a0692 100644 --- a/Templates/multivillage.tpl +++ b/Templates/multivillage.tpl @@ -58,7 +58,7 @@ else if(isset($_GET['c'])) { for($i=1;$i<=count($session->villages);++$i){echo' ● - '.htmlspecialchars($returnVillageArray[$i-1]['name']).' + '.htmlspecialchars($returnVillageArray[$i-1]['name']).'
('.$returnVillageArray[$i-1]['x'].'
|
'.$returnVillageArray[$i-1]['y'].')
'; } } @@ -86,6 +86,14 @@ else if(isset($_GET['aid'])) {
('.$returnVillageArray[$i-1]['x'].'
|
'.$returnVillageArray[$i-1]['y'].')
'; } } +else if(isset($_GET['uid'])) { + for($i=1;$i<=count($session->villages);++$i){echo' + + ● + '.htmlspecialchars($returnVillageArray[$i-1]['name']).' +
('.$returnVillageArray[$i-1]['x'].'
|
'.$returnVillageArray[$i-1]['y'].')
'; + } +} else{ for($i=1;$i<=count($session->villages);++$i){echo' diff --git a/karte.php b/karte.php index a0adc958..d57575d7 100644 --- a/karte.php +++ b/karte.php @@ -15,11 +15,11 @@ include("GameEngine/Village.php"); $start = $generator->pageLoadTimeStart(); if(isset($_GET['newdid'])) { $_SESSION['wid'] = $_GET['newdid']; - if(isset($_GET['d'])){ - header("Location: ".$_SERVER['PHP_SELF']."?d=".$_GET['d']); +if(isset($_GET['d']) && isset($_GET['c'])){ + header("Location: ".$_SERVER['PHP_SELF']."?d=".$_GET['d']."&c=".$_GET['c']); } -else if(isset($_GET['c'])){ - header("Location: ".$_SERVER['PHP_SELF']."?c=".$_GET['c']); +else if(isset($_GET['d'])){ + header("Location: ".$_SERVER['PHP_SELF']."?d=".$_GET['d']); } else{ header("Location: ".$_SERVER['PHP_SELF']); diff --git a/spieler.php b/spieler.php index b536e4e7..e064e1f5 100644 --- a/spieler.php +++ b/spieler.php @@ -9,7 +9,7 @@ ## Copyright: TravianX (c) 2010-2011. All rights reserved. ## ## ## ################################################################################# - +ob_start(); include("GameEngine/Village.php"); $start = $generator->pageLoadTimeStart(); $profile->procProfile($_POST); @@ -18,6 +18,8 @@ if(isset($_GET['newdid'])) { $_SESSION['wid'] = $_GET['newdid']; if(isset($_GET['s'])){ header("Location: ".$_SERVER['PHP_SELF']."?s=".$_GET['s']); + }else if(isset($_GET['uid'])){ + header("Location: ".$_SERVER['PHP_SELF']."?uid=".$_GET['uid']); }else{ header("Location: ".$_SERVER['PHP_SELF']); } @@ -144,6 +146,8 @@ else if (isset($_GET['s'])) { if($_GET['s'] == 4) { include("Templates/Profile/graphic.tpl"); } +}else{ +header("Location: ".$_SERVER['PHP_SELF']."?uid=".$session->uid); } ?>