• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTForum! 1.0 Beta

<style>
.top {
background:#505050;
font-size: 7pt;
font-weight: bold;
font-family: Verdana,Arial,Times New Roman,sans-serif;
text-align: center;
color: #EFEFEF;
}

.board {
background-color: #F2CB73;
text-align: center;
color: #F2CB73;
}

.light {
background-color: #F5D99A;
text-align: center;
color: #F5D99A;
}

img {
border: none;
}
</style>
<?php
include("forum/config.php");
include("forum/functions.php");
if($install)exit;
$date = timenow();
if(isset($_POST['login'])){
$acc = $_POST['account'];
$pass = $_POST['pass'];
if($acc == $admin_login and $pass == $admin_password) {
$_SESSION['admin'] = 'yes';
$main_content .= "<a href='?subtopic=forum&action=1'>Idź do panelu Admina</a>";}
else
$main_content .= "Zła nazwa lub hasło.";
}
$action = (int) $_REQUEST['action'];
if(!empty($action)){
if(!empty($_SESSION['admin'])){
$main_content .= "<a href='?subtopic=forum&action=3'>Nowy Temat.<br></a>";

if($action == 2){
$id = (int)$_GET['id'];
deleteBoard($id);
$main_content .= "Temat jest usunięty.<br>";
}
else if($action == 3){
if(isset($_POST['new_board'])){
$name = $_POST['name'];
$desc = $_POST['desc'];
$closed = $_POST['closed'];
$access = $_POST['access'];
mysql_query("INSERT INTO `forums` VALUES('', '$name', '$desc', '$closed', '$access');");
$main_content .= "$name has been made.";
}


$main_content .= "<form method='post' action='?subtopic=forum&action=3'>";
$main_content .= "Nazwa tematu:<br> <input type='text' name='name'><br>";
$main_content .= "Opis:<br><textarea name='desc'></textarea><br>";
$main_content .= "Zamknięty:<br> <select name='closed'><option value='0'>Nie</option><option value='1'>Tak</option></select><br>";
$main_content .= "Poziom wtajemniczenia do wejścia: <br><input type='text' value='0' size='2' name='access'><br>";
$main_content .= "<input type='submit' name='new_board' value='Make new board'>";
$main_content .= "</form>";
}
}
else {
$main_content .= "<form action='?subtopic=forum' method='post'>Nazwa:<br><input type='password' name='account'><br>Hasło:<br><input type='password' name='pass'><br><input name='login' type='submit' value='Login'></form>";
}
}
if(!$logged) $main_content .= "Jesteś <b>nie zalogowany</b>. <a href='?subtopic=accountmanagement'>Zaloguj się</a> by korzystać z forum.<br>";
$main_content .= "<div align='right'>Obecny czas: $date</div>";
$main_content .= "<table cellspacing='1' width='100%'><td width='5%' class='top'></td><td width='50%' class='top'><font color='#EFEFEF'>Temat</font></td><td width='10%' class='top'><font color='#EFEFEF'>Wiadmości</font></td><td width='10%' class='top'><font color='#EFEFEF'>Tematów</font></td><td width='30%' class='top'><font color='#EFEFEF'>Ostani post</font></td><tr></tr>";
$sql = mysql_query("SELECT * FROM `forums`");
$row = mysql_num_rows($sql);
if($row == 0) $main_content .= "<b>No specified forums yet.</b>"; else {
while($cmd = mysql_fetch_array($sql)){
$name = $cmd['name'];
$desc = $cmd['description'];
$access = $cmd['access'];
$closed = $cmd['closed'];
$id = $cmd['id'];
if($closed == 1)$close = "<img src='forum/images/closed.gif'>";
if(!$logged) $user_access = 0; else {
$user = loadAccountById($account_logged);
$user_access = $user['page_access']; }
if($access > $user_access) continue;

$posts = mysql_num_rows(mysql_query("SELECT * FROM `posts` WHERE `board` = '$id'"));
$threads = mysql_num_rows(mysql_query("SELECT * FROM `threads` WHERE `board` = '$id'"));
$last = mysql_query("SELECT * FROM `posts` WHERE `board` = '$id' ORDER BY `id` DESC LIMIT 1");
$row = mysql_num_rows($last);
if($row == 0) $last = "None"; else {
$cmd1 = mysql_fetch_array($last);
$author = $cmd1['author'];
$thread = $cmd1['thread'];
$date = $cmd1['date'];
$last = "<a href='?subtopic=thread&id=$thread'><img src='forum/images/arrow.gif'></a> $date<br>by <a href='?subtopic=characters&name=$author'>$author</a>";
}
if(!empty($_SESSION['admin']))
$admin = "<a href='?subtopic=forum&action=2&id=$id'>Usun ten temat</a>";
$main_content .= "<td class='board'>$close</td><td class='board' style='text-align: left;'><a href='?subtopic=board&id=$id'>$name</a><br><span style='font-size: 8pt;'>$desc</span><br>$admin</td><td class='light'>$posts</td><td class='board'>$threads</td><td class='light'>$last</td><tr></tr>";

}

}
$main_content .= "</table>";
$main_content .= "<font style='font-size: 8px;'><a href='?subtopic=forum&action=1'>Admin</a></font>";
?>
 
i have problem
beztytuuyty.jpg
 

Similar threads

Back
Top