diff --git a/Admin/Templates/editHero.tpl b/Admin/Templates/editHero.tpl
new file mode 100644
index 00000000..85644bf2
--- /dev/null
+++ b/Admin/Templates/editHero.tpl
@@ -0,0 +1,205 @@
+getUserArray($id,1);
+ $result = mysql_query("SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id);
+ $hero_info = mysql_fetch_array($result);
+ $hero = $units->Hero($id,1);
+ $unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
+ $utribe=($user['tribe']-1)*10;
+?>
+
+
+
+ Please fill hero name';
+ }
+ ?>
\ No newline at end of file
diff --git a/Admin/Templates/player.tpl b/Admin/Templates/player.tpl
index 9e4550e4..2975b3ce 100644
--- a/Admin/Templates/player.tpl
+++ b/Admin/Templates/player.tpl
@@ -44,8 +44,9 @@ if(isset($id))
include("playerdeletion.tpl");
}
- include("playerinfo.tpl");
- include("playeradditionalinfo.tpl");
+ include("playerinfo.tpl");
+ include("playerheroinfo.tpl");
+ include("playeradditionalinfo.tpl");
echo "
";
include("playermedals.tpl");
include ("villages.tpl"); ?>
diff --git a/Admin/Templates/playerheroinfo.tpl b/Admin/Templates/playerheroinfo.tpl
new file mode 100644
index 00000000..6d0175da
--- /dev/null
+++ b/Admin/Templates/playerheroinfo.tpl
@@ -0,0 +1,150 @@
+Hero($id,1);
+}else {
+$hero="none";
+}
+?>
+
+
+ Problem to kill hero';
+ }elseif(isset($_GET['kc'])){
+ echo 'Kill hero has done
';
+ }elseif(isset($_GET['rc'])){
+ echo 'Revive hero has done
';
+ }elseif(isset($_GET['ac'])){
+ echo 'Add hero has done
';
+ }elseif(isset($_GET['cs'])){
+ echo 'Change hero info has done
';
+ }elseif(isset($_GET['ce'])){
+ echo 'Problem to change hero info
';
+ }
+ ?>
\ No newline at end of file
diff --git a/Admin/admin.php b/Admin/admin.php
index c7990dc4..6ee2e661 100644
--- a/Admin/admin.php
+++ b/Admin/admin.php
@@ -60,6 +60,7 @@ $up_avl = $latest - $ver ;
+
diff --git a/GameEngine/Admin/Mods/editHero.php b/GameEngine/Admin/Mods/editHero.php
new file mode 100644
index 00000000..e0e97520
--- /dev/null
+++ b/GameEngine/Admin/Mods/editHero.php
@@ -0,0 +1,37 @@
+query($q);
+if($return) {
+ $database->query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed hero info',".time().")");
+ $status="&cs=1";
+}
+}
+header("Location: ../../../Admin/admin.php?p=player&uid=".$id.$status);
+?>
\ No newline at end of file
diff --git a/GameEngine/Admin/function.php b/GameEngine/Admin/function.php
index f6d20fe3..61dd6560 100644
--- a/GameEngine/Admin/function.php
+++ b/GameEngine/Admin/function.php
@@ -70,6 +70,44 @@ class funct {
case "logout":
$this->LogOut();
break;
+ case "killHero":
+ $varray = $database->getProfileVillages($get['uid']);
+ $killhero=false;
+ $error="";
+ for ($i = 0; $i <= count($varray)-1; $i++) {
+ $killhero=$database->FindHeroInVil($varray[$i]['wref']);
+ if ($killhero) break;
+ $killhero=$database->FindHeroInDef($varray[$i]['wref']);
+ if ($killhero) break;
+ $killhero=$database->FindHeroInMovement($varray[$i]['wref']);
+ if ($killhero) break;
+ }
+ if (!$killhero){
+ $killhero=$database->FindHeroInOasis($get['uid']);
+ }
+ if ($killhero) {
+ $database->KillMyHero($get['uid']);
+ $error="&kc=1";
+ }else $error="&e=1";
+ header("Location: admin.php?p=player&uid=".$get['uid'].$error);
+ exit;
+ case "reviveHero":
+ $result=$database->query("SELECT * FROM ".TB_PREFIX."hero WHERE uid='".$get['uid']."'");
+ $hdata=mysql_fetch_array($result);
+ $database->query("UPDATE ".TB_PREFIX."units SET hero = 1 WHERE vref = ".$hdata['wref']);
+ $database->query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100', `lastupdate` = ".time()." WHERE `uid` = '".$get['uid']."'");
+ header("Location: admin.php?p=player&uid=".$get['uid']."&rc=1");
+ exit;
+ case "addHero":
+ $user = $database->getUserArray($get['uid'],1);
+ $vilarray=$database->getVrefCapital($get['uid']);
+
+ $database->query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`,
+ `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`,
+ `intraining`) VALUES ('".$get['uid']."', '" . $vilarray['wref'] . "', '0', '".$get['u']."', '".addslashes($user['username'])."',
+ '0', '5', '0', '0', '100', '0', '0', '0', '0', '".time()."', '50', '0')");
+ header("Location: admin.php?p=player&uid=".$get['uid']."&ac=1");
+ exit;
}
if($get['action'] == 'logout'){
header("Location: admin.php");
diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php
index 207b7ff0..f805ed31 100644
--- a/GameEngine/Database/db_MYSQL.php
+++ b/GameEngine/Database/db_MYSQL.php
@@ -3657,10 +3657,10 @@ References:
}
}
- /*****************************************
-Function to vacation mode - by advocaite
-References:
-*****************************************/
+ /*****************************************
+ Function to vacation mode - by advocaite
+ References:
+ *****************************************/
/***************************
Function to get Hero Dead
@@ -3731,6 +3731,88 @@ References:
$q = "UPDATE " . TB_PREFIX . "hero set dead = 1 where uid = ".$id;
return mysql_query($q, $this->connection);
}
+
+ /***************************
+ Function to find Hero place
+ Made by: ronix
+ ***************************/
+ function FindHeroInVil($wid) {
+ $result = $this->query("SELECT * FROM ".TB_PREFIX."units WHERE hero>0 AND vref='".$wid."'");
+ if (!empty($result)) {
+ $dbarray = mysql_fetch_array($result);
+ if(isset($dbarray['hero'])) {
+ $this->query("UPDATE ".TB_PREFIX."units SET hero=0 WHERE vref='".$wid."'");
+ unset($dbarray);
+ return true;
+ }
+ }
+ return false;
+ }
+ function FindHeroInDef($wid) {
+ $delDef=true;
+ $result = $this->query_return("SELECT * FROM ".TB_PREFIX."enforcement WHERE hero>0 AND `from` = ".$wid);
+ if (!empty($result)) {
+ $dbarray = mysql_fetch_array($result);
+ if(isset($dbarray['hero'])) {
+ $this->query("UPDATE ".TB_PREFIX."enforcement SET hero=0 WHERE `from` = ".$wid);
+ for ($i=0;$i<50;$i++) {
+ if($dbarray['u'.$i]>0) {
+ $delDef=false;
+ break;
+ }
+ }
+ if ($delDef) $this->deleteReinf($wid);
+ unset($dbarray);
+ return true;
+ }
+ }
+ return false;
+ }
+ function FindHeroInOasis($uid) {
+ $delDef=true;
+ $dbarray = $this->query_return("SELECT e.*,o.conqured,o.owner FROM ".TB_PREFIX."enforcement as e LEFT JOIN ".TB_PREFIX."odata as o ON e.vref=o.wref where o.owner=".$uid." AND e.hero>0");
+ if(!empty($dbarray)) {
+ foreach($dbarray as $defoasis) {
+ if($defoasis['hero']>0) {
+ $this->query("UPDATE ".TB_PREFIX."enforcement SET hero=0 WHERE `from` = ".$defoasis['from']);
+ for ($i=0;$i<50;$i++) {
+ if($dbarray['u'.$i]>0) {
+ $delDef=false;
+ break;
+ }
+ }
+ if ($delDef) $this->deleteReinf($defoasis['from']);
+ unset($dbarray);
+ return true;
+ }
+ }
+ }
+ return 0;
+ }
+
+ function FindHeroInMovement($wid) {
+ $outgoingarray = $this->getMovement(3, $wid, 0);
+ if(!empty($outgoingarray)) {
+ foreach($outgoingarray as $out) {
+ if ($out['t11']>0) {
+ $dbarray = $this->query("UPDATE ".TB_PREFIX."attacks SET t11=0 WHERE `id` = ".$out['ref']);
+ return true;
+ break;
+ }
+ }
+ }
+ $returningarray = $this->getMovement(4, $wid, 1);
+ if(!empty($returningarray)) {
+ foreach($returningarray as $ret) {
+ if($ret['attack_type'] != 1 && $ret['t11']>0) {
+ $dbarray = $this->query("UPDATE ".TB_PREFIX."attacks SET t11=0 WHERE `id` = ".$ret['ref']);
+ return true;
+ break;
+ }
+ }
+ }
+ return false;
+ }
/***************************
Function checkAttack
diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php
index 63c8eaa7..2c81b11e 100644
--- a/GameEngine/Lang/en.php
+++ b/GameEngine/Lang/en.php
@@ -845,7 +845,7 @@ The construction plans are conquerable immediately when they appear to the serve
There will be a countdown in game, showing the exact time of the release, 5 days prior to the launch. ");
-//planos
+//Building Plans
define("PLAN","Ancient Construction Plan");
define("PLANVILLAGE","WW Buildingplan");
define("PLAN_DESC","With this ancient construction plan you will able to build World Wonder to level 50. to build further, your alliance must hold at least two plans.");
diff --git a/GameEngine/Units.php b/GameEngine/Units.php
index 9c692c20..4d6ae555 100644
--- a/GameEngine/Units.php
+++ b/GameEngine/Units.php
@@ -704,9 +704,9 @@ header("Location: banned.php");
}
}
- public function Hero($uid) {
+ public function Hero($uid,$all=0) {
global $database;
- $heroarray = $database->getHero($uid);
+ $heroarray = $database->getHero($uid,$all);
$herodata = $GLOBALS["h".$heroarray[0]['unit']];
$h_atk = $herodata['atk'] + 5 * floor($heroarray[0]['attack'] * $herodata['atkp'] / 5);
diff --git a/img/admin/admin.css b/img/admin/admin.css
index 03ae0045..a17066bf 100644
--- a/img/admin/admin.css
+++ b/img/admin/admin.css
@@ -541,4 +541,32 @@ table#member tbody th, table#member tbody td {text-align:left;}
table#member td.ra {width:5%; text-align:right;}
table#member td.hab {width:25%; text-align:center;}
table#member td.vil {width:20%; text-align:center;}
-table#member td.on {width:5%; text-align:center;}
\ No newline at end of file
+table#member td.on {width:5%; text-align:center;}
+
+
+.dropdown {border:#71D000 solid; border-width:1px; font-size:10pt;}
+input.dynamic_img, img.dynamic_img {
+ background-position: center top;
+ height: 20px;
+}
+input.over, img.over {
+ background-position: center bottom;
+}
+input.clicked, img.clicked {
+ background-position: center center;
+}
+
+input#btn_login {width:97px; background-image: url(b/login.gif);}
+input#btn_signup {width:97px; background-image: url(b/signup.gif);}
+input#btn_ok {width:47px; background-image: url(b/ok.gif);}
+input#btn_reply {width:97px; background-image: url(b/reply.gif);}
+input#btn_send {width:97px; background-image: url(b/send.gif);}
+input#btn_save {width:97px; background-image: url(b/save.gif);}
+input#btn_delete {width:97px; background-image: url(b/delete.gif);}
+input#btn_archiv {width:97px; background-image: url(b/archiv.gif);}
+input#btn_back {width:97px; background-image: url(b/zurueck.html);}
+input#btn_train {width:97px; background-image: url(b/train.gif);}
+input#btn_back {width:97px; background-image: url(b/back.gif);}
+input#btn_forward {width:97px; background-image: url(b/forward.gif);}
+input#btn_demolish {width:97px; background-image: url(b/demolish.gif);}
+input#btn_search {width:97px; background-image: url(b/search.gif);}
\ No newline at end of file
diff --git a/img/admin/b/archiv.gif b/img/admin/b/archiv.gif
new file mode 100644
index 00000000..16191b2d
Binary files /dev/null and b/img/admin/b/archiv.gif differ
diff --git a/img/admin/b/back.gif b/img/admin/b/back.gif
new file mode 100644
index 00000000..5d87d385
Binary files /dev/null and b/img/admin/b/back.gif differ
diff --git a/img/admin/b/delete.gif b/img/admin/b/delete.gif
new file mode 100644
index 00000000..2eb68236
Binary files /dev/null and b/img/admin/b/delete.gif differ
diff --git a/img/admin/b/demolish.gif b/img/admin/b/demolish.gif
new file mode 100644
index 00000000..af704dcf
Binary files /dev/null and b/img/admin/b/demolish.gif differ
diff --git a/img/admin/b/forward.gif b/img/admin/b/forward.gif
new file mode 100644
index 00000000..c2c7505a
Binary files /dev/null and b/img/admin/b/forward.gif differ
diff --git a/img/admin/b/login.gif b/img/admin/b/login.gif
new file mode 100644
index 00000000..03a68fdb
Binary files /dev/null and b/img/admin/b/login.gif differ
diff --git a/img/admin/b/ok.gif b/img/admin/b/ok.gif
new file mode 100644
index 00000000..f207a4e0
Binary files /dev/null and b/img/admin/b/ok.gif differ
diff --git a/img/admin/b/reply.gif b/img/admin/b/reply.gif
new file mode 100644
index 00000000..6345447e
Binary files /dev/null and b/img/admin/b/reply.gif differ
diff --git a/img/admin/b/save.gif b/img/admin/b/save.gif
new file mode 100644
index 00000000..2b239eaf
Binary files /dev/null and b/img/admin/b/save.gif differ
diff --git a/img/admin/b/search.gif b/img/admin/b/search.gif
new file mode 100644
index 00000000..a90dfe90
Binary files /dev/null and b/img/admin/b/search.gif differ
diff --git a/img/admin/b/send.gif b/img/admin/b/send.gif
new file mode 100644
index 00000000..31cbca93
Binary files /dev/null and b/img/admin/b/send.gif differ
diff --git a/img/admin/b/signup.gif b/img/admin/b/signup.gif
new file mode 100644
index 00000000..a90d6513
Binary files /dev/null and b/img/admin/b/signup.gif differ
diff --git a/img/admin/b/train.gif b/img/admin/b/train.gif
new file mode 100644
index 00000000..397d2036
Binary files /dev/null and b/img/admin/b/train.gif differ
diff --git a/img/admin/b/zurueck.html b/img/admin/b/zurueck.html
new file mode 100644
index 00000000..bcd738b0
--- /dev/null
+++ b/img/admin/b/zurueck.html
@@ -0,0 +1,100 @@
+
+
+
+
+ Travian com4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
Nothing here!
+
We looked 404 times already but can't find anything
+

+
+
+

+

+
+

+
+

+
Dear players,
+
+Starting from next week Travian will get a new look.
+
+
Here you find more information about the new layout.
+
+Regards
+Tschena & Phanttis
+

+
Dear players,
+
+
s4.travian.com will start on August 23th as Travian version 3.6 server.
+
+The preregistration will be opened on August 20th.
+
+
Here you find more information about the servers.
+
+Regards
+Tschena & Phanttis
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file