Example #1
0
// Retrieve all the records for this topic
//$intervalTime = $mytimer->stopTimer();
//COM_errorLog("Topic Display Time2b: $intervalTime");
$sql = "(SELECT * FROM {$_TABLES['forum_topic']} WHERE id='{$showtopic}') " . "UNION ALL (SELECT * FROM {$_TABLES['forum_topic']} WHERE pid='{$showtopic}') " . "ORDER BY id {$order} LIMIT {$offset}, {$show}";
$result = DB_query($sql);
// Display each post in this topic
$onetwo = 1;
while ($topicRec = DB_fetchArray($result)) {
    //$intervalTime = $mytimer->stopTimer();
    //COM_errorLog("Topic Display Time: $intervalTime");
    if ($CONF_FORUM['show_anonymous_posts'] == 0 and $topicRec['uid'] == 1) {
        $display .= '<div class="pluginAlert" style="padding:10px;margin:10px;">' . $LANG_GF02['msg300'] . '</div>';
        break;
        //Do nothing - but this way I don't always have to do this check
    } else {
        $display .= showtopic($topicRec, $mode, $onetwo, $page);
        $onetwo = $onetwo == 1 ? 2 : 1;
    }
}
if ($mode != 'preview') {
    $topic_footer = COM_newTemplate($CONF_FORUM['path_layout'] . 'forum/layout');
    $topic_footer->set_file(array('topicfooter' => 'topicfooter.thtml', 'new' => 'links/newtopic.thtml', 'reply' => 'links/replytopic.thtml'));
    if ($viewtopic['is_readonly'] == 0 or forum_modPermission($viewtopic['forum'], $_USER['uid'], 'mod_edit')) {
        $newtopiclink = "{$_CONF['site_url']}/forum/createtopic.php?method=newtopic&amp;forum={$forum}";
        $newtopiclinktext = $LANG_GF09['newtopic'];
        $topic_footer->set_var('layout_url', $CONF_FORUM['layout_url']);
        $topicDisplayTime = $mytimer->stopTimer();
        $topic_footer->set_var('page_generated_time', sprintf($LANG_GF02['msg179'], $topicDisplayTime));
        $topic_footer->set_var('newtopiclink', $newtopiclink);
        $topic_footer->set_var('newtopiclinkimg', gf_getImage('post_newtopic'));
        $topic_footer->set_var('newtopiclinktext', $newtopiclinktext);
Example #2
0
 $previewitem['subject'] = gf_checkHTML($subject);
 $previewitem['postmode'] = gf_chkpostmode($postmode, $postmode_switch);
 $previewitem['mood'] = $_POST['mood'];
 $previewitem['comment'] = trim($comment);
 $forum_outline_header = new Template($_CONF['path_layout'] . 'forum/layout');
 $forum_outline_header->set_file(array('forum_outline_header' => 'forum_outline_header.thtml'));
 $forum_outline_header->set_var('imgset', $CONF_FORUM['imgset']);
 $forum_outline_header->parse('output', 'forum_outline_header');
 echo $forum_outline_header->finish($forum_outline_header->get_var('output'));
 $preview_header = new Template($_CONF['path_layout'] . 'forum/layout');
 $preview_header->set_file(array('preview_header' => 'topicpreview_header.thtml'));
 $preview_header->set_var('imgset', $CONF_FORUM['imgset']);
 $preview_header->set_var('startblock', COM_startBlock('<b>' . $LANG_GF01['TopicPreview'] . '</b>', '', 'forum/layout/blockheader.thtml'));
 $preview_header->parse('output', 'preview_header');
 echo $preview_header->finish($preview_header->get_var('output'));
 echo showtopic($previewitem, 'preview');
 $preview_footer = new Template($_CONF['path_layout'] . 'forum/layout');
 $preview_footer->set_file(array('preview_footer' => 'topicpreview_footer.thtml'));
 $preview_footer->set_var('imgset', $CONF_FORUM['imgset']);
 $preview_footer->parse('output', 'preview_footer');
 echo $preview_footer->finish($preview_footer->get_var('output'));
 $forum_outline_footer = new Template($_CONF['path_layout'] . 'forum/layout');
 $forum_outline_footer->set_file(array('forum_outline_footer' => 'forum_outline_footer.thtml'));
 $forum_outline_footer->set_var('imgset', $CONF_FORUM['imgset']);
 $forum_outline_footer->parse('output', 'forum_outline_footer');
 echo $forum_outline_footer->finish($forum_outline_footer->get_var('output'));
 echo '<br>';
 // If Moderator and editing the parent topic - see if form has skicky or locked checkbox on
 if ($editmoderator and $editpid == 0) {
     if ($method == 'edit') {
         if ($_POST['locked_switch'] == 1) {
Example #3
0
            $i = 0;
            $page .= "</tr>\n";
        }
    }
    if ($i != 0) {
        $page .= "</tr>\n";
    }
    //Cierra los dos tables
    $page .= "</table>\n</td>\n</tr>\n<tr>\n<td class=\"c\" align=\"center\">";
    $page .= "<a href=\"javascript:window.close();\">Cerrar Ventana</a>\n";
    $page .= "</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>";
    display($page, 'Emoticons', false);
    die;
}
/*
  Foro!!!
*/
if (isset($f) && isset($new) && is_numeric($f) && $new == "thread") {
    newthread($f);
} elseif (isset($t) && isset($new) && is_numeric($t) && $new == "reply") {
    reply($t);
} elseif (isset($f) && is_numeric($f)) {
    showtopic($f);
} elseif (isset($t) && is_numeric($t)) {
    showthread($t);
} elseif (isset($mode) && $mode == 'smilies') {
    smilies();
} else {
    showcategories();
}
// Created by Perberos. All rights reversed (C) 2006
Example #4
0
    $result = DB_query($sql);
} else {
    $sql = "SELECT * FROM {$_TABLES['gf_topic']} WHERE id='{$showtopic}' OR pid='{$showtopic}' ORDER BY id {$order} LIMIT {$offset}, {$show}";
    $result = DB_query($sql);
}
// Display each post in this topic
$onetwo = 1;
while ($topicRec = DB_fetchArray($result)) {
    //$intervalTime = $mytimer->stopTimer();
    //COM_errorLog("Topic Display Time: $intervalTime");
    if ($CONF_FORUM['show_anonymous_posts'] == 0 and $topicRec['uid'] == 1) {
        echo '<div class="pluginAlert" style="padding:10px;margin:10px;">Your preferences have block anonymous posts enabled</div>';
        break;
        //Do nothing - but this way I don't always have to do this check
    } else {
        echo showtopic($topicRec, $mode, $onetwo, $page);
        $onetwo = $onetwo == 1 ? 2 : 1;
    }
}
if ($mode != 'preview') {
    $topic_footer = new Template($_CONF['path_layout'] . 'forum/layout');
    $topic_footer->set_file(array('topicfooter' => 'topicfooter.thtml', 'new' => 'links/newtopic.thtml', 'reply' => 'links/replytopic.thtml'));
    if ($viewtopic['is_readonly'] == 0 or forum_modPermission($viewtopic['forum'], $_USER['uid'], 'mod_edit')) {
        $newtopiclink = "{$_CONF['site_url']}/forum/createtopic.php?method=newtopic&forum={$forum}";
        $newtopiclinkimg = '<img src="' . gf_getImage('post_newtopic') . '" border="0" align="absmiddle" alt="' . $LANG_GF01['NEWTOPIC'] . '" TITLE="' . $LANG_GF01['NEWTOPIC'] . '">';
        $topic_footer->set_var('layout_url', $_CONF['layout_url']);
        $topicDisplayTime = $mytimer->stopTimer();
        $topic_footer->set_var('page_generated_time', sprintf($LANG_GF02['msg179'], $topicDisplayTime));
        $topic_footer->set_var('newtopiclink', $newtopiclink);
        $topic_footer->set_var('newtopiclinkimg', $newtopiclinkimg);
        $topic_footer->set_var('LANG_newtopic', $LANG_GF01['NEWTOPIC']);
Example #5
0
 $previewitem['locked'] = $edittopic['locked'];
 $previewitem['views'] = 0;
 $previewitem['forum'] = $edittopic['forum'];
 $previewitem['comment'] = trim($comment);
 $forum_outline_header = COM_newTemplate($CONF_FORUM['path_layout'] . 'forum/layout');
 $forum_outline_header->set_file(array('forum_outline_header' => 'forum_outline_header.thtml'));
 $forum_outline_header->set_var('imgset', $CONF_FORUM['imgset']);
 $forum_outline_header->parse('output', 'forum_outline_header');
 $display .= $forum_outline_header->finish($forum_outline_header->get_var('output'));
 $preview_header = COM_newTemplate($CONF_FORUM['path_layout'] . 'forum/layout');
 $preview_header->set_file(array('preview_header' => 'topicpreview_header.thtml'));
 $preview_header->set_var('imgset', $CONF_FORUM['imgset']);
 //    $preview_header->set_var ('startblock', COM_startBlock('<b>' .$LANG_GF01['TopicPreview']. '</b>','','forum/layout/blockheader.thtml') );
 $preview_header->parse('output', 'preview_header');
 $display .= $preview_header->finish($preview_header->get_var('output'));
 $display .= showtopic($previewitem, 'preview');
 $preview_footer = COM_newTemplate($CONF_FORUM['path_layout'] . 'forum/layout');
 $preview_footer->set_file(array('preview_footer' => 'topicpreview_footer.thtml'));
 $preview_footer->set_var('imgset', $CONF_FORUM['imgset']);
 $preview_footer->parse('output', 'preview_footer');
 $display .= $preview_footer->finish($preview_footer->get_var('output'));
 $forum_outline_footer = COM_newTemplate($CONF_FORUM['path_layout'] . 'forum/layout');
 $forum_outline_footer->set_file(array('forum_outline_footer' => 'forum_outline_footer.thtml'));
 $forum_outline_footer->set_var('imgset', $CONF_FORUM['imgset']);
 $forum_outline_footer->parse('output', 'forum_outline_footer');
 $display .= $forum_outline_footer->finish($forum_outline_footer->get_var('output'));
 $display .= '<br' . XHTML . '>';
 // If Moderator and editing the parent topic - see if form has skicky or locked checkbox on
 isset($editmoderator) or $editmoderator = '';
 if ($editmoderator and $editpid == 0) {
     if ($method == 'edit') {
Example #6
0
            $close = '<option value="closetopic">- ' . $_language->module['close_topic'] . '</option>';
        }
        $adminactions = '<input class="input" type="checkbox" name="ALL" value="ALL" onclick="SelectAll(this.form);" /> ' . $_language->module['select_all'] . '
		<select name="admaction">
      <option value="0">' . $_language->module['admin_actions'] . ':</option>
      <option value="delposts">- ' . $_language->module['delete_posts'] . '</option>
      <option value="stickytopic">- ' . $_language->module['make_topic_sticky'] . '</option>
      <option value="unstickytopic">- ' . $_language->module['make_topic_unsticky'] . '</option>
      <option value="movetopic">- ' . $_language->module['move_topic'] . '</option>
      ' . $close . '
      <option value="deletetopic">- ' . $_language->module['delete_topic'] . '</option>
    </select>
    <input type="hidden" name="topicID" value="' . $topic . '" />
    <input type="hidden" name="board" value="' . $dt['boardID'] . '" />
    <input type="submit" name="submit" value="' . $_language->module['go'] . '" />';
    }
    eval("\$forum_topic_foot = \"" . gettemplate("forum_topic_foot") . "\";");
    echo $forum_topic_foot;
    eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";");
    echo $forum_topics_actions;
    echo '<div align="right">' . $adminactions . '</div></form>';
    if ($dt['closed']) {
        echo $_language->module['closed_image'];
    } else {
        if (!$loggedin && !$edit) {
            echo $_language->module['not_logged_msg'];
        }
    }
}
showtopic($topic, $edit, $addreply, $quoteID, $type);