diff --git a/.gitignore b/.gitignore
index 6ad7b3e5..42b90a25 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,13 @@ Desktop.ini
# Mac crap
.DS_Store
+
+# Ignore generated config file
+GameEngine/config.php
+
+# Ignore generated prevention and notes
+GameEngine/Prevention/*
+GameEngine/Notes/*
+
+# Install instalation_done marker left by install script
+install/installation_done
diff --git a/GameEngine/Account.php b/GameEngine/Account.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/.htaccess b/GameEngine/Admin/.htaccess
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/.htaccess b/GameEngine/Admin/Mods/.htaccess
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/addABTroops.php b/GameEngine/Admin/Mods/addABTroops.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/addTroops.php b/GameEngine/Admin/Mods/addTroops.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/addUsers.php b/GameEngine/Admin/Mods/addUsers.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/additional.php b/GameEngine/Admin/Mods/additional.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/constant_format.tpl b/GameEngine/Admin/Mods/constant_format.tpl
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/cp.php b/GameEngine/Admin/Mods/cp.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/delallymedal.php b/GameEngine/Admin/Mods/delallymedal.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/delallymedalbyaid.php b/GameEngine/Admin/Mods/delallymedalbyaid.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/delallymedalbyweek.php b/GameEngine/Admin/Mods/delallymedalbyweek.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/deletemedalbyuser.php b/GameEngine/Admin/Mods/deletemedalbyuser.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/deletemedalbyweek.php b/GameEngine/Admin/Mods/deletemedalbyweek.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editAccess.php b/GameEngine/Admin/Mods/editAccess.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editAdminInfo.php b/GameEngine/Admin/Mods/editAdminInfo.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editBuildings.php b/GameEngine/Admin/Mods/editBuildings.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editExtraSet.php b/GameEngine/Admin/Mods/editExtraSet.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editHero.php b/GameEngine/Admin/Mods/editHero.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editLogSet.php b/GameEngine/Admin/Mods/editLogSet.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editNewsboxSet.php b/GameEngine/Admin/Mods/editNewsboxSet.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editOverall.php b/GameEngine/Admin/Mods/editOverall.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editPassword.php b/GameEngine/Admin/Mods/editPassword.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editPlus.php b/GameEngine/Admin/Mods/editPlus.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editProtection.php b/GameEngine/Admin/Mods/editProtection.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editResources.php b/GameEngine/Admin/Mods/editResources.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editServerSet.php b/GameEngine/Admin/Mods/editServerSet.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editSitter.php b/GameEngine/Admin/Mods/editSitter.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editUser.php b/GameEngine/Admin/Mods/editUser.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editUsername.php b/GameEngine/Admin/Mods/editUsername.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editVillageOwner.php b/GameEngine/Admin/Mods/editVillageOwner.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/editWeek.php b/GameEngine/Admin/Mods/editWeek.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/givePlus.php b/GameEngine/Admin/Mods/givePlus.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/givePlusRes.php b/GameEngine/Admin/Mods/givePlusRes.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/giveResBonus.php b/GameEngine/Admin/Mods/giveResBonus.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/gold.php b/GameEngine/Admin/Mods/gold.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/gold_1.php b/GameEngine/Admin/Mods/gold_1.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/index.php b/GameEngine/Admin/Mods/index.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/mainteneceBan.php b/GameEngine/Admin/Mods/mainteneceBan.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/mainteneceCleanBanData.php b/GameEngine/Admin/Mods/mainteneceCleanBanData.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/mainteneceResetGold.php b/GameEngine/Admin/Mods/mainteneceResetGold.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/mainteneceResetPlus.php b/GameEngine/Admin/Mods/mainteneceResetPlus.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/mainteneceResetPlusBonus.php b/GameEngine/Admin/Mods/mainteneceResetPlusBonus.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/mainteneceUnban.php b/GameEngine/Admin/Mods/mainteneceUnban.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/medals.php b/GameEngine/Admin/Mods/medals.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/natarbuildingplan.php b/GameEngine/Admin/Mods/natarbuildingplan.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/natarend.php b/GameEngine/Admin/Mods/natarend.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/recalcWH.php b/GameEngine/Admin/Mods/recalcWH.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/renameVillage.php b/GameEngine/Admin/Mods/renameVillage.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/Mods/sendMessage.php b/GameEngine/Admin/Mods/sendMessage.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/admin.php b/GameEngine/Admin/admin.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/ajax.js b/GameEngine/Admin/ajax.js
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/database.php b/GameEngine/Admin/database.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/function.php b/GameEngine/Admin/function.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Admin/welcome.tpl b/GameEngine/Admin/welcome.tpl
old mode 100644
new mode 100755
diff --git a/GameEngine/Alliance.php b/GameEngine/Alliance.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php
old mode 100644
new mode 100755
diff --git a/GameEngine/BBCode.php b/GameEngine/BBCode.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Battle.php b/GameEngine/Battle.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Building.php b/GameEngine/Building.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Chat.php b/GameEngine/Chat.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/buidata.php b/GameEngine/Data/buidata.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/cel.php b/GameEngine/Data/cel.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/cp.php b/GameEngine/Data/cp.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/hero_full.php b/GameEngine/Data/hero_full.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/hunitdata.php b/GameEngine/Data/hunitdata.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/index.php b/GameEngine/Data/index.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/resdata.php b/GameEngine/Data/resdata.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Data/unitdata.php b/GameEngine/Data/unitdata.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Database.php b/GameEngine/Database.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php
old mode 100644
new mode 100755
index 6746d775..bdb427dc
--- a/GameEngine/Database/db_MYSQL.php
+++ b/GameEngine/Database/db_MYSQL.php
@@ -134,17 +134,6 @@ class MYSQL_DB {
return $dbarray['id'];
}
- function caststruc($user) {
- //loop search village user
- $query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user."");
- while($villaggi_array = mysql_fetch_array($query))
-
- //loop structure village
- $query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref']."");
- $strutture= mysql_fetch_array($query1);
- return $strutture;
- }
-
function removeMeSit($uid, $uid2) {
$q = "UPDATE " . TB_PREFIX . "users set sit1 = 0 where id = $uid and sit1 = $uid2";
mysql_query($q, $this->connection);
@@ -193,12 +182,6 @@ class MYSQL_DB {
return $this->mysql_fetch_all($result);
}
- function getUnstarvation(){
- $q = "SELECT * FROM " . TB_PREFIX . "vdata where starv = 0 and starvupdate = 0";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
-
function getActivateField($ref, $field, $mode) {
if(!$mode) {
$q = "SELECT $field FROM " . TB_PREFIX . "activate where id = '$ref'";
@@ -221,14 +204,6 @@ class MYSQL_DB {
}
}
- function checkActivate($act) {
- $q = "SELECT * FROM " . TB_PREFIX . "activate where act = '$act'";
- $result = mysql_query($q, $this->connection);
- $dbarray = mysql_fetch_array($result);
-
- return $dbarray;
- }
-
function sitterLogin($username, $password) {
$q = "SELECT sit1,sit2 FROM " . TB_PREFIX . "users where username = '$username' and access != " . BANNED;
$result = mysql_query($q, $this->connection);
@@ -328,16 +303,6 @@ class MYSQL_DB {
}
}
- function checkactiveSession($username, $sessid) {
- $q = "SELECT username FROM " . TB_PREFIX . "users where username = '$username' and sessid = '$sessid' LIMIT 1";
- $result = mysql_query($q, $this->connection);
- if(mysql_num_rows($result) != 0) {
- return true;
- } else {
- return false;
- }
- }
-
function submitProfile($uid, $gender, $location, $birthday, $des1, $des2) {
$q = "UPDATE " . TB_PREFIX . "users set gender = $gender, location = '$location', birthday = '$birthday', desc1 = '$des1', desc2 = '$des2' where id = $uid";
return mysql_query($q, $this->connection);
@@ -778,19 +743,6 @@ class MYSQL_DB {
return mysql_fetch_array($result);
}
- public function getVillageBattleData($vid) {
- $q = "SELECT u.id,u.tribe,v.capital,f.f40 AS wall FROM ".TB_PREFIX."users u,".TB_PREFIX."fdata f,".TB_PREFIX."vdata v WHERE u.id=v.owner AND f.vref=v.wref AND v.wref=".$vid;
- $result = mysql_query($q, $this->connection);
- return mysql_fetch_array($result);
- }
-
- public function getPopulation($uid) {
- $q = "SELECT sum(pop) AS pop FROM ".TB_PREFIX."vdata WHERE owner=".$uid;
- $result = mysql_query($q, $this->connection);
- $dbarray = mysql_fetch_array($result);
- return $dbarray['pop'];
- }
-
function getOasisV($vid) {
$q = "SELECT * FROM " . TB_PREFIX . "odata where wref = $vid";
$result = mysql_query($q, $this->connection);
@@ -861,24 +813,6 @@ class MYSQL_DB {
return $this->mysql_fetch_all($result);
}
- //fix market log
- function getMarketLog() {
- $q = "SELECT id,wid,log from " . TB_PREFIX . "market_log where id != 0 ORDER BY id ASC";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
- function getMarketLogVillage($village) {
- $q = "SELECT wref,owner,name from " . TB_PREFIX . "vdata where wref =$village ";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
- function getMarketLogUsers($id_user) {
- $q = "SELECT id,username from " . TB_PREFIX . "users where id =$id_user ";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
- //end fix
-
function getCoor($wref) {
if ($wref !=""){
$q = "SELECT x,y FROM " . TB_PREFIX . "wdata where id = $wref";
@@ -1434,12 +1368,6 @@ class MYSQL_DB {
return $dbarray['id'];
}
- function getDiplomacy($aid) {
- $q = "SELECT * FROM " . TB_PREFIX . "diplomacy WHERE id = $aid";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
-
function diplomacyCancelOffer($id) {
$q = "DELETE FROM " . TB_PREFIX . "diplomacy WHERE id = $id";
return mysql_query($q, $this->connection);
@@ -1842,24 +1770,6 @@ class MYSQL_DB {
}
}
- function getDelSent($uid) {
- $q = "SELECT * FROM " . TB_PREFIX . "mdata WHERE owner = $uid and delowner = 1 ORDER BY time DESC";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
-
- function getDelInbox($uid) {
- $q = "SELECT * FROM " . TB_PREFIX . "mdata WHERE target = $uid and deltarget = 1 ORDER BY time DESC";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
-
- function getDelArchive($uid) {
- $q = "SELECT * FROM " . TB_PREFIX . "mdata WHERE target = $uid and archived = 1 and deltarget = 1 OR owner = $uid and archived = 1 and delowner = 1 ORDER BY time DESC";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
-
function unarchiveNotice($id) {
$q = "UPDATE " . TB_PREFIX . "ndata set ntype = archive, archive = 0 where id = $id";
return mysql_query($q, $this->connection);
@@ -2550,17 +2460,6 @@ class MYSQL_DB {
return mysql_query($q, $this->connection);
}
- function modifyHeroByOwner($column,$value,$uid,$mode=0) {
- if(!$mode) {
- $q = "UPDATE `".TB_PREFIX."hero` SET $column = $value WHERE uid = $uid";
- } elseif($mode=1) {
- $q = "UPDATE `".TB_PREFIX."hero` SET $column = $column + $value WHERE uid = $uid";
- } else {
- $q = "UPDATE `".TB_PREFIX."hero` SET $column = $column - $value WHERE uid = $uid";
- }
- return mysql_query($q, $this->connection);
- }
-
function modifyHeroXp($column,$value,$heroid) {
$q = "UPDATE ".TB_PREFIX."hero SET $column = $column + $value WHERE uid=$heroid";
return mysql_query($q, $this->connection);
@@ -2612,13 +2511,6 @@ class MYSQL_DB {
return $this->mysql_fetch_all($result);
}
- function countTraining($vid) {
- $q = "SELECT * FROM " . TB_PREFIX . "training WHERE vref = $vid";
- $result = mysql_query($q, $this->connection);
- $row = mysql_fetch_row($result);
- return $row[0];
- }
-
function trainUnit($vid, $unit, $amt, $pop, $each, $time, $mode) {
global $village, $building, $session, $technology;
@@ -2881,30 +2773,6 @@ class MYSQL_DB {
}
}
- /***************************
- Function to get world wonder level!
- Made by: Dzoki
- ***************************/
-
- function getWWLevel($vref) {
- $q = "SELECT f99 FROM " . TB_PREFIX . "fdata WHERE vref = $vref";
- $result = mysql_query($q, $this->connection) or die(mysql_error());
- $dbarray = mysql_fetch_array($result);
- return $dbarray['f99'];
- }
-
- /***************************
- Function to get world wonder owner ID!
- Made by: Dzoki
- ***************************/
-
- function getWWOwnerID($vref) {
- $q = "SELECT owner FROM " . TB_PREFIX . "vdata WHERE wref = $vref";
- $result = mysql_query($q, $this->connection) or die(mysql_error());
- $dbarray = mysql_fetch_array($result);
- return $dbarray['owner'];
- }
-
/***************************
Function to get user alliance name!
Made by: Dzoki
@@ -2940,10 +2808,6 @@ class MYSQL_DB {
}
//medal functions
- function addclimberpop($user, $cp) {
- $q = "UPDATE " . TB_PREFIX . "users set Rc = Rc + '$cp' where id = $user";
- return mysql_query($q, $this->connection);
- }
function addclimberrankpop($user, $cp) {
$q = "UPDATE " . TB_PREFIX . "users set clp = clp + '$cp' where id = $user";
return mysql_query($q, $this->connection);
@@ -2960,15 +2824,7 @@ class MYSQL_DB {
$q = "UPDATE " . TB_PREFIX . "users set oldrank = '$cp' where id = $user";
return mysql_query($q, $this->connection);
}
- function removeclimberpop($user, $cp) {
- $q = "UPDATE " . TB_PREFIX . "users set Rc = Rc - '$cp' where id = $user";
- return mysql_query($q, $this->connection);
- }
// ALLIANCE MEDAL FUNCTIONS
- function addclimberpopAlly($user, $cp) {
- $q = "UPDATE " . TB_PREFIX . "alidata set Rc = Rc + '$cp' where id = $user";
- return mysql_query($q, $this->connection);
- }
function addclimberrankpopAlly($user, $cp) {
$q = "UPDATE " . TB_PREFIX . "alidata set clp = clp + '$cp' where id = $user";
return mysql_query($q, $this->connection);
@@ -2981,10 +2837,6 @@ class MYSQL_DB {
$q = "UPDATE " . TB_PREFIX . "alidata set oldrank = '$cp' where id = $user";
return mysql_query($q, $this->connection);
}
- function removeclimberpopAlly($user, $cp) {
- $q = "UPDATE " . TB_PREFIX . "alidata set Rc = Rc - '$cp' where id = $user";
- return mysql_query($q, $this->connection);
- }
function getTrainingList() {
$q = "SELECT * FROM " . TB_PREFIX . "training where vref != ''";
@@ -3073,22 +2925,6 @@ class MYSQL_DB {
return $dbarray['crop'];
}
- function Getowner($vid) {
- $s = "SELECT owner FROM " . TB_PREFIX . "vdata where wref = $vid";
- $result1 = mysql_query($s, $this->connection);
- $row1 = mysql_fetch_row($result1);
- return $row1[0];
- }
-
- public function debug($time, $uid, $debug_info) {
- $q = "INSERT INTO " . TB_PREFIX . "debug_info (time,uid,debug_info) VALUES ($time,$uid,$debug_info)";
- if(mysql_query($q, $this->connection)) {
- return mysql_insert_id($this->connection);
- } else {
- return false;
- }
- }
-
function populateOasisdata() {
$q2 = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
$result2 = mysql_query($q2, $this->connection);
@@ -3211,12 +3047,6 @@ class MYSQL_DB {
return mysql_fetch_array($result);
}
- function getOwnArtefactInfo2($vref) {
- $q = "SELECT * FROM " . TB_PREFIX . "artefacts WHERE vref = $vref";
- $result = mysql_query($q, $this->connection);
- return $this->mysql_fetch_all($result);
- }
-
function getOwnArtefactInfo3($uid) {
$q = "SELECT * FROM " . TB_PREFIX . "artefacts WHERE owner = $uid";
$result = mysql_query($q, $this->connection);
diff --git a/GameEngine/Database/db_MYSQLi.php b/GameEngine/Database/db_MYSQLi.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Database/index.php b/GameEngine/Database/index.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Form.php b/GameEngine/Form.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Game/WorldWonderName.php b/GameEngine/Game/WorldWonderName.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Game/index.php b/GameEngine/Game/index.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Generator.php b/GameEngine/Generator.php
old mode 100644
new mode 100755
index 296900c3..71fdd1f9
--- a/GameEngine/Generator.php
+++ b/GameEngine/Generator.php
@@ -148,17 +148,12 @@ if (date('Ymd',time()) == date('Ymd',$time)) {
}
public function pageLoadTimeStart() {
- $starttime = microtime();
- $startarray = explode(" ", $starttime);
- //$starttime = $startarray[1] + $startarray[0];
- return $startarray[0];
+ if (isset($_SERVER["REQUEST_TIME_FLOAT"])) return $_SERVER["REQUEST_TIME_FLOAT"];
+ return microtime(true);
}
public function pageLoadTimeEnd() {
- $endtime = microtime();
- $endarray = explode(" ", $endtime);
- //$endtime = $endarray[1] + $endarray[0];
- return $endarray[0];
+ return microtime(true);
}
};
diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Lang/es.php b/GameEngine/Lang/es.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Lang/index.php b/GameEngine/Lang/index.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Lang/ru.php b/GameEngine/Lang/ru.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Lang/zh_tw.php b/GameEngine/Lang/zh_tw.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Logging.php b/GameEngine/Logging.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Mailer.php b/GameEngine/Mailer.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Market.php b/GameEngine/Market.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Message.php b/GameEngine/Message.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Multisort.php b/GameEngine/Multisort.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Notes/DO NOT REMOVE THIS FOLDER.txt b/GameEngine/Notes/DO NOT REMOVE THIS FOLDER.txt
old mode 100644
new mode 100755
diff --git a/GameEngine/Notes/index.php b/GameEngine/Notes/index.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Prevention/empty.txt b/GameEngine/Prevention/empty.txt
old mode 100644
new mode 100755
diff --git a/GameEngine/Prevention/index.php b/GameEngine/Prevention/index.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Prevention/lock.lock b/GameEngine/Prevention/lock.lock
old mode 100644
new mode 100755
diff --git a/GameEngine/Profile.php b/GameEngine/Profile.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Protection.php b/GameEngine/Protection.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Ranking.php b/GameEngine/Ranking.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Session.php b/GameEngine/Session.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Technology.php b/GameEngine/Technology.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Units.php b/GameEngine/Units.php
old mode 100644
new mode 100755
diff --git a/GameEngine/Village.php b/GameEngine/Village.php
old mode 100644
new mode 100755
diff --git a/GameEngine/favicon.ico b/GameEngine/favicon.ico
old mode 100644
new mode 100755
diff --git a/GameEngine/functions.php b/GameEngine/functions.php
old mode 100644
new mode 100755
diff --git a/GameEngine/index.php b/GameEngine/index.php
old mode 100644
new mode 100755
diff --git a/Templates/Profile/medal.php b/Templates/Profile/medal.php
index 732572e4..abcfb3c7 100644
--- a/Templates/Profile/medal.php
+++ b/Templates/Profile/medal.php
@@ -28,19 +28,10 @@
//de bird
if($displayarray['protect'] > time()){
-$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));
+$secondsDiff = $displayarray['protect'] - time();
+$remainingDay = floor($secondsDiff/(3600*24));
-$nul1 = $nul2 = $nul3 = "0";
-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";
+$left = "$remainingDay days ".date("H:i:s", $secondsDiff);
$profiel = preg_replace("/\[#0]/is",'
', $profiel, 1);
} else {
$geregistreerd=date('d-m-Y', ($displayarray['regtime']));
diff --git a/install/data/.htaccess b/install/data/.htaccess
old mode 100644
new mode 100755
diff --git a/install/data/constant_format.tpl b/install/data/constant_format.tpl
old mode 100644
new mode 100755
diff --git a/install/data/sql.sql b/install/data/sql.sql
old mode 100644
new mode 100755
index a578a090..f504a826
--- a/install/data/sql.sql
+++ b/install/data/sql.sql
@@ -396,6 +396,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%build_log` (
`id` int(11) NULL AUTO_INCREMENT,
`wid` int(11) NULL,
`log` text NULL,
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -838,6 +839,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%gold_fin_log` (
`id` int(11) NULL AUTO_INCREMENT,
`wid` int(11) NULL,
`log` text NULL,
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -892,6 +894,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%illegal_log` (
`id` int(11) NULL AUTO_INCREMENT,
`user` int(11) NULL,
`log` text NULL,
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -910,6 +913,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%login_log` (
`id` int(11) NULL AUTO_INCREMENT,
`uid` int(11) NULL,
`ip` varchar(15) NULL,
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -953,6 +957,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%market_log` (
`id` int(11) NULL AUTO_INCREMENT,
`wid` int(11) NULL,
`log` text NULL,
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -1311,6 +1316,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%tech_log` (
`id` int(11) NULL AUTO_INCREMENT,
`wid` int(11) NULL,
`log` text NULL,
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
diff --git a/install/include/database.php b/install/include/database.php
old mode 100644
new mode 100755
diff --git a/install/include/multihunter.php b/install/include/multihunter.php
old mode 100644
new mode 100755
diff --git a/install/include/oasis.php b/install/include/oasis.php
old mode 100644
new mode 100755
diff --git a/install/include/wdata.php b/install/include/wdata.php
old mode 100644
new mode 100755
diff --git a/install/index.php b/install/index.php
old mode 100644
new mode 100755
index 17572f19..892ad921
--- a/install/index.php
+++ b/install/index.php
@@ -83,7 +83,11 @@ function proceed() {
ERROR!
It's not possible to write the config file. Change the permission to '777'. After that, refresh this page!";
- } else
+ }
+ else if (file_exists("installation_done")) {
+ echo"ERROR!
Installation appears to have been completed.
If this is an error remove installation_done file in install directory.";
+ }
+ else
switch($_GET['s']){
case 0:
include("templates/greet.tpl");
diff --git a/install/process.php b/install/process.php
old mode 100644
new mode 100755
diff --git a/install/templates/.htaccess b/install/templates/.htaccess
old mode 100644
new mode 100755
diff --git a/install/templates/config.tpl b/install/templates/config.tpl
old mode 100644
new mode 100755
diff --git a/install/templates/dataform.tpl b/install/templates/dataform.tpl
old mode 100644
new mode 100755
diff --git a/install/templates/end.tpl b/install/templates/end.tpl
old mode 100644
new mode 100755
index dc099760..9c087704
--- a/install/templates/end.tpl
+++ b/install/templates/end.tpl
@@ -24,6 +24,7 @@ All the files are placed. The database is created, so you can now start playing