mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-22 12:36:09 +00:00
Fixed a lot of bugs/security issues in the alliance
+You can no longer kick people of other alliances +You can no longer change the forum link with no permissions +You can no longer make more than 3 total confederation and 3 total NAP +You can no longer send a diplomacy pact to an alliance with already one pact or one pending pact +You can no longer handle diplomacy without permissions +Fixed security bugs related to invites (sending, deleting etc.) +You can no longer access to any alliance submenus without permissions (kick menu, diplomacy menu, etc.) +Errors are now shown correctly and better handling of them +New forum link and alliance description are shown correctly after editing them +You can no longer access to other alliances informations without being in it (attack reports, news, etc) +Corrected some alliance news +Added some language constants to en.php +Fixed and changed some database.php functions alliance related
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php if($session->alliance == $aid) {
|
||||
?>
|
||||
<div id="textmenu">
|
||||
<a href="allianz.php" <?php if(!isset($_GET['s'])) { echo "class=\"selected\""; } ?>>Overview</a>
|
||||
<a href="allianz.php" <?php if(!isset($_GET['s']) && !isset($_POST['s'])) { echo "class=\"selected\""; } ?>>Overview</a>
|
||||
| <a href="allianz.php?s=2" <?php if(isset($_GET['s']) && $_GET['s'] == 2) { echo "class=\"selected\""; } ?>>Forum</a>
|
||||
| <a href="allianz.php?s=6" <?php if(isset($_GET['s']) && $_GET['s'] == 6) { echo "class=\"selected\""; } ?>>Chat</a>
|
||||
| <a href="allianz.php?s=3" <?php if(isset($_GET['s']) && $_GET['s'] == 3) { echo "class=\"selected\""; } ?>>Attacks</a>
|
||||
@@ -9,7 +9,7 @@
|
||||
<?php
|
||||
if($session->sit == 0){
|
||||
?>
|
||||
| <a href="allianz.php?s=5" <?php if(isset($_GET['s']) && $_GET['s'] == 5) { echo "class=\"selected\""; } ?>>Options</a>
|
||||
| <a href="allianz.php?s=5" <?php if(isset($_GET['s']) && $_GET['s'] == 5 || isset($_POST['s']) && $_POST['s']) { echo "class=\"selected\""; } ?>>Options</a>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$varmedal = $database->getProfileMedalAlly($aid);
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
@@ -43,7 +38,7 @@ include("alli_menu.tpl");
|
||||
|
||||
<tr>
|
||||
<th>Tag</td><td class="s7"><?php echo $allianceinfo['tag']; ?></th>
|
||||
<td rowspan="8" class="desc1"><textarea tabindex="1" name="be1"><?php echo stripslashes($allianceinfo['desc']); ?></textarea></td>
|
||||
<td rowspan="8" class="desc1"><textarea tabindex="1" name="be1"><?php echo isset($_POST['be1']) ? $_POST['be1'] : stripslashes($allianceinfo['desc']); ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -66,7 +61,7 @@ include("alli_menu.tpl");
|
||||
|
||||
<tr><td colspan="2" class="empty"></td></tr>
|
||||
|
||||
<tr><td colspan="2" class="desc2"><textarea tabindex="2" name="be2"><?php echo stripslashes($allianceinfo['notice']); ?></textarea></td></tr>
|
||||
<tr><td colspan="2" class="desc2"><textarea tabindex="2" name="be2"><?php echo isset($_POST['be2']) ? $_POST['be2'] : stripslashes($allianceinfo['notice']); ?></textarea></td></tr>
|
||||
<p>
|
||||
<table cellspacing="1" cellpadding="2" class="tbg">
|
||||
<tr><td class="rbg" colspan="4">Medals</td></tr>
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
|
||||
@@ -28,8 +24,12 @@ if($session->access!=BANNED){
|
||||
<td>
|
||||
<select name="a_user" class="name dropdown">
|
||||
<?php
|
||||
foreach($memberlist as $member) {
|
||||
echo "<option value=".$member['id'].">".$member['username']."</option>";
|
||||
foreach($memberlist as $member)
|
||||
{
|
||||
if($member['id'] != $session->uid)
|
||||
{
|
||||
echo "<option value=".$member['id'].">".$member['username']."</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -43,7 +43,6 @@ if($session->access!=BANNED){
|
||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
</p>
|
||||
</form>
|
||||
<p class="error"></p>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
|
||||
@@ -38,11 +38,11 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
|
||||
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
|
||||
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0],username,0);
|
||||
$outputList .= $database->getUserField($dataarray[0], "username", 0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
|
||||
$outputList .= $database->getUserField($dataarray[28], "username", 0);
|
||||
$getUserAlly = $database->getUserField($dataarray[28], "alliance", 0);
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
if($getUserAlly==$session->alliance || !$getUserAlly){
|
||||
|
||||
@@ -39,11 +39,11 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
|
||||
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
|
||||
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0],username,0);
|
||||
$outputList .= $database->getUserField($dataarray[0], "username", 0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
||||
$outputList .= $database->getUserField($dataarray[28], "username", 0);
|
||||
$getUserAlly = $database->getUserField($dataarray[0], "alliance", 0);
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
if($getUserAlly==$session->alliance || !$getUserAlly){
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
@@ -66,30 +62,30 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
|
||||
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
|
||||
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0],username,0);
|
||||
$outputList .= $database->getUserField($dataarray[0], "username", 0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||
$outputList .= $database->getUserField($dataarray[28], "username", 0);
|
||||
if($ntype==0){
|
||||
$isoasis = $database->isVillageOases($toWref);
|
||||
if($isoasis == 0){
|
||||
if($toWref != $village->wid){
|
||||
$getUser = $database->getVillageField($toWref,owner);
|
||||
}else{
|
||||
$getUser = $database->getVillageField($dataarray[1],owner);
|
||||
$getUser = $database->getVillageField($dataarray[1], "owner");
|
||||
}
|
||||
}else{
|
||||
if($toWref != $village->wid){
|
||||
$getUser = $database->getOasisField($toWref,owner);
|
||||
}else{
|
||||
$getUser = $database->getOasisField($dataarray[1],owner);
|
||||
$getUser = $database->getOasisField($dataarray[1], "owner");
|
||||
}
|
||||
}
|
||||
$getUserAlly = $database->getUserField($getUser,alliance,0);
|
||||
$getUserAlly = $database->getUserField($getUser, "alliance", 0);
|
||||
}else if($ntype==1 or $ntype==2 or $ntype==3 or $ntype==18 or $ntype==19){
|
||||
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
|
||||
$getUserAlly = $database->getUserField($dataarray[28], "alliance", 0);
|
||||
}else{
|
||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
||||
$getUserAlly = $database->getUserField($dataarray[0], "alliance", 0);
|
||||
}
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
|
||||
@@ -1,38 +1,30 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" cellpadding="1" cellspacing="1" id="name" class="small_option"><thead>
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="100">
|
||||
<input type="hidden" name="o" value="100">
|
||||
<input type="hidden" name="s" value="5">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" cellpadding="1" cellspacing="1" id="name" class="small_option"><thead>
|
||||
<tr>
|
||||
<th colspan="2">Change name</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<th>Tag</th>
|
||||
<td><input class="tag text" name="ally1" value="<?php echo $allianceinfo['tag']; ?>" maxlength="15">
|
||||
<span class="error2"></span></td>
|
||||
<span class="error2"><?php echo $form->getError("ally1"); ?></span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td><input class="name text" name="ally2" value="<?php echo $allianceinfo['name']; ?>" maxlength="50">
|
||||
<span class="error2"></span></td>
|
||||
<span class="error2"><?php echo $form->getError("ally2"); ?></span></td>
|
||||
</tr></tbody></table>
|
||||
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<p class="error3"><?php echo $form->getError("ally1"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("ally2"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("owner"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("tag"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("name"); ?></p>
|
||||
<p class="error"><?php echo $form->getError("perm"); ?></p>
|
||||
@@ -1,14 +1,24 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
if($database->getUserField($_POST['a_user'], "alliance", 0) != $session->alliance)
|
||||
{
|
||||
$form->addError("perm", USER_NOT_IN_YOUR_ALLY);
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$playerData = $database->getAlliPermissions($_POST['a_user'], $session->alliance);
|
||||
$playername = $database->getUserField($_POST['a_user'],'username',0);
|
||||
elseif($_POST['a_user'] == $session->uid) $form->addError("perm", CANT_EDIT_YOUR_PERMISSIONS);
|
||||
|
||||
if($form->returnErrors() > 0)
|
||||
{
|
||||
$_SESSION['errorarray'] = $form->getErrors();
|
||||
$_SESSION['valuearray'] = $_POST;
|
||||
header("Location: allianz.php?s=5");
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$playerData = $database->getAlliPermissions($_POST['a_user'], $aid);
|
||||
$playername = $database->getUserField($_POST['a_user'],'username',0);
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
<?php
|
||||
////////////// made by TTMTT //////////////
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
|
||||
@@ -16,11 +16,8 @@
|
||||
*/
|
||||
|
||||
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
} else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
@@ -77,7 +74,7 @@
|
||||
<div id="box">
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK"></p>
|
||||
|
||||
<p class="error"></p>
|
||||
<p class="error"><?php echo $form->getError("name"); ?></p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -96,19 +93,11 @@
|
||||
$alliance = $session->alliance;
|
||||
|
||||
if(count($database->diplomacyOwnOffers($alliance))){
|
||||
foreach($database->diplomacyOwnOffers($alliance) as $key => $value){
|
||||
if($value['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($value['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($value['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="101"><input type="hidden" name="id" value="'.$value['id'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$value['alli2'].'"><center>'.$database->getAllianceName($value['alli2']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
foreach($database->diplomacyOwnOffers($alliance) as $row){
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="101"><input type="hidden" name="id" value="'.$row['id'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$row['alli2'].'"><center>'.$database->getAllianceName($row['alli2']).'</a></center></td><td width="80"><center>'.(["Conf", "Nap", "War"])[$row['type']-1].'</center></td></tr>';
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
}
|
||||
else echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -136,24 +125,14 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
unset($type);
|
||||
<?php
|
||||
$alliance = $session->alliance;
|
||||
|
||||
if(($dInvites = $database->diplomacyInviteCheck($alliance)) && count($dInvites)){
|
||||
foreach($dInvites as $key => $row){
|
||||
if($row['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($row['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($row['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="102"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli1" value="'.$row['alli1'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></td></form><form method="post" action="allianz.php"><td width="18"><input type="hidden" name="o" value="103"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli2'].'"><input type="hidden" name="type" value="'.$row['type'].'"><input type="image" class="accept" src="img/x.gif" title="Accept" /></td></form><td><a href="allianz.php?aid='.$row['alli1'].'"><center>'.$database->getAllianceName($row['alli1']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
foreach($dInvites as $row){
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="102"><input type="hidden" name="id" value="'.$row['id'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></td></form><form method="post" action="allianz.php"><td width="18"><input type="hidden" name="o" value="103"><input type="hidden" name="id" value="'.$row['id'].'"><input type="image" class="accept" src="img/x.gif" title="Accept" /></td></form><td><a href="allianz.php?aid='.$row['alli1'].'"><center>'.$database->getAllianceName($row['alli1']).'</a></center></td><td width="80"><center>'.(["Conf", "Nap", "War"])[$row['type']-1].'</center></td></tr>';
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
}
|
||||
}
|
||||
else echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -166,37 +145,15 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
unset($type);
|
||||
unset($row);
|
||||
<?php
|
||||
$alliance = $session->alliance;
|
||||
|
||||
if(($rels = $database->diplomacyExistingRelationships($alliance)) && count($rels)){
|
||||
foreach($rels as $key => $row){
|
||||
if($row['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($row['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($row['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="104"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli2'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$row['alli1'].'"><center>'.$database->getAllianceName($row['alli1']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
foreach($rels as $row){
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="104"><input type="hidden" name="id" value="'.$row['id'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.($row['alli1'] == $session->alliance ? $row['alli2'] : $row['alli1']).'"><center>'.$database->getAllianceName(($row['alli1'] == $session->alliance ? $row['alli2'] : $row['alli1'])).'</a></center></td><td width="80"><center>'.(["Conf", "Nap", "War"])[$row['type']-1].'</center></td></tr>';
|
||||
}
|
||||
} elseif(($rels = $database->diplomacyExistingRelationships2($alliance)) && count($rels)){
|
||||
foreach($rels as $key => $row){
|
||||
if($row['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($row['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($row['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="104"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli1'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$row['alli2'].'"><center>'.$database->getAllianceName($row['alli2']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
}
|
||||
}else {
|
||||
echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
}
|
||||
|
||||
else echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,23 +1,18 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$allianceInvitations = $database->getAliInvitations($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="invite" class="small_option"><thead>
|
||||
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<input type="hidden" name="o" value="4">
|
||||
<input type="hidden" name="a" value="4">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="invite" class="small_option"><thead>
|
||||
<tr>
|
||||
<th colspan="2">Invite a player into the alliance</th>
|
||||
</tr>
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
@@ -44,4 +41,4 @@ include("alli_menu.tpl");
|
||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
</p>
|
||||
</form>
|
||||
<p class="error"></p>
|
||||
<p class="error"><?php echo $form->getError("perm"); ?></p>
|
||||
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
@@ -13,7 +9,7 @@ include("alli_menu.tpl");
|
||||
<input type="hidden" name="a" value="5">
|
||||
<input type="hidden" name="o" value="5">
|
||||
<input type="hidden" name="s" value="5">
|
||||
|
||||
<table cellpadding="1" cellspacing="1"><thead>
|
||||
<tr>
|
||||
<th colspan="2">Link to the forum</th>
|
||||
</tr>
|
||||
@@ -21,7 +17,8 @@ include("alli_menu.tpl");
|
||||
</thead><tbody>
|
||||
|
||||
<tr><th>URL</th>
|
||||
<td><input class="link text" type="text" name="f_link" value="<?php echo $allianceinfo['forumlink']; ?>" maxlength="200"></td>
|
||||
<td><input class="link text" type="text" name="f_link" value="<?php echo isset($_POST['f_link']) ? $_POST['f_link'] : ((string)($allianceinfo['forumlink']) != "0" ? $allianceinfo['forumlink'] : ""); ?>" maxlength="200">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -29,4 +26,5 @@ include("alli_menu.tpl");
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p></form>
|
||||
<p class="error"><?php echo $form->getError("perm"); ?></p>
|
||||
@@ -1,12 +1,7 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$noticeArray = $database->readAlliNotice($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
include_once("alli_menu.tpl");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="options" class="small_option"><thead>
|
||||
<p class="error"><?php echo $form->getError("perm"); ?></p>
|
||||
<form method="POST" action="allianz.php">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<table cellpadding="1" cellspacing="1" id="options" class="small_option">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Options</th>
|
||||
</tr></thead><tbody>
|
||||
@@ -82,4 +81,4 @@ if ($alliance->userPermArray['opt5']==1){
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" onclick="this.disabled=true;this.form.submit();"/></form></p>
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" onclick="this.disabled=true;this.form.submit();"/></p></form>
|
||||
@@ -1,10 +1,7 @@
|
||||
<?php
|
||||
if(isset($_GET['aid'])) {
|
||||
$aid = $_GET['aid'];
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(isset($_GET['aid'])) $aid = $_GET['aid'];
|
||||
else $aid = $session->alliance;
|
||||
|
||||
$varmedal = $database->getProfileMedalAlly($aid);
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$isOwner = ($aid && $database->isAllianceOwner($session->uid) == $aid);
|
||||
|
||||
@@ -15,13 +11,12 @@ if ($isOwner) {
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="quit" class="small_option"><thead>
|
||||
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="11">
|
||||
<input type="hidden" name="o" value="11">
|
||||
<input type="hidden" name="s" value="5">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="quit" class="small_option"><thead>
|
||||
<tr>
|
||||
<th colspan="2">Quit alliance</th>
|
||||
</tr>
|
||||
@@ -80,6 +75,7 @@ include("alli_menu.tpl");
|
||||
</th>
|
||||
<td>
|
||||
<input class="pass text" type="password" name="pw" maxlength="20">
|
||||
<span class="error3"><?php echo $form->getError("pw"); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -98,4 +94,5 @@ include("alli_menu.tpl");
|
||||
}
|
||||
?>
|
||||
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<p class="error"><?php echo $form->getError("founder"); ?></p>
|
||||
@@ -47,7 +47,7 @@ echo "
|
||||
foreach($alliance->inviteArray as $invite) {
|
||||
echo "<td class=\"abo\"><a href=\"build.php?id=".$id."&a=2&d=".$invite['id']."\"><img class=\"del\" src=\"img/x.gif\" alt=\"refuse\" title=\"".REFUSE."\" /></a></td>
|
||||
<td class=\"nam\"><a href=\"allianz.php?aid=".$invite['alliance']."\"> ".$database->getAllianceName($invite['alliance'])."</a></td>
|
||||
<td class=\"acc\"><a href=\"build.php?id=".$id."&a=3&d=".$invite['id']."\"> ".ACCEPT."</a></td><tr>";
|
||||
<td class=\"acc\"><a href=\"build.php?id=".$id."&a=3&d=".$invite['id']."\"> ".ACCEPT."</a></td>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user