big update
@@ -450,31 +450,48 @@ private function loyaltyRegeneration() {
|
||||
if($indi['type'] == 10) {
|
||||
$max=$database->getVillageField($indi['wid'],"maxstore");
|
||||
if($level=='1' && $max==STORAGE_BASE){ $max=STORAGE_BASE; }
|
||||
$max-=$bid10[$level-1]['attri']*STORAGE_MULTIPLIER;
|
||||
$max+=$bid10[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
if($level!=1){
|
||||
$max-=$bid10[$level-1]['attri']*STORAGE_MULTIPLIER;
|
||||
$max+=$bid10[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}else{
|
||||
$max=$bid10[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}
|
||||
$database->setVillageField($indi['wid'],"maxstore",$max);
|
||||
}
|
||||
|
||||
if($indi['type'] == 11) {
|
||||
$max=$database->getVillageField($indi['wid'],"maxcrop");
|
||||
if($level=='1' && $max==STORAGE_BASE){ $max=STORAGE_BASE; }
|
||||
$max-=$bid11[$level-1]['attri']*STORAGE_MULTIPLIER;
|
||||
$max+=$bid11[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
if($level!=1){
|
||||
$max-=$bid11[$level-1]['attri']*STORAGE_MULTIPLIER;
|
||||
$max+=$bid11[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}else{
|
||||
$max=$bid11[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}
|
||||
$database->setVillageField($indi['wid'],"maxcrop",$max);
|
||||
}
|
||||
|
||||
if($indi['type'] == 38) {
|
||||
$max=$database->getVillageField($indi['wid'],"maxstore");
|
||||
if($level=='1' && $max==STORAGE_BASE){ $max=STORAGE_BASE; }
|
||||
if($level!=1){
|
||||
$max-=$bid38[$level-1]['attri']*STORAGE_MULTIPLIER;
|
||||
$max+=$bid38[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}else{
|
||||
$max=$bid38[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}
|
||||
$database->setVillageField($indi['wid'],"maxstore",$max);
|
||||
}
|
||||
|
||||
if($indi['type'] == 39) {
|
||||
$max=$database->getVillageField($indi['wid'],"maxcrop");
|
||||
if($level=='1' && $max==STORAGE_BASE){ $max=STORAGE_BASE; }
|
||||
if($level!=1){
|
||||
$max-=$bid39[$level-1]['attri']*STORAGE_MULTIPLIER;
|
||||
$max+=$bid39[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}else{
|
||||
$max=$bid39[$level]['attri']*STORAGE_MULTIPLIER;
|
||||
}
|
||||
$database->setVillageField($indi['wid'],"maxcrop",$max);
|
||||
}
|
||||
|
||||
@@ -880,7 +897,7 @@ private function loyaltyRegeneration() {
|
||||
|
||||
}
|
||||
$battlepart = $battle->calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab,$tblevel,$stonemason,$walllevel);
|
||||
$ownally = $database->getUserField($database->getVillageField($data['from'],"owner"),"alliance",0);
|
||||
|
||||
//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'].'';
|
||||
|
||||
@@ -889,19 +906,23 @@ private function loyaltyRegeneration() {
|
||||
$unitssend_def[2] = ''.$Defender['u11'].','.$Defender['u12'].','.$Defender['u13'].','.$Defender['u14'].','.$Defender['u15'].','.$Defender['u16'].','.$Defender['u17'].','.$Defender['u18'].','.$Defender['u19'].','.$Defender['u20'].'';
|
||||
$unitssend_def[3] = ''.$Defender['u21'].','.$Defender['u22'].','.$Defender['u23'].','.$Defender['u24'].','.$Defender['u25'].','.$Defender['u26'].','.$Defender['u27'].','.$Defender['u28'].','.$Defender['u29'].','.$Defender['u30'].'';
|
||||
$unitssend_def[4] = ''.$Defender['u31'].','.$Defender['u32'].','.$Defender['u33'].','.$Defender['u34'].','.$Defender['u35'].','.$Defender['u36'].','.$Defender['u37'].','.$Defender['u38'].','.$Defender['u39'].','.$Defender['u40'].'';
|
||||
$unitssend_def[5] = ''.$Defender['u41'].','.$Defender['u42'].','.$Defender['u43'].','.$Defender['u44'].','.$Defender['u45'].','.$Defender['u46'].','.$Defender['u47'].','.$Defender['u48'].','.$Defender['u49'].','.$Defender['u50'].'';
|
||||
$unitssend_def[6] = ''.$Defender['hero'].'';
|
||||
$unitssend_deff[1] = '?,?,?,?,?,?,?,?,?,?,';
|
||||
$unitssend_def[5] = ''.$Defender['u41'].','.$Defender['u42'].','.$Defender['u43'].','.$Defender['u44'].','.$Defender['u45'].','.$Defender['u46'].','.$Defender['u47'].','.$Defender['u48'].','.$Defender['u49'].','.$Defender['u50'].'';
|
||||
$unitssend_deff[1] = '?,?,?,?,?,?,?,?,?,?,';
|
||||
$unitssend_deff[2] = '?,?,?,?,?,?,?,?,?,?,';
|
||||
$unitssend_deff[3] = '?,?,?,?,?,?,?,?,?,?,';
|
||||
$unitssend_deff[4] = '?,?,?,?,?,?,?,?,?,?,';
|
||||
$unitssend_deff[5] = '?,?,?,?,?,?,?,?,?,?,';
|
||||
//how many troops died? for battleraport
|
||||
for($i=1;$i<=10;$i++){
|
||||
if($battlepart['casualties_attacker'][$i] <= 0) { ${dead.$i} = 0; }elseif($battlepart['casualties_attacker'][$i] > $data['t'.$i]){
|
||||
${dead.$i}=$data['t'.$i];
|
||||
}else { ${dead.$i} = $battlepart['casualties_attacker'][$i]; }
|
||||
}
|
||||
if($battlepart['casualties_attacker'][1] == 0) { $dead1 = 0; } else { $dead1 = $battlepart['casualties_attacker'][1]; }
|
||||
if($battlepart['casualties_attacker'][2] == 0) { $dead2 = 0; } else { $dead2 = $battlepart['casualties_attacker'][2]; }
|
||||
if($battlepart['casualties_attacker'][3] == 0) { $dead3 = 0; } else { $dead3 = $battlepart['casualties_attacker'][3]; }
|
||||
if($battlepart['casualties_attacker'][4] == 0) { $dead4 = 0; } else { $dead4 = $battlepart['casualties_attacker'][4]; }
|
||||
if($battlepart['casualties_attacker'][5] == 0) { $dead5 = 0; } else { $dead5 = $battlepart['casualties_attacker'][5]; }
|
||||
if($battlepart['casualties_attacker'][6] == 0) { $dead6 = 0; } else { $dead6 = $battlepart['casualties_attacker'][6]; }
|
||||
if($battlepart['casualties_attacker'][7] == 0) { $dead7 = 0; } else { $dead7 = $battlepart['casualties_attacker'][7]; }
|
||||
if($battlepart['casualties_attacker'][8] == 0) { $dead8 = 0; } else { $dead8 = $battlepart['casualties_attacker'][8]; }
|
||||
if($battlepart['casualties_attacker'][9] == 0) { $dead9 = 0; } else { $dead9 = $battlepart['casualties_attacker'][9]; }
|
||||
if($battlepart['casualties_attacker'][10] == 0) { $dead10 = 0; } else { $dead10 = $battlepart['casualties_attacker'][10]; }
|
||||
|
||||
|
||||
//kill own defence
|
||||
@@ -915,9 +936,6 @@ ${dead.$i}=$data['t'.$i];
|
||||
if($unitlist){
|
||||
$dead[$i]+=round($battlepart[2]*$unitlist[0]['u'.$i]);
|
||||
$database->modifyUnit($data['to'],array($i),array(round($battlepart[2]*$unitlist[0]['u'.$i])),array(0));
|
||||
if($dead[$i] > $Defender[$i]){
|
||||
$dead[$i] = $Defender[$i];
|
||||
}
|
||||
}
|
||||
}
|
||||
//kill other defence in village
|
||||
@@ -1242,12 +1260,8 @@ ${dead.$i}=$data['t'.$i];
|
||||
$tblevel = $bdo['f'.$rand];
|
||||
$tbgid = $bdo['f'.$rand.'t'];
|
||||
$tbid = $rand;
|
||||
if($bid34[$stonemason] == 0){
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200))) + 0.5);
|
||||
}else{
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
}
|
||||
if ($battlepart[4]>$needed_cata and $rand!=0)
|
||||
if ($battlepart[4]>$needed_cata)
|
||||
{
|
||||
$info_cat = "".$catp_pic.", ".$this->procResType($tbgid)." destroyed.";
|
||||
$database->setVillageLevel($data['to'],"f".$tbid."",'0');
|
||||
@@ -1395,12 +1409,8 @@ ${dead.$i}=$data['t'.$i];
|
||||
$tblevel = $bdo['f'.$rand];
|
||||
$tbgid = $bdo['f'.$rand.'t'];
|
||||
$tbid = $rand;
|
||||
if($bid34[$stonemason] == 0){
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200))) + 0.5);
|
||||
}else{
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
}
|
||||
if (($battlepart[4]/2)>$needed_cata and $rand!=0)
|
||||
if (($battlepart[4]/2)>$needed_cata)
|
||||
{
|
||||
$info_cat = "".$catp_pic.", ".$this->procResType($tbgid)." destroyed.";
|
||||
$database->setVillageLevel($data['to'],"f".$tbid."",'0');
|
||||
@@ -1545,12 +1555,8 @@ ${dead.$i}=$data['t'.$i];
|
||||
$tblevel = $bdo['f'.$rand];
|
||||
$tbgid = $bdo['f'.$rand.'t'];
|
||||
$tbid = $rand;
|
||||
if($bid34[$stonemason] == 0){
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200))) + 0.5);
|
||||
}else{
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
}
|
||||
if (($battlepart[4]/2)>$needed_cata and $rand!=0)
|
||||
if (($battlepart[4]/2)>$needed_cata)
|
||||
{
|
||||
$info_cat .= "<br><tbody class=\"goods\"><tr><th>Information</th><td colspan=\"11\">
|
||||
<img class=\"unit u".$catp_pic."\" src=\"img/x.gif\" alt=\"Catapult\" title=\"Catapult\" /> ".$this->procResType($tbgid)." destroyed.</td></tr></tbody>";
|
||||
@@ -1717,42 +1723,95 @@ ${dead.$i}=$data['t'.$i];
|
||||
}
|
||||
}
|
||||
|
||||
####Hero claim artifact fixed by advocaite
|
||||
if($data['t11'] > 0){
|
||||
if ($isoasis != 0) {
|
||||
if ($database->canConquerOasis($data['from'],$data['to'])) {
|
||||
$database->conquerOasis($data['from'],$data['to']);
|
||||
$info_chief = $hero_pic." Your hero has conquered this oasis and gained ".$heroxp." XP";
|
||||
} else {
|
||||
$OasisInfo = $database->getOasisInfo($data['to']);
|
||||
if ($OasisInfo['conqured'] != 0) {
|
||||
$Oloyaltybefore = $OasisInfo['loyalty'];
|
||||
$database->modifyOasisLoyalty($data['to']);
|
||||
$OasisInfo = $database->getOasisInfo($data['to']);
|
||||
$Oloyaltynow = $OasisInfo['loyalty'];
|
||||
$info_chief = $hero_pic." Your hero has reduced oasis loyalty to ".$Oloyaltynow." from ".$Oloyaltybefore." and gained ".$heroxp." XP";
|
||||
} else {
|
||||
if ($heroxp == 0) {
|
||||
$info_chief = $hero_pic." Your hero had nothing to kill therfore gains no XP at all";
|
||||
} else {
|
||||
$info_chief = $hero_pic." Your hero gained ".$heroxp." XP";
|
||||
}
|
||||
if($data['t11']>0)
|
||||
{
|
||||
if ($isoasis != 0)
|
||||
{
|
||||
if (abs($tocoor['x']-$fromcoor['x'])<=3 && abs($tocoor['y']-$fromcoor['y'])<=3)
|
||||
{
|
||||
//count oasis troops: $troops_o
|
||||
$troops_o=0;
|
||||
$o_unit2=mysql_query("select * from ".TB_PREFIX."units where `vref`='".$data['to']."'");
|
||||
$o_unit=mysql_fetch_array($o_unit2);
|
||||
|
||||
for ($i=1;$i<51;$i++)
|
||||
{
|
||||
$troops_o+=$o_unit[$i];
|
||||
}
|
||||
$troops_o+=$o_unit['hero'];
|
||||
|
||||
$o_unit2=mysql_query("select * from ".TB_PREFIX."enforcement where `vref`='".$data['to']."'");
|
||||
while ($o_unit=@mysql_fetch_array($o_unit2))
|
||||
{
|
||||
for ($i=1;$i<51;$i++)
|
||||
{
|
||||
$troops_o+=$o_unit[$i];
|
||||
}
|
||||
$troops_o+=$o_unit['hero'];
|
||||
}
|
||||
|
||||
|
||||
if ($troops_o<=0)
|
||||
{
|
||||
//check hero mansion level
|
||||
$hero_mansion_level=0;
|
||||
$dbo2=mysql_query("select * from ".TB_PREFIX."fdata where `vref`='".$data['from']."'");
|
||||
$dbo=mysql_fetch_array($dbo2);
|
||||
for ($i=19;$i<=40;$i++)
|
||||
{
|
||||
if ($dbo['f'.$i.'t']==37)
|
||||
{
|
||||
$hero_mansion_level=$dbo['f'.$i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$artifact = $database->getOwnArtefactInfo($data['to']);
|
||||
if ($artifact['vref'] == $data['to']){
|
||||
if($database->canClaimArtifact($artifact['vref'],$artifact['size'])) {
|
||||
$database->claimArtefact($data['to'],$data['to'],$database->getVillageField($data['from'],"owner"));
|
||||
$info_chief = $hero_pic." Your hero is carrying home a artifact, and gained ".$heroxp." XP from the battle";
|
||||
}else{
|
||||
$info_chief = $hero_pic." Your hero could not claim the artifact, and gained ".$heroxp." XP from the battle";
|
||||
|
||||
|
||||
//check number of occupied oasis
|
||||
$dbo2=mysql_query("select * from ".TB_PREFIX."odata where `conqured`='".$data['from']."'");
|
||||
$number_o=mysql_num_rows($dbo2);
|
||||
|
||||
if ($number_o<3)
|
||||
{
|
||||
$needed_hero_mansion_level=$number_o*5+10;
|
||||
if ($hero_mansion_level>=$needed_hero_mansion_level)
|
||||
{
|
||||
$dbo2=mysql_query("select * from ".TB_PREFIX."odata where `wref`='".$data['to']."'");
|
||||
$dbo=mysql_fetch_array($dbo2);
|
||||
$o_owner=$dbo['owner'];
|
||||
$o_conqured=$dbo['conqured'];
|
||||
$o_loyalty=$dbo['loyalty'];
|
||||
if ($o_conqured==""||$o_conqured=='0'||($o_loyalty<=25&&$o_conqured!=$data['from']))
|
||||
{
|
||||
@mysql_query("update ".TB_PREFIX."odata set `conqured`='".$data['from']."', `owner`='".$a_uid."', `name`='Occupied Oasis', `lastupdated`='".time()."', `loyalty`='100' where `wref`='".$data['to']."' ");
|
||||
@mysql_query("update ".TB_PREFIX."wdata set `occupied`='1' where `id`='".$data['to']."' ");
|
||||
$info_chief = "".$hero_pic.", The hero has occupied this oasis and gained ".$heroxp." XP";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($o_conqured!=$data['from'])
|
||||
{
|
||||
$o_loyalty=$o_loyalty-25;
|
||||
@mysql_query("update ".TB_PREFIX."odata set `lastupdated`='".time()."', `loyalty`='".$o_loyalty."' where `wref`='".$data['to']."' ");
|
||||
$info_chief = "".$hero_pic.", The hero gained ".$heroxp." XP. The loyalty of this oasis is ".$o_loyalty."%";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info_chief = "".$hero_pic.", The hero gained ".$heroxp." XP. To occupy this oasis you need a Hero Mansion Level ".$needed_hero_mansion_level;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info_chief = "".$hero_pic.", The hero has occupied maximun of 3 oases already. Hero gained ".$heroxp." XP";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($scout){
|
||||
if ($data['spy'] == 1){
|
||||
$info_spy = "".$spy_pic.",<div class=\"res\"><img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".round($totwood)." |
|
||||
@@ -1804,10 +1863,10 @@ ${dead.$i}=$data['t'.$i];
|
||||
|
||||
}
|
||||
|
||||
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.',0,0,0,0,0,'.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.','.$unitsdead_def[6].'';
|
||||
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.',0,0,0,0,0,'.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.'';
|
||||
}
|
||||
else{
|
||||
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.','.$unitsdead_def[6].'';
|
||||
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.'';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
echo "<tr>
|
||||
<td class=\"desc\">
|
||||
<div class=\"tit\">
|
||||
<img class=\"unit u1\" src=\"img/x.gif\" alt=\"Legionnaire\" title=\"Legionnaire\" />
|
||||
Legionnaire ($name1)
|
||||
<img class=\"unit u".$hero_info['unit']."\" src=\"img/x.gif\" alt=\"".$name."\" title=\"".$name."\" />
|
||||
$name ($name1)
|
||||
</div>"
|
||||
?>
|
||||
|
||||
|
||||
@@ -507,6 +507,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '1', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u1['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u1` = `u1` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u1['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u1['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u1['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -517,6 +518,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '2', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u2['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u2` = `u2` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u2['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u2['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u2['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -527,6 +529,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '3', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u3['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u3` = `u3` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u3['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u3['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u3['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -537,6 +540,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '5', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u5['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u5` = `u5` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u5['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u5['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u5['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -547,6 +551,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '6', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u6['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u6` = `u6` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u6['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u6['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u6['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -559,6 +564,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '11', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u11['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u11` = `u11` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u11['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u11['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u11['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -571,6 +577,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '12', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u12['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u12` = `u12` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u12['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u12['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u12['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -581,6 +588,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '13', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u13['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u13` = `u13` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u13['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u13['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u13['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -591,6 +599,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '15', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u15['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u15` = `u15` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u15['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u15['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u15['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -601,6 +610,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '16', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u16['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u16` = `u16` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u16['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u16['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u16['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -613,6 +623,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '21', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u21['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u21` = `u21` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u21['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u21['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u21['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -623,6 +634,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '22', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u22['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u22` = `u22` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u22['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u22['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u22['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -633,6 +645,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '24', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u24['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u24` = `u24` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u24['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u24['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u24['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -643,6 +656,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '25', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u25['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u25` = `u25` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u25['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u25['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u25['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
@@ -653,6 +667,7 @@ $output.="<tr>
|
||||
mysql_query("DELETE from " . TB_PREFIX . "hero WHERE `dead` = 1 AND `uid` = '" . $session->uid . "'");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`) VALUES ('".$session->uid."', '" . $village->wid . "', '0', '26', '".$session->username."', '0', '10', '0', '0', '100', '0', '0', '0', '0', '".round((time() + ($u26['time'] / SPEED)*3))."', '50')");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `u26` = `u26` - 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "units SET `hero` = 1 WHERE `vref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$u26['wood']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$u26['clay']." WHERE `wref` = '" . $village->wid . "'");
|
||||
mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$u26['iron']." WHERE `wref` = '" . $village->wid . "'");
|
||||
|
||||
@@ -140,11 +140,12 @@ $landd = explode("-",$tt);?> />
|
||||
<tbody>
|
||||
<?php
|
||||
if($session->uid == $database->getVillage($_GET['d'])){
|
||||
$limit = "ntype=0 and ntype=1 and ntype=2 and ntype=3 and ntype=4 and ntype=5 and ntype=6 and ntype=7";
|
||||
$limit = "ntype=0 and ntype=4 and ntype=5 and ntype=6 and ntype=7";
|
||||
}else{
|
||||
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14";
|
||||
}
|
||||
$toWref = $_GET['d'];
|
||||
if($session->alliance!=0){
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
@@ -163,12 +164,31 @@ while($row = mysql_fetch_array($result)){
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
<?php }
|
||||
}else{
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
$date = $generator->procMtime($row['time']);
|
||||
echo "<a href=\"berichte.php?id=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
}else{ ?>
|
||||
<tr>
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php }} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
else if (!$basearray['occupied']) {
|
||||
}else if (!$basearray['occupied']) {
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="distribution" class="tableNone">
|
||||
|
||||
@@ -232,7 +252,7 @@ else if (!$basearray['occupied']) {
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep">
|
||||
<table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep">
|
||||
<thead><tr>
|
||||
<th>Reports:</th>
|
||||
</tr></thead>
|
||||
@@ -244,6 +264,7 @@ if($session->uid == $database->getVillage($_GET['d'])){
|
||||
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14";
|
||||
}
|
||||
$toWref = $_GET['d'];
|
||||
if($session->alliance!=0){
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
@@ -262,7 +283,27 @@ while($row = mysql_fetch_array($result)){
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
<?php }
|
||||
}else{
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
$date = $generator->procMtime($row['time']);
|
||||
echo "<a href=\"berichte.php?id=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
}else{ ?>
|
||||
<tr>
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php }} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(isset($_GET['s'])){
|
||||
$automation->isWinner();
|
||||
}
|
||||
if($_GET['aid']!=0 or $session->alliance!=0){
|
||||
if($_GET['aid']==0 or $session->alliance!=0){
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.1 KiB |