+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
if (!defined('IN_TBDEV_FORUM')) {
    print "{$lang['forum_new_topic_access']}";
    exit;
}
$forumid = (int) $_GET["forumid"];
if (!is_valid_id($forumid)) {
    header("Location: {$TBDEV['baseurl']}/forums.php");
}
$HTMLOUT = stdhead("{$lang['forum_new_topic_newtopic']}");
$HTMLOUT .= begin_main_frame();
$HTMLOUT .= insert_compose_frame($forumid);
$HTMLOUT .= end_main_frame();
$HTMLOUT .= stdfoot();
print $HTMLOUT;
die;
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
if (!defined('IN_TBDEV_FORUM')) {
    print "{$lang['forum_quote_post_access']}";
    exit;
}
//-------- Action: Quote
$topicid = (int) $_GET["topicid"];
if (!is_valid_id($topicid)) {
    stderr("{$lang['forum_quote_post_error']}", "{$lang['forum_quote_post_invalid']}");
}
$HTMLOUT = stdhead("{$lang['forum_quote_post_reply']}");
$HTMLOUT .= begin_main_frame();
$HTMLOUT .= insert_compose_frame($topicid, false, true);
$HTMLOUT .= end_main_frame();
$HTMLOUT .= stdfoot();
print $HTMLOUT;
die;
Beispiel #3
0
//-------- Action: Edit post
if ($action == "editpost") {
    $postid = 0 + $_GET["postid"];
    check_whether_exist($postid, 'post');
    $res = sql_query("SELECT userid, topicid FROM posts WHERE id=" . sqlesc($postid)) or sqlerr(__FILE__, __LINE__);
    $arr = mysql_fetch_assoc($res);
    $res2 = sql_query("SELECT locked FROM topics WHERE id = " . $arr["topicid"]) or sqlerr(__FILE__, __LINE__);
    $arr2 = mysql_fetch_assoc($res2);
    $locked = $arr2["locked"] == 'yes';
    $ismod = is_forum_moderator($postid, 'post');
    if (($CURUSER["id"] != $arr["userid"] || $locked) && get_user_class() < $postmanage_class && !$ismod) {
        permissiondenied();
    }
    stdhead($lang_forums['text_edit_post']);
    begin_main_frame();
    insert_compose_frame($postid, 'edit');
    end_main_frame();
    stdfoot();
    die;
}
//-------- Action: Post
if ($action == "post") {
    if ($CURUSER["forumpost"] == 'no') {
        stderr($lang_forums['std_sorry'], $lang_forums['std_unauthorized_to_post'], false);
        die;
    }
    $id = $_POST["id"];
    $type = $_POST["type"];
    $subject = $_POST["subject"];
    $body = trim($_POST["body"]);
    $casinomode = $_POST["casinomode"];
Beispiel #4
0
     end_main_frame();
     stdfoot();
     exit;
 } else {
     if ($action == "reply") {
         // -------- Action: Reply
         $topicid = (int) $_GET["topicid"];
         if (!is_valid_id($topicid)) {
             stderr('Error', 'Invalid ID!');
         }
         stdhead("Post reply");
         begin_main_frame();
         if ($FORUMS_ONLINE == '0') {
             stdmsg('Warning', '' . $language['maint'] . '');
         }
         insert_compose_frame($topicid, false, false, true);
         end_main_frame();
         stdfoot();
         exit;
     } else {
         if ($action == "editpost") {
             // -------- Action: Edit post
             $postid = (int) $_GET["postid"];
             if (!is_valid_id($postid)) {
                 stderr('Error', 'Invalid ID!');
             }
             $res = sql_query("SELECT p.userid, p.topicid, p.posticon, p.body, t.locked,t.forumid  " . "FROM posts AS p " . "LEFT JOIN topics AS t ON t.id = p.topicid " . "WHERE p.id = " . sqlesc($postid)) or sqlerr(__FILE__, __LINE__);
             if (mysql_num_rows($res) == 0) {
                 stderr("Error", "No post with that ID!");
             }
             $arr = mysql_fetch_assoc($res);
Beispiel #5
0
// ------ "View unread" / "Add reply" buttons
$HTMLOUT .= "<a href='forums.php?action=viewunread' class='button new_reply_button'><span>Show New</span></a>&nbsp;";
if ($maypost) {
    $HTMLOUT .= "<a href='forums.php?action=reply&topicid=" . $topicid . "' class='button new_reply_button'><span>New Reply</span></a>&nbsp;";
}
$HTMLOUT .= "</div><br /><br /><br />";
if ($locked) {
    $HTMLOUT .= "";
} else {
    $HTMLOUT .= "<div class='float_left' style='margin-top:-4em'>";
    $HTMLOUT .= $pagemenu1 . $pmlb . $pagemenu2 . $pmlb . $pagemenu3;
    if ($Multi_forum['configs']['use_poll_mod'] && (($userid == $t_userid || $CURUSER['class'] >= UC_STAFF || isMod($forumid, "forum")) && !is_valid_id($pollid))) {
        $HTMLOUT .= "<form style='margin-top:-6em' method='post' action='forums.php'>\n<input type='hidden' name='action' value='makepoll' />\n  <input type='hidden' name='topicid' value='" . $topicid . "' />\n  <input type='submit' class='btn btn-default' value='Add a Poll' />\n  </form>";
    }
    $HTMLOUT .= "</div>";
    $HTMLOUT .= "<h3>Quick Reply:</h3>" . insert_compose_frame($topicid, false, false, true);
    /**
        $HTMLOUT .="<br class='clear' />
        <br />
        <form  style='margin-top:-1em' name='compose' method='post' action='forums.php'>
        <table border='0' cellspacing='0' cellpadding='5' class='tborder'>
        <thead>
        <tr>
        <td class='thead' colspan='2'>
        <div><strong>Quick Reply</strong></div>
        </td>
        </tr>
        </thead>
        <tbody style='' id='quickreply_e'>
        <tr>
        <td class='trowqr' valign='top' width='22%'>
<?php

if (!defined('IN_TBDEV_FORUM')) {
    print "<h1>Incorrect access</h1>You cannot access this file directly.";
    exit;
}
$forumid = (int) $_GET["forumid"];
if (!is_valid_id($forumid)) {
    header("Location: {$BASEURL}/forums.php");
}
stdhead("New topic");
begin_main_frame();
insert_compose_frame($forumid);
end_main_frame();
stdfoot();
die;
Beispiel #7
0
* Bigjoos 2015
******
*/
if (!defined('IN_INSTALLER09_FORUM')) {
    $HTMLOUT = '';
    $HTMLOUT .= '<!DOCTYPE html>
        <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
        <head>
        <meta charset="' . charset() . '" />
        <title>ERROR</title>
        </head><body>
        <h1 style="text-align:center;">Error</h1>
        <p style="text-align:center;">How did you get here? silly rabbit Trix are for kids!.</p>
        </body></html>';
    echo $HTMLOUT;
    echo $HTMLOUT;
    exit;
}
// -------- Action: New topic
$forumid = (int) $_GET["forumid"];
if (!is_valid_id($forumid)) {
    stderr('Error', 'Invalid ID!');
}
//$HTMLOUT .= begin_main_frame();
if ($INSTALLER09['forums_online'] == 0) {
    $HTMLOUT .= stdmsg('Warning', 'Forums are currently in maintainance mode');
}
$HTMLOUT .= insert_compose_frame($forumid, true, false, true);
//$HTMLOUT .= end_main_frame();
echo stdhead("New Topic", true, $stdhead) . $HTMLOUT . stdfoot($stdfoot);
exit;