mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-26 14:36:06 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
<!-- //////////////// made by TTMTT //////////////// -->
|
||||
<?php
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<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="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="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();"><option value="1">Public Forum</option><option value="2">Confederation Forum</option><option value="0"selected>Alliance Forum</option><option value="3">Closed Forum</option></select></td>
|
||||
</tr>
|
||||
</tbody></table><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="8" name="allys_by_id[0]" onkeyup="checkInputs(0,'allys');" />
|
||||
</td>
|
||||
<td class="tag">
|
||||
<input class="text" type="text" id="allys_by_name_0" maxlength="8" 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="8" name="users_by_id[0]" onkeyup="checkInputs(0,'users');" />
|
||||
</td>
|
||||
|
||||
<td class="pla">
|
||||
<input class="text" type="text" id="users_by_name_0" maxlength="15" 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>
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></p></form>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,211 @@
|
||||
<?php
|
||||
//////////////// made by TTMTT ////////////////
|
||||
if($session->access!=BANNED){
|
||||
$displayarray = $database->getUserArray($session->uid,1);
|
||||
$forumcat = $database->ForumCat(htmlspecialchars($displayarray['alliance']));
|
||||
$forum_cat = $database->ForumCat;
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="public"><thead>
|
||||
<tr>
|
||||
<th colspan="4">Public Forum</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==1){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las) {
|
||||
}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos) {
|
||||
}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las[date]);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
}
|
||||
}else{
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" 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'].'&bid=0&admin=pos&res=1" 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="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br /><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" /></td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
<table cellpadding="1" cellspacing="1" id="confederation"><thead>
|
||||
<tr>
|
||||
<th colspan="4">Confederation Forum</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==2){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las) {
|
||||
}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos) {
|
||||
}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las[date]);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
}
|
||||
}else{
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" 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'].'&bid=0&admin=pos&res=1" 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="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br /><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" /></td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
<table cellpadding="1" cellspacing="1" id="alliance"><thead>
|
||||
<tr>
|
||||
<th colspan="4">Alliance Forum</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==0){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las) {
|
||||
}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos) {
|
||||
}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las[date]);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
}
|
||||
}else{
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" 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'].'&bid=0&admin=pos&res=1" 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="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br /><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" /></td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
<table cellpadding="1" cellspacing="1" id="closed"><thead>
|
||||
<tr>
|
||||
<th colspan="4">Closed Forum</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==3){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las) {
|
||||
}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos) {
|
||||
}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las[date]);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
}
|
||||
}else{
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" 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'].'&bid=0&admin=pos&res=1" 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="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br /><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" /></td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table><p>
|
||||
<?php
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
if($opt['opt5'] == 1){
|
||||
echo '<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a>
|
||||
<a href="allianz.php?s='.$ids.'&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
//////////////// made by TTMTT ////////////////
|
||||
if($session->access!=BANNED){
|
||||
$topic_id = $_GET['idt'];
|
||||
$show_topic = $database->ShowTopic($topic_id);
|
||||
foreach($show_topic as $topi) {
|
||||
$title = $topi['title'];
|
||||
}
|
||||
?>
|
||||
<form method="post" action="allianz.php?s=2&fid=<?php echo $_GET['idf']; ?>&pid=<?php echo $aid; ?>">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="tid" value="<?php echo $topic_id; ?>">
|
||||
<input type="hidden" name="edittopic" value="1">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="edit_topic"><thead>
|
||||
<tr>
|
||||
<th 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>
|
||||
<tr>
|
||||
<th>Move topic</td>
|
||||
<td><select class="dropdown" name="fid">
|
||||
<?php
|
||||
$show_cat = $database->ForumCat();
|
||||
foreach($show_cat as $cats) {
|
||||
if($cats['id'] == $_GET['idf']){
|
||||
echo '<option value="'.$cats['id'].'" selected>'.$cats['forum_name'].'</option>';
|
||||
}else{
|
||||
echo '<option value="'.$cats['id'].'">'.$cats['forum_name'].'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select></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>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
//////////////// made by TTMTT ////////////////
|
||||
if($session->access!=BANNED){
|
||||
$cat_id = $_GET['fid'];
|
||||
$CatName = $database->ForumCatName($cat_id);
|
||||
$ChckTopic = $database->CheckCatTopic($cat_id);
|
||||
$Topics = $database->ForumCatTopic($cat_id);
|
||||
$TopicsStick = $database->ForumCatTopicStick($cat_id);
|
||||
?>
|
||||
<h4><a href="allianz.php?s=2">Alliance</a> -> <a href="allianz.php?s=2&pid=<?php echo $_GET['pid']; ?>&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($TopicsStick as $arrs) {
|
||||
$CountPosts = $database->CountPost($arrs['id']);
|
||||
$lposts = $database->LastPost($arrs['id']);
|
||||
foreach($lposts as $post) {
|
||||
}
|
||||
if($database->CheckLastPost($arrs[id])){
|
||||
$post_dates = date('m/d/y, H:i a',$post['date']);
|
||||
$owner_topics = $database->getUserArray($post['owner'],1);
|
||||
}else{
|
||||
$post_dates = date('m/d/y, H:i a',$arrs['date']);
|
||||
$owner_topics = $database->getUserArray($arrs['owner'],1);
|
||||
}
|
||||
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
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>';
|
||||
}
|
||||
echo ''.$locks.'<a class="edit" href="?s=2&idf='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="unpin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unpin" title="stick topic"><img src="img/x.gif" alt="stick topic" /></a><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_sticky_lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
|
||||
}else{
|
||||
echo '<img class="folder_sticky" src="img/x.gif" alt="Important Thread without new posts" title="Important Thread without new posts" />';
|
||||
}
|
||||
echo '</td>
|
||||
<td class="tit"><a href="allianz.php?s=2&pid='.$aid.'&tid='.$arrs['id'].'">'.$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&pid='.$aid.'&tid='.$arrs['id'].'&seite=max"><img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></a>
|
||||
</td></tr>';
|
||||
|
||||
}
|
||||
|
||||
foreach($Topics as $arr) {
|
||||
$CountPost = $database->CountPost($arr['id']);
|
||||
$lpost = $database->LastPost($arr['id']);
|
||||
foreach($lpost as $pos) {
|
||||
}
|
||||
if($database->CheckLastPost($arr['id'])){
|
||||
$post_date = date('m/d/y, H:i a',$pos['date']);
|
||||
$owner_topic = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$post_date = date('m/d/y, H:i a',$arr['date']);
|
||||
$owner_topic = $database->getUserArray($arr['owner'],1);
|
||||
}
|
||||
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
if($database->CheckCloseTopic($arr['id']) == 1){
|
||||
$lock = '<a class="unlock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=unlock" title="open topic"><img src="img/x.gif" alt="open topic" /></a>';
|
||||
}else{
|
||||
$lock = '<a class="lock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=lock" title="close topic"><img src="img/x.gif" alt="close topic" /></a>';
|
||||
}
|
||||
echo ''.$lock.'<a class="edit" href="?s=2&idf='.$_GET['fid'].'&idt='.$arr['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="pin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=pin" title="stick topic"><img src="img/x.gif" alt="stick topic" /></a><a class="fdel" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=deltopic" title="delete"><img src="img/x.gif" alt="delete" onClick="return confirm(\'confirm delete?\');" /></a>';
|
||||
}elseif($arr['close']=="1"){
|
||||
echo '<img class="folder_lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
|
||||
}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&pid='.$aid.'&tid='.$arr['id'].'">'.$arr['title'].'</a><br></td>
|
||||
<td class="cou">'.$CountPost.'</td>
|
||||
<td class="last">'.$post_date.'<br /><a href="spieler.php?uid='.$arr['owner'].'">'.$owner_topic['username'].'</a> <a href="allianz.php?s=2&aid='.$aid.'&tid='.$arr['id'].'&seite=max"><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>
|
||||
<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
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
if($opt[opt5] == 1){
|
||||
echo '<a href="allianz.php?s=2&fid='.$cat_id.'&seite=1&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
//////////////// made by TTMTT ////////////////
|
||||
if($session->access!=BANNED){
|
||||
$tid = $_GET['tid'];
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
$topics = $database->ShowTopic($tid);
|
||||
$posts = $database->ShowPost($tid);
|
||||
foreach($topics as $arr) {
|
||||
$cat_id = $arr['cat'];
|
||||
$owner = $database->getUserArray($arr['owner'],1);
|
||||
$CatName = $database->ForumCatName($cat_id);
|
||||
$allianceinfo = $database->getAlliance($owner['alliance']);
|
||||
}
|
||||
$date = date('m/d/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']);
|
||||
$displayarray = $database->getUserArray($arr['owner'],1);
|
||||
if($displayarray['tribe'] == 1) {
|
||||
$trip = "Roman";
|
||||
}else if($displayarray['tribe'] == 2) {
|
||||
$trip = "Teutons";
|
||||
}else if($displayarray['tribe'] == 3) {
|
||||
$trip = "Gauls";
|
||||
}
|
||||
$input = $arr['post'];
|
||||
$bbcoded = $input;
|
||||
include("GameEngine/bbcode.php");
|
||||
$bbcode_topic = nl2br($bbcoded);
|
||||
?>
|
||||
<h4><a href="allianz.php?s=2&pid=<?php echo $arr['alliance']; ?>">Alliance</a> -> <a href="allianz.php?s=2&pid=<?php echo $arr['alliance']; ?>&fid=<?php echo $arr['cat']; ?>"><?php echo $CatName; ?></a></h4><table cellpadding="1" cellspacing="1" id="posts"><thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $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
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&pid='.$arr['alliance'].'&idf='.$arr['cat'].'&idt='.$arr['id'].'&admin=editans"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pid='.$arr['alliance'].'&tid='.$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
|
||||
foreach($posts as $po) {
|
||||
|
||||
$date = date('m/d/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);
|
||||
if($displayarray['tribe'] == 1) {
|
||||
$trip = "Roman";
|
||||
}else if($displayarray['tribe'] == 2) {
|
||||
$trip = "Teutons";
|
||||
}else if($displayarray['tribe'] == 3) {
|
||||
$trip = "Gauls";
|
||||
}
|
||||
$owner = $database->getUserArray($po['owner'],1);
|
||||
$allianceinfo = $database->getAlliance($owner['alliance']);
|
||||
$input = $po['post'];
|
||||
include("GameEngine/BBCode.php");
|
||||
$bbcode_post = 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 />
|
||||
Inhbs.: '.$totalpop.'<br />
|
||||
Villages: '.count($varray).'<br />
|
||||
'.$trip.'
|
||||
</td>
|
||||
<td class="pcontent"><div class="posted">created: '.$date.'</div>';
|
||||
if($database->CheckEditRes($aid)=="1"){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&pid='.$arr['alliance'].'&idt='.$_GET['tid'].'&pod='.$po['id'].'&admin=editpost"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pid='.$arr['alliance'].'&pod='.$po['id'].'&tid='.$_GET['tid'].'&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(empty($arr[close])){
|
||||
echo '<a href="allianz.php?s=2&pid='.$arr['alliance'].'&tid='.$arr['id'].'&ac=newpost"><img id="fbtn_reply" class="dynamic_img"src="img/x.gif" alt="Replies" /></a>';
|
||||
}
|
||||
if($opt[opt5] == 1){
|
||||
echo '<a href="allianz.php?s=2&pid='.$aid.'&tid='.$arr['id'].'&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
//////////////// made by TTMTT ////////////////
|
||||
if($session->access!=BANNED){
|
||||
$forum_data = $database->ForumCatEdit($_GET['idf']);
|
||||
foreach($forum_data as $cats) {
|
||||
$cat_name = $cats['forum_name'];
|
||||
$cat_des = $cats['forum_des'];
|
||||
}
|
||||
?>
|
||||
<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="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><p class="btn"><input type="image" value="ok" name="s1" id="fbtn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="option.html" server="D:/wamp/www/New/" local="129116774126982421" remote="129116774120000000" />
|
||||
</dwsync>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php if($session->alliance == $aid) {
|
||||
?>
|
||||
<div id="textmenu">
|
||||
<a href="allianz.php" <?php if(!isset($_GET['s'])) { echo "class=\"selected\""; } ?>>Overview</a>
|
||||
| <a href="allianz.php?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>
|
||||
|
||||
| <a href="allianz.php?s=5" <?php if(isset($_GET['s']) && $_GET['s'] == 5) { echo "class=\"selected\""; } ?>>Options</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$varmedal = $database->getProfileMedalAlly($aid);
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
$totalpop = 0;
|
||||
foreach($memberlist as $member) {
|
||||
$totalpop += $database->getVSumField($member['id'],"pop");
|
||||
}
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<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 $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 $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>Rang</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="Pop Climber of the week";
|
||||
break;
|
||||
case "4":
|
||||
$titel="Robber of the week";
|
||||
break;
|
||||
case "5":
|
||||
$titel="Top 10 of both attacckers 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>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Assign to position</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">Here you can grant the players from your alliance rights & positions.</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>
|
||||
<select name="a_user" class="name dropdown">
|
||||
<?php
|
||||
foreach($memberlist as $member) {
|
||||
echo "<option value=".$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">
|
||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
</p>
|
||||
</form>
|
||||
<p class="error"></p>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
$prefix = "".TB_PREFIX."ndata";
|
||||
$limit = "ntype!=4 AND ntype!=5 AND ntype!=6 AND ntype!=7 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
|
||||
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$query = mysql_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
if($query == 0) {
|
||||
$outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
|
||||
}else{
|
||||
while($row = mysql_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==5 || $ntype==6 || $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;
|
||||
$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==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0],username,0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
|
||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
||||
}else{
|
||||
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
|
||||
}
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
if($getUserAlly==$session->alliance || !$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,75 @@
|
||||
<?php
|
||||
$prefix = "".TB_PREFIX."ndata";
|
||||
$limit = "ntype!=0 AND ntype!=1 AND ntype!=2 AND ntype!=3 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
|
||||
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$query = mysql_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
if($query == 0) {
|
||||
$outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
|
||||
}else{
|
||||
while($row = mysql_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==5 || $ntype==6 || $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;
|
||||
$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==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0],username,0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
|
||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
||||
}else{
|
||||
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
|
||||
}
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
if($getUserAlly==$session->alliance || !$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,103 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$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="btn_def" alt="Defender" title="Defender" />
|
||||
</a>
|
||||
|
||||
<a href="allianz.php?s=3&f=31">
|
||||
<img src="img/x.gif" class="btn_off" alt="Attacker" title="Attacker" />
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
if($_GET['f']==31){
|
||||
include "Templates/Alliance/attack-attacker.tpl";
|
||||
}elseif($_GET['f']==32){
|
||||
include "Templates/Alliance/attack-defender.tpl";
|
||||
}else{
|
||||
$prefix = "".TB_PREFIX."ndata";
|
||||
$limit = "ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=15";
|
||||
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$query = mysql_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
if($query == 0) {
|
||||
$outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
|
||||
}else{
|
||||
while($row = mysql_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==5 || $ntype==6 || $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;
|
||||
$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==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
|
||||
|
||||
$outputList .= $database->getUserField($dataarray[0],username,0);
|
||||
|
||||
$outputList .= $nn;
|
||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
|
||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
||||
}else{
|
||||
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
|
||||
}
|
||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||
|
||||
if($getUserAlly==$session->alliance || !$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,44 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" cellpadding="1" cellspacing="1" id="name" class="small_option"><thead>
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="100">
|
||||
<input type="hidden" name="o" value="100">
|
||||
<input type="hidden" name="s" value="5">
|
||||
|
||||
<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="8">
|
||||
<span class="error2"></span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td><input class="name text" name="ally2" value="<?php echo $allianceinfo['name']; ?>" maxlength="25">
|
||||
<span class="error2"></span></td>
|
||||
</tr></tbody></table>
|
||||
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<p class="error3"><?php echo $form->getError("ally1"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("ally2"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("owner"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("tag"); ?></p>
|
||||
<p class="error3"><?php echo $form->getError("name"); ?></p>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$playerData = $database->getAlliPermissions($_POST['a_user'], $session->alliance);
|
||||
$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="20" /></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 $_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,59 @@
|
||||
<?php
|
||||
////////////// made by TTMTT //////////////
|
||||
ob_start();
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$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() {
|
||||
msg = document.form1.msg.value;
|
||||
x_add_data(name +"|"+msg,add_cb); }
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<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>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,208 @@
|
||||
<?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 = $aid;
|
||||
} else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="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="8"></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"></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 $key => $value){
|
||||
if($value['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($value['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($value['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="101"><input type="hidden" name="id" value="'.$value['id'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$value['alli2'].'"><center>'.$database->getAllianceName($value['alli2']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
}
|
||||
} 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
|
||||
unset($type);
|
||||
$alliance = $session->alliance;
|
||||
|
||||
if(count($database->diplomacyInviteCheck($alliance))){
|
||||
foreach($database->diplomacyInviteCheck($alliance) as $key => $row){
|
||||
if($row['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($row['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($row['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="102"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli1" value="'.$row['alli1'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></td></form><form method="post" action="allianz.php"><td width="18"><input type="hidden" name="o" value="103"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli2'].'"><input type="image" class="accept" src="img/x.gif" title="Accept" /></td></form><td><a href="allianz.php?aid='.$row['alli1'].'"><center>'.$database->getAllianceName($row['alli1']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
}
|
||||
} 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
|
||||
unset($type);
|
||||
unset($row);
|
||||
$alliance = $session->alliance;
|
||||
|
||||
if(count($database->diplomacyExistingRelationships($alliance))){
|
||||
foreach($database->diplomacyExistingRelationships($alliance) as $key => $row){
|
||||
if($row['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($row['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($row['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="104"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli2'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$row['alli1'].'"><center>'.$database->getAllianceName($row['alli1']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
}
|
||||
} elseif(count($database->diplomacyExistingRelationships2($alliance))){
|
||||
foreach($database->diplomacyExistingRelationships2($alliance) as $key => $row){
|
||||
if($row['type'] == 1){
|
||||
$type = "Conf.";
|
||||
} else if($row['type'] == 2){
|
||||
$type = "Nap";
|
||||
} else if($row['type'] == 3){
|
||||
$type = "War";
|
||||
}
|
||||
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="104"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli1'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$row['alli2'].'"><center>'.$database->getAllianceName($row['alli2']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
|
||||
}
|
||||
}else {
|
||||
echo '<tr><td colspan="3" class="none">none</td></tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
//////////////// made by TTMTT ////////////////
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
$ids = $_GET['s'];
|
||||
|
||||
if(isset($_POST['new'])){
|
||||
$forum_name = $_POST['u1'];
|
||||
$forum_des = $_POST['u2'];
|
||||
$forum_owner = $session->uid;
|
||||
$forum_area = $_POST['bid'];
|
||||
|
||||
$database->CreatForum($forum_owner,$aid,$forum_name,$forum_des,$forum_area);
|
||||
}
|
||||
if(isset($_POST['edittopic'])){
|
||||
$topic_name = $_POST['thema'];
|
||||
$topic_cat = $_POST['fid'];
|
||||
$topic_id = $_POST['tid'];
|
||||
|
||||
$database->UpdateEditTopic($topic_id,$topic_name,$topic_cat);
|
||||
}
|
||||
if(isset($_POST['editforum'])){
|
||||
$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);
|
||||
}
|
||||
if(isset($_POST['newtopic'])){
|
||||
$title = $_POST['thema'];
|
||||
$post = $_POST['text'];
|
||||
$cat = $_POST['fid'];
|
||||
$owner = $session->uid;
|
||||
$alli = $_POST['pid'];
|
||||
|
||||
if(isset($_POST['umfrage_ende'])){
|
||||
$ends = "";
|
||||
}else{
|
||||
$ends = '';
|
||||
}
|
||||
$database->CreatTopic($title,$post,$cat,$owner,$alli,$ends);
|
||||
}
|
||||
if(isset($_POST['newpost'])){
|
||||
$post = $_POST['text'];
|
||||
$post = htmlspecialchars($post);
|
||||
$tids = $_POST['tid'];
|
||||
$owner = $session->uid;
|
||||
|
||||
$database->UpdatePostDate($tids);
|
||||
$database->CreatPost($post,$tids,$owner);
|
||||
}
|
||||
if(isset($_POST['editans'])){
|
||||
$post = $_POST['text'];
|
||||
$topic_id = $_POST['tid'];
|
||||
|
||||
$database->EditUpdateTopic($topic_id,$post);
|
||||
}
|
||||
if(isset($_POST['editpost'])){
|
||||
$post = $_POST['text'];
|
||||
$post = htmlspecialchars($post);
|
||||
$posts_id = $_POST['pod'];
|
||||
|
||||
$database->EditUpdatePost($posts_id,$post);
|
||||
}
|
||||
if(!isset($_GET['admin'])) {
|
||||
$_GET['admin'] = null;
|
||||
}
|
||||
if($_GET['admin']== "switch_admin"){
|
||||
if($database->CheckResultEdit($aid) != 1){
|
||||
$database->CreatResultEdit($aid,1);
|
||||
}else{
|
||||
if($database->CheckEditRes($aid) == 1){
|
||||
$database->UpdateResultEdit($aid,'');
|
||||
}else{
|
||||
$database->UpdateResultEdit($aid,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if($_GET['admin']== "pin"){
|
||||
$database->StickTopic($_GET[idt],1); // stick topic
|
||||
}
|
||||
if($_GET['admin']== "unpin"){
|
||||
$database->StickTopic($_GET[idt],''); // unstick topic
|
||||
}
|
||||
if($_GET['admin']== "delforum"){
|
||||
$database->DeleteCat($_GET[idf]); // delete forum
|
||||
}
|
||||
if($_GET['admin']== "deltopic"){
|
||||
$database->DeleteTopic($_GET[idt]); // delete topic
|
||||
}
|
||||
if($_GET['admin']== "delpost"){
|
||||
$database->DeletePost($_GET[pod]); // stick topic
|
||||
}
|
||||
if($_GET['admin']== "lock"){
|
||||
$database->LockTopic($_GET[idt],1); // lock topic
|
||||
}
|
||||
if($_GET['admin']== "unlock"){
|
||||
$database->LockTopic($_GET[idt],''); // unlock topic
|
||||
}
|
||||
if($_GET['admin']== "newforum"){
|
||||
include("Forum/forum_1.tpl"); // new forum
|
||||
}elseif(isset($_GET['fid'])){
|
||||
if(isset($_GET['ac'])){
|
||||
include("Forum/forum_5.tpl"); // new topic
|
||||
}else{
|
||||
include("Forum/forum_4.tpl"); // topic cat
|
||||
}
|
||||
}elseif($_GET['admin'] == "editforum"){
|
||||
include("Forum/forum_8.tpl"); // edit topic
|
||||
}elseif($_GET['admin'] == "editans"){
|
||||
include("Forum/forum_9.tpl"); // edit answer
|
||||
}elseif($_GET['admin'] == "editpost"){
|
||||
include("Forum/forum_10.tpl"); // edit answer
|
||||
}elseif($_GET['admin'] == "edittopic"){
|
||||
include("Forum/forum_3.tpl"); // edit topic
|
||||
}elseif(isset($_GET['tid'])){
|
||||
if(isset($_GET['ac'])){
|
||||
include("Forum/forum_7.tpl"); // new post
|
||||
}else{
|
||||
include("Forum/forum_6.tpl"); // showtopic
|
||||
}
|
||||
}else{
|
||||
if($database->CheckForum($aid)){
|
||||
include("Forum/forum_2.tpl");
|
||||
}else if($opt['opt5'] == 1){
|
||||
if($session->access==BANNED){
|
||||
echo '<p class="error">Forum is not created yet</p><p>
|
||||
<a href="banned.php"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a></p>';
|
||||
}else{
|
||||
echo '<p class="error">Forum is not created yet</p><p>
|
||||
<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a></p>';
|
||||
}}else{
|
||||
echo '<p class="error">Forum is not created yet</p>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$allianceInvitations = $database->getAliInvitations($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="invite" class="small_option"><thead>
|
||||
|
||||
<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">
|
||||
|
||||
<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="20"><span class="error"></span></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form> </p>
|
||||
|
||||
<p class="error"><?php echo $form->getError("name1"); ?><br /><?php echo $form->getError("name2"); ?><br /><?php echo $form->getError("name3"); ?><br /><?php echo $form->getError("name4"); ?><br /><?php echo $form->getError("name5"); ?><br /><?php echo $form->getError("perm"); ?></p><br />
|
||||
<table cellpadding="1" cellspacing="1" id="invitations" class="small_option"><thead>
|
||||
|
||||
<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>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
|
||||
<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) {
|
||||
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">
|
||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
</p>
|
||||
</form>
|
||||
<p class="error"></p>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<form method="post" action="allianz.php">
|
||||
<input type="hidden" name="a" value="5">
|
||||
<input type="hidden" name="o" value="5">
|
||||
<input type="hidden" name="s" value="5">
|
||||
|
||||
<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="" 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><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
@@ -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->getAllianceDipProfile($aid,3), $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->getAllianceDipProfile($aid,3), $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,33 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$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,85 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="options" class="small_option"><thead>
|
||||
<form method="POST" action="allianz.php">
|
||||
<input type="hidden" name="s" value="5">
|
||||
<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><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
@@ -0,0 +1,151 @@
|
||||
<?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;
|
||||
|
||||
foreach($memberlist as $member) {
|
||||
$totalpop += $database->getVSumField($member['id'],"pop");
|
||||
}
|
||||
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>".$rank."</th>";
|
||||
echo "<td><a href='spieler.php?uid=".$member['id']."'>".$name."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}?>
|
||||
<tr>
|
||||
<td colspan="2" class="emmty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="desc2" colspan="2"><?php echo nl2br($profiel[0]); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="desc1"><?php echo nl2br($profiel[1]); ?>
|
||||
</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;
|
||||
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=now online alt=now online /></td>";
|
||||
}
|
||||
}
|
||||
|
||||
echo " </tr>";
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}
|
||||
else {
|
||||
$aid = $session->alliance;
|
||||
}
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
if($session->access!=BANNED){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="quit" class="small_option"><thead>
|
||||
|
||||
<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">
|
||||
|
||||
<tr>
|
||||
<th colspan="2">Quit alliance</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr><td colspan="2" class="info">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"></td>
|
||||
</tr></tbody></table>
|
||||
|
||||
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<?php
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user