mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-30 09:34:28 +00:00
more alliance fixes
This commit is contained in:
+75
-50
@@ -107,43 +107,30 @@
|
||||
*****************************************/
|
||||
public function sendInvite($post) {
|
||||
global $form, $database, $session;
|
||||
// ¿El campo posee informacion?
|
||||
if(!isset($post['a_name']) || $post['a_name'] == "") {
|
||||
$form->addError("name1", NAME_EMPTY);
|
||||
}
|
||||
// ¿Existe el usuario?
|
||||
if(!$database->checkExist($post['a_name'], 0)) {
|
||||
$form->addError("name2", NAME_NO_EXIST);
|
||||
}
|
||||
// ¿La invitacion es a si mismo?
|
||||
if($post['a_name'] == ($session->username)) {
|
||||
$form->addError("name3", SAME_NAME);
|
||||
}
|
||||
// ¿Esta ya invitado a la alianza?
|
||||
if($session->access != BANNED){
|
||||
$UserData = $database->getUserArray($post['a_name'], 0);
|
||||
if($database->getInvitation($UserData['id'])) {
|
||||
$form->addError("name4", OLRADY_INVITED);
|
||||
}
|
||||
// ¿Esta ya en la alianza?
|
||||
$UserData = $database->getUserArray($post['a_name'], 0);
|
||||
if($UserData['alliance'] == $session->alliance) {
|
||||
$form->addError("name5", OLRADY_IN_ALLY);
|
||||
}
|
||||
// ¿La invitación la envia un autorizado?
|
||||
if($this->userPermArray['opt4'] == 0) {
|
||||
$form->addError("perm", NO_PERMISSION);
|
||||
}
|
||||
if($form->returnErrors() != 0) {
|
||||
$_SESSION['errorarray'] = $form->getErrors();
|
||||
$_SESSION['valuearray'] = $post;
|
||||
print_r($form->getErrors());
|
||||
} else {
|
||||
}elseif(!isset($post['a_name']) || $post['a_name'] == "") {
|
||||
$form->addError("name1", NAME_EMPTY);
|
||||
}elseif(!$database->checkExist($post['a_name'], 0)) {
|
||||
$form->addError("name2", NAME_NO_EXIST.$post['a_name']);
|
||||
}elseif($post['a_name'] == (addslashes($session->username))) {
|
||||
$form->addError("name3", SAME_NAME);
|
||||
}elseif($database->getInvitation2($UserData['id'],$session->alliance)) {
|
||||
$form->addError("name4", $post['a_name'].ALREADY_INVITED);
|
||||
}elseif($UserData['alliance'] == $session->alliance) {
|
||||
$form->addError("name5", $post['a_name'].ALREADY_IN_ALLY);
|
||||
}else{
|
||||
// Obtenemos la informacion necesaria
|
||||
$aid = $session->alliance;
|
||||
// Insertamos invitacion
|
||||
$database->sendInvitation($UserData['id'], $aid, $session->uid);
|
||||
// Log the notice
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has invited <a href="spieler.php?uid=' . $UserData['id'] . '">' . $UserData['username'] . '</a> into the alliance.');
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has invited <a href="spieler.php?uid=' . $UserData['id'] . '">' . $UserData['username'] . '</a> into the alliance.');
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,13 +139,17 @@
|
||||
*****************************************/
|
||||
private function rejectInvite($get) {
|
||||
global $database, $session;
|
||||
if($session->access != BANNED){
|
||||
foreach($this->inviteArray as $invite) {
|
||||
if($invite['id'] == $get['d']) {
|
||||
$database->removeInvitation($get['d']);
|
||||
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has rejected the invitation.');
|
||||
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has rejected the invitation.');
|
||||
}
|
||||
}
|
||||
header("Location: build.php?id=".$get['id']);
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
@@ -166,14 +157,19 @@
|
||||
*****************************************/
|
||||
private function delInvite($get) {
|
||||
global $database, $session;
|
||||
if($session->access != BANNED){
|
||||
$inviteArray = $database->getAliInvitations($session->alliance);
|
||||
foreach($inviteArray as $invite) {
|
||||
if($invite['id'] == $get['d']) {
|
||||
$invitename = $database->getUserArray($invite['uid'], 1);
|
||||
$database->removeInvitation($get['d']);
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has deleted the invitation for <a href="spieler.php?uid=' . $invitename['id'] . '">' . $invitename['username'] . '</a>.');
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has deleted the invitation for <a href="spieler.php?uid=' . $invitename['id'] . '">' . $invitename['username'] . '</a>.');
|
||||
}
|
||||
}
|
||||
header("Location: allianz.php?delinvite");
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
@@ -181,8 +177,10 @@
|
||||
*****************************************/
|
||||
private function acceptInvite($get) {
|
||||
global $form, $database, $session;
|
||||
if($session->access != BANNED){
|
||||
foreach($this->inviteArray as $invite) {
|
||||
if($invite['id'] == $get['d']) {
|
||||
if($session->alliance == 0){
|
||||
if($invite['id'] == $get['d'] && $invite['uid'] == $session->uid) {
|
||||
$memberlist = $database->getAllMember($invite['alliance']);
|
||||
$alliance_info = $database->getAlliance($invite['alliance']);
|
||||
if(count($memberlist) < $alliance_info['max']){
|
||||
@@ -190,18 +188,22 @@
|
||||
$database->updateUserField($database->RemoveXSS($invite['uid']), "alliance", $database->RemoveXSS($invite['alliance']), 1);
|
||||
$database->createAlliPermissions($database->RemoveXSS($invite['uid']), $database->RemoveXSS($invite['alliance']), '', '0', '0', '0', '0', '0', '0', '0', '0');
|
||||
// Log the notice
|
||||
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has joined the alliance.');
|
||||
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has joined the alliance.');
|
||||
}else{
|
||||
$accept_error = 1;
|
||||
$max = $alliance_info['max'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($accept_error == 1){
|
||||
$form->addError("ally_accept", "The alliance can contain only ".$max." peoples right now.");
|
||||
}else{
|
||||
header("Location: build.php?id=" . $get['id']);
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
@@ -209,6 +211,7 @@
|
||||
*****************************************/
|
||||
private function createAlliance($post) {
|
||||
global $form, $database, $session, $bid18, $village;
|
||||
if($session->access != BANNED){
|
||||
if(!isset($post['ally1']) || $post['ally1'] == "") {
|
||||
$form->addError("ally1", ATAG_EMPTY);
|
||||
}
|
||||
@@ -233,9 +236,12 @@
|
||||
// Asign Permissions
|
||||
$database->createAlliPermissions($database->RemoveXSS($session->uid), $database->RemoveXSS($aid), 'Alliance founder', '1', '1', '1', '1', '1', '1', '1', '1');
|
||||
// log the notice
|
||||
$database->insertAlliNotice($aid, 'The alliance has been founded by <a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a>.');
|
||||
$database->insertAlliNotice($aid, 'The alliance has been founded by <a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a>.');
|
||||
header("Location: build.php?id=" . $post['id']);
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
@@ -243,7 +249,7 @@
|
||||
*****************************************/
|
||||
private function changeAliName($get) {
|
||||
global $form, $database, $session;
|
||||
|
||||
if($session->access != BANNED){
|
||||
if(!isset($get['ally1']) || $get['ally1'] == "") {
|
||||
$form->addError("ally1", ATAG_EMPTY);
|
||||
}
|
||||
@@ -266,7 +272,10 @@
|
||||
} else {
|
||||
$database->setAlliName($database->RemoveXSS($session->alliance), $database->RemoveXSS($get['ally2']), $database->RemoveXSS($get['ally1']));
|
||||
// log the notice
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed the alliance name.');
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has changed the alliance name.');
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,6 +284,7 @@
|
||||
*****************************************/
|
||||
private function updateAlliProfile($post) {
|
||||
global $database, $session, $form;
|
||||
if($session->access != BANNED){
|
||||
if($this->userPermArray['opt3'] == 0) {
|
||||
$form->addError("perm", NO_PERMISSION);
|
||||
}
|
||||
@@ -285,7 +295,10 @@
|
||||
} else {
|
||||
$database->submitAlliProfile($database->RemoveXSS($session->alliance), $database->RemoveXSS($post['be2']), $database->RemoveXSS($post['be1']));
|
||||
// log the notice
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed the alliance description.');
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has changed the alliance description.');
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,6 +307,7 @@
|
||||
*****************************************/
|
||||
private function changeUserPermissions($post) {
|
||||
global $database, $session, $form;
|
||||
if($session->access != BANNED){
|
||||
if($this->userPermArray['opt1'] == 0) {
|
||||
$form->addError("perm", NO_PERMISSION);
|
||||
}
|
||||
@@ -304,30 +318,30 @@
|
||||
} else {
|
||||
$database->updateAlliPermissions($post['a_user'], $session->alliance, $post['a_titel'], $post['e1'], $post['e2'], $post['e3'], $post['e4'], $post['e5'], $post['e6'], $post['e7']);
|
||||
// log the notice
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed permissions.');
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has changed permissions.');
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
|
||||
}
|
||||
/*****************************************
|
||||
Function to kick a user from alliance
|
||||
*****************************************/
|
||||
private function kickAlliUser($post) {
|
||||
global $database, $session, $form;
|
||||
|
||||
if($session->access != BANNED){
|
||||
$UserData = $database->getUserArray($post['a_user'], 0);
|
||||
if($this->userPermArray['opt2'] == 0) {
|
||||
$form->addError("perm", NO_PERMISSION);
|
||||
}
|
||||
if($form->returnErrors() != 0) {
|
||||
$_SESSION['errorarray'] = $form->getErrors();
|
||||
$_SESSION['valuearray'] = $post;
|
||||
//header("Location: build.php?id=".$post['id']);
|
||||
} else {
|
||||
} else if($UserData['id'] != $session->uid){
|
||||
$database->updateUserField($post['a_user'], 'alliance', 0, 1);
|
||||
$database->deleteAlliPermissions($post['a_user']);
|
||||
$database->deleteAlliance($session->alliance);
|
||||
// log the notice
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> kicked <a href="spieler.php?uid=' . $post['a_user'] . '">' . $UserData['username'] . '</a>.');
|
||||
//header("Location: build.php?id=".$post['id']);
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $UserData['id'] . '">' . $post['a_user'] . '</a> has quit the alliance.');
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
/*****************************************
|
||||
@@ -335,9 +349,13 @@
|
||||
*****************************************/
|
||||
public function setForumLink($post) {
|
||||
global $database, $session;
|
||||
if($session->access != BANNED){
|
||||
if(isset($post['f_link'])){
|
||||
$database->setAlliForumLink($session->alliance, $post['f_link']);
|
||||
header("Location: allianz.php?s=5");
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*****************************************
|
||||
@@ -345,6 +363,7 @@
|
||||
*****************************************/
|
||||
private function quitally($post) {
|
||||
global $database, $session, $form;
|
||||
if($session->access != BANNED){
|
||||
if(!isset($post['pw']) || $post['pw'] == "") {
|
||||
$form->addError("pw1", PW_EMPTY);
|
||||
} elseif(md5($post['pw']) !== $session->userinfo['password']) {
|
||||
@@ -354,14 +373,17 @@
|
||||
$database->deleteAlliPermissions($session->uid);
|
||||
// log the notice
|
||||
$database->deleteAlliance($session->alliance);
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has quit the alliance.');
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has quit the alliance.');
|
||||
header("Location: spieler.php?uid=".$session->uid);
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
private function changediplomacy($post) {
|
||||
global $database, $session, $form;
|
||||
|
||||
if($session->access != BANNED){
|
||||
$aName = $database->RemoveXSS($_POST['a_name']);
|
||||
$aType = (int)intval($_POST['dipl']);
|
||||
if($database->aExist($aName, "tag")) {
|
||||
@@ -391,6 +413,9 @@
|
||||
} else {
|
||||
$form->addError("name", "Alliance does not exist");
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1462,6 +1462,12 @@ class MYSQL_DB {
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
}
|
||||
|
||||
function getInvitation2($uid, $aid) {
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "ali_invite where uid = $uid and alliance = $aid";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
}
|
||||
|
||||
function getAliInvitations($aid) {
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "ali_invite where alliance = $aid && accept = 0";
|
||||
|
||||
@@ -69,6 +69,11 @@ define("ATAG_EXIST","Tag taken");
|
||||
define("ANAME_EXIST","Name taken");
|
||||
define("NOT_OPENED_YET","Server not started yet.");
|
||||
define("REGISTER_CLOSED","The register is closed. You can't register to this server.");
|
||||
define("NAME_EMPTY","Please insert name");
|
||||
define("NAME_NO_EXIST","There is no user with the name ");
|
||||
define("SAME_NAME","You can't invite yourself");
|
||||
define("ALREADY_INVITED"," already invited");
|
||||
define("ALREADY_IN_ALLY"," already in this alliance");
|
||||
|
||||
//COPYRIGHT
|
||||
define("TRAVIAN_COPYRIGHT","TravianZ 100% Open Source Travian Clone.");
|
||||
|
||||
@@ -15,8 +15,7 @@ foreach($memberlist as $member) {
|
||||
}
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="edit"><thead>
|
||||
<form method="post" action="allianz.php">
|
||||
@@ -134,9 +133,4 @@ INDELING CATEGORIEEN:
|
||||
</table></p>
|
||||
</table>
|
||||
|
||||
<p class="btn"><input tabindex="3" type="image" value="" name="s1" id="btn_save" class="dynamic_img" src="img/x.gif" alt="save" /></p></form>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
<p class="btn"><input tabindex="3" type="image" value="" name="s1" id="btn_save" class="dynamic_img" src="img/x.gif" alt="save" /></p></form>
|
||||
@@ -8,7 +8,6 @@ $aid = $session->alliance;
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" cellpadding="1" cellspacing="1" id="name" class="small_option"><thead>
|
||||
<form method="post" action="allianz.php">
|
||||
@@ -36,9 +35,4 @@ if($session->access!=BANNED){
|
||||
<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>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
<p class="error3"><?php echo $form->getError("name"); ?></p>
|
||||
@@ -24,7 +24,6 @@
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="6"> <input type="hidden" name="o" value="6"> <input type="hidden" name="s" value="5">
|
||||
@@ -200,9 +199,4 @@
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
@@ -9,7 +9,6 @@ $allianceinfo = $database->getAlliance($aid);
|
||||
$allianceInvitations = $database->getAliInvitations($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="invite" class="small_option"><thead>
|
||||
@@ -27,7 +26,7 @@ if($session->access!=BANNED){
|
||||
<td><input class="name text" type="text" name="a_name" maxlength="20"><span class="error"></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><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 class="error"><?php echo $form->getError("name1"); ?><br /><?php echo $form->getError("name2"); ?><br /><?php echo $form->getError("name3"); ?><br /><?php echo $form->getError("name4"); ?><br /><?php echo $form->getError("name5"); ?><br /><?php echo $form->getError("perm"); ?></p><br />
|
||||
<table cellpadding="1" cellspacing="1" id="invitations" class="small_option"><thead>
|
||||
@@ -53,9 +52,4 @@ if (count($allianceInvitations) == 0) {
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
@@ -9,7 +9,6 @@ $memberlist = $database->getAllMember($aid);
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
|
||||
@@ -43,9 +42,4 @@ 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");
|
||||
}
|
||||
?>
|
||||
<p class="error"></p>
|
||||
@@ -8,7 +8,6 @@ $aid = $session->alliance;
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="5">
|
||||
@@ -30,9 +29,4 @@ if($session->access!=BANNED){
|
||||
</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>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
@@ -82,4 +82,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" /></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();"/></form></p>
|
||||
@@ -8,7 +8,6 @@ $aid = $session->alliance;
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="quit" class="small_option"><thead>
|
||||
|
||||
@@ -26,9 +25,4 @@ if($session->access!=BANNED){
|
||||
<td><input class="pass text" type="password" name="pw" maxlength="20"></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>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
@@ -46,15 +46,9 @@ echo "
|
||||
<?php
|
||||
if($alliance->gotInvite) {
|
||||
foreach($alliance->inviteArray as $invite) {
|
||||
if($session->access!=BANNED){
|
||||
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>";
|
||||
}else{
|
||||
echo "<td class=\"abo\"><a href=\"banned.php\"><img class=\"del\" src=\"img/x.gif\" alt=\"refuse\" title=\"refuse\" /></a></td>
|
||||
<td class=\"nam\"><a href=\"banned.php\"> ".$database->getAllianceName($invite['alliance'])."</a></td>
|
||||
<td class=\"acc\"><a href=\"banned.php\"> accept</a></td>";
|
||||
}
|
||||
<td class=\"acc\"><a href=\"build.php?id=".$id."&a=3&d=".$invite['id']."\"> accept</a></td><tr>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename text.tpl ##
|
||||
## Filename text_format.tpl ##
|
||||
## Developed by: Dixie ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
@@ -10,7 +10,7 @@
|
||||
#################################################################################
|
||||
|
||||
|
||||
$txt="ssss";
|
||||
$txt="1";
|
||||
|
||||
//bbcode = html code
|
||||
$txt = preg_replace("/\[b\]/is",'<b>', $txt);
|
||||
|
||||
+6
-5
@@ -164,7 +164,7 @@ if($_GET['aid'] or $_GET['fid'] or $_GET['fid2'] or $session->alliance!=0){
|
||||
?>
|
||||
<div id="mid">
|
||||
<?php
|
||||
|
||||
$invite_permission = $database->getAlliancePermission($session->uid, "opt4", 0);
|
||||
include ("Templates/menu.tpl");
|
||||
|
||||
if(isset($_GET['s']) && $_GET['s'] == 2) {
|
||||
@@ -199,7 +199,9 @@ if($_GET['aid'] or $_GET['fid'] or $_GET['fid2'] or $session->alliance!=0){
|
||||
// Options
|
||||
}else{
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
}} elseif(isset($_POST['o'])) {
|
||||
}}else if(isset($_GET['delinvite']) && $invite_permission == 1){
|
||||
include ("Templates/Alliance/invite.tpl");
|
||||
} elseif(isset($_POST['o'])) {
|
||||
switch($_POST['o']) {
|
||||
case 1:
|
||||
if(isset($_POST['s']) == 5 && isset($_POST['a_user'])) {
|
||||
@@ -285,10 +287,9 @@ if($_GET['aid'] or $_GET['fid'] or $_GET['fid2'] or $session->alliance!=0){
|
||||
$database->diplomacyCancelExistingRelationship($_POST['id'], $_POST['alli2']);
|
||||
include ("Templates/Alliance/chgdiplo.tpl");
|
||||
}
|
||||
} else {
|
||||
|
||||
} else {
|
||||
include ("Templates/Alliance/overview.tpl");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user