Beispiel #1
0
    } else {
        $select_fid = $Guidedb->SelectIn("{$pre}sort", 0, $fid);
    }
    require dirname(__FILE__) . "/" . "head.php";
    if ($mid && file_exists(ROOT_PATH . "data/member_tpl/post_{$mid}.htm")) {
        require ROOT_PATH . "data/member_tpl/post_{$mid}.htm";
    } else {
        require dirname(__FILE__) . "/" . "template/post.htm";
    }
    require dirname(__FILE__) . "/" . "foot.php";
} elseif ($job == 'edit') {
    if ($rsdb[yz] && !$web_admin && $groupdb[EditPassPower] == 2) {
        showerr("已审核的文章,你不能再修改");
    }
    if ($step == 'post') {
        post_edit();
        //生成静态
        make_article_html("{$webdb['www_url']}/member/post.php?job=endHTML&aid={$aid}&mid={$mid}&only={$only}");
        $mid && $mid < 106 && ($none = 'none');
        refreshto("{$FROMURL}", "<CENTER>[<A HREF='?job=postnew&fid={$fid}&mid={$mid}&only={$only}'>发表新主题</A>] <span style='display:{$none};'>[<A HREF='?job=post_more&aid={$aid}&mid={$mid}&only={$only}'>续发本主题</A>]</span> [<A HREF='myarticle.php?job=myarticle&fid={$fid}&mid={$mid}&only={$only}'>返回主题列表</A>] [<A HREF='..{$webdb['path']}/bencandy.php?fid={$fid}&aid={$aid}' target=_blank>查看主题</A>] [<A HREF='?job=edit&aid={$aid}&mid={$mid}&only={$only}'>继续修改</A>]</CENTER>", 60);
    }
    $MSG = '修改内容';
    //$select_fid=list_post_selectsort(0,$fid,$mid,$only);
    if ($webdb[sortNUM] > 500) {
        $select_fid = $Guidedb->Select("{$pre}sort", "fid", $fid, '', 0);
    } else {
        $select_fid = $Guidedb->SelectIn("{$pre}sort", 0, $fid);
    }
    require dirname(__FILE__) . "/" . "head.php";
    if ($mid && file_exists(ROOT_PATH . "data/member_tpl/post_{$mid}.htm")) {
        require ROOT_PATH . "data/member_tpl/post_{$mid}.htm";
Beispiel #2
0
     // account
 // account
 case "post":
     require_once "lib/api/posts.php";
     require_once "lib/api/likes.php";
     switch ($url_parts[3]) {
         case "add":
             $result = post_add();
             if ($result > -1) {
                 header("Location: /post/" . $result);
             } else {
                 header("Location: /post/add/failure/" . $result);
             }
             break;
         case "edit":
             $result = post_edit();
             if ($result > -1) {
                 header("Location: /post/" . $result);
             } else {
                 header("Location: /post/edit/" . $_POST["id"] . "/failure");
             }
             break;
         case "like":
             $result = post_like($url_parts[4]);
             header('Content-Type: application/json');
             print json_encode($result);
             break;
         case "unlike":
             $result = post_unlike($url_parts[4]);
             header('Content-Type: application/json');
             print json_encode($result);
Beispiel #3
0
if (!mysql_query('SELECT `member_login` FROM `members` WHERE `id` = 1')) {
    header('location: install.php');
}
session_start();
if (isset($_SESSION['member']['time'])) {
    $_SESSION['member']['time'] = time();
}
if (isset($_GET['do'])) {
    $to = isset($_GET['to']) ? $_GET['to'] : 0;
    $at = isset($_GET['at']) ? $_GET['at'] : 0;
    switch ($_GET['do']) {
        case 'view':
            post_view($to);
            break;
        case 'edit':
            post_edit($to);
            break;
        case 'delete':
            post_delete($to);
            break;
        case 'reply':
            comment_add($to, TRUE);
            break;
        case 'comment':
            comment_edit($to);
            break;
        case 'clear':
            comment_delete($to);
            break;
        case 'post':
            post_add($at);