Esempio n. 1
0
// |                                                                           |
// | You should have received a copy of the GNU General Public License         |
// | along with this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
//
require_once "../lib-common.php";
require_once $_CONF['path_html'] . 'forum/include/gf_format.php';
require_once $_CONF['path_html'] . 'forum/include/gf_showtopic.php';
require_once $_CONF['path'] . 'plugins/forum/debug.php';
// Common Debug Code
// Display Common headers
gf_siteHeader();
// Check for access privilege and pass true to check that user is signed in.
forum_chkUsercanAccess(true);
$forum = COM_applyFilter($_REQUEST['forum'], true);
$showtopic = COM_applyFilter($_REQUEST['showtopic'], true);
ForumHeader($forum, $showtopic);
// Pass thru filter any get or post variables to only allow numeric values and remove any hostile data
$fortopicid = COM_applyFilter($_REQUEST['fortopicid'], true);
$moveid = COM_applyFilter($_REQUEST['moveid'], true);
$top = COM_applyFilter($_REQUEST['top']);
$movetoforum = COM_applyFilter($_REQUEST['movetoforum'], true);
$msgid = COM_applyFilter($_REQUEST['msgid'], true);
$msgpid = COM_applyFilter($_REQUEST['msgpid'], true);
$fortopicid = COM_applyFilter($_REQUEST['fortopicid'], true);
$modfunction = COM_applyFilter($_REQUEST['modfunction']);
$submit = $_POST['submit'];
if ($forum == 0) {
    alertMessage($LANG_GF02['msg71']);
Esempio n. 2
0
//Check is anonymous users can access
if ($_FF_CONF['registration_required'] && COM_isAnonUser()) {
    $display = COM_siteHeader();
    $display .= SEC_loginRequiredForm();
    $display .= COM_siteFooter();
    echo $display;
    exit;
}
/*
 * Initialize vars
 */
$canPost = 0;
$display = '';
$pageBody = '';
$todaysdate = date("l, F d, Y");
forum_chkUsercanAccess();
// Check to see if request to mark all topics read was requested
if (!COM_isAnonUser() && $op == 'markallread') {
    $now = time();
    $categories = array();
    if ($cat_id == 0 && $forum_id == 0) {
        $csql = DB_query("SELECT id FROM {$_TABLES['ff_categories']} ORDER BY id");
        while (list($categoryID) = DB_fetchArray($csql)) {
            $categories[] = $categoryID;
        }
    } else {
        $categories[] = $cat_id;
    }
    foreach ($categories as $category) {
        $extraWhere = '';
        if ($forum_id != 0) {