コード例 #1
0
ファイル: topic_check_update.php プロジェクト: Zerolone/mybbs
        if ($MyDatabase->Update('topics', array('title', 'ifcheck'), array($title, '1'), '`tid`=' . $tid)) {
            $refresh_txt = '成功';
        } else {
            ErrorMsg($MyDatabase->SqlStr);
        }
        //扩展表
        if ($MyDatabase->Update('topics_ext', array('content'), array($content), '`tid`=' . $tid)) {
            $refresh_txt = '成功';
        } else {
            ErrorMsg($MyDatabase->SqlStr);
        }
        /*
         * 更新一下统计
         */
        //获取帖子所属栏目
        $SqlStr = 'SELECT * FROM `' . DB_TABLE_PRE . 'topics` WHERE `tid`=' . $tid;
        $MyDatabase->SqlStr = $SqlStr;
        if ($MyDatabase->Query()) {
            $DB_Record = $MyDatabase->ResultArr[0];
            $fid = $DB_Record['fid'];
            $author = $DB_Record['author'];
            $title = $DB_Record['title'];
            //更新
            lastinfo($fid, $tid, 'new', $author, $MyDatabase, $title);
        }
    }
    $refresh_msg = '帖子:[<font color=red>审核' . $refresh_txt . '</font>],点击返回。';
    $log_content = '贴子 &gt;&gt; 审核 &gt;&gt; ' . $refresh_txt;
}
require $page_name . '.php';
require '../../include/debug.php';
コード例 #2
0
ファイル: post_check_update.php プロジェクト: Zerolone/mybbs
        }
        //统计回复数
        $replies = 0;
        $SqlStr = 'SELECT COUNT(*) as `count` FROM `' . DB_TABLE_PRE . 'posts` WHERE `tid`=' . $tid;
        $MyDatabase->SqlStr = $SqlStr;
        if ($MyDatabase->Query()) {
            $replies = $MyDatabase->ResultArr[0]['count'];
        }
        if ($MyDatabase->Update('topics', array('replies'), array($replies), '`tid`=' . $tid)) {
            $refresh_txt = '成功';
        }
        /*
         * 更新一下统计
         */
        //获取帖子所属栏目
        $SqlStr = 'SELECT * FROM `' . DB_TABLE_PRE . 'topics` WHERE `tid`=' . $tid;
        $MyDatabase->SqlStr = $SqlStr;
        if ($MyDatabase->Query()) {
            $DB_Record = $MyDatabase->ResultArr[0];
            $fid = $DB_Record['fid'];
            $author = $DB_Record['author'];
            $title = $DB_Record['title'];
            //更新
            lastinfo($fid, $tid, 'reply', $author, $MyDatabase, $title);
        }
    }
    $refresh_msg = '帖子:[<font color=red>审核' . $refresh_txt . '</font>],点击返回。';
    $log_content = '贴子 &gt;&gt; 审核 &gt;&gt; ' . $refresh_txt;
}
require $page_name . '.php';
require '../../include/debug.php';
コード例 #3
0
ファイル: postnew.php プロジェクト: Zerolone/mybbs
    $ifcheck = 1;
    if ($foruminfo['post_check'] == 1) {
        $ifcheck = 0;
        $addmsg = '<font color=red>你发的帖子需要审核, 请等待管理员审核。</font>';
    }
    //获取帖子图标
    $atc_iconid = Request('atc_iconid', 0);
    //文件上传
    require_once 'postupload.php';
    $ArrField = array('fid', 'icon', 'author', 'authorid', 'title', 'ifcheck', 'lastposter', 'ifupload', 'postdate', 'lastpost');
    $ArrValue = array($fid, $atc_iconid, addslashes($user->username), $user->uid, $atc_title, $ifcheck, addslashes($user->username), $ifupload, TIMESTAMP, TIMESTAMP);
    if ($MyDatabase->Insert('topics', $ArrField, $ArrValue)) {
        $tid = $MyDatabase->Insert_id();
    } else {
        ErrorMsg($MyDatabase->SqlStr . '文件:' . __FILE__ . '<br />行数:' . __LINE__ . '<br />发帖提交失败!');
    }
    $ArrField = array('tid', 'ifsign', 'userip', 'content', 'authorid');
    $ArrValue = array($tid, $atc_usesign, $user->ip, $atc_content . $str_att, $user->uid);
    if ($MyDatabase->Insert('topics_ext', $ArrField, $ArrValue)) {
    } else {
        ErrorMsg($MyDatabase->SqlStr . '文件:' . __FILE__ . '<br />行数:' . __LINE__ . '<br />发帖扩展提交失败!');
    }
    bbspostguide($user, 1, $MyDatabase);
    $refresh_url = sprintf(URLTOPIC, $fid);
    //如果通过审核就
    if ($ifcheck == 1) {
        lastinfo($fid, $tid, 'new', $user->uid, $MyDatabase, $atc_title);
        $refresh_url = sprintf(URLREAD, $tid);
    }
    ErrorMsg('主题[' . $atc_title . '],' . $addmsg . '发布成功!', $refresh_url);
}