started to fix defence reports icons and farmlist and fix deleting oasis that you own and links

This commit is contained in:
unknown
2012-04-07 03:41:50 +03:00
parent 634c3406fb
commit bf27475b88
13 changed files with 1294 additions and 11 deletions
+3 -3
View File
@@ -780,7 +780,7 @@ private function loyaltyRegeneration() {
--------------------------------*/
}else{
$Attacker['id'] = $database->getUserField($database->getVillageField($data['from'],"owner"),"id",0);
$Defender['id'] = 3;
$Defender['id'] = 2;
$owntribe = $database->getUserField($database->getVillageField($data['from'],"owner"),"tribe",0);
$targettribe = 4;
@@ -1849,9 +1849,9 @@ private function loyaltyRegeneration() {
}
}
else {
if($unitssend_def[1] == 0 and $unitssend_def[2] == 0 and $unitssend_def[3] == 0 and $unitssend_def[4] == 0 and $unitssend_def[5] == 0 and $unitssend_def[6] == 0){
if($unitssend_def[1] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[2] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[3] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[4] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[5] == '0,0,0,0,0,0,0,0,0,0'){
$database->addNotice($to['owner'],$to['wref'],$targetally,7,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
}else if($totaldead_def == 0){
}else if($totaldead_def == '0,0,0,0,0,0,0,0,0,0'){
$database->addNotice($to['owner'],$to['wref'],$targetally,4,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
}else if($unitssend_def > $totaldead_def){
$database->addNotice($to['owner'],$to['wref'],$targetally,5,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
+60 -1
View File
@@ -576,6 +576,11 @@
}
}
}
function removeOases($wref) {
$q = "UPDATE ".TB_PREFIX."odata SET conqured = 0, owner = 2, name = 'Unoccupied Oasis' WHERE wref = $wref";
return mysql_query($q, $this->connection);
}
/***************************
@@ -2471,9 +2476,63 @@
$q = 'SELECT * FROM `' . TB_PREFIX . 'links` WHERE `userid` = ' . $id . ' ORDER BY `pos` ASC';
return mysql_query($q, $this->connection);
}
function removeLinks($id){
$q = "DELETE FROM " . TB_PREFIX . "links WHERE `id` = ".$id."";
return mysql_query($q, $this->connection);
}
function getArrayMemberVillage($uid){
function getVilFarmlist($wref){
$q = 'SELECT * FROM ' . TB_PREFIX . 'farmlist WHERE wref = ' . $wref . ' ORDER BY wref ASC';
$result = mysql_query($q, $this->connection);
$dbarray = mysql_fetch_array($result);
if($dbarray['id']!=0) {
return true;
} else {
return false;
}
}
function getRaidList($id) {
$q = "SELECT * FROM " . TB_PREFIX . "raidlist WHERE id = ".$id."";
$result = mysql_query($q, $this->connection);
return mysql_fetch_array($result);
}
function delFarmList($id, $owner) {
$q = "DELETE FROM " . TB_PREFIX . "farmlist where id = $id and owner = $owner";
return mysql_query($q, $this->connection);
}
function delSlotFarm($id) {
$q = "DELETE FROM " . TB_PREFIX . "raidlist where id = $id";
return mysql_query($q, $this->connection);
}
function createFarmList($wref, $owner, $name) {
$q = "INSERT INTO " . TB_PREFIX . "farmlist (`wref`, `owner`, `name`) VALUES ('$wref', '$owner', '$name')";
return mysql_query($q, $this->connection);
}
function addSlotFarm($lid, $towref, $x, $y, $distance, $t1, $t2, $t3, $t4, $t5, $t6, $t7, $t8, $t9, $t10) {
$q = "INSERT INTO " . TB_PREFIX . "raidlist (`lid`, `towref`, `x`, `y`, `distance`, `t1`, `t2`, `t3`, `t4`, `t5`, `t6`, `t7`, `t8`, `t9`, `t10`) VALUES ('$lid', '$towref', '$x', '$y', '$distance', '$t1', '$t2', '$t3', '$t4', '$t5', '$t6', '$t7', '$t8', '$t9', '$t10')";
return mysql_query($q, $this->connection);
}
function editSlotFarm($eid, $lid, $wref, $x, $y, $dist, $t1, $t2, $t3, $t4, $t5, $t6, $t7, $t8, $t9, $t10) {
$q = "UPDATE " . TB_PREFIX . "raidlist set lid = '$lid', towref = '$wref', x = '$x', y = '$y', t1 = '$t1', t2 = '$t2', t3 = '$t3', t4 = '$t4', t5 = '$t5', t6 = '$t6', t7 = '$t7', t8 = '$t8', t9 = '$t9', t10 = '$t10' WHERE id = $eid";
return mysql_query($q, $this->connection);
}
function getArrayMemberVillage($uid){
$q = 'SELECT a.wref, a.name, b.x, b.y from '.TB_PREFIX.'vdata AS a left join '.TB_PREFIX.'wdata AS b ON b.id = a.wref where owner = '.$uid.' order by capital DESC,pop DESC';
$result = mysql_query($q, $this->connection);
+3 -2
View File
@@ -7,8 +7,9 @@
<div id="textmenu">
<a href="build.php?id=<?php echo $id; ?>">Overview</a> |
<a href="a2b.php">Send troops</a> |
<a href="warsim.php">Combat Simulator</a></div>
<a href="warsim.php">Combat Simulator</a></div> <?php if($session->goldclub==1){ ?>|
<a href="build.php?id=<?php echo $id; ?>&amp;t=99">Farmlist</a>
<?php } ?>
<?php
$units_type = $database->getMovement("34",$village->wid,1);
+49
View File
@@ -0,0 +1,49 @@
<h1 class="titleInHeader">اردوگاه <span class="level">سطح <?php echo $village->resarray['f'.$id]; ?></span></h1>
<div id="build" class="gid16">
<div class="build_desc">
<a href="#" onClick="return Travian.Game.iPopup(16,4);" class="build_logo">
<img class="g16 big white" src="img/x.gif" alt="اردوگاه" title="اردوگاه" />
</a>
لشکریان دهکده‌ی شما در این محل جمع می شوند. از اینجا شما قادر به ارسال آنها برای غارت، حمله، تسخیر و یا پشتیبانی دهکده های دیگر می باشید.</div>
<?php include("upgrade.tpl"); ?>
<div class="contentNavi tabNavi">
<div class="container normal">
<div class="background-start">&nbsp;</div>
<div class="background-end">&nbsp;</div>
<div class="content"><a href="build.php?id=<?php echo $id; ?>"><span class="tabItem">دیدکلی</span></a></div>
</div>
<div class="container normal">
<div class="background-start">&nbsp;</div>
<div class="background-end">&nbsp;</div>
<div class="content"><a href="a2b.php"><span class="tabItem">لشکرکشی</span></a></div>
</div>
<div class="container normal">
<div class="background-start">&nbsp;</div>
<div class="background-end">&nbsp;</div>
<div class="content"><a href="warsim.php"><span class="tabItem">شبیه ساز جنگی</span></a></div>
</div>
<div class="container active">
<div class="background-start">&nbsp;</div>
<div class="background-end">&nbsp;</div>
<div class="content"><a href="build.php?id=39&amp;t=99"><span class="tabItem">لیست فارم ها</span></a></div>
</div>
</div>
<div id="raidList">
<?php if(!$session->goldclub) { ?>
<div class="options">
<div id="spaceUsed">
<div class="boxes boxesColor gray"><div class="boxes-tl"></div><div class="boxes-tr"></div><div class="boxes-tc"></div><div class="boxes-ml"></div><div class="boxes-mr"></div><div class="boxes-mc"></div><div class="boxes-bl"></div><div class="boxes-br"></div><div class="boxes-bc"></div><div class="boxes-contents"> لیست فارم یکی از امکانات کلوپ طلایی می باشد و نیازی به پرداخت هزینۀ دیگری برای فعال سازی ان نیست. </div>
</div>
<div class="clear"></div>
</div>
<a class="arrow" href="plus.php?id=3#goldclub">عضو کلوپ طلایی شوید</a>
</div>
<?php
}else{ include "Templates/goldClub/farmlist.tpl"; }
?>
</div>
</div>
+5 -2
View File
@@ -3,7 +3,10 @@
Copyright: Travianx Project */
$oasisarray = $database->getOasis($village->wid);
if($_GET['gid']==37 && isset($_GET['del'])){
$database->removeOases($_GET['del']);
header("Location: build.php?id=".$id."&land");
}
?>
<table id="oases" cellpadding="1" cellspacing="1">
<thead><tr>
@@ -24,7 +27,7 @@
?>
<tr>
<td class="nam">
<!-- a href="build.php?a=37&gid=37&c=016&del=374&land" --><img class="del" src="img/x.gif" alt="delete" title="delete"></a>
<a href="build.php?gid=37&c=<?php echo $generator->getMapCheck($oasisarray[$i]['wref']); ?>&del=<?php echo $oasisarray[$i]['wref']; ?>&land"><img class="del" src="img/x.gif" alt="delete" title="delete"></a>
<a href="karte.php?d=<?php echo $oasisarray[$i]['wref']; ?>&c=<?php echo $generator->getMapCheck($oasisarray[$i]['wref']) ?>"><?php echo $oasisarray[$i]['name']; ?></a>
</td>
<td class="aligned_coords">
+11 -3
View File
@@ -1,4 +1,8 @@
<?php
if(isset($_GET['del'])){
$database->removeLinks($_GET['del']);
header("Location: spieler.php?s=2");
}
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -90,10 +94,10 @@ while($data = mysql_fetch_assoc($query)) {
<table cellpadding="1" cellspacing="1" id="links">
<thead>
<tr>
<th><img class="help" src="img/x.gif" /></th>
<th colspan="2">Direct links</th>
<th colspan="4">Direct links</th>
</tr>
<tr>
<td>Delete</td>
<td>No.</td>
<td>Link name</td>
<td>Link target</td>
@@ -102,18 +106,22 @@ while($data = mysql_fetch_assoc($query)) {
<tbody>
<?php $i = 0; foreach($links as $link): ?>
<tr>
<td>
<a href="spieler.php?del=<?php echo $link['id']; ?>&s=2"><img class="del" src="img/x.gif" alt="delete" title="delete"></a>
</td>
<td class="nr"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="nr<?php print $i; ?>" value="<?php print $link['pos']; ?>" size="1" maxlength="3" /><input type="hidden" name="id<?php print $i; ?>" value="<?php print $link['id']; ?>" /></td>
<td class="nam"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkname<?php print $i; ?>" value="<?php print $link['name']; ?>" maxlength="30" /></td>
<td class="link"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkziel<?php print $i; ?>" value="<?php print $link['url']; ?>" maxlength="255" /></td>
</tr>
<?php ++$i; $last_pos = $link['pos']; endforeach; ?>
<tr>
<td></td>
<td class="nr"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="nr<?php print $i; ?>" value="<?php print ($last_pos + 1); ?>" size="1" maxlength="3"></td>
<td class="nam"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkname<?php print $i; ?>" value="" maxlength="30"></td>
<td class="link"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkziel<?php print $i; ?>" value="" maxlength="255"></td>
</tr>
<tr>
<td colspan="3"><input type="image" value="" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></td>
<td colspan="4"><input type="image" value="" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></td>
</tr>
</tbody>
</table>
+372
View File
@@ -0,0 +1,372 @@
<?php
if(isset($_GET['t'])==99 && isset($_GET['action'])==0) {
if(isset($_GET['t'])==99 && isset($_POST['action'])=='addList'){
$database->createFarmList($_POST['did'], $session->uid, $_POST['name']);
}
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."farmlist WHERE owner = $session->uid ORDER BY wref = $village->wid DESC");
$query = mysql_num_rows($sql);
while($row = mysql_fetch_array($sql)){
$lid = $row["id"];
$lname = $row["name"];
$lowner = $row["owner"];
$lwref = $row["wref"];
$lvname = $database->getVillageField($row["wref"], 'name');
if($lwref == $village->wid){
?>
<div id="list<?php echo $lid; ?>" class="listEntry">
<form action="startRaid.php?id=39&t=99&action=startRaid" method="post">
<input type="hidden" name="action" value="startRaid">
<input type="hidden" name="a" value="c35">
<input type="hidden" name="sort" value="distance">
<input type="hidden" name="tribe" value="<?php echo $session->tribe; ?>">
<input type="hidden" name="direction" value="asc">
<input type="hidden" name="lid" value="<?php echo $lid; ?>">
<div class="round spacer listTitle" onclick="Travian.Game.RaidList.toggleList(<?php echo $lid; ?>);">
<div class="listTitleText">
<img alt="del" class="del" src="img/x.gif" onclick="
'واقعاً حذف شود؟'.dialog(
{
onOkay: function(dialog, contentElement)
{
window.location = 'build.php?id=39&amp;t=99&amp;action=deleteList&amp;lid=<?php echo $lid; ?>';
}
});
event.stop();
">
<?php echo $lvname; ?> - <?php echo $lname; ?>
<img alt="بارگذاری..." class="loading hide" src="img/x.gif" align="absmiddle">
</div>
<div class="openedClosedSwitch switchOpened">
جزئیات </div>
<div class="clear"></div>
</div>
<div class="listContent ">
<div class="detail">
<table class="list" cellpadding="1" cellspacing="1">
<thead>
<tr>
<td class="checkbox edit"></td>
<td class="village sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'village');">دهکده</td>
<td class="ew sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'ew');">جمعیت</td>
<td class="distance sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'distance');">فاصله</td>
<td class="troops sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'troops');">لشکریان</td>
<td class="lastRaid sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'lastRaid');">آخرین غارت</td>
<td class="action"></td>
</tr>
</thead>
<tbody>
<?php
$sql2 = mysql_query("SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = $lid ORDER BY distance ASC");
$query2 = mysql_num_rows($sql2);
if($query2 == 0) {
echo '<td class="noData" colspan="7">هیچ غارتی افزوده نشده است.</td>';
}else{
while($row = mysql_fetch_array($sql2)){
$id= $row['id'];$lid = $row['lid'];$towref = $row['towref'];$x = $row['x'];$y = $row['y'];
if($village->wid == $towref){
$distance = '0';
}else{
$distance = $row['distance'];
}
$t1 = $row['t1'];$t2 = $row['t2'];$t3 = $row['t3'];$t4 = $row['t4'];$t5 = $row['t5'];$t6 = $row['t6'];$t7 = $row['t7'];
$t8 = $row['t8'];$t9 = $row['t9'];$t10 = $row['t10'];
$vdata = $database->getVillage($towref);
?>
<tr class="slotRow">
<td class="checkbox">
<input id="slot<?php echo $id; ?>" name="slot[<?php echo $id; ?>]" type="checkbox" class="markSlot" onclick="Travian.Game.RaidList.markSlotForRaid(<?php echo $lid; ?>, <?php echo $id; ?>, this.checked);">
</td>
<td class="village">
<?php
$incoming_attacks = $database->getMovement(3,$towref,1);
$att = '';
if (count($incoming_attacks) > 0) {
$inc_atts = count($incoming_attacks);
if($incoming_attacks[$i]['attack_type'] == 2) {
$inc_atts -= 1;
}
if($inc_atts > 0) {
echo '<img class="att2" src="img/x.gif" title="نیروی مهاجم خودی" />';
}
}
?>
<label for="slot<?php echo $id; ?>">
<?php
$type = $database->getVillageType2($towref);
$oasistype = $type['oasistype'];
if($oasistype != 0){
?>
<span class="coordinates coordinatesWithText">
<span class="coordText">آبادی</span>
<span class="coordinatesWrapper">
<span class="coordinateY"><?php echo $y; ?>)</span>
<span class="coordinatePipe">|</span>
<span class="coordinateX">(<?php echo $x; ?></span>
</span></span>
<?php }else{ ?>
<span class="coordinates coordinatesWithText">
<span class="coordText"><?php echo $vdata['name']; ?></span>
</span>
<?php } ?>
<span class="clear"></span>
</label>
</td>
<td class="ew"><?php echo $vdata['pop']; ?></td>
<td class="distance"><?php echo $distance; ?></td>
<td class="troops">
<?php
if($session->tribe == 1){
if($t1 != 0){
echo '<div class="troopIcon"><img class="unit u1" title="'.U1.'" src="img/x.gif"><span class="troopIconAmount">'.$t1.'</span></div>'; }
if($t2 != 0){
echo '<div class="troopIcon"><img class="unit u2" title="'.U2.'" src="img/x.gif"><span class="troopIconAmount">'.$t2.'</span></div>'; }
if($t3 != 0){
echo '<div class="troopIcon"><img class="unit u3" title="'.U3.'" src="img/x.gif"><span class="troopIconAmount">'.$t3.'</span></div>'; }
if($t4 != 0){
echo '<div class="troopIcon"><img class="unit u4" title="'.U4.'" src="img/x.gif"><span class="troopIconAmount">'.$t4.'</span></div>'; }
if($t5 != 0){
echo '<div class="troopIcon"><img class="unit u5" title="'.U5.'" src="img/x.gif"><span class="troopIconAmount">'.$t5.'</span></div>'; }
if($t6 != 0){
echo '<div class="troopIcon"><img class="unit u6" title="'.U6.'" src="img/x.gif"><span class="troopIconAmount">'.$t6.'</span></div>'; }
if($t7 != 0){
echo '<div class="troopIcon"><img class="unit u7" title="'.U7.'" src="img/x.gif"><span class="troopIconAmount">'.$t7.'</span></div>'; }
if($t8 != 0){
echo '<div class="troopIcon"><img class="unit u8" title="'.U8.'" src="img/x.gif"><span class="troopIconAmount">'.$t8.'</span></div>'; }
if($t9 != 0){
echo '<div class="troopIcon"><img class="unit u9" title="'.U9.'" src="img/x.gif"><span class="troopIconAmount">'.$t9.'</span></div>'; }
if($t10 != 0){
echo '<div class="troopIcon"><img class="unit u10" title="'.U10.'" src="img/x.gif"><span class="troopIconAmount">'.$t10.'</span></div>'; }
}elseif($session->tribe == 2){
if($t1 != 0){
echo '<div class="troopIcon"><img class="unit u11" title="'.U11.'" src="img/x.gif"><span class="troopIconAmount">'.$t1.'</span></div>'; }
if($t2 != 0){
echo '<div class="troopIcon"><img class="unit u12" title="'.U12.'" src="img/x.gif"><span class="troopIconAmount">'.$t2.'</span></div>'; }
if($t3 != 0){
echo '<div class="troopIcon"><img class="unit u13" title="'.U13.'" src="img/x.gif"><span class="troopIconAmount">'.$t3.'</span></div>'; }
if($t4 != 0){
echo '<div class="troopIcon"><img class="unit u14" title="'.U14.'" src="img/x.gif"><span class="troopIconAmount">'.$t4.'</span></div>'; }
if($t5 != 0){
echo '<div class="troopIcon"><img class="unit u15" title="'.U15.'" src="img/x.gif"><span class="troopIconAmount">'.$t5.'</span></div>'; }
if($t6 != 0){
echo '<div class="troopIcon"><img class="unit u16" title="'.U16.'" src="img/x.gif"><span class="troopIconAmount">'.$t6.'</span></div>'; }
if($t7 != 0){
echo '<div class="troopIcon"><img class="unit u17" title="'.U17.'" src="img/x.gif"><span class="troopIconAmount">'.$t7.'</span></div>'; }
if($t8 != 0){
echo '<div class="troopIcon"><img class="unit u18" title="'.U18.'" src="img/x.gif"><span class="troopIconAmount">'.$t8.'</span></div>'; }
if($t9 != 0){
echo '<div class="troopIcon"><img class="unit u19" title="'.U19.'" src="img/x.gif"><span class="troopIconAmount">'.$t9.'</span></div>'; }
if($t10 != 0){
echo '<div class="troopIcon"><img class="unit u20" title="'.U20.'" src="img/x.gif"><span class="troopIconAmount">'.$t10.'</span></div>'; }
}elseif($session->tribe == 3){
if($t1 != 0){
echo '<div class="troopIcon"><img class="unit u21" title="'.U21.'" src="img/x.gif"><span class="troopIconAmount">'.$t1.'</span></div>'; }
if($t2 != 0){
echo '<div class="troopIcon"><img class="unit u22" title="'.U22.'" src="img/x.gif"><span class="troopIconAmount">'.$t2.'</span></div>'; }
if($t3 != 0){
echo '<div class="troopIcon"><img class="unit u23" title="'.U23.'" src="img/x.gif"><span class="troopIconAmount">'.$t3.'</span></div>'; }
if($t4 != 0){
echo '<div class="troopIcon"><img class="unit u24" title="'.U24.'" src="img/x.gif"><span class="troopIconAmount">'.$t4.'</span></div>'; }
if($t5 != 0){
echo '<div class="troopIcon"><img class="unit u25" title="'.U25.'" src="img/x.gif"><span class="troopIconAmount">'.$t5.'</span></div>'; }
if($t6 != 0){
echo '<div class="troopIcon"><img class="unit u26" title="'.U26.'" src="img/x.gif"><span class="troopIconAmount">'.$t6.'</span></div>'; }
if($t7 != 0){
echo '<div class="troopIcon"><img class="unit u27" title="'.U27.'" src="img/x.gif"><span class="troopIconAmount">'.$t7.'</span></div>'; }
if($t8 != 0){
echo '<div class="troopIcon"><img class="unit u28" title="'.U28.'" src="img/x.gif"><span class="troopIconAmount">'.$t8.'</span></div>'; }
if($t9 != 0){
echo '<div class="troopIcon"><img class="unit u29" title="'.U29.'" src="img/x.gif"><span class="troopIconAmount">'.$t9.'</span></div>'; }
if($t10 != 0){
echo '<div class="troopIcon"><img class="unit u30" title="'.U30.'" src="img/x.gif"><span class="troopIconAmount">'.$t10.'</span></div>'; }
}
?>
</td>
<td class="lastRaid">
<?php
$noticeClass = array("گزارش جاسوسی","پیروزی در حمله بدون تلفات.","پیروزی در حمله با تلفات.","شکست در حمله با تلفات.","پیروزی در دفاع بدون تلفات.","پیروزی در دفاع با تلفات.","شکست در دفاع با تلفات.","شکست در دفاع بدون تلفات","نیروی کمکی","","تاجران بیشتر چوب مبادله کردند.","تاجران بیشتر خشت مبادله کردند.","تاجران بیشتر آهن مبادله کردند.","تاجران بیشتر گندم مبادله کردند.","","حمله به نیروی کمکی");
$limits = "ntype!=4 and ntype!=5 and ntype!=6 and ntype!=7";
$getnotice = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE $limits AND toWref = ".$towref." ORDER BY time DESC Limit 1");
while($row2 = mysql_fetch_array($getnotice)){
$dataarray = explode(",",$row2['data']);
$type2 = $row2['ntype'];
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row2['ntype']."\" title=\"".$noticeClass[$type2]."\"> ";
$allres = ($dataarray[25]+$dataarray[26]+$dataarray[27]+$dataarray[28]);
$carry = $dataarray[29];
if ($dataarray[25]+$dataarray[26]+$dataarray[27]+$dataarray[28] == 0) {
echo "<img title=\"غنائم: ".$allres." منابع. حداکثر ظرفیت: ".$carry." منابع.\" src=\"img/x.gif\" class=\"carry empty\">";
} elseif ($dataarray[25]+$dataarray[26]+$dataarray[27]+$dataarray[28] != $dataarray[29]) {
echo "<img title=\"غنائم: ".$allres." منابع. حداکثر ظرفیت: ".$carry." منابع.\" src=\"img/x.gif\" class=\"carry half\">";
} else {
echo "<img title=\"غنائم: ".$allres." منابع. حداکثر ظرفیت: ".$carry." منابع.\" src=\"img/x.gif\" class=\"carry full\">";
}
$date = $generator->procMtime($row2['time']);
echo "<a href=\"berichte.php?id=".$row2['id']."\">".$date[0]." ".date('H:i',$row2['time'])."</a> ";
}
?>
<div class="clear"></div>
</td>
<td class="action">
<a class="arrow" href="#" onclick="Travian.Game.RaidList.editSlot(<?php echo $lid; ?>, <?php echo $id; ?>); return false;">ویرایش</a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="markAll">
<input type="checkbox" id="raidListMarkAll<?php echo $lid; ?>" class="markAll" onclick="Travian.Game.RaidList.markAllSlotsOfAListForRaid(<?php echo $lid; ?>, this.checked);">
<label for="raidListMarkAll<?php echo $lid; ?>">انتخاب همه</label>
</div>
<div class="addSlot">
<button type="button" value="افزودن" onclick="Travian.Game.RaidList.addSlot(<?php echo $lid; ?>);"><div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">افزودن</div></div></button> </div>
</div>
<div class="clear"></div>
<div class="troopSelection">
<?php
$start = ($session->tribe-1)*10+1;
$end = ($session->tribe*10);
$un = 1;
for($i=$start;$i<=$end;$i++){
echo '<span class="troopSelectionUnit">
<img class="unit u'.$i.'" title="'.$technology->unarray[$i].'" src="img/x.gif">
<span class="troopSelectionValue">0</span>
</span>';
}
?>
<div class="clear"></div>
</div>
<button type="submit" value="آغاز غارت"><div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">آغاز غارت</div></div></button> </div>
</form>
</div>
<?php }else{ ?>
<div id="list<?php echo $lid; ?>" class="listEntry">
<div class="round spacer listTitle" onclick="Travian.Game.RaidList.toggleList(<?php echo $lid; ?>);">
<div class="listTitleText">
<img alt="del" class="del" src="img/x.gif" onclick="
'واقعاً حذف شود؟'.dialog(
{
onOkay: function(dialog, contentElement)
{
window.location = 'build.php?gid=16&amp;t=99&amp;action=deleteList&amp;lid=<?php echo $lid; ?>';
}
});
event.stop();
">
<?php echo $lvname; ?> - <?php echo $lname; ?>
<img alt="بارگذاری..." class="loading hide" src="img/x.gif" align="absmiddle">
</div>
<div class="openedClosedSwitch switchClosed">جزئیات</div>
<div class="clear"></div>
</div>
<div class="listContent hide">
</div>
</div>
<?php } }?>
<div class="options">
<a class="arrow" href="build.php?gid=16&t=99&action=addList">ایجاد لیست جدید</a>
</div>
<?php
}
$getUnit = $database->getUnit($village->wid);
if($session->tribe==1){
$unit1 = $getUnit['u1'];$unit2 = $getUnit['u2'];$unit3 = $getUnit['u3'];$unit4 = $getUnit['u4'];$unit5 = $getUnit['u5'];
$unit6 = $getUnit['u6'];$unit7 = $getUnit['u7'];$unit8 = $getUnit['u8'];$unit9 = $getUnit['u9'];$unit10 = $getUnit['u10'];
}elseif($session->tribe==2){
$unit1 = $getUnit['u11'];$unit2 = $getUnit['u12'];$unit3 = $getUnit['u13'];$unit4 = $getUnit['u14'];$unit5 = $getUnit['u15'];
$unit6 = $getUnit['u16'];$unit7 = $getUnit['u17'];$unit8 = $getUnit['u18'];$unit9 = $getUnit['u19'];$unit10 = $getUnit['u20'];
}elseif($session->tribe==3){
$unit1 = $getUnit['u21'];$unit2 = $getUnit['u22'];$unit3 = $getUnit['u23'];$unit4 = $getUnit['u24'];$unit5 = $getUnit['u25'];
$unit6 = $getUnit['u26'];$unit7 = $getUnit['u27'];$unit8 = $getUnit['u28'];$unit9 = $getUnit['u29'];$unit10 = $getUnit['u30'];
}
?>
<?php
if(!$database->getVilFarmlist($village->wid)){
?>
<script type="text/javascript">
window.addEvent('domready', function()
{
Travian.Game.RaidList.setData([]);
});
</script>
<?php }else{ ?>
<script type="text/javascript">
window.addEvent('domready', function()
{
Travian.Game.RaidList.setData({
<?php
$result = mysql_query('SELECT * FROM '.TB_PREFIX.'farmlist WHERE wref = '.$village->wid.'');
$query1 = mysql_num_rows($result);
$NUM1 = 1;
while($row = mysql_fetch_array($result)){
$lid = $row['id'];
?>
"<?php echo $lid; ?>":{
"troops":{"1":<?php echo $unit1; ?>,"2":<?php echo $unit2; ?>,"3":<?php echo $unit3; ?>,"4":<?php echo $unit4; ?>,"5":<?php echo $unit5; ?>,"6":<?php echo $unit6; ?>,"7":<?php echo $unit7; ?>,"8":<?php echo $unit8; ?>,"9":<?php echo $unit9; ?>,"10":<?php echo $unit10; ?>,"11":<?php echo $getUnit['hero']; ?>},
"directions":{"village":"none","ew":"none","distance":"asc","troops":"none","lastRaid":"none"},
"slots":{<?php
$result3 = mysql_query('SELECT * FROM '.TB_PREFIX.'raidlist WHERE lid = '.$lid.'');
$query2 = mysql_num_rows($result3);
$NUM2 = 1;
while($row3 = mysql_fetch_array($result3)){
$id = $row3['id'];
$t1 = $row3['t1'];$t2 = $row3['t2'];$t3 = $row3['t3'];$t4 = $row3['t4'];$t5 = $row3['t5'];$t6 = $row3['t6'];$t7 = $row3['t7'];
$t8 = $row3['t8'];$t9 = $row3['t9'];$t10 = $row3['t10'];
echo '
"'.$id.'":{"troops":{"1":'.$t1.',"2":'.$t2.',"3":'.$t3.',"4":'.$t4.',"5":'.$t5.',"6":'.$t6.',"7":'.$t7.',"8":'.$t8.',"9":'.$t9.',"10":'.$t10.',"11":0}}';
if($NUM2 != $query2){
echo ',';
}
$NUM2++;
}
echo '
}
}';
if($NUM1 != $query1){
echo ',
';
}
$NUM1++;
}
?>
});
(new Fx.Scroll(window,{
duration: 100
})).toElement('list<?php echo $lid2; ?>');
});
</script>
<?php } ?>
+40
View File
@@ -0,0 +1,40 @@
<div id="raidListCreate">
<h4>ایجاد لیست جدید</h4>
<form action="build.php?gid=16&t=99" method="post">
<div class="boxes boxesColor gray"><div class="boxes-tl"></div><div class="boxes-tr"></div><div class="boxes-tc"></div><div class="boxes-ml"></div><div class="boxes-mr"></div><div class="boxes-mc"></div><div class="boxes-bl"></div><div class="boxes-br"></div><div class="boxes-bc"></div><div class="boxes-contents cf">
<input type="hidden" name="action" value="addList">
<table cellpadding="1" cellspacing="1" class="transparent">
<tbody><tr>
<th>
نام: </th>
<td>
<input class="text" id="name" name="name" type="text">
</td>
</tr>
<tr>
<th>
دهکده: </th>
<td>
<select id="did" name="did">
<?php
for($i=1;$i<=count($session->villages);$i++) {
if($session->villages[$i-1] == $village->wid){
$select = 'selected="selected"';
}else{
$select = '';
}
echo "<option value=\"".$session->villages[$i-1]."\" ".$select.">".$database->getVillageField($session->villages[$i-1],'name')."</option>";
}
?> </select>
</td>
</tr>
</tbody></table>
</div>
</div>
<button type="submit" value="ایجاد"><div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">ایجاد</div></div></button>
</form>
</div>
+202
View File
@@ -0,0 +1,202 @@
<?php
if(isset($_POST['action']) == 'addSlot' && $_POST['lid']) {
$troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+".$_POST['t5']."+".$_POST['t6']."+".$_POST['t7']."+".$_POST['t8']."+".$_POST['t9']."+".$_POST['t10']."";
if($_POST['x'] && $_POST['y']){
$Wref = $database->getVilWref($_POST['y'], $_POST['x']);
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
}
if(!$_POST['x'] && !$_POST['y']){
$errormsg .= "مختصات را وارد کنید.";
}elseif(!$_POST['x'] || !$_POST['y']){
$errormsg .= "مختصات را صحیح وارد کنید.";
}elseif($oasistype == 0 && $vdata == 0){
$errormsg .= "در این مختصات دهکده ای وجود ندارد.";
}elseif($troops == 0){
$errormsg .= "هیچ نیرویی انتخاب نشده.";
}else{
$Wref = $database->getVilWref($_POST['y'], $_POST['x']);
$coor = $database->getCoor($village->wid);
function getDistance($coorx1, $coory1, $coorx2, $coory2) {
$max = 2 * WORLD_MAX + 1;
$x1 = intval($coorx1);
$y1 = intval($coory1);
$x2 = intval($coorx2);
$y2 = intval($coory2);
$distanceX = min(abs($x2 - $x1), abs($max - abs($x2 - $x1)));
$distanceY = min(abs($y2 - $y1), abs($max - abs($y2 - $y1)));
$dist = sqrt(pow($distanceX, 2) + pow($distanceY, 2));
return round($dist, 1);
}
$distance = getDistance($coor['x'], $coor['y'], $_POST['y'], $_POST['x']);
$database->addSlotFarm($_POST['lid'], $Wref, $_POST['x'], $_POST['y'], $distance, $_POST['t1'], $_POST['t2'], $_POST['t3'], $_POST['t4'], $_POST['t5'], $_POST['t6'], $_POST['t7'], $_POST['t8'], $_POST['t9'], $_POST['t10']);
header("Location: build.php?id=39&t=99");
}
}
?>
<script type="text/javascript">
var targets = {};
function fillTargets()
{
var targetId = $('target_id');
targetId.empty();
var option = new Element('option',
{
'html': 'دهکده‌ای انتخاب کنید'
});
targetId.insert(option);
$each(targets[lid], function(data)
{
var option = new Element('option',
{
'value': data.did,
'html': data.name
});
targetId.insert(option);
});
}
function getTargetsByLid()
{
var lidSelect = $('lid');
lid = lidSelect.getSelected()[0].value;
if (targets[lid])
{
fillTargets();
}
else
{
Travian.ajax(
{
data:
{
cmd: 'raidListTargets',
'lid': lid
},
onSuccess: function(data)
{
targets[data.lid] = data.targets;
fillTargets();
}
});
}
}
function selectCoordinates()
{
var targetId = $('target_id');
var did = targetId.getSelected()[0].value;
if (did == '')
{
$('xCoordInput').value = '';
$('yCoordInput').value = '';
}
else
{
var array;
$each(targets[lid], function(data)
{
if (data.did == did)
{
array = data;
return;
}
});
$('xCoordInput').value = array.x;
$('yCoordInput').value = array.y;
}
}
var lid = <?php echo $_GET['lid']; ?>;targets[lid] = {};
</script>
<div id="raidListSlot">
<h4>افزودن غارت</h4>
<font color="#FF0000"><b>
<?php echo $errormsg; ?>
</b></font>
<form action="build.php?id=39&t=99&action=showSlot&lid=<?php echo $_GET['lid']; ?>" method="post">
<div class="boxes boxesColor gray"><div class="boxes-tl"></div><div class="boxes-tr"></div><div class="boxes-tc"></div><div class="boxes-ml"></div><div class="boxes-mr"></div><div class="boxes-mc"></div><div class="boxes-bl"></div><div class="boxes-br"></div><div class="boxes-bc"></div><div class="boxes-contents cf">
<input type="hidden" name="action" value="addSlot">
<input type="hidden" name="lid" value="<?php echo $_GET['lid']; ?>">
<table cellpadding="1" cellspacing="1" class="transparent">
<tbody><tr>
<th>لیست فارم‌ها:</th>
<td>
<select onchange="getTargetsByLid();" id="lid" name="lid">
<?php
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."farmlist WHERE owner = $session->uid ORDER BY name ASC");
while($row = mysql_fetch_array($sql)){
$lid = $row["id"];
$lname = $row["name"];
$lowner = $row["owner"];
$lwref = $row["wref"];
$lvname = $database->getVillageField($row["wref"], 'name');
if($_GET['lid']==$lid){
$selected = 'selected=""';
}else{ $selected = ''; }
echo '<option value="'.$lid.'" '.$selected.'>'.$lvname.' - '.$lname.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<th>هدفی انتخاب کنید:</th>
<td class="target">
<div class="coordinatesInput">
<div class="xCoord">
<label for="xCoordInput">X:</label>
<input value="<?php echo $_POST['x']; ?>" name="x" id="xCoordInput" class="text coordinates x ">
</div>
<div class="yCoord">
<label for="yCoordInput">Y:</label>
<input value="<?php echo $_POST['y']; ?>" name="y" id="yCoordInput" class="text coordinates y ">
</div>
<div class="clear"></div>
</div>
<div class="targetSelect">
<label class="lastTargets" for="last_targets">آخرین هدف‌ها:</label>
<select id="target_id" name="target_id" onchange="selectCoordinates()">
<option value="">دهکده‌ای انتخاب کنید</option>
</select>
</div>
<div class="clear"></div>
</td>
</tr>
</tbody></table>
</div>
</div>
<?php include "Templates/goldClub/trooplist2.tpl"; ?>
<button type="submit" value="ذخیره" name="save" id="save"><div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">ذخیره</div></div></button>
</form>
</div>
+219
View File
@@ -0,0 +1,219 @@
<?php
if(isset($_GET['action']) == 'editSlot' && $_GET['eid']) {
$eiddata = $database->getRaidList($_GET['eid']);
$x = $eiddata['x'];
$y = $eiddata['y'];
$t1 = $eiddata['t1'];$t2 = $eiddata['t2'];$t3 = $eiddata['t3'];$t4 = $eiddata['t4'];$t5 = $eiddata['t5'];$t6 = $eiddata['t6'];$t7 = $eiddata['t7'];$t8 = $eiddata['t8'];$t9 = $eiddata['t9'];$t10 = $eiddata['t10'];
}
if(isset($_POST['action']) == 'editSlot' && $_POST['eid']) {
$Wref = $database->getVilWref($_POST['y'], $_POST['x']);
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
$troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+".$_POST['t5']."+".$_POST['t6']."+".$_POST['t7']."+".$_POST['t8']."+".$_POST['t9']."+".$_POST['t10']."";
if(!$_POST['x'] && !$_POST['y']){
$errormsg .= "مختصات را وارد کنید.";
}elseif(!$_POST['x'] || !$_POST['y']){
$errormsg .= "مختصات را صحیح وارد کنید.";
}elseif($oasistype == 0 && $vdata == 0){
$errormsg .= "در این مختصات دهکده ای وجود ندارد.";
}elseif($troops == 0){
$errormsg .= "هیچ نیرویی انتخاب نشده.";
}else{
$Wref = $database->getVilWref($_POST['y'], $_POST['x']);
$coor = $database->getCoor($village->wid);
function getDistance($coorx1, $coory1, $coorx2, $coory2) {
$max = 2 * WORLD_MAX + 1;
$x1 = intval($coorx1);
$y1 = intval($coory1);
$x2 = intval($coorx2);
$y2 = intval($coory2);
$distanceX = min(abs($x2 - $x1), abs($max - abs($x2 - $x1)));
$distanceY = min(abs($y2 - $y1), abs($max - abs($y2 - $y1)));
$dist = sqrt(pow($distanceX, 2) + pow($distanceY, 2));
return round($dist, 1);
}
$distance = getDistance($coor['x'], $coor['y'], $_POST['y'], $_POST['x']);
$database->editSlotFarm($_GET['eid'], $_POST['lid'], $Wref, $_POST['x'], $_POST['y'], $distance, $_POST['t1'], $_POST['t2'], $_POST['t3'], $_POST['t4'], $_POST['t5'], $_POST['t6'], $_POST['t7'], $_POST['t8'], $_POST['t9'], $_POST['t10']);
header("Location: build.php?id=39&t=99");
}
}
?>
<script type="text/javascript">
var targets = {};
function fillTargets()
{
var targetId = $('target_id');
targetId.empty();
var option = new Element('option',
{
'html': 'دهکده‌ای انتخاب کنید'
});
targetId.insert(option);
$each(targets[lid], function(data)
{
var option = new Element('option',
{
'value': data.did,
'html': data.name
});
targetId.insert(option);
});
}
function getTargetsByLid()
{
var lidSelect = $('lid');
lid = lidSelect.getSelected()[0].value;
if (targets[lid])
{
fillTargets();
}
else
{
Travian.ajax(
{
data:
{
cmd: 'raidListTargets',
'lid': lid
},
onSuccess: function(data)
{
targets[data.lid] = data.targets;
fillTargets();
}
});
}
}
function selectCoordinates()
{
var targetId = $('target_id');
var did = targetId.getSelected()[0].value;
if (did == '')
{
$('xCoordInput').value = '';
$('yCoordInput').value = '';
}
else
{
var array;
$each(targets[lid], function(data)
{
if (data.did == did)
{
array = data;
return;
}
});
$('xCoordInput').value = array.x;
$('yCoordInput').value = array.y;
}
}
var lid = <?php echo $_GET['lid']; ?>;targets[lid] = {};
</script>
<div id="raidListSlot">
<h4>افزودن غارت</h4>
<font color="#FF0000"><b>
<?php echo $errormsg; ?>
</b></font>
<form id="edit_form" action="build.php?id=39&t=99&action=showSlot&eid=<?php echo $_GET['eid']; ?>" method="post">
<div class="boxes boxesColor gray"><div class="boxes-tl"></div><div class="boxes-tr"></div><div class="boxes-tc"></div><div class="boxes-ml"></div><div class="boxes-mr"></div><div class="boxes-mc"></div><div class="boxes-bl"></div><div class="boxes-br"></div><div class="boxes-bc"></div><div class="boxes-contents cf">
<?php
$getlid = $database->getRaidList($_GET["eid"]);
$lid2 = $getlid['lid'];
?>
<input type="hidden" name="action" value="editSlot">
<input type="hidden" name="eid" value="<?php echo $_GET['eid']; ?>">
<input type="hidden" name="lid" value="<?php echo $lid2; ?>">
<table cellpadding="1" cellspacing="1" class="transparent">
<tbody><tr>
<th>لیست فارم‌ها:</th><?php echo $_GET["lid"]; ?>
<td>
<select onchange="getTargetsByLid();" id="lid" name="lid">
<?php
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."farmlist WHERE owner = $session->uid ORDER BY name ASC");
while($row = mysql_fetch_array($sql)){
$lid = $row["id"];
$lname = $row["name"];
$lowner = $row["owner"];
$lwref = $row["wref"];
$lvname = $database->getVillageField($row["wref"], 'name');
if($lid==$lid2){ $selected = 'selected=""'; }else{ $selected = ''; }
echo '<option value="'.$lid.'" '.$selected.'>'.$lvname.' - '.$lname.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<th>هدفی انتخاب کنید:</th>
<td class="target">
<div class="coordinatesInput">
<div class="xCoord">
<label for="xCoordInput">X:</label>
<input value="<?php echo $x; ?>" name="x" id="xCoordInput" class="text coordinates x ">
</div>
<div class="yCoord">
<label for="yCoordInput">Y:</label>
<input value="<?php echo $y; ?>" name="y" id="yCoordInput" class="text coordinates y ">
</div>
<div class="clear"></div>
</div>
<div class="targetSelect">
<label class="lastTargets" for="last_targets">آخرین هدف‌ها:</label>
<select id="target_id" name="target_id" onchange="selectCoordinates()">
<option value="">دهکده‌ای انتخاب کنید</option>
</select>
</div>
<div class="clear"></div>
</td>
</tr>
</tbody></table>
</div>
</div>
<?php include "Templates/goldClub/trooplist.tpl"; ?>
<button type="submit" value="ذخیره" name="save" id="save"><div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">ذخیره</div></div></button>&nbsp;
<button type="button" value="حذف" name="delete" id="delete" onclick="return (function(){
('واقعاً حذف شود؟').dialog(
{
onOkay: function(dialog, contentElement)
{
window.location.href = 'build.php?id=39&t=99&action=deleteSlot&eid=<?php echo $_GET['eid']; ?>'}
});
return false;
})()">
<div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">حذف</div></div></button>
</form>
</div>
+141
View File
@@ -0,0 +1,141 @@
<?php
if($session->tribe == 1){
?>
<div class="troops">
<div class="troopGroup">
<label for="t1"><img class="unit u1" title="<?php echo U1; ?>" src="img/x.gif"></label>
<input class="text troop" id="t1" type="text" name="t1" value="<?php if($t1!=0){ echo $t1; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t2"><img class="unit u2" title="<?php echo U2; ?>" src="img/x.gif"></label>
<input class="text troop" id="t2" type="text" name="t2" value="<?php if($t2!=0){ echo $t2; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t3"><img class="unit u3" title="<?php echo U3; ?>" src="img/x.gif"></label>
<input class="text troop" id="t3" type="text" name="t3" value="<?php if($t3!=0){ echo $t3; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t4"><img class="unit u4" title="<?php echo U4; ?>" src="img/x.gif"></label>
<input class="text troop" id="t4" type="text" value="<?php if($t4!=0){ echo $t4; }else{ echo 0; } ?>" disabled="disabled">
</div>
<div class="troopGroup">
<label for="t5"><img class="unit u5" title="<?php echo U5; ?>" src="img/x.gif"></label>
<input class="text troop" id="t5" type="text" name="t5" value="<?php if($t5!=0){ echo $t5; }else{ echo 0; } ?>">
</div>
<div class="clear"></div>
<div class="troopGroup">
<label for="t6"><img class="unit u6" title="<?php echo U6; ?>" src="img/x.gif"></label>
<input class="text troop" id="t6" type="text" name="t6" value="<?php if($t6!=0){ echo $t6; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t7"><img class="unit u7" title="<?php echo U7; ?>" src="img/x.gif"></label>
<input class="text troop" id="t7" type="text" name="t7" value="<?php if($t7!=0){ echo $t7; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t8"><img class="unit u8" title="<?php echo U8; ?>" src="img/x.gif"></label>
<input class="text troop" id="t8" type="text" name="t8" value="<?php if($t8!=0){ echo $t8; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t9"><img class="unit u9" title="<?php echo U9; ?>" src="img/x.gif"></label>
<input class="text troop" id="t9" type="text" name="t9" value="<?php if($t9!=0){ echo $t9; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t10"><img class="unit u10" title="<?php echo U10; ?>" src="img/x.gif"></label>
<input class="text troop" id="t10" type="text" name="t10" value="<?php if($t10!=0){ echo $t10; }else{ echo 0; } ?>">
</div>
<div class="clear"></div>
</div>
<?php }elseif($session->tribe == 2){ ?>
<div class="troops">
<div class="troopGroup">
<label for="t1"><img class="unit u11" title="<?php echo U11; ?>" src="img/x.gif"></label>
<input class="text troop" id="t1" type="text" name="t1" value="<?php if($t1!=0){ echo $t1; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t2"><img class="unit u12" title="<?php echo U12; ?>" src="img/x.gif"></label>
<input class="text troop" id="t2" type="text" name="t2" value="<?php if($t2!=0){ echo $t2; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t3"><img class="unit u13" title="<?php echo U13; ?>" src="img/x.gif"></label>
<input class="text troop" id="t3" type="text" name="t3" value="<?php if($t3!=0){ echo $t3; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t4"><img class="unit u14" title="<?php echo U14; ?>" src="img/x.gif"></label>
<input class="text troop" id="t4" type="text" value="<?php if($t4!=0){ echo $t4; }else{ echo 0; } ?>" disabled="disabled">
</div>
<div class="troopGroup">
<label for="t5"><img class="unit u15" title="<?php echo U15; ?>" src="img/x.gif"></label>
<input class="text troop" id="t5" type="text" name="t5" value="<?php if($t5!=0){ echo $t5; }else{ echo 0; } ?>">
</div>
<div class="clear"></div>
<div class="troopGroup">
<label for="t6"><img class="unit u16" title="<?php echo U16; ?>" src="img/x.gif"></label>
<input class="text troop" id="t6" type="text" name="t6" value="<?php if($t6!=0){ echo $t6; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t7"><img class="unit u17" title="<?php echo U17; ?>" src="img/x.gif"></label>
<input class="text troop" id="t7" type="text" name="t7" value="<?php if($t7!=0){ echo $t7; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t8"><img class="unit u18" title="<?php echo U18; ?>" src="img/x.gif"></label>
<input class="text troop" id="t8" type="text" name="t8" value="<?php if($t8!=0){ echo $t8; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t9"><img class="unit u19" title="<?php echo U19; ?>" src="img/x.gif"></label>
<input class="text troop" id="t9" type="text" name="t9" value="<?php if($t9!=0){ echo $t9; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t10"><img class="unit u20" title="<?php echo U20; ?>" src="img/x.gif"></label>
<input class="text troop" id="t10" type="text" name="t10" value="<?php if($t10!=0){ echo $t10; }else{ echo 0; } ?>">
</div>
<div class="clear"></div>
</div>
<?php }elseif($session->tribe == 3){ ?>
<div class="troops">
<div class="troopGroup">
<label for="t1"><img class="unit u21" title="<?php echo U21; ?>" src="img/x.gif"></label>
<input class="text troop" id="t1" type="text" name="t1" value="<?php if($t1!=0){ echo $t1; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t2"><img class="unit u22" title="<?php echo U22; ?>" src="img/x.gif"></label>
<input class="text troop" id="t2" type="text" name="t2" value="<?php if($t2!=0){ echo $t2; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t3"><img class="unit u23" title="<?php echo U23; ?>" src="img/x.gif"></label>
<input class="text troop" id="t3" type="text" name="t3" value="<?php if($t3!=0){ echo $t3; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t4"><img class="unit u24" title="<?php echo U24; ?>" src="img/x.gif"></label>
<input class="text troop" id="t4" type="text" value="<?php if($t4!=0){ echo $t4; }else{ echo 0; } ?>" disabled="disabled">
</div>
<div class="troopGroup">
<label for="t5"><img class="unit u25" title="<?php echo U25; ?>" src="img/x.gif"></label>
<input class="text troop" id="t5" type="text" name="t5" value="<?php if($t5!=0){ echo $t5; }else{ echo 0; } ?>">
</div>
<div class="clear"></div>
<div class="troopGroup">
<label for="t6"><img class="unit u26" title="<?php echo U26; ?>" src="img/x.gif"></label>
<input class="text troop" id="t6" type="text" name="t6" value="<?php if($t6!=0){ echo $t6; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t7"><img class="unit u27" title="<?php echo U27; ?>" src="img/x.gif"></label>
<input class="text troop" id="t7" type="text" name="t7" value="<?php if($t7!=0){ echo $t7; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t8"><img class="unit u28" title="<?php echo U28; ?>" src="img/x.gif"></label>
<input class="text troop" id="t8" type="text" name="t8" value="<?php if($t8!=0){ echo $t8; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t9"><img class="unit u29" title="<?php echo U29; ?>" src="img/x.gif"></label>
<input class="text troop" id="t9" type="text" name="t9" value="<?php if($t9!=0){ echo $t9; }else{ echo 0; } ?>">
</div>
<div class="troopGroup">
<label for="t10"><img class="unit u30" title="<?php echo U30; ?>" src="img/x.gif"></label>
<input class="text troop" id="t10" type="text" name="t10" value="<?php if($t10!=0){ echo $t10; }else{ echo 0; } ?>">
</div>
<div class="clear"></div>
</div>
<?php } ?>
+141
View File
@@ -0,0 +1,141 @@
<?php
if($session->tribe == 1){
?>
<div class="troops">
<div class="troopGroup">
<label for="t1"><img class="unit u1" title="<?php echo U1; ?>" src="img/x.gif"></label>
<input class="text troop" id="t1" type="text" name="t1" value="0">
</div>
<div class="troopGroup">
<label for="t2"><img class="unit u2" title="<?php echo U2; ?>" src="img/x.gif"></label>
<input class="text troop" id="t2" type="text" name="t2" value="0">
</div>
<div class="troopGroup">
<label for="t3"><img class="unit u3" title="<?php echo U3; ?>" src="img/x.gif"></label>
<input class="text troop" id="t3" type="text" name="t3" value="0">
</div>
<div class="troopGroup">
<label for="t4"><img class="unit u4" title="<?php echo U4; ?>" src="img/x.gif"></label>
<input class="text troop" id="t4" type="text" value="0" disabled="disabled">
</div>
<div class="troopGroup">
<label for="t5"><img class="unit u5" title="<?php echo U5; ?>" src="img/x.gif"></label>
<input class="text troop" id="t5" type="text" name="t5" value="0">
</div>
<div class="clear"></div>
<div class="troopGroup">
<label for="t6"><img class="unit u6" title="<?php echo U6; ?>" src="img/x.gif"></label>
<input class="text troop" id="t6" type="text" name="t6" value="0">
</div>
<div class="troopGroup">
<label for="t7"><img class="unit u7" title="<?php echo U7; ?>" src="img/x.gif"></label>
<input class="text troop" id="t7" type="text" name="t7" value="0">
</div>
<div class="troopGroup">
<label for="t8"><img class="unit u8" title="<?php echo U8; ?>" src="img/x.gif"></label>
<input class="text troop" id="t8" type="text" name="t8" value="0">
</div>
<div class="troopGroup">
<label for="t9"><img class="unit u9" title="<?php echo U9; ?>" src="img/x.gif"></label>
<input class="text troop" id="t9" type="text" name="t9" value="0">
</div>
<div class="troopGroup">
<label for="t10"><img class="unit u10" title="<?php echo U10; ?>" src="img/x.gif"></label>
<input class="text troop" id="t10" type="text" name="t10" value="0">
</div>
<div class="clear"></div>
</div>
<?php }elseif($session->tribe == 2){ ?>
<div class="troops">
<div class="troopGroup">
<label for="t1"><img class="unit u11" title="<?php echo U11; ?>" src="img/x.gif"></label>
<input class="text troop" id="t1" type="text" name="t1" value="0">
</div>
<div class="troopGroup">
<label for="t2"><img class="unit u12" title="<?php echo U12; ?>" src="img/x.gif"></label>
<input class="text troop" id="t2" type="text" name="t2" value="0">
</div>
<div class="troopGroup">
<label for="t3"><img class="unit u13" title="<?php echo U13; ?>" src="img/x.gif"></label>
<input class="text troop" id="t3" type="text" name="t3" value="0">
</div>
<div class="troopGroup">
<label for="t4"><img class="unit u14" title="<?php echo U14; ?>" src="img/x.gif"></label>
<input class="text troop" id="t4" type="text" value="0" disabled="disabled">
</div>
<div class="troopGroup">
<label for="t5"><img class="unit u15" title="<?php echo U15; ?>" src="img/x.gif"></label>
<input class="text troop" id="t5" type="text" name="t5" value="0">
</div>
<div class="clear"></div>
<div class="troopGroup">
<label for="t6"><img class="unit u16" title="<?php echo U16; ?>" src="img/x.gif"></label>
<input class="text troop" id="t6" type="text" name="t6" value="0">
</div>
<div class="troopGroup">
<label for="t7"><img class="unit u17" title="<?php echo U17; ?>" src="img/x.gif"></label>
<input class="text troop" id="t7" type="text" name="t7" value="0">
</div>
<div class="troopGroup">
<label for="t8"><img class="unit u18" title="<?php echo U18; ?>" src="img/x.gif"></label>
<input class="text troop" id="t8" type="text" name="t8" value="0">
</div>
<div class="troopGroup">
<label for="t9"><img class="unit u19" title="<?php echo U19; ?>" src="img/x.gif"></label>
<input class="text troop" id="t9" type="text" name="t9" value="0">
</div>
<div class="troopGroup">
<label for="t10"><img class="unit u20" title="<?php echo U20; ?>" src="img/x.gif"></label>
<input class="text troop" id="t10" type="text" name="t10" value="0">
</div>
<div class="clear"></div>
</div>
<?php }elseif($session->tribe == 3){ ?>
<div class="troops">
<div class="troopGroup">
<label for="t1"><img class="unit u21" title="<?php echo U21; ?>" src="img/x.gif"></label>
<input class="text troop" id="t1" type="text" name="t1" value="0">
</div>
<div class="troopGroup">
<label for="t2"><img class="unit u22" title="<?php echo U22; ?>" src="img/x.gif"></label>
<input class="text troop" id="t2" type="text" name="t2" value="0">
</div>
<div class="troopGroup">
<label for="t3"><img class="unit u23" title="<?php echo U23; ?>" src="img/x.gif"></label>
<input class="text troop" id="t3" type="text" name="t3" value="0">
</div>
<div class="troopGroup">
<label for="t4"><img class="unit u24" title="<?php echo U24; ?>" src="img/x.gif"></label>
<input class="text troop" id="t4" type="text" value="0" disabled="disabled">
</div>
<div class="troopGroup">
<label for="t5"><img class="unit u25" title="<?php echo U25; ?>" src="img/x.gif"></label>
<input class="text troop" id="t5" type="text" name="t5" value="0">
</div>
<div class="clear"></div>
<div class="troopGroup">
<label for="t6"><img class="unit u26" title="<?php echo U26; ?>" src="img/x.gif"></label>
<input class="text troop" id="t6" type="text" name="t6" value="0">
</div>
<div class="troopGroup">
<label for="t7"><img class="unit u27" title="<?php echo U27; ?>" src="img/x.gif"></label>
<input class="text troop" id="t7" type="text" name="t7" value="0">
</div>
<div class="troopGroup">
<label for="t8"><img class="unit u28" title="<?php echo U28; ?>" src="img/x.gif"></label>
<input class="text troop" id="t8" type="text" name="t8" value="0">
</div>
<div class="troopGroup">
<label for="t9"><img class="unit u29" title="<?php echo U29; ?>" src="img/x.gif"></label>
<input class="text troop" id="t9" type="text" name="t9" value="0">
</div>
<div class="troopGroup">
<label for="t10"><img class="unit u30" title="<?php echo U30; ?>" src="img/x.gif"></label>
<input class="text troop" id="t10" type="text" name="t10" value="0">
</div>
<div class="clear"></div>
</div>
<?php } ?>
+48
View File
@@ -557,6 +557,24 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%enforcement` (
-- Dumping data for table `%prefix%enforcement`
--
-- --------------------------------------------------------
--
-- Table structure for table `%prefix%farmlist`
--
CREATE TABLE IF NOT EXISTS `%PREFIX%farmlist` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`wref` int(10) unsigned NOT NULL,
`owner` int(10) unsigned NOT NULL,
`name` varchar(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `%prefix%farmlist`
--
-- --------------------------------------------------------
@@ -1009,6 +1027,36 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%online` (
-- Dumping data for table `%prefix%online`
--
-- --------------------------------------------------------
--
-- Table structure for table `%prefix%raidlist`
--
CREATE TABLE IF NOT EXISTS `%PREFIX%raidlist` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`lid` int(10) NOT NULL,
`towref` int(10) unsigned NOT NULL,
`x` int(11) NOT NULL,
`y` int(11) NOT NULL,
`distance` varchar(5) NOT NULL DEFAULT '0',
`t1` int(11) unsigned NOT NULL,
`t2` int(11) unsigned NOT NULL,
`t3` int(11) unsigned NOT NULL,
`t4` int(11) unsigned NOT NULL,
`t5` int(11) unsigned NOT NULL,
`t6` int(11) unsigned NOT NULL,
`t7` int(11) unsigned NOT NULL,
`t8` int(11) unsigned NOT NULL,
`t9` int(11) unsigned NOT NULL,
`t10` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `%prefix%raidlist`
--
-- --------------------------------------------------------