first commit

This commit is contained in:
unknown
2012-03-29 13:00:34 +02:00
commit 6928cbcd1d
2446 changed files with 85772 additions and 0 deletions
+186
View File
@@ -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
+211
View File
@@ -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>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</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>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</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>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</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>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</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");
}
?>
+46
View File
@@ -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");
}
?>
+107
View File
@@ -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
+109
View File
@@ -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
+110
View File
@@ -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