Example #1
0
<?php

require_once 'wap_global.php';
if ($tid) {
    $pw_tmsgs = GetTtable($tid);
    $rt = $db->get_one("SELECT t.fid,t.tid,t.subject,t.author,t.replies,t.locked,t.postdate,t.anonymous,t.ptable,tm.content,t.tpcstatus FROM pw_threads t LEFT JOIN {$pw_tmsgs} tm ON tm.tid=t.tid WHERE t.tid=" . pwEscape($tid) . " AND ifcheck=1");
    if ($rt['locked'] == 2) {
        wap_msg('read_locked');
    }
    if (!$rt) {
        wap_msg('illegal_tid');
    }
    $fid = $rt['fid'];
    $openIndex = getstatus($rt['tpcstatus'], 2);
    #高楼是否开启
    forumcheck($fid, 'read');
    InitGP(array('page'));
    $page == 'e' && ($page = 65535);
    $per = 5;
    (int) $page < 1 && ($page = 1);
    if ($openIndex) {
        $count = $db->get_value("SELECT COUNT(*) FROM pw_postsfloor WHERE tid =" . pwEscape($rt['tid'])) . " LIMIT 1";
    } else {
        $count = $rt['replies'];
    }
    $totle = ceil($count / $per);
    $totle == 0 ? $page = 1 : ($page > $totle ? $page = $totle : '');
    $pages = wap_numofpage($page, $totle, "read.php?tid={$tid}&amp;");
    $rt['subject'] = str_replace('&nbsp;', '', wap_cv($rt['subject']));
    if ($page == 1) {
        $rt['content'] = strip_tags($rt['content']);
Example #2
0
    wap_footer();
}
if ($fid) {
    $foruminfo = L::forum($fid);
    !$foruminfo && wap_msg('data_error');
    $foruminfo['type'] == 'category' && wap_msg('forum_category', 'index.php?a=list&fid=' . $fid);
    $rt = $db->get_one("SELECT fd.topic,fd.top1,fd.top2,fd.lastpost,fd.aid,fd.aids,fd.aidcache,fd.tpost,fd.topic,fd.article ,a.ifconvert,a.author,a.startdate,a.enddate,a.subject,a.content,fd.topthreads FROM pw_forumdata fd LEFT JOIN pw_announce a ON fd.aid=a.aid WHERE fd.fid=" . pwEscape($fid));
    $rt && ($foruminfo += $rt);
    #版块信息合并
    $forumset = $foruminfo['forumset'];
    !$forumset['commend'] && ($foruminfo['commend'] = array());
    if ($forumset['link']) {
        $flink = str_replace("&amp;", "&", $forumset['link']);
        wap_msg('forum_link');
    }
    forumcheck($fid, 'list');
    $forumName = wap_cv(strip_tags($forum[$fid]['name']));
}
//版块浏览及管理权限
$pwSystem = array();
$isGM = $isBM = $admincheck = $ajaxcheck = $managecheck = $pwAnonyHide = $pwPostHide = $pwSellHide = $pwEncodeHide = 0;
if ($groupid != 'guest') {
    $isGM = CkInArray($windid, $manager);
    $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
    $admincheck = $isGM || $isBM ? 1 : 0;
    if (!$isGM) {
        $pwSystem = pwRights($isBM);
        if ($pwSystem && ($pwSystem['tpccheck'] || $pwSystem['digestadmin'] || $pwSystem['lockadmin'] || $pwSystem['pushadmin'] || $pwSystem['coloradmin'] || $pwSystem['downadmin'] || $pwSystem['delatc'] || $pwSystem['moveatc'] || $pwSystem['copyatc'] || $pwSystem['topped'] || $pwSystem['unite'] || $pwSystem['tpctype'])) {
            //system rights
            $managecheck = 1;
        }
Example #3
0
                 $pagenr = ceil($entrys / $maxfposts);
             }
             $lpost = show(_forum_add_lastpost, array("id" => $entrys + 1, "tid" => $getp['sid'], "page" => $pagenr));
             $index = info(_forum_editpost_successful, $lpost);
         }
     } else {
         $index = error(_error_wrong_permissions, 1);
     }
 } elseif ($_GET['do'] == "add") {
     if (settings("reg_forum") == "1" && $chkMe == "unlogged") {
         $index = error(_error_unregistered, 1);
     } else {
         if (!ipcheck("fid(" . $_GET['kid'] . ")", $flood_forum)) {
             $check = db("SELECT s2.id,s1.intern FROM " . $db['f_kats'] . " AS s1\n                     LEFT JOIN " . $db['f_skats'] . " AS s2\n                     ON s2.sid = s1.id\n                     WHERE s2.id = '" . intval($_GET['kid']) . "'");
             $checks = _fetch($check);
             if (forumcheck($_GET['id'], "closed")) {
                 $index = error(_error_forum_closed, 1);
             } elseif ($checks['intern'] == 1 && !permission("intforum") && !fintern($checks['id'])) {
                 $index = error(_error_no_access, 1);
             } else {
                 if (isset($userid)) {
                     $postnick = data($userid, "nick");
                     $postemail = data($userid, "email");
                 } else {
                     $postnick = "";
                     $postemail = "";
                 }
                 if ($_GET['zitat']) {
                     $qryzitat = db("SELECT nick,reg,text FROM " . $db['f_posts'] . "\n                            WHERE id = '" . intval($_GET['zitat']) . "'");
                     $getzitat = _fetch($qryzitat);
                     if ($getzitat['reg'] == "0") {