This commit is contained in:
Shadow
2014-05-12 08:43:32 +03:00
parent 7cfa82a18d
commit e337ac2b4d
93 changed files with 2105 additions and 1957 deletions
+33 -35
View File
@@ -19,52 +19,50 @@ if($_POST AND $_GET['action'] == 'change_capital') {
if($data2['f' . $i] > 10) {
$query2 = mysql_query('UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . '` = 10 WHERE `vref` = ' . $data2['vref']) or die(mysql_error());
}
}
for($i=19; $i<=40; ++$i) {
}
for($i=19; $i<=40; ++$i) {
if($data2['f' . $i . 't'] == 34) {
$query3 = mysql_query('UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . 't` = 0, `f' . $i . '` = 0 WHERE `vref` = ' . $data2['vref']) or die(mysql_error());
}
}
for($i=19; $i<=40; ++$i) {
}
for($i=19; $i<=40; ++$i) {
if($data2['f' . $i . 't'] == 29 or $data2['f' . $i . 't'] == 30 or $data2['f' . $i . 't'] == 38 or $data2['f' . $i . 't'] == 39 or $data2['f' . $i . 't'] == 42) {
$query3 = mysql_query('UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . 't` = 0, `f' . $i . '` = 0 WHERE `vref` = ' . $village->wid) or die(mysql_error());
}
}
$query3 = mysql_query('UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 0 WHERE `wref` = ' . $data1['wref']);
$query4 = mysql_query('UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 1 WHERE `wref` = ' . $village->wid);
}
} else {
$error = '<br /><font color="red">password is wrong</font><br />';
}
$query3 = mysql_query('UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 0 WHERE `wref` = ' . $data1['wref']);
$query4 = mysql_query('UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 1 WHERE `wref` = ' . $village->wid);
}
} else {
$error = '<br /><font color="red">'.LOGIN_PW_ERROR.'</font><br />';
$_SESSION['error_p'] = $error;
$_SESSION['time_p'] = time();
print '<script language="javascript">location.href="build.php?id=' . $building->getTypeField(26) . '&confirm=yes";</script>';
}
}
?>
<div id="build" class="gid26"><h1>Palace <span class="level">level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<div id="build" class="gid26"><h1><?php echo PALACE; ?> <span class="level"><?php echo LEVEL; ?> <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">
<a href="#" onClick="return Popup(26,4, 'gid');"
class="build_logo"> <img
class="building g26"
src="img/x.gif" alt="Palace"
title="Palace" /> </a>
The king or queen of the empire lives in the palace. Only one palace can exist in your realm at a time. You need a palace in order to proclaim a village to be your capital.</p>
<a href="#" onClick="return Popup(26,4, 'gid');"
class="build_logo"> <img
class="building g26"
src="img/x.gif" alt="Palace"
title="<?php echo PALACE; ?>" /> </a>
<?php echo PALACE_DESC; ?></p>
<?php
<?php
if ($building->getTypeLevel(26) > 0) {
include("26_menu.tpl");
include("26_menu.tpl");
$test=$database->getAvailableExpansionTraining();
if($village->resarray['f'.$id] >= 10){
include ("26_train.tpl");
include ("26_train.tpl");
}
else{
echo '<div class="c">In order to found a new village you need a level 10, 15 or 20 palace and 3 settlers. In order to conquer a new village you need a level 10, 15 or 20 palace and a senator, chief or chieftain.</div>';
echo '<div class="c">'.PALACE_TRAIN_DESC.'</div>';
}
?>
@@ -74,24 +72,24 @@ $query = mysql_query('SELECT * FROM `' . TB_PREFIX . 'vdata` WHERE `owner` = ' .
$data = mysql_fetch_assoc($query);
if($data['wref'] == $village->wid) {
?>
<p class="none">This is your capital</p>
<?php
<p class="none"><?php echo CAPITAL; ?></p>
<?php
} else {
if($_GET['confirm'] == '') {
print '<p><a href="?id=' . $building->getTypeField(26) . '&confirm=yes">&raquo change capital</a></p>';
print '<p><a href="?id=' . $building->getTypeField(26) . '&confirm=yes">&raquo '.CHANGE_CAPITAL.'</a></p>';
} else {
print '<p>Are you sure, that you want to change your capital?<br /><b>You can\'t undo this!</b><br />For security you must enter your password to confirm:<br />
<form method="post" action="build.php?id=' . $building->getTypeField(26) . '&action=change_capital">
' . $_SESSION['error_p'] . '
password: <input type="password" name="pass" /><br />
<input type="image" id="btn_ok" class="dynamic_img" value="ok" name="s1" src="img/x.gif" alt="train" />
</form>
</p>';
<form method="post" action="build.php?id=' . $building->getTypeField(26) . '&action=change_capital">
' . $_SESSION['error_p'] . '
'.PASSWORD.': <input type="password" name="pass" /><br />
<input type="image" id="btn_ok" class="dynamic_img" value="ok" name="s1" src="img/x.gif" alt="train" />
</form>
</p>';
}
}
} else {
echo "<b>Palace under construction</b>";
echo "<b><?php echo PALACE_CONSTRUCTION; ?></b>";
}
include("upgrade.tpl");
?>
</div>
</div>