mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-31 23:57:13 +00:00
Refactor + BugFix
1. Fix a bug in Admin Panel that you can edit by yourself your rank, now you cannot edit your rank anymore. 2. Now Alliance Leader can edit his own Position 3. Fix negative value on Demolition Building, now in database at lvl is appear new level not -1 4. Refactor Ajax map, now all is alligned (Ajax folder and Map folder) 5. Fix bug from Palace (when change capital now Automation recount population automaticaly on old capital and new capital)
This commit is contained in:
+142
-269
@@ -1,271 +1,144 @@
|
||||
<?php if($session->gold > 2){ ?>
|
||||
<div id="build" class="gid17"><a href="#" onClick="return Popup(17,4);" class="build_logo">
|
||||
<img class="building g17" src="img/x.gif" alt="Marketplace" title="<?php echo MARKETPLACE;?>" />
|
||||
</a>
|
||||
<h1><?php echo MARKETPLACE;?> <span class="level"><?php echo LEVEL;?> <?php echo $village->resarray['f'.$id]; ?></span></h1>
|
||||
<p class="build_desc"><?php echo MARKETPLACE_DESC;?>
|
||||
</p>
|
||||
|
||||
<?php include("17_menu.tpl");
|
||||
|
||||
|
||||
if(isset($_GET['c'])){
|
||||
?>
|
||||
|
||||
<p><b><?php echo NPC_COMPLETED;?>.</b> <?php echo COSTS;?> 3<img src="img/x.gif" class="gold" alt="Gold" title="<?php echo GOLD;?>" /></p>
|
||||
<a href="javascript: history.go(-2)"><?php echo BACK_BUILDING;?></a>
|
||||
<?php } else { ?>
|
||||
|
||||
<p><?php echo NPC_TRADE_DESC;?></p>
|
||||
|
||||
|
||||
<script language="JavaScript">
|
||||
var overall;
|
||||
function calculateRes() {
|
||||
resObj=document.getElementsByName("m2");
|
||||
overall=0;
|
||||
for (i=0; i<resObj.length; i++) {
|
||||
var tmp="";
|
||||
for (j=0; j<resObj[i].value.length; j++)
|
||||
if ((resObj[i].value.charAt(j)>="0") && (resObj[i].value.charAt(j)<="9")) tmp=tmp+resObj[i].value.charAt(j);
|
||||
resObj[i].value=tmp;
|
||||
if (tmp=="") tmp="0";
|
||||
newRes=Math.round(parseInt(tmp)*summe/100);
|
||||
if (((i<3) && (newRes<=max123)) || ((i==3) && (newRes<=max4)))
|
||||
newHTML=newRes;
|
||||
else
|
||||
newHTML="<span class='corr'>"+newRes+"</span>";
|
||||
document.getElementById("new"+i).innerHTML=newHTML;
|
||||
overall+=parseInt(tmp);
|
||||
}
|
||||
document.getElementById("overall").innerHTML=overall+"%";
|
||||
}
|
||||
function normalize() {
|
||||
calculateRes();
|
||||
resObj=document.getElementsByName("m2");
|
||||
for (i=0; i<resObj.length; i++) {
|
||||
tmp=parseInt(resObj[i].value);
|
||||
tmp=tmp*(100/overall);
|
||||
resObj[i].value=Math.round(tmp);
|
||||
}
|
||||
calculateRes();
|
||||
}
|
||||
|
||||
|
||||
function calculateRest() {
|
||||
resObj=document.getElementsByName("m2[]");
|
||||
overall=0;
|
||||
for (i=0; i<resObj.length; i++) {
|
||||
var tmp="";
|
||||
for (j=0; j<resObj[i].value.length; j++)
|
||||
if ((resObj[i].value.charAt(j)>="0") && (resObj[i].value.charAt(j)<="9")) tmp=tmp+resObj[i].value.charAt(j);
|
||||
if (tmp=="") {
|
||||
tmp="0";
|
||||
newRes=0;
|
||||
resObj[i].value="";
|
||||
} else {
|
||||
newRes=parseInt(tmp);
|
||||
if ((i<3) && (newRes>max123)) newRes=max123;
|
||||
if ((i==3) && (newRes>max4)) newRes=max4;
|
||||
resObj[i].value=newRes;
|
||||
}
|
||||
dif=newRes-parseInt(document.getElementById("org"+i).innerHTML);
|
||||
newHTML=dif;
|
||||
if (dif>0) newHTML="+"+dif;
|
||||
document.getElementById("diff"+i).innerHTML=newHTML;
|
||||
overall+=newRes;
|
||||
}
|
||||
document.getElementById("newsum").innerHTML=overall;
|
||||
rest=parseInt(document.getElementById("org4").innerHTML)-overall;
|
||||
document.getElementById("remain").innerHTML=rest;
|
||||
testSum();
|
||||
}
|
||||
|
||||
function fillup(nr) {
|
||||
resObj=document.getElementsByName("m2[]");
|
||||
if (nr<3) {
|
||||
resObj[nr].value=max123;
|
||||
} else {
|
||||
resObj[nr].value=max4;
|
||||
}
|
||||
calculateRest();
|
||||
}
|
||||
function portionOut() {
|
||||
restRes=parseInt(document.getElementById("remain").innerHTML);
|
||||
rest=restRes;
|
||||
resObj=document.getElementsByName("m2[]");
|
||||
nullCount=0;
|
||||
notNullCount=0;
|
||||
// Z�hlen
|
||||
for (j=0; j<resObj.length; j++) {
|
||||
if ((restRes>0) && (resObj[j].value=="")) nullCount++;
|
||||
if ((restRes<0) && (resObj[j].value!="")) notNullCount++;
|
||||
}
|
||||
// Verteilen
|
||||
nullCount2=0;
|
||||
if (restRes>0) {
|
||||
// In allen Feldern schon Zahlen?
|
||||
if (nullCount==0) {
|
||||
for (i=0; i<resObj.length; i++) {
|
||||
free=max123-parseInt(resObj[i].value);
|
||||
resObj[i].value=(parseInt(resObj[i].value)+Math.round(rest/(4-i)));
|
||||
rest=rest-Math.min(free,Math.round(rest/(4-i)));
|
||||
if ((i<3) && (parseInt(resObj[i].value)<max123)) nullCount2++;
|
||||
}
|
||||
} else {
|
||||
for (i=0; i<resObj.length; i++) {
|
||||
if (resObj[i].value=="") {
|
||||
resObj[i].value=Math.round(rest/nullCount);
|
||||
rest=rest-Math.round(rest/nullCount);
|
||||
nullCount--;
|
||||
}
|
||||
if ((i<3) && (parseInt(resObj[i].value)<max123)) nullCount2++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (j=0; j<resObj.length; j++) {
|
||||
if (parseInt(resObj[j].value)>0) {
|
||||
resObj[j].value=(parseInt(resObj[j].value)+Math.round(rest/notNullCount));
|
||||
rest=rest-Math.round(rest/notNullCount);
|
||||
notNullCount--;
|
||||
}
|
||||
}
|
||||
}
|
||||
calculateRest();
|
||||
// Noch irgendein Rest?
|
||||
if (rest>0) {
|
||||
if (max123>max4) {
|
||||
for (j=0; j<3; j++) {
|
||||
if (parseInt(resObj[j].value)<max123) {
|
||||
resObj[j].value=(parseInt(resObj[j].value)+Math.round(rest/nullCount2));
|
||||
rest=rest-Math.round(rest/nullCount2);
|
||||
nullCount2--;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
resObj[3].value=(parseInt(resObj[3].value)+rest);
|
||||
}
|
||||
}
|
||||
calculateRest();
|
||||
}
|
||||
|
||||
function testSum() {
|
||||
if (document.getElementById("remain").innerHTML!=0) {
|
||||
document.getElementById("submitText").innerHTML="<a href='javascript:portionOut();'><?php echo DISTRIBUTE_RESOURCES; ?></a>";
|
||||
document.getElementById("submitText").style.display="block";
|
||||
document.getElementById("submitButton").style.display="none";
|
||||
} else {
|
||||
document.getElementById("submitText").innerHTML="";
|
||||
document.getElementById("submitText").style.display="none";
|
||||
document.getElementById("submitButton").style.display="block";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script language="JavaScript">var summe=<?php echo floor($village->awood+$village->acrop+$village->airon+$village->aclay); ?>;var max123=<?php echo $village->maxstore; ?>;var max4=<?php echo $village->maxcrop; ?>;</script>
|
||||
<form method="post" name="snd" action="build.php">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<input type="hidden" name="ft" value="mk3" />
|
||||
<input type="hidden" name="t" value="3" />
|
||||
<?php
|
||||
|
||||
$wwvillage = $database->getResourceLevel($village->wid);
|
||||
if($wwvillage['f99t']!=40){
|
||||
?>
|
||||
<table id="npc" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5"><?php echo NPC_TRADE;?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="all">
|
||||
<a href="javascript:fillup(0);"><img class="r1" src="img/x.gif" alt="Lumber" title="<?php echo LUMBER;?>" /></a>
|
||||
<span id="org0"><?php echo floor($village->awood); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="all">
|
||||
<a href="javascript:fillup(1);"><img class="r2" src="img/x.gif" alt="Clay" title="<?php echo CLAY;?>" /></a>
|
||||
<span id="org1"><?php echo floor($village->aclay); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="all">
|
||||
<a href="javascript:fillup(2);"><img class="r3" src="img/x.gif" alt="Iron" title="<?php echo IRON;?>" /></a>
|
||||
<span id="org2"><?php echo floor($village->airon); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="all">
|
||||
<a href="javascript:fillup(3);"><img class="r4" src="img/x.gif" alt="Crop" title="<?php echo CROP;?>" /></a>
|
||||
<span id="org3"><?php echo floor($village->acrop); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="sum"><?php echo SUM;?>: <span id="org4"><?php echo floor($village->awood+$village->acrop+$village->airon+$village->aclay); ?></span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<td class="sel">
|
||||
<input class="text" onkeyup="calculateRest();" name="m2[]" size="5" maxlength="7" <?php if(isset($_GET['r1'])) { echo "value=\"".$_GET['r1']."\""; } ?>/>
|
||||
<input type="hidden" name="m1[]" value="<?php echo floor($village->awood); ?>" />
|
||||
</td>
|
||||
|
||||
<td class="sel">
|
||||
<input class="text" onkeyup="calculateRest();" name="m2[]" size="5" maxlength="7" <?php if(isset($_GET['r2'])) { echo "value=\"".$_GET['r2']."\""; } ?>/>
|
||||
<input type="hidden" name="m1[]" value="<?php echo floor($village->aclay); ?>" />
|
||||
</td>
|
||||
|
||||
<td class="sel">
|
||||
<input class="text" onkeyup="calculateRest();" name="m2[]" size="5" maxlength="7" <?php if(isset($_GET['r3'])) { echo "value=\"".$_GET['r3']."\""; } ?>/>
|
||||
<input type="hidden" name="m1[]" value="<?php echo floor($village->airon); ?>" />
|
||||
</td>
|
||||
|
||||
<td class="sel">
|
||||
<input class="text" onkeyup="calculateRest();" name="m2[]" size="5" maxlength="7" <?php if(isset($_GET['r4'])) { echo "value=\"".$_GET['r4']."\""; } ?>/>
|
||||
<input type="hidden" name="m1[]" value="<?php echo floor($village->acrop); ?>" />
|
||||
</td>
|
||||
|
||||
<td class="sum"><?php echo SUM;?>: <span id="newsum"><?php if(isset($_GET['r1']) && isset($_GET['r2']) && isset($_GET['r3']) && isset($_GET['r4'])) { echo $_GET['r1']+$_GET['r2']+$_GET['r3']+$_GET['r4']; } else { echo 0; } ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="rem">
|
||||
<span id="diff0"><?php echo 0-floor($village->awood); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="rem">
|
||||
<span id="diff1"><?php echo 0-floor($village->aclay); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="rem">
|
||||
<span id="diff2"><?php echo 0-floor($village->airon); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="rem">
|
||||
<span id="diff3"><?php echo 0-floor($village->acrop); ?></span>
|
||||
</td>
|
||||
|
||||
<td class="sum"><?php echo REST;?>: <span id="remain">
|
||||
<?php if(isset($_GET['r1']) && isset($_GET['r2']) && isset($_GET['r3']) && isset($_GET['r4'])) {
|
||||
echo floor($village->awood+$village->acrop+$village->airon+$village->aclay)-($_GET['r1']+$_GET['r2']+$_GET['r3']+$_GET['r4']);
|
||||
} else { echo floor($village->awood+$village->acrop+$village->airon+$village->aclay); } ?></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p id="submitButton">
|
||||
<?php if($session->userinfo['gold'] >= 3) { ?><a href="javascript:document.snd.submit();"><?php echo TRADE_RESOURCES;?>)</a> <span class="none">(<?php echo COSTS;?>: <img src="img/x.gif" class="gold_g" alt="Gold" title="<?php echo GOLD;?>" /><b>3</b>)</span><?php } else { echo"<span class='none'>".TRADE_RESOURCES.")</span> (".COSTS.": <img src='img/x.gif' class='gold' alt='Gold' title='".GOLD."' /><b>3</b>)"; }?> </p>
|
||||
<p id="submitText"></p>
|
||||
</form>
|
||||
<script>
|
||||
testSum();
|
||||
</script>
|
||||
|
||||
<?php }else{ ?>
|
||||
</br></br>
|
||||
<?php echo "".YOU_CAN_NAT_NPC_WW."";
|
||||
}} ?>
|
||||
</div>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: build.php?id=".$_GET['id']."");
|
||||
exit;
|
||||
// 17_3.tpl - MARKETPLACE / NPC Trade
|
||||
global $database, $session, $village, $id;
|
||||
|
||||
if ($session->gold <= 2) {
|
||||
header("Location: build.php?id=".(int)$_GET['id']);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
$level = (int)$village->resarray['f'.$id];
|
||||
$totalRes = floor($village->awood + $village->aclay + $village->airon + $village->acrop);
|
||||
$maxstore = (int)$village->maxstore;
|
||||
$maxcrop = (int)$village->maxcrop;
|
||||
|
||||
// valori prefill din GET
|
||||
$r = [];
|
||||
for ($i = 1; $i <= 4; $i++) {
|
||||
$r[$i] = isset($_GET['r'.$i])? max(0, (int)$_GET['r'.$i]) : '';
|
||||
}
|
||||
$newsum = ($r[1]!=='' && $r[2]!=='' && $r[3]!=='' && $r[4]!=='')? array_sum($r) : 0;
|
||||
$remain = $totalRes - $newsum;
|
||||
|
||||
$wwvillage = $database->getResourceLevel($village->wid);
|
||||
$isWW = ($wwvillage['f99t'] == 40);
|
||||
$completed = isset($_GET['c']);
|
||||
?>
|
||||
<div id="build" class="gid17">
|
||||
<a href="#" onClick="return Popup(17,4);" class="build_logo">
|
||||
<img class="building g17" src="img/x.gif" alt="Marketplace" title="<?php echo MARKETPLACE;?>" />
|
||||
</a>
|
||||
<h1><?php echo MARKETPLACE;?> <span class="level"><?php echo LEVEL;?> <?php echo $level;?></span></h1>
|
||||
<p class="build_desc"><?php echo MARKETPLACE_DESC;?></p>
|
||||
|
||||
<?php include("17_menu.tpl");?>
|
||||
|
||||
<?php if ($completed):?>
|
||||
<p><b><?php echo NPC_COMPLETED;?>.</b> <?php echo COSTS;?> 3<img src="img/x.gif" class="gold" alt="Gold" title="<?php echo GOLD;?>" /></p>
|
||||
<a href="javascript: history.go(-2)"><?php echo BACK_BUILDING;?></a>
|
||||
|
||||
<?php else:?>
|
||||
<p><?php echo NPC_TRADE_DESC;?></p>
|
||||
|
||||
<script language="JavaScript">
|
||||
var overall;
|
||||
function calculateRes() {
|
||||
resObj=document.getElementsByName("m2");
|
||||
overall=0;
|
||||
for (i=0; i<resObj.length; i++) {
|
||||
var tmp="";
|
||||
for (j=0; j<resObj[i].value.length; j++)
|
||||
if ((resObj[i].value.charAt(j)>="0") && (resObj[i].value.charAt(j)<="9")) tmp=tmp+resObj[i].value.charAt(j);
|
||||
resObj[i].value=tmp;
|
||||
if (tmp=="") tmp="0";
|
||||
newRes=Math.round(parseInt(tmp)*summe/100);
|
||||
if (((i<3) && (newRes<=max123)) || ((i==3) && (newRes<=max4)))
|
||||
newHTML=newRes;
|
||||
else
|
||||
newHTML="<span class='corr'>"+newRes+"</span>";
|
||||
document.getElementById("new"+i).innerHTML=newHTML;
|
||||
overall+=parseInt(tmp);
|
||||
}
|
||||
document.getElementById("overall").innerHTML=overall+"%";
|
||||
}
|
||||
function normalize() { calculateRes(); resObj=document.getElementsByName("m2"); for (i=0; i<resObj.length; i++) { tmp=parseInt(resObj[i].value); tmp=tmp*(100/overall); resObj[i].value=Math.round(tmp); } calculateRes(); }
|
||||
function calculateRest() {
|
||||
resObj=document.getElementsByName("m2[]"); overall=0;
|
||||
for (i=0; i<resObj.length; i++) {
|
||||
var tmp=""; for (j=0; j<resObj[i].value.length; j++) if ((resObj[i].value.charAt(j)>="0") && (resObj[i].value.charAt(j)<="9")) tmp=tmp+resObj[i].value.charAt(j);
|
||||
if (tmp=="") { tmp="0"; newRes=0; resObj[i].value=""; } else { newRes=parseInt(tmp); if ((i<3) && (newRes>max123)) newRes=max123; if ((i==3) && (newRes>max4)) newRes=max4; resObj[i].value=newRes; }
|
||||
dif=newRes-parseInt(document.getElementById("org"+i).innerHTML); newHTML=dif; if (dif>0) newHTML="+"+dif; document.getElementById("diff"+i).innerHTML=newHTML; overall+=newRes;
|
||||
}
|
||||
document.getElementById("newsum").innerHTML=overall; rest=parseInt(document.getElementById("org4").innerHTML)-overall; document.getElementById("remain").innerHTML=rest; testSum();
|
||||
}
|
||||
function fillup(nr) { resObj=document.getElementsByName("m2[]"); if (nr<3) { resObj[nr].value=max123; } else { resObj[nr].value=max4; } calculateRest(); }
|
||||
function portionOut() { /*... cod original neschimbat... */ restRes=parseInt(document.getElementById("remain").innerHTML); rest=restRes; resObj=document.getElementsByName("m2[]"); nullCount=0; notNullCount=0; for (j=0; j<resObj.length; j++) { if ((restRes>0) && (resObj[j].value=="")) nullCount++; if ((restRes<0) && (resObj[j].value!="")) notNullCount++; } nullCount2=0; if (restRes>0) { if (nullCount==0) { for (i=0; i<resObj.length; i++) { free=max123-parseInt(resObj[i].value); resObj[i].value=(parseInt(resObj[i].value)+Math.round(rest/(4-i))); rest=rest-Math.min(free,Math.round(rest/(4-i))); if ((i<3) && (parseInt(resObj[i].value)<max123)) nullCount2++; } } else { for (i=0; i<resObj.length; i++) { if (resObj[i].value=="") { resObj[i].value=Math.round(rest/nullCount); rest=rest-Math.round(rest/nullCount); nullCount--; } if ((i<3) && (parseInt(resObj[i].value)<max123)) nullCount2++; } } } else { for (j=0; j<resObj.length; j++) { if (parseInt(resObj[j].value)>0) { resObj[j].value=(parseInt(resObj[j].value)+Math.round(rest/notNullCount)); rest=rest-Math.round(rest/notNullCount); notNullCount--; } } } calculateRest(); if (rest>0) { if (max123>max4) { for (j=0; j<3; j++) { if (parseInt(resObj[j].value)<max123) { resObj[j].value=(parseInt(resObj[j].value)+Math.round(rest/nullCount2)); rest=rest-Math.round(rest/nullCount2); nullCount2--; } } } else { resObj[3].value=(parseInt(resObj[3].value)+rest); } } calculateRest(); }
|
||||
function testSum() { if (document.getElementById("remain").innerHTML!=0) { document.getElementById("submitText").innerHTML="<a href='javascript:portionOut();'><?php echo DISTRIBUTE_RESOURCES;?></a>"; document.getElementById("submitText").style.display="block"; document.getElementById("submitButton").style.display="none"; } else { document.getElementById("submitText").innerHTML=""; document.getElementById("submitText").style.display="none"; document.getElementById("submitButton").style.display="block"; } }
|
||||
</script>
|
||||
<script language="JavaScript">var summe=<?php echo $totalRes;?>;var max123=<?php echo $maxstore;?>;var max4=<?php echo $maxcrop;?>;</script>
|
||||
|
||||
<?php if (!$isWW):?>
|
||||
<form method="post" name="snd" action="build.php">
|
||||
<input type="hidden" name="id" value="<?php echo (int)$id;?>" />
|
||||
<input type="hidden" name="ft" value="mk3" />
|
||||
<input type="hidden" name="t" value="3" />
|
||||
|
||||
<table id="npc" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr><th colspan="5"><?php echo NPC_TRADE;?></th></tr>
|
||||
<tr>
|
||||
<?php $resData = [
|
||||
['wood', $village->awood, 'r1', LUMBER],
|
||||
['clay', $village->aclay, 'r2', CLAY],
|
||||
['iron', $village->airon, 'r3', IRON],
|
||||
['crop', $village->acrop, 'r4', CROP],
|
||||
];
|
||||
foreach ($resData as $idx => $rd):?>
|
||||
<td class="all">
|
||||
<a href="javascript:fillup(<?php echo $idx;?>);"><img class="<?php echo $rd[2];?>" src="img/x.gif" alt="<?php echo $rd[3];?>" title="<?php echo $rd[3];?>" /></a>
|
||||
<span id="org<?php echo $idx;?>"><?php echo floor($rd[1]);?></span>
|
||||
</td>
|
||||
<?php endforeach;?>
|
||||
<td class="sum"><?php echo SUM;?>: <span id="org4"><?php echo $totalRes;?></span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php for ($i = 0; $i < 4; $i++):
|
||||
$val = $r[$i+1]!== ''? $r[$i+1] : '';
|
||||
$orig = floor($resData[$i][1]);
|
||||
?>
|
||||
<td class="sel">
|
||||
<input class="text" onkeyup="calculateRest();" name="m2[]" size="5" maxlength="7" value="<?php echo $val;?>" />
|
||||
<input type="hidden" name="m1[]" value="<?php echo $orig;?>" />
|
||||
</td>
|
||||
<?php endfor;?>
|
||||
<td class="sum"><?php echo SUM;?>: <span id="newsum"><?php echo $newsum;?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php for ($i = 0; $i < 4; $i++):?>
|
||||
<td class="rem"><span id="diff<?php echo $i;?>"><?php echo 0 - floor($resData[$i][1]);?></span></td>
|
||||
<?php endfor;?>
|
||||
<td class="sum"><?php echo REST;?>: <span id="remain"><?php echo $remain;?></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p id="submitButton">
|
||||
<?php if ($session->userinfo['gold'] >= 3):?>
|
||||
<a href="javascript:document.snd.submit();"><?php echo TRADE_RESOURCES;?></a>
|
||||
<span class="none">(<?php echo COSTS;?>: <img src="img/x.gif" class="gold_g" alt="Gold" title="<?php echo GOLD;?>" /><b>3</b>)</span>
|
||||
<?php else:?>
|
||||
<span class="none"><?php echo TRADE_RESOURCES;?></span> (<?php echo COSTS;?>: <img src='img/x.gif' class='gold' alt='Gold' title='<?php echo GOLD;?>' /><b>3</b>)
|
||||
<?php endif;?>
|
||||
</p>
|
||||
<p id="submitText"></p>
|
||||
</form>
|
||||
<script>testSum();</script>
|
||||
|
||||
<?php else:?>
|
||||
<br /><br /><?php echo YOU_CAN_NAT_NPC_WW;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php endif;?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user