示例#1
0
     $windid = $winddb['username'];
     if (file_exists(D_P . "data/groupdb/group_{$groupid}.php")) {
         //* require_once pwCache::getPath(S::escapePath(D_P . "data/groupdb/group_$groupid.php"));
         pwCache::getData(S::escapePath(D_P . "data/groupdb/group_{$groupid}.php"));
     } else {
         //* require_once pwCache::getPath(D_P . "data/groupdb/group_1.php");
         pwCache::getData(D_P . "data/groupdb/group_1.php");
     }
     define('FX', 1);
 }
 $read = $db->get_one("SELECT authorid,subject,fid FROM pw_threads WHERE tid=" . S::sqlEscape($tid));
 //帖子信息
 $data = array();
 L::loadClass('ActivityForBbs', 'activity', false);
 $postActForBbs = new PW_ActivityForBbs($data);
 $isAdminright = $postActForBbs->getAdminRight($read['authorid']);
 !$isAdminright && Showmsg('act_export_noright');
 $ifpaydb = array('0' => getLangInfo('other', 'act_ifpay_0'), '1' => getLangInfo('other', 'act_ifpay_1'), '2' => getLangInfo('other', 'act_ifpay_1'), '3' => getLangInfo('other', 'act_ifpay_3'), '4' => getLangInfo('other', 'act_ifpay_4'));
 if ($db_charset == 'utf-8' || $db_charset == 'big5') {
     foreach ($ifpaydb as $key => $value) {
         $ifpaydb[$key] = pwConvert($value, 'gbk', $db_charset);
     }
 }
 $payMemberNums = $orderMemberNums = 0;
 $query = $db->query("SELECT signupnum,ifpay FROM pw_activitymembers WHERE fupid=0 AND tid=" . S::sqlEscape($tid));
 while ($rt = $db->fetch_array($query)) {
     if ($rt['ifpay'] != 3) {
         //费用关闭的不算
         $orderMemberNums += $rt['signupnum'];
         //已报名人数
     }
示例#2
0
$service = $action;
$AlipayInterface = new AlipayInterface($service);
if ($action == 'user_authentication') {
    //身份验证
    $param = array('return_url' => "{$db_bbsurl}/act_alipay_receive.php?action={$action}");
    ObHeader($AlipayInterface->alipayurl($param));
} elseif ($action == 'confirm_aa_detail_payment') {
    //订单支付
    S::gp(array('actuid', 'tid', 'fromuid', 'actmid'), GP, 2);
    $memberdb = $db->get_one("SELECT am.uid,am.username,am.ifpay,am.isrefund,am.out_trade_no,am.totalcash,am.ifanonymous,t.authorid FROM pw_activitymembers am LEFT JOIN pw_threads t USING(tid) WHERE am.actuid=" . S::sqlEscape($actuid));
    L::loadClass('ActivityForBbs', 'activity', false);
    $postActForBbs = new PW_ActivityForBbs($data);
    $data = array();
    $memberdb['authorid'] == $winduid && Showmsg('act_toalipay_authorid');
    //发起人无法替别人支付
    $isAdminright = $postActForBbs->getAdminRight($memberdb['authorid']);
    if ($memberdb['isrefund'] || $memberdb['ifanonymous'] && !$isAdminright && $memberdb['uid'] != $winduid) {
        //退款的无法支付、匿名但没有权限的无法支付
        Showmsg('act_toalipay_error');
    }
    $memberdb['ifpay'] != 0 && Showmsg('act_toalipay_payed');
    //只有未支付状态才可以支付
    if (!$memberdb['totalcash'] || !preg_match("/^(([1-9]\\d*)|0)(\\.\\d{0,2})?\$/", $memberdb['totalcash'])) {
        //费用错误
        Showmsg('act_toalipay_cash_error');
    }
    $memberdb['totalcash'] = number_format($memberdb['totalcash'], 2, '.', '');
    //支付金额
    $out_trade_no = $memberdb['out_trade_no'] ? $memberdb['out_trade_no'] : $db_sitehash . '_' . $tid . '_' . $actuid . '_' . generatestr(6);
    $defaultValueTableName = getActivityValueTableNameByActmid();
    $defaultValue = $db->get_one("SELECT out_biz_no,paymethod,iscancel,endtime FROM {$defaultValueTableName} WHERE tid=" . S::sqlEscape($tid));
示例#3
0
                $signupdetail .= ($signupdetail ? ',' : '') . $feesdb[$key]['condition'] . $value . getLangInfo('other', 'act_people');
            }
        }
        $totalcash = $defaultValue['totalcash'];
        require_once PrintEot('ajax');
        ajax_footer();
    }
    require_once PrintEot('ajax');
    ajax_footer();
} elseif ($job == 'sendmsg') {
    //群发短消息
    S::gp(array('tid', 'actmid', 'authorid'));
    $data = array();
    L::loadClass('ActivityForBbs', 'activity', false);
    $postActForBbs = new PW_ActivityForBbs($data);
    $isAdminright = $postActForBbs->getAdminRight($authorid);
    $isAdminright != 1 && Showmsg('act_sendmsg_noright');
    if (empty($_POST['step'])) {
        $tid = $db->get_value("SELECT tid FROM pw_activitymembers WHERE tid=" . S::sqlEscape($tid));
        !$tid && Showmsg('act_sendmsg_fail');
        require_once PrintEot('ajax');
        ajax_footer();
    } elseif ($_POST['step'] == 2) {
        PostCheck();
        S::gp(array('subject', 'atc_content', 'tid', 'ifsave'));
        require_once R_P . 'require/common.php';
        $msg_title = trim($subject);
        $atc_content = trim($atc_content);
        if (empty($atc_content) || empty($msg_title)) {
            Showmsg('msg_empty');
        } elseif (strlen($msg_title) > 75 || strlen($atc_content) > 1500) {