Fix some sql inject & Add Credits

Fix some sql inject & Add Credits
This commit is contained in:
novgorodschi catalin
2026-08-05 09:57:35 +03:00
parent f424733dd8
commit b2dec1d942
37 changed files with 1089 additions and 1069 deletions
+254 -3
View File
@@ -29,7 +29,13 @@ trait DatabaseForumQueries {
* @return array Returns all user's shared forums
*/
function getSharedForums($uid, $alliance){
function getSharedForums($uid, $alliance) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$uid = (int) $uid;
$alliance = (int) $alliance;
list($uid, $alliance) = $this->escape_input((int) $uid, (int) $alliance);
$allianceForums = $confForums = $closedForums = [];
@@ -108,7 +114,13 @@ trait DatabaseForumQueries {
* @return int Returns the total amount of the wanted forum
*/
function countForums($forumArea, $ally){
function countForums($forumArea, $ally) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$forumArea = (int) $forumArea;
$ally = (int) $ally;
list($forumArea, $ally) = $this->escape_input((int) $forumArea, (int) $ally);
$q = "SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE ".($ally != -1 ? "alliance = $ally AND" : "")." forum_area = $forumArea";
@@ -118,6 +130,11 @@ trait DatabaseForumQueries {
// no need to refactor this method
function CheckForum($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input((int) $id);
$q = "SELECT Count(*) as Total FROM " . TB_PREFIX . "forum_cat where alliance = $id";
@@ -127,6 +144,11 @@ trait DatabaseForumQueries {
// no need to refactor this method
function CountCat($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT count(id) FROM " . TB_PREFIX . "forum_topic where cat = '$id'";
@@ -137,6 +159,11 @@ trait DatabaseForumQueries {
// no need to refactor this method
function LastTopic($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT * from " . TB_PREFIX . "forum_topic where cat = '$id' order by post_date";
@@ -145,6 +172,11 @@ trait DatabaseForumQueries {
}
function CheckLastTopic($id, $use_cache = true) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
// first of all, check if we should be using cache and whether the field
@@ -165,6 +197,11 @@ trait DatabaseForumQueries {
}
function CheckLastPost($id, $use_cache = true) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
// first of all, check if we should be using cache and whether the field
@@ -185,6 +222,11 @@ trait DatabaseForumQueries {
}
function LastPost($id, $use_cache = true) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
// first of all, check if we should be using cache and whether the field
@@ -201,6 +243,11 @@ trait DatabaseForumQueries {
}
function CountTopic($id, $use_cache = true) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
// first of all, check if we should be using cache and whether the field
@@ -223,6 +270,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function CountPost($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT count(id) FROM " . TB_PREFIX . "forum_post where topic = '$id'";
@@ -233,6 +285,12 @@ trait DatabaseForumQueries {
// no need to cache this method
function ForumCat($id, $mode = 0) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
$mode = (int) $mode;
list($id, $mode) = $this->escape_input($id, $mode);
$q = "SELECT * from " . TB_PREFIX . "forum_cat where alliance = '$id' ".(!$mode ? "OR forum_area = 1" : "")." ORDER BY sorting DESC, id";
@@ -242,6 +300,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ForumCatEdit($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT * from " . TB_PREFIX . "forum_cat where id = '$id'";
@@ -251,6 +314,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ForumCatAlliance($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT alliance from " . TB_PREFIX . "forum_cat where id = $id LIMIT 1";
@@ -261,6 +329,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ForumCatName($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT forum_name from " . TB_PREFIX . "forum_cat where id = $id LIMIT 1";
@@ -271,6 +344,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function CheckCatTopic($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT Count(*) as Total from " . TB_PREFIX . "forum_topic where cat = $id";
@@ -280,6 +358,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function CheckResultEdit($alli) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$alli = (int) $alli;
list($alli) = $this->escape_input($alli);
$q = "SELECT Count(*) as Total from " . TB_PREFIX . "forum_edit where alliance = $alli";
@@ -289,6 +372,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function CheckCloseTopic($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input((int) $id);
$q = "SELECT close from " . TB_PREFIX . "forum_topic where id = '$id' LIMIT 1";
@@ -298,6 +386,11 @@ trait DatabaseForumQueries {
}
function CheckEditRes($alli, $use_cache = true) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$alli = (int) $alli;
list($alli) = $this->escape_input($alli);
// first of all, check if we should be using cache and whether the field
@@ -315,6 +408,12 @@ trait DatabaseForumQueries {
}
function CreatResultEdit($alli, $result) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$alli = (int) $alli;
$result = (int) $result;
list($alli, $result) = $this->escape_input($alli, $result);
$q = "INSERT into " . TB_PREFIX . "forum_edit values (0,'$alli','$result')";
@@ -323,6 +422,12 @@ trait DatabaseForumQueries {
}
function UpdateResultEdit($alli, $result) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$alli = (int) $alli;
$result = (int) $result;
list($alli, $result) = $this->escape_input($alli, $result);
$date = time();
@@ -330,7 +435,15 @@ trait DatabaseForumQueries {
return mysqli_query($this->dblink,$q);
}
function MoveForum($id, $area, $ally, $mode){
function MoveForum($id, $area, $ally, $mode) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
$area = (int) $area;
$ally = (int) $ally;
$mode = (int) $mode;
list($id, $area, $ally, $mode) = $this->escape_input((int) $id, (int) $area, (int) $ally, $mode);
$q = "UPDATE
@@ -343,6 +456,12 @@ trait DatabaseForumQueries {
}
function UpdateEditTopic($id, $title, $cat) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
$cat = (int) $cat;
list($id, $title, $cat) = $this->escape_input((int) $id, $title, $cat);
$q = "UPDATE " . TB_PREFIX . "forum_topic set title = '$title', cat = '$cat' where id = $id";
@@ -350,6 +469,11 @@ trait DatabaseForumQueries {
}
function UpdateEditForum($id, $name, $des, $alliances, $users) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id, $name, $des, $alliances, $users) = $this->escape_input((int) $id, $name, $des, $alliances, $users);
$q = "UPDATE " . TB_PREFIX . "forum_cat SET forum_name = '$name', forum_des = '$des', display_to_alliances = '$alliances', display_to_users = '$users' WHERE id = $id";
@@ -357,6 +481,12 @@ trait DatabaseForumQueries {
}
function StickTopic($id, $mode) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
$mode = (int) $mode;
list($id, $mode) = $this->escape_input((int) $id, (int) $mode);
$q = "UPDATE " . TB_PREFIX . "forum_topic SET stick = $mode WHERE id = $id";
@@ -365,6 +495,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ForumCatTopic($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT * from " . TB_PREFIX . "forum_topic where cat = '$id' AND stick = '' ORDER BY post_date desc";
@@ -374,6 +509,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ForumCatTopicStick($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT * from " . TB_PREFIX . "forum_topic where cat = '$id' AND stick = '1' ORDER BY post_date desc";
@@ -383,6 +523,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ShowTopic($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input((int) $id);
$q = "SELECT * from " . TB_PREFIX . "forum_topic where id = $id";
@@ -392,6 +537,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ShowPost($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "SELECT * from " . TB_PREFIX . "forum_post where topic = '$id' ORDER BY id ASC";
@@ -401,6 +551,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function ShowPostEdit($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input((int) $id);
$q = "SELECT * from " . TB_PREFIX . "forum_post where id = $id";
@@ -409,6 +564,13 @@ trait DatabaseForumQueries {
}
function CreatForum($owner, $alli, $name, $des, $area, $alliances, $users) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$owner = (int) $owner;
$alli = (int) $alli;
$area = (int) $area;
list($owner, $alli, $name, $des, $area, $alliances, $users) = $this->escape_input($owner, $alli, $name, $des, $area, $alliances, $users);
$q = "INSERT into " . TB_PREFIX . "forum_cat values (0, 0,'$owner','$alli','$name','$des','$area','$alliances','$users')";
@@ -417,6 +579,14 @@ trait DatabaseForumQueries {
}
function CreatTopic($title, $post, $cat, $owner, $alli, $ends) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$cat = (int) $cat;
$owner = (int) $owner;
$alli = (int) $alli;
$ends = (int) $ends;
list($title, $post, $cat, $owner, $alli, $ends) = $this->escape_input($title, $post, (int) $cat, (int) $owner, (int) $alli, (int) $ends);
$date = time();
@@ -430,6 +600,12 @@ trait DatabaseForumQueries {
*************************/
function createSurvey($topic, $title, $option1, $option2, $option3, $option4, $option5, $option6, $option7, $option8, $ends) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$topic = (int) $topic;
$ends = (int) $ends;
list($topic, $title, $option1, $option2, $option3, $option4, $option5, $option6, $option7, $option8, $ends) = $this->escape_input($topic, $title, $option1, $option2, $option3, $option4, $option5, $option6, $option7, $option8, $ends);
$q = "INSERT into " . TB_PREFIX . "forum_survey (topic,title,option1,option2,option3,option4,option5,option6,option7,option8,ends) values ('$topic','$title','$option1','$option2','$option3','$option4','$option5','$option6','$option7','$option8','$ends')";
@@ -438,6 +614,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function getSurvey($topic) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$topic = (int) $topic;
list($topic) = $this->escape_input((int) $topic);
$q = "SELECT * FROM " . TB_PREFIX . "forum_survey where topic = $topic LIMIT 1";
@@ -447,6 +628,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function checkSurvey($topic) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$topic = (int) $topic;
list($topic) = $this->escape_input((int) $topic);
$q = "SELECT Count(*) as Total FROM " . TB_PREFIX . "forum_survey where topic = $topic";
@@ -460,6 +646,12 @@ trait DatabaseForumQueries {
}
function Vote($topic, $num, $text) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$topic = (int) $topic;
$num = (int) $num;
list($topic, $num, $text) = $this->escape_input((int) $topic, (int) $num, $text);
$q = "UPDATE " . TB_PREFIX . "forum_survey set vote".$num." = vote".$num." + 1, voted = '$text' where topic = ".$topic."";
@@ -468,6 +660,12 @@ trait DatabaseForumQueries {
// no need to cache this method
function checkVote($topic, $uid) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$topic = (int) $topic;
$uid = (int) $uid;
list( $topic, $uid ) = $this->escape_input( (int) $topic, $uid );
$q = "SELECT voted FROM " . TB_PREFIX . "forum_survey where topic = $topic LIMIT 1";
@@ -484,6 +682,11 @@ trait DatabaseForumQueries {
// no need to cache this method
function getVoteSum($topic) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$topic = (int) $topic;
list( $topic ) = $this->escape_input( (int) $topic );
$q = "SELECT * FROM " . TB_PREFIX . "forum_survey where topic = $topic LIMIT 1";
@@ -504,6 +707,13 @@ trait DatabaseForumQueries {
*************************/
function CreatPost($post, $tids, $owner, $fid2 = 0) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$tids = (int) $tids;
$owner = (int) $owner;
$fid2 = (int) $fid2;
global $message, $session;
list($post, $tids, $owner, $fid2) = $this->escape_input($post, (int) $tids, $owner, (int) $fid2);
@@ -546,6 +756,11 @@ trait DatabaseForumQueries {
}
function UpdatePostDate($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input((int) $id);
$date = time();
@@ -554,6 +769,11 @@ trait DatabaseForumQueries {
}
function EditUpdateTopic($id, $post) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id, $post) = $this->escape_input((int) $id, $post);
$q = "UPDATE " . TB_PREFIX . "forum_topic set post = '$post' where id = $id";
@@ -562,6 +782,11 @@ trait DatabaseForumQueries {
}
function EditUpdatePost($id, $post) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id, $post) = $this->escape_input((int) $id, $post);
$q = "UPDATE " . TB_PREFIX . "forum_post set post = '$post' where id = $id";
@@ -569,6 +794,12 @@ trait DatabaseForumQueries {
}
function LockTopic($id, $mode) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
$mode = (int) $mode;
list($id, $mode) = $this->escape_input((int) $id, $mode);
$q = "UPDATE " . TB_PREFIX . "forum_topic set close = '$mode' where id = $id";
@@ -576,6 +807,11 @@ trait DatabaseForumQueries {
}
function DeleteCat($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$qs = "DELETE from " . TB_PREFIX . "forum_cat where id = '$id'";
@@ -595,6 +831,11 @@ trait DatabaseForumQueries {
}
function DeleteSurvey($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
if (!is_array($id)) {
$id = [$id];
}
@@ -608,6 +849,11 @@ trait DatabaseForumQueries {
}
function DeleteTopic($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$qs = "DELETE from " . TB_PREFIX . "forum_topic where id = '$id'";
@@ -615,6 +861,11 @@ trait DatabaseForumQueries {
}
function DeletePost($id) {
// Identificatorii intra in SQL fara ghilimele ("where id = $id"),
// iar mysqli_real_escape_string nu protejeaza contextul numeric.
// Conversia la intreg e singura care opreste "5 OR 1=1".
$id = (int) $id;
list($id) = $this->escape_input($id);
$q = "DELETE from " . TB_PREFIX . "forum_post where id = '$id'";
+15 -9
View File
@@ -1,15 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : alli_menu.tpl ##
## Type : Alliance Navigation Menu ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: alli_menu.tpl ##
## Description: Alliance menu navigation ##
## Improvements: ##
## - Reduced duplication ##
## - Safer input handling ##
## - Cleaner structure ##
## - Added comments ##
#################################################################################
// Verifică dacă jucătorul este în alianța curentă
+15 -10
View File
@@ -1,16 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : alliance.tpl ##
## Type : Alliance Ranking List ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: alliance.tpl ##
## Description: Alliance ranking table ##
## Improvements: ##
## - Safer input handling ##
## - Removed duplicate function calls ##
## - Fixed variable overwrite ($ranking) ##
## - Cleaner pagination logic ##
## - Added comments ##
#################################################################################
// Validare search (poziția din ranking)
+15 -9
View File
@@ -1,15 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : allidesc.tpl ##
## Type : Alliance Description Editor ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: allidesc.tpl ##
## Description: Alliance description + medals + edit form ##
## Improvements: ##
## - Reduced unnecessary loops ##
## - Safer output (XSS protection) ##
## - Cleaner structure ##
## - Medals switch simplified ##
#################################################################################
// fallback alliance id
+15 -9
View File
@@ -1,15 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : assignpos.tpl ##
## Type : Alliance Assign Member Position ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: assignpost.tpl ##
## Description: Assign alliance positions ##
## Improvements: ##
## - Safer output (XSS protection) ##
## - Cleaner structure ##
## - Reduced inline logic clutter ##
## - Consistent casting ##
#################################################################################
// fallback alliance id
+15 -10
View File
@@ -1,16 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : attack-filtered.tpl ##
## Type : Alliance Incoming Attacks (filtered) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: attack-filtered.tpl ##
## Description: Attack / report filtering ##
## Improvements: ##
## - Secure GET handling ##
## - Safer SQL parameters (cast only) ##
## - Reduced duplicated conditions ##
## - Cleaner rendering ##
## - XSS protection ##
#################################################################################
// filter type (secure cast)
+15 -10
View File
@@ -1,16 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : attacks.tpl ##
## Type : Alliance Incoming Attacks Overview ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: attacks.tpl ##
## Description: Alliance military events ##
## Improvements: ##
## - Secure GET handling ##
## - Reduced duplicated logic ##
## - Cleaner SQL usage ##
## - Safer output (XSS protection) ##
## - Simplified condition branches ##
#################################################################################
// fallback alliance id
+15 -4
View File
@@ -1,10 +1,21 @@
<?php
#################################################################################
## Bonusuri de alianta (port T4) ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : bonuses.tpl ##
## Type : Alliance Bonuses and Donations ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Membrii doneaza resurse, alianta deblocheaza patru bonusuri de cate cinci ##
## niveluri. Toata logica sta in GameEngine/AllianceBonus.php; aici doar ##
## afisam starea si preluam formularul de donatie. ##
#################################################################################
if (!class_exists('AllianceBonus')) {
+15 -9
View File
@@ -1,15 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : changename.tpl ##
## Type : Alliance Rename Form ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: changename.tpl ##
## Description: Alliance name/tag change ##
## Improvements: ##
## - Fixed HTML issues ##
## - XSS protection ##
## - Cleaner structure ##
## - Removed duplicate attributes ##
#################################################################################
// fallback alliance id
+15 -11
View File
@@ -1,17 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : changepos.tpl ##
## Type : Alliance Edit Member Position ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: changepos.tpl ##
## Description: Alliance member permissions ##
## Improvements: ##
## - Fixed PHP 5.3 compatibility (no [] arrays) ##
## - Removed invalid array syntax ##
## - Input validation & casting ##
## - XSS protection ##
## - Cleaner checkbox rendering ##
## - Allow leader to edit own rank only ##
#################################################################################
// secure input
+15 -10
View File
@@ -1,16 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : chat.tpl ##
## Type : Alliance Internal Chat ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Incremental Refactor SAFE) ##
## File: chat.tpl ##
## Description: Alliance chat (AJAX) ##
## Improvements: ##
## - Input validation ##
## - XSS protection ##
## - Fixed invalid HTML structure ##
## - Safer JavaScript (no string eval) ##
## - Prevent empty / spam messages ##
#################################################################################
// -------------------------------------------------
+15 -10
View File
@@ -1,16 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : chgdiplo.tpl ##
## Type : Alliance Diplomacy Management ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Refactor incremental) ##
## File: chgdiplo.tpl ##
## Description: Alliance diplomacy system ##
## Improvements: ##
## - Cleaner structure ##
## - Reduced duplication ##
## - Fixed HTML form nesting issues ##
## - Safer output (XSS protection) ##
## - More stable loops ##
#################################################################################
// fallback alliance id
+43 -24
View File
@@ -1,4 +1,23 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : forum.tpl ##
## Type : Alliance Forum Board View ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// ###########################################################
// # TRAVIANZ FORUM MODULE #
// # ------------------------------------------------------- #
@@ -15,9 +34,9 @@
* ========================================================= */
if (!isset($aid)) {
if (isset($_GET['fid']) && !empty($_GET['fid'])) {
$aid = $database->ForumCatAlliance($_GET['fid']);
$aid = $database->ForumCatAlliance((int) $_GET['fid']);
} else if (isset($_GET['fid2']) && !empty($_GET['fid2'])) {
$aid = $database->ForumCatAlliance($_GET['fid2']);
$aid = $database->ForumCatAlliance((int) $_GET['fid2']);
} else {
$aid = $session->alliance;
}
@@ -98,11 +117,11 @@ if (
isset($_POST['thema']) && !empty($_POST['thema']) &&
Alliance::canAct([
'aid' => $aid,
'alliance' => ($topic = reset($database->ShowTopic($_POST['tid'])))['alliance'],
'alliance' => ($topic = reset($database->ShowTopic((int) $_POST['tid'])))['alliance'],
'forum_perm' => $opt['opt5'],
'admin' => $_GET['admin'],
'owner' => $topic['owner'],
'forum_owner' => ($forumData = reset($database->ForumCatEdit($_POST['fid'])))['owner']
'forum_owner' => ($forumData = reset($database->ForumCatEdit((int) $_POST['fid'])))['owner']
], 1) &&
(
($forumData['forum_area'] != 1 &&
@@ -130,14 +149,14 @@ if (
isset($_POST['u1']) && !empty($_POST['u1']) &&
isset($_POST['u2']) && !empty($_POST['u2']) &&
(
($database->ForumCatAlliance($_POST['fid']) == $session->alliance && $opt['opt5'] == 1)
($database->ForumCatAlliance((int) $_POST['fid']) == $session->alliance && $opt['opt5'] == 1)
|| $session->access == ADMIN
)
) {
$forumViewable['alliances'] = $forumViewable['users'] = "";
$forumData = reset($database->ForumCatEdit($_POST['fid']));
$forumData = reset($database->ForumCatEdit((int) $_POST['fid']));
// visibility logic unchanged
if ($forumData['forum_area'] != 1) {
@@ -172,7 +191,7 @@ if (
!empty($_POST['thema']) && !empty($_POST['text']) && !empty($_POST['fid']) &&
(
(
($forumData = reset($database->ForumCatEdit($_POST['fid'])))['alliance'] == $session->alliance ||
($forumData = reset($database->ForumCatEdit((int) $_POST['fid'])))['alliance'] == $session->alliance ||
$forumData['forum_area'] == 1 ||
$alliance->isForumAccessible($_POST['fid'])
) &&
@@ -240,12 +259,12 @@ if (
!empty($_POST['text']) && !empty($_POST['tid']) && !empty($_POST['fid2']) &&
(
(
($forumData = reset($database->ForumCatEdit($_POST['fid2'])))['alliance'] == $session->alliance ||
($forumData = reset($database->ForumCatEdit((int) $_POST['fid2'])))['alliance'] == $session->alliance ||
$forumData['forum_area'] == 1 ||
$alliance->isForumAccessible($_POST['fid2'])
) &&
(
($forumData['forum_area'] != 3 && !reset($database->ShowTopic($_POST['tid']))['close'])
($forumData['forum_area'] != 3 && !reset($database->ShowTopic((int) $_POST['tid']))['close'])
|| ($forumData['forum_area'] == 3 && $opt['opt5'] == 1)
)
)
@@ -274,7 +293,7 @@ if (
isset($_POST['tid']) && !empty($_POST['tid']) &&
Alliance::canAct([
'aid' => $aid,
'alliance' => ($topic = reset($database->ShowTopic($_POST['tid'])))['alliance'],
'alliance' => ($topic = reset($database->ShowTopic((int) $_POST['tid'])))['alliance'],
'forum_perm' => $opt['opt5'],
'admin' => (!empty($_GET['admin']) ? $_GET['admin'] : ''),
'owner' => $topic['owner'],
@@ -303,7 +322,7 @@ if (
Alliance::canAct([
'aid' => $aid,
'alliance' => ($topic = reset($database->ShowTopic(
($post = reset($database->ShowPostEdit($_POST['pod'])))['topic']
($post = reset($database->ShowPostEdit((int) $_POST['pod'])))['topic']
)))['alliance'],
'forum_perm' => $opt['opt5'],
'owner' => $post['owner'],
@@ -343,13 +362,13 @@ if (
$_GET['admin'] == "pos" &&
isset($_GET['res'], $_GET['fid']) && !empty($_GET['fid']) &&
(
($database->ForumCatAlliance($_GET['fid']) == $session->alliance && $opt['opt5'] == 1) ||
($forumData = reset($database->ForumCatEdit($_GET['fid'])))['owner'] == $session->uid
($database->ForumCatAlliance((int) $_GET['fid']) == $session->alliance && $opt['opt5'] == 1) ||
($forumData = reset($database->ForumCatEdit((int) $_GET['fid'])))['owner'] == $session->uid
&& $session->access == ADMIN
)
) {
$database->moveForum($_GET['fid'], $forumData['forum_area'], $session->alliance, $_GET['res']);
$database->moveForum((int) $_GET['fid'], $forumData['forum_area'], $session->alliance, $_GET['res']);
$alliance->redirect($_GET);
}
@@ -421,14 +440,14 @@ elseif (
isset($_GET['idf']) && !empty($_GET['idf']) &&
(
(
($database->ForumCatAlliance($_GET['idf']) == $session->alliance && $opt['opt5'] == 1) ||
($forumData = reset($database->ForumCatEdit($_GET['idf'])))['owner'] == $session->uid
($database->ForumCatAlliance((int) $_GET['idf']) == $session->alliance && $opt['opt5'] == 1) ||
($forumData = reset($database->ForumCatEdit((int) $_GET['idf'])))['owner'] == $session->uid
) ||
($forumData['alliance'] == 0 && $session->access == ADMIN)
)
) {
$database->DeleteCat($_GET['idf']);
$database->DeleteCat((int) $_GET['idf']);
$alliance->redirect($_GET);
}
@@ -442,15 +461,15 @@ elseif (
!empty($_GET['pod']) && !empty($_GET['tid']) && !empty($_GET['fid2']) &&
Alliance::canAct([
'aid' => $aid,
'alliance' => reset($database->ShowTopic($_GET['tid']))['alliance'],
'alliance' => reset($database->ShowTopic((int) $_GET['tid']))['alliance'],
'forum_perm' => $opt['opt5'],
'owner' => reset($database->ShowPostEdit($_GET['pod']))['owner'],
'owner' => reset($database->ShowPostEdit((int) $_GET['pod']))['owner'],
'admin' => $_GET['admin'],
'forum_owner' => reset($database->ForumCatEdit($_GET['fid2']))['owner']
'forum_owner' => reset($database->ForumCatEdit((int) $_GET['fid2']))['owner']
], 1)
) {
$database->DeletePost($_GET['pod']);
$database->DeletePost((int) $_GET['pod']);
header("Location: allianz.php?s=2&fid2=".$_GET['fid2']."&tid=".$_GET['tid']);
exit;
@@ -467,11 +486,11 @@ elseif ($_GET['admin'] == "editpost" &&
!empty($_GET['pod']) && !empty($_GET['tid']) && !empty($_GET['fid']) &&
Alliance::canAct([
'aid' => $aid,
'alliance' => reset($database->ShowTopic($_GET['tid']))['alliance'],
'alliance' => reset($database->ShowTopic((int) $_GET['tid']))['alliance'],
'forum_perm' => $opt['opt5'],
'owner' => reset($database->ShowPostEdit($_GET['pod']))['owner'],
'owner' => reset($database->ShowPostEdit((int) $_GET['pod']))['owner'],
'admin' => $_GET['admin'],
'forum_owner' => reset($database->ForumCatEdit($_GET['fid']))['owner']
'forum_owner' => reset($database->ForumCatEdit((int) $_GET['fid']))['owner']
], 1)
) include("Forum/forum_10.tpl");
+15 -5
View File
@@ -1,11 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : index.php ##
## Type : Directory Access Guard ##
## --------------------------------------------------------------------------- ##
## Developed by : aggenkeech & Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Filename index.php ##
## Developed by: aggenkeech ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
#################################################################################
// prevent direct misuse in weird contexts (optional but safe)
+16 -2
View File
@@ -1,7 +1,21 @@
<?php
#################################################################################
## -= TravianZ Alliance Invite (refactor incremental safe) =- ##
## - cleanup + security + structure improvements ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : invite.tpl ##
## Type : Alliance Member Invitation ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// fallback alliance
+16 -5
View File
@@ -1,10 +1,21 @@
<?php
#################################################################################
## -= TravianZ Alliance Kick (incremental refactor) =- ##
## - preserves logic ##
## - improves structure ##
## - reduces duplication ##
## - adds safety + comments ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : kick.tpl ##
## Type : Alliance Kick Member Form ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// -------------------------------------------------
+16 -4
View File
@@ -1,9 +1,21 @@
<?php
#################################################################################
## -= TravianZ Alliance Link Forum (incremental refactor) =- ##
## - preserves logic ##
## - improves readability ##
## - sanitizes output ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : linkforum.tpl ##
## Type : Alliance External Forum Link ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// -------------------------------------------------
+15 -8
View File
@@ -1,14 +1,21 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : medal.php ##
## Type : Alliance Medals Display ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ (Incremental Refactor SAFE) ##
## File: medal.php ##
## Fixes: ##
## - FIX broken tooltip (escaping JS/HTML) ##
## - Removed newline issues ##
## - Safer string handling ##
## - Reduced duplication (safe) ##
#################################################################################
// -------------------------------------------------
+16 -4
View File
@@ -1,9 +1,21 @@
<?php
#################################################################################
## -= TravianZ Alliance News (incremental refactor) =- ##
## - preserves logic ##
## - improves safety (XSS protection) ##
## - cleaner structure ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : news.tpl ##
## Type : Alliance News Feed ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// -------------------------------------------------
+16 -5
View File
@@ -1,10 +1,21 @@
<?php
#################################################################################
## -= TravianZ Alliance Options (incremental refactor) =- ##
## - preserves permission logic ##
## - reduces duplication ##
## - improves readability ##
## - adds safety ##
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : option.tpl ##
## Type : Alliance Settings Overview ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// -------------------------------------------------
+19
View File
@@ -1,4 +1,23 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : overview.tpl ##
## Type : Alliance Member Overview ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/*
|--------------------------------------------------------------------------
| TravianZ - Alliance Overview (FINAL STABLE VERSION)
+19
View File
@@ -1,4 +1,23 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : quitalli.tpl ##
## Type : Alliance Leave / Dissolve Form ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/*
|--------------------------------------------------------------------------
| TravianZ - Quit Alliance (refactored incremental)
+19
View File
@@ -1,4 +1,23 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : attack.tpl ##
## Type : Rally Point Attack / Raid Confirmation ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$ckey = $generator->generateRandStr(6);
// --- 1. Normalizare trupe t1..t11 (păstrăm exact logica originală) ---
+14 -4
View File
@@ -2,10 +2,20 @@
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename index.php ##
## Developed by: aggenkeech ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
## Filename : index.php ##
## Type : Directory Access Guard ##
## --------------------------------------------------------------------------- ##
## Developed by : aggenkeech ##
## Refactored by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// prevent direct misuse in weird contexts (optional but safe)
+19
View File
@@ -1,4 +1,23 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : newdorf.tpl ##
## Type : Rally Point Settle New Village Form ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
//-- Prevent founding if not enough settlers or invalid/occupied tile
//-- fix by AL-Kateb - Simplified by iopietro
$settlers = (int)($village->unitarray['u' . $session->tribe . '0'] ?? 0);
+19
View File
@@ -1,4 +1,23 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : search.tpl ##
## Type : Rally Point Destination Village Search ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// -- preluăm stările disabled din form (păstrăm exact valorile originale)
$disabled = '';
$disabledr = '';
+19
View File
@@ -1,4 +1,23 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : sendback.tpl ##
## Type : Rally Point Send Reinforcements Back ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$to = $database->getVillage($enforce['from']);
$fromcoor = $database->getCoor($enforce['from']);
$tocoor = $database->getCoor($enforce['vref']);
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_1.tpl ##
## Type : Rally Point Troop Selection (Romans) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 1 (Romans): u1..u10.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u1" src="img/x.gif" title="<?php echo U1; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U1; ?>"> <input class="text" <?php if ($village->unitarray['u1']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u1']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u1']."; return false;\">(".$village->unitarray['u1'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u4" src="img/x.gif" title="<?php echo U4; ?>" alt="<?php echo U4; ?>"> <input class="text" <?php if ($village->unitarray['u4']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u4']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u4']."; return false;\">(".$village->unitarray['u4'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u7" src="img/x.gif" title="<?php echo U7; ?>" alt="<?php echo U7; ?>"> <input class="text" <?php if ($village->unitarray['u7']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u7']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u7']."; return false;\">(".$village->unitarray['u7'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u9" src="img/x.gif" title="<?php echo U9; ?>" alt="<?php echo U9; ?>"> <input class="text" <?php if ($village->unitarray['u9']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u9']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u9']."; return false;\">(".$village->unitarray['u9'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u2" src="img/x.gif" title="<?php echo U2; ?>" alt="<?php echo U2; ?>"> <input class="text" <?php if ($village->unitarray['u2']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u2']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u2']."; return false;\">(".$village->unitarray['u2'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u5" src="img/x.gif" title="<?php echo U5; ?>" alt="<?php echo U5; ?>"> <input class="text" <?php if ($village->unitarray['u5']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u5']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u5']."; return false;\">(".$village->unitarray['u5'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u8" src="img/x.gif" title="<?php echo U8; ?>" alt="<?php echo U8; ?>"> <input class="text" <?php if ($village->unitarray['u8']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u8']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u8']."; return false;\">(".$village->unitarray['u8'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u10" src="img/x.gif" title="<?php echo U10; ?>" alt="<?php echo U10; ?>"> <input class="text" <?php if ($village->unitarray['u10']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u10']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u10']."; return false;\">(".$village->unitarray['u10'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u3" src="img/x.gif" title="<?php echo U3; ?>" alt="<?php echo U3; ?>"> <input class="text" <?php if ($village->unitarray['u3']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u3']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u3']."; return false;\">(".$village->unitarray['u3'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u6" src="img/x.gif" title="<?php echo U6; ?>" alt="<?php echo U6; ?>"> <input class="text" <?php if ($village->unitarray['u6']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u6']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u6']."; return false;\">(".$village->unitarray['u6'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_2.tpl ##
## Type : Rally Point Troop Selection (Teutons) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 2 (Teutons): u11..u20.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u11" src="img/x.gif" title="<?php echo U11; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U11; ?>"> <input class="text" <?php if ($village->unitarray['u11']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u11']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u11']."; return false;\">(".$village->unitarray['u11'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u14" src="img/x.gif" title="<?php echo U14; ?>" alt="<?php echo U14; ?>"> <input class="text" <?php if ($village->unitarray['u14']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u14']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u14']."; return false;\">(".$village->unitarray['u14'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u17" src="img/x.gif" title="<?php echo U17; ?>" alt="<?php echo U17; ?>"> <input class="text" <?php if ($village->unitarray['u17']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u17']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u17']."; return false;\">(".$village->unitarray['u17'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u19" src="img/x.gif" title="<?php echo U19; ?>" alt="<?php echo U19; ?>"> <input class="text" <?php if ($village->unitarray['u19']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u19']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u19']."; return false;\">(".$village->unitarray['u19'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u12" src="img/x.gif" title="<?php echo U12; ?>" alt="<?php echo U12; ?>"> <input class="text" <?php if ($village->unitarray['u12']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u12']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u12']."; return false;\">(".$village->unitarray['u12'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u15" src="img/x.gif" title="<?php echo U15; ?>" alt="<?php echo U15; ?>"> <input class="text" <?php if ($village->unitarray['u15']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u15']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u15']."; return false;\">(".$village->unitarray['u15'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u18" src="img/x.gif" title="<?php echo U18; ?>" alt="<?php echo U18; ?>"> <input class="text" <?php if ($village->unitarray['u18']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u18']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u18']."; return false;\">(".$village->unitarray['u18'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u20" src="img/x.gif" title="<?php echo U10; ?>" alt="<?php echo U10; ?>"> <input class="text" <?php if ($village->unitarray['u20']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u20']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u20']."; return false;\">(".$village->unitarray['u20'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u13" src="img/x.gif" title="<?php echo U13; ?>" alt="<?php echo U13; ?>"> <input class="text" <?php if ($village->unitarray['u13']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u13']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u13']."; return false;\">(".$village->unitarray['u13'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u16" src="img/x.gif" title="<?php echo U16; ?>" alt="<?php echo U16; ?>"> <input class="text" <?php if ($village->unitarray['u16']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u16']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u16']."; return false;\">(".$village->unitarray['u16'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_3.tpl ##
## Type : Rally Point Troop Selection (Gauls) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 3 (Gauls): u21..u30.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u21" src="img/x.gif" title="<?php echo U21; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U21; ?>"> <input class="text" <?php if ($village->unitarray['u21']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u21']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u21']."; return false;\">(".$village->unitarray['u21'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u24" src="img/x.gif" title="<?php echo U24; ?>" alt="<?php echo U24; ?>"> <input class="text" <?php if ($village->unitarray['u24']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u24']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u24']."; return false;\">(".$village->unitarray['u24'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u27" src="img/x.gif" title="<?php echo U17; ?>" alt="<?php echo U17; ?>"> <input class="text" <?php if ($village->unitarray['u27']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u27']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u27']."; return false;\">(".$village->unitarray['u27'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u29" src="img/x.gif" title="<?php echo U29; ?>" alt="<?php echo U29; ?>"> <input class="text" <?php if ($village->unitarray['u29']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u29']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u29']."; return false;\">(".$village->unitarray['u29'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u22" src="img/x.gif" title="<?php echo U22; ?>" alt="<?php echo U22; ?>"> <input class="text" <?php if ($village->unitarray['u22']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u22']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u22']."; return false;\">(".$village->unitarray['u22'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u25" src="img/x.gif" title="<?php echo U25; ?>" alt="<?php echo U25; ?>"> <input class="text" <?php if ($village->unitarray['u25']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u25']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u25']."; return false;\">(".$village->unitarray['u25'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u28" src="img/x.gif" title="<?php echo U28; ?>" alt="<?php echo U28; ?>"> <input class="text" <?php if ($village->unitarray['u28']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u28']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u28']."; return false;\">(".$village->unitarray['u28'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u30" src="img/x.gif" title="<?php echo U10; ?>" alt="<?php echo U10; ?>"> <input class="text" <?php if ($village->unitarray['u30']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u30']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u30']."; return false;\">(".$village->unitarray['u30'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u23" src="img/x.gif" title="<?php echo U23; ?>" alt="<?php echo U23; ?>"> <input class="text" <?php if ($village->unitarray['u23']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u23']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u23']."; return false;\">(".$village->unitarray['u23'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u26" src="img/x.gif" title="<?php echo U26; ?>" alt="<?php echo U26; ?>"> <input class="text" <?php if ($village->unitarray['u26']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u26']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u26']."; return false;\">(".$village->unitarray['u26'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="3278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_4.tpl ##
## Type : Rally Point Troop Selection (Nature) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 4 (Nature): u31..u40.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u31" src="img/x.gif" title="<?php echo U31; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U31; ?>"> <input class="text" <?php if ($village->unitarray['u31']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u31']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u31']."; return false;\">(".$village->unitarray['u31'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u34" src="img/x.gif" title="<?php echo U34; ?>" alt="<?php echo U34; ?>"> <input class="text" <?php if ($village->unitarray['u34']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u34']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u34']."; return false;\">(".$village->unitarray['u34'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u37" src="img/x.gif" title="<?php echo U37; ?>" alt="<?php echo U37; ?>"> <input class="text" <?php if ($village->unitarray['u37']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u37']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u37']."; return false;\">(".$village->unitarray['u37'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u39" src="img/x.gif" title="<?php echo U39; ?>" alt="<?php echo U39; ?>"> <input class="text" <?php if ($village->unitarray['u39']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u39']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u39']."; return false;\">(".$village->unitarray['u39'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u32" src="img/x.gif" title="<?php echo U32; ?>" alt="<?php echo U32; ?>"> <input class="text" <?php if ($village->unitarray['u32']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u32']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u32']."; return false;\">(".$village->unitarray['u32'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u35" src="img/x.gif" title="<?php echo U35; ?>" alt="<?php echo U35; ?>"> <input class="text" <?php if ($village->unitarray['u35']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u35']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u35']."; return false;\">(".$village->unitarray['u35'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u38" src="img/x.gif" title="<?php echo U38; ?>" alt="<?php echo U38; ?>"> <input class="text" <?php if ($village->unitarray['u38']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u38']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u38']."; return false;\">(".$village->unitarray['u38'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u40" src="img/x.gif" title="<?php echo U40; ?>" alt="<?php echo U40; ?>"> <input class="text" <?php if ($village->unitarray['u40']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u40']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u40']."; return false;\">(".$village->unitarray['u40'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u33" src="img/x.gif" title="<?php echo U33; ?>" alt="<?php echo U33; ?>"> <input class="text" <?php if ($village->unitarray['u33']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u33']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u33']."; return false;\">(".$village->unitarray['u33'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u36" src="img/x.gif" title="<?php echo U36; ?>" alt="<?php echo U36; ?>"> <input class="text" <?php if ($village->unitarray['u36']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u36']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u36']."; return false;\">(".$village->unitarray['u36'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -96
View File
@@ -1,99 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="3278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_5.tpl ##
## Type : Rally Point Troop Selection (Natars) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 5 (Natars): u41..u50.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u41" src="img/x.gif" title="<?php echo U41; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U41; ?>"> <input class="text" <?php if ($village->unitarray['u41']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u41']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u41']."; return false;\">(".$village->unitarray['u41'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u44" src="img/x.gif" title="<?php echo U44; ?>" alt="<?php echo U44; ?>"> <input class="text" <?php if ($village->unitarray['u44']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u44']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u44']."; return false;\">(".$village->unitarray['u44'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u47" src="img/x.gif" title="<?php echo U47; ?>" alt="<?php echo U47; ?>"> <input class="text" <?php if ($village->unitarray['u47']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u47']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u47']."; return false;\">(".$village->unitarray['u47'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u49" src="img/x.gif" title="<?php echo U49; ?>" alt="<?php echo U49; ?>"> <input class="text" <?php if ($village->unitarray['u49']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u49']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u49']."; return false;\">(".$village->unitarray['u49'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u42" src="img/x.gif" title="<?php echo U42; ?>" alt="<?php echo U42; ?>"> <input class="text" <?php if ($village->unitarray['u42']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u42']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u42']."; return false;\">(".$village->unitarray['u42'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u45" src="img/x.gif" title="<?php echo U45; ?>" alt="<?php echo U45; ?>"> <input class="text" <?php if ($village->unitarray['u45']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u45']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u45']."; return false;\">(".$village->unitarray['u45'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u48" src="img/x.gif" title="<?php echo U48; ?>" alt="<?php echo U48; ?>"> <input class="text" <?php if ($village->unitarray['u48']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u48']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u48']."; return false;\">(".$village->unitarray['u48'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u50" src="img/x.gif" title="<?php echo U50; ?>" alt="<?php echo U50; ?>"> <input class="text" <?php if ($village->unitarray['u50']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u50']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u50']."; return false;\">(".$village->unitarray['u50'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u43" src="img/x.gif" title="<?php echo U43; ?>" alt="<?php echo U43; ?>"> <input class="text" <?php if ($village->unitarray['u43']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u43']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u43']."; return false;\">(".$village->unitarray['u43'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u46" src="img/x.gif" title="<?php echo U46; ?>" alt="<?php echo U46; ?>"> <input class="text" <?php if ($village->unitarray['u46']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u46']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u46']."; return false;\">(".$village->unitarray['u46'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_6.tpl ##
## Type : Rally Point Troop Selection (Huns) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 6 (Huns): u51..u60.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u51" src="img/x.gif" title="<?php echo U51; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U51; ?>"> <input class="text" <?php if ($village->unitarray['u51']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u51']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u51']."; return false;\">(".$village->unitarray['u51'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u54" src="img/x.gif" title="<?php echo U54; ?>" alt="<?php echo U54; ?>"> <input class="text" <?php if ($village->unitarray['u54']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u54']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u54']."; return false;\">(".$village->unitarray['u54'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u57" src="img/x.gif" title="<?php echo U57; ?>" alt="<?php echo U57; ?>"> <input class="text" <?php if ($village->unitarray['u57']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u57']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u57']."; return false;\">(".$village->unitarray['u57'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u59" src="img/x.gif" title="<?php echo U59; ?>" alt="<?php echo U59; ?>"> <input class="text" <?php if ($village->unitarray['u59']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u59']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u59']."; return false;\">(".$village->unitarray['u59'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u52" src="img/x.gif" title="<?php echo U52; ?>" alt="<?php echo U52; ?>"> <input class="text" <?php if ($village->unitarray['u52']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u52']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u52']."; return false;\">(".$village->unitarray['u52'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u55" src="img/x.gif" title="<?php echo U55; ?>" alt="<?php echo U55; ?>"> <input class="text" <?php if ($village->unitarray['u55']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u55']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u55']."; return false;\">(".$village->unitarray['u55'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u58" src="img/x.gif" title="<?php echo U58; ?>" alt="<?php echo U58; ?>"> <input class="text" <?php if ($village->unitarray['u58']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u58']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u58']."; return false;\">(".$village->unitarray['u58'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u60" src="img/x.gif" title="<?php echo U60; ?>" alt="<?php echo U60; ?>"> <input class="text" <?php if ($village->unitarray['u60']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u60']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u60']."; return false;\">(".$village->unitarray['u60'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u53" src="img/x.gif" title="<?php echo U53; ?>" alt="<?php echo U53; ?>"> <input class="text" <?php if ($village->unitarray['u53']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u53']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u53']."; return false;\">(".$village->unitarray['u53'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u56" src="img/x.gif" title="<?php echo U56; ?>" alt="<?php echo U56; ?>"> <input class="text" <?php if ($village->unitarray['u56']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u56']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u56']."; return false;\">(".$village->unitarray['u56'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_7.tpl ##
## Type : Rally Point Troop Selection (Egyptians) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 7 (Egyptians): u61..u70.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u61" src="img/x.gif" title="<?php echo U61; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U61; ?>"> <input class="text" <?php if ($village->unitarray['u61']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u61']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u61']."; return false;\">(".$village->unitarray['u61'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u64" src="img/x.gif" title="<?php echo U64; ?>" alt="<?php echo U64; ?>"> <input class="text" <?php if ($village->unitarray['u64']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u64']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u64']."; return false;\">(".$village->unitarray['u64'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u67" src="img/x.gif" title="<?php echo U67; ?>" alt="<?php echo U67; ?>"> <input class="text" <?php if ($village->unitarray['u67']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u67']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u67']."; return false;\">(".$village->unitarray['u67'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u69" src="img/x.gif" title="<?php echo U69; ?>" alt="<?php echo U69; ?>"> <input class="text" <?php if ($village->unitarray['u69']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u69']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u69']."; return false;\">(".$village->unitarray['u69'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u62" src="img/x.gif" title="<?php echo U62; ?>" alt="<?php echo U62; ?>"> <input class="text" <?php if ($village->unitarray['u62']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u62']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u62']."; return false;\">(".$village->unitarray['u62'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u65" src="img/x.gif" title="<?php echo U65; ?>" alt="<?php echo U65; ?>"> <input class="text" <?php if ($village->unitarray['u65']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u65']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u65']."; return false;\">(".$village->unitarray['u65'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u68" src="img/x.gif" title="<?php echo U68; ?>" alt="<?php echo U68; ?>"> <input class="text" <?php if ($village->unitarray['u68']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u68']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u68']."; return false;\">(".$village->unitarray['u68'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u70" src="img/x.gif" title="<?php echo U70; ?>" alt="<?php echo U70; ?>"> <input class="text" <?php if ($village->unitarray['u70']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u70']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u70']."; return false;\">(".$village->unitarray['u70'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u63" src="img/x.gif" title="<?php echo U63; ?>" alt="<?php echo U63; ?>"> <input class="text" <?php if ($village->unitarray['u63']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u63']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u63']."; return false;\">(".$village->unitarray['u63'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u66" src="img/x.gif" title="<?php echo U66; ?>" alt="<?php echo U66; ?>"> <input class="text" <?php if ($village->unitarray['u66']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u66']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u66']."; return false;\">(".$village->unitarray['u66'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_8.tpl ##
## Type : Rally Point Troop Selection (Spartans) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 8 (Spartans): u71..u80.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u71" src="img/x.gif" title="<?php echo U71; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U71; ?>"> <input class="text" <?php if ($village->unitarray['u71']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u71']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u71']."; return false;\">(".$village->unitarray['u71'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u74" src="img/x.gif" title="<?php echo U74; ?>" alt="<?php echo U74; ?>"> <input class="text" <?php if ($village->unitarray['u74']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u74']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u74']."; return false;\">(".$village->unitarray['u74'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u77" src="img/x.gif" title="<?php echo U77; ?>" alt="<?php echo U77; ?>"> <input class="text" <?php if ($village->unitarray['u77']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u77']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u77']."; return false;\">(".$village->unitarray['u77'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u79" src="img/x.gif" title="<?php echo U79; ?>" alt="<?php echo U79; ?>"> <input class="text" <?php if ($village->unitarray['u79']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u79']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u79']."; return false;\">(".$village->unitarray['u79'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u72" src="img/x.gif" title="<?php echo U72; ?>" alt="<?php echo U72; ?>"> <input class="text" <?php if ($village->unitarray['u72']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u72']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u72']."; return false;\">(".$village->unitarray['u72'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u75" src="img/x.gif" title="<?php echo U75; ?>" alt="<?php echo U75; ?>"> <input class="text" <?php if ($village->unitarray['u75']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u75']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u75']."; return false;\">(".$village->unitarray['u75'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u78" src="img/x.gif" title="<?php echo U78; ?>" alt="<?php echo U78; ?>"> <input class="text" <?php if ($village->unitarray['u78']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u78']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u78']."; return false;\">(".$village->unitarray['u78'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u80" src="img/x.gif" title="<?php echo U80; ?>" alt="<?php echo U80; ?>"> <input class="text" <?php if ($village->unitarray['u80']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u80']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u80']."; return false;\">(".$village->unitarray['u80'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u73" src="img/x.gif" title="<?php echo U73; ?>" alt="<?php echo U73; ?>"> <input class="text" <?php if ($village->unitarray['u73']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u73']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u73']."; return false;\">(".$village->unitarray['u73'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u76" src="img/x.gif" title="<?php echo U76; ?>" alt="<?php echo U76; ?>"> <input class="text" <?php if ($village->unitarray['u76']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u76']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u76']."; return false;\">(".$village->unitarray['u76'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+26 -101
View File
@@ -1,104 +1,29 @@
<h1><?php echo SEND_TROOPS; ?></h1>
<?php
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_9.tpl ##
## Type : Rally Point Troop Selection (Vikings) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Trupele tribului 9 (Vikings): u81..u90.
*
* Formularul e identic pentru toate triburile, difera doar blocul de unitati,
* asa ca traieste intr-un singur loc. Fisierul acesta ramane doar ca a2b.php
* sa poata include in continuare "units_" . $session->tribe . ".tpl".
*/
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u81" src="img/x.gif" title="<?php echo U81; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U81; ?>"> <input class="text" <?php if ($village->unitarray['u81']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u81']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u81']."; return false;\">(".$village->unitarray['u81'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u84" src="img/x.gif" title="<?php echo U84; ?>" alt="<?php echo U84; ?>"> <input class="text" <?php if ($village->unitarray['u84']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u84']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u84']."; return false;\">(".$village->unitarray['u84'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u87" src="img/x.gif" title="<?php echo U87; ?>" alt="<?php echo U87; ?>"> <input class="text" <?php if ($village->unitarray['u87']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u87']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u87']."; return false;\">(".$village->unitarray['u87'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u89" src="img/x.gif" title="<?php echo U89; ?>" alt="<?php echo U89; ?>"> <input class="text" <?php if ($village->unitarray['u89']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u89']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u89']."; return false;\">(".$village->unitarray['u89'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u82" src="img/x.gif" title="<?php echo U82; ?>" alt="<?php echo U82; ?>"> <input class="text" <?php if ($village->unitarray['u82']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u82']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u82']."; return false;\">(".$village->unitarray['u82'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u85" src="img/x.gif" title="<?php echo U85; ?>" alt="<?php echo U85; ?>"> <input class="text" <?php if ($village->unitarray['u85']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u85']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u85']."; return false;\">(".$village->unitarray['u85'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u88" src="img/x.gif" title="<?php echo U88; ?>" alt="<?php echo U88; ?>"> <input class="text" <?php if ($village->unitarray['u88']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u88']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u88']."; return false;\">(".$village->unitarray['u88'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u90" src="img/x.gif" title="<?php echo U90; ?>" alt="<?php echo U90; ?>"> <input class="text" <?php if ($village->unitarray['u90']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u90']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u90']."; return false;\">(".$village->unitarray['u90'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u83" src="img/x.gif" title="<?php echo U83; ?>" alt="<?php echo U83; ?>"> <input class="text" <?php if ($village->unitarray['u83']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u83']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u83']."; return false;\">(".$village->unitarray['u83'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u86" src="img/x.gif" title="<?php echo U86; ?>" alt="<?php echo U86; ?>"> <input class="text" <?php if ($village->unitarray['u86']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u86']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u86']."; return false;\">(".$village->unitarray['u86'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"><?php
if ($village->unitarray['hero']>0){
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
}
?></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
include("Templates/a2b/units_common.tpl");
+155
View File
@@ -0,0 +1,155 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : units_common.tpl ##
## Type : Rally Point Troop Selection Form (all tribes) ##
## --------------------------------------------------------------------------- ##
## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## URLs: : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
/**
* Formularul de trimitere a trupelor, comun tuturor triburilor.
*
* Inainte exista cate un fisier units_1..units_9, identice in afara numerelor
* de unitati - aproape 950 de linii duplicate. Orice reparatie trebuia facuta
* de noua ori, iar in practica se uita cate una.
*
* Unitatile unui trib sunt un bloc de zece, consecutiv:
* tribul 1 -> u1..u10, tribul 2 -> u11..u20, tribul 9 -> u81..u90
* deci primul indice e (trib - 1) * 10 + 1.
*
* Fisierele units_N.tpl au ramas, ca sa nu se schimbe modul de includere din
* a2b.php, dar acum doar apeleaza acest sablon.
*/
$a2bTribe = isset($session->tribe) ? (int) $session->tribe : 1;
if ($a2bTribe < 1 || $a2bTribe > 9) {
$a2bTribe = 1;
}
$a2bFirstUnit = ($a2bTribe - 1) * 10 + 1;
// Natarii nu au erou, deci nu li se arata casuta lui.
$a2bShowHero = ($a2bTribe !== 5) && !empty($village->unitarray['hero']);
/**
* Deseneaza o casuta de unitate.
*
* @param int $slot pozitia in formular (1..10) - devine numele campului tN
* @param int $unitId identificatorul real al unitatii (u1..u90)
* @param string $class clasele celulei din tabel
*/
if (!function_exists('a2b_unit_cell')) {
function a2b_unit_cell($slot, $unitId, $class)
{
global $village;
$have = isset($village->unitarray['u' . $unitId])
? (int) $village->unitarray['u' . $unitId] : 0;
$label = defined('U' . $unitId) ? constant('U' . $unitId) : ('u' . $unitId);
$field = 't' . (int) $slot;
echo '<td class="' . htmlspecialchars($class, ENT_QUOTES, 'UTF-8') . '">';
echo '<img class="unit u' . (int) $unitId . '" src="img/x.gif"'
. ' title="' . htmlspecialchars($label, ENT_QUOTES, 'UTF-8') . '"'
. ' alt="' . htmlspecialchars($label, ENT_QUOTES, 'UTF-8') . '"'
. ' onclick="document.snd.' . $field . '.value=\'\'; return false;">';
echo ' <input class="text" name="' . $field . '" value="" maxlength="6" type="text"'
. ($have <= 0 ? ' disabled="disabled"' : '') . '>';
if ($have > 0) {
echo ' <a href="#" onclick="document.snd.' . $field . '.value=' . $have
. '; return false;">(' . $have . ')</a>';
} else {
echo ' <span class="none">(0)</span>';
}
echo '</td>';
}
}
?>
<h1><?php echo SEND_TROOPS; ?></h1>
<form method="POST" name="snd" action="a2b.php">
<input name="b" value="1" type="hidden">
<table id="troops" cellpadding="1" cellspacing="1">
<tbody>
<tr>
<?php
// primul rand: unitatile 1-5 ale tribului
for ($i = 0; $i < 5; $i++) {
a2b_unit_cell(
$i + 1,
$a2bFirstUnit + $i,
'line-first ' . ($i === 0 ? 'column-first large' : 'large')
);
}
?>
<td class="line-first column-last"></td>
</tr>
<tr>
<?php
// al doilea rand: unitatile 6-10
for ($i = 5; $i < 10; $i++) {
a2b_unit_cell(
$i + 1,
$a2bFirstUnit + $i,
$i === 5 ? 'column-first large' : 'large'
);
}
?>
<td class="column-last"></td>
</tr>
<tr>
<?php
/**
* Casuta eroului.
*
* BUG REPARAT: varianta veche deschidea celula in HTML si o
* inchidea in interiorul unui echo, dar mai lasa un </td> si
* dupa blocul PHP. Cand eroul era in sat se generau DOUA
* inchideri, iar tabelul iesea stricat. Acum celula se inchide
* o singura data, pe ambele ramuri.
*/
if ($a2bShowHero) {
$heroCount = (int) $village->unitarray['hero'];
$heroLabel = defined('TZ_HERO') ? TZ_HERO : 'Hero';
?>
<td class="line-last column-first regular">
<img class="unit uhero" src="img/x.gif"
title="<?php echo htmlspecialchars($heroLabel, ENT_QUOTES, 'UTF-8'); ?>"
alt="<?php echo htmlspecialchars($heroLabel, ENT_QUOTES, 'UTF-8'); ?>">
<input class="text" name="t11" value="" maxlength="6" type="text">
<a href="#" onclick="document.snd.t11.value=<?php echo $heroCount; ?>; return false;">(<?php echo $heroCount; ?>)</a>
</td>
<?php } else { ?>
<td class="line-last column-first regular"></td>
<?php } ?>
<td class="line-last regular"></td>
<td class="line-last column-last"></td>
</tr>
</tbody>
</table>
<?php
/**
* ATENTIE: formularul ramane DESCHIS aici, intentionat.
*
* a2b.php include imediat dupa acest sablon si search.tpl, care adauga
* campurile de destinatie si butonul OK, apoi inchide </form>. Daca inchidem
* formularul aici, butonul ramane in afara lui si trimiterea trupelor nu mai
* face nimic - fara niciun mesaj de eroare.
*/
?>