示例#1
0
文件: bbsccc.php 项目: bianle/www2
}
$ftype = $dir_modes["NORMAL"];
$articles = array();
$num = bbs_get_records_from_id($board, $id, $ftype, $articles);
if ($num == 0) {
    html_error_quit("错误的文章号,原文可能已经被删除");
}
$id = $articles[1]["ID"];
bbs_board_nav_header($brdarr, "文章转贴");
if (isset($_GET['do'])) {
    $target = trim(ltrim($_POST['target']));
    if (!$target) {
        html_error_quit("请输入转入的讨论区");
    }
    $outgo = isset($_POST['outgo']) ? 1 : 0;
    switch (bbs_docross($board, $id, $target, $outgo)) {
        case 0:
            html_success_quit("转贴成功!", array("<a href='bbsdoc.php?board=" . $target . "'>进入 " . $target . " 讨论区</a>", "<a href='bbsdoc.php?board=" . $brd_encode . "'>返回 " . $brdarr['DESC'] . "</a>", "<a href='bbscon.php?bid=" . $bid . "&id=" . $id . "'>返回《" . htmlspecialchars($articles[1]["TITLE"]) . "》</a>"));
            break;
        case -1:
            html_error_quit("讨论区错误");
            break;
        case -2:
            html_error_quit("讨论区 " . $target . " 不存在");
            break;
        case -3:
            html_error_quit("不能转入只读讨论区");
            break;
        case -4:
            html_error_quit("您尚无 " . $target . " 讨论区的发文权限");
            break;
示例#2
0
}
if (isset($_POST["title"])) {
    $title = urldecode($_POST["title"]);
} else {
    html_error_quit("错误的参数");
}
if (isset($_POST["target"])) {
    $target = trim(ltrim($_POST["target"]));
    if (!$target) {
        html_error_quit("请输入转入的讨论区");
    }
} else {
    html_error_quit("错误的参数");
}
$outgo = isset($_POST['outgo']) ? 1 : 0;
$ret = bbs_docross("", 0, $target, $outgo, $filename, $title);
switch ($ret) {
    case 0:
        html_success_quit("转贴成功!", array("<a href='bbsdoc.php?board=" . $target . "'>进入 " . $target . " 讨论区</a>"), "<a href=\"javascript:history.go(-1);\">返回</a>");
        break;
    case -1:
        html_error_quit("讨论区错误");
        break;
    case -2:
        html_error_quit("讨论区 " . $target . " 不存在");
        break;
    case -3:
        html_error_quit("不能转入只读讨论区");
        break;
    case -4:
        html_error_quit("您尚无 " . $target . " 讨论区的发文权限");