break; default: $db->update("UPDATE pw_tradeorder SET ifpay='4',tradedate=" . S::sqlEscape($timestamp) . " WHERE order_no=" . S::sqlEscape($out_trade_no)); } paymsg('index.php', 'operate_success'); } elseif ($action == 'pcalipay') { //ÍŹº¡¢»î¶¯ list($pcmid) = explode('_', $out_trade_no); $rt = $db->get_one("SELECT tid,ifpay FROM pw_pcmember WHERE pcmid=" . S::sqlEscape($pcmid)); if (empty($rt) || $rt['ifpay'] == '1') { paymsg("read.php?tid={$rt['tid']}", 'pcalipay_success'); } if ($trade_status == 'WAIT_SELLER_SEND_GOODS') { $db->update("UPDATE pw_pcmember SET ifpay=1 WHERE pcmid=" . S::sqlEscape($pcmid)); } paymsg("read.php?tid={$rt['tid']}", 'pcalipay_success'); } function paymsg($url, $msg, $notify = 'success') { if (empty($_POST)) { refreshto($url, $msg); } exit($notify); } function getExtra($extra) { $return = ''; $extra && ($extra = explode('.', $extra)); if (S::isArray($extra)) { foreach ($extra as $v) { is_numeric($v) && ($return .= chr($v));
$sqlarray = array('fupid' => $actuid, 'tid' => $tid, 'uid' => $memberdb['uid'], 'actmid' => $memberdb['actmid'], 'username' => $memberdb['username'], 'totalcash' => $refund_fee, 'signuptime' => $timestamp, 'isrefund' => 1, 'refundreason' => $memberdb['refundreason']); $db->update("INSERT INTO pw_activitymembers SET " . S::sqlSingle($sqlarray)); $db->update("UPDATE {$defaultValueTableName} SET updatetime=" . S::sqlEscape($timestamp) . " WHERE tid=" . S::sqlEscape($tid)); //报名列表动态时间 $newactuid = $db->insert_id(); /*支付成功费用流通日志 退款成功 */ $data = array(); L::loadClass('ActivityForBbs', 'activity', false); $postActForBbs = new PW_ActivityForBbs($data); $statusValue = $postActForBbs->getActivityStatusValue($tid); $postActForBbs->UpdatePayLog($tid, $newactuid, $statusValue); /*支付成功费用流通日志*/ /*短消息通知 退款 发起人*/ $msgContentText = $memberdb['isadditional'] ? 'activity_refund2_content' : 'activity_refund_content'; M::sendNotice(array($memberdb['author']), array('title' => getLangInfo('writemsg', 'activity_refund_title', array('uid' => $memberdb['uid'], 'username' => $memberdb['username'], 'tid' => $tid, 'subject' => $memberdb['subject'], 'totalcash' => $refund_fee)), 'content' => getLangInfo('writemsg', $msgContentText, array('uid' => $memberdb['uid'], 'username' => $memberdb['username'], 'tid' => $tid, 'subject' => $memberdb['subject'], 'totalcash' => $refund_fee))), 'notice_active', 'notice_active'); /*短消息通知 退款 参与人*/ $msgContentText = $memberdb['isadditional'] ? 'activity_refund2_signuper_content' : 'activity_refund_signuper_content'; M::sendNotice(array($memberdb['username']), array('title' => getLangInfo('writemsg', 'activity_refund_signuper_title', array('uid' => $memberdb['authorid'], 'username' => $memberdb['author'], 'tid' => $tid, 'subject' => $memberdb['subject'], 'totalcash' => $refund_fee)), 'content' => getLangInfo('writemsg', $msgContentText, array('uid' => $memberdb['authorid'], 'username' => $memberdb['author'], 'tid' => $tid, 'subject' => $memberdb['subject'], 'totalcash' => $refund_fee))), 'notice_active', 'notice_active'); paymsg("read.php?tid={$tid}", 'act_refund_success'); } else { paymsg("index.php", 'undefined_action'); } function paymsg($url, $msg, $notify = 'success') { if (empty($_POST)) { refreshto($url, $msg); } exit($notify); }