Exemple #1
0
    $isAtcEmail = (int) $atc_email;
    $isAtcNewrp = (int) $atc_newrp;
    $userService = L::loadClass('UserService', 'user');
    $userService->setUserStatus($winduid, PW_USERSTATUS_REPLYEMAIL, $isAtcEmail);
    $userService->setUserStatus($winduid, PW_USERSTATUS_REPLYSITEEMAIL, $isAtcNewrp);
    $j_p = "read.php?tid={$tid}&ds=1";
    if ($db_htmifopen) {
        $j_p = urlRewrite($j_p);
    }
    if (empty($j_p) || $pwforum->foruminfo['cms']) {
        $j_p = "read.php?tid={$tid}&ds=1";
    }
    $pinfo = defined('AJAX') ? "success\t" . $j_p : "";
    if (!$iscontinue) {
        if ($postdata->getIfcheck()) {
            if ($prompts = $pwpost->getprompt()) {
                isset($prompts['allowhide']) && ($pinfo = getLangInfo('refreshto', "post_limit_hide"));
                isset($prompts['allowsell']) && ($pinfo = getLangInfo('refreshto', "post_limit_sell"));
                isset($prompts['allowencode']) && ($pinfo = getLangInfo('refreshto', "post_limit_encode"));
            }
        }
    }
    //defend start
    CloudWind::YunPostDefend($winduid, $windid, $groupid, $tid, $atc_title, $atc_content, 'thread', array('fid' => $fid, 'tid' => $tid, 'forumname' => $pwforum->foruminfo['name']));
    //defend end
    //job sign
    //require_once(R_P.'require/functions.php');
    //initJob($winduid,"doPost",array('fid'=>$fid));
    pwHook::runHook('after_post');
    refreshto($j_p, $pinfo);
}
Exemple #2
0
            $diaryService->updateDiaryContentByAttach($did, $attachIds);
            $db->update("UPDATE pw_attachs SET did=" . S::sqlEscape($did) . " WHERE aid IN(" . S::sqlImplode($aids) . ")");
        }
        if ($dtided != $dtid) {
            $db->update("UPDATE pw_diarytype SET num=num-1 WHERE uid=" . S::sqlEscape($winduid) . " AND dtid=" . S::sqlEscape($dtided));
            $db->update("UPDATE pw_diarytype SET num=num+1 WHERE uid=" . S::sqlEscape($winduid) . " AND dtid=" . S::sqlEscape($dtid));
        }
        if ($privacyed == 2 && $privacy != 2) {
            countPosts('+1');
        } elseif ($privacyed != 2 && $privacy == 2) {
            if ($affected_rows = delAppAction('diary', $did)) {
                countPosts("-{$affected_rows}");
            }
        }
        // defend start
        CloudWind::YunPostDefend($winduid, $windid, $groupid, $did, $atc_title, $atc_content, 'editdiary');
        // defend end
        $url = "{$basename}a=detail&did={$did}";
        $msg = defined('AJAX') ? "success\t" . $url : 'operate_success';
        refreshto($url, $msg);
    }
} elseif ($a == 'copydiary') {
    define('AJAX', 1);
    define('F_M', true);
    banUser();
    S::gp(array('did'));
    empty($did) && Showmsg('data_error');
    $dtsel = '';
    $query = $db->query("SELECT * FROM pw_diarytype WHERE uid=" . S::sqlEscape($winduid) . " ORDER BY dtid");
    while ($rt = $db->fetch_array($query)) {
        $dtsel .= "<option value=\"{$rt['dtid']}\">{$rt['name']}</option>";