mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-12 22:31:02 +00:00
Fix alliance Assign to position and Changepos
Code and Fix alliance Assign to position and Changepos
This commit is contained in:
@@ -1,43 +1,51 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
if (!isset($aid)) {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
echo "<h1>" . htmlspecialchars($allianceinfo['tag']) . " - " . htmlspecialchars($allianceinfo['name']) . "</h1>";
|
||||
|
||||
include("alli_menu.tpl");
|
||||
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Assign to position</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">Here you can grant the players from your alliance rights & positions.</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>
|
||||
<select name="a_user" class="name dropdown">
|
||||
<?php
|
||||
foreach($memberlist as $member){
|
||||
//Activate line below but still not working to give permission to other users in alliace
|
||||
if($member['id'] != $session->uid && !$database->isAllianceOwner($member['id'])){
|
||||
echo "<option value=".$member['id'].">".$member['username']."</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
<input type="hidden" name="o" value="1">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<button value="ok" name="s1" id="btn_ok" class="trav_buttons">OK</button>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form method="post" action="allianz.php">
|
||||
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Assign to position</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
Here you can grant the players from your alliance rights & positions.
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>
|
||||
<select name="a_user" class="name dropdown">
|
||||
<?php
|
||||
foreach ($memberlist as $member) {
|
||||
echo "<option value='" . (int)$member['id'] . "'>" . htmlspecialchars($member['username']) . "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<input type="hidden" name="o" value="1">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<button type="submit" name="s1" id="btn_ok" class="trav_buttons">OK</button>
|
||||
</p>
|
||||
</form>
|
||||
@@ -93,7 +93,7 @@ include("alli_menu.tpl");
|
||||
<input type="hidden" name="a" value="1">
|
||||
<input type="hidden" name="o" value="1">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<input type="hidden" name="a_user" value="<?php echo (isset($_POST['a_user']) ? $_POST['a_user'] : ''); ?>">
|
||||
<input type="hidden" name="a_user" value="<?php echo (isset($_POST['a_user']) ? $_POST['a_user'] : ''); ?>">
|
||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
</p>
|
||||
</form>
|
||||
Reference in New Issue
Block a user