mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-30 07:07:14 +00:00
The first release of the refactored version
It's still a work in progress, there are a lot of things that will change in the final release
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<Files ~ "\.tpl$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
@@ -0,0 +1,4 @@
|
||||
<Files ~ "\.tpl$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
|
||||
if($session->access != ADMIN && ($session->alliance == 0 || ($session->alliance > 0 && !$opt['opt5']))) $alliance->redirect($_GET);
|
||||
|
||||
?>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
function showCheckList() {
|
||||
bid = document.getElementById('bid');
|
||||
if(bid.value == 2) {
|
||||
document.getElementById('conf_list').className = '';
|
||||
document.getElementById('ally_list').className = '';
|
||||
document.getElementById('user_list').className = 'hide';
|
||||
}
|
||||
else if (bid.value == 3) {
|
||||
document.getElementById('conf_list').className = 'hide';
|
||||
document.getElementById('ally_list').className = 'hide';
|
||||
document.getElementById('user_list').className = '';
|
||||
}
|
||||
else {
|
||||
document.getElementById('conf_list').className = 'hide';
|
||||
document.getElementById('ally_list').className = 'hide';
|
||||
document.getElementById('user_list').className = 'hide';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
function addRow(element_id) {
|
||||
// element_id: user_list, ally_list
|
||||
|
||||
liste = document.getElementById(element_id);
|
||||
liste = liste.getElementsByTagName('tbody')[0];
|
||||
|
||||
var anzahl_trs = liste.getElementsByTagName('tr').length;
|
||||
var num_fields = anzahl_trs;
|
||||
var num_last_tr = anzahl_trs -1;
|
||||
|
||||
lastTR = liste.getElementsByTagName('tr')[num_last_tr];
|
||||
lastTD = lastTR.getElementsByTagName('td')[2];
|
||||
lastIMG = lastTD.getElementsByTagName('img')[0];
|
||||
lastTD.removeChild(lastIMG);
|
||||
|
||||
newTR = document.createElement('tr');
|
||||
newTD1 = document.createElement('td');
|
||||
newTD2 = document.createElement('td');
|
||||
newTD3 = document.createElement('td');
|
||||
newTR.appendChild(newTD1);
|
||||
newTR.appendChild(newTD2);
|
||||
newTR.appendChild(newTD3);
|
||||
liste.appendChild(newTR);
|
||||
|
||||
var html_input_1 = '<input class="text" type="text" ';
|
||||
|
||||
if(element_id == 'ally_list') {
|
||||
newTD1.className = 'ally';
|
||||
newTD2.className = 'tag';
|
||||
newTD3.className = 'ad';
|
||||
newTD1.innerHTML = html_input_1 + 'id="allys_by_id_'+num_fields+'" class="text" maxlength="15" name="allys_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
|
||||
newTD2.innerHTML = html_input_1 + 'id="allys_by_name_'+num_fields+'" class="text" maxlength="15" name="allys_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
|
||||
}
|
||||
|
||||
if(element_id == 'user_list') {
|
||||
newTD1.className = 'id';
|
||||
newTD2.className = 'pla';
|
||||
newTD3.className = 'ad';
|
||||
newTD1.innerHTML = html_input_1 + 'id="users_by_id_'+num_fields+'" class="text" maxlength="15" name="users_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
|
||||
newTD2.innerHTML = html_input_1 + 'id="users_by_name_'+num_fields+'" class="text" maxlength="50" name="users_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
|
||||
}
|
||||
|
||||
newTD3.innerHTML = '<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow(\''+element_id+'\')">';
|
||||
}
|
||||
|
||||
</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
function checkInputs(id, typ) {
|
||||
id_field = document.getElementById(typ+'_by_id_'+id);
|
||||
name_field = document.getElementById(typ+'_by_name_'+id);
|
||||
|
||||
//alert(id_field.value);
|
||||
//alert(name_field.value);
|
||||
|
||||
if (id_field.value != '' && id_field.disabled == false) {
|
||||
name_field.disabled = true;
|
||||
name_field.style.border = '1px solid #999';
|
||||
}
|
||||
else {
|
||||
name_field.disabled = false;
|
||||
name_field.style.border = '1px solid #71D000';
|
||||
}
|
||||
|
||||
if (name_field.value != '' && name_field.disabled == false) {
|
||||
id_field.disabled = true;
|
||||
id_field.style.border = '1px solid #999';
|
||||
}
|
||||
else {
|
||||
id_field.disabled = false;
|
||||
id_field.style.border = '1px solid #71D000';
|
||||
}
|
||||
}
|
||||
|
||||
</script><form method="post" action="allianz.php?s=2">
|
||||
<input type="hidden" name="new" value="1">
|
||||
|
||||
<input type="hidden" name="newforum" value="1">
|
||||
<input type="hidden" name="admin" value="1">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="new_forum"><thead>
|
||||
<tr>
|
||||
<th colspan="2">New forum</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
|
||||
<th>Forum name</th>
|
||||
<td><input class="text" type="text" name="u1" value="" maxlength="20"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<td><input class="text" type="text" name="u2" value="" maxlength="38"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Forum type</th>
|
||||
<td><select class="dropdown" id="bid" name="bid" onchange="showCheckList();"><?php if($session->access == ADMIN){ ?><option value="1">Public Forum</option><?php }else{ ?><option value="2">Confederation Forum</option><option value="0" selected>Alliance Forum</option><option value="3">Closed Forum</option><?php } ?></select></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<?php if($session->access != ADMIN){ ?>
|
||||
<table cellpadding="1" cellspacing="1" id="ally_list"><thead>
|
||||
<tr>
|
||||
|
||||
<th colspan="3">Open for more alliances</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alliance ID</td>
|
||||
<td>Tag:</td>
|
||||
<td>Add</td>
|
||||
</tr>
|
||||
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td class="ally">
|
||||
<input class="text" type="text" id="allys_by_id_0" maxlength="15" name="allys_by_id[0]" onkeyup="checkInputs(0,'allys');" />
|
||||
</td>
|
||||
<td class="tag">
|
||||
<input class="text" type="text" id="allys_by_name_0" maxlength="15" name="allys_by_name[0]" onkeyup="checkInputs(0,'allys');" />
|
||||
</td>
|
||||
<td class="ad">
|
||||
|
||||
<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow('ally_list')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table><table cellpadding="1" cellspacing="1" id="user_list"><thead>
|
||||
<tr>
|
||||
<th colspan="3">Open forum for the following players</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User ID</td>
|
||||
|
||||
<td>Name:</td>
|
||||
<td>Add</td>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td class="id">
|
||||
<input class="text" type="text" id="users_by_id_0" maxlength="15" name="users_by_id[0]" onkeyup="checkInputs(0,'users');" />
|
||||
</td>
|
||||
|
||||
<td class="pla">
|
||||
<input class="text" type="text" id="users_by_name_0" maxlength="50" name="users_by_name[0]" onkeyup="checkInputs(0,'users');" />
|
||||
</td>
|
||||
<td class="ad">
|
||||
<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow('user_list')" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
showCheckList();
|
||||
|
||||
</script>
|
||||
<?php } ?>
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></p></form>
|
||||
@@ -0,0 +1,310 @@
|
||||
<?php
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
|
||||
$topic_id = $_GET['tid'];
|
||||
$post_id = $_GET['pod'];
|
||||
$topics = reset($database->ShowTopic($topic_id));
|
||||
$posts = $database->ShowPostEdit($post_id);
|
||||
|
||||
//Check if we're modifying a valid post
|
||||
if(empty($topics) || empty($posts)) $alliance->redirect($_GET);
|
||||
|
||||
$title = stripslashes($topics['title']);
|
||||
|
||||
foreach($posts as $pos){
|
||||
$poss = stripslashes($pos['post']);
|
||||
$poss = preg_replace('/\[message\]/', '', $poss);
|
||||
$poss = preg_replace('/\[\/message\]/', '', $poss);
|
||||
$owner = $pos['owner'];
|
||||
}
|
||||
?>
|
||||
<form method="post" name="post"
|
||||
action="allianz.php?s=2&fid2=<?php echo $topics['cat']; ?>&tid=<?php echo $topics['id']; ?>">
|
||||
<input type="hidden" name="s" value="2"> <input type="hidden"
|
||||
name="pod" value="<?php echo $_GET['pod']; ?>"> <input type="hidden"
|
||||
type="hidden" name="editpost" value="1">
|
||||
<table cellpadding="1" cellspacing="1" id="edit_post">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit answer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Thread</th>
|
||||
<td><?php echo $title; ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
|
||||
<div bbArea="text" id="text_container" name="text_container">
|
||||
<div id="text_toolbar" name="text_toolbar">
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="b">
|
||||
<div title="bold" alt="bold" class="bbButton bbBold"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="i">
|
||||
<div title="italic" alt="italic" class="bbButton bbItalic"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="u">
|
||||
<div title="underlined" alt="underlined"
|
||||
class="bbButton bbUnderscore"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="alliance">
|
||||
<div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="player">
|
||||
<div title="Player" alt="Player" class="bbButton bbPlayer"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="coor">
|
||||
<div title="Coordinates" alt="Coordinates"
|
||||
class="bbButton bbCoordinate"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="report">
|
||||
<div title="Report" alt="Report" class="bbButton bbReport"></div>
|
||||
</a> <a href="javascript:void(0);" bbWin="resources"
|
||||
id="text_resourceButton">
|
||||
<div title="Resources" alt="Resources"
|
||||
class="bbButton bbResource"></div>
|
||||
</a> <a href="javascript:void(0);" bbWin="smilies"
|
||||
id="text_smilieButton">
|
||||
<div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div>
|
||||
</a> <a href="javascript:void(0);" bbWin="troops"
|
||||
id="text_troopButton">
|
||||
<div title="Troops" alt="Troops" class="bbButton bbTroop"></div>
|
||||
</a> <a href="javascript:void(0);" id="text_previewButton"
|
||||
bbArea="text">
|
||||
<div title="Preview" alt="Preview" class="bbButton bbPreview"></div>
|
||||
</a>
|
||||
|
||||
<div class="clear"></div>
|
||||
<div id="text_toolbarWindows">
|
||||
<div id="text_resources" name="text_resources">
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="lumber"><img
|
||||
src="img/x.gif" class="r1" title="Wood" alt="Wood" /></a> <a
|
||||
href="javascript:void(0);" bbType="o" bbTag="clay"><img
|
||||
src="img/x.gif" class="r2" title="Clay" alt="{$smarty.const.CLAY}" /></a> <a
|
||||
href="javascript:void(0);" bbType="o" bbTag="iron"><img
|
||||
src="img/x.gif" class="r3" title="Iron" alt="{$smarty.const.IRON}" /></a> <a
|
||||
href="javascript:void(0);" bbType="o" bbTag="crop"><img
|
||||
src="img/x.gif" class="r4" title="Crop" alt="{$smarty.const.CROP}" /></a>
|
||||
</div>
|
||||
<div id="text_smilies" name="text_smilies">
|
||||
<a href="javascript:void(0);" bbType="s" bbTag="*aha*"><img
|
||||
class="smiley aha" src="img/x.gif" alt="*aha*" title="*aha*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*angry*"><img
|
||||
class="smiley angry" src="img/x.gif" alt="*angry*"
|
||||
title="*angry*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*cool*"><img class="smiley cool" src="img/x.gif"
|
||||
alt="*cool*" title="*cool*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*cry*"><img
|
||||
class="smiley cry" src="img/x.gif" alt="*cry*" title="*cry*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*cute*"><img
|
||||
class="smiley cute" src="img/x.gif" alt="*cute*"
|
||||
title="*cute*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*depressed*"><img class="smiley depressed"
|
||||
src="img/x.gif" alt="*depressed*" title="*depressed*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*eek*"><img
|
||||
class="smiley eek" src="img/x.gif" alt="*eek*" title="*eek*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*ehem*"><img
|
||||
class="smiley ehem" src="img/x.gif" alt="*ehem*"
|
||||
title="*ehem*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*emotional*"><img class="smiley emotional"
|
||||
src="img/x.gif" alt="*emotional*" title="*emotional*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=":D"><img
|
||||
class="smiley grin" src="img/x.gif" alt=":D" title=":D" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=":)"><img
|
||||
class="smiley happy" src="img/x.gif" alt=":)" title=":)" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hit*"><img
|
||||
class="smiley hit" src="img/x.gif" alt="*hit*" title="*hit*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hmm*"><img
|
||||
class="smiley hmm" src="img/x.gif" alt="*hmm*" title="*hmm*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hmpf*"><img
|
||||
class="smiley hmpf" src="img/x.gif" alt="*hmpf*"
|
||||
title="*hmpf*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*hrhr*"><img class="smiley hrhr" src="img/x.gif"
|
||||
alt="*hrhr*" title="*hrhr*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*huh*"><img
|
||||
class="smiley huh" src="img/x.gif" alt="*huh*" title="*huh*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*lazy*"><img
|
||||
class="smiley lazy" src="img/x.gif" alt="*lazy*"
|
||||
title="*lazy*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*love*"><img class="smiley love" src="img/x.gif"
|
||||
alt="*love*" title="*love*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*nocomment*"><img
|
||||
class="smiley nocomment" src="img/x.gif" alt="*nocomment*"
|
||||
title="*nocomment*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*noemotion*"><img class="smiley noemotion"
|
||||
src="img/x.gif" alt="*noemotion*" title="*noemotion*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*notamused*"><img
|
||||
class="smiley notamused" src="img/x.gif" alt="*notamused*"
|
||||
title="*notamused*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*pout*"><img class="smiley pout"
|
||||
src="img/x.gif" alt="*pout*" title="*pout*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*redface*"><img
|
||||
class="smiley redface" src="img/x.gif" alt="*redface*"
|
||||
title="*redface*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*rolleyes*"><img class="smiley rolleyes"
|
||||
src="img/x.gif" alt="*rolleyes*" title="*rolleyes*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=":("><img
|
||||
class="smiley sad" src="img/x.gif" alt=":(" title=":(" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*shy*"><img
|
||||
class="smiley shy" src="img/x.gif" alt="*shy*" title="*shy*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*smile*"><img
|
||||
class="smiley smile" src="img/x.gif" alt="*smile*"
|
||||
title="*smile*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*tongue*"><img class="smiley tongue" src="img/x.gif"
|
||||
alt="*tongue*" title="*tongue*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*veryangry*"><img
|
||||
class="smiley veryangry" src="img/x.gif" alt="*veryangry*"
|
||||
title="*veryangry*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*veryhappy*"><img class="smiley veryhappy"
|
||||
src="img/x.gif" alt="*veryhappy*" title="*veryhappy*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=";)"><img
|
||||
class="smiley wink" src="img/x.gif" alt=";)" title=";)" /></a>
|
||||
</div>
|
||||
<div id="text_troops" name="text_troops">
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="tid1"><img
|
||||
class="unit u1" src="img/x.gif" title="Legionnaire"
|
||||
alt="Legionnaire" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid2"><img class="unit u2" src="img/x.gif"
|
||||
title="Praetorian" alt="Praetorian" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid3"><img
|
||||
class="unit u3" src="img/x.gif" title="Imperian"
|
||||
alt="Imperian" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid4"><img class="unit u4" src="img/x.gif"
|
||||
title="Equites Legati" alt="Equites Legati" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid5"><img
|
||||
class="unit u5" src="img/x.gif" title="Equites Imperatoris"
|
||||
alt="Equites Imperatoris" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid6"><img class="unit u6" src="img/x.gif"
|
||||
title="Equites Caesaris" alt="Equites Caesaris" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid7"><img
|
||||
class="unit u7" src="img/x.gif" title="Ram" alt="Ram" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid8"><img
|
||||
class="unit u8" src="img/x.gif" title="Fire Catapult"
|
||||
alt="Fire Catapult" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid9"><img class="unit u9" src="img/x.gif"
|
||||
title="Senator" alt="Senator" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid10"><img
|
||||
class="unit u10" src="img/x.gif" title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid11"><img
|
||||
class="unit u11" src="img/x.gif" title="Maceman" alt="Maceman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid12"><img
|
||||
class="unit u12" src="img/x.gif" title="Spearman"
|
||||
alt="Spearman" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid13"><img class="unit u13" src="img/x.gif"
|
||||
title="Axeman" alt="Axeman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid14"><img
|
||||
class="unit u14" src="img/x.gif" title="Scout" alt="Scout" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid15"><img
|
||||
class="unit u15" src="img/x.gif" title="Paladin" alt="Paladin" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid16"><img
|
||||
class="unit u16" src="img/x.gif" title="Teutonic Knight"
|
||||
alt="Teutonic Knight" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid17"><img class="unit u17" src="img/x.gif"
|
||||
title="Ram" alt="Ram" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid18"><img class="unit u18" src="img/x.gif"
|
||||
title="Catapult" alt="Catapult" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid19"><img
|
||||
class="unit u19" src="img/x.gif" title="Chieftain"
|
||||
alt="Chieftain" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid20"><img class="unit u20" src="img/x.gif"
|
||||
title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid21"><img
|
||||
class="unit u21" src="img/x.gif" title="Phalanx" alt="Phalanx" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid22"><img
|
||||
class="unit u22" src="img/x.gif" title="Swordsman"
|
||||
alt="Swordsman" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid23"><img class="unit u23" src="img/x.gif"
|
||||
title="Pathfinder" alt="Pathfinder" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid24"><img
|
||||
class="unit u24" src="img/x.gif" title="Theutates Thunder"
|
||||
alt="Theutates Thunder" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid25"><img class="unit u25" src="img/x.gif"
|
||||
title="Druidrider" alt="Druidrider" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid26"><img
|
||||
class="unit u26" src="img/x.gif" title="Haeduan" alt="Haeduan" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid27"><img
|
||||
class="unit u27" src="img/x.gif" title="Battering Ram"
|
||||
alt="Battering Ram" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid28"><img class="unit u28" src="img/x.gif"
|
||||
title="Trebuchet" alt="Trebuchet" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid29"><img
|
||||
class="unit u29" src="img/x.gif" title="Chief" alt="Chief" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid30"><img
|
||||
class="unit u30" src="img/x.gif" title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid31"><img
|
||||
class="unit u31" src="img/x.gif" title="Rat" alt="Rat" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid32"><img
|
||||
class="unit u32" src="img/x.gif" title="Spider" alt="Spider" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid33"><img
|
||||
class="unit u33" src="img/x.gif" title="Snake" alt="Snake" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid34"><img
|
||||
class="unit u34" src="img/x.gif" title="Bat" alt="Bat" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid35"><img
|
||||
class="unit u35" src="img/x.gif" title="Wild Boar"
|
||||
alt="Wild Boar" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid36"><img class="unit u36" src="img/x.gif"
|
||||
title="Wolf" alt="Wolf" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid37"><img class="unit u37" src="img/x.gif"
|
||||
title="Bear" alt="Bear" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid38"><img class="unit u38" src="img/x.gif"
|
||||
title="Crocodile" alt="Crocodile" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid39"><img
|
||||
class="unit u39" src="img/x.gif" title="Tiger" alt="Tiger" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid40"><img
|
||||
class="unit u40" src="img/x.gif" title="Elephant"
|
||||
alt="Elephant" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid41"><img class="unit u41" src="img/x.gif"
|
||||
title="Pikeman" alt="Pikeman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid42"><img
|
||||
class="unit u42" src="img/x.gif" title="Thorned Warrior"
|
||||
alt="Thorned Warrior" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid43"><img class="unit u43" src="img/x.gif"
|
||||
title="Guardsman" alt="Guardsman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid44"><img
|
||||
class="unit u44" src="img/x.gif" title="Birds of Prey"
|
||||
alt="Birds of Prey" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid45"><img class="unit u45" src="img/x.gif"
|
||||
title="Axerider" alt="Axerider" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid46"><img
|
||||
class="unit u46" src="img/x.gif" title="Natarian Knight"
|
||||
alt="Natarian Knight" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid47"><img class="unit u47" src="img/x.gif"
|
||||
title="War Elephant" alt="War Elephant" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid48"><img
|
||||
class="unit u48" src="img/x.gif" title="Ballista"
|
||||
alt="Ballista" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid49"><img class="unit u49" src="img/x.gif"
|
||||
title="Natarian Emperor" alt="Natarian Emperor" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid50"><img
|
||||
class="unit u50" src="img/x.gif" title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="hero"><img
|
||||
class="unit uhero" src="img/x.gif" title="Hero" alt="Hero" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line bbLine"></div>
|
||||
|
||||
<textarea id="text" name="text"><?php echo $poss; ?></textarea>
|
||||
<div id="text_preview" name="text_preview"></div>
|
||||
</div> <script>
|
||||
var bbEditor = new BBEditor("text");
|
||||
</script>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="btn">
|
||||
<input type="image" id="fbtn_ok" value="ok" name="s1"
|
||||
class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
|
||||
</form>
|
||||
</p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b>
|
||||
or <b>[/message]</b> in your post because it can cause problem with
|
||||
bbcode system.</span>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
$displayarray = $database->getUserArray($session->uid, 1);
|
||||
$forumcat = $database->ForumCat(htmlspecialchars($displayarray['alliance']));
|
||||
$forumcat = array_merge(!empty($forumcat) ? $forumcat : [],
|
||||
$session->sharedForums['alliance'],
|
||||
$session->sharedForums['confederation'],
|
||||
$session->sharedForums['closed']);
|
||||
|
||||
$countArray = [$database->countForums(0, $session->alliance) + count($session->sharedForums['alliance']),
|
||||
$database->countForums(1, -1),
|
||||
$database->countForums(2, $session->alliance) + count($session->sharedForums['confederation']),
|
||||
$database->countForums(3, $session->alliance) + count($session->sharedForums['closed'])];
|
||||
|
||||
$forumArea = ["Alliance Forum(s)", "Public Forum(s)", "Confederation Forum(s)", "Closed Forum(s)"];
|
||||
|
||||
foreach($countArray as $index => $count){
|
||||
if($session->alliance > 0 || ($session->alliance == 0 && $index == 1)){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="public">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4"><?php echo $forumArea[$index]; ?></th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($count == 0) echo "<tr><td colspan=\"4\" style=\"text-align: center\">".NO_FORUMS_YET."</td></tr>";
|
||||
}
|
||||
foreach($forumcat as $arr){
|
||||
if($arr['forum_area'] != $index || ($session->alliance == 0 && $arr['forum_area'] != 1)) continue;
|
||||
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $arr['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => $arr['owner'], 'admin' => $_GET['admin'], 'forum_owner' => $arr['owner']];
|
||||
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$lpost = $owner = "";
|
||||
if($countop > 0){
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las){
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
//If there are no posts yet, show the topic
|
||||
if($database->CheckLastPost($las['id']) == 0){
|
||||
$lpost = date('d.m.y H:i a', $las['date']);
|
||||
$owner = $database->getUserArray($las['owner'], 1);
|
||||
}else{
|
||||
foreach($lpos as $pos){
|
||||
$lpost = date('d.m.y H:i a', $pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr><td class="ico">';
|
||||
if(Alliance::canAct($checkArray)){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&res=1&admin=pos" title="To top">
|
||||
<img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit">
|
||||
<img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&res=0&admin=pos" title="To bottom">
|
||||
<img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete">
|
||||
<img src="img/x.gif" alt="delete" /></a>';
|
||||
}
|
||||
else echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
|
||||
|
||||
echo '</td><td class="tit">
|
||||
<a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.stripslashes($arr['forum_name']).'">'.stripslashes($arr['forum_name']).'</a><br />'.stripslashes($arr['forum_des']).'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br />';
|
||||
if(!empty($owner)){
|
||||
echo '<a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" />';
|
||||
}
|
||||
echo '</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<p>
|
||||
<?php
|
||||
if(isset($opt['opt5']) && $opt['opt5'] == 1 || $session->access == ADMIN){
|
||||
echo '<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a>';
|
||||
echo '<a href="allianz.php?s='.$ids.((isset($_GET['admin']) && !empty($_GET['admin']) && $_GET['admin'] == "switch_admin") ? "" : "&admin=switch_admin").'" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
|
||||
$topicID = $_GET['idt'];
|
||||
$showTopic = reset($database->ShowTopic($topicID));
|
||||
$forumData = reset($database->ForumCatEdit($showTopic['cat']));
|
||||
$title = stripslashes($showTopic['title']);
|
||||
$canBeMoved = $forumData['forum_area'] == 1 && $session->access == 9;
|
||||
?>
|
||||
<form method="post" action="allianz.php?s=2&fid=<?php echo $_GET['fid']; ?>">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="tid" value="<?php echo $topicID; ?>">
|
||||
<?php if(!$canBeMoved){ ?>
|
||||
<input type="hidden" name="fid" value="<?php echo $showTopic['cat']; ?>">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="edittopic" value="1">
|
||||
<table cellpadding="1" cellspacing="1" id="edit_topic"><thead>
|
||||
<tr>
|
||||
<td colspan="2">Edit topic</td>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<th>Thread</th>
|
||||
<td><input class="text" type="Text" name="thema" value="<?php echo $title; ?>" maxlength="35"></td>
|
||||
</tr>
|
||||
<?php if($canBeMoved){?>
|
||||
<tr>
|
||||
<td>Move topic</td>
|
||||
<td><select class="dropdown" name="fid">
|
||||
<?php
|
||||
$show_cat = $database->ForumCat($forumData['alliance']);
|
||||
foreach($show_cat as $cats) {
|
||||
if($session->access == 9 && $cats['owner'] != $session->uid) continue;
|
||||
|
||||
if($cats['id'] == $_GET['fid']) echo '<option value="'.$cats['id'].'" selected>'.stripslashes($cats['forum_name']).'</option>';
|
||||
else echo '<option value="'.$cats['id'].'">'.stripslashes($cats['forum_name']).'</option>';
|
||||
}
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody></table>
|
||||
|
||||
<p class="btn"><button id="fbtn_ok" value="ok" name="s1" class="trav_buttons"> OK </button></p></form>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
|
||||
$cat_id = $_GET['fid'];
|
||||
$forumInfo = $database->ForumCatEdit($cat_id);
|
||||
|
||||
//Check if we're viewing a valid forum
|
||||
if(empty($forumInfo)) $alliance->redirect($_GET);
|
||||
|
||||
$forumData = reset($forumInfo);
|
||||
$CatName = stripslashes($forumData['forum_name']);
|
||||
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
$ChckTopic = $database->CheckCatTopic($cat_id);
|
||||
$Topics = array_merge($database->ForumCatTopicStick($cat_id), $database->ForumCatTopic($cat_id));
|
||||
?>
|
||||
<h4><a href="allianz.php?s=2">Alliance</a> -> <a href="allianz.php?s=2&fid=<?php echo $cat_id; ?>"><?php echo $CatName; ?></a></h4><table cellpadding="1" cellspacing="1" id="topics"><thead>
|
||||
<tr>
|
||||
<th colspan="4"><?php echo $CatName; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Threads</td>
|
||||
<td>Replies</td>
|
||||
<td>Last post</td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
if($ChckTopic){
|
||||
foreach($Topics as $arrs) {
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $arrs['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => $arrs['owner'], 'admin' => $_GET['admin'], 'forum_owner' => $forumData['owner']];
|
||||
|
||||
$CountPosts = $database->CountPost($arrs['id']);
|
||||
$lposts = $database->LastPost($arrs['id']);
|
||||
foreach($lposts as $post) {
|
||||
}
|
||||
if($database->CheckLastPost($arrs['id'])){
|
||||
$post_dates = date('d.m.y, H:i a',$post['date']);
|
||||
$owner_topics = $database->getUserArray($post['owner'],1);
|
||||
}else{
|
||||
$post_dates = date('d.m.y, H:i a',$arrs['date']);
|
||||
$owner_topics = $database->getUserArray($arrs['owner'],1);
|
||||
}
|
||||
|
||||
echo '<tr><td class="ico">';
|
||||
if(Alliance::canAct($checkArray))
|
||||
{
|
||||
if($database->CheckCloseTopic($arrs['id']) == 1){
|
||||
$locks = '<a class="unlock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unlock" title="open topic"><img src="img/x.gif" alt="open topic" /></a>';
|
||||
}else{
|
||||
$locks = '<a class="lock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=lock" title="close topic"><img src="img/x.gif" alt="close topic" /></a>';
|
||||
}
|
||||
if($arrs['stick'] == 1){
|
||||
$pin = '<a class="unpin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unpin" title="Unstick topic"><img src="img/x.gif" alt="Unstick topic" /></a>';
|
||||
}else{
|
||||
$pin = '<a class="pin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=pin" title="Stick topic"><img src="img/x.gif" alt="Stick topic" /></a>';
|
||||
}
|
||||
echo $locks.'<a class="edit" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br />'.$pin.'<a class="fdel" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=deltopic" title="delete"><img src="img/x.gif" alt="delete" onClick="return confirm(\'confirm delete?\');" /></a>';
|
||||
}elseif($arrs['close'] == 1){
|
||||
echo '<img class="folder_'.($arrs['stick'] == 1 ? 'sticky_' : '').'lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
|
||||
}else{
|
||||
echo '<img class="folder'.($arrs['stick'] == 1 ? '_sticky' : '').'" src="img/x.gif" alt="'.($arrs['stick'] == 1 ? 'Important ' : '').'Thread without new posts" title="'.($arrs['stick'] == 1 ? 'Important ' : '').'Thread without new posts" />';
|
||||
}
|
||||
echo '</td>
|
||||
<td class="tit"><a href="allianz.php?s=2&fid2='.$arrs['cat'].'&tid='.$arrs['id'].'">'.stripslashes($arrs['title']).'</a><br></td>
|
||||
<td class="cou">'.$CountPosts.'</td>
|
||||
<td class="last">'.$post_dates.'<br /><a href="spieler.php?uid='.$arrs['owner'].'">'.$owner_topics['username'].'</a> <a href="allianz.php?s=2&fid2='.$arrs['cat'].'&pid='.$aid.'&tid='.$arrs['id'].'"><img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></a>
|
||||
</td></tr>';
|
||||
|
||||
}
|
||||
}else{
|
||||
echo '<tr>
|
||||
<td class="none" colspan="4">No topic yet</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody></table><p>
|
||||
<?php
|
||||
if($forumData['forum_area'] != 3 || ($forumData['forum_area'] == 3 && $opt['opt5'] == 1)){
|
||||
?>
|
||||
<a href="allianz.php?s=2&pid=<?php echo $aid; ?>&fid=<?php echo $cat_id; ?>&ac=newtopic"><img id="fbtn_post" class="dynamic_img" src="img/x.gif" alt="Post new thread" /></a>
|
||||
<?php
|
||||
echo '<a href="allianz.php?s=2&fid='.$cat_id.((isset($_GET['admin']) && !empty($_GET['admin']) && $_GET['admin'] == "switch_admin") ? "" : "&admin=switch_admin").'" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
|
||||
$tid = $_GET['tid'];
|
||||
$topics = $database->ShowTopic($tid);
|
||||
|
||||
//Check if we're viewing a valid thread
|
||||
if(empty($topics)) $alliance->redirect($_GET);
|
||||
|
||||
$posts = $database->ShowPost($tid);
|
||||
foreach($topics as $arr){
|
||||
$cat_id = $arr['cat'];
|
||||
$owner = $database->getUserArray($arr['owner'], 1);
|
||||
$forumData = reset($database->ForumCatEdit($cat_id));
|
||||
$CatName = stripslashes($forumData['forum_name']);
|
||||
$allianceinfo = $database->getAlliance($owner['alliance']);
|
||||
}
|
||||
$date = date('d.m.y H:i a', $arr['date']);
|
||||
$varray = $database->getProfileVillages($arr['owner']);
|
||||
|
||||
$totalpop = 0;
|
||||
foreach($varray as $vil) $totalpop += $vil['pop'];
|
||||
|
||||
$countAu = $database->CountTopic($arr['owner']);
|
||||
$tribeArray = [ROMANS, TEUTONS, GAULS];
|
||||
$displayarray = $database->getUserArray($arr['owner'], 1);
|
||||
$trip = $tribeArray[$displayarray['tribe'] - 1];
|
||||
|
||||
$input = $arr['post'];
|
||||
$bbcoded = $input;
|
||||
include ("GameEngine/BBCode.php");
|
||||
$bbcode_topic = stripslashes(nl2br($bbcoded));
|
||||
?>
|
||||
<h4>
|
||||
<a href="allianz.php?s=2">Alliance</a> -> <a
|
||||
href="allianz.php?s=2&fid=<?php echo $arr['cat']; ?>"><?php echo $CatName; ?></a>
|
||||
</h4>
|
||||
<table cellpadding="1" cellspacing="1" id="posts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo stripslashes($arr['title']); ?></th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Author</td>
|
||||
<td>Message</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="pinfo"><a class="name"
|
||||
href="spieler.php?uid=<?php echo $arr['owner']; ?>"><?php echo $owner['username']; ?></a><br />
|
||||
<a href="allianz.php?aid=<?php echo $allianceinfo['id']; ?>"><?php echo $allianceinfo['tag']; ?></a><br />
|
||||
Posts: <?php echo $countAu; ?><br /> <br />
|
||||
Pop: <?php echo $totalpop; ?><br />
|
||||
Villages: <?php echo count($varray);?><br />
|
||||
<?php echo $trip; ?>
|
||||
</td>
|
||||
<td class="pcontent"><div class="posted">created: <?php echo $date; ?></div>
|
||||
<?php
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $arr['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => $arr['owner'], 'admin' => $_GET['admin'], 'forum_owner' => $forumData['owner']];
|
||||
|
||||
if(Alliance::canAct($checkArray)){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&idt='.$arr['id'].'&admin=editans"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&fid='.$arr['cat'].'&idt='.$arr['id'].'&admin=deltopic" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
|
||||
}
|
||||
?>
|
||||
<div class="clear dotted"></div>
|
||||
<div class="text"><?php echo $bbcode_topic; ?></div></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if($database->checkSurvey($arr['id'])){
|
||||
$survey = $database->getSurvey($arr['id']);
|
||||
if(!$database->checkVote($arr['id'], $session->uid) && ($survey['ends'] > time() || $survey['ends'] == 0)){
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2"><div style="text-align: center">Survey: <?php echo $survey['title']; ?></div>
|
||||
<div class="clear dotted"></div>
|
||||
<form method="post" name="post"
|
||||
action="allianz.php?s=2&tid=<?php echo $_GET['tid']; ?>">
|
||||
<table width="100%" border="0" align="left" cellPadding="0"
|
||||
style="border-collapse: collapse">
|
||||
<?php
|
||||
for($i = 1; $i <= 8; $i++){
|
||||
if(!empty($survey['option'.$i])){
|
||||
?>
|
||||
<tr>
|
||||
<td width="5%"><input class="radio" type="radio" name="vote"
|
||||
value="<?php echo $i; ?>" /></td>
|
||||
<td width="95%">
|
||||
<?php echo $survey['option'.$i]; ?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
<div class="text">
|
||||
<input type="hidden" name="fid2"
|
||||
value="<?php echo $_GET['fid2']; ?>" /> <input type="hidden"
|
||||
name="tid" value="<?php echo $_GET['tid']; ?>" />
|
||||
<p class="btn">
|
||||
<input type="image" id="fbtn_vote" value="ok" name="s1"
|
||||
class="dynamic_img" src="img/x.gif" alt="Vote" />
|
||||
|
||||
</form>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<?php }else{ ?>
|
||||
<tr>
|
||||
<td class="pcontent" colspan="2">
|
||||
<div style="text-align: center">Survey: <?php echo $survey['title']; ?></div>
|
||||
<div class="clear dotted"></div>
|
||||
<div class="text">
|
||||
<?php
|
||||
$sum = $database->getVoteSum($arr['id']);
|
||||
for($i = 1; $i <= 8; $i++){
|
||||
if($survey['option'.$i] != ""){
|
||||
if($sum > 0) $width = 100 * ($survey['vote'.$i] / $sum);
|
||||
else $width = 0;
|
||||
?>
|
||||
<?php echo $survey['option'.$i]." "; ?><img
|
||||
src="<?php echo GP_LOCATE; ?>/img/f/c4.gif"
|
||||
width="<?php echo $width; ?>" /><?php echo " ".$survey['vote'.$i]; ?></br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div></td>
|
||||
</tr>
|
||||
<?php }} ?>
|
||||
<?php
|
||||
foreach($posts as $po){
|
||||
$topic = reset($database->ShowTopic($po['topic']));
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $topic['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => $po['owner'], 'admin' => $_GET['admin'], 'forum_owner' => $forumData['owner']];
|
||||
|
||||
$date = date('d.m.y H:i a', $po['date']);
|
||||
$countAu = $database->CountTopic($po['owner']);
|
||||
$varray = $database->getProfileVillages($po['owner']);
|
||||
$totalpop = 0;
|
||||
foreach($varray as $vil) $totalpop += $vil['pop'];
|
||||
|
||||
$displayarray = $database->getUserArray($po['owner'], 1);
|
||||
$trip = $tribeArray[$displayarray['tribe'] - 1];
|
||||
|
||||
$owner = $database->getUserArray($po['owner'], 1);
|
||||
$allianceinfo = $database->getAlliance($owner['alliance']);
|
||||
$input = $po['post'];
|
||||
include ("GameEngine/BBCode.php");
|
||||
$bbcode_post = stripslashes(nl2br($bbcoded));
|
||||
|
||||
echo '<tr><td class="pinfo"><a class="name" href="spieler.php?uid='.$po['owner'].'">'.$owner['username'].'</a><br /><a href="allianz.php?aid='.$allianceinfo['id'].'">'.$allianceinfo['tag'].'</a><br />
|
||||
Posts: '.$countAu.'<br />
|
||||
<br />
|
||||
Pop: '.$totalpop.'<br />
|
||||
Villages: '.count($varray).'<br />
|
||||
'.$trip.'
|
||||
</td>
|
||||
<td class="pcontent"><div class="posted">created: '.$date.'</div>';
|
||||
if(Alliance::canAct($checkArray)){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&fid='.$topic['cat'].'&tid='.$_GET['tid'].'&pod='.$po['id'].'&admin=editpost"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pod='.$po['id'].'&tid='.$_GET['tid'].'&fid2='.$topic['cat'].'&admin=delpost" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
|
||||
}
|
||||
echo '<div class="clear dotted"></div><div class="text">'.$bbcode_post.'</div></td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="margin-top: 15px;">
|
||||
<?php
|
||||
if(!$arr['close'] && ($forumData['forum_area'] != 3 || ($forumData['forum_area'] == 3 && $opt['opt5'] == 1))){
|
||||
echo '<a href="allianz.php?s=2&tid='.$arr['id'].'&ac=newpost"><img id="fbtn_reply" class="dynamic_img"src="img/x.gif" alt="Replies" /></a>';
|
||||
echo '<a href="allianz.php?s=2&tid='.$arr['id'].((isset($_GET['admin']) && !empty($_GET['admin']) && $_GET['admin'] == "switch_admin") ? "" : "&admin=switch_admin").'" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
|
||||
$forumData = reset($database->ForumCatEdit($_GET['idf']));
|
||||
if(empty($forumData) || ($forumData['alliance'] == 0 && $session->access != ADMIN) ||
|
||||
($forumData['alliance'] > 0 && ($forumData['alliance'] != $session->alliance ||
|
||||
(!$opt['opt5'] && $session->access != ADMIN)))) $alliance->redirect($_GET);
|
||||
|
||||
$users = $alliances = [];
|
||||
|
||||
$cat_name = stripslashes($forumData['forum_name']);
|
||||
$cat_des = stripslashes($forumData['forum_des']);
|
||||
if(!empty($forumData['display_to_alliances'])) $alliances = explode(',', $forumData['display_to_alliances']);
|
||||
if(!empty($forumData['display_to_users'])) $users = explode(',', $forumData['display_to_users']);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
function addRow(element_id) {
|
||||
// element_id: user_list, ally_list
|
||||
|
||||
liste = document.getElementById(element_id);
|
||||
liste = liste.getElementsByTagName('tbody')[0];
|
||||
|
||||
var anzahl_trs = liste.getElementsByTagName('tr').length;
|
||||
var num_fields = anzahl_trs;
|
||||
var num_last_tr = anzahl_trs -1;
|
||||
|
||||
lastTR = liste.getElementsByTagName('tr')[num_last_tr];
|
||||
lastTD = lastTR.getElementsByTagName('td')[2];
|
||||
lastIMG = lastTD.getElementsByTagName('img')[0];
|
||||
lastTD.removeChild(lastIMG);
|
||||
|
||||
newTR = document.createElement('tr');
|
||||
newTD1 = document.createElement('td');
|
||||
newTD2 = document.createElement('td');
|
||||
newTD3 = document.createElement('td');
|
||||
newTR.appendChild(newTD1);
|
||||
newTR.appendChild(newTD2);
|
||||
newTR.appendChild(newTD3);
|
||||
liste.appendChild(newTR);
|
||||
|
||||
var html_input_1 = '<input class="text" type="text" ';
|
||||
|
||||
if(element_id == 'ally_list') {
|
||||
newTD1.className = 'ally';
|
||||
newTD2.className = 'tag';
|
||||
newTD3.className = 'ad';
|
||||
newTD1.innerHTML = html_input_1 + 'id="allys_by_id_'+num_fields+'" class="text" maxlength="8" name="allys_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
|
||||
newTD2.innerHTML = html_input_1 + 'id="allys_by_name_'+num_fields+'" class="text" maxlength="8" name="allys_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
|
||||
}
|
||||
|
||||
if(element_id == 'user_list') {
|
||||
newTD1.className = 'id';
|
||||
newTD2.className = 'pla';
|
||||
newTD3.className = 'ad';
|
||||
newTD1.innerHTML = html_input_1 + 'id="users_by_id_'+num_fields+'" class="text" maxlength="8" name="users_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
|
||||
newTD2.innerHTML = html_input_1 + 'id="users_by_name_'+num_fields+'" class="text" maxlength="15" name="users_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
|
||||
}
|
||||
|
||||
newTD3.innerHTML = '<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow(\''+element_id+'\')">';
|
||||
}
|
||||
|
||||
</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
function checkInputs(id, typ) {
|
||||
id_field = document.getElementById(typ+'_by_id_'+id);
|
||||
name_field = document.getElementById(typ+'_by_name_'+id);
|
||||
|
||||
//alert(id_field.value);
|
||||
//alert(name_field.value);
|
||||
|
||||
if (id_field.value != '' && id_field.disabled == false) {
|
||||
name_field.disabled = true;
|
||||
name_field.style.border = '1px solid #999';
|
||||
}
|
||||
else {
|
||||
name_field.disabled = false;
|
||||
name_field.style.border = '1px solid #71D000';
|
||||
}
|
||||
|
||||
if (name_field.value != '' && name_field.disabled == false) {
|
||||
id_field.disabled = true;
|
||||
id_field.style.border = '1px solid #999';
|
||||
}
|
||||
else {
|
||||
id_field.disabled = false;
|
||||
id_field.style.border = '1px solid #71D000';
|
||||
}
|
||||
}
|
||||
|
||||
</script><form method="post" action="allianz.php?s=2">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="fid" value="<?php echo $_GET['idf']; ?>">
|
||||
<input type="hidden" name="editforum" value="1">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="edit_forum"><thead>
|
||||
<tr>
|
||||
<th colspan="2">edit forum</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<th>Forum name</th>
|
||||
|
||||
<td><input class="text" type="text" name="u1" value="<?php echo $cat_name; ?>" maxlength="30"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<td><input class="text" type="text" name="u2" value="<?php echo $cat_des; ?>" maxlength="38"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php if($forumData['forum_area'] != 1){ ?>
|
||||
<table cellpadding="1" cellspacing="1" id="ally_list"><thead>
|
||||
<tr>
|
||||
|
||||
<th colspan="3">Open for more alliances</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alliance ID</td>
|
||||
<td>Tag:</td>
|
||||
<td>Add</td>
|
||||
</tr>
|
||||
|
||||
</thead><tbody>
|
||||
<?php for($i = 0; $i < count($alliances); $i++){?>
|
||||
<tr>
|
||||
<td class="ally">
|
||||
<input class="text" type="text" id="allys_by_id_<?php echo $i; ?>" disabled="disabled" maxlength="15" name="allys_by_id[<?php echo $i; ?>]" onkeyup="checkInputs(<?php echo $i; ?>,'allys');" />
|
||||
</td>
|
||||
<td class="tag">
|
||||
<input class="text" type="text" id="allys_by_name_<?php echo $i; ?>" value="<?php echo $database->getAlliance($alliances[$i])['tag']; ?>" maxlength="15" name="allys_by_name[<?php echo $i; ?>]" onkeyup="checkInputs(<?php echo $i; ?>,'allys');" />
|
||||
</td>
|
||||
<td class="ad"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="ally">
|
||||
<input class="text" type="text" id="allys_by_id_<?php echo $i; ?>" name="allys_by_id[<?php echo $i; ?>]" maxlength="15" onkeyup="checkInputs(<?php echo $i; ?>,'allys');" />
|
||||
</td>
|
||||
<td class="tag">
|
||||
<input class="text" type="text" id="allys_by_name_<?php echo $i; ?>" name="allys_by_name[<?php echo $i; ?>]" maxlength="15" onkeyup="checkInputs(<?php echo $i; ?>,'allys');" />
|
||||
</td>
|
||||
<td class="ad">
|
||||
<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow('ally_list')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table><table cellpadding="1" cellspacing="1" id="user_list"><thead>
|
||||
<tr>
|
||||
<th colspan="3">Open forum for the following players</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User ID</td>
|
||||
<td>Name:</td>
|
||||
<td>Add</td>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<?php for($i = 0; $i < count($users); $i++){?>
|
||||
<tr>
|
||||
<td class="id">
|
||||
<input class="text" type="text" id="users_by_id_<?php echo $i; ?>" disabled="disabled" name="users_by_id[<?php echo $i; ?>]" maxlength="15" onkeyup="checkInputs(<?php echo $i; ?>,'users');" />
|
||||
</td>
|
||||
|
||||
<td class="pla">
|
||||
<input class="text" type="text" id="users_by_name_<?php echo $i; ?>" value="<?php echo $database->getUserField($users[$i], 'username', 0); ?>" name="users_by_name[<?php echo $i; ?>]" maxlength="50" onkeyup="checkInputs(<?php echo $i; ?>,'users');" />
|
||||
</td>
|
||||
<td class="ad"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="id">
|
||||
<input class="text" type="text" id="users_by_id_<?php echo $i; ?>" maxlength="15" name="users_by_id[<?php echo $i; ?>]" onkeyup="checkInputs(<?php echo $i; ?>,'users');" />
|
||||
</td>
|
||||
|
||||
<td class="pla">
|
||||
<input class="text" type="text" id="users_by_name_<?php echo $i; ?>" maxlength="50" name="users_by_name[<?php echo $i; ?>]" onkeyup="checkInputs(<?php echo $i; ?>,'users');" />
|
||||
</td>
|
||||
<td class="ad">
|
||||
<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow('user_list')" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<script type="text/javascript">
|
||||
showCheckList();
|
||||
</script>
|
||||
<?php } ?>
|
||||
<p class="btn"><input type="image" value="ok" name="s1" id="fbtn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p></form>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php if($session->alliance == $aid && $session->alliance > 0) {
|
||||
?>
|
||||
<div id="textmenu">
|
||||
<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>
|
||||
| <a href="allianz.php?s=4" <?php if(isset($_GET['s']) && $_GET['s'] == 4) { echo "class=\"selected\""; } ?>>News</a>
|
||||
<?php
|
||||
if($session->sit == 0){
|
||||
?>
|
||||
| <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{
|
||||
?>
|
||||
| <span class=none><b>Options</b></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
if(!is_numeric($_SESSION['search'])) {
|
||||
?>
|
||||
<center><font color=orange size=2><p class=\"error\">The alliance <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
|
||||
<?php
|
||||
$search = $session->alliance;
|
||||
}
|
||||
else {
|
||||
$search = $_SESSION['search'];
|
||||
}
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="alliance" class="row_table_data">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5">
|
||||
The largest alliances <div id="submenu"><a title="Top 10" href="statistiken.php?id=43"><img class="btn_top10" src="img/x.gif" alt="Top 10"></a><a title="defender" href="statistiken.php?id=42"><img class="btn_def" src="img/x.gif" alt="defender"></a><a title="attacker" href="statistiken.php?id=41"><img class="btn_off" src="img/x.gif" alt="attacker"></a></div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr><td></td><td>Alliance</td><td>Player</td><td>Ø</td><td>Points</td></tr>
|
||||
</thead><tbody>
|
||||
<?php
|
||||
if(isset($_GET['rank'])){
|
||||
$multiplier = 1;
|
||||
if(is_numeric($_GET['rank'])) {
|
||||
if($_GET['rank'] > count($ranking->getRank())) {
|
||||
$_GET['rank'] = count($ranking->getRank())-1;
|
||||
}
|
||||
while($_GET['rank'] > (20*$multiplier)) {
|
||||
$multiplier +=1;
|
||||
}
|
||||
$start = 20*$multiplier-19;
|
||||
} else { $start = ($_SESSION['start']+1); }
|
||||
} else { $start = ($_SESSION['start']+1); }
|
||||
if(count($ranking->getRank()) > 0) {
|
||||
$ranking = $ranking->getRank();
|
||||
for($i=$start;$i<($start+20);$i++) {
|
||||
if(isset($ranking[$i]['name']) && $ranking[$i] != "pad") {
|
||||
if($i == $search) {
|
||||
echo "<tr class=\"hl\"><td class=\"ra fc\" >";
|
||||
}
|
||||
else {
|
||||
echo "<tr><td class=\"ra \" >";
|
||||
}
|
||||
echo $i.".</td><td class=\"al \" ><a href=\"allianz.php?aid=".$ranking[$i]['id']."\">".$ranking[$i]['tag']."</a></td><td class=\"pla \" >";
|
||||
echo $ranking[$i]['players']."</td><td class=\"av \" >".$ranking[$i]['avg']."</td><td class=\"po \">".$ranking[$i]['totalpop']."</td></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "<td class=\"none\" colspan=\"5\">No alliance's found</td>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
include("ranksearch.tpl");
|
||||
?>
|
||||
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$varmedal = $database->getProfileMedalAlly($aid);
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
$totalpop = 0;
|
||||
$memberIDs = [];
|
||||
|
||||
foreach($memberlist as $member) {
|
||||
$memberIDs[] = $member['id'];
|
||||
}
|
||||
$data = $database->getVSumField($memberIDs,"pop");
|
||||
|
||||
if (count($data)) {
|
||||
foreach ($data as $row) {
|
||||
$totalpop += $row['Total'];
|
||||
}
|
||||
}
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="edit"><thead>
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="3">
|
||||
<input type="hidden" name="o" value="3">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<tr>
|
||||
<th colspan="3">Alliance</th>
|
||||
</tr><tr>
|
||||
<td colspan="2">Details</td>
|
||||
<td>Description</td>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
|
||||
<tr><td colspan="2"></td><td class="empty"></td></tr>
|
||||
|
||||
<tr>
|
||||
<th>Tag</td><td class="s7"><?php echo $allianceinfo['tag']; ?></th>
|
||||
<td rowspan="8" class="desc1"><textarea tabindex="1" name="be1"><?php echo isset($_POST['be1']) ? $_POST['be1'] : stripslashes($allianceinfo['desc']); ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Name</th><td><?php echo $allianceinfo['name']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2" class="empty"></td></tr>
|
||||
|
||||
<tr>
|
||||
<th>Rank</th><td><?php echo $ranking->getAllianceRank($aid); ?>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Points</th><td><?php echo $totalpop; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Members</th><td><?php echo count($memberlist); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2" class="empty"></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>
|
||||
<tr>
|
||||
<td>Category</td>
|
||||
<td>Rank</td>
|
||||
<td>Week</td>
|
||||
<td>BB-Code</td>
|
||||
</tr>
|
||||
<?php
|
||||
/******************************
|
||||
INDELING CATEGORIEEN:
|
||||
===============================
|
||||
== 1. Aanvallers top 10 ==
|
||||
== 2. Defence top 10 ==
|
||||
== 3. Klimmers top 10 ==
|
||||
== 4. Overvallers top 10 ==
|
||||
== 5. In att en def tegelijk ==
|
||||
== 6. in top 3 - aanval ==
|
||||
== 7. in top 3 - verdediging ==
|
||||
== 8. in top 3 - klimmers ==
|
||||
== 9. in top 3 - overval ==
|
||||
******************************/
|
||||
|
||||
|
||||
foreach($varmedal as $medal) {
|
||||
$titel="Bonus";
|
||||
switch ($medal['categorie']) {
|
||||
case "1":
|
||||
$titel="Attacker of the Week";
|
||||
break;
|
||||
case "2":
|
||||
$titel="Defender of the Week";
|
||||
break;
|
||||
case "3":
|
||||
$titel="Climber of the week";
|
||||
break;
|
||||
case "4":
|
||||
$titel="Robber of the week";
|
||||
break;
|
||||
case "5":
|
||||
$titel="Top 10 of both attackers and defenders";
|
||||
break;
|
||||
case "6":
|
||||
$titel="Top 3 of Attackers of week ".$medal['points']." in a row";
|
||||
break;
|
||||
case "7":
|
||||
$titel="Top 3 of Defenders of week ".$medal['points']." in a row";
|
||||
break;
|
||||
case "8":
|
||||
$titel="Top 3 of Pop climbers of week ".$medal['points']." in a row";
|
||||
break;
|
||||
case "9":
|
||||
$titel="Top 3 of Robbers of week ".$medal['points']." in a row";
|
||||
break;
|
||||
case "10":
|
||||
$titel="Rank Climber of the week";
|
||||
break;
|
||||
case "11":
|
||||
$titel="Top 3 of Rank climbers of week ".$medal['points']." in a row";
|
||||
break;
|
||||
case "12":
|
||||
$titel="Top 10 of Rank Attackers of week ".$medal['points']." in a row";
|
||||
break;
|
||||
}
|
||||
echo"<tr>
|
||||
<td> ".$titel."</td>
|
||||
<td>".$medal['plaats']."</td>
|
||||
<td>".$medal['week']."</td>
|
||||
<td>[#".$medal['id']."]</td>
|
||||
</tr>";
|
||||
} ?>
|
||||
</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>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$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){
|
||||
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>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
$filterType = $_GET['f'];
|
||||
if($filterType == 31) $sql = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."ndata WHERE ally = ".(int) $session->alliance." AND (ntype != 0 AND ntype < 4 OR ntype > 17 AND ntype != 20 AND ntype != 21 AND ntype != 22) ORDER BY time DESC LIMIT 20");
|
||||
elseif($filterType == 32) $sql = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."ndata WHERE ally = ".(int) $session->alliance." AND (ntype < 1 OR ntype > 3 AND ntype < 8 OR ntype > 19) AND ntype != 22 ORDER BY time DESC LIMIT 20");
|
||||
|
||||
$query = mysqli_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
|
||||
if(!$query) $outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
|
||||
else
|
||||
{
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$id = $row["id"];
|
||||
$uid = $row["uid"];
|
||||
$ally = $row["ally"];
|
||||
$topic = $row["topic"];
|
||||
$ntype = $row["ntype"];
|
||||
$data = $row["data"];
|
||||
$time = $row["time"];
|
||||
$viewed = $row["viewed"];
|
||||
$archive = $row["archive"];
|
||||
|
||||
$outputList .= "<tr>";
|
||||
$outputList .= "<td class=\"sub\">";
|
||||
|
||||
if($ntype >= 4 && $ntype <= 7) $type2 = 32;
|
||||
else $type2 = 31;
|
||||
|
||||
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
|
||||
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
|
||||
if($type == 23) $type = 22;
|
||||
if((($type == 18 || $type == 19) && $filterType == 31) || (($type == 20 || $type == 21) && $filterType == 32) || $type == 22){
|
||||
$outputList .= "<img src=\"gpack/travian_default/img/scouts/$type.gif\" title=\"".$topic."\" />";
|
||||
}else{
|
||||
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
|
||||
}
|
||||
$outputList .= "</a>";
|
||||
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
|
||||
if((($type == 18 || $type == 19) && $filterType == 31) || (($type == 20 || $type == 21) && $filterType == 32)) $nn = " scouts "; else $nn = " attacks ";
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0], "username", 0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($type != 22 && $type != 23 ? $dataarray[28] : $dataarray[2], "username", 0);
|
||||
$getUserAlly = $database->getUserField($type != 22 && $type != 23 ? $dataarray[28] : $dataarray[2], "alliance", 0);
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
if(!$getUserAlly) $allyName = "-";
|
||||
else $allyName = "<a href=\"allianz.php?aid=".$getUserAlly."\">".$getAllyName."</a>";
|
||||
|
||||
$outputList .= "<td class=\"al\">".$allyName."</td>";
|
||||
$date = $generator->procMtime($time);
|
||||
$outputList .= "<td class=\"dat\">".$date[0]." ".date('H:i',$time)."</td>";
|
||||
$outputList .= "</tr>";
|
||||
|
||||
$name++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="offs">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Player</td>
|
||||
<td>Alliance</td>
|
||||
<td>Date</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php echo $outputList; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<h4 class="chartHeadline">Military events</h4>
|
||||
<div id="submenu">
|
||||
<a href="allianz.php?s=3&f=32">
|
||||
<img src="img/x.gif" class="<?php echo $_GET['f'] == 32 ? "active btn_def" : "btn_def";?>" alt="Defender" title="Defender" />
|
||||
</a>
|
||||
|
||||
<a href="allianz.php?s=3&f=31">
|
||||
<img src="img/x.gif" class="<?php echo $_GET['f'] == 31 ? "active btn_off" : "btn_off";?>" alt="Attacker" title="Attacker" />
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
if($_GET['f'] == 31 || $_GET['f'] == 32) include "Templates/Alliance/attack-filtered.tpl";
|
||||
else
|
||||
{
|
||||
|
||||
$sql = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."ndata WHERE ally = ".(int) $session->alliance." AND (ntype < 8 OR (ntype > 17 AND ntype < 22) OR (ntype = 22 AND ally = $session->alliance) OR (ntype = 23 AND ally != $session->alliance)) ORDER BY time DESC LIMIT 20");
|
||||
$query = mysqli_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
|
||||
if(!$query) $outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
|
||||
else
|
||||
{
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$id = $row["id"];
|
||||
$uid = $row["uid"];
|
||||
$toWref = $row["toWref"];
|
||||
$ally = $row["ally"];
|
||||
$topic = $row["topic"];
|
||||
$ntype = $row["ntype"];
|
||||
$data = $row["data"];
|
||||
$time = $row["time"];
|
||||
$viewed = $row["viewed"];
|
||||
$archive = $row["archive"];
|
||||
|
||||
$outputList .= "<tr>";
|
||||
$outputList .= "<td class=\"sub\">";
|
||||
|
||||
if($ntype >= 4 && $ntype <= 7) $type2 = 32;
|
||||
else $type2 = 31;
|
||||
|
||||
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
|
||||
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
|
||||
if($type == 23) $type = 22;
|
||||
if($type >= 18 && $type <= 22){
|
||||
$outputList .= "<img src=\"gpack/travian_default/img/scouts/$type.gif\" title=\"".$topic."\" />";
|
||||
}else{
|
||||
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
|
||||
}
|
||||
$outputList .= "</a>";
|
||||
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
|
||||
if($ntype >= 18 && $ntype <= 21) $nn = " scouts "; else $nn = " attacks ";
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0], "username", 0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($type != 22 ? $dataarray[28] : $dataarray[2], "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");
|
||||
}
|
||||
}else{
|
||||
if($toWref != $village->wid){
|
||||
$getUser = $database->getOasisField($toWref, "owner");
|
||||
}else{
|
||||
$getUser = $database->getOasisField($dataarray[1], "owner");
|
||||
}
|
||||
}
|
||||
$getUserAlly = $database->getUserField($getUser, "alliance", 0);
|
||||
}else if($ntype == 1 || $ntype == 2 || $ntype == 3 || $ntype == 18 || $ntype == 19){
|
||||
$getUserAlly = $database->getUserField($type != 22 ? $dataarray[28] : $dataarray[2], "alliance", 0);
|
||||
}else{
|
||||
$getUserAlly = $database->getUserField($type != 22 ? $dataarray[28] : $dataarray[2], "alliance", 0);
|
||||
}
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
if(!$getUserAlly) $allyName = "-";
|
||||
else $allyName = "<a href=\"allianz.php?aid=".$getUserAlly."\">".$getAllyName."</a>";
|
||||
|
||||
$outputList .= "<td class=\"al\">".$allyName."</td>";
|
||||
$date = $generator->procMtime($time);
|
||||
$outputList .= "<td class=\"dat\">".$date[0]." ".date('H:i',$time)."</td>";
|
||||
$outputList .= "</tr>";
|
||||
|
||||
$name++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="offs">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Player</td>
|
||||
<td>Alliance</td>
|
||||
<td>Date</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php echo $outputList; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<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"><?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"><?php echo $form->getError("ally2"); ?></span></td>
|
||||
</tr></tbody></table>
|
||||
|
||||
<p><button value="ok" name="s1" id="btn_ok" class="trav_buttons" alt="OK" /> OK </button></form></p>
|
||||
<p class="error"><?php echo $form->getError("perm"); ?></p>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
if($database->getUserField($_POST['a_user'], "alliance", 0) != $session->alliance){
|
||||
$form->addError("perm", USER_NOT_IN_YOUR_ALLY);
|
||||
}
|
||||
elseif($_POST['a_user'] == $session->uid) $form->addError("perm", CANT_EDIT_YOUR_PERMISSIONS);
|
||||
elseif($database->isAllianceOwner($_POST['a_user'])) $form->addError("perm", CANT_EDIT_LEADER_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");
|
||||
?>
|
||||
<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>Name:</th>
|
||||
<td> <?php echo $playername; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Position:</th>
|
||||
<td><input class="name text" type="text" name="a_titel" value="<?php echo $playerData['rank']; ?>" maxlength="50" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table cellpadding="1" cellspacing="1" id="rights" class="small_option">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Assign rights</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="sel"><input class="check" type="checkbox" name="e1" value="1" <?php if ($playerData['opt1']) { echo "checked=checked"; } ?> ></td>
|
||||
|
||||
<td>Assign to position</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sel"><input class="check" type="checkbox" name="e2" value="1" <?php if ($playerData['opt2']) { echo "checked=checked"; } ?> ></td>
|
||||
<td>Kick player</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="sel"><input class="check" type="checkbox" name="e3" value="1" <?php if ($playerData['opt3']) { echo "checked=checked"; } ?> ></td>
|
||||
<td>Change alliance description</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sel"><input class="check" type="checkbox" name="e6" value="1"<?php if ($playerData['opt6']) { echo "checked=checked"; } ?> ></td>
|
||||
<td>Alliance diplomacy</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sel"><input class="check" type="checkbox" name="e7" value="1" <?php if ($playerData['opt7']) { echo "checked=checked"; } ?> ></td>
|
||||
<td>IGMs to every alliance member</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sel"><input class="check" type="checkbox" name="e4" value="1" <?php if ($playerData['opt4']) { echo "checked=checked"; } ?> ></td>
|
||||
<td>Invite a player into the alliance</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sel"><input class="check" type="checkbox" name="e5" value="1" <?php if ($playerData['opt5']) { echo "checked=checked"; } ?> ></td>
|
||||
<td>Manage forums</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
|
||||
<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="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
</p>
|
||||
</form>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
////////////// made by TTMTT //////////////
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<?php sajax_show_javascript();?>
|
||||
function show_data_cb(text) { document.getElementById("masnun").innerHTML = text; }
|
||||
function start_it() { x_get_data(show_data_cb); setTimeout("start_it()",1000); }
|
||||
function add_cb() {}
|
||||
function send_data() {
|
||||
//alert( document.form1.msg.value);
|
||||
msg = document.form1.msg.value;
|
||||
//alert(msg);
|
||||
//x_add_data(name +"|"+msg,add_cb);
|
||||
x_add_data(msg,add_cb);
|
||||
document.form1.msg.value="";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<body onload="start_it()">
|
||||
<form name="form1" onSubmit="send_data()">
|
||||
<div id="TitleName" class="chatHeader">Ally-Chat</div>
|
||||
<div id="chatContainer" style="position:relative; top:0; right:0; height: 220px; width: 500px; overflow: hidden; background-color: #FFF; border: 1px solid #C0C0C0;">
|
||||
<div id="masnun" style="position:absolute; top:0; right:5px; width:470px; background-color: #FFF; "></div>
|
||||
<div id="scrollbarbackground2" style="position:absolute; top:0; right:481px; width:17px; height:198px;"></div>
|
||||
<div id="scrollbarbackground" style="position:absolute; top:0; right:489px; width:1px; height:198px; border-width:1px; border-style:solid; border-color:#71D000; background-color: #FFF; "></div>
|
||||
<div id="scrollbar" style="position:absolute; top:0; right:481px; width:17px; height:198px; border-width:1px; border-style:solid; border-color:#71D000; background-color: #F0FFF0; "></div>
|
||||
<input id="scrollCheckbox" class="fm" checked="checked" type="checkbox" style="position:absolute; top:200px; right:481px; " />
|
||||
</div>
|
||||
<div style="margin-top:10px; margin-bottom:10px;">
|
||||
<table cellpadding="1" cellspacing="1"><tr><td>
|
||||
<input name="s" value="6" type="hidden" />
|
||||
<input class="text" type="text" name="msg" style="width: 415px;" />
|
||||
</td><td>
|
||||
<input type="button" src="img/x.gif" id="btn_ok" style="border: 0px; float:left;" alt="ok" onClick="send_data()" />
|
||||
</td></tr></table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</body>
|
||||
<div id="rooms">
|
||||
</div>
|
||||
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE!
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Developed by: Dzoki < dzoki.travian@gmail.com >
|
||||
|
|
||||
| This script is property of TravianX Project. You are allowed to change
|
||||
| its source and release it, but you have no rights to remove copyright
|
||||
| notices.
|
||||
|
|
||||
| TravianX All rights reserved
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<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">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="diplomacy" class="dipl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Alliance diplomacy</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Alliance</th>
|
||||
|
||||
<td><input class="ally text" type="text" name="a_name" maxlength="15"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><label><input class="radio" type="radio" name="dipl" value="1"> offer a confederation</label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><label><input class="radio" type="radio" name="dipl" value="2"> offer non-aggression pact</label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><label><input class="radio" type="radio" name="dipl" value="3"> declare war</label></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="hint" class="infos">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Hint</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">It's part of diplomatic etiquette to talk to another alliance and negotiate before sending an offer for a non-aggression pact or a confederation.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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"><?php echo $form->getError("name"); ?></p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="own" class="dipl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Own offers</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php
|
||||
$alliance = $session->alliance;
|
||||
|
||||
if(count($database->diplomacyOwnOffers($alliance))){
|
||||
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>';
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="tip" class="infos">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Tip</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">If you want to see connections in the alliance description automatically, type <span class="e">[diplomatie]</span> into the description, <span class="e">[ally]</span>, <span class="e">[nap]</span> and <span class="e">[war]</span> are also possible.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="foreign" class="dipl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Foreign offers</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$alliance = $session->alliance;
|
||||
if(($dInvites = $database->diplomacyInviteCheck($alliance)) && count($dInvites)){
|
||||
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>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="existing" class="dipl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Existing relationships</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$alliance = $session->alliance;
|
||||
|
||||
if(($rels = $database->diplomacyExistingRelationships($alliance)) && count($rels)){
|
||||
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>';
|
||||
}
|
||||
}
|
||||
else echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,273 @@
|
||||
<?php
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
//TODO: Rework the whole code of this section...
|
||||
if(!isset($aid)){
|
||||
if(isset($_GET['fid']) && !empty($_GET['fid'])) $aid = $database->ForumCatAlliance($_GET['fid']);
|
||||
else if(isset($_GET['fid2']) && !empty($_GET['fid2'])) $aid = $database->ForumCatAlliance($_GET['fid2']);
|
||||
else $aid = $session->alliance;
|
||||
}
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
echo $aid > 0 ? "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>" : "<h1>Forum</h1>";
|
||||
include ("alli_menu.tpl");
|
||||
$ids = $_GET['s'];
|
||||
|
||||
if(isset($_POST['new']) &&
|
||||
isset($_POST['u1']) && !empty($_POST['u1']) &&
|
||||
isset($_POST['u2']) && !empty($_POST['u2']) &&
|
||||
isset($_POST['bid']) && $_POST['bid'] >= 0 && $_POST['bid'] <= 3 &&
|
||||
($session->access == 9 || ($session->alliance > 0 && $opt['opt5'] == 1)))
|
||||
{
|
||||
//Initialization
|
||||
$forumViewable['alliances'] = $forumViewable['users'] = "";
|
||||
|
||||
//Check if the user is the ADMIN (Multihunter account) or not, if not, it will not be able to create public forum
|
||||
//ADMIN can only creates public forums
|
||||
if($session->access != ADMIN && $_POST['bid'] == 1) $_POST['bid'] = 0;
|
||||
elseif($session->access == ADMIN && $_POST['bid'] != 1) $_POST['bid'] = 1;
|
||||
|
||||
//Ignore it if the forum is public
|
||||
if($_POST['bid'] != 1) {
|
||||
$forumViewable = $alliance->createForumVisiblity($_POST['allys_by_id'], $_POST['allys_by_name'], $_POST['users_by_id'], $_POST['users_by_name']);
|
||||
}
|
||||
|
||||
$forum_name = $_POST['u1'];
|
||||
$forum_des = $_POST['u2'];
|
||||
$forum_owner = $session->uid;
|
||||
$forum_area = $_POST['bid'];
|
||||
$database->CreatForum($forum_owner, $session->access == ADMIN ? 0 : $session->alliance, $forum_name, $forum_des, $forum_area, $forumViewable['alliances'], $forumViewable['users']);
|
||||
}
|
||||
|
||||
if(isset($_POST['edittopic']) &&
|
||||
isset($_POST['fid']) && !empty($_POST['fid']) &&
|
||||
isset($_POST['tid']) && !empty($_POST['tid']) &&
|
||||
isset($_POST['thema']) && !empty($_POST['thema']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => ($topic = reset($database->ShowTopic($_POST['tid'])))['alliance'],
|
||||
'forum_perm' => $opt['opt5'], 'admin' => $_GET['admin'], 'owner' => $topic['owner'],
|
||||
'forum_owner' => ($forumData = reset($database->ForumCatEdit($_POST['fid'])))['owner']], 1) &&
|
||||
(($forumData['forum_area'] != 1 && reset($database->ForumCatEdit($topic['cat']))['forum_area'] != 1 && $forumData['alliance'] == $session->alliance) ||
|
||||
$forumData['id'] == $topic['cat'] || ($session->access == ADMIN && $forumData['alliance'] = 0)))
|
||||
{
|
||||
$topic_name = $_POST['thema'];
|
||||
$topic_cat = $_POST['fid'];
|
||||
$topic_id = $_POST['tid'];
|
||||
$database->UpdateEditTopic($topic_id, $topic_name, $topic_cat);
|
||||
}
|
||||
|
||||
if(isset($_POST['editforum']) &&
|
||||
isset($_POST['fid']) && !empty($_POST['fid']) &&
|
||||
isset($_POST['u1']) && !empty($_POST['u1']) &&
|
||||
isset($_POST['u2']) && !empty($_POST['u2']) &&
|
||||
(($database->ForumCatAlliance($_POST['fid']) == $session->alliance && $opt['opt5'] == 1) || $session->access == ADMIN))
|
||||
{
|
||||
$forumViewable['alliances'] = $forumViewable['users'] = "";
|
||||
|
||||
//Ignore it if the forum is public
|
||||
if($forumData['forum_area'] != 1) {
|
||||
$forumViewable = $alliance->createForumVisiblity($_POST['allys_by_id'], $_POST['allys_by_name'], $_POST['users_by_id'], $_POST['users_by_name']);
|
||||
}
|
||||
|
||||
$forum_name = $_POST['u1'];
|
||||
$forum_name = htmlspecialchars($forum_name);
|
||||
$forum_des = $_POST['u2'];
|
||||
$forum_des = htmlspecialchars($forum_des);
|
||||
$forum_id = $_POST['fid'];
|
||||
$database->UpdateEditForum($forum_id, $forum_name, $forum_des, $forumViewable['alliances'], $forumViewable['users']);
|
||||
}
|
||||
|
||||
if(isset($_POST['newtopic']) && isset($_POST['thema']) && isset($_POST['text']) && isset($_POST['fid'])
|
||||
&& !empty($_POST['thema']) && !empty($_POST['text']) && !empty($_POST['fid']) &&
|
||||
((($forumData = reset($database->ForumCatEdit($_POST['fid'])))['alliance'] == $session->alliance ||
|
||||
$forumData['forum_area'] == 1 || $alliance->isForumAccessible($_POST['fid'])) &&
|
||||
($forumData['forum_area'] != 3 || ($forumData['forum_area'] == 3 && $opt['opt5'] == 1))))
|
||||
{
|
||||
$title = $_POST['thema'];
|
||||
$text = $_POST['text'];
|
||||
$cat = $_POST['fid'];
|
||||
$owner = $session->uid;
|
||||
$alli = $database->ForumCatAlliance($cat);
|
||||
|
||||
if(!preg_match('/\[message\]/', $text) && !preg_match('/\[\/message\]/', $text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
|
||||
$survey = false;
|
||||
$ends = '';
|
||||
if(isset($_POST['umfrage'])){
|
||||
if(isset($_POST['umfrage_ende'])){
|
||||
$ends_date = $_POST['month']."/".$_POST['day']."/".$_POST['year'];
|
||||
if($_POST['meridiem'] == 1) $_POST['hour'] += 12;
|
||||
$ends_time = $_POST['hour'].":".$_POST['minute'];
|
||||
$ends = strtotime($ends_date) - strtotime(date('d.m.y')) + strtotime($ends_time);
|
||||
}
|
||||
|
||||
for($i = 1; $i <= 8; $i++) if(isset($_POST['option_'.$i]) && !empty($_POST['option_'.$i])) $survey = true;
|
||||
}
|
||||
$topic_id = $database->CreatTopic($title, $text, $cat, $owner, $alli, $ends);
|
||||
if($survey){
|
||||
$database->createSurvey($topic_id, $_POST['umfrage_thema'], $_POST['option_1'], $_POST['option_2'], $_POST['option_3'], $_POST['option_4'], $_POST['option_5'], $_POST['option_6'], $_POST['option_7'], $_POST['option_8'], $ends);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['newpost']) && isset($_POST['text']) && !empty($_POST['text']) &&
|
||||
isset($_POST['tid']) && !empty($_POST['tid']) &&
|
||||
isset($_POST['fid2']) && !empty($_POST['fid2']) &&
|
||||
((($forumData = reset($database->ForumCatEdit($_POST['fid2'])))['alliance'] == $session->alliance ||
|
||||
$forumData['forum_area'] == 1 || $alliance->isForumAccessible($_POST['fid2'])) &&
|
||||
(($forumData['forum_area'] != 3 && !reset($database->ShowTopic($_POST['tid']))['close'])
|
||||
|| ($forumData['forum_area'] == 3 && $opt['opt5'] == 1))))
|
||||
{
|
||||
$text = $_POST['text'];
|
||||
$tids = $_POST['tid'];
|
||||
$fid2 = $_POST['fid2'];
|
||||
$owner = $session->uid;
|
||||
if(!preg_match('/\[message\]/', $text) && !preg_match('/\[\/message\]/', $text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
|
||||
$database->UpdatePostDate($tids);
|
||||
$database->CreatPost($text, $tids, $owner, $fid2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['editans']) && isset($_POST['text']) && !empty($_POST['text'])
|
||||
&& isset($_POST['tid']) && !empty($_POST['tid']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => ($topic = reset($database->ShowTopic($_POST['tid'])))['alliance'],
|
||||
'forum_perm' => $opt['opt5'], 'admin' => $_GET['admin'], 'owner' => $topic['owner'],
|
||||
'forum_owner' => reset($database->ForumCatEdit($topic['cat']))['owner']], 1))
|
||||
{
|
||||
$text = $_POST['text'];
|
||||
$topic_id = $_POST['tid'];
|
||||
|
||||
if(!preg_match('/\[message\]/', $text) && !preg_match('/\[\/message\]/', $text)){
|
||||
$text = "[message]" . $text . "[/message]";
|
||||
$database->EditUpdateTopic($topic_id, $text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['editpost']) && isset($_POST['text']) && !empty($_POST['text']) &&
|
||||
isset($_POST['pod']) && !empty($_POST['pod']) &&
|
||||
Alliance::canAct(['aid' => $aid,
|
||||
'alliance' => ($topic = reset($database->ShowTopic(($post = reset($database->ShowPostEdit($_POST['pod'])))['topic'])))['alliance'],
|
||||
'forum_perm' => $opt['opt5'], 'owner' => $post['owner'], 'admin' => $_GET['admin'],
|
||||
'forum_owner' => ($forumData = reset($database->ForumCatEdit($topic['cat'])))['owner']], 1))
|
||||
{
|
||||
|
||||
$text = $_POST['text'];
|
||||
$posts_id = $_POST['pod'];
|
||||
|
||||
$text = preg_replace('/\[message\]/', '', $text);
|
||||
$text = preg_replace('/\[\/message\]/', '', $text);
|
||||
|
||||
$database->EditUpdatePost($posts_id, $text);
|
||||
}
|
||||
|
||||
if(!isset($_GET['admin'])) $_GET['admin'] = null;
|
||||
if($_GET['admin'] == "switch_admin"){
|
||||
if($opt['opt5'] == 1){
|
||||
if($database->CheckResultEdit($aid) != 1) $database->CreatResultEdit($aid, 1);
|
||||
/*else
|
||||
{
|
||||
if($database->CheckEditRes($aid) == 1) $database->UpdateResultEdit($aid, 0);
|
||||
else $database->UpdateResultEdit($aid, 1);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
if($_GET['admin'] == "pos" && isset($_GET['res']) && isset($_GET['fid']) && !empty($_GET['fid']) &&
|
||||
(($database->ForumCatAlliance($_GET['fid']) == $session->alliance && $opt['opt5'] == 1) ||
|
||||
($forumData = reset($database->ForumCatEdit($_GET['fid'])))['owner'] == $session->uid && $session->access == ADMIN))
|
||||
{
|
||||
$database->moveForum($_GET['fid'], $forumData['forum_area'], $session->alliance, $_GET['res']); //Move the forum to the top/bottom of the list
|
||||
$alliance->redirect($_GET);
|
||||
}
|
||||
elseif(isset($_GET['idt']) && !empty($_GET['idt'])){
|
||||
|
||||
//Get the post informations
|
||||
$topicID = $_GET['idt'];
|
||||
$post = reset($database->ShowTopic($topicID));
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $post['alliance'], 'forum_perm' => $opt['opt5'], 'admin' => $_GET['admin'],
|
||||
'owner' => $post['owner'], 'forum_owner' => reset($database->ForumCatEdit($post['cat']))['owner']];
|
||||
|
||||
//Exit if we've the rights to modify it
|
||||
if(!Alliance::canAct($checkArray, 1)) $alliance->redirect($_GET);
|
||||
|
||||
//We've the rights to modify it, check what we have to modify
|
||||
switch($_GET['admin']){
|
||||
case "pin":
|
||||
$database->StickTopic($topicID, 1); //Stick topic
|
||||
break;
|
||||
|
||||
case "unpin":
|
||||
$database->StickTopic($topicID, 0); //Unstick topic
|
||||
break;
|
||||
|
||||
case "lock":
|
||||
$database->LockTopic($topicID, 1); //Lock a topic
|
||||
break;
|
||||
|
||||
case "unlock":
|
||||
$database->LockTopic($topicID, 0); //Unlock a topic
|
||||
break;
|
||||
|
||||
case "deltopic":
|
||||
$database->DeleteTopic($topicID); //Delete topic
|
||||
$database->DeleteSurvey($topicID); //Delete survey
|
||||
break;
|
||||
|
||||
case "edittopic":
|
||||
templates("Forum/forum_3.tpl"); //Edit topic
|
||||
break;
|
||||
|
||||
case "editans":
|
||||
templates("Forum/forum_9.tpl");
|
||||
break;
|
||||
}
|
||||
|
||||
if($_GET['admin'] != "edittopic" && $_GET['admin'] != "editans") $alliance->redirect($_GET);
|
||||
}
|
||||
elseif($_GET['admin'] == "delforum" && isset($_GET['idf']) && !empty($_GET['idf']) &&
|
||||
((($database->ForumCatAlliance($_GET['idf']) == $session->alliance && $opt['opt5'] == 1) ||
|
||||
($forumData = reset($database->ForumCatEdit($_GET['idf'])))['owner'] == $session->uid) ||
|
||||
($forumData['alliance'] == 0 && $session->access == ADMIN)))
|
||||
{
|
||||
$database->DeleteCat($_GET['idf']); // delete forum
|
||||
$alliance->redirect($_GET);
|
||||
}
|
||||
elseif($_GET['admin'] == "delpost" && isset($_GET['pod']) && !empty($_GET['pod']) &&
|
||||
isset($_GET['tid']) && !empty($_GET['tid']) &&
|
||||
isset($_GET['fid2']) && !empty($_GET['fid2']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => reset($database->ShowTopic($_GET['tid']))['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => reset($database->ShowPostEdit($_GET['pod']))['owner'], 'admin' => $_GET['admin'],
|
||||
'forum_owner' => reset($database->ForumCatEdit($_GET['fid2']))['owner']], 1))
|
||||
{
|
||||
$database->DeletePost($_GET['pod']); //Delete post
|
||||
header("Location: allianz.php?s=2&fid2=".$_GET['fid2']."&tid=".$_GET['tid']);
|
||||
exit;
|
||||
}
|
||||
elseif($_GET['admin'] == "newforum"templates("Forum/forum_1.tpl"); //New forum
|
||||
elseif($_GET['admin'] == "editpost" && isset($_GET['pod']) && !empty($_GET['pod']) &&
|
||||
isset($_GET['tid']) && !empty($_GET['tid']) &&
|
||||
isset($_GET['fid']) && !empty($_GET['fid']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => reset($database->ShowTopic($_GET['tid']))['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => reset($database->ShowPostEdit($_GET['pod']))['owner'], 'admin' => $_GET['admin'],
|
||||
'forum_owner' => reset($database->ForumCatEdit($_GET['fid']))['owner']], 1)) //Edit post
|
||||
{templates("Forum/forum_10.tpl");
|
||||
}
|
||||
elseif(isset($_GET['fid'])){
|
||||
if(isset($_GET['ac'])templates("Forum/forum_5.tpl"); //New topic
|
||||
elstemplates("Forum/forum_4.tpl"); //Show topics
|
||||
}
|
||||
elseif($_GET['admin'] == "editforum"templates("Forum/forum_8.tpl"); //Edit forum
|
||||
elseif(isset($_GET['tid'])){
|
||||
if(isset($_GET['ac']))templates("Forum/forum_7.tpl"); //New post
|
||||
elsetemplates("Forum/forum_6.tpl"); //Show topic
|
||||
}
|
||||
elstemplates("Forum/forum_2.tpl");
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
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");
|
||||
?>
|
||||
|
||||
<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>
|
||||
</thead><tbody>
|
||||
<tr><th>Name</th>
|
||||
<td><input class="name text" type="text" name="a_name" maxlength="30"><span class="error"></span></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<p><button value="ok" name="s1" id="btn_ok" class="trav_buttons" alt="OK" onclick="this.disabled=true;this.form.submit();" /> OK </button></form> </p>
|
||||
|
||||
<p class="error"><?php echo $form->getError("name"); ?></p><br />
|
||||
<table cellpadding="1" cellspacing="1" id="invitations" class="small_option"><thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<th colspan="2">Invitations:</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (count($allianceInvitations) == 0) {
|
||||
echo "<tr>";
|
||||
echo "<td class=none colspan=2>none</td>";
|
||||
echo "</tr>";
|
||||
} else {
|
||||
foreach($allianceInvitations as $invit) {
|
||||
$invited = $database->getUserField($invit['uid'],'username',0);
|
||||
echo "<tr>";
|
||||
echo "<td class=abo><a href=\"?o=4&s=5&d=".$invit['id']."\"><img src=\"gpack/travian_default/img/a/del.gif\" width=\"12\" height=\"12\" alt=\"Del\"></a></td>";
|
||||
echo "<td><a href=spieler.php?uid=".$invit['uid'].">".$invited."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
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");
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Kick Player:</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">Here you can kick the players from your alliance.</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>
|
||||
<select name="a_user" class="name dropdown">
|
||||
<?php
|
||||
foreach($memberlist as $member) {
|
||||
if ($member['id'] != $session->uid) {
|
||||
echo "<option value=".$member['id'].">".$member['username']."</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
<input type="hidden" name="o" value="2">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<input type="hidden" name="a" value="2">
|
||||
<button value="ok" name="s1" id="btn_ok" class="trav_buttons" alt="OK" /> OK </button>
|
||||
</p>
|
||||
</form>
|
||||
<p class="error"><?php echo $form->getError("perm"); ?></p>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<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>
|
||||
|
||||
</thead><tbody>
|
||||
|
||||
<tr><th>URL</th>
|
||||
<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>
|
||||
<td colspan="2" class="info">If your alliance wants to use an external forum, you can enter the url here.</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
<p><button value="ok" name="s1" id="btn_ok" class="trav_buttons" alt="OK" /> OK </button></p></form>
|
||||
<p class="error"><?php echo $form->getError("perm"); ?></p>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
//gp link
|
||||
if($session->gpack == null || GP_ENABLE == false) {
|
||||
$gpack= GP_LOCATE;
|
||||
} else {
|
||||
$gpack= $session->gpack;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//de lintjes
|
||||
/******************************
|
||||
INDELING CATEGORIEEN:
|
||||
===============================
|
||||
== 1. Aanvallers top 10 ==
|
||||
== 2. Defence top 10 ==
|
||||
== 3. Klimmers top 10 ==
|
||||
== 4. Overvallers top 10 ==
|
||||
== 5. In att en def tegelijk ==
|
||||
== 6. in top 3 - aanval ==
|
||||
== 7. in top 3 - verdediging ==
|
||||
== 8. in top 3 - klimmers ==
|
||||
== 9. in top 3 - overval ==
|
||||
******************************/
|
||||
//$geregistreerd=date('d.m.Y', ($allianceinfo['timestamp']));
|
||||
|
||||
$profiel = preg_replace("/\[war]/s",'At war with<br>'.$database->getAllianceWar($aid), $profiel, 1);
|
||||
$profiel = preg_replace("/\[ally]/s",'Confederacies<br>'.$database->getAllianceDipProfile($aid,1), $profiel, 1);
|
||||
$profiel = preg_replace("/\[nap]/s",'NAPs<br>'.$database->getAllianceDipProfile($aid,2), $profiel, 1);
|
||||
$profiel = preg_replace("/\[diplomatie]/s",'Confederacies<br>'.$database->getAllianceDipProfile($aid,1).'<br>NAPs<br>'.$database->getAllianceDipProfile($aid,2).'<br>At war with<br>'.$database->getAllianceWar($aid), $profiel, 1);
|
||||
|
||||
|
||||
foreach($varmedal as $medal) {
|
||||
|
||||
switch ($medal['categorie']) {
|
||||
case "1":
|
||||
$titel="Attackers of the Week";
|
||||
$woord="Points";
|
||||
break;
|
||||
case "2":
|
||||
$titel="Defenders of the Week";
|
||||
$woord="Points";
|
||||
break;
|
||||
case "3":
|
||||
$titel="Climbers of the week(Ranks)";
|
||||
$woord="Ranks";
|
||||
break;
|
||||
case "4":
|
||||
$titel="Robbers of the week";
|
||||
$woord="Resources";
|
||||
break;
|
||||
case "5":
|
||||
$titel="Receiving this medal shows that your alliance was in the top 3 of both attacckers and defenders of the week.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "6":
|
||||
$titel="Receiving this medal shows that your alliance was in the top 3 of the attackers of the week ".$medal['points']." in a row";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "7":
|
||||
$titel="Receiving this medal shows that your alliance was in the top 3 of the deffenders of the week ".$medal['points']." in a row";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "8":
|
||||
$titel="Receiving this medal shows that your alliance was in the top 3 of the rank climbers of the week ".$medal['points']." in a row.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "9":
|
||||
$titel="Receiving this medal shows that your alliance was in the top 3 of the robbers of the week ".$medal['points']." in a row.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "11":
|
||||
$titel="Receiving this medal shows that you were in the top 3 of the Rank Climbers of the week ".$medal['points']." in a row.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "12":
|
||||
$titel="Receiving this medal shows that you were in the top 10 Attackers of the week ".$medal['points']." in a row.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "13":
|
||||
$titel="Receiving this medal shows that you were in the top 10 Defenders of the week ".$medal['points']." in a row.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "15":
|
||||
$titel="Receiving this medal shows that you were in the top 10 Robbers of the week ".$medal['points']." in a row.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
case "16":
|
||||
$titel="Receiving this medal shows that you were in the top 10 Rank Climbers of the week ".$medal['points']." in a row.";
|
||||
$bonus[$medal['id']]=1;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(isset($bonus[$medal['id']])){
|
||||
$profiel = preg_replace("/\[#".$medal['id']."]/is",'<img src="'.$gpack.'img/t/'.$medal['img'].'.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>'.$titel.'<br /><br />Received in week: '.$medal['week'].'</td></tr></table>\')">', $profiel, 1);
|
||||
} else {
|
||||
$profiel = preg_replace("/\[#".$medal['id']."]/is",'<img src="'.$gpack.'img/t/'.$medal['img'].'.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Category:</td><td>'.$titel.'</td></tr><tr><td>Week:</td><td>'.$medal['week'].'</td></tr><tr><td>Rank:</td><td>'.$medal['plaats'].'</td></tr><tr><td>'.$woord.':</td><td>'.$medal['points'].'</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$noticeArray = $database->readAlliNotice($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="events"><thead>
|
||||
<tr><th colspan="2">Alliance events</th></tr>
|
||||
<tr>
|
||||
<td>Event</td>
|
||||
<td>Date</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($noticeArray as $notice) {
|
||||
$date = $generator->procMtime($notice['date']);
|
||||
echo "<tr>";
|
||||
echo "<td class=event>".$notice['comment']."</td>";
|
||||
echo "<td class=dat>".$date['0']." ".$date['1']."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include_once("alli_menu.tpl");
|
||||
?>
|
||||
<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>
|
||||
<?php
|
||||
if ($alliance->userPermArray['opt1']==1){
|
||||
?>
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="1"></td>
|
||||
<td class="val">Assign to position</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($alliance->userPermArray['opt3']==1){
|
||||
?>
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="100"></td>
|
||||
<td class="val">Change name</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($alliance->userPermArray['opt2']==1){
|
||||
?>
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="2"></td>
|
||||
<td class="val">Kick player</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($alliance->userPermArray['opt3']==1){
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="3"></td>
|
||||
<td class="val">Change alliance description</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($alliance->userPermArray['opt6']==1){
|
||||
?>
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="6"></td>
|
||||
<td class="val">Alliance diplomacy</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($alliance->userPermArray['opt4']==1){
|
||||
?>
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="4"></td>
|
||||
<td class="val">Invite a player into the alliance</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($alliance->userPermArray['opt5']==1){
|
||||
?>
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="5"></td>
|
||||
<td class="val">Link to the forum</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class="sel"><input class="radio" type="radio" name="o" value="11"></td>
|
||||
<td class="val">Quit alliance</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><button value="ok" name="s1" id="btn_ok" class="trav_buttons" alt="OK" onclick="this.disabled=true;this.form.submit();" /> OK </button></p></form>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
if(isset($_GET['aid'])) $aid = $_GET['aid'];
|
||||
else $aid = $session->alliance;
|
||||
|
||||
$varmedal = $database->getProfileMedalAlly($aid);
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
$totalpop = 0;
|
||||
if($allianceinfo['tag']==""){
|
||||
header("Location: allianz.php");
|
||||
exit;
|
||||
}
|
||||
$memberIDs = [];
|
||||
foreach($memberlist as $member) {
|
||||
$memberIDs[] = $member['id'];
|
||||
}
|
||||
$data = $database->getVSumField($memberIDs,"pop");
|
||||
|
||||
if (count($data)) {
|
||||
foreach ($data as $row) {
|
||||
$totalpop += $row['Total'];
|
||||
}
|
||||
}
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
|
||||
$profiel="".$allianceinfo['notice']."".md5('skJkev3')."".$allianceinfo['desc']."";
|
||||
require("medal.php");
|
||||
$profiel=explode("".md5('skJkev3')."", $profiel);
|
||||
|
||||
include("alli_menu.tpl");
|
||||
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Alliance</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Details</td>
|
||||
<td>Description</td>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td class="empty"></td><td class="empty"></td></tr>
|
||||
<tr>
|
||||
<td class="details">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th>Tag</th>
|
||||
<td><?php echo $allianceinfo['tag']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td><?php echo $allianceinfo['name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Rank</th>
|
||||
<td><?php echo $ranking->getAllianceRank($aid); ?>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Points</th>
|
||||
<td><?php echo $totalpop; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Members</th>
|
||||
<td><?php echo count($memberlist); ?></td>
|
||||
</tr><tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach($memberlist as $member) {
|
||||
|
||||
//rank name
|
||||
$rank = $database->getAlliancePermission($member['id'],"rank",0);
|
||||
|
||||
//username
|
||||
$name = $database->getUserField($member['id'],"username",0);
|
||||
|
||||
//if there is no rank defined, user will not be printed
|
||||
if($rank == ''){
|
||||
echo '';
|
||||
}
|
||||
|
||||
//if there is user rank defined, user will be printed
|
||||
else if($rank != ''){
|
||||
echo "<tr>";
|
||||
echo "<th>".stripslashes($rank)."</th>";
|
||||
echo "<td><a href='spieler.php?uid=".$member['id']."'>".$name."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
if($allianceinfo['forumlink'] != '' && $allianceinfo['forumlink'] != '0'){
|
||||
echo "<tr>";
|
||||
echo "<td><a href='".$allianceinfo['forumlink']."'>» to the forum</td>";
|
||||
echo "</tr>";
|
||||
}else{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="emmty"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="desc2" colspan="2">
|
||||
<div class="desc2div"><?php echo stripslashes(nl2br($profiel[0])); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="desc1">
|
||||
<div class="desc1div"><?php echo stripslashes(nl2br($profiel[1])); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><table cellpadding="1" cellspacing="1" id="member"><thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Player</th>
|
||||
<th>Population</th>
|
||||
<th>Villages</th>
|
||||
<?php
|
||||
if($aid == $session->alliance){
|
||||
echo "<th> </th>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// Alliance Member list loop
|
||||
$rank=0;
|
||||
|
||||
// preload villages data
|
||||
$userIDs = [];
|
||||
foreach($memberlist as $member) {
|
||||
$userIDs[] = $member['id'];
|
||||
}
|
||||
$database->getProfileVillages($userIDs);
|
||||
|
||||
// continue...
|
||||
foreach($memberlist as $member) {
|
||||
|
||||
$rank = $rank+1;
|
||||
$TotalUserPop = $database->getVSumField($member['id'],"pop");
|
||||
$TotalVillages = $database->getProfileVillages($member['id']);
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class=ra>".$rank.".</td>";
|
||||
echo " <td class=pla><a href=spieler.php?uid=".$member['id'].">".$member['username']."</a></td>";
|
||||
echo " <td class=hab>".$TotalUserPop."</td>";
|
||||
echo " <td class=vil>".count($TotalVillages)."</td>";
|
||||
|
||||
if($aid == $session->alliance){
|
||||
if ((time()-600) < $member['timestamp']){ // 0 Min - 10 Min
|
||||
echo " <td class=on><img class=online1 src=img/x.gif title='Now online' alt='Now online' /></td>";
|
||||
}elseif ((time()-86400) < $member['timestamp'] && (time()-600) > $member['timestamp']){ // 10 Min - 1 Days
|
||||
echo " <td class=on><img class=online2 src=img/x.gif title='Offline' alt='Offline' /></td>";
|
||||
}elseif ((time()-259200) < $member['timestamp'] && (time()-86400) > $member['timestamp']){ // 1-3 Days
|
||||
echo " <td class=on><img class=online3 src=img/x.gif title='Last 3 days' alt='Last 3 days' /></td>";
|
||||
}elseif ((time()-604800) < $member['timestamp'] && (time()-259200) > $member['timestamp']){
|
||||
echo " <td class=on><img class=online4 src=img/x.gif title='Last 7 days' alt='Last 7 days' /></td>";
|
||||
}else{
|
||||
echo " <td class=on><img class=online5 src=img/x.gif title=inactive alt=inactive /></td>";
|
||||
}
|
||||
}
|
||||
|
||||
echo " </tr>";
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
if(!isset($aid)) $aid = $session->alliance;
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$isOwner = ($aid && $database->isAllianceOwner($session->uid) == $aid);
|
||||
|
||||
if ($isOwner) {
|
||||
$membersCount = $database->countAllianceMembers($aid);
|
||||
}
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<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>
|
||||
</thead><tbody>
|
||||
<?php
|
||||
if ($isOwner && $membersCount > 1) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="info">
|
||||
Because you are the alliance founder, you need to select a replacement founder before you leave.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
new founder:
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
?>
|
||||
<select name="new_founder" class="name dropdown">
|
||||
<?php
|
||||
$canQuit = false;
|
||||
$minEmbassyLevel = $database->getMinEmbassyLevel( $database->countAllianceMembers($session->alliance) );
|
||||
if ($minEmbassyLevel < 3) {
|
||||
$minEmbassyLevel = 3;
|
||||
}
|
||||
|
||||
foreach($memberlist as $member) {
|
||||
if (($member['id'] != $session->uid) && ($database->getSingleFieldTypeCount($member['id'], 18, '>=', $minEmbassyLevel) >= 1)) {
|
||||
echo "<option value=\"".$member['id']."\">".$member['username']."</option>";
|
||||
$canQuit = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$canQuit) {
|
||||
echo "<option value=\"-1\">no candidates!</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} else {
|
||||
$canQuit = true;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="info">
|
||||
<br />In order to quit the alliance you have to enter your password again for safety reasons.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
password:
|
||||
</th>
|
||||
<td>
|
||||
<input class="pass text" type="password" name="pw" maxlength="20">
|
||||
<span class="error3"><?php echo $form->getError("pw"); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if (!$canQuit) {
|
||||
?>
|
||||
<span style="color: red">
|
||||
<br />
|
||||
Unfortunately, there are no members of the alliance with Embassy at level <?php echo $minEmbassyLevel; ?> or more. In this case, you will not be able
|
||||
to reassign the founder role. You can still <a href="allianz.php?s=5">kick all members</a> and quit the alliance afterwards,
|
||||
if you wish.
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<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>
|
||||
Reference in New Issue
Block a user