mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-01 18:14:23 +00:00
big update (fix sitters, peace system, fix some problems of hero...)
This commit is contained in:
@@ -109,7 +109,7 @@ class Account {
|
||||
}
|
||||
}
|
||||
else {
|
||||
$uid = $database->register($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$_POST['kid'],$act);
|
||||
$uid = $database->register($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$act);
|
||||
if($uid) {
|
||||
setcookie("COOKUSR",$_POST['name'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
||||
setcookie("COOKEMAIL",$_POST['email'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
||||
@@ -131,7 +131,7 @@ class Account {
|
||||
$result = mysql_query($q, $database->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
if($dbarray['act'] == $_POST['id']) {
|
||||
$uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],$dbarray['location'],"");
|
||||
$uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],"");
|
||||
if($uid) {
|
||||
$database->unreg($dbarray['username']);
|
||||
$this->generateBase($dbarray['kid'],$uid,$dbarray['username']);
|
||||
@@ -188,8 +188,13 @@ class Account {
|
||||
header("Location: login.php");
|
||||
}
|
||||
else {
|
||||
$userid = $database->getUserArray($_POST['user'], 0);
|
||||
if($database->login($_POST['user'],$_POST['pw'])){
|
||||
$database->UpdateOnline("login" ,$_POST['user'],time(),$userid['id']);
|
||||
}else if($database->sitterLogin($_POST['user'],$_POST['pw'])){
|
||||
$database->UpdateOnline("sitter" ,$_POST['user'],time(),$userid['id']);
|
||||
}
|
||||
setcookie("COOKUSR",$_POST['user'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
||||
$database->UpdateOnline("login" ,$_POST['user'],time());
|
||||
$session->login($_POST['user']);
|
||||
}
|
||||
}
|
||||
|
||||
+48
-10
@@ -548,6 +548,7 @@ class Automation {
|
||||
$isoasis = $database->isVillageOases($data['to']);
|
||||
$AttackArrivalTime = $data['endtime'];
|
||||
$AttackerWref = $data['from'];
|
||||
$DefenderWref = $data['to'];
|
||||
if ($isoasis == 0){
|
||||
$Attacker['id'] = $database->getUserField($database->getVillageField($data['from'],"owner"),"id",0);
|
||||
$Defender['id'] = $database->getUserField($database->getVillageField($data['to'],"owner"),"id",0);
|
||||
@@ -810,7 +811,7 @@ class Automation {
|
||||
if(!isset($Defender['hero'])){
|
||||
$Defender['hero'] = '0';
|
||||
} else {
|
||||
if($Defender['hero']=='' or $Defender['hero']<='0'){
|
||||
if($Defender['hero']=='' or $Defender['hero']<'0'){
|
||||
$Defender['hero'] = '0';
|
||||
}
|
||||
}
|
||||
@@ -896,7 +897,8 @@ class Automation {
|
||||
$stonemason = "1";
|
||||
|
||||
}
|
||||
$battlepart = $battle->calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab,$tblevel,$stonemason,$walllevel,$AttackerID,$DefenderID,$AttackerWref);
|
||||
if(PEACE == False || $targettribe == 4 || $targettribe == 5){
|
||||
$battlepart = $battle->calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab,$tblevel,$stonemason,$walllevel,$AttackerID,$DefenderID,$AttackerWref,$DefenderWref);
|
||||
|
||||
//units attack string for battleraport
|
||||
$unitssend_att = ''.$data['t1'].','.$data['t2'].','.$data['t3'].','.$data['t4'].','.$data['t5'].','.$data['t6'].','.$data['t7'].','.$data['t8'].','.$data['t9'].','.$data['t10'].'';
|
||||
@@ -948,8 +950,8 @@ class Automation {
|
||||
}
|
||||
$dead['hero']='0';
|
||||
if($unitlist){
|
||||
$dead['hero']+=round($battlepart[2]*$unitlist[0]['hero']);
|
||||
$database->modifyUnit($data['to'],array("hero"),array(round($battlepart[2]*$unitlist[0]['hero'])),array(0));
|
||||
$dead['hero']+=$battlepart['deadherodef'];
|
||||
$database->modifyUnit($data['to'],array("hero"),array($battlepart['deadherodef']),array(0));
|
||||
}
|
||||
//kill other defence in village
|
||||
if(count($database->getEnforceVillage($data['to'],0)) > 0) {
|
||||
@@ -971,8 +973,8 @@ class Automation {
|
||||
$dead[$i]='0';
|
||||
}
|
||||
if($enforce['hero']>'0'){
|
||||
$database->modifyEnforce($enforce['id'],"hero",round($battlepart[2]*$enforce['hero']),0);
|
||||
$dead['hero']+=round($battlepart[2]*$enforce['hero']);
|
||||
$database->modifyEnforce($enforce['id'],"hero",$battlepart['deadheroref'][$enforce['id']],0);
|
||||
$dead['hero']+=$battlepart['deadheroref'][$enforce['id']];
|
||||
if($dead['hero']!=$enforce['hero']){
|
||||
$wrong='1';
|
||||
}
|
||||
@@ -1089,13 +1091,13 @@ class Automation {
|
||||
$heroxp = $totaldead_def;
|
||||
$database->modifyHeroXp("experience",$heroxp,$from['owner']);
|
||||
}
|
||||
$Defender1 = $database->getUnit($data['to']);
|
||||
$Defender1 = $database->getUnit($to['wref']);
|
||||
if($Defender1['hero'] > 0){
|
||||
$defheroowner = $database->getVillageField($Defender1['vref'],"owner");
|
||||
$defheroowner = $database->getVillageField($to['wref'],"owner");
|
||||
$defheroxp = $totaldead_att;
|
||||
$database->modifyHeroXp("experience",$defheroxp,$defheroowner);
|
||||
}
|
||||
$enforcementarray1 = $database->getEnforceVillage($data['to'],0);
|
||||
$enforcementarray1 = $database->getEnforceVillage($to['wref'],0);
|
||||
if(count($enforcementarray1) > 0) {
|
||||
foreach($enforcementarray1 as $enforce1) {
|
||||
if($enforce1['hero'] > 0){
|
||||
@@ -2100,6 +2102,42 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
if($type == 3 or $type == 4){
|
||||
$database->addGeneralAttack($totalattackdead);
|
||||
}
|
||||
}else{
|
||||
//units attack string for battleraport
|
||||
$unitssend_att = ''.$data['t1'].','.$data['t2'].','.$data['t3'].','.$data['t4'].','.$data['t5'].','.$data['t6'].','.$data['t7'].','.$data['t8'].','.$data['t9'].','.$data['t10'].'';
|
||||
$herosend_att = $data['t11'];
|
||||
if ($herosend_att>0){
|
||||
$unitssend_att_check=$unitssend_att.','.$data['t11'];
|
||||
}else{
|
||||
$unitssend_att_check=$unitssend_att;
|
||||
}
|
||||
|
||||
$speeds = array();
|
||||
|
||||
//find slowest unit.
|
||||
for($i=1;$i<=10;$i++)
|
||||
{
|
||||
if ($data['t'.$i] > 0) {
|
||||
if($unitarray) { reset($unitarray); }
|
||||
$unitarray = $GLOBALS["u".(($owntribe-1)*10+$i)];
|
||||
$speeds[] = $unitarray['speed'];
|
||||
}
|
||||
}
|
||||
if ($herosend_att>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$from['owner']."";
|
||||
$resulth = mysql_query($qh);
|
||||
$hero_f=mysql_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
}
|
||||
$endtime = $this->procDistanceTime($from,$to,min($speeds),1) + time();
|
||||
$database->setMovementProc($data['moveid']);
|
||||
$database->addMovement(4,$to['wref'],$from['wref'],$data['ref'],time(),$endtime);
|
||||
|
||||
$data2 = ''.$from['owner'].','.$from['wref'].','.$to['owner'].','.$owntribe.','.$unitssend_att_check.'';
|
||||
$database->addNotice($from['owner'],$to['wref'],$ownally,22,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data2,time());
|
||||
$database->addNotice($to['owner'],$to['wref'],$targetally,22,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data2,time());
|
||||
}
|
||||
unset($Attacker);
|
||||
unset($Defender);
|
||||
unset($enforce);
|
||||
@@ -2119,7 +2157,6 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
unset($data_fail);
|
||||
unset($owntribe);
|
||||
unset($unitsdead_att);
|
||||
unset($dead11);
|
||||
unset($herosend_def);
|
||||
unset($deadhero);
|
||||
unset($heroxp);
|
||||
@@ -2137,6 +2174,7 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
unset($defheroxp);
|
||||
unset($reinfheroxp);
|
||||
unset($AttackerWref);
|
||||
unset($DefenderWref);
|
||||
unset($troopsdead1);
|
||||
unset($troopsdead2);
|
||||
unset($troopsdead3);
|
||||
|
||||
@@ -154,9 +154,9 @@ class Battle {
|
||||
}
|
||||
|
||||
if(!$scout)
|
||||
return $this->calculateBattle($attacker,$defender,$wall,$post['a1_v'],$deftribe,$post['palast'],$post['ew1'],$post['ew2'],$post['ktyp']+3,$def_ab,$att_ab,$post['kata'],1,0,0,0);
|
||||
return $this->calculateBattle($attacker,$defender,$wall,$post['a1_v'],$deftribe,$post['palast'],$post['ew1'],$post['ew2'],$post['ktyp']+3,$def_ab,$att_ab,$post['kata'],1,0,0,0,0);
|
||||
else
|
||||
return $this->calculateBattle($attacker,$defender,$wall,$post['a1_v'],$deftribe,$post['palast'],$post['ew1'],$post['ew2'],1,$def_ab,$att_ab,$post['kata'],1,0,0,0);
|
||||
return $this->calculateBattle($attacker,$defender,$wall,$post['a1_v'],$deftribe,$post['palast'],$post['ew1'],$post['ew2'],1,$def_ab,$att_ab,$post['kata'],1,0,0,0,0);
|
||||
}
|
||||
|
||||
public function getTypeLevel($tid,$vid) {
|
||||
@@ -207,7 +207,7 @@ class Battle {
|
||||
}
|
||||
|
||||
//1 raid 0 normal
|
||||
function calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab,$tblevel,$stonemason,$walllevel,$AttackerID,$DefenderID,$AttackerWref) {
|
||||
function calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab,$tblevel,$stonemason,$walllevel,$AttackerID,$DefenderID,$AttackerWref,$DefenderWref) {
|
||||
global $database,$bid34,$bid35;
|
||||
// Definieer de array met de eenheden
|
||||
$calvary = array(4,5,6,15,16,23,24,25,26,35,36,45,46);
|
||||
@@ -592,12 +592,13 @@ class Battle {
|
||||
if ($hero_health<=$damage_health or $damage_health>90)
|
||||
{
|
||||
//hero die
|
||||
$result['casualties_defender']['11'] = 1;
|
||||
$result['deadherodef'] = 1;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['deadherodef'] = 0;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
}
|
||||
unset($_result);
|
||||
@@ -605,8 +606,8 @@ class Battle {
|
||||
unset($hero_id);
|
||||
unset($hero_health);
|
||||
unset($damage_health);
|
||||
|
||||
$DefendersAll = $database->getEnforceVillage($data['to'],0);
|
||||
|
||||
$DefendersAll = $database->getEnforceVillage($DefenderWref,0);
|
||||
if(!empty($DefendersAll)){
|
||||
foreach($DefendersAll as $defenders) {
|
||||
if($defenders['hero'] == 1) {
|
||||
@@ -622,12 +623,13 @@ class Battle {
|
||||
if ($hero_health<=$damage_health or $damage_health>90)
|
||||
{
|
||||
//hero die
|
||||
$result['casualties_defender']['11'] = 1;
|
||||
$result['deadheroref'][$defenders['id']] = 1;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['deadheroref'][$defenders['id']] = 0;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class Building {
|
||||
$this->constructBuilding($get['id'],$get['a']);
|
||||
}
|
||||
if(isset($get['buildingFinish'])) {
|
||||
if($session->gold >= 2) {
|
||||
if($session->gold >= 2 && $session->sit == 0) {
|
||||
$this->finishAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
|
||||
}
|
||||
|
||||
function register($username, $password, $email, $tribe, $locate, $act) {
|
||||
function register($username, $password, $email, $tribe, $act) {
|
||||
$time = time();
|
||||
$timep = (time() + PROTECTION);
|
||||
$q = "INSERT INTO " . TB_PREFIX . "users (username,password,access,email,timestamp,tribe,location,act,protect,lastupdate,regtime) VALUES ('$username', '$password', " . USER . ", '$email', $time, $tribe, $locate, '$act', $timep, $time, $time)";
|
||||
$q = "INSERT INTO " . TB_PREFIX . "users (username,password,access,email,timestamp,tribe,act,protect,lastupdate,regtime) VALUES ('$username', '$password', " . USER . ", '$email', $time, $tribe, '$act', $timep, $time, $time)";
|
||||
if(mysql_query($q, $this->connection)) {
|
||||
return mysql_insert_id($this->connection);
|
||||
} else {
|
||||
@@ -203,12 +203,12 @@
|
||||
$q2 = "SELECT password FROM " . TB_PREFIX . "users where id = " . $dbarray['sit1'] . " and access != " . BANNED;
|
||||
$result2 = mysql_query($q2, $this->connection);
|
||||
$dbarray2 = mysql_fetch_array($result2);
|
||||
} else
|
||||
if($dbarray['sit2'] != 0) {
|
||||
}
|
||||
if($dbarray['sit2'] != 0) {
|
||||
$q3 = "SELECT password FROM " . TB_PREFIX . "users where id = " . $dbarray['sit2'] . " and access != " . BANNED;
|
||||
$result3 = mysql_query($q3, $this->connection);
|
||||
$dbarray3 = mysql_fetch_array($result3);
|
||||
}
|
||||
}
|
||||
if($dbarray['sit1'] != 0 || $dbarray['sit2'] != 0) {
|
||||
if($dbarray2['password'] == md5($password) || $dbarray3['password'] == md5($password)) {
|
||||
return true;
|
||||
@@ -314,10 +314,20 @@
|
||||
return mysql_query($q, $this->connection);
|
||||
}
|
||||
|
||||
function UpdateOnline($mode, $name = "", $time = "") {
|
||||
function GetOnline($uid) {
|
||||
$q = "SELECT sit FROM " . TB_PREFIX . "online where uid = $uid";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
return $dbarray['sit'];
|
||||
}
|
||||
|
||||
function UpdateOnline($mode, $name = "", $time = "", $uid = 0) {
|
||||
global $session;
|
||||
if($mode == "login") {
|
||||
$q = "INSERT IGNORE INTO " . TB_PREFIX . "online (name, time) VALUES ('$name', " . time() . ")";
|
||||
$q = "INSERT IGNORE INTO " . TB_PREFIX . "online (name, uid, time, sit) VALUES ('$name', '$uid', " . time() . ", 0)";
|
||||
return mysql_query($q, $this->connection);
|
||||
} else if($mode == "sitter") {
|
||||
$q = "INSERT IGNORE INTO " . TB_PREFIX . "online (name, uid, time, sit) VALUES ('$name', '$uid', " . time() . ", 1)";
|
||||
return mysql_query($q, $this->connection);
|
||||
} else {
|
||||
$q = "DELETE FROM " . TB_PREFIX . "online WHERE name ='" . $session->username . "'";
|
||||
@@ -1692,7 +1702,7 @@
|
||||
}
|
||||
}
|
||||
if(($jobLoopconID >= 0) && ($jobs[$jobDeleted]['loopcon'] != 1)) {
|
||||
if(($jobs[$jobLoopconID]['field'] <= 18 && $jobs[$jobDeleted]['field'] <= 18) || ($jobs[$jobLoopconID]['field'] >= 19 && $jobs[$jobDeleted]['field'] >= 19)) {
|
||||
if(($jobs[$jobLoopconID]['field'] <= 18 && $jobs[$jobDeleted]['field'] <= 18) || ($jobs[$jobLoopconID]['field'] >= 19 && $jobs[$jobDeleted]['field'] >= 19) || sizeof($jobs) < 3) {
|
||||
$uprequire = $building->resourceRequired($jobs[$jobLoopconID]['field'], $jobs[$jobLoopconID]['type']);
|
||||
$x = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,timestamp=" . (time() + $uprequire['time']) . " WHERE wid=" . $jobs[$jobDeleted]['wid'] . " AND loopcon=1 AND master=0";
|
||||
mysql_query($x, $this->connection) or die(mysql_error());
|
||||
@@ -1743,6 +1753,15 @@
|
||||
return $this->mysql_fetch_all($result);
|
||||
}
|
||||
|
||||
function FinishWoodcutter($wid) {
|
||||
$time = time()-1;
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid and type = 1 order by timestamp ASC";
|
||||
$result = mysql_query($q);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
$q = "UPDATE ".TB_PREFIX."bdata SET timestamp = $time WHERE id = '".$dbarray['id']."'";
|
||||
$this->query($q);
|
||||
}
|
||||
|
||||
function getMasterJobs($wid) {
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid and master = 1 order by master,timestamp ASC";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
|
||||
@@ -79,7 +79,7 @@ define("NEXT_PROD","Production at level ");
|
||||
|
||||
//BUILDINGS
|
||||
define("B1","Woodcutter");
|
||||
define("B1_DESC","The Woodcutter cuts down trees in order to produce lumber. The further you extend the bid1 the more lumber is produced by him.");
|
||||
define("B1_DESC","The Woodcutter cuts down trees in order to produce lumber. The further you extend the woodcutter the more lumber is produced by him.");
|
||||
define("B2","Clay Pit");
|
||||
define("B2_DESC","Clay is produced here. By increasing its level you increase its clay production.");
|
||||
define("B3","Iron Mine");
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
$welcomemsg = preg_replace("'%USER%'", $username, $welcomemsg);
|
||||
$welcomemsg = preg_replace("'%START%'", date("y.m.d", COMMENCE), $welcomemsg);
|
||||
$welcomemsg = preg_replace("'%TIME%'", date("H:i", COMMENCE), $welcomemsg);
|
||||
$welcomemsg = preg_replace("'%PLAYERS%'", $database->countUser(), $welcomemsg);
|
||||
$welcomemsg = preg_replace("'%PLAYERS%'", $database->countUser()-4, $welcomemsg);
|
||||
$welcomemsg = preg_replace("'%ALLI%'", $database->countAlli(), $welcomemsg);
|
||||
return $database->sendMessage($uid, 5, WEL_TOPIC, $welcomemsg, 0);
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ class Session {
|
||||
$this->alliance = $_SESSION['alliance_user'] = $this->userarray['alliance'];
|
||||
$this->checker = $_SESSION['checker'];
|
||||
$this->mchecker = $_SESSION['mchecker'];
|
||||
$this->sit = $database->GetOnline($this->uid);
|
||||
$this->sit1 = $this->userarray['sit1'];
|
||||
$this->sit2 = $this->userarray['sit2'];
|
||||
$this->cp = floor($this->userarray['cp']);
|
||||
|
||||
@@ -26,7 +26,7 @@ class Units {
|
||||
break;
|
||||
|
||||
case "2":
|
||||
if (isset($post['a'])&& $post['a']==533374){
|
||||
if (isset($post['a'])&& $post['a']==533374 && $post['disabledr'] == ""){
|
||||
$this->sendTroops($post);
|
||||
}else{
|
||||
$post = $this->loadUnits($post);
|
||||
@@ -39,7 +39,7 @@ class Units {
|
||||
break;
|
||||
|
||||
case "3":
|
||||
if (isset($post['a'])&& $post['a']==533374){
|
||||
if (isset($post['a'])&& $post['a']==533374 && $post['disabled'] == ""){
|
||||
$this->sendTroops($post);
|
||||
}else{
|
||||
$post = $this->loadUnits($post);
|
||||
@@ -70,6 +70,12 @@ class Units {
|
||||
global $database,$village,$session,$generator,$logging,$form;
|
||||
// Busqueda por nombre de pueblo
|
||||
// Confirmamos y buscamos las coordenadas por nombre de pueblo
|
||||
if($post['disabledr'] != ""){
|
||||
$form->addError("error","You can't reinforce this village/oasis");
|
||||
}
|
||||
if($post['disabled'] != ""){
|
||||
$form->addError("error","You can't attack this village/oasis with normal attack");
|
||||
}
|
||||
if( !$post['t1'] && !$post['t2'] && !$post['t3'] && !$post['t4'] && !$post['t5'] &&
|
||||
!$post['t6'] && !$post['t7'] && !$post['t8'] && !$post['t9'] && !$post['t10'] && !$post['t11']){
|
||||
$form->addError("error","You need to mark min. one troop");
|
||||
|
||||
@@ -51,13 +51,7 @@ if (isset($qact)){
|
||||
$database->updateUserField($_SESSION['username'],'quest','2',0);
|
||||
$_SESSION['qst']= 2;
|
||||
//Give Reward
|
||||
if(!$session->plus){
|
||||
mysql_query("UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$_SESSION['username']."'") or die(mysql_error());
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=86400;
|
||||
$database->updateUserField($_SESSION['username'],'plus',$plus,0);
|
||||
}
|
||||
$database->FinishWoodcutter($session->villages[0]);
|
||||
break;
|
||||
|
||||
case '3':
|
||||
@@ -65,7 +59,13 @@ if (isset($qact)){
|
||||
$_SESSION['qst']= 3;
|
||||
|
||||
//Give Reward
|
||||
$database->modifyResource($session->villages[0],50,60,30,10,1);
|
||||
if(!$session->plus){
|
||||
mysql_query("UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$_SESSION['username']."'") or die(mysql_error());
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=86400;
|
||||
$database->updateUserField($_SESSION['username'],'plus',$plus,0);
|
||||
}
|
||||
break;
|
||||
|
||||
case '4':
|
||||
|
||||
@@ -6,8 +6,17 @@
|
||||
| <a href="allianz.php?s=6" <?php if(isset($_GET['s']) && $_GET['s'] == 6) { echo "class=\"selected\""; } ?>>Chat</a>
|
||||
| <a href="allianz.php?s=3" <?php if(isset($_GET['s']) && $_GET['s'] == 3) { echo "class=\"selected\""; } ?>>Attacks</a>
|
||||
| <a href="allianz.php?s=4" <?php if(isset($_GET['s']) && $_GET['s'] == 4) { echo "class=\"selected\""; } ?>>News</a>
|
||||
|
||||
<?php
|
||||
if($session->sit == 0){
|
||||
?>
|
||||
| <a href="allianz.php?s=5" <?php if(isset($_GET['s']) && $_GET['s'] == 5) { echo "class=\"selected\""; } ?>>Options</a>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
| <span class=none><b>Options</b></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ if($units_incoming >= 1){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>Send back</a></div></td></tr>";
|
||||
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><span class=none><b>Send back</b></span></div></td></tr>";
|
||||
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ $mastertime = $uprequire['time'];
|
||||
<?php
|
||||
if($bindicator == 2) {
|
||||
echo "<span class=\"none\">The workers are already at work.</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
@@ -33,7 +33,7 @@ $mastertime = $uprequire['time'];
|
||||
}
|
||||
else if($bindicator == 3) {
|
||||
echo "<span class=\"none\">The workers are already at work. (waiting loop)</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
@@ -57,7 +57,7 @@ $mastertime = $uprequire['time'];
|
||||
else if($bindicator == 7) {
|
||||
$neededtime = $building->calculateAvaliable($id,$bid);
|
||||
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
|
||||
@@ -16,7 +16,7 @@ $uprequire = $building->resourceRequired(99,$bid);
|
||||
<?php
|
||||
if($bindicator == 2) {
|
||||
echo "<span class=\"none\">The workers are already at work.</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1){
|
||||
@@ -30,7 +30,7 @@ $uprequire = $building->resourceRequired(99,$bid);
|
||||
}
|
||||
else if($bindicator == 3) {
|
||||
echo "<span class=\"none\">The workers are already at work. (waiting loop)</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1){
|
||||
@@ -54,7 +54,7 @@ $uprequire = $building->resourceRequired(99,$bid);
|
||||
else if($bindicator == 7) {
|
||||
$neededtime = $building->calculateAvaliable(99,$bid);
|
||||
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1){
|
||||
|
||||
@@ -22,7 +22,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
<?php
|
||||
if($bindicate == 2) {
|
||||
echo "<span class=\"none\">The workers are already at work.</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
@@ -46,7 +46,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
}
|
||||
else if($bindicate == 3) {
|
||||
echo "<span class=\"none\">The workers are already at work. (waiting loop)</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
@@ -80,7 +80,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
else if($bindicate == 7) {
|
||||
$neededtime = $building->calculateAvaliable($id,$village->resarray['f'.$id.'t'],1+$loopsame+$doublebuild+$master);
|
||||
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
|
||||
@@ -42,7 +42,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
<?php
|
||||
if($bindicate == 2) {
|
||||
echo "<span class=\"none\">The workers are already at work.</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
@@ -66,7 +66,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
}
|
||||
else if($bindicate == 3) {
|
||||
echo "<span class=\"none\">The workers are already at work. (waiting loop)</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
@@ -100,7 +100,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
else if($bindicate == 7) {
|
||||
$neededtime = $building->calculateAvaliable($id,$village->resarray['f'.$id.'t'],1+$loopsame+$doublebuild+$master);
|
||||
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||
if($session->goldclub){
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
|
||||
@@ -389,7 +389,7 @@ while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){
|
||||
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
|
||||
}else{
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
@@ -402,7 +402,7 @@ while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){
|
||||
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
|
||||
}else{
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
|
||||
+10
-10
@@ -150,8 +150,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -205,8 +205,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -259,8 +259,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -314,8 +314,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -369,8 +369,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -152,8 +152,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -207,8 +207,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -261,8 +261,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -316,8 +316,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -371,8 +371,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -150,8 +150,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -205,8 +205,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -259,8 +259,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -314,8 +314,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -369,8 +369,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
//reinforcement is underattack
|
||||
$dataarray = explode(",",$message->readingNotice['data']);
|
||||
if(isset($dataarray[14]) and $dataarray[14]!=0){$colspan="11";}else{$colspan="10";}
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="report_surround">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Subject:</th>
|
||||
<th><?php echo $message->readingNotice['topic']; ?></th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<?php
|
||||
$date = $generator->procMtime($message->readingNotice['time']); ?>
|
||||
<td class="sent">Sent:</td>
|
||||
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td colspan="2" class="empty"></td></tr>
|
||||
<tr><td colspan="2" class="report_content">
|
||||
<table cellpadding="1" cellspacing="1" class="attacker"><thead>
|
||||
<tr>
|
||||
<td class="role">Attacker</td>
|
||||
<td colspan="<?php echo $colspan ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<?php
|
||||
$tribe = $dataarray[3];
|
||||
$start = ($tribe-1)*10+1;
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if(isset($dataarray[14]) and $dataarray[14]!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i=4;$i<=13;$i++) {
|
||||
if($dataarray[$i] == 0) {
|
||||
echo "<td class=\"none\">0</td>";
|
||||
}
|
||||
else {
|
||||
echo "<td>".$dataarray[$i]."</td>";
|
||||
}
|
||||
}
|
||||
if(isset($dataarray[14]) and $dataarray[14]!=0){
|
||||
echo "<td>$dataarray[14]</td>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
|
||||
<img src="<?php echo GP_LOCATE; ?>img/r/xmas.gif" alt="Peace" title="Peace" />
|
||||
<?php echo "".$database->getUserField($dataarray[0],"username",0)." visited ".$database->getUserField($dataarray[2],"username",0)."'s troops" ?>
|
||||
</td></tr></tbody>
|
||||
</table>
|
||||
</td></tr></tbody></table>
|
||||
+10
-10
@@ -152,8 +152,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -207,8 +207,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -261,8 +261,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -316,8 +316,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -371,8 +371,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -150,8 +150,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -205,8 +205,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -259,8 +259,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -314,8 +314,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -369,8 +369,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -152,8 +152,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -207,8 +207,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -261,8 +261,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -316,8 +316,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -371,8 +371,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -150,8 +150,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -205,8 +205,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -259,8 +259,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -314,8 +314,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -369,8 +369,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -152,8 +152,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -207,8 +207,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -261,8 +261,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -316,8 +316,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -371,8 +371,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -150,8 +150,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -205,8 +205,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -259,8 +259,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -314,8 +314,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -369,8 +369,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
+10
-10
@@ -152,8 +152,8 @@ for($i=45;$i<=54;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -207,8 +207,8 @@ for($i=66;$i<=75;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -261,8 +261,8 @@ for($i=87;$i<=96;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -316,8 +316,8 @@ for($i=108;$i<=117;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
@@ -371,8 +371,8 @@ for($i=129;$i<=138;$i++) {
|
||||
}
|
||||
}
|
||||
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
|
||||
if ($dataarray[150]==0){$tdclass='class="none"';}
|
||||
echo "<td $tdclass>$dataarray[150]</td>";
|
||||
if ($dataarray[150]==0){$tdclass1='class="none"';}
|
||||
echo "<td $tdclass1>$dataarray[150]</td>";
|
||||
}
|
||||
?>
|
||||
</tr></tbody></table>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$noticeClass = array("Scout Report","Won as attacker without losses","Won as attacker with losses","Lost as attacker with losses","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Lost as defender without losses","Reinforcement arrived","","Wood Delivered","Clay Delivered","Iron Delivered","Crop Delivered","","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Won scouting as attacker","Lost scouting as attacker","Won scouting as defender","Lost scouting as defender");
|
||||
$noticeClass = array("Scout Report","Won as attacker without losses","Won as attacker with losses","Lost as attacker with losses","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Lost as defender without losses","Reinforcement arrived","","Wood Delivered","Clay Delivered","Iron Delivered","Crop Delivered","","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Won scouting as attacker","Lost scouting as attacker","Won scouting as defender","Lost scouting as defender","Scout Report");
|
||||
?>
|
||||
<form method="post" action="berichte.php" name="msg">
|
||||
<table cellpadding="1" cellspacing="1" id="overview"
|
||||
@@ -72,7 +72,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
if($type==15 or $type==16 or $type==17){
|
||||
$type = $type-11;
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport$type\" alt=\"".$noticeClass[$type]."\" title=\"".$noticeClass[$type]."\" />";
|
||||
}else if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
}else if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){
|
||||
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$noticeClass[$type]."\" title=\"".$noticeClass[$type]."\" />";
|
||||
}else{
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport$type\" alt=\"".$noticeClass[$type]."\" title=\"".$noticeClass[$type]."\" />";
|
||||
|
||||
@@ -15,7 +15,7 @@ if($session->access != BANNED){
|
||||
$goldlog = mysql_query("SELECT * FROM ".TB_PREFIX."gold_fin_log") or die(mysql_error());
|
||||
|
||||
$today = date("mdHi");
|
||||
|
||||
if($session->sit == 0) {
|
||||
if (mysql_num_rows($MyGold)) {
|
||||
if($golds['6'] > 2) {
|
||||
|
||||
@@ -41,6 +41,7 @@ $done1 = "nothing has been done";
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if($session->access != BANNED){
|
||||
$goldlog = mysql_query("SELECT * FROM ".TB_PREFIX."gold_fin_log") or die(mysql_error());
|
||||
|
||||
$today = date("mdHi");
|
||||
|
||||
if($session->sit == 0) {
|
||||
if (mysql_num_rows($MyGold)) {
|
||||
if($golds['6'] > 2) {
|
||||
|
||||
@@ -41,6 +41,7 @@ $done1 = "nothing has been done";
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if($session->access != BANNED){
|
||||
$goldlog = mysql_query("SELECT * FROM ".TB_PREFIX."gold_fin_log") or die(mysql_error());
|
||||
|
||||
$today = date("mdHi");
|
||||
|
||||
if($session->sit == 0) {
|
||||
if (mysql_num_rows($MyGold)) {
|
||||
if($golds['6'] > 2) {
|
||||
|
||||
@@ -41,6 +41,7 @@ $done1 = "nothing has been done";
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<tr>
|
||||
<td align="center">
|
||||
<?php
|
||||
if($session->sit == 0) {
|
||||
/* $MyGold = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE `username`='".$session->username."'") or die(mysql_error());
|
||||
$golds = mysql_fetch_array($MyGold);
|
||||
|
||||
@@ -35,6 +36,7 @@
|
||||
echo "<input type='text' name='T4' size='6' value=".$quart."></td>";
|
||||
mysql_query("UPDATE ".TB_PREFIX."users set gold = ".($session->gold-1)." where `username`='".$session->username."'") or die(mysql_error());
|
||||
*/
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
////////////// made by alq0rsan /////////////////////////
|
||||
if($session->access != BANNED){
|
||||
if($session->gold >= 100) {
|
||||
if($session->gold >= 100 && $session->sit == 0) {
|
||||
mysql_query("UPDATE ".TB_PREFIX."users set goldclub = 1, gold = gold - 100 where `username`='".$session->username."'");
|
||||
}
|
||||
header("Location: plus.php?id=3");
|
||||
|
||||
@@ -17,7 +17,7 @@ if($session->access != BANNED){
|
||||
$goldlog = mysql_query("SELECT * FROM ".TB_PREFIX."gold_fin_log") or die(mysql_error());
|
||||
|
||||
$today = date("mdHi");
|
||||
|
||||
if($session->sit == 0) {
|
||||
if (mysql_num_rows($MyGold)) {
|
||||
if($golds['6'] > 2) {
|
||||
|
||||
@@ -41,6 +41,7 @@ $done1 = " Nothing has been Completed";
|
||||
$done1 = " You need more Gold";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if($session->access != BANNED){
|
||||
$goldlog = mysql_query("SELECT * FROM ".TB_PREFIX."gold_fin_log") or die(mysql_error());
|
||||
|
||||
$today = date("mdHi");
|
||||
|
||||
if($session->sit == 0) {
|
||||
if (mysql_num_rows($MyGold)) {
|
||||
if($golds['6'] > 2) {
|
||||
|
||||
@@ -42,6 +42,7 @@ $done1 = "nothing has been done";
|
||||
$done1 = " You need more gold";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if($session->access != BANNED){
|
||||
$goldlog = mysql_query("SELECT * FROM ".TB_PREFIX."gold_fin_log") or die(mysql_error());
|
||||
|
||||
$today = date("mdHi");
|
||||
|
||||
if($session->sit == 0) {
|
||||
if (mysql_num_rows($MyGold)) {
|
||||
if($golds['6'] > 2) {
|
||||
|
||||
@@ -41,6 +41,7 @@ $done1 = "nothing has been done";
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<div id="textmenu">
|
||||
<a href="spieler.php?uid=<?php if(isset($_GET['uid'])) { echo $_GET['uid']; } else { echo $session->uid; } ?>" <?php if(isset($_GET['uid'])) { echo "class=\"selected\""; } ?>>Overview</a>
|
||||
| <span class=none><b>Profile</b></span>
|
||||
| <span class=none><b>Preferences</b></span>
|
||||
| <span class=none><b>Account</b></span>
|
||||
<?php
|
||||
if(GP_ENABLE) {
|
||||
?>
|
||||
| <span class=none><b>Graphic pack</b></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
@@ -27,8 +27,15 @@ foreach($varray as $vil) {
|
||||
?>
|
||||
<h1>Player profile</h1>
|
||||
|
||||
<?php
|
||||
if($_GET['uid'] == $session->uid) { include("menu.tpl"); } ?>
|
||||
<?php
|
||||
if($_GET['uid'] == $session->uid) {
|
||||
if($session->sit == 0){
|
||||
include("menu.tpl");
|
||||
}else{
|
||||
include("menu2.tpl");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -118,7 +125,11 @@ if($_GET['uid'] == $session->uid) { include("menu.tpl"); } ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if($_GET['uid'] == $session->uid) {
|
||||
if($session->sit == 0){
|
||||
echo "<td colspan=\"2\"> <a href=\"spieler.php?s=1\">» Change profile</a></td>";
|
||||
}else{
|
||||
echo "<td colspan=\"2\"> <span class=none><b>» Change profile</b></span></td>";
|
||||
}
|
||||
} else {
|
||||
echo "<td colspan=\"2\"> <a href=\"nachrichten.php?t=1&id=".$_GET['uid']."\">» Write message</a></td>";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<table id="coords" cellpadding="1" cellspacing="1">
|
||||
<input type="hidden" name="disabledr" value="<?php echo $disabledr; ?>">
|
||||
<input type="hidden" name="disabled" value="<?php echo $disabled; ?>">
|
||||
<tbody><tr>
|
||||
<td class="sel">
|
||||
|
||||
@@ -16,7 +18,7 @@
|
||||
<tr>
|
||||
<td class="sel">
|
||||
<label>
|
||||
<input class="radio" name="c" value="3" type="radio" <?php echo $disabledr ?>>
|
||||
<input class="radio" name="c" value="3" type="radio" <?php echo $disabled; ?>>
|
||||
Normal attack
|
||||
</label>
|
||||
</td>
|
||||
@@ -27,7 +29,7 @@
|
||||
<tr>
|
||||
<td class="sel">
|
||||
<label>
|
||||
<input class="radio" name="c" <?php echo $checked ?> value="4" type="radio">
|
||||
<input class="radio" name="c" <?php echo $checked; ?> value="4" type="radio">
|
||||
Raid
|
||||
</label>
|
||||
</td>
|
||||
|
||||
@@ -48,10 +48,21 @@ if(isset($_GET['o'])) {
|
||||
$o = $_GET['o'];
|
||||
$oid = $_GET['z'];
|
||||
$too = $database->getOasisField($oid,"conqured");
|
||||
if($too['conqured'] == 0){$disabledr ="disabled=disabled";}else{
|
||||
if($too['conqured'] == 0){$disabledr ="disabled=disabled"; $disabled ="disabled=disabled";}else{
|
||||
$disabledr ="";
|
||||
if($session->sit == 0){
|
||||
$disabled ="";
|
||||
}else{
|
||||
$disabled ="disabled=disabled";
|
||||
}
|
||||
}
|
||||
$checked ="checked=checked";
|
||||
}else{
|
||||
if($session->sit == 0){
|
||||
$disabled ="";
|
||||
}else{
|
||||
$disabled ="disabled=disabled";
|
||||
}
|
||||
}
|
||||
$process = $units->procUnits($_POST);
|
||||
$automation->isWinner();
|
||||
|
||||
+4
-1
@@ -168,6 +168,7 @@ if($_GET['aid'] or $session->alliance!=0){
|
||||
}
|
||||
|
||||
if(isset($_GET['s'])) {
|
||||
if($_GET['s'] != 5 or $session->sit == 0){
|
||||
switch($_GET['s']) {
|
||||
case 2:
|
||||
include ("Templates/Alliance/forum.tpl");
|
||||
@@ -190,7 +191,9 @@ if($_GET['aid'] or $session->alliance!=0){
|
||||
break;
|
||||
}
|
||||
// Options
|
||||
} elseif(isset($_POST['o'])) {
|
||||
}else{
|
||||
header("Location: allianz.php");
|
||||
}} elseif(isset($_POST['o'])) {
|
||||
switch($_POST['o']) {
|
||||
case 1:
|
||||
if(isset($_POST['s']) == 5 && isset($_POST['a_user'])) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 394 B |
@@ -114,7 +114,8 @@ define("TS_THRESHOLD",%TS_THRESHOLD%);
|
||||
// ***** Register open/close
|
||||
define("REG_OPEN",%REG_OPEN%);
|
||||
|
||||
|
||||
// ***** Peace system
|
||||
define("PEACE",%PEACE%);
|
||||
|
||||
//////////////////////////////////
|
||||
// **** LOG SETTINGS **** //
|
||||
|
||||
@@ -1027,7 +1027,9 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%odata` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `%PREFIX%online` (
|
||||
`name` varchar(32) NOT NULL,
|
||||
`uid` int(10) unsigned NOT NULL,
|
||||
`time` varchar(32) NOT NULL,
|
||||
`sit` tinyint(1) unsigned NOT NULL,
|
||||
UNIQUE KEY `name` (`name`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
$text = preg_replace("'%WW%'", $_POST['ww'], $text);
|
||||
$text = preg_replace("'%T4_COMING%'", $_POST['t4_coming'], $text);
|
||||
$text = preg_replace("'%REG_OPEN%'", $_POST['reg_open'], $text);
|
||||
$text = preg_replace("'%PEACE%'", $_POST['peace'], $text);
|
||||
|
||||
fwrite($fh, $text);
|
||||
|
||||
|
||||
@@ -89,7 +89,13 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<option value="True">True</option>
|
||||
<option value="False" selected="selected">False</option>
|
||||
</select>
|
||||
</td></tr><tr></tr>
|
||||
</td></tr><tr></tr>
|
||||
<td><span class="f9 c6">Peace system:</span></td><td>
|
||||
<select name="peace">
|
||||
<option value="True">True</option>
|
||||
<option value="False" selected="selected">False</option>
|
||||
</select>
|
||||
</td></tr><tr></tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ else if (isset($_GET['s'])) {
|
||||
if($_GET['s'] == 4) {
|
||||
include("Templates/Profile/graphic.tpl");
|
||||
}
|
||||
if($_GET['s'] > 4) {
|
||||
if($_GET['s'] > 4 or $session->sit == 1) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?uid=".$session->uid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user