Пример #1
0
			</table>
			</form>
		</fieldset>

		<fieldset style="margin-top: 40px;">
			<legend>Delete Forum</legend>

			<form method="post" action="validation.php">
			<table>
				<tr>
					<td>Forum</td>
					<td>
						<select name="forum_id" size="1" class="text">
						<?php 
$query = query_select("forums");
$query .= query_select_order("section_id,position", "ASC");
$forums_list = get_array_from_db($query);
foreach ($forums_list as $item) {
    echo "<option value=\"{$item['forum_id']}\"> {$item['forum_name']} </option>";
}
?>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="hidden" name="action" value="delete_forum">
						<input type="submit" name="submit" value="Delete" class="button">
					</td>
				</tr>
			</table>
Пример #2
0
    echo "> {$item['forum_name']} </option>";
}
?>
						</select>
					</td>
				</tr>
				</form>

				<form method="post" action="validation.php">
				<tr>
					<td>Change Section</td>
					<td>
						<select name="new_section" class="text">
							<?php 
$query = query_select("sections");
$query .= query_select_order("position", "ASC");
$sections = get_array_from_db($query);
foreach ($sections as $section) {
    echo "<option value=\"{$section['section_id']}\" ";
    if ($section['section_id'] == $forum['section_id']) {
        echo "selected";
    }
    echo "> {$section['section_name']} </option>";
}
?>
						</select>
					</td>
					<td>
						<input type="hidden" name="action" value="update_forum_section">
						<input type="hidden" name="forum_id" value="<?php 
echo $forum['forum_id'];
Пример #3
0
<?php

require_once "shared/cookies.php";
require_once "shared/functions.php";
require_once "shared/header.php";
require_once "shared/bbCodeParser.php";
connect_to_database();
select_database();
if (!isset($_GET['thread']) || $_GET['thread'] == "" || get_num_rows("threads", "thread_id", $_GET['thread']) == 0) {
    redirect_to("not_found.php");
}
$thread_id = $_GET['thread'];
$query = query_select("posts");
$query .= query_select_where("thread_id", $thread_id);
$query .= query_select_order("time_posted", "ASC");
$posts = get_array_from_db($query);
$thread_author = get_value_from_db("threads", "author_id", "thread_id", $thread_id);
$thread_locked = get_value_from_db("threads", "locked", "thread_id", $thread_id);
//if the thread is locked, no one is allowed to post
if (logged_in() && !$thread_locked) {
    echo "<form method=\"post\" action=\"new_post.php\">";
    echo "<input type=\"hidden\" name=\"thread_id\" value=\"{$thread_id}\" >";
    echo "<input type=\"submit\" name=\"submit\" value=\"+ Reply to this thread\" class=\"button plus\">";
    echo "</form>";
}
echo "<div class=\"listBoxOuter\">";
echo "<div class=\"listBoxTitle\">";
if ($thread_locked) {
    echo "<span class=\"locked\">";
    echo "<img src=\"images/lock.png\" width=\"20\" height=\"25\" title=\"This Thread is locked.\" style=\"vertical-align:bottom\">";
    echo "</span>";
Пример #4
0
require_once "shared/cookies.php";
require_once "shared/functions.php";
require_once "shared/header.php";
connect_to_database();
select_database();
if (!isset($_GET['forum']) || $_GET['forum'] == "") {
    redirect_to("not_found.php");
} else {
    if (get_num_rows("forums", "forum_id", $_GET['forum']) == 0) {
        redirect_to("index_.php");
    }
}
$forum_id = $_GET['forum'];
$query = query_select("threads");
$query .= query_select_where("forum_id", $forum_id);
$query .= query_select_order("last_post_time", "DESC");
$threads = get_array_from_db($query);
$forum_locked = get_value_from_db("forums", "locked", "forum_id", $forum_id);
//if forum is locked, no one is allows to post threads
if (logged_in() && !$forum_locked) {
    echo "<form method=\"post\" action=\"new_thread.php\">";
    echo "<input type=\"hidden\" name=\"forum_id\" value=\"{$forum_id}\" >";
    echo "<input type=\"submit\" name=\"submit\" value=\"+ Post New Thread\" class=\"button plus\">";
    echo "</form>";
}
echo "<div class=\"listBoxOuter\">";
echo "<div class=\"listBoxTitle\">";
if ($forum_locked) {
    echo "<span class=\"locked\">";
    echo "<img src=\"images/lock.png\" width=\"20\" height=\"25\" title=\"This Forum is locked.\" style=\"vertical-align:bottom\">";
    echo "</span>";