Example #1
0
        $tpl = 'main_posthold';
    }
    echo load_header();
    echo ParseTpl(makeUp($tpl));
}
if (!defined('HEADER_CALLED')) {
    header("Location: {$main_url}/");
    exit;
}
if (file_exists($pathToFiles . 'bb_plugins2.php')) {
    require_once $pathToFiles . 'bb_plugins2.php';
}
$freeWareKeys = array('Web Forum Software', 'Chat Forum Software', 'Discussion Forum Software', 'Light Forum Script', 'PHP Forum Software', 'Forum Script', 'Forum Software', 'Free Forum Software', 'Open Source Forum Script', 'Simple Bulletin Board', 'Bulletin Board Script', 'Bulletin Board Software', 'Community Script', 'Online Community Software', 'Easy Forum Software', 'Online Community Script');
$rndNum = strlen($sitename);
$tk = sizeof($freeWareKeys) - 1;
while ($rndNum > $tk) {
    $rndNum = $rndNum - $tk;
}
//$ck=rand(0,sizeof($freeWareKeys)-1);
$software = $freeWareKeys[$rndNum];
$violating_the_copyright_may_result_in_your_criminal_responsibility = <<<out
<a href="http://www.minibb.com/" target="_blank"><img src="{$main_url}/img/minibb.gif" alt="{$sitename} {$l_poweredBy} {$software} miniBB &reg;" title="{$sitename} {$l_poweredBy} {$software} miniBB &reg;" /></a>
out;
//Loading footer
$endtime = get_microtime();
$totaltime = sprintf("%01.3f", $endtime - $starttime);
if (isset($includeFooter) and $includeFooter != '') {
    include $includeFooter;
} else {
    echo ParseTpl(makeUp('main_footer'));
}
                        require_once 'geograph/gridsquare.class.php';
                        $g_image = new GridImage();
                    }
                    $ok = $g_image->loadFromId($g_id);
                    if ($ok && $g_image->moderation_status == 'rejected' && (!isset($userRanks[$cc]) || $userRanks[$cc] == 'Member')) {
                        $ok = false;
                    }
                    if ($ok) {
                        if ($g_matches[1][$i]) {
                            $g_img = $g_image->getThumbnail(120, 120, false, true);
                            #$g_img = preg_replace('/alt="(.*?)"/','alt="'.$g_image->grid_reference.' : \1 by '.$g_image->realname.'"',$g_img);
                            $g_title = $g_image->grid_reference . ' : ' . htmlentities($g_image->title) . ' by ' . $g_image->realname;
                            $postText2 = str_replace("[[[{$g_id}]]]", "<a href=\"http://{$_SERVER['HTTP_HOST']}/photo/{$g_id}\" target=\"_blank\" title=\"{$g_title}\">{$g_img}</a>", $postText2);
                        } else {
                            $postText2 = preg_replace("/(?<!\\[)\\[\\[{$g_id}\\]\\]/", "{<a href=\"http://{$_SERVER['HTTP_HOST']}/photo/{$g_id}\" target=\"_blank\">{$g_image->grid_reference} : {$g_image->title}</a>}", $postText2);
                        }
                    }
                    $global_thumb_count++;
                }
                $thumb_count++;
            } else {
                $postText2 = str_replace("[[{$g_id}]]", "<a href=\"http://{$_SERVER['HTTP_HOST']}/gridref/" . str_replace(' ', '+', $g_id) . "\" target=\"_blank\">{$g_id}</a>", $postText2);
            }
        }
    }
    echo ParseTpl(makeUp('hack_preview2'));
    exit;
} elseif (isset($_POST['prevForm']) and trim($_POST['postText']) == '') {
    echo '';
    exit;
}
function load_header()
{
    //we need to load this template separately, because we load page title
    if (!isset($GLOBALS['adminPanel'])) {
        $GLOBALS['adminPanel'] = 0;
    }
    if (strlen($GLOBALS['action']) > 0 || $GLOBALS['adminPanel'] == 1) {
        $f = 1;
        $GLOBALS['l_menu'][0] = " <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}\">{$GLOBALS['l_menu'][0]}</a> ";
    } else {
        $f = 0;
        $GLOBALS['l_menu'][0] = '';
    }
    if ($GLOBALS['action'] != 'stats') {
        $GLOBALS['l_menu'][3] = ($f == 1 ? $GLOBALS['l_sepr'] : '') . " <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=stats\">{$GLOBALS['l_menu'][3]}</a> ";
    } else {
        $GLOBALS['l_menu'][3] = '';
    }
    if ($GLOBALS['viewTopicsIfOnlyOneForum'] == 1 and $GLOBALS['action'] == '') {
        $GLOBALS['l_menu'][7] = "{$GLOBALS['l_sepr']} <a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> ";
    }
    if (isset($GLOBALS['nTop']) && $GLOBALS['nTop'] == 1) {
        if ($GLOBALS['action'] == 'vtopic') {
            $GLOBALS['l_menu'][7] = "{$GLOBALS['l_sepr']} <a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> ";
        } elseif ($GLOBALS['action'] == 'vthread') {
            $GLOBALS['l_menu'][7] = "{$GLOBALS['l_sepr']} <a href=\"#newreply\">{$GLOBALS['l_reply']}</a> ";
        }
    } else {
        $GLOBALS['l_menu'][7] = '';
    }
    if ($GLOBALS['action'] != 'search') {
        $GLOBALS['l_menu'][1] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=search\">{$GLOBALS['l_menu'][1]}</a> ";
    } else {
        $GLOBALS['l_menu'][1] = '';
    }
    if ($GLOBALS['action'] != 'registernew' and $GLOBALS['user_id'] == 0 and $GLOBALS['adminPanel'] != 1 and $GLOBALS['enableNewRegistrations']) {
        $GLOBALS['l_menu'][2] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=registernew\">{$GLOBALS['l_menu'][2]}</a> ";
    } else {
        $GLOBALS['l_menu'][2] = '';
    }
    if ($GLOBALS['action'] != 'manual') {
        $GLOBALS['l_menu'][4] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=manual\">{$GLOBALS['l_menu'][4]}</a> ";
    } else {
        $GLOBALS['l_menu'][4] = '';
    }
    if ($GLOBALS['action'] != 'prefs' && $GLOBALS['user_id'] != 0 and $GLOBALS['enableProfileUpdate']) {
        $GLOBALS['l_menu'][5] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=prefs\">{$GLOBALS['l_menu'][5]}</a> ";
    } else {
        $GLOBALS['l_menu'][5] = '';
    }
    if ($GLOBALS['user_id'] != 0) {
        $GLOBALS['l_menu'][6] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}mode=logout\">{$GLOBALS['l_menu'][6]}</a> ";
    } else {
        $GLOBALS['l_menu'][6] = '';
    }
    if (!isset($GLOBALS['title']) or $GLOBALS['title'] == '') {
        $GLOBALS['title'] = $GLOBALS['sitename'];
    }
    if (isset($GLOBALS['includeHeader'])) {
        include $GLOBALS['includeHeader'];
        return;
    }
    return ParseTpl(makeUp('main_header'));
}
Example #4
0
            $USERINFO .= ParseTpl($usrCell);
        }
        //if posts
    }
    if ($user > 1 and ($user_id == 1 or $isMod == 1 and $user_id != $user and !$blockedMod)) {
        /* activity link */
        $act = $row[0];
        $actnew = $act == 0 ? 1 : 0;
        $mes1 = $act == 0 ? $l_no : $l_yes;
        $mes2 = $act == 0 ? $l_yes : $l_no;
        $what = $l_member;
        $whatValue = "{$mes1} [<a href=\"{$main_url}/{$indexphp}action=userinfo&amp;user={$user}&amp;activity={$actnew}\">{$mes2}</a>]";
        $USERINFO .= ParseTpl($usrCell);
        /* edit profile link */
        $what = $l_editPrefs;
        $whatValue = "<a href=\"{$main_url}/{$indexphp}action=prefs&amp;adminUser={$user}\">&gt;&gt;&gt;</a>";
        $USERINFO .= ParseTpl($usrCell);
    }
    /* finally */
    $userInfo = $l_about . ' &ldquo;' . $row[1] . '&rdquo;';
    $title .= $l_about . ' ' . $row[1];
    $tpl = makeUp('main_user_info');
} else {
    $title .= $l_userNotExists;
    $errorMSG = $l_userNotExists;
    $correctErr = $backErrorLink;
    $tpl = makeUp('main_warning');
}
echo load_header();
echo ParseTpl($tpl);
return;
        if ($show) {
            $sel = '';
            if (isset($forumGroups) and isset($forumGroupsDesc) and in_array($row[0], $forumGroups)) {
                $forumGroupName = $forumGroupsDesc[$keyAr];
                $listForums .= "<option value={$row[0]}>{$forumGroupName}</option>";
                $keyAr++;
            }
            if ($keyAr > 0) {
                $sp = '&nbsp;&nbsp;&nbsp;';
            } else {
                $sp = '';
            }
            if (isset($st) && $st == 1) {
                if ($row[0] != $frm) {
                    $listForums .= "<option value={$row[0]}>{$sp}{$row[1]}</option>\n";
                }
            } else {
                if ($row[0] == $frm) {
                    $sel = ' selected';
                }
                $listForums .= "<option value={$row[0]}{$sel}>{$sp}{$row[1]}</option>\n";
            }
            $i++;
        }
    } while ($row = db_simpleSelect(1));
    unset($result);
    unset($countRes);
    if ($i > 1) {
        $forumsList = ParseTpl($tpl);
    }
}
Example #6
0
function load_header()
{
    //we need to load this template separately, because we load page title
    if (!isset($GLOBALS['forum'])) {
        $GLOBALS['forum'] = 0;
    }
    if (!isset($GLOBALS['topic'])) {
        $GLOBALS['topic'] = 0;
    }
    if (!isset($GLOBALS['page'])) {
        $GLOBALS['page'] = 0;
    }
    define('HEADER_CALLED', 1);
    if (!isset($GLOBALS['adminPanel'])) {
        $GLOBALS['adminPanel'] = 0;
    }
    if (strlen($GLOBALS['action']) > 0 || $GLOBALS['adminPanel'] == 1) {
        $GLOBALS['l_menu'][0] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['startIndex']}\">{$GLOBALS['l_menu'][0]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][0] = '';
    }
    if ($GLOBALS['action'] != 'stats') {
        $GLOBALS['l_menu'][3] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=stats\">{$GLOBALS['l_menu'][3]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][3] = '';
    }
    if ($GLOBALS['viewTopicsIfOnlyOneForum'] == 1 and $GLOBALS['action'] == 'vtopic') {
        $GLOBALS['l_menu'][7] = "<a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> " . $GLOBALS['l_sepr'] . ' ';
    } elseif (isset($GLOBALS['nTop']) && $GLOBALS['nTop'] == 1 && (!isset($_GET['showSep']) || $_GET['showSep'] != 1)) {
        if ($GLOBALS['action'] == 'vtopic' && isset($_GET['showSep'])) {
            $GLOBALS['l_menu'][7] = isset($GLOBALS['newTopicLink']) ? $GLOBALS['newTopicLink'] . ' ' . $GLOBALS['l_sepr'] . ' ' : '';
        } elseif ($GLOBALS['action'] == 'vtopic') {
            $GLOBALS['l_menu'][7] = "<a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> {$GLOBALS['l_sepr']} ";
        } elseif ($GLOBALS['action'] == 'vthread') {
            $GLOBALS['l_menu'][7] = "<a href=\"#newreply\">{$GLOBALS['l_reply']}</a> {$GLOBALS['l_sepr']} ";
        } else {
            $GLOBALS['l_menu'][7] = '';
        }
    } elseif (isset($GLOBALS['mTop']) && $GLOBALS['mTop'] == 1 && $GLOBALS['action'] == '') {
        $GLOBALS['l_menu'][7] = "<a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][7] = '';
    }
    if ($GLOBALS['action'] != 'search') {
        $GLOBALS['l_menu'][1] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=search\">{$GLOBALS['l_menu'][1]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][1] = '';
    }
    if ($GLOBALS['action'] != 'registernew' and $GLOBALS['user_id'] == 0 and $GLOBALS['adminPanel'] != 1 and $GLOBALS['enableNewRegistrations']) {
        $GLOBALS['l_menu'][2] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=registernew\">{$GLOBALS['l_menu'][2]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][2] = '';
    }
    if ($GLOBALS['action'] != 'manual') {
        if (isset($GLOBALS['mod_rewrite']) and $GLOBALS['mod_rewrite']) {
            $urlp = $GLOBALS['manualIndex'];
        } else {
            $urlp = "{$GLOBALS['indexphp']}action=manual";
        }
        $GLOBALS['l_menu'][4] = "<a href=\"{$GLOBALS['main_url']}/{$urlp}\">{$GLOBALS['l_menu'][4]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][4] = '';
    }
    if ($GLOBALS['action'] == 'prefs' and isset($GLOBALS['adminUser']) and $GLOBALS['adminUser'] == 0 or $GLOBALS['user_id'] == 0 or !$GLOBALS['enableProfileUpdate']) {
        $GLOBALS['l_menu'][5] = '';
    } else {
        $GLOBALS['l_menu'][5] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=prefs\">{$GLOBALS['l_menu'][5]}</a> {$GLOBALS['l_sepr']} ";
    }
    if ($GLOBALS['user_id'] != 0) {
        $GLOBALS['l_menu'][6] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}mode=logout\">{$GLOBALS['l_menu'][6]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][6] = '';
    }
    if (!isset($GLOBALS['title']) or $GLOBALS['title'] == '') {
        $GLOBALS['title'] = $GLOBALS['sitename'];
    }
    if (isset($GLOBALS['includeHeader']) and $GLOBALS['includeHeader'] != '') {
        include $GLOBALS['includeHeader'];
        return;
    }
    return ParseTpl(makeUp('main_header'));
}
Example #7
0
            if ($row = db_searchSelect(0, $Tt, 'topic_id, forum_id, topic_title, topic_time', $sqlStr, $makeLim, 'topic_id desc')) {
                $num = 1 + $page * $viewmaxsearch - (PAGE1_OFFSET + 1) * $viewmaxsearch;
                do {
                    $txt = highlightText($row[2], $phrase, $searchType);
                    $datetime = convert_date($row[3]);
                    $forum_name = isset($forums[$row[1]]) ? $forums[$row[1]] : 'N/A';
                    if (isset($preModerationType) and $preModerationType > 0 and isset($premodTopics) and in_array($row[0], $premodTopics)) {
                        $txt = $l_topicQueued;
                    }
                    if (isset($mod_rewrite) and $mod_rewrite) {
                        $furl = addTopicURLPage(genTopicURL($main_url, $row[1], $forum_name, $row[0], $row[2]), PAGE1_OFFSET + 1);
                    } else {
                        $furl = "{$main_url}/{$indexphp}action=vthread&amp;forum={$row[1]}&amp;topic={$row[0]}";
                    }
                    $searchResults .= <<<out
<table class="tbTransparent" style="width:100%"><tr><td class="tbTransparentCell">{$num}. <span class="txtSm"><strong>{$l_posted}</strong>: {$datetime} - <strong>{$forum_name}</strong></span> / <a href="{$furl}">{$txt}</a>
</td></tr></table><br />
out;
                    $num++;
                } while ($row = db_searchSelect(1));
            }
        }
        //where topics
    }
    //numRows>0
} else {
    $warning = $l_search[10];
}
echo load_header();
echo ParseTpl(makeUp('search'));
return;
Example #8
0
                sendMail($admin_email, $subS, $msgS, $reply_to_email, $reply_to_email);
            }
            unset($setTpls);
            $emailusers = $tmpUe;
            $insresOrig = $insres;
            //Insert user into email notifies if allowed
            if (isset($_POST['CheckSendMail']) and emailCheckBox() != '' and substr(emailCheckBox(), 0, 8) != '<!--U-->') {
                $ae = db_simpleSelect(0, $Ts, 'count(*)', 'user_id', '=', $user_id, '', '', 'topic_id', '=', $topic);
                $ae = $ae[0];
                if ($ae == 0) {
                    $topic_id = $topic;
                    insertArray(array('user_id', 'topic_id'), $Ts);
                }
            }
            $insres = $insresOrig;
        }
        //inserted post successfully
    } else {
        $errorMSG = $l_antiSpam;
        $title .= $l_antiSpam;
        $displayFormElements = array('topicTitle' => 1, 'postText' => 1);
        $antiWarn = $l_antiSpamWait;
        $antiSpam = 1;
        include $pathToFiles . 'bb_func_posthold.php';
        echo load_header();
        echo ParseTpl(makeUp('main_posthold'));
        return;
    }
    $anchor = $topic_last_post_id;
    $totalPosts = $topic_d[2] + 1;
}
Example #9
0
     $caseComp2 = '';
 }
 if ($row = db_simpleSelect(FALSE, $Tu, $dbUserSheme['username'][1] . ',' . $dbUserSheme['user_password'][1], $caseComp1 . $dbUserSheme['username'][1] . $caseComp2, '=', $user_usr, '', 1)) {
     // It means that username exists in database; so let's check a password
     $username = $row[0];
     $userpassword = $row[1];
     if (($user_usr == $username or isset($loginsCase) and $loginsCase and strtolower($user_usr) == strtolower($username)) and $userpassword == writeUserPwd($user_pwd)) {
         $logged_user = 1;
         $cook = $username . "|" . writeUserPwd($user_pwd) . "|" . $cookieexptime;
         deleteMyCookie();
         setMyCookie($username, $user_pwd, $cookieexptime);
         setCSRFCheckCookie();
         if ($action == '') {
             if (isset($metaLocation)) {
                 $meta_relocate = "{$main_url}/{$indexphp}{$queryStr}";
                 echo ParseTpl(makeUp($metaLocation));
                 exit;
             } elseif ($queryStr2 != '') {
                 header("Location: {$queryStr2}");
                 exit;
             } else {
                 header("Location: {$urlp}");
             }
         }
     } else {
         include $pathToFiles . "lang/{$lang}.php";
         $errorMSG = $l_loginpasswordincorrect;
         $title .= $l_errorUserData;
         if (!isset($_POST['postText'])) {
             $loginError = 1;
             $correctErr = "<a href=\"JavaScript:history.back(-1)\">{$l_correctLoginpassword}</a>";
    } elseif ($user_id == $topicPoster and $user_id != 0 and $user_id != 1 and $topicSticky != 1) {
        if ($topicStatus == 0) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=1\">{$l_closeTopic}</a>";
        } elseif ($topicStatus == 1 and $userUnlock == 1) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=0\">{$l_unlockTopic}</a>";
        } else {
            $closeTopic = '';
        }
    }
    $title = $title . $topicName;
}
//if posts
$st = 0;
$frm = $forum;
#$l_chooseForum = 'Jump To Forum';
include $pathToFiles . 'bb_func_forums.php';
if (isset($mod_rewrite) and $mod_rewrite) {
    $linkToForums = "{$main_url}/{$forum}_0.html";
} else {
    $linkToForums = "{$main_url}/{$indexphp}action=vtopic&amp;forum={$forum}";
}
if (!$USER->hasPerm("basic") && file_exists("templates/main_posts_{$CONF['forum_to_template'][$forum]}_anon.html")) {
    $templatename = "main_posts_{$CONF['forum_to_template'][$forum]}_anon";
} elseif (file_exists("templates/main_posts_{$CONF['forum_to_template'][$forum]}.html")) {
    $templatename = "main_posts_{$CONF['forum_to_template'][$forum]}";
} else {
    $templatename = 'main_posts';
}
echo load_header();
echo ParseTpl(makeUp($templatename));
Example #11
0
    } elseif ($user_id == $topicPoster and $user_id != 0 and $user_id != 1 and $topicSticky != 1 and !$c4) {
        if ($topicStatus == 0 and $userUnlock != 2) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=1\">{$l_closeTopic}</a>";
        } elseif ($topicStatus == 1 and $userUnlock == 1 and $userUnlock != 2) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=0\">{$l_unlockTopic}</a>";
        } else {
            $closeTopic = '';
        }
    }
    if ($page > PAGE1_OFFSET + 1) {
        $tpage = ' - ' . $l_page . ' ' . ($page - PAGE1_OFFSET);
    } else {
        $tpage = '';
    }
    $title1 = $title;
    $title = strip_tags($topicName);
    if (isset($addMainTitle)) {
        $title .= ' - ' . str_replace(' - ', '', $title1);
    }
    $title .= $tpage;
    //$title=strip_tags($topicName).' - '.str_replace(' - ','',$title).$tpage;
}
//if posts
if (isset($mod_rewrite) and $mod_rewrite) {
    $linkToForums = addForumURLPage(genForumURL($main_url, $forum, $forumsArray[$forum][0]), PAGE1_OFFSET + 1);
} else {
    $linkToForums = "{$main_url}/{$indexphp}action=vtopic&amp;forum={$forum}";
}
echo load_header();
echo ParseTpl(makeUp('main_posts'));
Example #12
0
        if ($cols[1]) {
            if (isset($preModerationType) and $preModerationType > 0 and isset($premodTopics) and in_array($cols[0], $premodTopics)) {
                $cols[2] = $l_topicQueued;
            }
            if (!isset($vMax)) {
                $vMax = $cols[1];
            }
            $val = $cols[1];
            $stats_barWidth = round(100 * ($val / $vMax));
            if ($stats_barWidth > $stats_barWidthLim) {
                $key = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>' . $cols[2] . '</a>';
            } else {
                $key2 = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>' . $cols[2] . '</a>';
                $key = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>...</a>';
            }
            $list_stats_viewed .= ParseTpl($tpl);
        } else {
            break;
        }
    } while ($cols = db_simpleSelect(1));
}
unset($xtr);
$numUsers = db_simpleSelect(2, $Tu, 'count(*)') - 1;
$numTopics = db_simpleSelect(2, $Tf, 'SUM(topics_count)');
$numPosts = db_simpleSelect(2, $Tf, 'SUM(posts_count)') - $numTopics;
$adminInf = db_simpleSelect(2, $Tu, $dbUserSheme['username'][1], $dbUserId, '=', 1);
$lastRegUsr = db_simpleSelect(0, $Tu, "{$dbUserId}, {$dbUserSheme['username'][1]}", '', '', '', "{$dbUserId} DESC", 1);
$title = $title . $l_stats;
echo load_header();
echo ParseTpl(makeUp('stats'));
Example #13
0
} else {
    $tpage = '';
}
$title1 = $title;
$title = $forumName;
if (isset($addMainTitle)) {
    $title .= ' - ' . str_replace(' - ', '', $title1);
}
$title .= $tpage;
if (!isset($_GET['showSep'])) {
    $main = makeUp('main_topics');
} else {
    $main = '';
}
$nTop = 1;
$allowForm = ($user_id == 1 or $isMod == 1);
$c1 = (in_array($forum, $clForums) and isset($clForumsUsers[$forum]) and !in_array($user_id, $clForumsUsers[$forum]) and !$allowForm);
$c3 = (isset($poForums) and in_array($forum, $poForums) and !$allowForm);
$c4 = (isset($roForums) and in_array($forum, $roForums) and !$allowForm);
if ($c1 or $c3 or $c4) {
    $main = preg_replace("/(<form.*<\\/form>)/Uis", '', $main);
    $nTop = 0;
    $newTopicLink = '';
}
if ($user_id == 0) {
    $l_sub_post_tpc = $l_enterforums . '/' . $l_sub_post_tpc;
}
echo load_header();
echo $warn;
echo ParseTpl($main);
                    if (isset($modsForums[$ms])) {
                        $moderatorsList .= $modsForums[$ms] . ', ';
                    }
                }
                if ($moderatorsList != '') {
                    $moderatorsList = '<br><span class=txtSm>' . $l_moderatorsAre . ': ' . substr($moderatorsList, 0, strlen($moderatorsList) - 2) . '</span>';
                }
            }
            if (isset($forumGroups) and isset($forumGroupsDesc) and in_array($forum, $forumGroups)) {
                $forumGroupName = $forumGroupsDesc[$keyAr];
                $list_forums .= ParseTpl(makeUp('main_forumgroup'));
                $keyAr++;
            }
            if (isset($mod_rewrite) and $mod_rewrite) {
                $linkToForums = "{$main_url}/{$forum}_0.html";
            } else {
                $linkToForums = "{$main_url}/{$indexphp}action=vtopic&amp;forum={$forum}";
            }
            $checked = empty($showIds) && $forum != $CONF['forum_gridsquare'] || in_array($forum, $showIds) ? ' checked' : '';
            $list_forums .= ParseTpl($tpl);
            $i = -$i;
        }
    } while ($cols = db_simpleSelect(1));
    $forum = 0;
    unset($result);
    unset($countRes);
}
$title = $sitename;
echo load_header();
echo ParseTpl(makeUp('main_forums'));
         }
         //inserted post successfully
     } else {
         $errorMSG = $l_antiSpam;
         $correctErr = $backErrorLink;
         $title .= $l_antiSpam;
         echo load_header();
         echo ParseTpl(makeUp('main_warning'));
         return;
     }
 } else {
     $errorMSG = $l_forbidden;
     $correctErr = $backErrorLink;
     $title .= $l_forbidden;
     echo load_header();
     echo ParseTpl(makeUp('main_warning'));
     return;
 }
 if (isset($themeDesc) and in_array($topic, $themeDesc)) {
     $anchor = 1;
 } else {
     $totalPosts = db_simpleSelect(0, $Tt, 'posts_count', 'topic_id', '=', $topic);
     $vmax = $viewmaxreplys;
     $anchor = $totalPosts[0];
     if ($anchor > $vmax) {
         $anchor = $totalPosts[0] - floor($totalPosts[0] / $vmax) * $vmax;
         if ($anchor == 0) {
             $anchor = $vmax;
         }
     }
 }
}
$title .= $l_userIP;
$postip = isset($_GET['postip']) ? $_GET['postip'] : '';
$avMods = array();
foreach ($mods as $k => $v) {
    if (is_array($v)) {
        foreach ($v as $vv) {
            if (!in_array($vv, $avMods)) {
                $avMods[] = $vv;
            }
        }
    }
}
if ($logged_admin == 1 or in_array($user_id, $avMods)) {
    $listUsers = '';
    $l_usersIPs = $l_usersIPs . " " . $postip;
    if ($row = db_simpleSelect(0, $Tp, 'DISTINCT poster_name, poster_id', 'poster_ip', '=', $postip, 'poster_name')) {
        $listUsers .= "<ul>";
        do {
            $star = $row[1] != 0 ? "<a href=\"{$main_url}/{$indexphp}action=userinfo&user={$row[1]}\">*</a>" : "";
            $listUsers .= "<li><p>{$row[0]}{$star}";
        } while ($row = db_simpleSelect(1));
        $listUsers .= "</ul>";
    } else {
        $listUsers = $l_userNoIP;
    }
}
$banLink = $user_id == 1 ? "<a href=\"{$main_url}/{$bb_admin}action=banUsr1&banip={$postip}\"><small class=warning>&raquo;&nbsp;{$l_ban}</small></a>" : '';
echo load_header();
echo ParseTpl(makeUp('tools_userips'));
return;
        if ($i > 0) {
            $bg = 'tbCel1';
        } else {
            $bg = 'tbCel2';
        }
        if (isset($mod_rewrite) and $mod_rewrite) {
            $urlp = "{$main_url}/{$forum}_{$topic}_";
        } else {
            $urlp = "{$main_url}/{$indexphp}action=vthread&amp;forum={$forum}&amp;topic={$topic}&amp;page=";
        }
        $pageNavCell = pageNav(0, $numReplies + 1, $urlp, $forum == $CONF['forum_submittedarticles'] || $forum == $CONF['forum_gallery'] ? 10 : $viewmaxreplys, TRUE);
        $whenPosted = convert_date($cols[4]);
        if (trim($cols[1]) == '') {
            $cols[1] = $l_emptyTopic;
        }
        //Forum icon
        if (isset($fIcon[$forum])) {
            $forumIcon = $fIcon[$forum];
        } else {
            $forumIcon = 'default.gif';
        }
        if (isset($mod_rewrite) and $mod_rewrite) {
            $linkToTopic = "{$main_url}/{$forum}_{$topic}_0.html";
        } else {
            $linkToTopic = "{$main_url}/{$indexphp}action=vthread&amp;forum={$forum}&amp;topic={$topic}";
        }
        $list_topics .= ParseTpl($tpl);
        $i = -$i;
    } while ($cols = db_simpleSelect(1));
    unset($result);
}
Example #18
0
<?php

/*
This file is part of miniBB. miniBB is free discussion forums/message board software, without any warranty. See COPYING file for more details. Copyright (C) 2004 Paul Puzyrev, Sergei Larionov. www.minibb.net
*/
if (!defined('INCLUDED776')) {
    die('Fatal error.');
}
$tpl = makeUp('faq');
$tplTmp = str_replace('{$manual}', '<!--MANUAL-->', $tpl);
$tplTmp = ParseTpl($tplTmp);
$tplTmp = explode('<!--MANUAL-->', $tplTmp);
$title .= $l_menu[4];
$l_meta .= <<<out
out;
echo load_header();
echo $tplTmp[0];
$manbase = $logged_admin ? 'manual' : 'usermanual';
$langpage = $pathToFiles . 'templates/' . $manbase . '_' . $lang . '.html';
$engpage = $pathToFiles . 'templates/' . $manbase . '_eng.html';
if (file_exists($manpage)) {
    include $manpage;
} elseif (file_exists($engpage)) {
    include $engpage;
}
echo $tplTmp[1];