topical media & game development
basic-php-16-compose.php / php
<?php
require_once 'conn.php';
require_once 'functions.php';
require_once 'header.php';
_GET['topicid'])) {
_GET['topicid'];
} else {
_GET['forumid'])) {
_GET['forumid'];
} else {
_GET['reid'])) {
_GET['reid'];
}
post = '';
_SESSION['user_id'];
_GET['a'])
and _GET['post'])
and edit_mode = TRUE;
}
require_once 'header.php';
if (!isset(edit_mode and authorid) {
echo "<div class=\"noauth\">" .
"You are not authorized to edit this post. Please contact " .
"your administrator.</div>";
} else {
if (sql = "SELECT * FROM forum_posts p, forum_forum f " .
"WHERE p.id = " . result = mysql_query(conn)
or die('Could not retrieve post data; ' . mysql_error());
result);
row['subject'];
row['topic_id'];
row['forum_id'];
row['body'];
_GET['post'];
row['author_id'];
} else {
if (topicid = 0;
reid != "") {
reid;
sql, result) > 0) {
result);
row['subject']);
}
}
sql .= forumid";
sql,result) > 0) {
result);
row['subject'] . "</em>\n";
re == ""?"":"Re: " . topicname = "Reply";
forumid == "" or forumid = 1;
forumid . "'";
sql, row = mysql_fetch_array(forumname = edit_mode
?"Edit Post"
:"topicname"; ?>
</h3>
<p>
Subject:<br>
<input type="text" class="subject" name="subject" maxlength="255"
value="<?php echo body; ?></textarea>
</p>
<p>
<?php
if (post\">\n";
echo "<input type=\"hidden\" name=\"topic_id\" " .
"value=\"forumid\">\n";
echo "<input type=\"hidden\" name=\"author_id\" " .
"value=\"
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.