Пример #1
0
         $refer = "index.php?a=post&action=new&fid={$fid}&tmp={$timestamp}";
     }
     $showpost = 1;
 } else {
     if (!is_numeric($fid)) {
         wap_msg("post_nofid", $basename);
     }
     !$pwforum && ($pwforum = new PwForum($fid));
     !$pwpost && ($pwpost = new PwPost($pwforum));
     $pwpost->errMode = true;
     $pwpost->forumcheck();
     !empty($pwpost->errMsg) && wap_msg($pwpost->errMsg, $basename);
     $pwpost->postcheck();
     !empty($pwpost->errMsg) && wap_msg($pwpost->errMsg, $basename);
     list($uploadcredit, $uploadmoney, , ) = explode("\t", $pwforum->forumset['uploadset']);
     if (!$pwpost->admincheck && !$pwforum->allowpost($pwpost->user, $pwpost->groupid)) {
         wap_msg('postnew_forum_right', 'index.php?a=post&fid=0');
     }
     if (!$pwforum->foruminfo['allowpost'] && !$pwpost->admincheck && $_G['allowpost'] == 0) {
         wap_msg('postnew_group_right', 'index.php?a=post&fid=0');
     }
     InitGP(array('subject', 'content'), 'P', 0);
     $refer = "index.php?a=post&action=new&fid={$fid}&tmp={$timestamp}";
     checkWapPost();
     require_once R_P . 'require/bbscode.php';
     $postdata = new topicPostData($pwpost);
     $postdata->setTitle(wap_cv($subject, false));
     $postdata->setContent(wap_cv($content, false));
     $postdata->setData('lastpost', $timestamp);
     $postdata->setStatus(6);
     $postdata->conentCheck();
Пример #2
0
    $_tids = array();
    foreach ($threaddb as $_threads) {
        $_tids[] = $_threads['tid'];
    }
    $db->update('UPDATE pw_threads t INNER JOIN pw_hits_threads h ON t.tid=h.tid SET t.hits=h.hits WHERE t.tid IN (' . S::sqlImplode($_tids) . ')');
    // 更新memcache缓存
    if (Perf::checkMemcache()) {
        Perf::gatherInfo('changeThreadWithThreadIds', array('tid' => $_tids));
    }
}
//获取列表是否新窗打开的cookie
$newwindows = $_COOKIE['newwindows'];
$tucoolnewwindows = $_COOKIE['tucoolnewwindows'];
$isAuthStatus = $isGM || (!$forumset['auth_allowpost'] || $pwforum->authStatus($winddb['userstatus'], $forumset['auth_logicalmethod']) === true);
//!$isAuthStatus && $N_allowtypeopen = false;
if ($groupid != 'guest' && $db_threadshowpost == 1 && $_G['allowpost'] && $pwforum->allowpost($winddb, $groupid) && $isAuthStatus) {
    $fastpost = 'fastpost';
}
$psot_sta = $titletop1 = '';
$t_exits = 0;
$t_typedb = $t_subtypedb = $withSystemType = $withSystemSubType = array();
if ($t_db) {
    foreach ($t_db as $value) {
        if ($value['upid'] == 0) {
            $withSystemType[$value['id']] = $t_typedb[$value['id']] = $value;
        } else {
            $withSystemSubType[$value['upid']][$value['id']] = $t_subtypedb[$value['upid']][$value['id']] = strip_tags($value['name']);
        }
        if ($value['ifsys'] && $gp_gptype != 'system') {
            unset($t_typedb[$value['id']], $t_subtypedb[$value['upid']][$value['id']]);
        }