コード例 #1
0
ファイル: postnew.php プロジェクト: jechiy/PHPWind
    $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);
}
コード例 #2
0
ファイル: post.php プロジェクト: sherlockhouse/aliyun
 $replypost = new replyPost($pwpost);
 $replypost->setTpc($tpcarray);
 $replypost->check();
 !empty($pwpost->errMsg) && wap_msg($pwpost->errMsg);
 require_once R_P . 'require/bbscode.php';
 $replypost->setTpc($tpcarray);
 $content = $content . "\r\n\r\n[size=2][color=#a5a5a5]内容来自[/color][color=#4f81bd][url=" . $db_bbsurl . "/m/index.php][手机版][/url][/color] [/size]";
 $postdata = new replyPostData($pwpost);
 $postdata->setTitle(wap_cv($subject, false));
 $postdata->setContent(wap_cv($content, false));
 $postdata->conentCheck();
 $postdata->checkdata();
 !empty($pwpost->errMsg) && wap_msg($pwpost->errMsg);
 $replypost->execute($postdata);
 $pid = $replypost->getNewId();
 pwHook::runHook('after_reply');
 $rurl = "index.php?a=read&tid={$tid}&fid={$fid}&page=e";
 if ($postdata->getIfcheck() == '0') {
     wap_msg("发帖成功,请等待管理员审核", $rurl);
 }
 if ($_POST['upload']) {
     $rurl = "index.php?a=upload&tid={$tid}&fid={$fid}&page=e";
     header("Location:{$rurl}");
 }
 /*删除缓存*/
 $_filename = D_P . "data/wapcache/wap_all_cache.php";
 if (file_exists($_filename)) {
     P_unlink($_filename);
 }
 $_filename = Pcv(D_P . "data/wapcache/wap_" . $fid . "_cache.php");
 if (file_exists($_filename)) {
コード例 #3
0
ファイル: common.php プロジェクト: jechiy/PHPWind
 /**
  * 判断该hook是否开启
  * @param string $name
  * @return bool
  */
 function checkHook($name)
 {
     global $db_hookset;
     return isset($db_hookset[$name]) || in_array($name, pwHook::getSystemHooks());
 }
コード例 #4
0
ファイル: hookcenter.php プロジェクト: sherlockhouse/aliyun
    if (!$hook || !in_array($hook, $hooks)) {
        adminmsg('扩展不存在');
    }
    if (!isset($db_hookset[$hook])) {
        adminmsg('该扩展未安装');
    }
    unset($db_hookset[$hook]);
    setConfig('db_hookset', $db_hookset);
    updatecache_c();
    adminmsg('operate_success');
} elseif ($action == 'updatecache') {
    S::gp(array('hook'), 'G');
    if (!$hook || !in_array($hook, $hooks)) {
        adminmsg('扩展不存在');
    }
    if (!pwHook::checkHook($hook)) {
        adminmsg('该扩展未安装');
    }
    updateHookCache($hook);
    adminmsg('operate_success');
} elseif ($action == 'setmode') {
    S::gp(array('hookmode'), 'P');
    $hookmode = $hookmode ? 1 : 0;
    setConfig('db_hookmode', $hookmode);
    updatecache_c();
    adminmsg('operate_success');
}
function updateHookCache($hook)
{
    L::loadClass('hook', 'hook', false);
    $pwHook = new PW_Hook($hook);
コード例 #5
0
ファイル: login.php プロジェクト: sherlockhouse/aliyun
            list($o_u, $hash, $app) = explode("\t", GetCookie('o_invite'));
            if (is_numeric($o_u) && strlen($hash) == 18) {
                require_once R_P . 'require/o_invite.php';
            }
        }
        //passport
        if ($db_pptifopen && $db_ppttype == 'server' && ($db_ppturls || $forward)) {
            $tmp = $jumpurl;
            $jumpurl = $forward ? $forward : $db_ppturls;
            $forward = $tmp;
            require_once R_P . 'require/passport_server.php';
        }
        //passport
        $isRegActivate = GetCookie('regactivate');
        Cookie('regactivate', '', 0);
        pwHook::runHook('after_login');
        $jumpurl = $isRegActivate ? "{$db_registerfile}?step=finish&verify={$verifyhash}" : $jumpurl;
        if (!$ajax) {
            refreshto($jumpurl, 'have_login', '', true);
        }
        echo "success\t" . $jumpurl;
        ajax_footer();
    }
} elseif ($action == 'quit') {
    if (!$db_pptifopen || !$db_pptcmode) {
        checkVerify('loginhash');
    }
    require_once R_P . 'require/checkpass.php';
    if ($groupid == '6') {
        $bandb = $db->get_one("SELECT type FROM pw_banuser WHERE uid=" . S::sqlEscape($winduid) . " AND fid='0'");
        if ($bandb['type'] == 3) {