Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php goto uuVFX; uuVFX: defined('IN_IA') or exit('Access Denied'); goto A8oY8; A8oY8..
Decoded Output download
<?php
goto uuVFX;
uuVFX: defined('IN_IA') or exit('Access Denied');
goto A8oY8;
A8oY8: require IA_ROOT . '/addons/dhw_duihuan/dhw/defines.php';
goto npXQp;
npXQp: require IA_ROOT . '/addons/dhw_duihuan/dhw/CacheUtil.class.php';
goto YDaSv;
YDaSv: class Dhw_duihuanModuleSite extends WeModuleSite {
const ACTIVITY_ERROR_NOT_EXIST = "NOT_EXIST";
const ACTIVITY_ERROR_NOT_EXIST_STR = "";
const ACTIVITY_ERROR_NOT_START = "NOT_START";
const ACTIVITY_ERROR_NOT_START_STR = "";
const ACTIVITY_ERROR_ALREADY_END = "ALREADY_END";
const ACTIVITY_ERROR_ALREADY_END_STR = "";
private $TABLE_DUIHUAN = "dhw_duihuan_duihuan";
private $TABLE_CARD = "dhw_duihuan_card";
private $TABLE_USER = "dhw_duihuan_user";
private $TABLE_PRODUCT = "dhw_duihuan_product";
private $TABLE_ZITI_ADDR = "dhw_duihuan_ziti_addr";
private $TABLE_ACTIVITY = "dhw_duihuan_activity";
private $TABLE_CONFIG = "dhw_duihuan_config";
private $TABLE_PAGE = "dhw_duihuan_page";
private $TABLE_NOTICE = "dhw_duihuan_notice";
private $TABLE_NOTICE_USER = "dhw_duihuan_notice_user";
private $STATUS_FROZEN = 0;
private $STATUS_INIT = 1;
private $STATUS_WAIT_SEND = 2;
private $STATUS_SENT = 3;
private $STATUS_CARD_FROZEN = 0;
private $STATUS_CARD_INIT = 1;
private $STATUS_CARD_ACTIVED = 10;
private $STATUS_CARD_USED = 20;
private $STATUS_NOTICE_START = 1;
private $STATUS_NOTICE_STOP = 2;
private $STATUS_NOTICE_DELETED = -1;
private $NOTICE_TYPE_CLIENT_NEW = 1;
private $NOTICE_TYPE_CLIENT_SENT = 2;
private $NOTICE_TYPE_SHOP_NEW = 3;
private $NOTICE_TYPE_CLIENT_NEW_NAME = "[]";
private $NOTICE_TYPE_CLIENT_SENT_NAME = "[]";
private $NOTICE_TYPE_SHOP_NEW_NAME = "[]";
private $STATUS_NOTICE_USER_WAIT_REVIEW = 0;
private $STATUS_NOTICE_USER_START = 1;
private $STATUS_NOTICE_USER_STOP = 2;
private $STATUS_NOTICE_USER_DELETED = -1;
private $KEYWORD_ELE_PRODUCT_NAME = "1";
private $KEYWORD_ELE_PRODUCT_NAME_NAME = "";
private $KEYWORD_ELE_CLIENT_ORDER_TIME = "2";
private $KEYWORD_ELE_CLIENT_ORDER_TIME_NAME = "";
private $KEYWORD_ELE_CARD_NO = "3";
private $KEYWORD_ELE_CARD_NO_NAME = "";
private $KEYWORD_ELE_ORDER_STATUS = "4";
private $KEYWORD_ELE_ORDER_STATUS_NAME = "";
private $KEYWORD_ELE_KUAIDI_NO = "5";
private $KEYWORD_ELE_KUAIDI_NO_NAME = "";
private $KEYWORD_ELE_KUAIDI_CORP = "6";
private $KEYWORD_ELE_KUAIDI_CORP_NAME = "";
private $KEYWORD_ELE_RECEIVE_INFO = "7";
private $KEYWORD_ELE_RECEIVE_INFO_NAME = ":";
private $RECEIVE_TYPE_PEISONG = "PEISONG";
private $RECEIVE_TYPE_ZITI = "ZITI";
private $encryKey = "8d2c4f84f2262d33";
private $KEFU_MOBILE = "15951701808";
private $UV_TYPE_UV = "uv";
private $UV_TYPE_SHARE_COUNT = "share_count";
public function doMobileDuihuan() {
goto UFVsB;
e08To: $_W['page']['title'] = $act['title1'];
goto XJPF2;
y8W9C: return;
goto MC7kt;
oWxiV: pdo_insert($this->TABLE_USER, $user);
goto HlX_s;
n311U: if (!(strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == false)) {
goto pSr6X;
}
goto IykXY;
Menjp: $user['uniacid'] = $_W['uniacid'];
goto BS5Jt;
ju4hc: $user['openid'] = $oauthuser['from_user'];
goto sIBSL;
UFVsB: global $_W, $_GPC;
goto Mvek6;
IykXY: return message('', 'refresh', 'error');
goto ikpgx;
NcYrU: if (!($res != null)) {
goto i7sQB;
}
goto lmRn2;
ceYnx: CacheUtil::recordUV($ip, $actId, $this->UV_TYPE_UV);
goto IFtIZ;
AGCuq: ljhsj: goto pXDtC;
BS5Jt: $user['create_time'] = date('Y-m-d H:i:s', time());
goto oWxiV;
ikpgx: pSr6X: goto eRN6X;
HlX_s: $user['user_id'] = pdo_insertid();
goto g7vcj;
Mvek6: CacheUtil::dhwlog('##doMobileDuihuan##');
goto xEsFZ;
behMk: if ($user) {
goto igqkw;
}
goto ju4hc;
eRN6X: $actId = $_GPC['actid'];
goto GRWJi;
pXDtC: include $this->template('error');
goto y8W9C;
XJPF2: pdo_query('update ' . tablename($this->TABLE_ACTIVITY) . ' set pv = pv +1 where activity_id = :activity_id', array(":activity_id" => $actId));
goto D3QO3;
GRWJi: $act = CacheUtil::getActivity($actId);
goto VDhht;
FlELa: $user['nick'] = $oauthuser['nickname'];
goto Menjp;
QagUx: see2c: goto AGCuq;
Vk0Bu: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto n311U;
IFtIZ: $user = pdo_get($this->TABLE_USER, array("openid" => $oauthuser['from_user'], "uniacid" => $_W['uniacid']));
goto behMk;
xEsFZ: $oauthuser = $this->dhw_checkoauth();
goto Vk0Bu;
lmRn2: switch ($res) {
case self::ACTIVITY_ERROR_NOT_START: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_START_STR;
goto ljhsj;
case self::ACTIVITY_ERROR_ALREADY_END: $rst['pageMsg'] = self::ACTIVITY_ERROR_ALREADY_END_STR;
goto ljhsj;
case self::ACTIVITY_ERROR_NOT_EXIST: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_EXIST_STR;
goto ljhsj;
default: goto ljhsj;
}
goto QagUx;
sIBSL: $user['head_img'] = $oauthuser['avatar'];
goto FlELa;
PZven: $zitiCf = CacheUtil::getZitiConfig($_W['uniacid']);
goto i0ao_;
D3QO3: $ip = $_W['clientip'];
goto ceYnx;
g7vcj: igqkw: goto PZven;
i0ao_: include $this->template('duihuan');
goto ubCB3;
MC7kt: i7sQB: goto e08To;
VDhht: $res = $this->checkValidDo($act);
goto NcYrU;
ubCB3:
}
public function doWebChangeZitiStatus() {
goto wh2Eb;
XXJq2: CacheUtil::removeZitiConfig($_W['uniacid']);
goto UTrlJ;
sFKnr: $status = $state == 'true' ? 1 : 0;
goto MOMqj;
hx9q2: $rst['msg'] = '';
goto TIigZ;
wh2Eb: global $_GPC, $_W;
goto mUcPc;
mUcPc: $state = $_GPC['state'];
goto sFKnr;
MOMqj: pdo_update($this->TABLE_CONFIG, array("ziti_status" => $status), array("uniacid" => $_W['uniacid']));
goto XXJq2;
TIigZ: return json_encode($rst);
goto mWgWj;
UTrlJ: $rst['success'] = true;
goto hx9q2;
mWgWj:
}
function sendTemplateMsg($duihuan, $noticeType) {
goto khTbr;
FCmt2: $notices = pdo_getall($this->TABLE_NOTICE, array("uniacid" => $_W['uniacid'], "activity_id" => $duihuan['activity_id'], "status" => $this->STATUS_NOTICE_START));
goto CLRM0;
n5I4q: return;
goto TxB_p;
hQLZ2: T1pZd: goto dVFuR;
bE2nn: CacheUtil::dhwlog('sendTemplateMsg.......');
goto FCmt2;
CLRM0: if ($notices) {
goto RfaAw;
}
goto kKov8;
AJEis: foreach ($notices as &$notice) {
goto oEwoE;
ZGzz0: S5dod: goto zE5Ef;
l8kRk: foreach ($targets as $target) {
goto F6oEU;
yMxd6: if ($u) {
goto cJd91;
}
goto fx1eJ;
FhEwL: rnfsU: goto Y3XZj;
DFyq6: cJd91: goto XWWfK;
fx1eJ: goto rnfsU;
goto DFyq6;
F6oEU: $u = pdo_get($this->TABLE_USER, array("user_id" => $target['user_id']));
goto yMxd6;
XWWfK: $sendStatus = $account_api->sendTplNotice($u['openid'], $notice['wx_template_id'], $data, '', $topcolor = '#32e345');
goto FhEwL;
Y3XZj:
}
goto zCSRo;
pPrCQ: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_SENT) {
goto VAJht;
}
goto F9JAK;
qaPqY: $k2 = array("value" => $this->parseTemplateEle($content['keyword2'], $duihuan), "color" => "#ff510");
goto Knw0X;
E6sVY: $k4 = array("value" => $this->parseTemplateEle($content['keyword4'], $duihuan), "color" => "#ff510");
goto NC_hQ;
lA41q: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_NEW) {
goto QUrJV;
}
goto pPrCQ;
NC_hQ: $data['keyword4'] = $k4;
goto bSOpE;
ZZsMV: if (empty($content['keyword4'])) {
goto QUOmo;
}
goto E6sVY;
nJZrg: $k1 = array("value" => $this->parseTemplateEle($content['keyword1'], $duihuan), "color" => "#ff510");
goto qZc7M;
NOT_R: m_iy1: goto HPJG9;
j1LEC: $sendStatus = $account_api->sendTplNotice($tempUser['openid'], $notice['wx_template_id'], $data, '', $topcolor = '#32e345');
goto Vlc2K;
TBJGp: QUrJV: goto Rt_qL;
tGgn2: $content = json_decode($contentJson, true);
goto wP75y;
GjdXl: $data['keyword3'] = $k3;
goto QkqZe;
uI2Rm: goto wbr3m;
goto Yf8Fb;
Yf8Fb: VAJht: goto fJE3i;
Rhc8H: PfUmy: goto uI2Rm;
Rt_qL: $tempUser = pdo_get($this->TABLE_USER, array("user_id" => $duihuan['user_id']));
goto KwkRK;
qZc7M: $data['keyword1'] = $k1;
goto dsP3M;
c2a3X: $targets = pdo_getall($this->TABLE_NOTICE_USER, array("notice_id" => $notice['id'], "status" => $this->STATUS_NOTICE_USER_START));
goto l8kRk;
F9JAK: if (!($notice['notice_type'] == $this->NOTICE_TYPE_SHOP_NEW)) {
goto PfUmy;
}
goto c2a3X;
ro8Tj: $contentJson = $notice['content_json'];
goto tGgn2;
oEwoE: if (!($noticeType == $notice['notice_type'])) {
goto G52HC;
}
goto ro8Tj;
Mv0Tq: goto m_iy1;
goto TBJGp;
Knw0X: $data['keyword2'] = $k2;
goto rFPwN;
Vlc2K: wbr3m: goto Mv0Tq;
fJE3i: $tempUser = pdo_get($this->TABLE_USER, array("user_id" => $duihuan['user_id']));
goto j1LEC;
Nj2mT: zn636: goto lA41q;
UU1c3: $remark = array("value" => $content['remark'], "color" => "#ff510");
goto l_OtA;
zCSRo: kNyuV: goto Rhc8H;
puRs5: $k5 = array("value" => $this->parseTemplateEle($content['keyword5'], $duihuan), "color" => "#ff510");
goto h1Asq;
vw6fi: if (empty($content['keyword2'])) {
goto BSxvq;
}
goto qaPqY;
wP75y: $first = array("value" => $content['first'], "color" => "#ff510");
goto UU1c3;
QkqZe: DEbbq: goto ZZsMV;
h1Asq: $data['keyword5'] = $k5;
goto Nj2mT;
l_OtA: $data['first'] = $first;
goto ju5b7;
bSOpE: QUOmo: goto nxiAf;
DvHbr: if (empty($content['keyword3'])) {
goto DEbbq;
}
goto m5dnm;
dsP3M: J3ZC1: goto vw6fi;
HPJG9: G52HC: goto ZGzz0;
m5dnm: $k3 = array("value" => $this->parseTemplateEle($content['keyword3'], $duihuan), "color" => "#ff510");
goto GjdXl;
ju5b7: $data['remark'] = $remark;
goto ZGQaC;
nxiAf: if (empty($content['keyword5'])) {
goto zn636;
}
goto puRs5;
ZGQaC: if (empty($content['keyword1'])) {
goto J3ZC1;
}
goto nJZrg;
rFPwN: BSxvq: goto DvHbr;
KwkRK: $sendStatus = $account_api->sendTplNotice($tempUser['openid'], $notice['wx_template_id'], $data, '', $topcolor = '#32e345');
goto NOT_R;
zE5Ef:
}
goto hQLZ2;
khTbr: global $_GPC, $_W;
goto bE2nn;
maL35: $account_api = WeAccount::create();
goto AJEis;
kKov8: CacheUtil::dhwlog('');
goto n5I4q;
TxB_p: RfaAw: goto maL35;
dVFuR:
}
function parseTemplateEle($ele_type, $duihuan) {
goto Qi1LU;
Qi1LU: switch ($ele_type) {
case $this->KEYWORD_ELE_RECEIVE_INFO: $addr = $duihuan['receive_type'] == $this->RECEIVE_TYPE_ZITI ? '[]' . $duihuan['addr'] : $duihuan['addr'];
return $duihuan['consignee'] . ',' . $duihuan['mobile'] . ',' . $addr;
case $this->KEYWORD_ELE_KUAIDI_CORP: return $duihuan['express_corp'];
case $this->KEYWORD_ELE_KUAIDI_NO: return $duihuan['express_no'];
case $this->KEYWORD_ELE_ORDER_STATUS: goto p3Ibm;
p3Ibm: switch ($duihuan['status']) {
case $this->STATUS_FROZEN: return '';
case $this->STATUS_INIT: return '';
case $this->STATUS_WAIT_SEND: return '';
case $this->STATUS_SENT: return '';
default: return '';
}
goto hXHNk;
hXHNk: ixpQh: goto k5JFK;
k5JFK: g9RRy: goto Y46n8;
Y46n8: case $this->KEYWORD_ELE_CARD_NO: $card = pdo_get($this->TABLE_CARD, array("card_id" => $duihuan['card_id']));
return $card['card_no'];
case $this->KEYWORD_ELE_CLIENT_ORDER_TIME: return $duihuan['duihuan_time'];
case $this->KEYWORD_ELE_PRODUCT_NAME: return $duihuan['product_name'];
}
goto uFFsJ;
Nhstn: fvWlO: goto pbJpy;
uFFsJ: Ov61h: goto Nhstn;
pbJpy:
}
function checkDuihuanRecord($userId, $actId) {
goto QXL7G;
QXL7G: global $_W, $_GPC;
goto jY2RN;
aQiky: if ($dh) {
goto H93Pf;
}
goto cUANe;
cUANe: return false;
goto FI94u;
FI94u: H93Pf: goto OoUFC;
jY2RN: $dh = pdo_fetch('select * from ' . tablename($this->TABLE_DUIHUAN) . ' where user_id = :userId and activity_id = :activity_id and `status` > 0', array(":userId" => $userId, ":activity_id" => $actId));
goto aQiky;
OoUFC: return true;
goto iYQxT;
iYQxT:
}
public function doMobileDoDuihuan() {
goto vp5oA;
OYF74: $duihuan['addr'] = $region . $addr;
goto hQoMH;
y1XRg: CacheUtil::dhwlog('region:' . $region);
goto KYPhj;
kvodx: if (!$duihuan) {
goto AHHDe;
}
goto IUFBd;
hWcvO: $duihuan['consignee'] = $name;
goto OYF74;
h62DP: aA1Cv: goto ylxIn;
gimoM: $duihuan['status'] = $this->STATUS_WAIT_SEND;
goto HOpaR;
bHtyG: $msg['msg'] = '';
goto a6n2G;
ogu7R: uHdrc: goto ZDCD5;
N4yzY: $duihuan['shipping_time'] = null;
goto d0hGi;
cbpll: if (!empty($region)) {
goto uHdrc;
}
goto waPUt;
M_gnV: $sql = 'select * from ims_dhw_duihuan_card c
left join ims_dhw_duihuan_product p on p.product_id = c.product_id
where c.card_no = :card_no and c.secret = :secret and p.activity_id = :activity_id';
goto BU1Lc;
kIQng: $msg['msg'] = '';
goto YE4JP;
hzgbT: $name = $_GPC['name'];
goto fMrSg;
bm535: if ($this->checkMobile($mobile)) {
goto aTDZz;
}
goto YsnN2;
hoeVR: if (!empty($code)) {
goto B77YB;
}
goto aiLF8;
CGaNZ: $duihuan['activity_id'] = $actId;
goto SYFO1;
m3nf2: $region = $_GPC['region'];
goto gEVuC;
mBVBI: return json_encode($msg);
goto Z2GAx;
hIMPt: $duihuan['product_id'] = $card['product_id'];
goto yIKvy;
jnc9n: yQ4Gy: goto TLM1j;
YqLwK: $msg['msg'] = '';
goto JUJqo;
p1gYj: return json_encode($msg);
goto BDhwh;
BU1Lc: $card = pdo_fetch($sql, array(":card_no" => $cardNo, ":secret" => $cryptCode, ":activity_id" => $actId));
goto unHBo;
t4w_B: Ye1t9: goto hoeVR;
SYFO1: $duihuan['card_id'] = $card['card_id'];
goto hIMPt;
gEVuC: $regionVal = $_GPC['regionVal'];
goto jPiZc;
kFsvz: goto J1ZxP;
goto j9zuJ;
bCaqh: $msg['success'] = false;
goto j15Z4;
n7_JI: $msg['success'] = false;
goto UQcjt;
aheCr: $code = strtoupper(trim($code));
goto oD38x;
IUFBd: $msg['success'] = false;
goto tTEV2;
nd3gr: DPMPT: goto ETTnR;
J03jy: $duihuan['uniacid'] = $_W['uniacid'];
goto DRqEl;
waPUt: $msg['success'] = false;
goto YqLwK;
OsAqR: pdo_insert($this->TABLE_DUIHUAN, $duihuan);
goto ni7RV;
d0hGi: $duihuan['express_no'] = '';
goto HQria;
wagkH: $duihuan['duihuan_time'] = date('Y-m-d H:i:s', time());
goto gimoM;
qAZeu: return json_encode($msg);
goto kFsvz;
MCkAd: B77YB: goto iOBCf;
cadvh: $msg['success'] = false;
goto iHgS8;
hGx3A: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_CLIENT_NEW);
goto Z6fPk;
iHgS8: $msg['msg'] = '';
goto ZKmpt;
yloLJ: $msg['msg'] = '';
goto mBVBI;
unHBo: if ($card) {
goto yQ4Gy;
}
goto fcT70;
iOBCf: $cardNo = trim($cardNo);
goto aheCr;
tTEV2: $msg['msg'] = '';
goto qAZeu;
yIKvy: $p = pdo_get($this->TABLE_PRODUCT, array("product_id" => $card['product_id']));
goto brzWe;
HOpaR: $duihuan['create_time'] = date('Y-m-d H:i:s', time());
goto OsAqR;
d7v4e: $c['used_time'] = date('Y-m-d H:i:s', time());
goto gsyCR;
NCXm6: $duihuan['shipping_status'] = 0;
goto N4yzY;
YsnN2: $msg['success'] = false;
goto sSkYW;
t1sCV: $msg['success'] = false;
goto bHtyG;
ka31J: $cardNo = $_GPC['cardNo'];
goto jwYDF;
j9zuJ: AHHDe: goto J03jy;
C8gH6: Mw6ZO: goto wzyuf;
ni7RV: $duihuanId = pdo_insertid();
goto Aihb6;
CHWnh: return json_encode($msg);
goto h62DP;
ASZCx: $msg['msg'] = '';
goto ICgWq;
DRqEl: $duihuan['user_id'] = $userId;
goto CGaNZ;
gsyCR: $c['used_user_id'] = $userId;
goto EXBGI;
hQoMH: $duihuan['mobile'] = $mobile;
goto NCXm6;
sSkYW: $msg['msg'] = '';
goto p1gYj;
oD38x: if (!empty($name)) {
goto xHzDI;
}
goto t1sCV;
Z2GAx: J1ZxP: goto v6Z1I;
Aihb6: $duihuan['duihuan_id'] = $duihuanId;
goto IuB3R;
UQcjt: $msg['msg'] = '';
goto clmYt;
HQria: $duihuan['express_corp'] = '';
goto wagkH;
OrZD0: $duihuan['receive_type'] = $this->RECEIVE_TYPE_PEISONG;
goto hWcvO;
a2yOl: $msg['msg'] = '';
goto qDHfr;
fcT70: $msg['success'] = false;
goto BTGGh;
qDHfr: return json_encode($msg);
goto MCkAd;
mMte9: $actId = $_GPC['actid'];
goto y1XRg;
fMrSg: $mobile = $_GPC['mobile'];
goto m3nf2;
HFPtI: if (!empty($cardNo)) {
goto Ye1t9;
}
goto gum3y;
j15Z4: $msg['msg'] = '';
goto CHWnh;
ETTnR: $duihuan = pdo_get($this->TABLE_DUIHUAN, array("card_id" => $card['card_id']));
goto kvodx;
idBoN: $msg['success'] = true;
goto yloLJ;
w5Hx3: $c['card_status'] = $this->STATUS_CARD_USED;
goto d7v4e;
TLM1j: if (!($card['card_status'] == $this->STATUS_CARD_USED)) {
goto Mw6ZO;
}
goto cadvh;
jwYDF: $code = $_GPC['code'];
goto hzgbT;
HgfQl: return json_encode($msg);
goto jnc9n;
clmYt: return json_encode($msg);
goto HGfHK;
jPiZc: $addr = $_GPC['addr'];
goto um3oM;
vp5oA: global $_W, $_GPC;
goto lVU_z;
brzWe: $duihuan['product_name'] = $p['product_name'];
goto OrZD0;
wzyuf: if (!($card['card_status'] == $this->STATUS_CARD_INIT)) {
goto aA1Cv;
}
goto bCaqh;
FYwxw: xHzDI: goto cbpll;
ZDCD5: if (!empty($addr)) {
goto UxA_n;
}
goto n7_JI;
aiLF8: $msg['success'] = false;
goto a2yOl;
VSmlt: $msg['success'] = false;
goto kIQng;
JUJqo: return json_encode($msg);
goto ogu7R;
IuB3R: $msg['duihuan_id'] = $duihuanId;
goto w5Hx3;
um3oM: $userId = $_GPC['userId'];
goto mMte9;
a6n2G: return json_encode($msg);
goto FYwxw;
ICgWq: return json_encode($msg);
goto t4w_B;
Z6fPk: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_SHOP_NEW);
goto idBoN;
lVU_z: CacheUtil::dhwlog('##doMobileDoDuihuan##');
goto ka31J;
YE4JP: return json_encode($msg);
goto nd3gr;
KYPhj: $region = str_replace(',', '', $region);
goto HFPtI;
HGfHK: UxA_n: goto bm535;
BTGGh: $msg['msg'] = '';
goto HgfQl;
ZKmpt: return json_encode($msg);
goto C8gH6;
gum3y: $msg['success'] = false;
goto ASZCx;
fjBAk: $cryptCode = $this->encryptCode($code . $cardNo . $this->encryKey);
goto M_gnV;
BDhwh: aTDZz: goto fjBAk;
ylxIn: if (!($card['card_status'] == $this->STATUS_CARD_FROZEN)) {
goto DPMPT;
}
goto VSmlt;
EXBGI: pdo_update($this->TABLE_CARD, $c, array("card_id" => $card['card_id']));
goto hGx3A;
v6Z1I:
}
public function doMobileDoDuihuanZiti() {
goto DKv_k;
tw21S: WPeSP: goto k2JD3;
F4mjT: return json_encode($msg);
goto PgS9I;
UwP3K: $msg['msg'] = '';
goto Px8YX;
boczF: if (!empty($name)) {
goto ykZcW;
}
goto xWjVu;
SdbG4: $addrId = $_GPC['addr'];
goto F5Mk9;
f21LJ: $card = pdo_fetch($sql, array(":card_no" => $cardNo, ":secret" => $cryptCode, ":activity_id" => $actId));
goto UYMjW;
QvtXy: $c['used_user_id'] = $userId;
goto Lj3kZ;
cIfOc: $code = strtoupper(trim($code));
goto boczF;
TAnSP: $msg['success'] = false;
goto kCv9s;
hBmC1: ykZcW: goto gBeBo;
A9ZG7: $duihuan = pdo_get($this->TABLE_DUIHUAN, array("card_id" => $card['card_id']));
goto bzXoa;
BCWR0: $duihuan['uniacid'] = $_W['uniacid'];
goto qibhV;
CrG9a: $msg['success'] = false;
goto QvenA;
DZ3s1: $duihuan['consignee'] = $name;
goto zMwAB;
fpPaF: $duihuan['duihuan_id'] = $duihuanId;
goto NEHGL;
YCiHH: return json_encode($msg);
goto vn8GW;
Vjgxv: $msg['success'] = false;
goto sHKJe;
jjUP3: $msg['duihuan_id'] = $duihuanId;
goto fpPaF;
G7a1c: return json_encode($msg);
goto pnLMb;
DKv_k: global $_W, $_GPC;
goto Dvo9D;
kCv9s: $msg['msg'] = '';
goto tmT9z;
cJ43Y: $msg['success'] = false;
goto EBv_W;
PgS9I: aw31X: goto A9ZG7;
zdcYb: $duihuan['product_name'] = $p['product_name'];
goto mQBR9;
H2sRF: eSp6p: goto IkP7t;
pUfFU: $msg['msg'] = '';
goto os2hT;
Px8YX: return json_encode($msg);
goto hBmC1;
H5gvG: $msg['msg'] = '';
goto ImLNc;
Ep50u: FjlTt: goto oBlew;
z43v1: $msg['success'] = false;
goto H5gvG;
QvkRZ: if (!($card['card_status'] == $this->STATUS_CARD_FROZEN)) {
goto aw31X;
}
goto CrG9a;
NEHGL: $c['card_status'] = $this->STATUS_CARD_USED;
goto Nxru3;
YvvdX: awOl6: goto eoUhe;
ajQcO: return json_encode($msg);
goto H2sRF;
Q3TGb: if (!($card['card_status'] == $this->STATUS_CARD_USED)) {
goto hOqMG;
}
goto Nbohg;
pL8R7: $msg['success'] = true;
goto rKs86;
S9tYq: $msg['msg'] = '';
goto lyhIy;
YC2LH: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_CLIENT_NEW);
goto V8uJ3;
CnF87: if (!empty($cardNo)) {
goto awOl6;
}
goto cJ43Y;
Ac21r: $duihuan['shipping_time'] = null;
goto frSlb;
mQBR9: $duihuan['receive_type'] = $this->RECEIVE_TYPE_ZITI;
goto tN10r;
EBv_W: $msg['msg'] = '';
goto mzdNG;
j5AhA: $duihuan['card_id'] = $card['card_id'];
goto svmoJ;
VgYuN: $name = $_GPC['name'];
goto Sp5hh;
k2JD3: $cardNo = trim($cardNo);
goto cIfOc;
TK37I: $duihuan['status'] = $this->STATUS_WAIT_SEND;
goto UvvzP;
lcO2S: $sql = 'select * from ims_dhw_duihuan_card c
left join ims_dhw_duihuan_product p on p.product_id = c.product_id
where c.card_no = :card_no and c.secret = :secret and p.activity_id = :activity_id';
goto f21LJ;
VJm2I: $duihuan['shipping_status'] = 0;
goto Ac21r;
ThCVc: $duihuan['express_corp'] = '';
goto fo0yt;
Nbohg: $msg['success'] = false;
goto S9tYq;
svmoJ: $duihuan['product_id'] = $card['product_id'];
goto GsLxm;
sVmyS: $msg['success'] = false;
goto IVeRA;
sHKJe: $msg['msg'] = '';
goto VV1J6;
Nxru3: $c['used_time'] = date('Y-m-d H:i:s', time());
goto QvtXy;
IVeRA: $msg['msg'] = '';
goto G7a1c;
rapza: $duihuanId = pdo_insertid();
goto jjUP3;
Sp5hh: $mobile = $_GPC['mobile'];
goto SdbG4;
os2hT: return json_encode($msg);
goto faK20;
vn8GW: iEj3y: goto Tf2NQ;
ImLNc: return json_encode($msg);
goto xZeSE;
zMwAB: $ziti = pdo_get($this->TABLE_ZITI_ADDR, array("addr_id" => $addrId));
goto p7xw6;
ynMpp: if (!($card['card_status'] == $this->STATUS_CARD_INIT)) {
goto sksP5;
}
goto z43v1;
UvvzP: $duihuan['create_time'] = date('Y-m-d H:i:s', time());
goto JBtjE;
xpvO5: $msg['success'] = false;
goto pUfFU;
gBeBo: if (!(empty($addrId) || $addrId == 0)) {
goto FjlTt;
}
goto Vjgxv;
sI_WB: $code = $_GPC['code'];
goto VgYuN;
rKs86: $msg['msg'] = '';
goto YCiHH;
p7xw6: $duihuan['addr'] = $ziti['addr'];
goto Qdepy;
oBlew: if ($this->checkMobile($mobile)) {
goto eSp6p;
}
goto BbmbW;
VV1J6: return json_encode($msg);
goto Ep50u;
tNwRV: $msg['msg'] = '';
goto ajQcO;
qibhV: $duihuan['user_id'] = $userId;
goto Y5kii;
fo0yt: $duihuan['duihuan_time'] = date('Y-m-d H:i:s', time());
goto TK37I;
BbmbW: $msg['success'] = false;
goto tNwRV;
Qdepy: $duihuan['mobile'] = $mobile;
goto VJm2I;
GsLxm: $p = pdo_get($this->TABLE_PRODUCT, array("product_id" => $card['product_id']));
goto zdcYb;
faK20: D9CQu: goto Q3TGb;
VeiZH: hOqMG: goto ynMpp;
tmT9z: return json_encode($msg);
goto tw21S;
Dvo9D: CacheUtil::dhwlog('##doMobileDoDuihuanZiti##');
goto p82ue;
pnLMb: goto iEj3y;
goto mamar;
tN10r: $duihuan['ziti_addr_id'] = $addrId;
goto DZ3s1;
bzXoa: if (!$duihuan) {
goto Mx5nM;
}
goto sVmyS;
p82ue: $cardNo = $_GPC['cardNo'];
goto sI_WB;
mzdNG: return json_encode($msg);
goto YvvdX;
QvenA: $msg['msg'] = '';
goto F4mjT;
xZeSE: sksP5: goto QvkRZ;
lyhIy: return json_encode($msg);
goto VeiZH;
xWjVu: $msg['success'] = false;
goto UwP3K;
UoiLL: $actId = $_GPC['actid'];
goto CnF87;
V8uJ3: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_SHOP_NEW);
goto pL8R7;
F5Mk9: $userId = $_GPC['userId'];
goto UoiLL;
frSlb: $duihuan['express_no'] = '';
goto ThCVc;
UYMjW: if ($card) {
goto D9CQu;
}
goto xpvO5;
eoUhe: if (!empty($code)) {
goto WPeSP;
}
goto TAnSP;
IkP7t: $cryptCode = $this->encryptCode($code . $cardNo . $this->encryKey);
goto lcO2S;
JBtjE: pdo_insert($this->TABLE_DUIHUAN, $duihuan);
goto rapza;
Y5kii: $duihuan['activity_id'] = $actId;
goto j5AhA;
Lj3kZ: pdo_update($this->TABLE_CARD, $c, array("card_id" => $card['card_id']));
goto YC2LH;
mamar: Mx5nM: goto BCWR0;
Tf2NQ:
}
public function doMobileGetProductName() {
goto kQKeH;
m3ctF: F3xum: goto eslrW;
QLatQ: JV5oD: goto jcBIM;
L31cz: $rst['msg'] = $product['product_name'];
goto Wlz0t;
naUWG: if (empty($cardNo)) {
goto d9AwW;
}
goto iEjhP;
vKL5r: $rst = null;
goto naUWG;
fvnbv: $cardNo = $_GPC['no'];
goto IFTG2;
HkXr_: if (!$product) {
goto JV5oD;
}
goto aYDnI;
kiC4a: $rst['msg'] = '';
goto m3ctF;
VIuLv: goto F3xum;
goto XbLzh;
iEjhP: $product = pdo_fetch('select product.* from ' . tablename($this->TABLE_CARD) . ' card
left join ' . tablename($this->TABLE_PRODUCT) . ' product on product.product_id = card.product_id
where card.card_no = :card_no and product.activity_id = :activity_id', array(":card_no" => $cardNo, ":activity_id" => $actId));
goto HkXr_;
XbLzh: d9AwW: goto Z7QRs;
eslrW: return json_encode($rst);
goto bdsAt;
yECri: $rst['msg'] = '';
goto Gv1lR;
Wlz0t: goto kCYtn;
goto QLatQ;
jcBIM: $rst['success'] = false;
goto yECri;
Gv1lR: kCYtn: goto VIuLv;
IFTG2: $actId = $_GPC['activityId'];
goto vKL5r;
aYDnI: $rst['success'] = true;
goto L31cz;
kQKeH: global $_W, $_GPC;
goto fvnbv;
Z7QRs: $rst['success'] = false;
goto kiC4a;
bdsAt:
}
public function doMobileListZitiAddr() {
goto DAUvt;
l_5IK: $addrs = pdo_getall($this->TABLE_ZITI_ADDR, array("uniacid" => $_W['uniacid'], "status" => 1));
goto DAmZq;
Byo9f: return json_encode($rst);
goto Jxq1w;
n5Nef: $rst['addrs'] = $addrs;
goto ANdlb;
DAUvt: global $_W, $_GPC;
goto l_5IK;
F1hxO: goto I2bX5;
goto mg93w;
AfTAh: $rst['msg'] = '';
goto Byo9f;
JbZie: $rst['success'] = true;
goto n5Nef;
ANdlb: return json_encode($rst);
goto F1hxO;
YrWF9: $rst['success'] = false;
goto AfTAh;
DAmZq: if (!$addrs) {
goto ixJqS;
}
goto JbZie;
Jxq1w: I2bX5: goto LciE8;
mg93w: ixJqS: goto YrWF9;
LciE8:
}
public function doMobileOrderDetail() {
goto LfRel;
qWTxw: if (!($res != null)) {
goto ERpRn;
}
goto HPYg9;
dOQ3e: include $this->template('error');
goto p2i4P;
iFTh2: CacheUtil::dhwlog('duihuan' . json_encode($duihuan) . '\n' . $duihuanId);
goto UKA7A;
UKA7A: if (!$duihuan) {
goto bRVlU;
}
goto eoWSa;
P3kab: brQph: goto PlGOS;
JihWs: if (empty($actId)) {
goto brQph;
}
goto TRPST;
NeSHJ: $actId = $_GPC['activityId'];
goto XBb3H;
bCqn0: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto NeSHJ;
eoWSa: if (!($duihuan['receive_type'] == $this->RECEIVE_TYPE_ZITI)) {
goto Ysyix;
}
goto S3TX6;
cRma4: $duihuanId = $_GPC['duihuan_id'];
goto E_X1D;
p2i4P: return;
goto l6Tyv;
PlGOS: $res = $this->checkValidDo($act);
goto qWTxw;
nwe8_: include $this->template('orderDetail');
goto cIALz;
LQurx: goto T2kWZ;
goto WGBIe;
utLLH: Ysyix: goto QOiMs;
LfRel: global $_W, $_GPC;
goto bCqn0;
QOiMs: if (!($duihuan['receive_type'] == $this->RECEIVE_TYPE_PEISONG)) {
goto nCuNj;
}
goto BxUcV;
E_X1D: $duihuan = pdo_fetch('select dh.product_name,dh.create_time,dh.shipping_status,dh.express_corp,dh.express_no,dh.receive_type,c.card_no,dh.addr
from ' . tablename($this->TABLE_DUIHUAN) . ' dh
left join ' . tablename($this->TABLE_CARD) . ' c on c.card_id = dh.card_id
where dh.duihuan_id = :duihuan_id', array(":duihuan_id" => $duihuanId));
goto iFTh2;
VAccS: nCuNj: goto LQurx;
XBb3H: $act = null;
goto JihWs;
WGBIe: bRVlU: goto vvFoq;
TRPST: $act = CacheUtil::getActivity($actId);
goto P3kab;
vvFoq: T2kWZ: goto nwe8_;
HT0gG: $_W['page']['title'] = $act['title3'];
goto cRma4;
HPYg9: switch ($res) {
case self::ACTIVITY_ERROR_NOT_START: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_START_STR;
goto tbJOE;
case self::ACTIVITY_ERROR_ALREADY_END: $rst['pageMsg'] = self::ACTIVITY_ERROR_ALREADY_END_STR;
goto tbJOE;
case self::ACTIVITY_ERROR_NOT_EXIST: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_EXIST_STR;
goto tbJOE;
default: goto tbJOE;
}
goto fHnuY;
BxUcV: $duihuan['receive_type_name'] = '';
goto VAccS;
S3TX6: $duihuan['receive_type_name'] = '';
goto utLLH;
hfFks: tbJOE: goto dOQ3e;
l6Tyv: ERpRn: goto HT0gG;
fHnuY: B4Y86: goto hfFks;
cIALz:
}
public function doMobileSendVerification() {
goto yynsh;
k9lay: echo json_encode($rst);
goto RRSyY;
GZkBM: $rst['msg'] = '';
goto soiMr;
hU2jy: $mobile = $_GPC['mobile'];
goto RWHgy;
JFB4R: $rst['msg'] = '';
goto k9lay;
Vo57n: if ($result['success']) {
goto gpJPY;
}
goto bWe9c;
XW7el: gpJPY: goto FLIU7;
xLVuF: $result = CacheUtil::sendVerification($_W['uniacid'], $mobile);
goto Vo57n;
soiMr: echo json_encode($rst);
goto dbJ2x;
RRSyY: return;
goto Ippog;
yynsh: global $_W, $_GPC;
goto hU2jy;
Dk5ra: $rst['success'] = false;
goto JFB4R;
Ny13Y: echo json_encode($rst);
goto ipN21;
bWe9c: $rst['success'] = false;
goto FV97s;
ipN21: goto Jwcec;
goto XW7el;
FV97s: $rst['msg'] = ':' . $result['msg'];
goto Ny13Y;
FLIU7: $rst['success'] = true;
goto GZkBM;
Ippog: rmyxM: goto xLVuF;
dbJ2x: Jwcec: goto fGZKE;
RWHgy: if (!($mobile == null || $mobile == '')) {
goto rmyxM;
}
goto Dk5ra;
fGZKE:
}
public function doWebDuihuanMng() {
goto LZ7pV;
LZ7pV: global $_W, $_GPC;
goto bijQu;
iMsif: $sql = $sql . ' and dh.shipping_status = :shipping_status';
goto ux5aA;
f3Tzb: $records = pdo_fetchall($sql, $params);
goto bUibU;
yE2qY: Nu_MQ: goto cjeio;
JCte2: ClhEN: goto f3Tzb;
xHeWQ: $params[':uniacid'] = $_W['uniacid'];
goto A9llk;
hGX0l: $receiveMobile = $_GPC['receiveMobile'];
goto AltMg;
KMgbc: goto v3Ev0;
goto oKDXB;
dOCOY: SzzgP: goto hlITR;
bijQu: $statusArr = array($this->STATUS_INIT, $this->STATUS_WAIT_SEND, $this->STATUS_SENT);
goto XtUxw;
cdsJB: $activityId = $_GPC['activityId'];
goto P39u0;
IH29S: $sql = $sql . ' and act.activity_id = :activity_id';
goto qQ7sv;
rWsOP: $sql = $sql . ' and dh.consignee like :consignee';
goto vVWJG;
bUibU: $acts = pdo_getall($this->TABLE_ACTIVITY, array("uniacid" => $_W['uniacid']));
goto mwEkr;
s16Ov: if (!(!empty($activityId) && $activityId != -1)) {
goto ClhEN;
}
goto IH29S;
SIEV9: $params[':product_name'] = $productName;
goto WXh3a;
UQEFX: if (!($shipStatus != null && $shipStatus != -1)) {
goto zofQG;
}
goto iMsif;
Q_FWx: v3Ev0: goto JLdfM;
zlKxO: awt2L: goto KMgbc;
A9llk: if (empty($cardNo)) {
goto Nu_MQ;
}
goto xmhDQ;
xmhDQ: $sql = $sql . ' and card.card_no = :card_no';
goto aMMy_;
vVWJG: $params[':consignee'] = '%' . $receiveName . '%';
goto dOCOY;
WXh3a: KEo5D: goto aIqmX;
ux5aA: $params[':shipping_status'] = $shipStatus;
goto G7uC5;
JLdfM: include $this->template('duihuanMng');
goto QBm3S;
duUwE: $sql = 'select dh.receive_type as receive_type, dh.duihuan_id as duihuan_id,card.card_no as card_no, dh.product_name as product_name,dh.consignee as consignee,dh.addr as addr,dh.duihuan_time as duihuan_time,dh.`status` as status,dh.mobile,dh.shipping_status,dh.shipping_time
from ' . tablename($this->TABLE_DUIHUAN) . ' dh
left join ' . tablename($this->TABLE_CARD) . ' card on card.card_id = dh.card_id
left join ' . tablename($this->TABLE_ACTIVITY) . ' act on act.activity_id = dh.activity_id
where dh.uniacid = :uniacid and dh.status in (' . implode(',', $statusArr) . ')';
goto xHeWQ;
XU5xA: $params[':mobile'] = '%' . $receiveMobile . '%';
goto FZtO8;
XtUxw: $cardNo = $_GPC['cardNo'];
goto jCH2I;
mwEkr: if (!$records) {
goto ROXQp;
}
goto cKqcR;
hlITR: if (empty($receiveMobile)) {
goto BnCW0;
}
goto EAi2_;
FZtO8: BnCW0: goto UQEFX;
G7uC5: zofQG: goto s16Ov;
aIqmX: if (empty($receiveName)) {
goto SzzgP;
}
goto rWsOP;
AltMg: $shipStatus = $_GPC['shipStatus'];
goto cdsJB;
n4YYa: $sql = $sql . ' and dh.product_name = :product_name';
goto SIEV9;
qQ7sv: $params[':activity_id'] = $activityId;
goto JCte2;
oKDXB: ROXQp: goto Q_FWx;
jCH2I: $productName = $_GPC['productName'];
goto VqgXK;
cjeio: if (empty($productName)) {
goto KEo5D;
}
goto n4YYa;
P39u0: CacheUtil::dhwlog('shipStatus' . $shipStatus);
goto duUwE;
VqgXK: $receiveName = $_GPC['receiveName'];
goto hGX0l;
cKqcR: foreach ($records as &$record) {
goto gbUkc;
hxxf7: Oj6RM: goto Tj3jb;
gbUkc: switch ($record['status']) {
case $this->STATUS_FROZEN: $record['status_name'] = '';
goto SNyU4;
case $this->STATUS_INIT: $record['status_name'] = '';
goto SNyU4;
case $this->STATUS_WAIT_SEND: $record['status_name'] = '';
goto SNyU4;
case $this->STATUS_SENT: $record['status_name'] = '';
goto SNyU4;
default: goto SNyU4;
}
goto oYbcg;
sOtV9: g0vEb: goto Xr3NI;
Pb23k: switch ($record['receive_type']) {
case $this->RECEIVE_TYPE_PEISONG: $record['receive_type_name'] = '';
goto iTzuq;
case $this->RECEIVE_TYPE_ZITI: $record['receive_type_name'] = '';
goto iTzuq;
default: goto iTzuq;
}
goto sOtV9;
Xr3NI: iTzuq: goto hxxf7;
ucBxS: SNyU4: goto Pb23k;
oYbcg: BXhyu: goto ucBxS;
Tj3jb:
}
goto zlKxO;
EAi2_: $sql = $sql . ' and dh.mobile like :mobile';
goto XU5xA;
aMMy_: $params[':card_no'] = $cardNo;
goto yE2qY;
QBm3S:
}
public function doWebDoSend() {
goto nVfIw;
KQkOT: dPm7V: goto Nyuv4;
Pjqzq: goto dPm7V;
goto J8TAL;
EDy9C: $param['shipping_time'] = date('Y-m-d H:i:s');
goto rs09v;
b1Fd9: if (!($result == 1)) {
goto TBVqw;
}
goto AK0R9;
S9Wxc: $rst['msg'] = '\n';
goto IuTxR;
WwDdL: $param['shipping_status'] = 1;
goto Y6UjJ;
yZfpz: if (!$record) {
goto Bn9NN;
}
goto yXuyu;
o97x4: $this->sendTemplateMsg($record, $this->NOTICE_TYPE_CLIENT_SENT);
goto jrwj4;
OzOgo: $record = pdo_get($this->TABLE_DUIHUAN, array("duihuan_id" => $duihuanId));
goto yZfpz;
oGR6G: $rst['success'] = false;
goto S9Wxc;
uZJTQ: TBVqw: goto Pjqzq;
IuTxR: return json_encode($rst);
goto KQkOT;
yyrdh: $rst['msg'] = '';
goto f91Sa;
On7q6: $expressName = $_GPC['expressName'];
goto OzOgo;
nVfIw: global $_W, $_GPC;
goto jHdNJ;
GRjxr: $record['express_corp'] = $expressName;
goto o97x4;
J8TAL: Bn9NN: goto oGR6G;
jHdNJ: $duihuanId = $_GPC['duihuanId'];
goto XULI0;
rs09v: $result = pdo_update($this->TABLE_DUIHUAN, $param, array("duihuan_id" => $duihuanId));
goto b1Fd9;
Vh6Yg: $param['receive_type'] = $this->RECEIVE_TYPE_PEISONG;
goto EDy9C;
yvUm3: $param['express_corp'] = $expressName;
goto WwDdL;
f91Sa: return json_encode($rst);
goto uZJTQ;
XULI0: $expressNo = $_GPC['expressNo'];
goto On7q6;
yXuyu: $param['express_no'] = $expressNo;
goto yvUm3;
Y6UjJ: $param['status'] = $this->STATUS_SENT;
goto Vh6Yg;
jrwj4: $rst['success'] = true;
goto yyrdh;
AK0R9: $record['express_no'] = $expressNo;
goto GRjxr;
Nyuv4:
}
public function doWebDoZiti() {
goto rPjfF;
jjbo1: rYvR1: goto SgF6A;
Ugn_I: $rst['msg'] = '';
goto NhH5T;
ZJO_j: $rst['success'] = false;
goto KNbIk;
nSMd8: $duihuanId = $_GPC['duihuanId'];
goto mtNlS;
pS6l3: $param['receive_type'] = $this->RECEIVE_TYPE_ZITI;
goto PiDra;
gAYtd: return json_encode($rst);
goto jjbo1;
eEp_7: if (!$record) {
goto f5an3;
}
goto Bhy7z;
NhH5T: return json_encode($rst);
goto kZTkv;
mtNlS: $record = pdo_get($this->TABLE_DUIHUAN, array("duihuan_id" => $duihuanId));
goto eEp_7;
nW9Sb: $rst['success'] = true;
goto Ugn_I;
Bhy7z: $param['shipping_status'] = 1;
goto d69de;
KNbIk: $rst['msg'] = '\n';
goto gAYtd;
nQ6jF: if (!($result == 1)) {
goto MYlLH;
}
goto nW9Sb;
Us10s: goto rYvR1;
goto fa8vM;
t5Cww: $param['shipping_time'] = date('Y-m-d H:i:s');
goto pS6l3;
d69de: $param['status'] = $this->STATUS_SENT;
goto t5Cww;
fa8vM: f5an3: goto ZJO_j;
rPjfF: global $_W, $_GPC;
goto nSMd8;
kZTkv: MYlLH: goto Us10s;
PiDra: $result = pdo_update($this->TABLE_DUIHUAN, $param, array("duihuan_id" => $duihuanId));
goto nQ6jF;
SgF6A:
}
public function doWebProductMng() {
goto tazXu;
WKFaT: $filename = 'card' . $_W['uniacid'] . '.txt';
goto IDqg5;
nRXoq: include $this->template('productMng');
goto u9FSM;
WsP8F: foreach ($records as &$record) {
goto Gto5n;
YHG2X: $record['qty'] = $rst['qty'];
goto mfEg0;
wqrJs: if (!$rst) {
goto VkQtz;
}
goto YHG2X;
hV6j5: yXopf: goto AospH;
iGCju: $rst = pdo_fetch('select count(card_id) as qty from ' . tablename($this->TABLE_CARD) . ' where product_id = :product_id and uniacid = :uniacid', array(":product_id" => $record['product_id'], ":uniacid" => $_W['uniacid']));
goto wqrJs;
Gto5n: switch ($record['status']) {
case 1: $record['status_name'] = '';
goto klDHM;
case 0: $record['status_name'] = '';
goto klDHM;
default: goto klDHM;
}
goto hV6j5;
yJD9N: Ir9tZ: goto eP2aV;
G_xR5: VkQtz: goto UmN4x;
AospH: klDHM: goto iGCju;
mfEg0: goto qE9Dd;
goto G_xR5;
V4P9N: qE9Dd: goto yJD9N;
UmN4x: $record['qty'] = 0;
goto V4P9N;
eP2aV:
}
goto E1BYz;
OKcCc: $records = pdo_fetchall($sql, array(":status" => 1, ":uniacid" => $_W['uniacid']));
goto kxCOL;
XOgIq: $templateDownUrl = tomedia(DHW_DUIHUAN_ROOT . 'pay/file/' . 'template.txt');
goto jCxTC;
E1BYz: LOXb3: goto nRXoq;
IDqg5: $txtDownUrl = tomedia(DHW_DUIHUAN_ROOT . 'pay/card/' . $filename);
goto XOgIq;
jCxTC: $sql = 'select p.*,a.activity_name from ims_dhw_duihuan_product p
left join ims_dhw_duihuan_activity a on a.activity_id = p.activity_id
where p.uniacid=:uniacid and p.status = :status and p.uniacid = :uniacid';
goto OKcCc;
FsLzq: CacheUtil::dhwlog('###doWebProductMng###');
goto WKFaT;
kxCOL: $acts = pdo_getall($this->TABLE_ACTIVITY, array("status" => 1, "uniacid" => $_W['uniacid']));
goto WsP8F;
tazXu: global $_W, $_GPC;
goto FsLzq;
u9FSM:
}
public function doWebDoCardUpload() {
goto R0YjO;
lLKW2: goto fIVHx;
goto E06_I;
ZfKmH: $card['product_id'] = $pid;
goto IPFg_;
La9MI: $name = $upfile['name'];
goto hD69v;
bVbE4: T6EIR: goto UJcTC;
E1uL9: fIVHx: goto Fv0wU;
rOuSA: $card['is_active'] = 0;
goto rclym;
NqR5X: $card['used_user_id'] = 0;
goto WOFns;
eJk7m: message('txt', $this->createWebUrl('productMng'), $type = 'error');
goto n0dFp;
eMpn8: IQ6xB: goto CLeUR;
R0YjO: global $_W, $_GPC;
goto ETCoD;
IFb_E: if (feof($handle)) {
goto ENHid;
}
goto jHZ68;
f1RXj: if (!empty($line)) {
goto uCskA;
}
goto e_FWr;
Fv0wU: AyoeV: goto a3YiE;
E06_I: U4yOw: goto jVbYy;
OHctR: switch ($type) {
case 'text/plain': $okType = true;
goto IQ6xB;
}
goto zJpVi;
jVbYy: CacheUtil::dhwlog(" {$create_path} ");
goto E1uL9;
G2nUk: $size = $upfile['size'];
goto KSDjK;
eFMrB: if ($res) {
goto U4yOw;
}
goto ZlSQ0;
Ilo49: if (is_dir($create_path)) {
goto AyoeV;
}
goto gHIV1;
hVfl9: goto wGAhl;
goto v6Hwa;
fFaW2: $line = trim($buffer);
goto f1RXj;
ETCoD: CacheUtil::dhwlog('###doWebDoCardUpload###');
goto uq4kM;
IPFg_: $card['uniacid'] = $_W['uniacid'];
goto XhR3l;
ZJKXZ: wGAhl: goto IFb_E;
hD69v: $type = $upfile['type'];
goto G2nUk;
WdO4W: $card['card_no'] = $cardNo;
goto ZfKmH;
uq4kM: if (!is_uploaded_file($_FILES['cards']['tmp_name'])) {
goto T6EIR;
}
goto eDotQ;
e_FWr: goto wGAhl;
goto O4_4K;
WOFns: $card['card_status'] = $this->STATUS_CARD_INIT;
goto v_z4n;
v_z4n: $card['create_time'] = date('Y-m-d H:i:s', time());
goto Ud74F;
obWHZ: HsTd2: goto d9YcM;
a3YiE: $fname = 'uploadCard-' . time() . '.txt';
goto O2G7Q;
b4J6W: NAB5H: goto bVbE4;
jHZ68: $buffer = fgets($handle, 4096);
goto fFaW2;
Ud74F: pdo_insert($this->TABLE_CARD, $card);
goto hVfl9;
CLeUR: if ($okType) {
goto aqmo9;
}
goto eJk7m;
NkKEE: $handle = fopen($create_path . $fname, 'r');
goto ZJKXZ;
zJpVi: EE09H: goto eMpn8;
fLhCH: $error = $upfile['error'];
goto CuWy1;
XhR3l: $card['secret'] = $secretCode;
goto rOuSA;
v6Hwa: ENHid: goto wZqlL;
eDotQ: $upfile = $_FILES['cards'];
goto La9MI;
ZlSQ0: CacheUtil::dhwlog(" {$create_path} ");
goto lLKW2;
wZqlL: fclose($handle);
goto T1p0y;
H6ynm: $minwen = $c[2];
goto AktMY;
KSDjK: $tmp_name = $upfile['tmp_name'];
goto OHctR;
PVSrk: if (!empty($c)) {
goto HsTd2;
}
goto rUIhH;
T1p0y: message('', $this->createWebUrl('productMng'), $type = 'success');
goto b4J6W;
CuWy1: $create_path = DHW_DUIHUAN_ROOT . 'pay/file/';
goto Ilo49;
AktMY: $secretCode = $this->encryptCode($minwen . $cardNo . $this->encryKey);
goto WdO4W;
n0dFp: goto NAB5H;
goto FkZz6;
d9YcM: $pid = $c[0];
goto eSzW3;
O2G7Q: move_uploaded_file($tmp_name, $create_path . $fname);
goto NkKEE;
eSzW3: $cardNo = $c[1];
goto H6ynm;
O4_4K: uCskA: goto qKQhJ;
gHIV1: $res = mkdir($create_path);
goto eFMrB;
rUIhH: goto wGAhl;
goto obWHZ;
FkZz6: aqmo9: goto fLhCH;
rclym: $card['active_time'] = null;
goto NqR5X;
qKQhJ: $c = explode(',', $line);
goto PVSrk;
UJcTC:
}
public function doWebGetProduct() {
goto QFTZ7;
Dx5g3: $rst['success'] = false;
goto QbwSV;
QFTZ7: global $_W, $_GPC;
goto ABDft;
xRnEG: return json_encode($rst);
goto ybbrQ;
Mzxpc: O9vhJ: goto Dx5g3;
fc0Kr: if (!$product) {
goto O9vhJ;
}
goto Fd2l1;
Lta29: $rst['success'] = true;
goto sLv_V;
Fd2l1: $result = pdo_fetch('select count(card_id) as qty from ' . tablename($this->TABLE_CARD) . ' where product_id = :product_id and uniacid = :uniacid', array(":product_id" => $product['product_id'], ":uniacid" => $_W['uniacid']));
goto wXwBP;
a46QQ: return json_encode($rst);
goto k3F5x;
fUyzM: $product['qty'] = $result['qty'];
goto gY2_T;
gY2_T: goto mjE1b;
goto kvRIW;
ABDft: $productId = $_GPC['productId'];
goto sd0pH;
k3F5x: goto n5cSi;
goto Mzxpc;
kvRIW: yiAug: goto GuCOa;
K3gBX: $product = pdo_fetch($sql, array(":product_id" => $productId, ":uniacid" => $_W['uniacid']));
goto fc0Kr;
QbwSV: $rst['msg'] = '';
goto xRnEG;
GuCOa: $product['qty'] = 0;
goto ZXogZ;
ZXogZ: mjE1b: goto Lta29;
sLv_V: $rst['product'] = $product;
goto a46QQ;
sd0pH: $sql = 'select p.*,a.activity_name from ims_dhw_duihuan_product p
left join ims_dhw_duihuan_activity a on a.activity_id = p.activity_id
where p.product_id = :product_id and p.uniacid = :uniacid';
goto K3gBX;
ybbrQ: n5cSi: goto utGCI;
wXwBP: if (!$result) {
goto yiAug;
}
goto fUyzM;
utGCI:
}
public function doWebUpdateProduct() {
goto XofbE;
bQXGn: return json_encode($msg);
goto KlvO3;
AHAfO: $p['product_desc'] = $pDesc;
goto Jp_j1;
KlvO3: j1nop: goto gOiHb;
xUvt2: $p['product_name'] = $pName;
goto AHAfO;
PqJFW: return json_encode($msg);
goto bNa0l;
dKuHC: $pDesc = $_GPC['productDesc'];
goto gCMpa;
hOX58: goto j1nop;
goto Hg2ie;
Eex09: $msg['msg'] = '';
goto bQXGn;
GHKwm: return json_encode($msg);
goto hOX58;
pM3od: $pId = $_GPC['productId'];
goto X0K8V;
WsHsQ: $msg['msg'] = '';
goto PqJFW;
T6KZC: $msg['success'] = false;
goto Dj7p8;
nqyfH: if ($this->generateCard($pQty, $pId)) {
goto O9Pnn;
}
goto T6KZC;
AJ2PL: $pName = $_GPC['productName'];
goto dKuHC;
X0K8V: if (!empty($pName)) {
goto vT53X;
}
goto vcFqp;
Dj7p8: $msg['msg'] = '';
goto GHKwm;
h3En9: pdo_update($this->TABLE_PRODUCT, $p, array("product_id" => $pId));
goto nqyfH;
glKBP: $msg['success'] = true;
goto Eex09;
Hg2ie: O9Pnn: goto glKBP;
bNa0l: vT53X: goto xUvt2;
XofbE: global $_W, $_GPC;
goto AJ2PL;
gCMpa: $pQty = $_GPC['productNewQty'];
goto pM3od;
Jp_j1: $p['uniacid'] = $_W['uniacid'];
goto h3En9;
vcFqp: $msg['success'] = false;
goto WsHsQ;
gOiHb:
}
public function doWebAddProduct() {
goto VS1Uo;
zoujK: if ($this->generateCard($pQty, pdo_insertid())) {
goto NUX9l;
}
goto CBhKf;
t_PrG: $p['product_desc'] = $pDesc;
goto iNZ6N;
unCeK: return json_encode($msg);
goto jbeGh;
CR_Wv: return json_encode($msg);
goto T0V1f;
JGBoB: $p['create_time'] = date('Y-h-m H:i:s');
goto zdk24;
wEhWT: $msg['msg'] = '';
goto CR_Wv;
baEFt: if (!(empty($actId) || $actId == -1)) {
goto oHXho;
}
goto WZc_w;
NdO3h: $p['activity_id'] = $actId;
goto L3WC7;
eXins: $p['product_name'] = $pName;
goto t_PrG;
nkf0a: $msg['msg'] = '';
goto jTU6i;
T0V1f: oHXho: goto eXins;
u28Ie: gFBsw: goto Ah4i8;
CBhKf: $msg['success'] = false;
goto Xt0_O;
EP0va: $msg['msg'] = '';
goto unCeK;
AoGpk: return json_encode($msg);
goto RV5rx;
VS1Uo: global $_W, $_GPC;
goto vlq9a;
b08cS: if (!empty($pName)) {
goto WtAKp;
}
goto L9rNw;
L3WC7: $p['status'] = 1;
goto JGBoB;
vlq9a: $pName = $_GPC['productName'];
goto l_zDC;
JwHOe: WtAKp: goto deBqY;
jTU6i: return json_encode($msg);
goto u28Ie;
l_zDC: $pDesc = $_GPC['productDesc'];
goto xQTME;
deBqY: if (!(empty($pQty) || $pQty == 0)) {
goto qxD0E;
}
goto Eg73Y;
RV5rx: goto gFBsw;
goto GJYl5;
dLC0Y: $msg['success'] = true;
goto nkf0a;
xQTME: $pQty = $_GPC['productQty'];
goto h2ZY2;
Xt0_O: $msg['msg'] = '';
goto AoGpk;
L9rNw: $msg['success'] = false;
goto Hz4V3;
pN97T: return json_encode($msg);
goto JwHOe;
Eg73Y: $msg['success'] = false;
goto EP0va;
WZc_w: $msg['success'] = false;
goto wEhWT;
GJYl5: NUX9l: goto dLC0Y;
Hz4V3: $msg['msg'] = '';
goto pN97T;
iNZ6N: $p['uniacid'] = $_W['uniacid'];
goto NdO3h;
h2ZY2: $actId = $_GPC['activityId'];
goto b08cS;
jbeGh: qxD0E: goto baEFt;
zdk24: pdo_insert($this->TABLE_PRODUCT, $p);
goto zoujK;
Ah4i8:
}
public function guid() {
goto PbCiU;
PbCiU: if (function_exists('com_create_guid')) {
goto CmQU1;
}
goto hC0q2;
P8wLs: $hyphen = chr(45);
goto D9VD2;
pc40s: return $uuid;
goto aTA3N;
hC0q2: mt_srand((double) microtime() * 10000);
goto Yz8yS;
D9VD2: $uuid = chr(123) . substr($charid, 0, 8) . $hyphen . substr($charid, 8, 4) . $hyphen . substr($charid, 12, 4) . $hyphen . substr($charid, 16, 4) . $hyphen . substr($charid, 20, 12) . chr(125);
goto pc40s;
KxlxE: return com_create_guid();
goto FBs8M;
aTA3N: goto Fru5K;
goto fAFNb;
Yz8yS: $charid = strtoupper(md5(uniqid(rand(), true)));
goto P8wLs;
FBs8M: Fru5K: goto ZMcpG;
fAFNb: CmQU1: goto KxlxE;
ZMcpG:
}
public function dhw_checkoauth() {
goto w9Jy9;
cUh2N: $openid = '';
goto l3T1N;
w9Jy9: global $_GPC, $_W;
goto eg6Kh;
w_5hr: Iq9iZ: goto B7ObS;
QMUAY: $avatar = $fan['avatar'];
goto mwmRe;
pGVSw: return $oauthuser;
goto miExQ;
ZPJx6: if (!(empty($avatar) || empty($nickname))) {
goto vHCEb;
}
goto xjXbW;
O1DfV: $follow = $fan['follow'];
goto qbe27;
qbe27: Ikg1G: goto h0gFq;
NOZ73: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['avatar']))) {
goto rc7nw;
}
goto cn_As;
l3T1N: $nickname = '';
goto DsXfO;
Q3qze: $oauthuser['follow'] = !empty($follow) ? $follow : $_W['fans']['follow'];
goto pGVSw;
B7ObS: e3hn3: goto a_hqK;
Lh3iy: eurCi: goto f0ejc;
JUjfL: $oauthuser['avatar'] = $avatar;
goto Vgvxl;
uawYo: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['follow']))) {
goto Iq9iZ;
}
goto bI4V7;
xjXbW: $fan = mc_fansinfo($_W['openid']);
goto H83oj;
ExVfj: $member = mc_fetch(intval($_W['member']['uid']), array("avatar", "nickname"));
goto SJ5v5;
Vgvxl: $oauthuser['nickname'] = $nickname;
goto Hgp3Q;
PzTHn: load()->model('mc');
goto cUh2N;
H83oj: if (empty($fan)) {
goto Ikg1G;
}
goto QMUAY;
jnS4s: if (empty($_W['member']['uid'])) {
goto adm9C;
}
goto ExVfj;
vCCS7: EsmAd: goto uawYo;
cn_As: $avatar = $userinfo['avatar'];
goto MtzD9;
OqXvs: $nickname = $userinfo['nickname'];
goto Lh3iy;
QTVz3: K2UXx: goto ujP8w;
fORR1: $follow = '';
goto jnS4s;
rlSNf: $userinfo = mc_oauth_userinfo();
goto NOZ73;
DsXfO: $avatar = '';
goto fORR1;
nY1a0: $avatar = $member['avatar'];
goto KnFpL;
g6kfx: $openid = $fan['openid'];
goto O1DfV;
a_hqK: if (!((empty($avatar) || empty($nickname)) && !empty($_W['member']['uid']))) {
goto K2UXx;
}
goto QTVz3;
mwmRe: $nickname = $fan['nickname'];
goto g6kfx;
h0gFq: vHCEb: goto zPlaS;
bI4V7: $follow = $userinfo['follow'];
goto w_5hr;
WEXuU: $openid = $userinfo['openid'];
goto vCCS7;
Ev1Rt: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['nickname']))) {
goto eurCi;
}
goto OqXvs;
eg6Kh: $uniacid = !empty($_W['uniacid']) ? $_W['uniacid'] : $_W['acid'];
goto PzTHn;
ujP8w: $oauthuser = array();
goto JUjfL;
KnFpL: $nickname = $member['nickname'];
goto j4MiS;
Hgp3Q: $oauthuser['from_user'] = $openid;
goto Q3qze;
NHIgF: adm9C: goto ZPJx6;
SJ5v5: if (empty($member)) {
goto N0W17;
}
goto nY1a0;
zPlaS: if (!(empty($avatar) || empty($nickname) || empty($openid) || empty($follow))) {
goto e3hn3;
}
goto rlSNf;
MtzD9: rc7nw: goto Ev1Rt;
j4MiS: N0W17: goto NHIgF;
f0ejc: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['openid']))) {
goto EsmAd;
}
goto WEXuU;
miExQ:
}
public function doWebCardMng() {
goto saoQG;
ETaU5: goto qCdkB;
goto PmBYY;
Yt9Rv: if (!empty($productName) && empty($cardNo)) {
goto aCHoO;
}
goto uBwFY;
hv099: $cardNo = $_GPC['cardNo'];
goto tsVpT;
ynsg3: foreach ($cards as &$card) {
goto XvHrm;
XvHrm: switch ($card['card_status']) {
case $this->STATUS_CARD_INIT: $card['status_name'] = '';
goto OEc7z;
case $this->STATUS_CARD_USED: $card['status_name'] = '';
goto OEc7z;
case $this->STATUS_CARD_ACTIVED: $card['status_name'] = '';
goto OEc7z;
case $this->STATUS_CARD_FROZEN: $card['status_name'] = '';
goto OEc7z;
}
goto koHdv;
koHdv: pYi2c: goto lB3_I;
lB3_I: OEc7z: goto dhE_L;
dhE_L: I3RjB: goto cm_dV;
cm_dV:
}
goto Ssg_e;
KDm_B: $params[':uniacid'] = $_W['uniacid'];
goto RAOvS;
Ssg_e: YZ2Zy: goto p1Pse;
IDuD5: TrCZ9: goto pnwPf;
RYCOd: goto x3JGh;
goto yLyyx;
SjSIF: $queryParam = " {$cardNo}; {$productName}";
goto JJpeL;
P9Yhd: $params[':card_no'] = $cardNo;
goto kHqo2;
ZJV0O: $sql = $sql . 'where card.card_no = :card_no and card.uniacid = :uniacid';
goto u9TZu;
ijYlj: eQBkL: goto Q1v7r;
lm1cC: qCdkB: goto C3emZ;
pnwPf: include $this->template('cardMng');
goto sB2Li;
tsVpT: $productName = $_GPC['productName'];
goto SjSIF;
p1Pse: include $this->template('cardMng');
goto Ggo8p;
TI1Ws: $params = array();
goto uwi47;
nPfvl: $params[':product_name'] = '%' . $productName . '%';
goto l9bWe;
u9TZu: $params[':card_no'] = $cardNo;
goto KDm_B;
uz6K1: $cards = null;
goto TI1Ws;
uBwFY: if (!empty($cardNo) && empty($productName)) {
goto WfYlE;
}
goto XA4zU;
yLyyx: WfYlE: goto ZJV0O;
sB2Li: return;
goto ijYlj;
l9bWe: $params[':uniacid'] = $_W['uniacid'];
goto lm1cC;
Q1v7r: $cards = pdo_fetchall($sql, $params);
goto ynsg3;
C3emZ: goto eQBkL;
goto IDuD5;
uwi47: if (empty($cardNo) && empty($productName)) {
goto TrCZ9;
}
goto Yt9Rv;
TFIbI: $sql = $sql . 'where p.product_name like :product_name and card.uniacid = :uniacid';
goto nPfvl;
PmBYY: aCHoO: goto TFIbI;
RAOvS: x3JGh: goto ETaU5;
aefXl: $params[':product_name'] = '%' . $productName . '%';
goto RYCOd;
XA4zU: $sql = $sql . 'where card.card_no = :card_no and p.product_name like :product_name and card.uniacid = :uniacid';
goto P9Yhd;
saoQG: global $_GPC, $_W;
goto hv099;
kHqo2: $params[':uniacid'] = $_W['uniacid'];
goto aefXl;
JJpeL: $sql = 'select card.card_no as card_no,card.card_id as card_id,card.is_active as is_active,p.product_id as product_id,p.product_name as product_name,p.product_desc as product_desc,card.card_status as card_status
from ims_dhw_duihuan_card card
left join ims_dhw_duihuan_product p on p.product_id = card.product_id ';
goto uz6K1;
Ggo8p:
}
public function doWebActiveCard() {
goto v1W2_;
ccY94: $param['card_id'] = $cardId;
goto lHoM1;
isvUq: return json_encode($rst);
goto o4LyE;
jbhTO: $data['is_active'] = 1;
goto egVqu;
TQTkz: q2tTY: goto yoYrq;
wf1no: QncD6: goto isvUq;
lHoM1: $result = pdo_update($this->TABLE_CARD, $data, $param);
goto a3O8F;
Stln6: $cardId = $_GPC['card_id'];
goto wXBwN;
yoYrq: $rst['msg'] = '';
goto TB4MF;
v1W2_: global $_W, $_GPC;
goto Stln6;
bgjSB: $param['card_status'] = $this->STATUS_CARD_INIT;
goto ccY94;
egVqu: $data['active_time'] = date('Y-m-d H:i:s', time());
goto bgjSB;
Xt7vM: if (!empty($result)) {
goto q2tTY;
}
goto ricWN;
um58X: goto QncD6;
goto TQTkz;
TB4MF: $rst['success'] = true;
goto wf1no;
vmfaG: $rst['success'] = false;
goto um58X;
wXBwN: $data['card_status'] = $this->STATUS_CARD_ACTIVED;
goto jbhTO;
a3O8F: $rst = null;
goto Xt7vM;
ricWN: $rst['msg'] = '';
goto vmfaG;
o4LyE:
}
public function doWebReinitCard() {
goto L43Yb;
T3uWK: $rst['msg'] = '';
goto JBF87;
D477w: $cardId = $_GPC['card_id'];
goto cHzGF;
poj8K: $rst['success'] = false;
goto po6nC;
XUUwj: mqs0N: goto wkiLE;
GOdfH: $result = pdo_update($this->TABLE_CARD, $data, $param);
goto Lx0Zt;
wkiLE: return json_encode($rst);
goto kzdHf;
po6nC: goto mqs0N;
goto BPRii;
JBF87: $rst['success'] = true;
goto XUUwj;
Lx0Zt: $rst = null;
goto UpCl2;
UpCl2: if (!empty($result)) {
goto aKQEV;
}
goto tFuyW;
tFuyW: $rst['msg'] = '';
goto poj8K;
BPRii: aKQEV: goto T3uWK;
L43Yb: global $_W, $_GPC;
goto D477w;
cHzGF: $data['card_status'] = $this->STATUS_CARD_INIT;
goto sIQYn;
sIQYn: $param['card_id'] = $cardId;
goto GOdfH;
kzdHf:
}
public function doWebDeleteOneActRecord() {
goto DmKpu;
gg2U1: $in = implode(',', $idsArr);
goto FlZ9C;
DdweO: $rst['msg'] = '';
goto Qc4Db;
shyuu: $idsArr = $_GPC['act_ids'];
goto gg2U1;
ifay7: foreach ($idsArr as $id) {
CacheUtil::removeActivityCache($id);
Kh7vI:
}
goto JVjC9;
JVjC9: kz6CY: goto DdweO;
DVj_Q: echo json_encode($rst);
goto EKT8C;
DmKpu: global $_W, $_GPC;
goto shyuu;
FlZ9C: pdo_query('update ' . tablename($this->TABLE_ACTIVITY) . ' set status = -1 where status > -1 and activity_id in (' . $in . ')');
goto ifay7;
Qc4Db: $rst['success'] = true;
goto DVj_Q;
EKT8C:
}
public function doWebDeleteAddr() {
goto bv7YA;
NCZnx: $rst['success'] = true;
goto FjyHg;
FjyHg: echo json_encode($rst);
goto n6Ck7;
vpaYR: $addrId = $_GPC['addr_id'];
goto GJ5LE;
MbHnU: $rst['msg'] = '';
goto NCZnx;
bv7YA: global $_W, $_GPC;
goto vpaYR;
GJ5LE: pdo_update($this->TABLE_ZITI_ADDR, array("status" => -1), array("addr_id" => $addrId));
goto MbHnU;
n6Ck7:
}
public function doWebDeleteProduct() {
goto ffYTt;
yl9Gk: $rst['msg'] = '';
goto ke5Te;
yccES: pdo_update($this->TABLE_PRODUCT, array("status" => -1), array("product_id" => $productId));
goto yl9Gk;
ffYTt: global $_W, $_GPC;
goto LHrbR;
LHrbR: $productId = $_GPC['product_id'];
goto yccES;
xKSO7: echo json_encode($rst);
goto ctZON;
ke5Te: $rst['success'] = true;
goto xKSO7;
ctZON:
}
public function doWebInvalidCards() {
goto B1QF3;
B1QF3: global $_W, $_GPC;
goto JfNvN;
Ym5Sb: $rst['msg'] = '';
goto Xqoxi;
Xqoxi: $rst['success'] = true;
goto J0XFL;
BtywH: $in = implode(',', $idsArr);
goto IOvI4;
J0XFL: echo json_encode($rst);
goto c7_9m;
JfNvN: $idsArr = $_GPC['card_ids'];
goto BtywH;
IOvI4: pdo_query('update ' . tablename($this->TABLE_CARD) . ' set card_status = :status where card_id in (' . $in . ')', array(":status" => $this->STATUS_CARD_FROZEN));
goto Ym5Sb;
c7_9m:
}
public function doWebActiveCardBatch() {
goto xc6_1;
pARuT: $data[':active_time'] = date('Y-m-d H:i:s', time());
goto LnCQy;
eiAUo: $data[':card_status'] = $this->STATUS_CARD_ACTIVED;
goto Ask9D;
LnCQy: $data[':old_status'] = $this->STATUS_CARD_INIT;
goto L70v0;
pJSFk: $rst['success'] = true;
goto sr21K;
BqITG: PxVVy: goto wXS7v;
sr21K: UrNvA: goto isaIs;
aHg1u: $in = implode(',', $idsArr);
goto eiAUo;
wXS7v: $rst['msg'] = '';
goto pJSFk;
EldXI: $rst['success'] = false;
goto dtWI3;
gfVFr: $idsArr = $_GPC['card_ids'];
goto aHg1u;
l8Oga: $rst = null;
goto zN82f;
Ask9D: $data[':is_active'] = 1;
goto pARuT;
L70v0: $result = pdo_query('update ' . tablename($this->TABLE_CARD) . ' set card_status = :card_status,is_active=:is_active,active_time = :active_time where card_status=:old_status and card_id in (' . $in . ')', $data);
goto l8Oga;
isaIs: return json_encode($rst);
goto Nqad_;
xc6_1: global $_W, $_GPC;
goto gfVFr;
zN82f: if (!empty($result)) {
goto PxVVy;
}
goto P2zm3;
dtWI3: goto UrNvA;
goto BqITG;
P2zm3: $rst['msg'] = '';
goto EldXI;
Nqad_:
}
public function doWebDeleteOneUploadRecord() {
goto nEi0F;
vdEDf: $rst['msg'] = '';
goto UPKqa;
ERbuc: echo json_encode($rst);
goto E66ae;
ibhwE: $in = implode(',', $idsArr);
goto U2giV;
U2giV: $statusArr = array($this->STATUS_INIT, $this->STATUS_WAIT_SEND, $this->STATUS_SENT);
goto ul4iq;
n_XLs: $idsArr = $_GPC['upload_ids'];
goto e2BnR;
nEi0F: global $_W, $_GPC;
goto n_XLs;
UPKqa: $rst['success'] = true;
goto ERbuc;
e2BnR: load()->func('logging');
goto ibhwE;
ul4iq: pdo_query('update ' . tablename($this->TABLE_DUIHUAN) . ' set status = 0 where status in (' . implode(',', $statusArr) . ') and duihuan_id in (' . $in . ')', array(":status" => $this->STATUS_WAIT_SEND));
goto vdEDf;
E66ae:
}
public function doWebGenerateCard() {
goto PFpHj;
N0HcQ: qRUaw: goto KDRvy;
c1nuL: message('', $this->createWebUrl('cardMng'), $type = 'success');
goto N0HcQ;
ECd7D: $productId = $_GPC['productId'];
goto vJpzk;
Bfme2: $count = $_GPC['count'];
goto ECd7D;
PFpHj: global $_GPC, $_W;
goto Z0uN7;
vJpzk: if (!$this->generateCard($count, $productId)) {
goto qRUaw;
}
goto c1nuL;
Z0uN7: CacheUtil::dhwlog('###doWebGenerateCard##');
goto Bfme2;
KDRvy:
}
public function doWebAddrMng() {
goto SgJzB;
Px6oX: oF2cQ: goto CdO1R;
dN8Uo: $sql = 'select ad.*,a.activity_name from ' . tablename($this->TABLE_ZITI_ADDR) . ' ad
left join ' . tablename($this->TABLE_ACTIVITY) . ' a on a.activity_id = ad.activity_id
where ad.status = :status and ad.uniacid = :uniacid';
goto vkxf3;
SgJzB: global $_W, $_GPC;
goto dYo9Y;
vkxf3: $records = pdo_fetchall($sql, array(":status" => 1, ":uniacid" => $_W['uniacid']));
goto MgYWc;
CdO1R: $acts = pdo_getall($this->TABLE_ACTIVITY, array("uniacid" => $_W['uniacid'], "status" => 1));
goto dN8Uo;
WOV3F: $cf['uniacid'] = $_W['uniacid'];
goto tr8i3;
dYo9Y: $cf = CacheUtil::getZitiConfig($_W['uniacid']);
goto iQ97S;
dWhZM: $cf['ziti_status'] = 0;
goto WOV3F;
iQ97S: if (!empty($cf)) {
goto oF2cQ;
}
goto dWhZM;
tr8i3: pdo_insert($this->TABLE_CONFIG, $cf);
goto Px6oX;
MgYWc: include $this->template('addrMng');
goto tdsjh;
tdsjh:
}
public function doWebAddAddr() {
goto U_AVk;
nxJEg: $addr['addr'] = $_GPC['addr'];
goto sViqD;
U_AVk: global $_W, $_GPC;
goto yFs9Z;
T_woF: return json_encode($rst);
goto Qcqlw;
EwfDd: $addr['uniacid'] = $_W['uniacid'];
goto iJEm6;
iJEm6: $result = pdo_insert($this->TABLE_ZITI_ADDR, $addr);
goto tPXZN;
tPXZN: $rst['msg'] = '';
goto yBN5x;
sViqD: $addr['activity_id'] = $_GPC['activityId'];
goto EwfDd;
yFs9Z: $addr['name'] = $_GPC['name'];
goto nxJEg;
yBN5x: $rst['success'] = true;
goto T_woF;
Qcqlw:
}
public function doWebGetAddr() {
goto oi6ZM;
fG5IT: $rst['msg'] = '';
goto TFFNC;
oi6ZM: global $_W, $_GPC;
goto UV8Js;
WyiEt: $sql = 'select ad.*,a.activity_name from ' . tablename($this->TABLE_ZITI_ADDR) . ' ad
left join ' . tablename($this->TABLE_ACTIVITY) . ' a on a.activity_id = ad.activity_id
where ad.addr_id = :addr_id';
goto ryQVW;
Vf8_F: return json_encode($rst);
goto bpf5i;
UV8Js: $addrId = $_GPC['addrId'];
goto WyiEt;
TFFNC: $rst['addr'] = $addr;
goto BdOay;
ryQVW: $addr = pdo_fetch($sql, array(":addr_id" => $addrId));
goto fG5IT;
BdOay: $rst['success'] = true;
goto Vf8_F;
bpf5i:
}
public function doWebUpdateAddr() {
goto Jc976;
Jc976: global $_W, $_GPC;
goto GqPpl;
KaCnr: $result = pdo_update($this->TABLE_ZITI_ADDR, $addr, array("addr_id" => $addrId));
goto CZeai;
GT4ch: return json_encode($rst);
goto vqx8I;
GqPpl: $addr['name'] = $_GPC['name'];
goto D3ROX;
j4wKb: $addrId = $_GPC['addr_id'];
goto KaCnr;
XXDB6: $rst['success'] = true;
goto GT4ch;
D3ROX: $addr['addr'] = $_GPC['addr'];
goto j4wKb;
CZeai: $rst['msg'] = '';
goto XXDB6;
vqx8I:
}
private function generateCard($count, $productId) {
goto xKe2S;
ac3cv: $cardNo = $this->getMillisecond() . str_pad(rand(0, 999), 3, '0', STR_PAD_LEFT);
goto eiKum;
n4Fd7: qqK8i: goto azMCj;
HDilZ: $pro = CacheUtil::getPureProductById($productId);
goto LJ83D;
ZDEfP: $card['used_user_id'] = 0;
goto r4Jmn;
jzN11: $card['secret'] = $secretCode;
goto K5ywh;
sbarZ: return true;
goto PGImU;
CILzw: $secret = $this->encryptCode(time() . $cardNo . $this->encryKey);
goto kK_Dt;
S_w5A: KYo4q: goto vXO75;
Pn_JZ: mkdirs($cardPath);
goto bXX_J;
RdJI6: $card['create_time'] = date('Y-m-d H:i:s', time());
goto i_1jH;
LJ83D: $text = $pro['product_name'] . ',' . $cardNo . ',' . $secret . '
';
goto OSA1N;
YVygr: $fileName = 'card' . $_W['uniacid'] . '.txt';
goto ADpm9;
r4Jmn: $card['card_status'] = 1;
goto RdJI6;
lc1VT: $card['active_time'] = null;
goto ZDEfP;
vXO75: $i++;
goto QE1rj;
HOlko: $secretCode = $this->encryptCode($secret . $cardNo . $this->encryKey);
goto E0KqA;
i_1jH: pdo_insert($this->TABLE_CARD, $card);
goto HDilZ;
OSA1N: fwrite($file, $text);
goto S_w5A;
E0KqA: $card['card_no'] = $cardNo;
goto tRrvk;
K5ywh: $card['is_active'] = 0;
goto lc1VT;
ADpm9: if (file_exists($cardPath)) {
goto qHgCU;
}
goto JVvLd;
BWEeG: if (!($i < $count)) {
goto qqK8i;
}
goto ac3cv;
JVvLd: load()->func('file');
goto Pn_JZ;
QE1rj: goto bSRvs;
goto n4Fd7;
tRrvk: $card['product_id'] = $productId;
goto f5HET;
kK_Dt: $secret = substr(strtoupper($secret), 10, 6);
goto HOlko;
f5HET: $card['uniacid'] = $_W['uniacid'];
goto jzN11;
wH5L7: bSRvs: goto BWEeG;
bXX_J: qHgCU: goto wQDaS;
eiKum: $cardNo = substr($cardNo, 5, 10);
goto CILzw;
azMCj: fclose($file);
goto sbarZ;
rbhfj: $firstLoop = true;
goto aedh3;
wQDaS: $file = fopen($cardPath . $fileName, 'a+');
goto N9b_b;
aedh3: $cardPath = DHW_DUIHUAN_ROOT . '/pay/card/';
goto YVygr;
xKe2S: global $_W;
goto rbhfj;
N9b_b: $i = 0;
goto wH5L7;
PGImU:
}
public function doWebTestLuhn() {
goto To6XR;
raW1L: $total -= $last_n;
goto JCslJ;
To6XR: global $_W, $_GPC;
goto XM9Qr;
XM9Qr: $no = $_GPC['no'];
goto tAt1g;
k1_iY: foreach ($arr_no as $n) {
goto COSuX;
WprOR: HqU7A: goto HS9W1;
VXwbB: xZaZl: goto qN01w;
W9c1v: $total += $nx;
goto jIJGA;
q0B1e: UURPL: goto eRboH;
eRboH: $ix = $n * 2;
goto dQOKj;
ZCinG: xMdu_: goto qAN2R;
LZjBR: goto xMdu_;
goto q0B1e;
qAN2R: $i++;
goto WprOR;
COSuX: if ($i % 2 == 0) {
goto UURPL;
}
goto n0i0l;
yXfQ0: goto DRmfI;
goto VXwbB;
dQOKj: if ($ix >= 10) {
goto xZaZl;
}
goto oEQNG;
oEQNG: $total += $ix;
goto yXfQ0;
n0i0l: $total += $n;
goto LZjBR;
qN01w: $nx = 1 + $ix % 10;
goto W9c1v;
jIJGA: DRmfI: goto ZCinG;
HS9W1:
}
goto eC2v5;
JCslJ: $x = 10 - $total % 10;
goto gw417;
eC2v5: PUyyt: goto raW1L;
gceJB: $i = 1;
goto F4lpT;
tAt1g: $arr_no = str_split($no);
goto UjcmZ;
F4lpT: $total = 0;
goto k1_iY;
uXpxb: echo 'Luhn';
goto Tr5PT;
UjcmZ: $last_n = $arr_no[count($arr_no) - 1];
goto YMRx0;
YMRx0: krsort($arr_no);
goto gceJB;
gw417: if (!($x == $last_n)) {
goto yWSMM;
}
goto uXpxb;
Tr5PT: yWSMM: goto OcbuI;
OcbuI:
}
public function doWebActivityDetail() {
goto USKSr;
JMqTa: message('', $this->createWebUrl('activityMng'), $type = 'error');
goto awdZF;
shqs8: $config['url'] = $_W['siteroot'] . $config['url'];
goto NASYp;
kqCT1: if ($config) {
goto huxhT;
}
goto JMqTa;
Bycjc: CacheUtil::dhwlog('$config:' . json_encode($config));
goto kqCT1;
awdZF: huxhT: goto shqs8;
OSedS: $config = CacheUtil::getActivity($activityId);
goto Bycjc;
MzMJR: $activityId = $_GPC['activityId'];
goto OSedS;
USKSr: global $_W, $_GPC;
goto MzMJR;
NASYp: include $this->template('activityDetail');
goto dxkue;
dxkue:
}
public function doWebAddActivity() {
goto pcKk9;
gXzBY: CacheUtil::dhwlog('###doWebAddActivity##');
goto fIiYW;
pcKk9: global $_GPC, $_W;
goto gXzBY;
F1QU1: message('', $this->createWebUrl('activityMng'), $type = 'success');
goto OTgHn;
fIiYW: try {
goto Rikpo;
EtdzK: $bg3 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto ylRuc;
EcRwQ: $line['activity_name'] = $activityName;
goto fauhO;
HmAz3: message('', $this->createWebUrl('activityMng'), $type = 'error');
goto W6tsj;
Czchx: $line['kefu_url'] = $kefuUrl;
goto dYPqt;
HKfCn: pdo_update('dhw_duihuan_activity', $line, array("activity_id" => $actId));
goto mYa83;
ghqlE: if (!empty($bg2)) {
goto Jtit3;
}
goto GRHl4;
oMa9A: $title3 = trim($_GPC['title3']);
goto Ypff4;
kQp2u: $line['bg1'] = $bg1;
goto GZo9Z;
OA0r6: $line['uniacid'] = $_W['uniacid'];
goto knFmA;
wFEo4: $kefuMobile = trim($_GPC['kefu_mobile']);
goto x8C03;
YA9OJ: $endTime = trim($_GPC['endTime']);
goto wFEo4;
AZTdP: if (!empty($bg1)) {
goto MNHcn;
}
goto j__g1;
sCx4_: $line['title2'] = $title2;
goto T4Xmb;
Cq0lL: $notice = trim($_GPC['notice']);
goto GElgH;
GZo9Z: $line['bg2'] = $bg2;
goto CJujB;
Y1m4h: $actId = pdo_insertid();
goto fuoSJ;
CJujB: $line['bg3'] = $bg3;
goto G2g5q;
fauhO: $line['start_time'] = $startTime;
goto IXZXA;
knFmA: $line['status'] = 1;
goto EcRwQ;
GRHl4: $bg2 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto v2sgX;
W6tsj: vXBKs: goto OA0r6;
T4Xmb: $line['title3'] = $title3;
goto kQp2u;
j__g1: $bg1 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/bg4.jpg');
goto Esnun;
fuoSJ: $url = $this->createMobileUrl('duihuan');
goto xtthQ;
EvuLe: if (!empty($bg3)) {
goto jt7Ek;
}
goto EtdzK;
Rikpo: $activityName = trim($_GPC['activityName']);
goto IwmZY;
Esnun: MNHcn: goto ghqlE;
neY_C: if (!(empty($startTime) || empty($endTime))) {
goto vXBKs;
}
goto HmAz3;
GElgH: $title1 = trim($_GPC['title1']);
goto TYNaf;
dYPqt: $line['end_time'] = $endTime;
goto pgUjU;
TYNaf: $title2 = trim($_GPC['title2']);
goto oMa9A;
d5puH: $bg3 = trim($_GPC['detail_placeholder_url']);
goto AZTdP;
nN6qo: $line['url'] = $url;
goto HKfCn;
pgUjU: $line['title1'] = $title1;
goto sCx4_;
v2sgX: Jtit3: goto EvuLe;
Ypff4: $bg1 = trim($_GPC['hom_placeholder_url']);
goto crUmz;
IXZXA: $line['kefu_mobile'] = $kefuMobile;
goto Czchx;
G2g5q: $line['notice'] = $notice;
goto en60a;
en60a: pdo_insert('dhw_duihuan_activity', $line);
goto Y1m4h;
IwmZY: $startTime = trim($_GPC['startTime']);
goto YA9OJ;
crUmz: $bg2 = trim($_GPC['orders_placeholder_url']);
goto d5puH;
ylRuc: jt7Ek: goto neY_C;
x8C03: $kefuUrl = trim($_GPC['kefu_url']);
goto Cq0lL;
xtthQ: $url = 'app' . substr($url, 1) . '&actid=' . $actId;
goto nN6qo;
mYa83:
}
catch (Exception $e) {
CacheUtil::dhwlog('' . $e->getMessage());
}
goto F1QU1;
OTgHn:
}
public function doWebActivityMng() {
goto vMMul;
meVMN: foreach ($acts as $act) {
goto EWQDY;
T7rAo: $act['status_name'] = '';
goto z9Ozc;
oZVLW: iXef5: goto aytlE;
hrnSU: HXBix: goto xjHZL;
zY4Kl: $act['status_color'] = 'label-warning';
goto H7YNC;
z9Ozc: $act['status_color'] = 'label-success';
goto JmEbA;
mU789: goto fB5Wy;
goto wBLx1;
JmEbA: fB5Wy: goto kGi4Z;
S63ul: $act['status_name'] = '';
goto ych1b;
ych1b: $act['status_color'] = 'label-danger';
goto suQla;
H7YNC: Jg2Xb: goto mU789;
EWQDY: $now = time();
goto ptOdn;
ptOdn: if ($now >= strtotime($act['start_time']) && $now < strtotime($act['end_time'])) {
goto v3qsP;
}
goto eNgWF;
xjHZL: $act['status_name'] = '';
goto zY4Kl;
suQla: goto Jg2Xb;
goto hrnSU;
eNgWF: if ($now < strtotime($act['start_time'])) {
goto HXBix;
}
goto S63ul;
INKKs: $list[] = $act;
goto oZVLW;
wBLx1: v3qsP: goto T7rAo;
kGi4Z: $act['url'] = $_W['siteroot'] . $act['url'];
goto INKKs;
aytlE:
}
goto X1WkU;
vMMul: global $_W, $_GPC;
goto t4rWz;
t4rWz: $acts = pdo_getall('dhw_duihuan_activity', array("uniacid" => $_W['uniacid'], "status" => 1));
goto dBwQ8;
dBwQ8: $list = array();
goto meVMN;
e_krq: include $this->template('activityList');
goto jMDg4;
X1WkU: ilX7q: goto e_krq;
jMDg4:
}
public function doWebUpdateActivity() {
goto e7Xo3;
LjmuU: $title1 = trim($_GPC['title1']);
goto xgisa;
HqssQ: if (!empty($bg1)) {
goto A3z2x;
}
goto mwTaM;
liBZd: goto qccUO;
goto l8fyq;
Y4WRH: message('', $this->createWebUrl('activityMng'), $type = 'success');
goto m04RO;
ly9C1: pdo_insert('dhw_duihuan_activity', $line);
goto e4Hw0;
xjvgP: return;
goto TdVHo;
RdBjd: CacheUtil::removeActivityCache($activityId);
goto liBZd;
e4Hw0: qccUO: goto Y4WRH;
DsovR: $line['bg2'] = $bg2;
goto ziU6h;
GnHcM: $num = 0;
goto g6OLw;
jaeD9: $line['title3'] = $title3;
goto xCjm1;
Jn7c3: KUnK2: goto dY5tM;
AqJ0S: A3z2x: goto w6FCm;
mwTaM: $bg1 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/bg4.jpg');
goto AqJ0S;
w6FCm: if (!empty($bg2)) {
goto y7_Es;
}
goto oJg2O;
oinvf: $line['uniacid'] = $_W['uniacid'];
goto KL2yW;
oJg2O: $bg2 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto P3Qe8;
cl_2u: $startTime = trim($_GPC['startTime']);
goto IDxm5;
tBc3l: $kefuUrl = trim($_GPC['kefu_url']);
goto Wzg1j;
pRnHH: $line['title2'] = $title2;
goto jaeD9;
Kv_xh: $line['kefu_url'] = $kefuUrl;
goto wGHBS;
xgisa: $title2 = trim($_GPC['title2']);
goto MbntH;
UB_1s: $bg2 = trim($_GPC['orders_placeholder_url']);
goto nFVsL;
Cfo17: TApJo: goto GOSim;
MbntH: $title3 = trim($_GPC['title3']);
goto umIt0;
ziU6h: $line['bg3'] = $bg3;
goto TT50m;
NoSrb: if (!$config) {
goto ytRFd;
}
goto X5H81;
l8fyq: ytRFd: goto oinvf;
jQtld: $activityName = trim($_GPC['activityName']);
goto tBc3l;
wGHBS: $line['kefu_mobile'] = $kefuMobile;
goto KoM66;
ALEAT: $activityId = trim($_GPC['activityId']);
goto JUfO9;
umIt0: $bg1 = trim($_GPC['home_placeholder_url']);
goto UB_1s;
nFVsL: $bg3 = trim($_GPC['detail_placeholder_url']);
goto HqssQ;
xyLOt: $line['end_time'] = $endTime;
goto Kv_xh;
hhGX4: $line['start_time'] = $startTime;
goto xyLOt;
GOSim: if (!(empty($activityId) || $activityId == 0)) {
goto cHWjZ;
}
goto vvZ_g;
IDxm5: $endTime = trim($_GPC['endTime']);
goto ALEAT;
vvZ_g: message('id', $this->createWebUrl('activityMng'), $type = 'error');
goto xjvgP;
UkCiU: return;
goto Cfo17;
JUfO9: $notice = trim($_GPC['notice']);
goto LjmuU;
Wzg1j: $kefuMobile = trim($_GPC['kefu_mobile']);
goto cl_2u;
KoM66: $line['title1'] = $title1;
goto pRnHH;
TQNjq: CacheUtil::dhwlog('config:' . json_encode($config));
goto GnHcM;
JlZUl: message('', $this->createWebUrl('activityMng'), $type = 'error');
goto UkCiU;
KL2yW: $line['status'] = 1;
goto ly9C1;
dY5tM: if (!(empty($startTime) || empty($endTime))) {
goto TApJo;
}
goto JlZUl;
P3Qe8: y7_Es: goto mgKFU;
g6OLw: $line['activity_name'] = $activityName;
goto hhGX4;
mgKFU: if (!empty($bg3)) {
goto KUnK2;
}
goto zgoq3;
zgoq3: $bg3 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto Jn7c3;
xCjm1: $line['bg1'] = $bg1;
goto DsovR;
X5H81: $num = pdo_update('dhw_duihuan_activity', $line, array("uniacid" => $_W['uniacid'], "activity_id" => $activityId));
goto RdBjd;
e7Xo3: global $_GPC, $_W;
goto jQtld;
TdVHo: cHWjZ: goto xcfPt;
xcfPt: $config = CacheUtil::getActivity($activityId);
goto TQNjq;
TT50m: $line['notice'] = $notice;
goto NoSrb;
m04RO:
}
public function doWebNoticeMng() {
goto A3mjf;
TpG9Y: nGbjx: goto EYdzX;
kKrxg: $acts_json = json_encode($acts);
goto shfss;
myAKe: foreach ($noticeUsers as &$nuser) {
goto ffwnL;
uQUIK: $nuser['openid'] = $u['openid'];
goto Ti9tp;
eseOU: $nuser['real_name'] = $u['real_name'];
goto Bu3e9;
b8Bw_: $nuser['status_color'] = 'label-warning';
goto cT9Jz;
NNTj4: $nuser['status_color'] = 'label-success';
goto JrFQi;
zI2_q: $nuser['status_color'] = 'label-warning';
goto Pyzjt;
F7wcN: vBl7k: goto fdCEo;
TWr6g: goto VHm5m;
goto F7wcN;
lip6l: if ($nuser['status'] == $this->STATUS_NOTICE_USER_START) {
goto XoA6w;
}
goto oVJRt;
JrFQi: CrHHe: goto i1Rw2;
fdCEo: $nuser['status_name'] = '';
goto b8Bw_;
iQfbn: if (!($nuser['status'] == $this->STATUS_NOTICE_USER_WAIT_REVIEW)) {
goto vNUMN;
}
goto pd2cl;
oVJRt: if ($nuser['status'] == $this->STATUS_NOTICE_USER_STOP) {
goto vBl7k;
}
goto iQfbn;
VluPZ: goto CrHHe;
goto VJyfd;
RI5rz: $nuser['nick'] = $u['nick'];
goto lip6l;
ffwnL: $u = pdo_get($this->TABLE_USER, array("user_id" => $nuser['user_id']));
goto C6pI9;
pd2cl: $nuser['status_name'] = '';
goto zI2_q;
C6pI9: $nt = pdo_get($this->TABLE_NOTICE, array("id" => $nuser['notice_id']));
goto eseOU;
EVcek: $nuser['status_name'] = '';
goto NNTj4;
Pyzjt: vNUMN: goto TWr6g;
Ti9tp: $nuser['head_img'] = $u['head_img'];
goto Y0DQE;
cT9Jz: VHm5m: goto VluPZ;
Y0DQE: $nuser['notice_name'] = $nt['notice_name'];
goto RI5rz;
VJyfd: XoA6w: goto EVcek;
Bu3e9: $nuser['mobile'] = $u['mobile'];
goto uQUIK;
i1Rw2: FAl1n: goto MRD_d;
MRD_d:
}
goto TpG9Y;
zJh8j: $notices = pdo_fetchall('select * from ims_dhw_duihuan_notice where `status` > :status and uniacid = :uniacid', array(":status" => $this->STATUS_NOTICE_DELETED, ":uniacid" => $_W['uniacid']));
goto xI3bT;
GuG9z: $noticeUsers = pdo_fetchall('select * from ' . tablename($this->TABLE_NOTICE_USER) . ' where `status` > :status and uniacid=:uniacid', array(":status" => $this->STATUS_NOTICE_USER_DELETED, ":uniacid" => $_W['uniacid']));
goto myAKe;
VFc_t: $noticeTypes_json = json_encode($noticeTypes);
goto A_6bX;
A_6bX: $eles = $this->listKeywordElements();
goto uV0BJ;
Sppq_: $acts = pdo_getall($this->TABLE_ACTIVITY, array("uniacid" => $_W['uniacid'], "status" => 1));
goto kKrxg;
A3mjf: global $_GPC, $_W;
goto Sppq_;
EYdzX: include $this->template('noticeMng');
goto k5G_c;
xI3bT: foreach ($notices as &$notice) {
goto kmeTt;
kmeTt: if ($notice['status'] == $this->STATUS_NOTICE_START) {
goto EWqBM;
}
goto tW7yo;
osn77: goto IGefx;
goto hADBY;
t_IpZ: goto DYLAq;
goto Bl7tz;
e1d3r: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_NEW) {
goto ZOKYs;
}
goto IVB6_;
Zg49F: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_SENT_NAME;
goto bVkyP;
tW7yo: if (!($notice['status'] == $this->STATUS_NOTICE_STOP)) {
goto F2PGF;
}
goto ZfSm0;
LbWty: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_NEW_NAME;
goto MiCnI;
Bl7tz: EWqBM: goto P7xoz;
bVkyP: g5Eep: goto osn77;
IVB6_: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_SENT) {
goto dhh4q;
}
goto umu_2;
uYfPr: $notice['notice_type_name'] = $this->NOTICE_TYPE_SHOP_NEW_NAME;
goto v3vWE;
hADBY: ZOKYs: goto LbWty;
d5kOc: $notice['status_color'] = 'label-success';
goto j_Mc3;
v3vWE: Kpjin: goto CRRxL;
ZfSm0: $notice['status_name'] = '';
goto PfsRF;
BzCyE: F2PGF: goto t_IpZ;
PfsRF: $notice['status_color'] = 'label-warning';
goto BzCyE;
CRRxL: goto g5Eep;
goto z6Cy4;
S5o5P: Q0Clh: goto RV3t1;
umu_2: if (!($notice['notice_type'] == $this->NOTICE_TYPE_SHOP_NEW)) {
goto Kpjin;
}
goto uYfPr;
z6Cy4: dhh4q: goto Zg49F;
j_Mc3: DYLAq: goto e1d3r;
P7xoz: $notice['status_name'] = '';
goto d5kOc;
MiCnI: IGefx: goto S5o5P;
RV3t1:
}
goto vJKBo;
uV0BJ: $eles_json = json_encode($eles);
goto zJh8j;
vJKBo: eG7z3: goto GuG9z;
shfss: $noticeTypes = $this->listNoticeTypes();
goto VFc_t;
k5G_c:
}
public function doWebAddNotice() {
goto LwqIw;
OzlqZ: f7MeB: goto FzIwM;
Juy48: $data['content_json'] = json_encode($contentJson);
goto uWnJH;
ZEL8p: $noticeType = trim($_GPC['noticeType']);
goto wK0v3;
WOgBy: $fd_keyword1 = trim($_GPC['fd_keyword1']);
goto AZs9A;
BFoOe: if (!empty($noticeName)) {
goto jOL_E;
}
goto IP2Y8;
LwqIw: global $_GPC, $_W;
goto Gs82w;
Gs82w: $activityId = $_GPC['activityId'];
goto ZEL8p;
K7n6A: message('', $this->createWebUrl('noticeMng'), $type = 'success');
goto TPEGL;
gH78q: $data['notice_name'] = $noticeName;
goto gXGrm;
vRkvr: return;
goto ooCfK;
vMM2o: if (empty($fd_first)) {
goto f7MeB;
}
goto qERar;
RIAlv: $contentJson['keyword4'] = $fd_keyword4;
goto KbmVc;
wAvqk: $fd_keyword4 = trim($_GPC['fd_keyword4']);
goto Sk3_9;
qFVkW: fihO2: goto n33_Y;
D2LAf: $data['create_time'] = date('Y-m-d H:i:s', time());
goto FhHbX;
sMVIj: message('[][]', $this->createWebUrl('noticeMng'), $type = 'error');
goto vRkvr;
QTNsB: $contentJson['keyword5'] = $fd_keyword5;
goto mQS70;
HDWSo: return;
goto KRmbx;
Wg2Mq: $templateId = trim($_GPC['templateId']);
goto XX7TT;
KRmbx: jOL_E: goto M1288;
FzIwM: if (empty($fd_remark)) {
goto fihO2;
}
goto dsnZl;
RfX95: if (!($fd_keyword2 != '-1')) {
goto b0tru;
}
goto RSCrU;
GJj2t: $data['wx_template_id'] = $templateId;
goto TkLmd;
d8CU9: if (!empty($noticeType)) {
goto XmWz7;
}
goto iaLNo;
BFyr_: return;
goto b5yt0;
M1288: if (!empty($templateId)) {
goto T1sB5;
}
goto WzztT;
XUS26: MQzs0: goto RfX95;
AZs9A: $fd_keyword2 = trim($_GPC['fd_keyword2']);
goto irtu5;
qmh3K: return;
goto qOmAm;
EZggJ: $contentJson['remark'] = '';
goto vMM2o;
KbmVc: Hzbik: goto kQ2dO;
oHFmR: $act = CacheUtil::getActivity($activityId);
goto D1AnV;
gXGrm: $data['notice_type'] = $noticeType;
goto mc1gf;
qOmAm: XmWz7: goto BFoOe;
knPCY: $fd_first = trim($_GPC['fd_first']);
goto P9AmS;
FhHbX: pdo_insert($this->TABLE_NOTICE, $data);
goto K7n6A;
raWjI: if (!($fd_keyword3 != '-1')) {
goto veadV;
}
goto UMPWl;
wK0v3: $noticeName = trim($_GPC['noticeName']);
goto Wg2Mq;
ooCfK: xAdQ2: goto d8CU9;
Sk3_9: $fd_keyword5 = trim($_GPC['fd_keyword5']);
goto Yp1jK;
TkLmd: $contentJson['first'] = '';
goto EZggJ;
WzztT: message('[][id]', $this->createWebUrl('noticeMng'), $type = 'error');
goto BFyr_;
Ack0g: b0tru: goto raWjI;
mc1gf: $data['activity_id'] = $activityId;
goto oHFmR;
uWnJH: $data['status'] = $this->STATUS_NOTICE_STOP;
goto D2LAf;
b5yt0: T1sB5: goto knPCY;
P9AmS: $fd_remark = trim($_GPC['fd_remark']);
goto WOgBy;
ODI3v: $contentJson['keyword1'] = $fd_keyword1;
goto XUS26;
mQS70: vcXou: goto Juy48;
XX7TT: if (!($activityId == '' || $activityId == 0)) {
goto xAdQ2;
}
goto sMVIj;
iaLNo: message('[][]', $this->createWebUrl('noticeMng'), $type = 'error');
goto qmh3K;
Yp1jK: $data['uniacid'] = $_W['uniacid'];
goto gH78q;
kQ2dO: if (!($fd_keyword5 != '-1')) {
goto vcXou;
}
goto QTNsB;
qERar: $contentJson['first'] = $fd_first;
goto OzlqZ;
IP2Y8: message('[][]', $this->createWebUrl('noticeMng'), $type = 'error');
goto HDWSo;
UMPWl: $contentJson['keyword3'] = $fd_keyword3;
goto b1B1Z;
n33_Y: if (!($fd_keyword1 != '-1')) {
goto MQzs0;
}
goto ODI3v;
RSCrU: $contentJson['keyword2'] = $fd_keyword2;
goto Ack0g;
b1B1Z: veadV: goto YPmWy;
D1AnV: $data['activity_name'] = $act['activity_name'];
goto GJj2t;
irtu5: $fd_keyword3 = trim($_GPC['fd_keyword3']);
goto wAvqk;
YPmWy: if (!($fd_keyword4 != '-1')) {
goto Hzbik;
}
goto RIAlv;
dsnZl: $contentJson['remark'] = $fd_remark;
goto qFVkW;
TPEGL:
}
public function doWebNoticeDetail() {
goto L3oiD;
QyNGt: if ($notice['status'] == $this->STATUS_NOTICE_START) {
goto GYuq2;
}
goto KpnMd;
H7eoY: CAqiq: goto cg9B7;
suYVF: $notice['notice_type_name'] = $this->NOTICE_TYPE_SHOP_NEW_NAME;
goto H7eoY;
GLW6m: goto nIY70;
goto lNIvB;
okDdd: $notice['status_color'] = 'label-warning';
goto iSXBH;
K9arJ: if (!($notice['notice_type'] == $this->NOTICE_TYPE_SHOP_NEW)) {
goto CAqiq;
}
goto suYVF;
k8YyZ: dOA5B: goto FqpVQ;
L3oiD: global $_GPC, $_W;
goto Gvuka;
DTxyV: $notice['status_name'] = '';
goto zAt9w;
cg9B7: goto UoLCi;
goto BSo4I;
kxkFh: $notice['status_name'] = '';
goto okDdd;
KpnMd: if (!($notice['status'] == $this->STATUS_NOTICE_STOP)) {
goto YowNk;
}
goto kxkFh;
FqpVQ: return json_encode($notice);
goto MlOVE;
E8qao: goto dOA5B;
goto DqDHb;
K_lPa: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_SENT) {
goto teaFP;
}
goto K9arJ;
lNIvB: GYuq2: goto DTxyV;
bEpD9: UoLCi: goto E8qao;
jqNgX: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_SENT_NAME;
goto bEpD9;
XxjhL: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_NEW) {
goto R1UZo;
}
goto K_lPa;
Gvuka: $noticeId = trim($_GPC['notice_id']);
goto ihDk8;
zAt9w: $notice['status_color'] = 'label-success';
goto FwHa5;
iSXBH: YowNk: goto GLW6m;
DqDHb: R1UZo: goto ciiC8;
BSo4I: teaFP: goto jqNgX;
FwHa5: nIY70: goto XxjhL;
ciiC8: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_NEW_NAME;
goto k8YyZ;
ihDk8: $notice = pdo_get($this->TABLE_NOTICE, array("id" => $noticeId));
goto QyNGt;
MlOVE:
}
public function doWebUpdateNotice() {
goto HiHKl;
uJL8G: if (!($fd_keyword2 != '-1')) {
goto DwwHZ;
}
goto Bi1v4;
zemBM: $fd_keyword5 = $_GPC['fd_keyword5'];
goto mG8Pe;
AD9fV: $act = CacheUtil::getActivity($activityId);
goto CIX6l;
eJsTs: $data['notice_name'] = $noticeName;
goto zrkLi;
nU6VK: obLvG: goto uJL8G;
ehEgJ: $activityId = $_GPC['activityId'];
goto fbMty;
AzYIF: pdo_update($this->TABLE_NOTICE, $data, array("id" => $noticeId));
goto fCCTm;
TSey9: $contentJson['remark'] = '';
goto v76N1;
mBdeK: $data['content_json'] = json_encode($contentJson);
goto uLoaD;
W8IRZ: $noticeName = trim($_GPC['noticeName']);
goto EbTSN;
HiHKl: global $_GPC, $_W;
goto HsHb8;
btqrc: EQylt: goto notJf;
wQbOZ: if (!($fd_keyword3 != '-1')) {
goto fHgKT;
}
goto vTnu_;
xI519: $fd_keyword1 = $_GPC['fd_keyword1'];
goto y26ez;
v76N1: if (empty($fd_first)) {
goto MKFTP;
}
goto kD31u;
WppA2: $fd_keyword4 = $_GPC['fd_keyword4'];
goto zemBM;
fbMty: $noticeType = trim($_GPC['noticeType']);
goto W8IRZ;
L4fNj: $fd_keyword3 = $_GPC['fd_keyword3'];
goto WppA2;
ubKlF: LmSQ4: goto eJsTs;
O4L8N: fHgKT: goto bqAve;
notJf: if (!($fd_keyword5 != '-1')) {
goto LmSQ4;
}
goto XS6iy;
zrkLi: $data['notice_type'] = $noticeType;
goto NJyB1;
fCCTm: message('', $this->createWebUrl('noticeMng'), $type = 'success');
goto jnvHz;
U9rUD: $contentJson['keyword4'] = $fd_keyword4;
goto btqrc;
uLoaD: $data['uniacid'] = $_W['uniacid'];
goto AzYIF;
ByiAC: $contentJson['keyword1'] = $fd_keyword1;
goto nU6VK;
XS6iy: $contentJson['keyword5'] = $fd_keyword5;
goto ubKlF;
rYRnH: if (!($fd_keyword1 != '-1')) {
goto obLvG;
}
goto ByiAC;
H2ApO: $fd_remark = trim($_GPC['fd_remark']);
goto xI519;
bqAve: if (!($fd_keyword4 != '-1')) {
goto EQylt;
}
goto U9rUD;
CIX6l: $data['activity_name'] = $act['activity_name'];
goto cKsmN;
cgG1s: $contentJson['remark'] = $fd_remark;
goto QQ48a;
vTnu_: $contentJson['keyword3'] = $fd_keyword3;
goto O4L8N;
QQ48a: fXSoO: goto rYRnH;
Bi1v4: $contentJson['keyword2'] = $fd_keyword2;
goto MaVFD;
y26ez: $fd_keyword2 = $_GPC['fd_keyword2'];
goto L4fNj;
Ba2Sa: if (empty($fd_remark)) {
goto fXSoO;
}
goto cgG1s;
HsHb8: $noticeId = $_GPC['notice_id'];
goto ehEgJ;
NJyB1: $data['activity_id'] = $activityId;
goto AD9fV;
MaVFD: DwwHZ: goto wQbOZ;
dl6Mc: $fd_first = trim($_GPC['fd_first']);
goto H2ApO;
kD31u: $contentJson['first'] = $fd_first;
goto egiAN;
cKsmN: $data['wx_template_id'] = $templateId;
goto mBdeK;
EbTSN: $templateId = trim($_GPC['templateId']);
goto dl6Mc;
egiAN: MKFTP: goto Ba2Sa;
mG8Pe: $contentJson['first'] = '';
goto TSey9;
jnvHz:
}
public function doWebNoticeStatusChange() {
goto KhThd;
qi9wo: pdo_update($this->TABLE_NOTICE, array("status" => $this->STATUS_NOTICE_STOP), array("id" => $id));
goto HYc_p;
KhThd: global $_GPC, $_W;
goto hKGI9;
hKGI9: $id = trim($_GPC['id']);
goto ldmjt;
xFc4o: return json_encode($rst);
goto gWDvD;
MMzAq: if ($status == $this->STATUS_NOTICE_STOP) {
goto fDyBk;
}
goto wF1cj;
gl6r1: $rst['success'] = true;
goto UcdIG;
RmIW5: WTIBG: goto KDn23;
wF1cj: if (!($status == $this->STATUS_NOTICE_START)) {
goto WTIBG;
}
goto WzFZY;
UcdIG: $rst['msg'] = '';
goto xFc4o;
WzFZY: pdo_update($this->TABLE_NOTICE, array("status" => $this->STATUS_NOTICE_START), array("id" => $id));
goto RmIW5;
HYc_p: TVD_j: goto gl6r1;
n5zj3: fDyBk: goto qi9wo;
KDn23: goto TVD_j;
goto n5zj3;
ldmjt: $status = trim($_GPC['status']);
goto MMzAq;
gWDvD:
}
public function doWebNoticeUserStatusChange() {
goto BxytH;
WhFAv: pdo_update($this->TABLE_NOTICE_USER, array("status" => $this->STATUS_NOTICE_USER_STOP), array("id" => $id));
goto I0s1e;
bQXtV: oCqZK: goto vlA6w;
p6rPg: $rst['success'] = true;
goto wyvWp;
T1eaN: pdo_update($this->TABLE_NOTICE_USER, array("status" => $this->STATUS_NOTICE_USER_START), array("id" => $id));
goto bQXtV;
wyvWp: $rst['msg'] = '';
goto Qpen9;
lnuAW: $status = trim($_GPC['status']);
goto BxgYh;
RGMNE: $id = trim($_GPC['id']);
goto lnuAW;
M6jqb: ojifY: goto WhFAv;
sA1GQ: if (!($status == $this->STATUS_NOTICE_USER_WAIT_REVIEW)) {
goto txCFC;
}
goto VdEal;
I0s1e: mXZnc: goto p6rPg;
KaAvs: PQG8F: goto T1eaN;
Qpen9: return json_encode($rst);
goto EkwYY;
NWWmC: goto oCqZK;
goto KaAvs;
VdEal: pdo_update($this->TABLE_NOTICE_USER, array("status" => $this->STATUS_NOTICE_USER_START), array("id" => $id));
goto Ocmz7;
RNrKi: if ($status == $this->STATUS_NOTICE_USER_START) {
goto PQG8F;
}
goto sA1GQ;
BxytH: global $_GPC, $_W;
goto RGMNE;
vlA6w: goto mXZnc;
goto M6jqb;
BxgYh: if ($status == $this->STATUS_NOTICE_USER_STOP) {
goto ojifY;
}
goto RNrKi;
Ocmz7: txCFC: goto NWWmC;
EkwYY:
}
public function doWebGetReceiverSubmitUrl() {
goto ZpIjG;
Ha57r: $url = $this->createMobileUrl('receiver');
goto oLkR6;
oLkR6: $url = 'app' . substr($url, 1) . '¬ice_id=' . $noticeId;
goto IVpiu;
Az31b: $noticeId = $_GPC['notice_id'];
goto Ha57r;
hk_Rc: return json_encode($rst);
goto xuSUt;
ZpIjG: global $_GPC, $_W;
goto Az31b;
wutnc: $rst['url'] = $url;
goto hk_Rc;
tJDta: $rst['success'] = true;
goto wutnc;
IVpiu: $url = $_W['siteroot'] . $url;
goto tJDta;
xuSUt:
}
public function doMobileReceiver() {
goto PnaE1;
zQitC: $user['uniacid'] = $_W['uniacid'];
goto QYtDC;
qxoPn: $user['user_id'] = pdo_insertid();
goto wRiX7;
h50g6: $user['head_img'] = $oauthuser['avatar'];
goto cCgTT;
IYdl9: $user = pdo_get($this->TABLE_USER, array("openid" => $openid, "uniacid" => $_W['uniacid']));
goto g28_g;
wRiX7: mT5lz: goto CQnN1;
CQnN1: include $this->template('receiver_submit');
goto tzNLf;
ku8g4: $oauthuser = $this->dhw_checkoauth();
goto QTJqN;
cCgTT: $user['nick'] = $oauthuser['nickname'];
goto zQitC;
QYtDC: $user['create_time'] = date('Y-m-d H:i:s', time());
goto oXuBC;
g28_g: if ($user) {
goto mT5lz;
}
goto TEcWs;
EkF0o: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto RZWsm;
RZWsm: $noticeId = $_GPC['notice_id'];
goto ku8g4;
QTJqN: $openid = $oauthuser['from_user'];
goto IYdl9;
TEcWs: $user['openid'] = $oauthuser['from_user'];
goto h50g6;
oXuBC: pdo_insert($this->TABLE_USER, $user);
goto qxoPn;
PnaE1: global $_GPC, $_W;
goto EkF0o;
tzNLf:
}
public function doMobileReceiverSubmit() {
goto qCa4s;
BKeVZ: $data['uniacid'] = $_W['uniacid'];
goto ziJBz;
DPxsX: jZNJV: goto wy0k3;
SkQYI: pdo_update($this->TABLE_USER, $userData, array("user_id" => $userId));
goto DPxsX;
NJYwr: $rst['msg'] = '';
goto oeY21;
YmuP3: $url = 'app' . substr($url, 1);
goto MxoFi;
DfKNU: pdo_insert($this->TABLE_NOTICE_USER, $data);
goto IyI9f;
IfZ2o: $rst['url'] = $url;
goto hHSeg;
qCa4s: global $_GPC, $_W;
goto fcjTH;
V3Wp9: $data['notice_id'] = $noticeId;
goto lCl3L;
fcjTH: $name = trim($_GPC['name']);
goto OPm1e;
gPBn4: $userId = $_GPC['userid'];
goto HAjFe;
Wm6RT: $openid = trim($_GPC['openid']);
goto ziyLv;
oeY21: $url = $this->createMobileUrl('errorPage');
goto YmuP3;
ziJBz: $data['user_id'] = $userId;
goto V3Wp9;
IyI9f: $userData['real_name'] = $name;
goto Q3aVz;
MxoFi: $url = $_W['siteroot'] . $url;
goto IfZ2o;
gf8S1: if ($tempUser) {
goto jZNJV;
}
goto DfKNU;
HAjFe: $noticeId = $_GPC['noticeId'];
goto BKeVZ;
lCl3L: $data['status'] = $this->STATUS_NOTICE_USER_WAIT_REVIEW;
goto MpSPD;
hHSeg: return json_encode($rst);
goto qjl_a;
OPm1e: $mobile = trim($_GPC['mobile']);
goto Wm6RT;
wy0k3: $rst['success'] = true;
goto NJYwr;
dN9Nh: $tempUser = pdo_get($this->TABLE_NOTICE_USER, array("user_id" => $userId, "uniacid" => $_W['uniacid'], "notice_id" => $noticeId));
goto gf8S1;
MpSPD: $data['create_time'] = date('Y-m-d H:i:s', time());
goto dN9Nh;
ziyLv: $headImg = trim($_GPC['headImg']);
goto gPBn4;
Q3aVz: $userData['mobile'] = $mobile;
goto SkQYI;
qjl_a:
}
public function doMobileErrorPage() {
goto jePs_;
WY0Wd: $rst['pageMsg'] = '';
goto gA33_;
jePs_: global $_W, $_GPC;
goto WY0Wd;
gA33_: include $this->template('error');
goto wEKxI;
wEKxI:
}
private function listNoticeTypes() {
goto nYfCO;
nYfCO: $list = array();
goto wavVx;
M2IPy: $list[] = array("notice_type" => $this->NOTICE_TYPE_CLIENT_SENT, "notice_type_name" => $this->NOTICE_TYPE_CLIENT_SENT_NAME);
goto R4ufO;
P_XO9: return $list;
goto AyM8F;
R4ufO: $list[] = array("notice_type" => $this->NOTICE_TYPE_CLIENT_NEW, "notice_type_name" => $this->NOTICE_TYPE_CLIENT_NEW_NAME);
goto P_XO9;
wavVx: $list[] = array("notice_type" => $this->NOTICE_TYPE_SHOP_NEW, "notice_type_name" => $this->NOTICE_TYPE_SHOP_NEW_NAME);
goto M2IPy;
AyM8F:
}
private function listKeywordElements() {
goto YEWCl;
NuaBs: $list[] = array("ele" => $this->KEYWORD_ELE_KUAIDI_CORP, "ele_name" => $this->KEYWORD_ELE_KUAIDI_CORP_NAME);
goto xWrLn;
fv4wN: return $list;
goto rMWqk;
sgN3U: $list[] = array("ele" => $this->KEYWORD_ELE_PRODUCT_NAME, "ele_name" => $this->KEYWORD_ELE_PRODUCT_NAME_NAME);
goto s7N9F;
U16W1: $list[] = array("ele" => $this->KEYWORD_ELE_CARD_NO, "ele_name" => $this->KEYWORD_ELE_CARD_NO_NAME);
goto fQ0HO;
s7N9F: $list[] = array("ele" => $this->KEYWORD_ELE_CLIENT_ORDER_TIME, "ele_name" => $this->KEYWORD_ELE_CLIENT_ORDER_TIME_NAME);
goto U16W1;
YEWCl: $list = array();
goto sgN3U;
RNjBe: $list[] = array("ele" => $this->KEYWORD_ELE_KUAIDI_NO, "ele_name" => $this->KEYWORD_ELE_KUAIDI_NO_NAME);
goto NuaBs;
xWrLn: $list[] = array("ele" => $this->KEYWORD_ELE_RECEIVE_INFO, "ele_name" => $this->KEYWORD_ELE_RECEIVE_INFO_NAME);
goto fv4wN;
fQ0HO: $list[] = array("ele" => $this->KEYWORD_ELE_ORDER_STATUS, "ele_name" => $this->KEYWORD_ELE_ORDER_STATUS_NAME);
goto RNjBe;
rMWqk:
}
private function checkValid($activityId) {
goto qfAAL;
zXffp: CacheUtil::dhwlog('' . $now);
goto GPaQi;
qfAAL: $now = time();
goto zXffp;
GPaQi: $act = pdo_get('dhw_duihuan_activity', array("activity_id" => $activityId));
goto BWU0L;
BWU0L: return $this->checkValidDo($act);
goto dODWA;
dODWA:
}
private function checkValidDo($activity) {
goto SgAk3;
FIgkO: return self::ACTIVITY_ERROR_NOT_EXIST;
goto rxPJR;
gy4DA: goto f6uoG;
goto L0KHS;
uluA5: if ($now > strtotime($activity['end_time'])) {
goto tMR8U;
}
goto B3Kd1;
xmxKt: a0VxH: goto jl60V;
ZOTyD: goto CaAYI;
goto Ax9Zi;
i9hze: return self::ACTIVITY_ERROR_NOT_EXIST;
goto F51jk;
emdPf: if (!$activity) {
goto B0cdi;
}
goto KwI24;
jl60V: goto SqLXb;
goto u6dWh;
SgAk3: $now = time();
goto emdPf;
INKEr: D90zH: goto ZOTyD;
Ax9Zi: B0cdi: goto i9hze;
CSt61: tMR8U: goto grCEB;
jlI1y: return self::ACTIVITY_ERROR_NOT_EXIST;
goto INKEr;
R6vZh: return self::ACTIVITY_ERROR_NOT_START;
goto JewZR;
DKgeA: if ($activity['status'] == -1) {
goto I7T2I;
}
goto uluA5;
Tkfl2: goto a0VxH;
goto CSt61;
L0KHS: TPWEa: goto R6vZh;
B3Kd1: if ($now < strtotime($activity['start_time'])) {
goto TPWEa;
}
goto qC2Xm;
rxPJR: SqLXb: goto SKF68;
u6dWh: I7T2I: goto FIgkO;
grCEB: return self::ACTIVITY_ERROR_ALREADY_END;
goto xmxKt;
SKF68: goto D90zH;
goto tAaef;
JewZR: f6uoG: goto Tkfl2;
qC2Xm: return null;
goto gy4DA;
KwI24: if ($activity['status'] == 0) {
goto GCJOw;
}
goto DKgeA;
tAaef: GCJOw: goto jlI1y;
F51jk: CaAYI: goto bHA3q;
bHA3q:
}
public function doMobileOrders() {
goto FuTQe;
EyM8Y: include $this->template('error');
goto OA1W2;
iEdSA: $user['user_id'] = pdo_insertid();
goto Lolp0;
Lolp0: Dey4B: goto Wsc5d;
qyFnY: $user['openid'] = $oauthuser['from_user'];
goto nlIDO;
lG3Vi: $oauthuser = $this->dhw_checkoauth();
goto c98Cz;
SsN2m: $user = pdo_get($this->TABLE_USER, array("openid" => $oauthuser['from_user'], "uniacid" => $_W['uniacid']));
goto Qopf3;
urcaf: if (!($res != null)) {
goto AabwV;
}
goto Ak0PR;
LuLkq: $user['nick'] = $oauthuser['nickname'];
goto sLky7;
KuJGW: $actId = $_GPC['activityId'];
goto eEKHw;
sLky7: $user['uniacid'] = $_W['uniacid'];
goto IdU5f;
P8a2O: foreach ($orders as &$order) {
goto HcvBf;
FzMnE: bYIW6: goto Coc3J;
Coc3J: $order['receive_type_name'] = '';
goto iGnd1;
Qjc_U: wo8Lz: goto fixSl;
aNbrS: BvrdE: goto wUvyz;
iGnd1: xrg1R: goto Qjc_U;
HcvBf: if ($order['receive_type'] == $this->RECEIVE_TYPE_PEISONG) {
goto bYIW6;
}
goto Wjz5G;
QNwHw: $order['receive_type_name'] = '';
goto aNbrS;
Wjz5G: if (!($order['receive_type'] == $this->RECEIVE_TYPE_ZITI)) {
goto BvrdE;
}
goto QNwHw;
wUvyz: goto xrg1R;
goto FzMnE;
fixSl:
}
goto A7s0c;
Szhpm: $_W['page']['title'] = '-';
goto lG3Vi;
L3zD5: include $this->template('orders');
goto VgQ1r;
a1Gzb: if (empty($actId)) {
goto TuM51;
}
goto lnqH6;
OA1W2: return;
goto EC1ci;
IdU5f: $user['create_time'] = date('Y-m-d H:i:s', time());
goto KjQge;
c98Cz: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto KuJGW;
riWLb: return message('', 'refresh', 'error');
goto flxuY;
hJpSh: aXGtv: goto BY6cb;
FuTQe: global $_W, $_GPC;
goto Szhpm;
flxuY: ROp02: goto SsN2m;
Qopf3: if ($user) {
goto Dey4B;
}
goto qyFnY;
BY6cb: E5jqw: goto EyM8Y;
Wsc5d: $orders = pdo_fetchall('select c.card_no,dh.mobile,dh.consignee,dh.addr,dh.product_name,dh.receive_type,dh.duihuan_id,dh.duihuan_time
from ' . tablename($this->TABLE_DUIHUAN) . ' dh
left join ' . tablename($this->TABLE_CARD) . ' c on c.card_id = dh.card_id
where dh.user_id = :user_id and dh.uniacid = :uniacid and dh.activity_id = :activity_id order by dh.create_time desc', array(":user_id" => $user['user_id'], ":uniacid" => $_W['uniacid'], ":activity_id" => $actId));
goto P8a2O;
A7s0c: eDlat: goto L3zD5;
XW4m6: $res = $this->checkValidDo($act);
goto urcaf;
nlIDO: $user['head_img'] = $oauthuser['avatar'];
goto LuLkq;
ucwy6: if (!(strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == false)) {
goto ROp02;
}
goto riWLb;
eEKHw: $act = null;
goto a1Gzb;
lnqH6: $act = CacheUtil::getActivity($actId);
goto b0YKT;
b0YKT: TuM51: goto XW4m6;
LvHgr: $_W['page']['title'] = $act['title2'];
goto ucwy6;
Ak0PR: switch ($res) {
case self::ACTIVITY_ERROR_NOT_START: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_START_STR;
goto E5jqw;
case self::ACTIVITY_ERROR_ALREADY_END: $rst['pageMsg'] = self::ACTIVITY_ERROR_ALREADY_END_STR;
goto E5jqw;
case self::ACTIVITY_ERROR_NOT_EXIST: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_EXIST_STR;
goto E5jqw;
default: goto E5jqw;
}
goto hJpSh;
KjQge: pdo_insert($this->TABLE_USER, $user);
goto iEdSA;
EC1ci: AabwV: goto LvHgr;
VgQ1r:
}
public function doWebActivityRule() {
}
function checkMobile($str) {
goto HRX3S;
utStm: YSV3F: goto rDQlB;
HRX3S: $pattern = '/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(14[0-9]{1}))+\d{8})$/';
goto aAe3p;
RIGb4: return false;
goto ylVJZ;
aAe3p: if (preg_match($pattern, $str)) {
goto qNM1j;
}
goto RIGb4;
ylVJZ: goto YSV3F;
goto zTMHm;
zTMHm: qNM1j: goto vt2Fw;
vt2Fw: return true;
goto utStm;
rDQlB:
}
function encryptCode($code) {
return sha1(md5($code) . sha1($code));
}
function getMillisecond() {
list($t1, $t2) = explode(' ', microtime());
return (double) sprintf('%.0f', (floatval($t1) + floatval($t2)) * 1000);
}
}
?>
Did this file decode correctly?
Original Code
<?php
goto uuVFX;
uuVFX: defined('IN_IA') or exit('Access Denied');
goto A8oY8;
A8oY8: require IA_ROOT . '/addons/dhw_duihuan/dhw/defines.php';
goto npXQp;
npXQp: require IA_ROOT . '/addons/dhw_duihuan/dhw/CacheUtil.class.php';
goto YDaSv;
YDaSv: class Dhw_duihuanModuleSite extends WeModuleSite {
const ACTIVITY_ERROR_NOT_EXIST = "NOT_EXIST";
const ACTIVITY_ERROR_NOT_EXIST_STR = "";
const ACTIVITY_ERROR_NOT_START = "NOT_START";
const ACTIVITY_ERROR_NOT_START_STR = "";
const ACTIVITY_ERROR_ALREADY_END = "ALREADY_END";
const ACTIVITY_ERROR_ALREADY_END_STR = "";
private $TABLE_DUIHUAN = "dhw_duihuan_duihuan";
private $TABLE_CARD = "dhw_duihuan_card";
private $TABLE_USER = "dhw_duihuan_user";
private $TABLE_PRODUCT = "dhw_duihuan_product";
private $TABLE_ZITI_ADDR = "dhw_duihuan_ziti_addr";
private $TABLE_ACTIVITY = "dhw_duihuan_activity";
private $TABLE_CONFIG = "dhw_duihuan_config";
private $TABLE_PAGE = "dhw_duihuan_page";
private $TABLE_NOTICE = "dhw_duihuan_notice";
private $TABLE_NOTICE_USER = "dhw_duihuan_notice_user";
private $STATUS_FROZEN = 0;
private $STATUS_INIT = 1;
private $STATUS_WAIT_SEND = 2;
private $STATUS_SENT = 3;
private $STATUS_CARD_FROZEN = 0;
private $STATUS_CARD_INIT = 1;
private $STATUS_CARD_ACTIVED = 10;
private $STATUS_CARD_USED = 20;
private $STATUS_NOTICE_START = 1;
private $STATUS_NOTICE_STOP = 2;
private $STATUS_NOTICE_DELETED = -1;
private $NOTICE_TYPE_CLIENT_NEW = 1;
private $NOTICE_TYPE_CLIENT_SENT = 2;
private $NOTICE_TYPE_SHOP_NEW = 3;
private $NOTICE_TYPE_CLIENT_NEW_NAME = "[]";
private $NOTICE_TYPE_CLIENT_SENT_NAME = "[]";
private $NOTICE_TYPE_SHOP_NEW_NAME = "[]";
private $STATUS_NOTICE_USER_WAIT_REVIEW = 0;
private $STATUS_NOTICE_USER_START = 1;
private $STATUS_NOTICE_USER_STOP = 2;
private $STATUS_NOTICE_USER_DELETED = -1;
private $KEYWORD_ELE_PRODUCT_NAME = "1";
private $KEYWORD_ELE_PRODUCT_NAME_NAME = "";
private $KEYWORD_ELE_CLIENT_ORDER_TIME = "2";
private $KEYWORD_ELE_CLIENT_ORDER_TIME_NAME = "";
private $KEYWORD_ELE_CARD_NO = "3";
private $KEYWORD_ELE_CARD_NO_NAME = "";
private $KEYWORD_ELE_ORDER_STATUS = "4";
private $KEYWORD_ELE_ORDER_STATUS_NAME = "";
private $KEYWORD_ELE_KUAIDI_NO = "5";
private $KEYWORD_ELE_KUAIDI_NO_NAME = "";
private $KEYWORD_ELE_KUAIDI_CORP = "6";
private $KEYWORD_ELE_KUAIDI_CORP_NAME = "";
private $KEYWORD_ELE_RECEIVE_INFO = "7";
private $KEYWORD_ELE_RECEIVE_INFO_NAME = ":";
private $RECEIVE_TYPE_PEISONG = "PEISONG";
private $RECEIVE_TYPE_ZITI = "ZITI";
private $encryKey = "8d2c4f84f2262d33";
private $KEFU_MOBILE = "15951701808";
private $UV_TYPE_UV = "uv";
private $UV_TYPE_SHARE_COUNT = "share_count";
public function doMobileDuihuan() {
goto UFVsB;
e08To: $_W['page']['title'] = $act['title1'];
goto XJPF2;
y8W9C: return;
goto MC7kt;
oWxiV: pdo_insert($this->TABLE_USER, $user);
goto HlX_s;
n311U: if (!(strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == false)) {
goto pSr6X;
}
goto IykXY;
Menjp: $user['uniacid'] = $_W['uniacid'];
goto BS5Jt;
ju4hc: $user['openid'] = $oauthuser['from_user'];
goto sIBSL;
UFVsB: global $_W, $_GPC;
goto Mvek6;
IykXY: return message('', 'refresh', 'error');
goto ikpgx;
NcYrU: if (!($res != null)) {
goto i7sQB;
}
goto lmRn2;
ceYnx: CacheUtil::recordUV($ip, $actId, $this->UV_TYPE_UV);
goto IFtIZ;
AGCuq: ljhsj: goto pXDtC;
BS5Jt: $user['create_time'] = date('Y-m-d H:i:s', time());
goto oWxiV;
ikpgx: pSr6X: goto eRN6X;
HlX_s: $user['user_id'] = pdo_insertid();
goto g7vcj;
Mvek6: CacheUtil::dhwlog('##doMobileDuihuan##');
goto xEsFZ;
behMk: if ($user) {
goto igqkw;
}
goto ju4hc;
eRN6X: $actId = $_GPC['actid'];
goto GRWJi;
pXDtC: include $this->template('error');
goto y8W9C;
XJPF2: pdo_query('update ' . tablename($this->TABLE_ACTIVITY) . ' set pv = pv +1 where activity_id = :activity_id', array(":activity_id" => $actId));
goto D3QO3;
GRWJi: $act = CacheUtil::getActivity($actId);
goto VDhht;
FlELa: $user['nick'] = $oauthuser['nickname'];
goto Menjp;
QagUx: see2c: goto AGCuq;
Vk0Bu: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto n311U;
IFtIZ: $user = pdo_get($this->TABLE_USER, array("openid" => $oauthuser['from_user'], "uniacid" => $_W['uniacid']));
goto behMk;
xEsFZ: $oauthuser = $this->dhw_checkoauth();
goto Vk0Bu;
lmRn2: switch ($res) {
case self::ACTIVITY_ERROR_NOT_START: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_START_STR;
goto ljhsj;
case self::ACTIVITY_ERROR_ALREADY_END: $rst['pageMsg'] = self::ACTIVITY_ERROR_ALREADY_END_STR;
goto ljhsj;
case self::ACTIVITY_ERROR_NOT_EXIST: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_EXIST_STR;
goto ljhsj;
default: goto ljhsj;
}
goto QagUx;
sIBSL: $user['head_img'] = $oauthuser['avatar'];
goto FlELa;
PZven: $zitiCf = CacheUtil::getZitiConfig($_W['uniacid']);
goto i0ao_;
D3QO3: $ip = $_W['clientip'];
goto ceYnx;
g7vcj: igqkw: goto PZven;
i0ao_: include $this->template('duihuan');
goto ubCB3;
MC7kt: i7sQB: goto e08To;
VDhht: $res = $this->checkValidDo($act);
goto NcYrU;
ubCB3:
}
public function doWebChangeZitiStatus() {
goto wh2Eb;
XXJq2: CacheUtil::removeZitiConfig($_W['uniacid']);
goto UTrlJ;
sFKnr: $status = $state == 'true' ? 1 : 0;
goto MOMqj;
hx9q2: $rst['msg'] = '';
goto TIigZ;
wh2Eb: global $_GPC, $_W;
goto mUcPc;
mUcPc: $state = $_GPC['state'];
goto sFKnr;
MOMqj: pdo_update($this->TABLE_CONFIG, array("ziti_status" => $status), array("uniacid" => $_W['uniacid']));
goto XXJq2;
TIigZ: return json_encode($rst);
goto mWgWj;
UTrlJ: $rst['success'] = true;
goto hx9q2;
mWgWj:
}
function sendTemplateMsg($duihuan, $noticeType) {
goto khTbr;
FCmt2: $notices = pdo_getall($this->TABLE_NOTICE, array("uniacid" => $_W['uniacid'], "activity_id" => $duihuan['activity_id'], "status" => $this->STATUS_NOTICE_START));
goto CLRM0;
n5I4q: return;
goto TxB_p;
hQLZ2: T1pZd: goto dVFuR;
bE2nn: CacheUtil::dhwlog('sendTemplateMsg.......');
goto FCmt2;
CLRM0: if ($notices) {
goto RfaAw;
}
goto kKov8;
AJEis: foreach ($notices as &$notice) {
goto oEwoE;
ZGzz0: S5dod: goto zE5Ef;
l8kRk: foreach ($targets as $target) {
goto F6oEU;
yMxd6: if ($u) {
goto cJd91;
}
goto fx1eJ;
FhEwL: rnfsU: goto Y3XZj;
DFyq6: cJd91: goto XWWfK;
fx1eJ: goto rnfsU;
goto DFyq6;
F6oEU: $u = pdo_get($this->TABLE_USER, array("user_id" => $target['user_id']));
goto yMxd6;
XWWfK: $sendStatus = $account_api->sendTplNotice($u['openid'], $notice['wx_template_id'], $data, '', $topcolor = '#32e345');
goto FhEwL;
Y3XZj:
}
goto zCSRo;
pPrCQ: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_SENT) {
goto VAJht;
}
goto F9JAK;
qaPqY: $k2 = array("value" => $this->parseTemplateEle($content['keyword2'], $duihuan), "color" => "#ff510");
goto Knw0X;
E6sVY: $k4 = array("value" => $this->parseTemplateEle($content['keyword4'], $duihuan), "color" => "#ff510");
goto NC_hQ;
lA41q: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_NEW) {
goto QUrJV;
}
goto pPrCQ;
NC_hQ: $data['keyword4'] = $k4;
goto bSOpE;
ZZsMV: if (empty($content['keyword4'])) {
goto QUOmo;
}
goto E6sVY;
nJZrg: $k1 = array("value" => $this->parseTemplateEle($content['keyword1'], $duihuan), "color" => "#ff510");
goto qZc7M;
NOT_R: m_iy1: goto HPJG9;
j1LEC: $sendStatus = $account_api->sendTplNotice($tempUser['openid'], $notice['wx_template_id'], $data, '', $topcolor = '#32e345');
goto Vlc2K;
TBJGp: QUrJV: goto Rt_qL;
tGgn2: $content = json_decode($contentJson, true);
goto wP75y;
GjdXl: $data['keyword3'] = $k3;
goto QkqZe;
uI2Rm: goto wbr3m;
goto Yf8Fb;
Yf8Fb: VAJht: goto fJE3i;
Rhc8H: PfUmy: goto uI2Rm;
Rt_qL: $tempUser = pdo_get($this->TABLE_USER, array("user_id" => $duihuan['user_id']));
goto KwkRK;
qZc7M: $data['keyword1'] = $k1;
goto dsP3M;
c2a3X: $targets = pdo_getall($this->TABLE_NOTICE_USER, array("notice_id" => $notice['id'], "status" => $this->STATUS_NOTICE_USER_START));
goto l8kRk;
F9JAK: if (!($notice['notice_type'] == $this->NOTICE_TYPE_SHOP_NEW)) {
goto PfUmy;
}
goto c2a3X;
ro8Tj: $contentJson = $notice['content_json'];
goto tGgn2;
oEwoE: if (!($noticeType == $notice['notice_type'])) {
goto G52HC;
}
goto ro8Tj;
Mv0Tq: goto m_iy1;
goto TBJGp;
Knw0X: $data['keyword2'] = $k2;
goto rFPwN;
Vlc2K: wbr3m: goto Mv0Tq;
fJE3i: $tempUser = pdo_get($this->TABLE_USER, array("user_id" => $duihuan['user_id']));
goto j1LEC;
Nj2mT: zn636: goto lA41q;
UU1c3: $remark = array("value" => $content['remark'], "color" => "#ff510");
goto l_OtA;
zCSRo: kNyuV: goto Rhc8H;
puRs5: $k5 = array("value" => $this->parseTemplateEle($content['keyword5'], $duihuan), "color" => "#ff510");
goto h1Asq;
vw6fi: if (empty($content['keyword2'])) {
goto BSxvq;
}
goto qaPqY;
wP75y: $first = array("value" => $content['first'], "color" => "#ff510");
goto UU1c3;
QkqZe: DEbbq: goto ZZsMV;
h1Asq: $data['keyword5'] = $k5;
goto Nj2mT;
l_OtA: $data['first'] = $first;
goto ju5b7;
bSOpE: QUOmo: goto nxiAf;
DvHbr: if (empty($content['keyword3'])) {
goto DEbbq;
}
goto m5dnm;
dsP3M: J3ZC1: goto vw6fi;
HPJG9: G52HC: goto ZGzz0;
m5dnm: $k3 = array("value" => $this->parseTemplateEle($content['keyword3'], $duihuan), "color" => "#ff510");
goto GjdXl;
ju5b7: $data['remark'] = $remark;
goto ZGQaC;
nxiAf: if (empty($content['keyword5'])) {
goto zn636;
}
goto puRs5;
ZGQaC: if (empty($content['keyword1'])) {
goto J3ZC1;
}
goto nJZrg;
rFPwN: BSxvq: goto DvHbr;
KwkRK: $sendStatus = $account_api->sendTplNotice($tempUser['openid'], $notice['wx_template_id'], $data, '', $topcolor = '#32e345');
goto NOT_R;
zE5Ef:
}
goto hQLZ2;
khTbr: global $_GPC, $_W;
goto bE2nn;
maL35: $account_api = WeAccount::create();
goto AJEis;
kKov8: CacheUtil::dhwlog('');
goto n5I4q;
TxB_p: RfaAw: goto maL35;
dVFuR:
}
function parseTemplateEle($ele_type, $duihuan) {
goto Qi1LU;
Qi1LU: switch ($ele_type) {
case $this->KEYWORD_ELE_RECEIVE_INFO: $addr = $duihuan['receive_type'] == $this->RECEIVE_TYPE_ZITI ? '[]' . $duihuan['addr'] : $duihuan['addr'];
return $duihuan['consignee'] . ',' . $duihuan['mobile'] . ',' . $addr;
case $this->KEYWORD_ELE_KUAIDI_CORP: return $duihuan['express_corp'];
case $this->KEYWORD_ELE_KUAIDI_NO: return $duihuan['express_no'];
case $this->KEYWORD_ELE_ORDER_STATUS: goto p3Ibm;
p3Ibm: switch ($duihuan['status']) {
case $this->STATUS_FROZEN: return '';
case $this->STATUS_INIT: return '';
case $this->STATUS_WAIT_SEND: return '';
case $this->STATUS_SENT: return '';
default: return '';
}
goto hXHNk;
hXHNk: ixpQh: goto k5JFK;
k5JFK: g9RRy: goto Y46n8;
Y46n8: case $this->KEYWORD_ELE_CARD_NO: $card = pdo_get($this->TABLE_CARD, array("card_id" => $duihuan['card_id']));
return $card['card_no'];
case $this->KEYWORD_ELE_CLIENT_ORDER_TIME: return $duihuan['duihuan_time'];
case $this->KEYWORD_ELE_PRODUCT_NAME: return $duihuan['product_name'];
}
goto uFFsJ;
Nhstn: fvWlO: goto pbJpy;
uFFsJ: Ov61h: goto Nhstn;
pbJpy:
}
function checkDuihuanRecord($userId, $actId) {
goto QXL7G;
QXL7G: global $_W, $_GPC;
goto jY2RN;
aQiky: if ($dh) {
goto H93Pf;
}
goto cUANe;
cUANe: return false;
goto FI94u;
FI94u: H93Pf: goto OoUFC;
jY2RN: $dh = pdo_fetch('select * from ' . tablename($this->TABLE_DUIHUAN) . ' where user_id = :userId and activity_id = :activity_id and `status` > 0', array(":userId" => $userId, ":activity_id" => $actId));
goto aQiky;
OoUFC: return true;
goto iYQxT;
iYQxT:
}
public function doMobileDoDuihuan() {
goto vp5oA;
OYF74: $duihuan['addr'] = $region . $addr;
goto hQoMH;
y1XRg: CacheUtil::dhwlog('region:' . $region);
goto KYPhj;
kvodx: if (!$duihuan) {
goto AHHDe;
}
goto IUFBd;
hWcvO: $duihuan['consignee'] = $name;
goto OYF74;
h62DP: aA1Cv: goto ylxIn;
gimoM: $duihuan['status'] = $this->STATUS_WAIT_SEND;
goto HOpaR;
bHtyG: $msg['msg'] = '';
goto a6n2G;
ogu7R: uHdrc: goto ZDCD5;
N4yzY: $duihuan['shipping_time'] = null;
goto d0hGi;
cbpll: if (!empty($region)) {
goto uHdrc;
}
goto waPUt;
M_gnV: $sql = 'select * from ims_dhw_duihuan_card c
left join ims_dhw_duihuan_product p on p.product_id = c.product_id
where c.card_no = :card_no and c.secret = :secret and p.activity_id = :activity_id';
goto BU1Lc;
kIQng: $msg['msg'] = '';
goto YE4JP;
hzgbT: $name = $_GPC['name'];
goto fMrSg;
bm535: if ($this->checkMobile($mobile)) {
goto aTDZz;
}
goto YsnN2;
hoeVR: if (!empty($code)) {
goto B77YB;
}
goto aiLF8;
CGaNZ: $duihuan['activity_id'] = $actId;
goto SYFO1;
m3nf2: $region = $_GPC['region'];
goto gEVuC;
mBVBI: return json_encode($msg);
goto Z2GAx;
hIMPt: $duihuan['product_id'] = $card['product_id'];
goto yIKvy;
jnc9n: yQ4Gy: goto TLM1j;
YqLwK: $msg['msg'] = '';
goto JUJqo;
p1gYj: return json_encode($msg);
goto BDhwh;
BU1Lc: $card = pdo_fetch($sql, array(":card_no" => $cardNo, ":secret" => $cryptCode, ":activity_id" => $actId));
goto unHBo;
t4w_B: Ye1t9: goto hoeVR;
SYFO1: $duihuan['card_id'] = $card['card_id'];
goto hIMPt;
gEVuC: $regionVal = $_GPC['regionVal'];
goto jPiZc;
kFsvz: goto J1ZxP;
goto j9zuJ;
bCaqh: $msg['success'] = false;
goto j15Z4;
n7_JI: $msg['success'] = false;
goto UQcjt;
aheCr: $code = strtoupper(trim($code));
goto oD38x;
IUFBd: $msg['success'] = false;
goto tTEV2;
nd3gr: DPMPT: goto ETTnR;
J03jy: $duihuan['uniacid'] = $_W['uniacid'];
goto DRqEl;
waPUt: $msg['success'] = false;
goto YqLwK;
OsAqR: pdo_insert($this->TABLE_DUIHUAN, $duihuan);
goto ni7RV;
d0hGi: $duihuan['express_no'] = '';
goto HQria;
wagkH: $duihuan['duihuan_time'] = date('Y-m-d H:i:s', time());
goto gimoM;
qAZeu: return json_encode($msg);
goto kFsvz;
MCkAd: B77YB: goto iOBCf;
cadvh: $msg['success'] = false;
goto iHgS8;
hGx3A: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_CLIENT_NEW);
goto Z6fPk;
iHgS8: $msg['msg'] = '';
goto ZKmpt;
yloLJ: $msg['msg'] = '';
goto mBVBI;
unHBo: if ($card) {
goto yQ4Gy;
}
goto fcT70;
iOBCf: $cardNo = trim($cardNo);
goto aheCr;
tTEV2: $msg['msg'] = '';
goto qAZeu;
yIKvy: $p = pdo_get($this->TABLE_PRODUCT, array("product_id" => $card['product_id']));
goto brzWe;
HOpaR: $duihuan['create_time'] = date('Y-m-d H:i:s', time());
goto OsAqR;
d7v4e: $c['used_time'] = date('Y-m-d H:i:s', time());
goto gsyCR;
NCXm6: $duihuan['shipping_status'] = 0;
goto N4yzY;
YsnN2: $msg['success'] = false;
goto sSkYW;
t1sCV: $msg['success'] = false;
goto bHtyG;
ka31J: $cardNo = $_GPC['cardNo'];
goto jwYDF;
j9zuJ: AHHDe: goto J03jy;
C8gH6: Mw6ZO: goto wzyuf;
ni7RV: $duihuanId = pdo_insertid();
goto Aihb6;
CHWnh: return json_encode($msg);
goto h62DP;
ASZCx: $msg['msg'] = '';
goto ICgWq;
DRqEl: $duihuan['user_id'] = $userId;
goto CGaNZ;
gsyCR: $c['used_user_id'] = $userId;
goto EXBGI;
hQoMH: $duihuan['mobile'] = $mobile;
goto NCXm6;
sSkYW: $msg['msg'] = '';
goto p1gYj;
oD38x: if (!empty($name)) {
goto xHzDI;
}
goto t1sCV;
Z2GAx: J1ZxP: goto v6Z1I;
Aihb6: $duihuan['duihuan_id'] = $duihuanId;
goto IuB3R;
UQcjt: $msg['msg'] = '';
goto clmYt;
HQria: $duihuan['express_corp'] = '';
goto wagkH;
OrZD0: $duihuan['receive_type'] = $this->RECEIVE_TYPE_PEISONG;
goto hWcvO;
a2yOl: $msg['msg'] = '';
goto qDHfr;
fcT70: $msg['success'] = false;
goto BTGGh;
qDHfr: return json_encode($msg);
goto MCkAd;
mMte9: $actId = $_GPC['actid'];
goto y1XRg;
fMrSg: $mobile = $_GPC['mobile'];
goto m3nf2;
HFPtI: if (!empty($cardNo)) {
goto Ye1t9;
}
goto gum3y;
j15Z4: $msg['msg'] = '';
goto CHWnh;
ETTnR: $duihuan = pdo_get($this->TABLE_DUIHUAN, array("card_id" => $card['card_id']));
goto kvodx;
idBoN: $msg['success'] = true;
goto yloLJ;
w5Hx3: $c['card_status'] = $this->STATUS_CARD_USED;
goto d7v4e;
TLM1j: if (!($card['card_status'] == $this->STATUS_CARD_USED)) {
goto Mw6ZO;
}
goto cadvh;
jwYDF: $code = $_GPC['code'];
goto hzgbT;
HgfQl: return json_encode($msg);
goto jnc9n;
clmYt: return json_encode($msg);
goto HGfHK;
jPiZc: $addr = $_GPC['addr'];
goto um3oM;
vp5oA: global $_W, $_GPC;
goto lVU_z;
brzWe: $duihuan['product_name'] = $p['product_name'];
goto OrZD0;
wzyuf: if (!($card['card_status'] == $this->STATUS_CARD_INIT)) {
goto aA1Cv;
}
goto bCaqh;
FYwxw: xHzDI: goto cbpll;
ZDCD5: if (!empty($addr)) {
goto UxA_n;
}
goto n7_JI;
aiLF8: $msg['success'] = false;
goto a2yOl;
VSmlt: $msg['success'] = false;
goto kIQng;
JUJqo: return json_encode($msg);
goto ogu7R;
IuB3R: $msg['duihuan_id'] = $duihuanId;
goto w5Hx3;
um3oM: $userId = $_GPC['userId'];
goto mMte9;
a6n2G: return json_encode($msg);
goto FYwxw;
ICgWq: return json_encode($msg);
goto t4w_B;
Z6fPk: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_SHOP_NEW);
goto idBoN;
lVU_z: CacheUtil::dhwlog('##doMobileDoDuihuan##');
goto ka31J;
YE4JP: return json_encode($msg);
goto nd3gr;
KYPhj: $region = str_replace(',', '', $region);
goto HFPtI;
HGfHK: UxA_n: goto bm535;
BTGGh: $msg['msg'] = '';
goto HgfQl;
ZKmpt: return json_encode($msg);
goto C8gH6;
gum3y: $msg['success'] = false;
goto ASZCx;
fjBAk: $cryptCode = $this->encryptCode($code . $cardNo . $this->encryKey);
goto M_gnV;
BDhwh: aTDZz: goto fjBAk;
ylxIn: if (!($card['card_status'] == $this->STATUS_CARD_FROZEN)) {
goto DPMPT;
}
goto VSmlt;
EXBGI: pdo_update($this->TABLE_CARD, $c, array("card_id" => $card['card_id']));
goto hGx3A;
v6Z1I:
}
public function doMobileDoDuihuanZiti() {
goto DKv_k;
tw21S: WPeSP: goto k2JD3;
F4mjT: return json_encode($msg);
goto PgS9I;
UwP3K: $msg['msg'] = '';
goto Px8YX;
boczF: if (!empty($name)) {
goto ykZcW;
}
goto xWjVu;
SdbG4: $addrId = $_GPC['addr'];
goto F5Mk9;
f21LJ: $card = pdo_fetch($sql, array(":card_no" => $cardNo, ":secret" => $cryptCode, ":activity_id" => $actId));
goto UYMjW;
QvtXy: $c['used_user_id'] = $userId;
goto Lj3kZ;
cIfOc: $code = strtoupper(trim($code));
goto boczF;
TAnSP: $msg['success'] = false;
goto kCv9s;
hBmC1: ykZcW: goto gBeBo;
A9ZG7: $duihuan = pdo_get($this->TABLE_DUIHUAN, array("card_id" => $card['card_id']));
goto bzXoa;
BCWR0: $duihuan['uniacid'] = $_W['uniacid'];
goto qibhV;
CrG9a: $msg['success'] = false;
goto QvenA;
DZ3s1: $duihuan['consignee'] = $name;
goto zMwAB;
fpPaF: $duihuan['duihuan_id'] = $duihuanId;
goto NEHGL;
YCiHH: return json_encode($msg);
goto vn8GW;
Vjgxv: $msg['success'] = false;
goto sHKJe;
jjUP3: $msg['duihuan_id'] = $duihuanId;
goto fpPaF;
G7a1c: return json_encode($msg);
goto pnLMb;
DKv_k: global $_W, $_GPC;
goto Dvo9D;
kCv9s: $msg['msg'] = '';
goto tmT9z;
cJ43Y: $msg['success'] = false;
goto EBv_W;
PgS9I: aw31X: goto A9ZG7;
zdcYb: $duihuan['product_name'] = $p['product_name'];
goto mQBR9;
H2sRF: eSp6p: goto IkP7t;
pUfFU: $msg['msg'] = '';
goto os2hT;
Px8YX: return json_encode($msg);
goto hBmC1;
H5gvG: $msg['msg'] = '';
goto ImLNc;
Ep50u: FjlTt: goto oBlew;
z43v1: $msg['success'] = false;
goto H5gvG;
QvkRZ: if (!($card['card_status'] == $this->STATUS_CARD_FROZEN)) {
goto aw31X;
}
goto CrG9a;
NEHGL: $c['card_status'] = $this->STATUS_CARD_USED;
goto Nxru3;
YvvdX: awOl6: goto eoUhe;
ajQcO: return json_encode($msg);
goto H2sRF;
Q3TGb: if (!($card['card_status'] == $this->STATUS_CARD_USED)) {
goto hOqMG;
}
goto Nbohg;
pL8R7: $msg['success'] = true;
goto rKs86;
S9tYq: $msg['msg'] = '';
goto lyhIy;
YC2LH: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_CLIENT_NEW);
goto V8uJ3;
CnF87: if (!empty($cardNo)) {
goto awOl6;
}
goto cJ43Y;
Ac21r: $duihuan['shipping_time'] = null;
goto frSlb;
mQBR9: $duihuan['receive_type'] = $this->RECEIVE_TYPE_ZITI;
goto tN10r;
EBv_W: $msg['msg'] = '';
goto mzdNG;
j5AhA: $duihuan['card_id'] = $card['card_id'];
goto svmoJ;
VgYuN: $name = $_GPC['name'];
goto Sp5hh;
k2JD3: $cardNo = trim($cardNo);
goto cIfOc;
TK37I: $duihuan['status'] = $this->STATUS_WAIT_SEND;
goto UvvzP;
lcO2S: $sql = 'select * from ims_dhw_duihuan_card c
left join ims_dhw_duihuan_product p on p.product_id = c.product_id
where c.card_no = :card_no and c.secret = :secret and p.activity_id = :activity_id';
goto f21LJ;
VJm2I: $duihuan['shipping_status'] = 0;
goto Ac21r;
ThCVc: $duihuan['express_corp'] = '';
goto fo0yt;
Nbohg: $msg['success'] = false;
goto S9tYq;
svmoJ: $duihuan['product_id'] = $card['product_id'];
goto GsLxm;
sVmyS: $msg['success'] = false;
goto IVeRA;
sHKJe: $msg['msg'] = '';
goto VV1J6;
Nxru3: $c['used_time'] = date('Y-m-d H:i:s', time());
goto QvtXy;
IVeRA: $msg['msg'] = '';
goto G7a1c;
rapza: $duihuanId = pdo_insertid();
goto jjUP3;
Sp5hh: $mobile = $_GPC['mobile'];
goto SdbG4;
os2hT: return json_encode($msg);
goto faK20;
vn8GW: iEj3y: goto Tf2NQ;
ImLNc: return json_encode($msg);
goto xZeSE;
zMwAB: $ziti = pdo_get($this->TABLE_ZITI_ADDR, array("addr_id" => $addrId));
goto p7xw6;
ynMpp: if (!($card['card_status'] == $this->STATUS_CARD_INIT)) {
goto sksP5;
}
goto z43v1;
UvvzP: $duihuan['create_time'] = date('Y-m-d H:i:s', time());
goto JBtjE;
xpvO5: $msg['success'] = false;
goto pUfFU;
gBeBo: if (!(empty($addrId) || $addrId == 0)) {
goto FjlTt;
}
goto Vjgxv;
sI_WB: $code = $_GPC['code'];
goto VgYuN;
rKs86: $msg['msg'] = '';
goto YCiHH;
p7xw6: $duihuan['addr'] = $ziti['addr'];
goto Qdepy;
oBlew: if ($this->checkMobile($mobile)) {
goto eSp6p;
}
goto BbmbW;
VV1J6: return json_encode($msg);
goto Ep50u;
tNwRV: $msg['msg'] = '';
goto ajQcO;
qibhV: $duihuan['user_id'] = $userId;
goto Y5kii;
fo0yt: $duihuan['duihuan_time'] = date('Y-m-d H:i:s', time());
goto TK37I;
BbmbW: $msg['success'] = false;
goto tNwRV;
Qdepy: $duihuan['mobile'] = $mobile;
goto VJm2I;
GsLxm: $p = pdo_get($this->TABLE_PRODUCT, array("product_id" => $card['product_id']));
goto zdcYb;
faK20: D9CQu: goto Q3TGb;
VeiZH: hOqMG: goto ynMpp;
tmT9z: return json_encode($msg);
goto tw21S;
Dvo9D: CacheUtil::dhwlog('##doMobileDoDuihuanZiti##');
goto p82ue;
pnLMb: goto iEj3y;
goto mamar;
tN10r: $duihuan['ziti_addr_id'] = $addrId;
goto DZ3s1;
bzXoa: if (!$duihuan) {
goto Mx5nM;
}
goto sVmyS;
p82ue: $cardNo = $_GPC['cardNo'];
goto sI_WB;
mzdNG: return json_encode($msg);
goto YvvdX;
QvenA: $msg['msg'] = '';
goto F4mjT;
xZeSE: sksP5: goto QvkRZ;
lyhIy: return json_encode($msg);
goto VeiZH;
xWjVu: $msg['success'] = false;
goto UwP3K;
UoiLL: $actId = $_GPC['actid'];
goto CnF87;
V8uJ3: $this->sendTemplateMsg($duihuan, $this->NOTICE_TYPE_SHOP_NEW);
goto pL8R7;
F5Mk9: $userId = $_GPC['userId'];
goto UoiLL;
frSlb: $duihuan['express_no'] = '';
goto ThCVc;
UYMjW: if ($card) {
goto D9CQu;
}
goto xpvO5;
eoUhe: if (!empty($code)) {
goto WPeSP;
}
goto TAnSP;
IkP7t: $cryptCode = $this->encryptCode($code . $cardNo . $this->encryKey);
goto lcO2S;
JBtjE: pdo_insert($this->TABLE_DUIHUAN, $duihuan);
goto rapza;
Y5kii: $duihuan['activity_id'] = $actId;
goto j5AhA;
Lj3kZ: pdo_update($this->TABLE_CARD, $c, array("card_id" => $card['card_id']));
goto YC2LH;
mamar: Mx5nM: goto BCWR0;
Tf2NQ:
}
public function doMobileGetProductName() {
goto kQKeH;
m3ctF: F3xum: goto eslrW;
QLatQ: JV5oD: goto jcBIM;
L31cz: $rst['msg'] = $product['product_name'];
goto Wlz0t;
naUWG: if (empty($cardNo)) {
goto d9AwW;
}
goto iEjhP;
vKL5r: $rst = null;
goto naUWG;
fvnbv: $cardNo = $_GPC['no'];
goto IFTG2;
HkXr_: if (!$product) {
goto JV5oD;
}
goto aYDnI;
kiC4a: $rst['msg'] = '';
goto m3ctF;
VIuLv: goto F3xum;
goto XbLzh;
iEjhP: $product = pdo_fetch('select product.* from ' . tablename($this->TABLE_CARD) . ' card
left join ' . tablename($this->TABLE_PRODUCT) . ' product on product.product_id = card.product_id
where card.card_no = :card_no and product.activity_id = :activity_id', array(":card_no" => $cardNo, ":activity_id" => $actId));
goto HkXr_;
XbLzh: d9AwW: goto Z7QRs;
eslrW: return json_encode($rst);
goto bdsAt;
yECri: $rst['msg'] = '';
goto Gv1lR;
Wlz0t: goto kCYtn;
goto QLatQ;
jcBIM: $rst['success'] = false;
goto yECri;
Gv1lR: kCYtn: goto VIuLv;
IFTG2: $actId = $_GPC['activityId'];
goto vKL5r;
aYDnI: $rst['success'] = true;
goto L31cz;
kQKeH: global $_W, $_GPC;
goto fvnbv;
Z7QRs: $rst['success'] = false;
goto kiC4a;
bdsAt:
}
public function doMobileListZitiAddr() {
goto DAUvt;
l_5IK: $addrs = pdo_getall($this->TABLE_ZITI_ADDR, array("uniacid" => $_W['uniacid'], "status" => 1));
goto DAmZq;
Byo9f: return json_encode($rst);
goto Jxq1w;
n5Nef: $rst['addrs'] = $addrs;
goto ANdlb;
DAUvt: global $_W, $_GPC;
goto l_5IK;
F1hxO: goto I2bX5;
goto mg93w;
AfTAh: $rst['msg'] = '';
goto Byo9f;
JbZie: $rst['success'] = true;
goto n5Nef;
ANdlb: return json_encode($rst);
goto F1hxO;
YrWF9: $rst['success'] = false;
goto AfTAh;
DAmZq: if (!$addrs) {
goto ixJqS;
}
goto JbZie;
Jxq1w: I2bX5: goto LciE8;
mg93w: ixJqS: goto YrWF9;
LciE8:
}
public function doMobileOrderDetail() {
goto LfRel;
qWTxw: if (!($res != null)) {
goto ERpRn;
}
goto HPYg9;
dOQ3e: include $this->template('error');
goto p2i4P;
iFTh2: CacheUtil::dhwlog('duihuan' . json_encode($duihuan) . '\\n' . $duihuanId);
goto UKA7A;
UKA7A: if (!$duihuan) {
goto bRVlU;
}
goto eoWSa;
P3kab: brQph: goto PlGOS;
JihWs: if (empty($actId)) {
goto brQph;
}
goto TRPST;
NeSHJ: $actId = $_GPC['activityId'];
goto XBb3H;
bCqn0: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto NeSHJ;
eoWSa: if (!($duihuan['receive_type'] == $this->RECEIVE_TYPE_ZITI)) {
goto Ysyix;
}
goto S3TX6;
cRma4: $duihuanId = $_GPC['duihuan_id'];
goto E_X1D;
p2i4P: return;
goto l6Tyv;
PlGOS: $res = $this->checkValidDo($act);
goto qWTxw;
nwe8_: include $this->template('orderDetail');
goto cIALz;
LQurx: goto T2kWZ;
goto WGBIe;
utLLH: Ysyix: goto QOiMs;
LfRel: global $_W, $_GPC;
goto bCqn0;
QOiMs: if (!($duihuan['receive_type'] == $this->RECEIVE_TYPE_PEISONG)) {
goto nCuNj;
}
goto BxUcV;
E_X1D: $duihuan = pdo_fetch('select dh.product_name,dh.create_time,dh.shipping_status,dh.express_corp,dh.express_no,dh.receive_type,c.card_no,dh.addr
from ' . tablename($this->TABLE_DUIHUAN) . ' dh
left join ' . tablename($this->TABLE_CARD) . ' c on c.card_id = dh.card_id
where dh.duihuan_id = :duihuan_id', array(":duihuan_id" => $duihuanId));
goto iFTh2;
VAccS: nCuNj: goto LQurx;
XBb3H: $act = null;
goto JihWs;
WGBIe: bRVlU: goto vvFoq;
TRPST: $act = CacheUtil::getActivity($actId);
goto P3kab;
vvFoq: T2kWZ: goto nwe8_;
HT0gG: $_W['page']['title'] = $act['title3'];
goto cRma4;
HPYg9: switch ($res) {
case self::ACTIVITY_ERROR_NOT_START: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_START_STR;
goto tbJOE;
case self::ACTIVITY_ERROR_ALREADY_END: $rst['pageMsg'] = self::ACTIVITY_ERROR_ALREADY_END_STR;
goto tbJOE;
case self::ACTIVITY_ERROR_NOT_EXIST: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_EXIST_STR;
goto tbJOE;
default: goto tbJOE;
}
goto fHnuY;
BxUcV: $duihuan['receive_type_name'] = '';
goto VAccS;
S3TX6: $duihuan['receive_type_name'] = '';
goto utLLH;
hfFks: tbJOE: goto dOQ3e;
l6Tyv: ERpRn: goto HT0gG;
fHnuY: B4Y86: goto hfFks;
cIALz:
}
public function doMobileSendVerification() {
goto yynsh;
k9lay: echo json_encode($rst);
goto RRSyY;
GZkBM: $rst['msg'] = '';
goto soiMr;
hU2jy: $mobile = $_GPC['mobile'];
goto RWHgy;
JFB4R: $rst['msg'] = '';
goto k9lay;
Vo57n: if ($result['success']) {
goto gpJPY;
}
goto bWe9c;
XW7el: gpJPY: goto FLIU7;
xLVuF: $result = CacheUtil::sendVerification($_W['uniacid'], $mobile);
goto Vo57n;
soiMr: echo json_encode($rst);
goto dbJ2x;
RRSyY: return;
goto Ippog;
yynsh: global $_W, $_GPC;
goto hU2jy;
Dk5ra: $rst['success'] = false;
goto JFB4R;
Ny13Y: echo json_encode($rst);
goto ipN21;
bWe9c: $rst['success'] = false;
goto FV97s;
ipN21: goto Jwcec;
goto XW7el;
FV97s: $rst['msg'] = ':' . $result['msg'];
goto Ny13Y;
FLIU7: $rst['success'] = true;
goto GZkBM;
Ippog: rmyxM: goto xLVuF;
dbJ2x: Jwcec: goto fGZKE;
RWHgy: if (!($mobile == null || $mobile == '')) {
goto rmyxM;
}
goto Dk5ra;
fGZKE:
}
public function doWebDuihuanMng() {
goto LZ7pV;
LZ7pV: global $_W, $_GPC;
goto bijQu;
iMsif: $sql = $sql . ' and dh.shipping_status = :shipping_status';
goto ux5aA;
f3Tzb: $records = pdo_fetchall($sql, $params);
goto bUibU;
yE2qY: Nu_MQ: goto cjeio;
JCte2: ClhEN: goto f3Tzb;
xHeWQ: $params[':uniacid'] = $_W['uniacid'];
goto A9llk;
hGX0l: $receiveMobile = $_GPC['receiveMobile'];
goto AltMg;
KMgbc: goto v3Ev0;
goto oKDXB;
dOCOY: SzzgP: goto hlITR;
bijQu: $statusArr = array($this->STATUS_INIT, $this->STATUS_WAIT_SEND, $this->STATUS_SENT);
goto XtUxw;
cdsJB: $activityId = $_GPC['activityId'];
goto P39u0;
IH29S: $sql = $sql . ' and act.activity_id = :activity_id';
goto qQ7sv;
rWsOP: $sql = $sql . ' and dh.consignee like :consignee';
goto vVWJG;
bUibU: $acts = pdo_getall($this->TABLE_ACTIVITY, array("uniacid" => $_W['uniacid']));
goto mwEkr;
s16Ov: if (!(!empty($activityId) && $activityId != -1)) {
goto ClhEN;
}
goto IH29S;
SIEV9: $params[':product_name'] = $productName;
goto WXh3a;
UQEFX: if (!($shipStatus != null && $shipStatus != -1)) {
goto zofQG;
}
goto iMsif;
Q_FWx: v3Ev0: goto JLdfM;
zlKxO: awt2L: goto KMgbc;
A9llk: if (empty($cardNo)) {
goto Nu_MQ;
}
goto xmhDQ;
xmhDQ: $sql = $sql . ' and card.card_no = :card_no';
goto aMMy_;
vVWJG: $params[':consignee'] = '%' . $receiveName . '%';
goto dOCOY;
WXh3a: KEo5D: goto aIqmX;
ux5aA: $params[':shipping_status'] = $shipStatus;
goto G7uC5;
JLdfM: include $this->template('duihuanMng');
goto QBm3S;
duUwE: $sql = 'select dh.receive_type as receive_type, dh.duihuan_id as duihuan_id,card.card_no as card_no, dh.product_name as product_name,dh.consignee as consignee,dh.addr as addr,dh.duihuan_time as duihuan_time,dh.`status` as status,dh.mobile,dh.shipping_status,dh.shipping_time
from ' . tablename($this->TABLE_DUIHUAN) . ' dh
left join ' . tablename($this->TABLE_CARD) . ' card on card.card_id = dh.card_id
left join ' . tablename($this->TABLE_ACTIVITY) . ' act on act.activity_id = dh.activity_id
where dh.uniacid = :uniacid and dh.status in (' . implode(',', $statusArr) . ')';
goto xHeWQ;
XU5xA: $params[':mobile'] = '%' . $receiveMobile . '%';
goto FZtO8;
XtUxw: $cardNo = $_GPC['cardNo'];
goto jCH2I;
mwEkr: if (!$records) {
goto ROXQp;
}
goto cKqcR;
hlITR: if (empty($receiveMobile)) {
goto BnCW0;
}
goto EAi2_;
FZtO8: BnCW0: goto UQEFX;
G7uC5: zofQG: goto s16Ov;
aIqmX: if (empty($receiveName)) {
goto SzzgP;
}
goto rWsOP;
AltMg: $shipStatus = $_GPC['shipStatus'];
goto cdsJB;
n4YYa: $sql = $sql . ' and dh.product_name = :product_name';
goto SIEV9;
qQ7sv: $params[':activity_id'] = $activityId;
goto JCte2;
oKDXB: ROXQp: goto Q_FWx;
jCH2I: $productName = $_GPC['productName'];
goto VqgXK;
cjeio: if (empty($productName)) {
goto KEo5D;
}
goto n4YYa;
P39u0: CacheUtil::dhwlog('shipStatus' . $shipStatus);
goto duUwE;
VqgXK: $receiveName = $_GPC['receiveName'];
goto hGX0l;
cKqcR: foreach ($records as &$record) {
goto gbUkc;
hxxf7: Oj6RM: goto Tj3jb;
gbUkc: switch ($record['status']) {
case $this->STATUS_FROZEN: $record['status_name'] = '';
goto SNyU4;
case $this->STATUS_INIT: $record['status_name'] = '';
goto SNyU4;
case $this->STATUS_WAIT_SEND: $record['status_name'] = '';
goto SNyU4;
case $this->STATUS_SENT: $record['status_name'] = '';
goto SNyU4;
default: goto SNyU4;
}
goto oYbcg;
sOtV9: g0vEb: goto Xr3NI;
Pb23k: switch ($record['receive_type']) {
case $this->RECEIVE_TYPE_PEISONG: $record['receive_type_name'] = '';
goto iTzuq;
case $this->RECEIVE_TYPE_ZITI: $record['receive_type_name'] = '';
goto iTzuq;
default: goto iTzuq;
}
goto sOtV9;
Xr3NI: iTzuq: goto hxxf7;
ucBxS: SNyU4: goto Pb23k;
oYbcg: BXhyu: goto ucBxS;
Tj3jb:
}
goto zlKxO;
EAi2_: $sql = $sql . ' and dh.mobile like :mobile';
goto XU5xA;
aMMy_: $params[':card_no'] = $cardNo;
goto yE2qY;
QBm3S:
}
public function doWebDoSend() {
goto nVfIw;
KQkOT: dPm7V: goto Nyuv4;
Pjqzq: goto dPm7V;
goto J8TAL;
EDy9C: $param['shipping_time'] = date('Y-m-d H:i:s');
goto rs09v;
b1Fd9: if (!($result == 1)) {
goto TBVqw;
}
goto AK0R9;
S9Wxc: $rst['msg'] = '\\n';
goto IuTxR;
WwDdL: $param['shipping_status'] = 1;
goto Y6UjJ;
yZfpz: if (!$record) {
goto Bn9NN;
}
goto yXuyu;
o97x4: $this->sendTemplateMsg($record, $this->NOTICE_TYPE_CLIENT_SENT);
goto jrwj4;
OzOgo: $record = pdo_get($this->TABLE_DUIHUAN, array("duihuan_id" => $duihuanId));
goto yZfpz;
oGR6G: $rst['success'] = false;
goto S9Wxc;
uZJTQ: TBVqw: goto Pjqzq;
IuTxR: return json_encode($rst);
goto KQkOT;
yyrdh: $rst['msg'] = '';
goto f91Sa;
On7q6: $expressName = $_GPC['expressName'];
goto OzOgo;
nVfIw: global $_W, $_GPC;
goto jHdNJ;
GRjxr: $record['express_corp'] = $expressName;
goto o97x4;
J8TAL: Bn9NN: goto oGR6G;
jHdNJ: $duihuanId = $_GPC['duihuanId'];
goto XULI0;
rs09v: $result = pdo_update($this->TABLE_DUIHUAN, $param, array("duihuan_id" => $duihuanId));
goto b1Fd9;
Vh6Yg: $param['receive_type'] = $this->RECEIVE_TYPE_PEISONG;
goto EDy9C;
yvUm3: $param['express_corp'] = $expressName;
goto WwDdL;
f91Sa: return json_encode($rst);
goto uZJTQ;
XULI0: $expressNo = $_GPC['expressNo'];
goto On7q6;
yXuyu: $param['express_no'] = $expressNo;
goto yvUm3;
Y6UjJ: $param['status'] = $this->STATUS_SENT;
goto Vh6Yg;
jrwj4: $rst['success'] = true;
goto yyrdh;
AK0R9: $record['express_no'] = $expressNo;
goto GRjxr;
Nyuv4:
}
public function doWebDoZiti() {
goto rPjfF;
jjbo1: rYvR1: goto SgF6A;
Ugn_I: $rst['msg'] = '';
goto NhH5T;
ZJO_j: $rst['success'] = false;
goto KNbIk;
nSMd8: $duihuanId = $_GPC['duihuanId'];
goto mtNlS;
pS6l3: $param['receive_type'] = $this->RECEIVE_TYPE_ZITI;
goto PiDra;
gAYtd: return json_encode($rst);
goto jjbo1;
eEp_7: if (!$record) {
goto f5an3;
}
goto Bhy7z;
NhH5T: return json_encode($rst);
goto kZTkv;
mtNlS: $record = pdo_get($this->TABLE_DUIHUAN, array("duihuan_id" => $duihuanId));
goto eEp_7;
nW9Sb: $rst['success'] = true;
goto Ugn_I;
Bhy7z: $param['shipping_status'] = 1;
goto d69de;
KNbIk: $rst['msg'] = '\\n';
goto gAYtd;
nQ6jF: if (!($result == 1)) {
goto MYlLH;
}
goto nW9Sb;
Us10s: goto rYvR1;
goto fa8vM;
t5Cww: $param['shipping_time'] = date('Y-m-d H:i:s');
goto pS6l3;
d69de: $param['status'] = $this->STATUS_SENT;
goto t5Cww;
fa8vM: f5an3: goto ZJO_j;
rPjfF: global $_W, $_GPC;
goto nSMd8;
kZTkv: MYlLH: goto Us10s;
PiDra: $result = pdo_update($this->TABLE_DUIHUAN, $param, array("duihuan_id" => $duihuanId));
goto nQ6jF;
SgF6A:
}
public function doWebProductMng() {
goto tazXu;
WKFaT: $filename = 'card' . $_W['uniacid'] . '.txt';
goto IDqg5;
nRXoq: include $this->template('productMng');
goto u9FSM;
WsP8F: foreach ($records as &$record) {
goto Gto5n;
YHG2X: $record['qty'] = $rst['qty'];
goto mfEg0;
wqrJs: if (!$rst) {
goto VkQtz;
}
goto YHG2X;
hV6j5: yXopf: goto AospH;
iGCju: $rst = pdo_fetch('select count(card_id) as qty from ' . tablename($this->TABLE_CARD) . ' where product_id = :product_id and uniacid = :uniacid', array(":product_id" => $record['product_id'], ":uniacid" => $_W['uniacid']));
goto wqrJs;
Gto5n: switch ($record['status']) {
case 1: $record['status_name'] = '';
goto klDHM;
case 0: $record['status_name'] = '';
goto klDHM;
default: goto klDHM;
}
goto hV6j5;
yJD9N: Ir9tZ: goto eP2aV;
G_xR5: VkQtz: goto UmN4x;
AospH: klDHM: goto iGCju;
mfEg0: goto qE9Dd;
goto G_xR5;
V4P9N: qE9Dd: goto yJD9N;
UmN4x: $record['qty'] = 0;
goto V4P9N;
eP2aV:
}
goto E1BYz;
OKcCc: $records = pdo_fetchall($sql, array(":status" => 1, ":uniacid" => $_W['uniacid']));
goto kxCOL;
XOgIq: $templateDownUrl = tomedia(DHW_DUIHUAN_ROOT . 'pay/file/' . 'template.txt');
goto jCxTC;
E1BYz: LOXb3: goto nRXoq;
IDqg5: $txtDownUrl = tomedia(DHW_DUIHUAN_ROOT . 'pay/card/' . $filename);
goto XOgIq;
jCxTC: $sql = 'select p.*,a.activity_name from ims_dhw_duihuan_product p
left join ims_dhw_duihuan_activity a on a.activity_id = p.activity_id
where p.uniacid=:uniacid and p.status = :status and p.uniacid = :uniacid';
goto OKcCc;
FsLzq: CacheUtil::dhwlog('###doWebProductMng###');
goto WKFaT;
kxCOL: $acts = pdo_getall($this->TABLE_ACTIVITY, array("status" => 1, "uniacid" => $_W['uniacid']));
goto WsP8F;
tazXu: global $_W, $_GPC;
goto FsLzq;
u9FSM:
}
public function doWebDoCardUpload() {
goto R0YjO;
lLKW2: goto fIVHx;
goto E06_I;
ZfKmH: $card['product_id'] = $pid;
goto IPFg_;
La9MI: $name = $upfile['name'];
goto hD69v;
bVbE4: T6EIR: goto UJcTC;
E1uL9: fIVHx: goto Fv0wU;
rOuSA: $card['is_active'] = 0;
goto rclym;
NqR5X: $card['used_user_id'] = 0;
goto WOFns;
eJk7m: message('txt', $this->createWebUrl('productMng'), $type = 'error');
goto n0dFp;
eMpn8: IQ6xB: goto CLeUR;
R0YjO: global $_W, $_GPC;
goto ETCoD;
IFb_E: if (feof($handle)) {
goto ENHid;
}
goto jHZ68;
f1RXj: if (!empty($line)) {
goto uCskA;
}
goto e_FWr;
Fv0wU: AyoeV: goto a3YiE;
E06_I: U4yOw: goto jVbYy;
OHctR: switch ($type) {
case 'text/plain': $okType = true;
goto IQ6xB;
}
goto zJpVi;
jVbYy: CacheUtil::dhwlog(" {$create_path} ");
goto E1uL9;
G2nUk: $size = $upfile['size'];
goto KSDjK;
eFMrB: if ($res) {
goto U4yOw;
}
goto ZlSQ0;
Ilo49: if (is_dir($create_path)) {
goto AyoeV;
}
goto gHIV1;
hVfl9: goto wGAhl;
goto v6Hwa;
fFaW2: $line = trim($buffer);
goto f1RXj;
ETCoD: CacheUtil::dhwlog('###doWebDoCardUpload###');
goto uq4kM;
IPFg_: $card['uniacid'] = $_W['uniacid'];
goto XhR3l;
ZJKXZ: wGAhl: goto IFb_E;
hD69v: $type = $upfile['type'];
goto G2nUk;
WdO4W: $card['card_no'] = $cardNo;
goto ZfKmH;
uq4kM: if (!is_uploaded_file($_FILES['cards']['tmp_name'])) {
goto T6EIR;
}
goto eDotQ;
e_FWr: goto wGAhl;
goto O4_4K;
WOFns: $card['card_status'] = $this->STATUS_CARD_INIT;
goto v_z4n;
v_z4n: $card['create_time'] = date('Y-m-d H:i:s', time());
goto Ud74F;
obWHZ: HsTd2: goto d9YcM;
a3YiE: $fname = 'uploadCard-' . time() . '.txt';
goto O2G7Q;
b4J6W: NAB5H: goto bVbE4;
jHZ68: $buffer = fgets($handle, 4096);
goto fFaW2;
Ud74F: pdo_insert($this->TABLE_CARD, $card);
goto hVfl9;
CLeUR: if ($okType) {
goto aqmo9;
}
goto eJk7m;
NkKEE: $handle = fopen($create_path . $fname, 'r');
goto ZJKXZ;
zJpVi: EE09H: goto eMpn8;
fLhCH: $error = $upfile['error'];
goto CuWy1;
XhR3l: $card['secret'] = $secretCode;
goto rOuSA;
v6Hwa: ENHid: goto wZqlL;
eDotQ: $upfile = $_FILES['cards'];
goto La9MI;
ZlSQ0: CacheUtil::dhwlog(" {$create_path} ");
goto lLKW2;
wZqlL: fclose($handle);
goto T1p0y;
H6ynm: $minwen = $c[2];
goto AktMY;
KSDjK: $tmp_name = $upfile['tmp_name'];
goto OHctR;
PVSrk: if (!empty($c)) {
goto HsTd2;
}
goto rUIhH;
T1p0y: message('', $this->createWebUrl('productMng'), $type = 'success');
goto b4J6W;
CuWy1: $create_path = DHW_DUIHUAN_ROOT . 'pay/file/';
goto Ilo49;
AktMY: $secretCode = $this->encryptCode($minwen . $cardNo . $this->encryKey);
goto WdO4W;
n0dFp: goto NAB5H;
goto FkZz6;
d9YcM: $pid = $c[0];
goto eSzW3;
O2G7Q: move_uploaded_file($tmp_name, $create_path . $fname);
goto NkKEE;
eSzW3: $cardNo = $c[1];
goto H6ynm;
O4_4K: uCskA: goto qKQhJ;
gHIV1: $res = mkdir($create_path);
goto eFMrB;
rUIhH: goto wGAhl;
goto obWHZ;
FkZz6: aqmo9: goto fLhCH;
rclym: $card['active_time'] = null;
goto NqR5X;
qKQhJ: $c = explode(',', $line);
goto PVSrk;
UJcTC:
}
public function doWebGetProduct() {
goto QFTZ7;
Dx5g3: $rst['success'] = false;
goto QbwSV;
QFTZ7: global $_W, $_GPC;
goto ABDft;
xRnEG: return json_encode($rst);
goto ybbrQ;
Mzxpc: O9vhJ: goto Dx5g3;
fc0Kr: if (!$product) {
goto O9vhJ;
}
goto Fd2l1;
Lta29: $rst['success'] = true;
goto sLv_V;
Fd2l1: $result = pdo_fetch('select count(card_id) as qty from ' . tablename($this->TABLE_CARD) . ' where product_id = :product_id and uniacid = :uniacid', array(":product_id" => $product['product_id'], ":uniacid" => $_W['uniacid']));
goto wXwBP;
a46QQ: return json_encode($rst);
goto k3F5x;
fUyzM: $product['qty'] = $result['qty'];
goto gY2_T;
gY2_T: goto mjE1b;
goto kvRIW;
ABDft: $productId = $_GPC['productId'];
goto sd0pH;
k3F5x: goto n5cSi;
goto Mzxpc;
kvRIW: yiAug: goto GuCOa;
K3gBX: $product = pdo_fetch($sql, array(":product_id" => $productId, ":uniacid" => $_W['uniacid']));
goto fc0Kr;
QbwSV: $rst['msg'] = '';
goto xRnEG;
GuCOa: $product['qty'] = 0;
goto ZXogZ;
ZXogZ: mjE1b: goto Lta29;
sLv_V: $rst['product'] = $product;
goto a46QQ;
sd0pH: $sql = 'select p.*,a.activity_name from ims_dhw_duihuan_product p
left join ims_dhw_duihuan_activity a on a.activity_id = p.activity_id
where p.product_id = :product_id and p.uniacid = :uniacid';
goto K3gBX;
ybbrQ: n5cSi: goto utGCI;
wXwBP: if (!$result) {
goto yiAug;
}
goto fUyzM;
utGCI:
}
public function doWebUpdateProduct() {
goto XofbE;
bQXGn: return json_encode($msg);
goto KlvO3;
AHAfO: $p['product_desc'] = $pDesc;
goto Jp_j1;
KlvO3: j1nop: goto gOiHb;
xUvt2: $p['product_name'] = $pName;
goto AHAfO;
PqJFW: return json_encode($msg);
goto bNa0l;
dKuHC: $pDesc = $_GPC['productDesc'];
goto gCMpa;
hOX58: goto j1nop;
goto Hg2ie;
Eex09: $msg['msg'] = '';
goto bQXGn;
GHKwm: return json_encode($msg);
goto hOX58;
pM3od: $pId = $_GPC['productId'];
goto X0K8V;
WsHsQ: $msg['msg'] = '';
goto PqJFW;
T6KZC: $msg['success'] = false;
goto Dj7p8;
nqyfH: if ($this->generateCard($pQty, $pId)) {
goto O9Pnn;
}
goto T6KZC;
AJ2PL: $pName = $_GPC['productName'];
goto dKuHC;
X0K8V: if (!empty($pName)) {
goto vT53X;
}
goto vcFqp;
Dj7p8: $msg['msg'] = '';
goto GHKwm;
h3En9: pdo_update($this->TABLE_PRODUCT, $p, array("product_id" => $pId));
goto nqyfH;
glKBP: $msg['success'] = true;
goto Eex09;
Hg2ie: O9Pnn: goto glKBP;
bNa0l: vT53X: goto xUvt2;
XofbE: global $_W, $_GPC;
goto AJ2PL;
gCMpa: $pQty = $_GPC['productNewQty'];
goto pM3od;
Jp_j1: $p['uniacid'] = $_W['uniacid'];
goto h3En9;
vcFqp: $msg['success'] = false;
goto WsHsQ;
gOiHb:
}
public function doWebAddProduct() {
goto VS1Uo;
zoujK: if ($this->generateCard($pQty, pdo_insertid())) {
goto NUX9l;
}
goto CBhKf;
t_PrG: $p['product_desc'] = $pDesc;
goto iNZ6N;
unCeK: return json_encode($msg);
goto jbeGh;
CR_Wv: return json_encode($msg);
goto T0V1f;
JGBoB: $p['create_time'] = date('Y-h-m H:i:s');
goto zdk24;
wEhWT: $msg['msg'] = '';
goto CR_Wv;
baEFt: if (!(empty($actId) || $actId == -1)) {
goto oHXho;
}
goto WZc_w;
NdO3h: $p['activity_id'] = $actId;
goto L3WC7;
eXins: $p['product_name'] = $pName;
goto t_PrG;
nkf0a: $msg['msg'] = '';
goto jTU6i;
T0V1f: oHXho: goto eXins;
u28Ie: gFBsw: goto Ah4i8;
CBhKf: $msg['success'] = false;
goto Xt0_O;
EP0va: $msg['msg'] = '';
goto unCeK;
AoGpk: return json_encode($msg);
goto RV5rx;
VS1Uo: global $_W, $_GPC;
goto vlq9a;
b08cS: if (!empty($pName)) {
goto WtAKp;
}
goto L9rNw;
L3WC7: $p['status'] = 1;
goto JGBoB;
vlq9a: $pName = $_GPC['productName'];
goto l_zDC;
JwHOe: WtAKp: goto deBqY;
jTU6i: return json_encode($msg);
goto u28Ie;
l_zDC: $pDesc = $_GPC['productDesc'];
goto xQTME;
deBqY: if (!(empty($pQty) || $pQty == 0)) {
goto qxD0E;
}
goto Eg73Y;
RV5rx: goto gFBsw;
goto GJYl5;
dLC0Y: $msg['success'] = true;
goto nkf0a;
xQTME: $pQty = $_GPC['productQty'];
goto h2ZY2;
Xt0_O: $msg['msg'] = '';
goto AoGpk;
L9rNw: $msg['success'] = false;
goto Hz4V3;
pN97T: return json_encode($msg);
goto JwHOe;
Eg73Y: $msg['success'] = false;
goto EP0va;
WZc_w: $msg['success'] = false;
goto wEhWT;
GJYl5: NUX9l: goto dLC0Y;
Hz4V3: $msg['msg'] = '';
goto pN97T;
iNZ6N: $p['uniacid'] = $_W['uniacid'];
goto NdO3h;
h2ZY2: $actId = $_GPC['activityId'];
goto b08cS;
jbeGh: qxD0E: goto baEFt;
zdk24: pdo_insert($this->TABLE_PRODUCT, $p);
goto zoujK;
Ah4i8:
}
public function guid() {
goto PbCiU;
PbCiU: if (function_exists('com_create_guid')) {
goto CmQU1;
}
goto hC0q2;
P8wLs: $hyphen = chr(45);
goto D9VD2;
pc40s: return $uuid;
goto aTA3N;
hC0q2: mt_srand((double) microtime() * 10000);
goto Yz8yS;
D9VD2: $uuid = chr(123) . substr($charid, 0, 8) . $hyphen . substr($charid, 8, 4) . $hyphen . substr($charid, 12, 4) . $hyphen . substr($charid, 16, 4) . $hyphen . substr($charid, 20, 12) . chr(125);
goto pc40s;
KxlxE: return com_create_guid();
goto FBs8M;
aTA3N: goto Fru5K;
goto fAFNb;
Yz8yS: $charid = strtoupper(md5(uniqid(rand(), true)));
goto P8wLs;
FBs8M: Fru5K: goto ZMcpG;
fAFNb: CmQU1: goto KxlxE;
ZMcpG:
}
public function dhw_checkoauth() {
goto w9Jy9;
cUh2N: $openid = '';
goto l3T1N;
w9Jy9: global $_GPC, $_W;
goto eg6Kh;
w_5hr: Iq9iZ: goto B7ObS;
QMUAY: $avatar = $fan['avatar'];
goto mwmRe;
pGVSw: return $oauthuser;
goto miExQ;
ZPJx6: if (!(empty($avatar) || empty($nickname))) {
goto vHCEb;
}
goto xjXbW;
O1DfV: $follow = $fan['follow'];
goto qbe27;
qbe27: Ikg1G: goto h0gFq;
NOZ73: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['avatar']))) {
goto rc7nw;
}
goto cn_As;
l3T1N: $nickname = '';
goto DsXfO;
Q3qze: $oauthuser['follow'] = !empty($follow) ? $follow : $_W['fans']['follow'];
goto pGVSw;
B7ObS: e3hn3: goto a_hqK;
Lh3iy: eurCi: goto f0ejc;
JUjfL: $oauthuser['avatar'] = $avatar;
goto Vgvxl;
uawYo: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['follow']))) {
goto Iq9iZ;
}
goto bI4V7;
xjXbW: $fan = mc_fansinfo($_W['openid']);
goto H83oj;
ExVfj: $member = mc_fetch(intval($_W['member']['uid']), array("avatar", "nickname"));
goto SJ5v5;
Vgvxl: $oauthuser['nickname'] = $nickname;
goto Hgp3Q;
PzTHn: load()->model('mc');
goto cUh2N;
H83oj: if (empty($fan)) {
goto Ikg1G;
}
goto QMUAY;
jnS4s: if (empty($_W['member']['uid'])) {
goto adm9C;
}
goto ExVfj;
vCCS7: EsmAd: goto uawYo;
cn_As: $avatar = $userinfo['avatar'];
goto MtzD9;
OqXvs: $nickname = $userinfo['nickname'];
goto Lh3iy;
QTVz3: K2UXx: goto ujP8w;
fORR1: $follow = '';
goto jnS4s;
rlSNf: $userinfo = mc_oauth_userinfo();
goto NOZ73;
DsXfO: $avatar = '';
goto fORR1;
nY1a0: $avatar = $member['avatar'];
goto KnFpL;
g6kfx: $openid = $fan['openid'];
goto O1DfV;
a_hqK: if (!((empty($avatar) || empty($nickname)) && !empty($_W['member']['uid']))) {
goto K2UXx;
}
goto QTVz3;
mwmRe: $nickname = $fan['nickname'];
goto g6kfx;
h0gFq: vHCEb: goto zPlaS;
bI4V7: $follow = $userinfo['follow'];
goto w_5hr;
WEXuU: $openid = $userinfo['openid'];
goto vCCS7;
Ev1Rt: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['nickname']))) {
goto eurCi;
}
goto OqXvs;
eg6Kh: $uniacid = !empty($_W['uniacid']) ? $_W['uniacid'] : $_W['acid'];
goto PzTHn;
ujP8w: $oauthuser = array();
goto JUjfL;
KnFpL: $nickname = $member['nickname'];
goto j4MiS;
Hgp3Q: $oauthuser['from_user'] = $openid;
goto Q3qze;
NHIgF: adm9C: goto ZPJx6;
SJ5v5: if (empty($member)) {
goto N0W17;
}
goto nY1a0;
zPlaS: if (!(empty($avatar) || empty($nickname) || empty($openid) || empty($follow))) {
goto e3hn3;
}
goto rlSNf;
MtzD9: rc7nw: goto Ev1Rt;
j4MiS: N0W17: goto NHIgF;
f0ejc: if (!(!is_error($userinfo) && !empty($userinfo) && is_array($userinfo) && !empty($userinfo['openid']))) {
goto EsmAd;
}
goto WEXuU;
miExQ:
}
public function doWebCardMng() {
goto saoQG;
ETaU5: goto qCdkB;
goto PmBYY;
Yt9Rv: if (!empty($productName) && empty($cardNo)) {
goto aCHoO;
}
goto uBwFY;
hv099: $cardNo = $_GPC['cardNo'];
goto tsVpT;
ynsg3: foreach ($cards as &$card) {
goto XvHrm;
XvHrm: switch ($card['card_status']) {
case $this->STATUS_CARD_INIT: $card['status_name'] = '';
goto OEc7z;
case $this->STATUS_CARD_USED: $card['status_name'] = '';
goto OEc7z;
case $this->STATUS_CARD_ACTIVED: $card['status_name'] = '';
goto OEc7z;
case $this->STATUS_CARD_FROZEN: $card['status_name'] = '';
goto OEc7z;
}
goto koHdv;
koHdv: pYi2c: goto lB3_I;
lB3_I: OEc7z: goto dhE_L;
dhE_L: I3RjB: goto cm_dV;
cm_dV:
}
goto Ssg_e;
KDm_B: $params[':uniacid'] = $_W['uniacid'];
goto RAOvS;
Ssg_e: YZ2Zy: goto p1Pse;
IDuD5: TrCZ9: goto pnwPf;
RYCOd: goto x3JGh;
goto yLyyx;
SjSIF: $queryParam = " {$cardNo}; {$productName}";
goto JJpeL;
P9Yhd: $params[':card_no'] = $cardNo;
goto kHqo2;
ZJV0O: $sql = $sql . 'where card.card_no = :card_no and card.uniacid = :uniacid';
goto u9TZu;
ijYlj: eQBkL: goto Q1v7r;
lm1cC: qCdkB: goto C3emZ;
pnwPf: include $this->template('cardMng');
goto sB2Li;
tsVpT: $productName = $_GPC['productName'];
goto SjSIF;
p1Pse: include $this->template('cardMng');
goto Ggo8p;
TI1Ws: $params = array();
goto uwi47;
nPfvl: $params[':product_name'] = '%' . $productName . '%';
goto l9bWe;
u9TZu: $params[':card_no'] = $cardNo;
goto KDm_B;
uz6K1: $cards = null;
goto TI1Ws;
uBwFY: if (!empty($cardNo) && empty($productName)) {
goto WfYlE;
}
goto XA4zU;
yLyyx: WfYlE: goto ZJV0O;
sB2Li: return;
goto ijYlj;
l9bWe: $params[':uniacid'] = $_W['uniacid'];
goto lm1cC;
Q1v7r: $cards = pdo_fetchall($sql, $params);
goto ynsg3;
C3emZ: goto eQBkL;
goto IDuD5;
uwi47: if (empty($cardNo) && empty($productName)) {
goto TrCZ9;
}
goto Yt9Rv;
TFIbI: $sql = $sql . 'where p.product_name like :product_name and card.uniacid = :uniacid';
goto nPfvl;
PmBYY: aCHoO: goto TFIbI;
RAOvS: x3JGh: goto ETaU5;
aefXl: $params[':product_name'] = '%' . $productName . '%';
goto RYCOd;
XA4zU: $sql = $sql . 'where card.card_no = :card_no and p.product_name like :product_name and card.uniacid = :uniacid';
goto P9Yhd;
saoQG: global $_GPC, $_W;
goto hv099;
kHqo2: $params[':uniacid'] = $_W['uniacid'];
goto aefXl;
JJpeL: $sql = 'select card.card_no as card_no,card.card_id as card_id,card.is_active as is_active,p.product_id as product_id,p.product_name as product_name,p.product_desc as product_desc,card.card_status as card_status
from ims_dhw_duihuan_card card
left join ims_dhw_duihuan_product p on p.product_id = card.product_id ';
goto uz6K1;
Ggo8p:
}
public function doWebActiveCard() {
goto v1W2_;
ccY94: $param['card_id'] = $cardId;
goto lHoM1;
isvUq: return json_encode($rst);
goto o4LyE;
jbhTO: $data['is_active'] = 1;
goto egVqu;
TQTkz: q2tTY: goto yoYrq;
wf1no: QncD6: goto isvUq;
lHoM1: $result = pdo_update($this->TABLE_CARD, $data, $param);
goto a3O8F;
Stln6: $cardId = $_GPC['card_id'];
goto wXBwN;
yoYrq: $rst['msg'] = '';
goto TB4MF;
v1W2_: global $_W, $_GPC;
goto Stln6;
bgjSB: $param['card_status'] = $this->STATUS_CARD_INIT;
goto ccY94;
egVqu: $data['active_time'] = date('Y-m-d H:i:s', time());
goto bgjSB;
Xt7vM: if (!empty($result)) {
goto q2tTY;
}
goto ricWN;
um58X: goto QncD6;
goto TQTkz;
TB4MF: $rst['success'] = true;
goto wf1no;
vmfaG: $rst['success'] = false;
goto um58X;
wXBwN: $data['card_status'] = $this->STATUS_CARD_ACTIVED;
goto jbhTO;
a3O8F: $rst = null;
goto Xt7vM;
ricWN: $rst['msg'] = '';
goto vmfaG;
o4LyE:
}
public function doWebReinitCard() {
goto L43Yb;
T3uWK: $rst['msg'] = '';
goto JBF87;
D477w: $cardId = $_GPC['card_id'];
goto cHzGF;
poj8K: $rst['success'] = false;
goto po6nC;
XUUwj: mqs0N: goto wkiLE;
GOdfH: $result = pdo_update($this->TABLE_CARD, $data, $param);
goto Lx0Zt;
wkiLE: return json_encode($rst);
goto kzdHf;
po6nC: goto mqs0N;
goto BPRii;
JBF87: $rst['success'] = true;
goto XUUwj;
Lx0Zt: $rst = null;
goto UpCl2;
UpCl2: if (!empty($result)) {
goto aKQEV;
}
goto tFuyW;
tFuyW: $rst['msg'] = '';
goto poj8K;
BPRii: aKQEV: goto T3uWK;
L43Yb: global $_W, $_GPC;
goto D477w;
cHzGF: $data['card_status'] = $this->STATUS_CARD_INIT;
goto sIQYn;
sIQYn: $param['card_id'] = $cardId;
goto GOdfH;
kzdHf:
}
public function doWebDeleteOneActRecord() {
goto DmKpu;
gg2U1: $in = implode(',', $idsArr);
goto FlZ9C;
DdweO: $rst['msg'] = '';
goto Qc4Db;
shyuu: $idsArr = $_GPC['act_ids'];
goto gg2U1;
ifay7: foreach ($idsArr as $id) {
CacheUtil::removeActivityCache($id);
Kh7vI:
}
goto JVjC9;
JVjC9: kz6CY: goto DdweO;
DVj_Q: echo json_encode($rst);
goto EKT8C;
DmKpu: global $_W, $_GPC;
goto shyuu;
FlZ9C: pdo_query('update ' . tablename($this->TABLE_ACTIVITY) . ' set status = -1 where status > -1 and activity_id in (' . $in . ')');
goto ifay7;
Qc4Db: $rst['success'] = true;
goto DVj_Q;
EKT8C:
}
public function doWebDeleteAddr() {
goto bv7YA;
NCZnx: $rst['success'] = true;
goto FjyHg;
FjyHg: echo json_encode($rst);
goto n6Ck7;
vpaYR: $addrId = $_GPC['addr_id'];
goto GJ5LE;
MbHnU: $rst['msg'] = '';
goto NCZnx;
bv7YA: global $_W, $_GPC;
goto vpaYR;
GJ5LE: pdo_update($this->TABLE_ZITI_ADDR, array("status" => -1), array("addr_id" => $addrId));
goto MbHnU;
n6Ck7:
}
public function doWebDeleteProduct() {
goto ffYTt;
yl9Gk: $rst['msg'] = '';
goto ke5Te;
yccES: pdo_update($this->TABLE_PRODUCT, array("status" => -1), array("product_id" => $productId));
goto yl9Gk;
ffYTt: global $_W, $_GPC;
goto LHrbR;
LHrbR: $productId = $_GPC['product_id'];
goto yccES;
xKSO7: echo json_encode($rst);
goto ctZON;
ke5Te: $rst['success'] = true;
goto xKSO7;
ctZON:
}
public function doWebInvalidCards() {
goto B1QF3;
B1QF3: global $_W, $_GPC;
goto JfNvN;
Ym5Sb: $rst['msg'] = '';
goto Xqoxi;
Xqoxi: $rst['success'] = true;
goto J0XFL;
BtywH: $in = implode(',', $idsArr);
goto IOvI4;
J0XFL: echo json_encode($rst);
goto c7_9m;
JfNvN: $idsArr = $_GPC['card_ids'];
goto BtywH;
IOvI4: pdo_query('update ' . tablename($this->TABLE_CARD) . ' set card_status = :status where card_id in (' . $in . ')', array(":status" => $this->STATUS_CARD_FROZEN));
goto Ym5Sb;
c7_9m:
}
public function doWebActiveCardBatch() {
goto xc6_1;
pARuT: $data[':active_time'] = date('Y-m-d H:i:s', time());
goto LnCQy;
eiAUo: $data[':card_status'] = $this->STATUS_CARD_ACTIVED;
goto Ask9D;
LnCQy: $data[':old_status'] = $this->STATUS_CARD_INIT;
goto L70v0;
pJSFk: $rst['success'] = true;
goto sr21K;
BqITG: PxVVy: goto wXS7v;
sr21K: UrNvA: goto isaIs;
aHg1u: $in = implode(',', $idsArr);
goto eiAUo;
wXS7v: $rst['msg'] = '';
goto pJSFk;
EldXI: $rst['success'] = false;
goto dtWI3;
gfVFr: $idsArr = $_GPC['card_ids'];
goto aHg1u;
l8Oga: $rst = null;
goto zN82f;
Ask9D: $data[':is_active'] = 1;
goto pARuT;
L70v0: $result = pdo_query('update ' . tablename($this->TABLE_CARD) . ' set card_status = :card_status,is_active=:is_active,active_time = :active_time where card_status=:old_status and card_id in (' . $in . ')', $data);
goto l8Oga;
isaIs: return json_encode($rst);
goto Nqad_;
xc6_1: global $_W, $_GPC;
goto gfVFr;
zN82f: if (!empty($result)) {
goto PxVVy;
}
goto P2zm3;
dtWI3: goto UrNvA;
goto BqITG;
P2zm3: $rst['msg'] = '';
goto EldXI;
Nqad_:
}
public function doWebDeleteOneUploadRecord() {
goto nEi0F;
vdEDf: $rst['msg'] = '';
goto UPKqa;
ERbuc: echo json_encode($rst);
goto E66ae;
ibhwE: $in = implode(',', $idsArr);
goto U2giV;
U2giV: $statusArr = array($this->STATUS_INIT, $this->STATUS_WAIT_SEND, $this->STATUS_SENT);
goto ul4iq;
n_XLs: $idsArr = $_GPC['upload_ids'];
goto e2BnR;
nEi0F: global $_W, $_GPC;
goto n_XLs;
UPKqa: $rst['success'] = true;
goto ERbuc;
e2BnR: load()->func('logging');
goto ibhwE;
ul4iq: pdo_query('update ' . tablename($this->TABLE_DUIHUAN) . ' set status = 0 where status in (' . implode(',', $statusArr) . ') and duihuan_id in (' . $in . ')', array(":status" => $this->STATUS_WAIT_SEND));
goto vdEDf;
E66ae:
}
public function doWebGenerateCard() {
goto PFpHj;
N0HcQ: qRUaw: goto KDRvy;
c1nuL: message('', $this->createWebUrl('cardMng'), $type = 'success');
goto N0HcQ;
ECd7D: $productId = $_GPC['productId'];
goto vJpzk;
Bfme2: $count = $_GPC['count'];
goto ECd7D;
PFpHj: global $_GPC, $_W;
goto Z0uN7;
vJpzk: if (!$this->generateCard($count, $productId)) {
goto qRUaw;
}
goto c1nuL;
Z0uN7: CacheUtil::dhwlog('###doWebGenerateCard##');
goto Bfme2;
KDRvy:
}
public function doWebAddrMng() {
goto SgJzB;
Px6oX: oF2cQ: goto CdO1R;
dN8Uo: $sql = 'select ad.*,a.activity_name from ' . tablename($this->TABLE_ZITI_ADDR) . ' ad
left join ' . tablename($this->TABLE_ACTIVITY) . ' a on a.activity_id = ad.activity_id
where ad.status = :status and ad.uniacid = :uniacid';
goto vkxf3;
SgJzB: global $_W, $_GPC;
goto dYo9Y;
vkxf3: $records = pdo_fetchall($sql, array(":status" => 1, ":uniacid" => $_W['uniacid']));
goto MgYWc;
CdO1R: $acts = pdo_getall($this->TABLE_ACTIVITY, array("uniacid" => $_W['uniacid'], "status" => 1));
goto dN8Uo;
WOV3F: $cf['uniacid'] = $_W['uniacid'];
goto tr8i3;
dYo9Y: $cf = CacheUtil::getZitiConfig($_W['uniacid']);
goto iQ97S;
dWhZM: $cf['ziti_status'] = 0;
goto WOV3F;
iQ97S: if (!empty($cf)) {
goto oF2cQ;
}
goto dWhZM;
tr8i3: pdo_insert($this->TABLE_CONFIG, $cf);
goto Px6oX;
MgYWc: include $this->template('addrMng');
goto tdsjh;
tdsjh:
}
public function doWebAddAddr() {
goto U_AVk;
nxJEg: $addr['addr'] = $_GPC['addr'];
goto sViqD;
U_AVk: global $_W, $_GPC;
goto yFs9Z;
T_woF: return json_encode($rst);
goto Qcqlw;
EwfDd: $addr['uniacid'] = $_W['uniacid'];
goto iJEm6;
iJEm6: $result = pdo_insert($this->TABLE_ZITI_ADDR, $addr);
goto tPXZN;
tPXZN: $rst['msg'] = '';
goto yBN5x;
sViqD: $addr['activity_id'] = $_GPC['activityId'];
goto EwfDd;
yFs9Z: $addr['name'] = $_GPC['name'];
goto nxJEg;
yBN5x: $rst['success'] = true;
goto T_woF;
Qcqlw:
}
public function doWebGetAddr() {
goto oi6ZM;
fG5IT: $rst['msg'] = '';
goto TFFNC;
oi6ZM: global $_W, $_GPC;
goto UV8Js;
WyiEt: $sql = 'select ad.*,a.activity_name from ' . tablename($this->TABLE_ZITI_ADDR) . ' ad
left join ' . tablename($this->TABLE_ACTIVITY) . ' a on a.activity_id = ad.activity_id
where ad.addr_id = :addr_id';
goto ryQVW;
Vf8_F: return json_encode($rst);
goto bpf5i;
UV8Js: $addrId = $_GPC['addrId'];
goto WyiEt;
TFFNC: $rst['addr'] = $addr;
goto BdOay;
ryQVW: $addr = pdo_fetch($sql, array(":addr_id" => $addrId));
goto fG5IT;
BdOay: $rst['success'] = true;
goto Vf8_F;
bpf5i:
}
public function doWebUpdateAddr() {
goto Jc976;
Jc976: global $_W, $_GPC;
goto GqPpl;
KaCnr: $result = pdo_update($this->TABLE_ZITI_ADDR, $addr, array("addr_id" => $addrId));
goto CZeai;
GT4ch: return json_encode($rst);
goto vqx8I;
GqPpl: $addr['name'] = $_GPC['name'];
goto D3ROX;
j4wKb: $addrId = $_GPC['addr_id'];
goto KaCnr;
XXDB6: $rst['success'] = true;
goto GT4ch;
D3ROX: $addr['addr'] = $_GPC['addr'];
goto j4wKb;
CZeai: $rst['msg'] = '';
goto XXDB6;
vqx8I:
}
private function generateCard($count, $productId) {
goto xKe2S;
ac3cv: $cardNo = $this->getMillisecond() . str_pad(rand(0, 999), 3, '0', STR_PAD_LEFT);
goto eiKum;
n4Fd7: qqK8i: goto azMCj;
HDilZ: $pro = CacheUtil::getPureProductById($productId);
goto LJ83D;
ZDEfP: $card['used_user_id'] = 0;
goto r4Jmn;
jzN11: $card['secret'] = $secretCode;
goto K5ywh;
sbarZ: return true;
goto PGImU;
CILzw: $secret = $this->encryptCode(time() . $cardNo . $this->encryKey);
goto kK_Dt;
S_w5A: KYo4q: goto vXO75;
Pn_JZ: mkdirs($cardPath);
goto bXX_J;
RdJI6: $card['create_time'] = date('Y-m-d H:i:s', time());
goto i_1jH;
LJ83D: $text = $pro['product_name'] . ',' . $cardNo . ',' . $secret . '
';
goto OSA1N;
YVygr: $fileName = 'card' . $_W['uniacid'] . '.txt';
goto ADpm9;
r4Jmn: $card['card_status'] = 1;
goto RdJI6;
lc1VT: $card['active_time'] = null;
goto ZDEfP;
vXO75: $i++;
goto QE1rj;
HOlko: $secretCode = $this->encryptCode($secret . $cardNo . $this->encryKey);
goto E0KqA;
i_1jH: pdo_insert($this->TABLE_CARD, $card);
goto HDilZ;
OSA1N: fwrite($file, $text);
goto S_w5A;
E0KqA: $card['card_no'] = $cardNo;
goto tRrvk;
K5ywh: $card['is_active'] = 0;
goto lc1VT;
ADpm9: if (file_exists($cardPath)) {
goto qHgCU;
}
goto JVvLd;
BWEeG: if (!($i < $count)) {
goto qqK8i;
}
goto ac3cv;
JVvLd: load()->func('file');
goto Pn_JZ;
QE1rj: goto bSRvs;
goto n4Fd7;
tRrvk: $card['product_id'] = $productId;
goto f5HET;
kK_Dt: $secret = substr(strtoupper($secret), 10, 6);
goto HOlko;
f5HET: $card['uniacid'] = $_W['uniacid'];
goto jzN11;
wH5L7: bSRvs: goto BWEeG;
bXX_J: qHgCU: goto wQDaS;
eiKum: $cardNo = substr($cardNo, 5, 10);
goto CILzw;
azMCj: fclose($file);
goto sbarZ;
rbhfj: $firstLoop = true;
goto aedh3;
wQDaS: $file = fopen($cardPath . $fileName, 'a+');
goto N9b_b;
aedh3: $cardPath = DHW_DUIHUAN_ROOT . '/pay/card/';
goto YVygr;
xKe2S: global $_W;
goto rbhfj;
N9b_b: $i = 0;
goto wH5L7;
PGImU:
}
public function doWebTestLuhn() {
goto To6XR;
raW1L: $total -= $last_n;
goto JCslJ;
To6XR: global $_W, $_GPC;
goto XM9Qr;
XM9Qr: $no = $_GPC['no'];
goto tAt1g;
k1_iY: foreach ($arr_no as $n) {
goto COSuX;
WprOR: HqU7A: goto HS9W1;
VXwbB: xZaZl: goto qN01w;
W9c1v: $total += $nx;
goto jIJGA;
q0B1e: UURPL: goto eRboH;
eRboH: $ix = $n * 2;
goto dQOKj;
ZCinG: xMdu_: goto qAN2R;
LZjBR: goto xMdu_;
goto q0B1e;
qAN2R: $i++;
goto WprOR;
COSuX: if ($i % 2 == 0) {
goto UURPL;
}
goto n0i0l;
yXfQ0: goto DRmfI;
goto VXwbB;
dQOKj: if ($ix >= 10) {
goto xZaZl;
}
goto oEQNG;
oEQNG: $total += $ix;
goto yXfQ0;
n0i0l: $total += $n;
goto LZjBR;
qN01w: $nx = 1 + $ix % 10;
goto W9c1v;
jIJGA: DRmfI: goto ZCinG;
HS9W1:
}
goto eC2v5;
JCslJ: $x = 10 - $total % 10;
goto gw417;
eC2v5: PUyyt: goto raW1L;
gceJB: $i = 1;
goto F4lpT;
tAt1g: $arr_no = str_split($no);
goto UjcmZ;
F4lpT: $total = 0;
goto k1_iY;
uXpxb: echo 'Luhn';
goto Tr5PT;
UjcmZ: $last_n = $arr_no[count($arr_no) - 1];
goto YMRx0;
YMRx0: krsort($arr_no);
goto gceJB;
gw417: if (!($x == $last_n)) {
goto yWSMM;
}
goto uXpxb;
Tr5PT: yWSMM: goto OcbuI;
OcbuI:
}
public function doWebActivityDetail() {
goto USKSr;
JMqTa: message('', $this->createWebUrl('activityMng'), $type = 'error');
goto awdZF;
shqs8: $config['url'] = $_W['siteroot'] . $config['url'];
goto NASYp;
kqCT1: if ($config) {
goto huxhT;
}
goto JMqTa;
Bycjc: CacheUtil::dhwlog('$config:' . json_encode($config));
goto kqCT1;
awdZF: huxhT: goto shqs8;
OSedS: $config = CacheUtil::getActivity($activityId);
goto Bycjc;
MzMJR: $activityId = $_GPC['activityId'];
goto OSedS;
USKSr: global $_W, $_GPC;
goto MzMJR;
NASYp: include $this->template('activityDetail');
goto dxkue;
dxkue:
}
public function doWebAddActivity() {
goto pcKk9;
gXzBY: CacheUtil::dhwlog('###doWebAddActivity##');
goto fIiYW;
pcKk9: global $_GPC, $_W;
goto gXzBY;
F1QU1: message('', $this->createWebUrl('activityMng'), $type = 'success');
goto OTgHn;
fIiYW: try {
goto Rikpo;
EtdzK: $bg3 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto ylRuc;
EcRwQ: $line['activity_name'] = $activityName;
goto fauhO;
HmAz3: message('', $this->createWebUrl('activityMng'), $type = 'error');
goto W6tsj;
Czchx: $line['kefu_url'] = $kefuUrl;
goto dYPqt;
HKfCn: pdo_update('dhw_duihuan_activity', $line, array("activity_id" => $actId));
goto mYa83;
ghqlE: if (!empty($bg2)) {
goto Jtit3;
}
goto GRHl4;
oMa9A: $title3 = trim($_GPC['title3']);
goto Ypff4;
kQp2u: $line['bg1'] = $bg1;
goto GZo9Z;
OA0r6: $line['uniacid'] = $_W['uniacid'];
goto knFmA;
wFEo4: $kefuMobile = trim($_GPC['kefu_mobile']);
goto x8C03;
YA9OJ: $endTime = trim($_GPC['endTime']);
goto wFEo4;
AZTdP: if (!empty($bg1)) {
goto MNHcn;
}
goto j__g1;
sCx4_: $line['title2'] = $title2;
goto T4Xmb;
Cq0lL: $notice = trim($_GPC['notice']);
goto GElgH;
GZo9Z: $line['bg2'] = $bg2;
goto CJujB;
Y1m4h: $actId = pdo_insertid();
goto fuoSJ;
CJujB: $line['bg3'] = $bg3;
goto G2g5q;
fauhO: $line['start_time'] = $startTime;
goto IXZXA;
knFmA: $line['status'] = 1;
goto EcRwQ;
GRHl4: $bg2 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto v2sgX;
W6tsj: vXBKs: goto OA0r6;
T4Xmb: $line['title3'] = $title3;
goto kQp2u;
j__g1: $bg1 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/bg4.jpg');
goto Esnun;
fuoSJ: $url = $this->createMobileUrl('duihuan');
goto xtthQ;
EvuLe: if (!empty($bg3)) {
goto jt7Ek;
}
goto EtdzK;
Rikpo: $activityName = trim($_GPC['activityName']);
goto IwmZY;
Esnun: MNHcn: goto ghqlE;
neY_C: if (!(empty($startTime) || empty($endTime))) {
goto vXBKs;
}
goto HmAz3;
GElgH: $title1 = trim($_GPC['title1']);
goto TYNaf;
dYPqt: $line['end_time'] = $endTime;
goto pgUjU;
TYNaf: $title2 = trim($_GPC['title2']);
goto oMa9A;
d5puH: $bg3 = trim($_GPC['detail_placeholder_url']);
goto AZTdP;
nN6qo: $line['url'] = $url;
goto HKfCn;
pgUjU: $line['title1'] = $title1;
goto sCx4_;
v2sgX: Jtit3: goto EvuLe;
Ypff4: $bg1 = trim($_GPC['hom_placeholder_url']);
goto crUmz;
IXZXA: $line['kefu_mobile'] = $kefuMobile;
goto Czchx;
G2g5q: $line['notice'] = $notice;
goto en60a;
en60a: pdo_insert('dhw_duihuan_activity', $line);
goto Y1m4h;
IwmZY: $startTime = trim($_GPC['startTime']);
goto YA9OJ;
crUmz: $bg2 = trim($_GPC['orders_placeholder_url']);
goto d5puH;
ylRuc: jt7Ek: goto neY_C;
x8C03: $kefuUrl = trim($_GPC['kefu_url']);
goto Cq0lL;
xtthQ: $url = 'app' . substr($url, 1) . '&actid=' . $actId;
goto nN6qo;
mYa83:
}
catch (Exception $e) {
CacheUtil::dhwlog('' . $e->getMessage());
}
goto F1QU1;
OTgHn:
}
public function doWebActivityMng() {
goto vMMul;
meVMN: foreach ($acts as $act) {
goto EWQDY;
T7rAo: $act['status_name'] = '';
goto z9Ozc;
oZVLW: iXef5: goto aytlE;
hrnSU: HXBix: goto xjHZL;
zY4Kl: $act['status_color'] = 'label-warning';
goto H7YNC;
z9Ozc: $act['status_color'] = 'label-success';
goto JmEbA;
mU789: goto fB5Wy;
goto wBLx1;
JmEbA: fB5Wy: goto kGi4Z;
S63ul: $act['status_name'] = '';
goto ych1b;
ych1b: $act['status_color'] = 'label-danger';
goto suQla;
H7YNC: Jg2Xb: goto mU789;
EWQDY: $now = time();
goto ptOdn;
ptOdn: if ($now >= strtotime($act['start_time']) && $now < strtotime($act['end_time'])) {
goto v3qsP;
}
goto eNgWF;
xjHZL: $act['status_name'] = '';
goto zY4Kl;
suQla: goto Jg2Xb;
goto hrnSU;
eNgWF: if ($now < strtotime($act['start_time'])) {
goto HXBix;
}
goto S63ul;
INKKs: $list[] = $act;
goto oZVLW;
wBLx1: v3qsP: goto T7rAo;
kGi4Z: $act['url'] = $_W['siteroot'] . $act['url'];
goto INKKs;
aytlE:
}
goto X1WkU;
vMMul: global $_W, $_GPC;
goto t4rWz;
t4rWz: $acts = pdo_getall('dhw_duihuan_activity', array("uniacid" => $_W['uniacid'], "status" => 1));
goto dBwQ8;
dBwQ8: $list = array();
goto meVMN;
e_krq: include $this->template('activityList');
goto jMDg4;
X1WkU: ilX7q: goto e_krq;
jMDg4:
}
public function doWebUpdateActivity() {
goto e7Xo3;
LjmuU: $title1 = trim($_GPC['title1']);
goto xgisa;
HqssQ: if (!empty($bg1)) {
goto A3z2x;
}
goto mwTaM;
liBZd: goto qccUO;
goto l8fyq;
Y4WRH: message('', $this->createWebUrl('activityMng'), $type = 'success');
goto m04RO;
ly9C1: pdo_insert('dhw_duihuan_activity', $line);
goto e4Hw0;
xjvgP: return;
goto TdVHo;
RdBjd: CacheUtil::removeActivityCache($activityId);
goto liBZd;
e4Hw0: qccUO: goto Y4WRH;
DsovR: $line['bg2'] = $bg2;
goto ziU6h;
GnHcM: $num = 0;
goto g6OLw;
jaeD9: $line['title3'] = $title3;
goto xCjm1;
Jn7c3: KUnK2: goto dY5tM;
AqJ0S: A3z2x: goto w6FCm;
mwTaM: $bg1 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/bg4.jpg');
goto AqJ0S;
w6FCm: if (!empty($bg2)) {
goto y7_Es;
}
goto oJg2O;
oinvf: $line['uniacid'] = $_W['uniacid'];
goto KL2yW;
oJg2O: $bg2 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto P3Qe8;
cl_2u: $startTime = trim($_GPC['startTime']);
goto IDxm5;
tBc3l: $kefuUrl = trim($_GPC['kefu_url']);
goto Wzg1j;
pRnHH: $line['title2'] = $title2;
goto jaeD9;
Kv_xh: $line['kefu_url'] = $kefuUrl;
goto wGHBS;
xgisa: $title2 = trim($_GPC['title2']);
goto MbntH;
UB_1s: $bg2 = trim($_GPC['orders_placeholder_url']);
goto nFVsL;
Cfo17: TApJo: goto GOSim;
MbntH: $title3 = trim($_GPC['title3']);
goto umIt0;
ziU6h: $line['bg3'] = $bg3;
goto TT50m;
NoSrb: if (!$config) {
goto ytRFd;
}
goto X5H81;
l8fyq: ytRFd: goto oinvf;
jQtld: $activityName = trim($_GPC['activityName']);
goto tBc3l;
wGHBS: $line['kefu_mobile'] = $kefuMobile;
goto KoM66;
ALEAT: $activityId = trim($_GPC['activityId']);
goto JUfO9;
umIt0: $bg1 = trim($_GPC['home_placeholder_url']);
goto UB_1s;
nFVsL: $bg3 = trim($_GPC['detail_placeholder_url']);
goto HqssQ;
xyLOt: $line['end_time'] = $endTime;
goto Kv_xh;
hhGX4: $line['start_time'] = $startTime;
goto xyLOt;
GOSim: if (!(empty($activityId) || $activityId == 0)) {
goto cHWjZ;
}
goto vvZ_g;
IDxm5: $endTime = trim($_GPC['endTime']);
goto ALEAT;
vvZ_g: message('id', $this->createWebUrl('activityMng'), $type = 'error');
goto xjvgP;
UkCiU: return;
goto Cfo17;
JUfO9: $notice = trim($_GPC['notice']);
goto LjmuU;
Wzg1j: $kefuMobile = trim($_GPC['kefu_mobile']);
goto cl_2u;
KoM66: $line['title1'] = $title1;
goto pRnHH;
TQNjq: CacheUtil::dhwlog('config:' . json_encode($config));
goto GnHcM;
JlZUl: message('', $this->createWebUrl('activityMng'), $type = 'error');
goto UkCiU;
KL2yW: $line['status'] = 1;
goto ly9C1;
dY5tM: if (!(empty($startTime) || empty($endTime))) {
goto TApJo;
}
goto JlZUl;
P3Qe8: y7_Es: goto mgKFU;
g6OLw: $line['activity_name'] = $activityName;
goto hhGX4;
mgKFU: if (!empty($bg3)) {
goto KUnK2;
}
goto zgoq3;
zgoq3: $bg3 = tomedia(DHW_DUIHUAN_ROOT . 'static/img/banner.jpg');
goto Jn7c3;
xCjm1: $line['bg1'] = $bg1;
goto DsovR;
X5H81: $num = pdo_update('dhw_duihuan_activity', $line, array("uniacid" => $_W['uniacid'], "activity_id" => $activityId));
goto RdBjd;
e7Xo3: global $_GPC, $_W;
goto jQtld;
TdVHo: cHWjZ: goto xcfPt;
xcfPt: $config = CacheUtil::getActivity($activityId);
goto TQNjq;
TT50m: $line['notice'] = $notice;
goto NoSrb;
m04RO:
}
public function doWebNoticeMng() {
goto A3mjf;
TpG9Y: nGbjx: goto EYdzX;
kKrxg: $acts_json = json_encode($acts);
goto shfss;
myAKe: foreach ($noticeUsers as &$nuser) {
goto ffwnL;
uQUIK: $nuser['openid'] = $u['openid'];
goto Ti9tp;
eseOU: $nuser['real_name'] = $u['real_name'];
goto Bu3e9;
b8Bw_: $nuser['status_color'] = 'label-warning';
goto cT9Jz;
NNTj4: $nuser['status_color'] = 'label-success';
goto JrFQi;
zI2_q: $nuser['status_color'] = 'label-warning';
goto Pyzjt;
F7wcN: vBl7k: goto fdCEo;
TWr6g: goto VHm5m;
goto F7wcN;
lip6l: if ($nuser['status'] == $this->STATUS_NOTICE_USER_START) {
goto XoA6w;
}
goto oVJRt;
JrFQi: CrHHe: goto i1Rw2;
fdCEo: $nuser['status_name'] = '';
goto b8Bw_;
iQfbn: if (!($nuser['status'] == $this->STATUS_NOTICE_USER_WAIT_REVIEW)) {
goto vNUMN;
}
goto pd2cl;
oVJRt: if ($nuser['status'] == $this->STATUS_NOTICE_USER_STOP) {
goto vBl7k;
}
goto iQfbn;
VluPZ: goto CrHHe;
goto VJyfd;
RI5rz: $nuser['nick'] = $u['nick'];
goto lip6l;
ffwnL: $u = pdo_get($this->TABLE_USER, array("user_id" => $nuser['user_id']));
goto C6pI9;
pd2cl: $nuser['status_name'] = '';
goto zI2_q;
C6pI9: $nt = pdo_get($this->TABLE_NOTICE, array("id" => $nuser['notice_id']));
goto eseOU;
EVcek: $nuser['status_name'] = '';
goto NNTj4;
Pyzjt: vNUMN: goto TWr6g;
Ti9tp: $nuser['head_img'] = $u['head_img'];
goto Y0DQE;
cT9Jz: VHm5m: goto VluPZ;
Y0DQE: $nuser['notice_name'] = $nt['notice_name'];
goto RI5rz;
VJyfd: XoA6w: goto EVcek;
Bu3e9: $nuser['mobile'] = $u['mobile'];
goto uQUIK;
i1Rw2: FAl1n: goto MRD_d;
MRD_d:
}
goto TpG9Y;
zJh8j: $notices = pdo_fetchall('select * from ims_dhw_duihuan_notice where `status` > :status and uniacid = :uniacid', array(":status" => $this->STATUS_NOTICE_DELETED, ":uniacid" => $_W['uniacid']));
goto xI3bT;
GuG9z: $noticeUsers = pdo_fetchall('select * from ' . tablename($this->TABLE_NOTICE_USER) . ' where `status` > :status and uniacid=:uniacid', array(":status" => $this->STATUS_NOTICE_USER_DELETED, ":uniacid" => $_W['uniacid']));
goto myAKe;
VFc_t: $noticeTypes_json = json_encode($noticeTypes);
goto A_6bX;
A_6bX: $eles = $this->listKeywordElements();
goto uV0BJ;
Sppq_: $acts = pdo_getall($this->TABLE_ACTIVITY, array("uniacid" => $_W['uniacid'], "status" => 1));
goto kKrxg;
A3mjf: global $_GPC, $_W;
goto Sppq_;
EYdzX: include $this->template('noticeMng');
goto k5G_c;
xI3bT: foreach ($notices as &$notice) {
goto kmeTt;
kmeTt: if ($notice['status'] == $this->STATUS_NOTICE_START) {
goto EWqBM;
}
goto tW7yo;
osn77: goto IGefx;
goto hADBY;
t_IpZ: goto DYLAq;
goto Bl7tz;
e1d3r: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_NEW) {
goto ZOKYs;
}
goto IVB6_;
Zg49F: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_SENT_NAME;
goto bVkyP;
tW7yo: if (!($notice['status'] == $this->STATUS_NOTICE_STOP)) {
goto F2PGF;
}
goto ZfSm0;
LbWty: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_NEW_NAME;
goto MiCnI;
Bl7tz: EWqBM: goto P7xoz;
bVkyP: g5Eep: goto osn77;
IVB6_: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_SENT) {
goto dhh4q;
}
goto umu_2;
uYfPr: $notice['notice_type_name'] = $this->NOTICE_TYPE_SHOP_NEW_NAME;
goto v3vWE;
hADBY: ZOKYs: goto LbWty;
d5kOc: $notice['status_color'] = 'label-success';
goto j_Mc3;
v3vWE: Kpjin: goto CRRxL;
ZfSm0: $notice['status_name'] = '';
goto PfsRF;
BzCyE: F2PGF: goto t_IpZ;
PfsRF: $notice['status_color'] = 'label-warning';
goto BzCyE;
CRRxL: goto g5Eep;
goto z6Cy4;
S5o5P: Q0Clh: goto RV3t1;
umu_2: if (!($notice['notice_type'] == $this->NOTICE_TYPE_SHOP_NEW)) {
goto Kpjin;
}
goto uYfPr;
z6Cy4: dhh4q: goto Zg49F;
j_Mc3: DYLAq: goto e1d3r;
P7xoz: $notice['status_name'] = '';
goto d5kOc;
MiCnI: IGefx: goto S5o5P;
RV3t1:
}
goto vJKBo;
uV0BJ: $eles_json = json_encode($eles);
goto zJh8j;
vJKBo: eG7z3: goto GuG9z;
shfss: $noticeTypes = $this->listNoticeTypes();
goto VFc_t;
k5G_c:
}
public function doWebAddNotice() {
goto LwqIw;
OzlqZ: f7MeB: goto FzIwM;
Juy48: $data['content_json'] = json_encode($contentJson);
goto uWnJH;
ZEL8p: $noticeType = trim($_GPC['noticeType']);
goto wK0v3;
WOgBy: $fd_keyword1 = trim($_GPC['fd_keyword1']);
goto AZs9A;
BFoOe: if (!empty($noticeName)) {
goto jOL_E;
}
goto IP2Y8;
LwqIw: global $_GPC, $_W;
goto Gs82w;
Gs82w: $activityId = $_GPC['activityId'];
goto ZEL8p;
K7n6A: message('', $this->createWebUrl('noticeMng'), $type = 'success');
goto TPEGL;
gH78q: $data['notice_name'] = $noticeName;
goto gXGrm;
vRkvr: return;
goto ooCfK;
vMM2o: if (empty($fd_first)) {
goto f7MeB;
}
goto qERar;
RIAlv: $contentJson['keyword4'] = $fd_keyword4;
goto KbmVc;
wAvqk: $fd_keyword4 = trim($_GPC['fd_keyword4']);
goto Sk3_9;
qFVkW: fihO2: goto n33_Y;
D2LAf: $data['create_time'] = date('Y-m-d H:i:s', time());
goto FhHbX;
sMVIj: message('[][]', $this->createWebUrl('noticeMng'), $type = 'error');
goto vRkvr;
QTNsB: $contentJson['keyword5'] = $fd_keyword5;
goto mQS70;
HDWSo: return;
goto KRmbx;
Wg2Mq: $templateId = trim($_GPC['templateId']);
goto XX7TT;
KRmbx: jOL_E: goto M1288;
FzIwM: if (empty($fd_remark)) {
goto fihO2;
}
goto dsnZl;
RfX95: if (!($fd_keyword2 != '-1')) {
goto b0tru;
}
goto RSCrU;
GJj2t: $data['wx_template_id'] = $templateId;
goto TkLmd;
d8CU9: if (!empty($noticeType)) {
goto XmWz7;
}
goto iaLNo;
BFyr_: return;
goto b5yt0;
M1288: if (!empty($templateId)) {
goto T1sB5;
}
goto WzztT;
XUS26: MQzs0: goto RfX95;
AZs9A: $fd_keyword2 = trim($_GPC['fd_keyword2']);
goto irtu5;
qmh3K: return;
goto qOmAm;
EZggJ: $contentJson['remark'] = '';
goto vMM2o;
KbmVc: Hzbik: goto kQ2dO;
oHFmR: $act = CacheUtil::getActivity($activityId);
goto D1AnV;
gXGrm: $data['notice_type'] = $noticeType;
goto mc1gf;
qOmAm: XmWz7: goto BFoOe;
knPCY: $fd_first = trim($_GPC['fd_first']);
goto P9AmS;
FhHbX: pdo_insert($this->TABLE_NOTICE, $data);
goto K7n6A;
raWjI: if (!($fd_keyword3 != '-1')) {
goto veadV;
}
goto UMPWl;
wK0v3: $noticeName = trim($_GPC['noticeName']);
goto Wg2Mq;
ooCfK: xAdQ2: goto d8CU9;
Sk3_9: $fd_keyword5 = trim($_GPC['fd_keyword5']);
goto Yp1jK;
TkLmd: $contentJson['first'] = '';
goto EZggJ;
WzztT: message('[][id]', $this->createWebUrl('noticeMng'), $type = 'error');
goto BFyr_;
Ack0g: b0tru: goto raWjI;
mc1gf: $data['activity_id'] = $activityId;
goto oHFmR;
uWnJH: $data['status'] = $this->STATUS_NOTICE_STOP;
goto D2LAf;
b5yt0: T1sB5: goto knPCY;
P9AmS: $fd_remark = trim($_GPC['fd_remark']);
goto WOgBy;
ODI3v: $contentJson['keyword1'] = $fd_keyword1;
goto XUS26;
mQS70: vcXou: goto Juy48;
XX7TT: if (!($activityId == '' || $activityId == 0)) {
goto xAdQ2;
}
goto sMVIj;
iaLNo: message('[][]', $this->createWebUrl('noticeMng'), $type = 'error');
goto qmh3K;
Yp1jK: $data['uniacid'] = $_W['uniacid'];
goto gH78q;
kQ2dO: if (!($fd_keyword5 != '-1')) {
goto vcXou;
}
goto QTNsB;
qERar: $contentJson['first'] = $fd_first;
goto OzlqZ;
IP2Y8: message('[][]', $this->createWebUrl('noticeMng'), $type = 'error');
goto HDWSo;
UMPWl: $contentJson['keyword3'] = $fd_keyword3;
goto b1B1Z;
n33_Y: if (!($fd_keyword1 != '-1')) {
goto MQzs0;
}
goto ODI3v;
RSCrU: $contentJson['keyword2'] = $fd_keyword2;
goto Ack0g;
b1B1Z: veadV: goto YPmWy;
D1AnV: $data['activity_name'] = $act['activity_name'];
goto GJj2t;
irtu5: $fd_keyword3 = trim($_GPC['fd_keyword3']);
goto wAvqk;
YPmWy: if (!($fd_keyword4 != '-1')) {
goto Hzbik;
}
goto RIAlv;
dsnZl: $contentJson['remark'] = $fd_remark;
goto qFVkW;
TPEGL:
}
public function doWebNoticeDetail() {
goto L3oiD;
QyNGt: if ($notice['status'] == $this->STATUS_NOTICE_START) {
goto GYuq2;
}
goto KpnMd;
H7eoY: CAqiq: goto cg9B7;
suYVF: $notice['notice_type_name'] = $this->NOTICE_TYPE_SHOP_NEW_NAME;
goto H7eoY;
GLW6m: goto nIY70;
goto lNIvB;
okDdd: $notice['status_color'] = 'label-warning';
goto iSXBH;
K9arJ: if (!($notice['notice_type'] == $this->NOTICE_TYPE_SHOP_NEW)) {
goto CAqiq;
}
goto suYVF;
k8YyZ: dOA5B: goto FqpVQ;
L3oiD: global $_GPC, $_W;
goto Gvuka;
DTxyV: $notice['status_name'] = '';
goto zAt9w;
cg9B7: goto UoLCi;
goto BSo4I;
kxkFh: $notice['status_name'] = '';
goto okDdd;
KpnMd: if (!($notice['status'] == $this->STATUS_NOTICE_STOP)) {
goto YowNk;
}
goto kxkFh;
FqpVQ: return json_encode($notice);
goto MlOVE;
E8qao: goto dOA5B;
goto DqDHb;
K_lPa: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_SENT) {
goto teaFP;
}
goto K9arJ;
lNIvB: GYuq2: goto DTxyV;
bEpD9: UoLCi: goto E8qao;
jqNgX: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_SENT_NAME;
goto bEpD9;
XxjhL: if ($notice['notice_type'] == $this->NOTICE_TYPE_CLIENT_NEW) {
goto R1UZo;
}
goto K_lPa;
Gvuka: $noticeId = trim($_GPC['notice_id']);
goto ihDk8;
zAt9w: $notice['status_color'] = 'label-success';
goto FwHa5;
iSXBH: YowNk: goto GLW6m;
DqDHb: R1UZo: goto ciiC8;
BSo4I: teaFP: goto jqNgX;
FwHa5: nIY70: goto XxjhL;
ciiC8: $notice['notice_type_name'] = $this->NOTICE_TYPE_CLIENT_NEW_NAME;
goto k8YyZ;
ihDk8: $notice = pdo_get($this->TABLE_NOTICE, array("id" => $noticeId));
goto QyNGt;
MlOVE:
}
public function doWebUpdateNotice() {
goto HiHKl;
uJL8G: if (!($fd_keyword2 != '-1')) {
goto DwwHZ;
}
goto Bi1v4;
zemBM: $fd_keyword5 = $_GPC['fd_keyword5'];
goto mG8Pe;
AD9fV: $act = CacheUtil::getActivity($activityId);
goto CIX6l;
eJsTs: $data['notice_name'] = $noticeName;
goto zrkLi;
nU6VK: obLvG: goto uJL8G;
ehEgJ: $activityId = $_GPC['activityId'];
goto fbMty;
AzYIF: pdo_update($this->TABLE_NOTICE, $data, array("id" => $noticeId));
goto fCCTm;
TSey9: $contentJson['remark'] = '';
goto v76N1;
mBdeK: $data['content_json'] = json_encode($contentJson);
goto uLoaD;
W8IRZ: $noticeName = trim($_GPC['noticeName']);
goto EbTSN;
HiHKl: global $_GPC, $_W;
goto HsHb8;
btqrc: EQylt: goto notJf;
wQbOZ: if (!($fd_keyword3 != '-1')) {
goto fHgKT;
}
goto vTnu_;
xI519: $fd_keyword1 = $_GPC['fd_keyword1'];
goto y26ez;
v76N1: if (empty($fd_first)) {
goto MKFTP;
}
goto kD31u;
WppA2: $fd_keyword4 = $_GPC['fd_keyword4'];
goto zemBM;
fbMty: $noticeType = trim($_GPC['noticeType']);
goto W8IRZ;
L4fNj: $fd_keyword3 = $_GPC['fd_keyword3'];
goto WppA2;
ubKlF: LmSQ4: goto eJsTs;
O4L8N: fHgKT: goto bqAve;
notJf: if (!($fd_keyword5 != '-1')) {
goto LmSQ4;
}
goto XS6iy;
zrkLi: $data['notice_type'] = $noticeType;
goto NJyB1;
fCCTm: message('', $this->createWebUrl('noticeMng'), $type = 'success');
goto jnvHz;
U9rUD: $contentJson['keyword4'] = $fd_keyword4;
goto btqrc;
uLoaD: $data['uniacid'] = $_W['uniacid'];
goto AzYIF;
ByiAC: $contentJson['keyword1'] = $fd_keyword1;
goto nU6VK;
XS6iy: $contentJson['keyword5'] = $fd_keyword5;
goto ubKlF;
rYRnH: if (!($fd_keyword1 != '-1')) {
goto obLvG;
}
goto ByiAC;
H2ApO: $fd_remark = trim($_GPC['fd_remark']);
goto xI519;
bqAve: if (!($fd_keyword4 != '-1')) {
goto EQylt;
}
goto U9rUD;
CIX6l: $data['activity_name'] = $act['activity_name'];
goto cKsmN;
cgG1s: $contentJson['remark'] = $fd_remark;
goto QQ48a;
vTnu_: $contentJson['keyword3'] = $fd_keyword3;
goto O4L8N;
QQ48a: fXSoO: goto rYRnH;
Bi1v4: $contentJson['keyword2'] = $fd_keyword2;
goto MaVFD;
y26ez: $fd_keyword2 = $_GPC['fd_keyword2'];
goto L4fNj;
Ba2Sa: if (empty($fd_remark)) {
goto fXSoO;
}
goto cgG1s;
HsHb8: $noticeId = $_GPC['notice_id'];
goto ehEgJ;
NJyB1: $data['activity_id'] = $activityId;
goto AD9fV;
MaVFD: DwwHZ: goto wQbOZ;
dl6Mc: $fd_first = trim($_GPC['fd_first']);
goto H2ApO;
kD31u: $contentJson['first'] = $fd_first;
goto egiAN;
cKsmN: $data['wx_template_id'] = $templateId;
goto mBdeK;
EbTSN: $templateId = trim($_GPC['templateId']);
goto dl6Mc;
egiAN: MKFTP: goto Ba2Sa;
mG8Pe: $contentJson['first'] = '';
goto TSey9;
jnvHz:
}
public function doWebNoticeStatusChange() {
goto KhThd;
qi9wo: pdo_update($this->TABLE_NOTICE, array("status" => $this->STATUS_NOTICE_STOP), array("id" => $id));
goto HYc_p;
KhThd: global $_GPC, $_W;
goto hKGI9;
hKGI9: $id = trim($_GPC['id']);
goto ldmjt;
xFc4o: return json_encode($rst);
goto gWDvD;
MMzAq: if ($status == $this->STATUS_NOTICE_STOP) {
goto fDyBk;
}
goto wF1cj;
gl6r1: $rst['success'] = true;
goto UcdIG;
RmIW5: WTIBG: goto KDn23;
wF1cj: if (!($status == $this->STATUS_NOTICE_START)) {
goto WTIBG;
}
goto WzFZY;
UcdIG: $rst['msg'] = '';
goto xFc4o;
WzFZY: pdo_update($this->TABLE_NOTICE, array("status" => $this->STATUS_NOTICE_START), array("id" => $id));
goto RmIW5;
HYc_p: TVD_j: goto gl6r1;
n5zj3: fDyBk: goto qi9wo;
KDn23: goto TVD_j;
goto n5zj3;
ldmjt: $status = trim($_GPC['status']);
goto MMzAq;
gWDvD:
}
public function doWebNoticeUserStatusChange() {
goto BxytH;
WhFAv: pdo_update($this->TABLE_NOTICE_USER, array("status" => $this->STATUS_NOTICE_USER_STOP), array("id" => $id));
goto I0s1e;
bQXtV: oCqZK: goto vlA6w;
p6rPg: $rst['success'] = true;
goto wyvWp;
T1eaN: pdo_update($this->TABLE_NOTICE_USER, array("status" => $this->STATUS_NOTICE_USER_START), array("id" => $id));
goto bQXtV;
wyvWp: $rst['msg'] = '';
goto Qpen9;
lnuAW: $status = trim($_GPC['status']);
goto BxgYh;
RGMNE: $id = trim($_GPC['id']);
goto lnuAW;
M6jqb: ojifY: goto WhFAv;
sA1GQ: if (!($status == $this->STATUS_NOTICE_USER_WAIT_REVIEW)) {
goto txCFC;
}
goto VdEal;
I0s1e: mXZnc: goto p6rPg;
KaAvs: PQG8F: goto T1eaN;
Qpen9: return json_encode($rst);
goto EkwYY;
NWWmC: goto oCqZK;
goto KaAvs;
VdEal: pdo_update($this->TABLE_NOTICE_USER, array("status" => $this->STATUS_NOTICE_USER_START), array("id" => $id));
goto Ocmz7;
RNrKi: if ($status == $this->STATUS_NOTICE_USER_START) {
goto PQG8F;
}
goto sA1GQ;
BxytH: global $_GPC, $_W;
goto RGMNE;
vlA6w: goto mXZnc;
goto M6jqb;
BxgYh: if ($status == $this->STATUS_NOTICE_USER_STOP) {
goto ojifY;
}
goto RNrKi;
Ocmz7: txCFC: goto NWWmC;
EkwYY:
}
public function doWebGetReceiverSubmitUrl() {
goto ZpIjG;
Ha57r: $url = $this->createMobileUrl('receiver');
goto oLkR6;
oLkR6: $url = 'app' . substr($url, 1) . '¬ice_id=' . $noticeId;
goto IVpiu;
Az31b: $noticeId = $_GPC['notice_id'];
goto Ha57r;
hk_Rc: return json_encode($rst);
goto xuSUt;
ZpIjG: global $_GPC, $_W;
goto Az31b;
wutnc: $rst['url'] = $url;
goto hk_Rc;
tJDta: $rst['success'] = true;
goto wutnc;
IVpiu: $url = $_W['siteroot'] . $url;
goto tJDta;
xuSUt:
}
public function doMobileReceiver() {
goto PnaE1;
zQitC: $user['uniacid'] = $_W['uniacid'];
goto QYtDC;
qxoPn: $user['user_id'] = pdo_insertid();
goto wRiX7;
h50g6: $user['head_img'] = $oauthuser['avatar'];
goto cCgTT;
IYdl9: $user = pdo_get($this->TABLE_USER, array("openid" => $openid, "uniacid" => $_W['uniacid']));
goto g28_g;
wRiX7: mT5lz: goto CQnN1;
CQnN1: include $this->template('receiver_submit');
goto tzNLf;
ku8g4: $oauthuser = $this->dhw_checkoauth();
goto QTJqN;
cCgTT: $user['nick'] = $oauthuser['nickname'];
goto zQitC;
QYtDC: $user['create_time'] = date('Y-m-d H:i:s', time());
goto oXuBC;
g28_g: if ($user) {
goto mT5lz;
}
goto TEcWs;
EkF0o: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto RZWsm;
RZWsm: $noticeId = $_GPC['notice_id'];
goto ku8g4;
QTJqN: $openid = $oauthuser['from_user'];
goto IYdl9;
TEcWs: $user['openid'] = $oauthuser['from_user'];
goto h50g6;
oXuBC: pdo_insert($this->TABLE_USER, $user);
goto qxoPn;
PnaE1: global $_GPC, $_W;
goto EkF0o;
tzNLf:
}
public function doMobileReceiverSubmit() {
goto qCa4s;
BKeVZ: $data['uniacid'] = $_W['uniacid'];
goto ziJBz;
DPxsX: jZNJV: goto wy0k3;
SkQYI: pdo_update($this->TABLE_USER, $userData, array("user_id" => $userId));
goto DPxsX;
NJYwr: $rst['msg'] = '';
goto oeY21;
YmuP3: $url = 'app' . substr($url, 1);
goto MxoFi;
DfKNU: pdo_insert($this->TABLE_NOTICE_USER, $data);
goto IyI9f;
IfZ2o: $rst['url'] = $url;
goto hHSeg;
qCa4s: global $_GPC, $_W;
goto fcjTH;
V3Wp9: $data['notice_id'] = $noticeId;
goto lCl3L;
fcjTH: $name = trim($_GPC['name']);
goto OPm1e;
gPBn4: $userId = $_GPC['userid'];
goto HAjFe;
Wm6RT: $openid = trim($_GPC['openid']);
goto ziyLv;
oeY21: $url = $this->createMobileUrl('errorPage');
goto YmuP3;
ziJBz: $data['user_id'] = $userId;
goto V3Wp9;
IyI9f: $userData['real_name'] = $name;
goto Q3aVz;
MxoFi: $url = $_W['siteroot'] . $url;
goto IfZ2o;
gf8S1: if ($tempUser) {
goto jZNJV;
}
goto DfKNU;
HAjFe: $noticeId = $_GPC['noticeId'];
goto BKeVZ;
lCl3L: $data['status'] = $this->STATUS_NOTICE_USER_WAIT_REVIEW;
goto MpSPD;
hHSeg: return json_encode($rst);
goto qjl_a;
OPm1e: $mobile = trim($_GPC['mobile']);
goto Wm6RT;
wy0k3: $rst['success'] = true;
goto NJYwr;
dN9Nh: $tempUser = pdo_get($this->TABLE_NOTICE_USER, array("user_id" => $userId, "uniacid" => $_W['uniacid'], "notice_id" => $noticeId));
goto gf8S1;
MpSPD: $data['create_time'] = date('Y-m-d H:i:s', time());
goto dN9Nh;
ziyLv: $headImg = trim($_GPC['headImg']);
goto gPBn4;
Q3aVz: $userData['mobile'] = $mobile;
goto SkQYI;
qjl_a:
}
public function doMobileErrorPage() {
goto jePs_;
WY0Wd: $rst['pageMsg'] = '';
goto gA33_;
jePs_: global $_W, $_GPC;
goto WY0Wd;
gA33_: include $this->template('error');
goto wEKxI;
wEKxI:
}
private function listNoticeTypes() {
goto nYfCO;
nYfCO: $list = array();
goto wavVx;
M2IPy: $list[] = array("notice_type" => $this->NOTICE_TYPE_CLIENT_SENT, "notice_type_name" => $this->NOTICE_TYPE_CLIENT_SENT_NAME);
goto R4ufO;
P_XO9: return $list;
goto AyM8F;
R4ufO: $list[] = array("notice_type" => $this->NOTICE_TYPE_CLIENT_NEW, "notice_type_name" => $this->NOTICE_TYPE_CLIENT_NEW_NAME);
goto P_XO9;
wavVx: $list[] = array("notice_type" => $this->NOTICE_TYPE_SHOP_NEW, "notice_type_name" => $this->NOTICE_TYPE_SHOP_NEW_NAME);
goto M2IPy;
AyM8F:
}
private function listKeywordElements() {
goto YEWCl;
NuaBs: $list[] = array("ele" => $this->KEYWORD_ELE_KUAIDI_CORP, "ele_name" => $this->KEYWORD_ELE_KUAIDI_CORP_NAME);
goto xWrLn;
fv4wN: return $list;
goto rMWqk;
sgN3U: $list[] = array("ele" => $this->KEYWORD_ELE_PRODUCT_NAME, "ele_name" => $this->KEYWORD_ELE_PRODUCT_NAME_NAME);
goto s7N9F;
U16W1: $list[] = array("ele" => $this->KEYWORD_ELE_CARD_NO, "ele_name" => $this->KEYWORD_ELE_CARD_NO_NAME);
goto fQ0HO;
s7N9F: $list[] = array("ele" => $this->KEYWORD_ELE_CLIENT_ORDER_TIME, "ele_name" => $this->KEYWORD_ELE_CLIENT_ORDER_TIME_NAME);
goto U16W1;
YEWCl: $list = array();
goto sgN3U;
RNjBe: $list[] = array("ele" => $this->KEYWORD_ELE_KUAIDI_NO, "ele_name" => $this->KEYWORD_ELE_KUAIDI_NO_NAME);
goto NuaBs;
xWrLn: $list[] = array("ele" => $this->KEYWORD_ELE_RECEIVE_INFO, "ele_name" => $this->KEYWORD_ELE_RECEIVE_INFO_NAME);
goto fv4wN;
fQ0HO: $list[] = array("ele" => $this->KEYWORD_ELE_ORDER_STATUS, "ele_name" => $this->KEYWORD_ELE_ORDER_STATUS_NAME);
goto RNjBe;
rMWqk:
}
private function checkValid($activityId) {
goto qfAAL;
zXffp: CacheUtil::dhwlog('' . $now);
goto GPaQi;
qfAAL: $now = time();
goto zXffp;
GPaQi: $act = pdo_get('dhw_duihuan_activity', array("activity_id" => $activityId));
goto BWU0L;
BWU0L: return $this->checkValidDo($act);
goto dODWA;
dODWA:
}
private function checkValidDo($activity) {
goto SgAk3;
FIgkO: return self::ACTIVITY_ERROR_NOT_EXIST;
goto rxPJR;
gy4DA: goto f6uoG;
goto L0KHS;
uluA5: if ($now > strtotime($activity['end_time'])) {
goto tMR8U;
}
goto B3Kd1;
xmxKt: a0VxH: goto jl60V;
ZOTyD: goto CaAYI;
goto Ax9Zi;
i9hze: return self::ACTIVITY_ERROR_NOT_EXIST;
goto F51jk;
emdPf: if (!$activity) {
goto B0cdi;
}
goto KwI24;
jl60V: goto SqLXb;
goto u6dWh;
SgAk3: $now = time();
goto emdPf;
INKEr: D90zH: goto ZOTyD;
Ax9Zi: B0cdi: goto i9hze;
CSt61: tMR8U: goto grCEB;
jlI1y: return self::ACTIVITY_ERROR_NOT_EXIST;
goto INKEr;
R6vZh: return self::ACTIVITY_ERROR_NOT_START;
goto JewZR;
DKgeA: if ($activity['status'] == -1) {
goto I7T2I;
}
goto uluA5;
Tkfl2: goto a0VxH;
goto CSt61;
L0KHS: TPWEa: goto R6vZh;
B3Kd1: if ($now < strtotime($activity['start_time'])) {
goto TPWEa;
}
goto qC2Xm;
rxPJR: SqLXb: goto SKF68;
u6dWh: I7T2I: goto FIgkO;
grCEB: return self::ACTIVITY_ERROR_ALREADY_END;
goto xmxKt;
SKF68: goto D90zH;
goto tAaef;
JewZR: f6uoG: goto Tkfl2;
qC2Xm: return null;
goto gy4DA;
KwI24: if ($activity['status'] == 0) {
goto GCJOw;
}
goto DKgeA;
tAaef: GCJOw: goto jlI1y;
F51jk: CaAYI: goto bHA3q;
bHA3q:
}
public function doMobileOrders() {
goto FuTQe;
EyM8Y: include $this->template('error');
goto OA1W2;
iEdSA: $user['user_id'] = pdo_insertid();
goto Lolp0;
Lolp0: Dey4B: goto Wsc5d;
qyFnY: $user['openid'] = $oauthuser['from_user'];
goto nlIDO;
lG3Vi: $oauthuser = $this->dhw_checkoauth();
goto c98Cz;
SsN2m: $user = pdo_get($this->TABLE_USER, array("openid" => $oauthuser['from_user'], "uniacid" => $_W['uniacid']));
goto Qopf3;
urcaf: if (!($res != null)) {
goto AabwV;
}
goto Ak0PR;
LuLkq: $user['nick'] = $oauthuser['nickname'];
goto sLky7;
KuJGW: $actId = $_GPC['activityId'];
goto eEKHw;
sLky7: $user['uniacid'] = $_W['uniacid'];
goto IdU5f;
P8a2O: foreach ($orders as &$order) {
goto HcvBf;
FzMnE: bYIW6: goto Coc3J;
Coc3J: $order['receive_type_name'] = '';
goto iGnd1;
Qjc_U: wo8Lz: goto fixSl;
aNbrS: BvrdE: goto wUvyz;
iGnd1: xrg1R: goto Qjc_U;
HcvBf: if ($order['receive_type'] == $this->RECEIVE_TYPE_PEISONG) {
goto bYIW6;
}
goto Wjz5G;
QNwHw: $order['receive_type_name'] = '';
goto aNbrS;
Wjz5G: if (!($order['receive_type'] == $this->RECEIVE_TYPE_ZITI)) {
goto BvrdE;
}
goto QNwHw;
wUvyz: goto xrg1R;
goto FzMnE;
fixSl:
}
goto A7s0c;
Szhpm: $_W['page']['title'] = '-';
goto lG3Vi;
L3zD5: include $this->template('orders');
goto VgQ1r;
a1Gzb: if (empty($actId)) {
goto TuM51;
}
goto lnqH6;
OA1W2: return;
goto EC1ci;
IdU5f: $user['create_time'] = date('Y-m-d H:i:s', time());
goto KjQge;
c98Cz: $resource['static'] = tomedia(DHW_DUIHUAN_STATIC_MOBILE);
goto KuJGW;
riWLb: return message('', 'refresh', 'error');
goto flxuY;
hJpSh: aXGtv: goto BY6cb;
FuTQe: global $_W, $_GPC;
goto Szhpm;
flxuY: ROp02: goto SsN2m;
Qopf3: if ($user) {
goto Dey4B;
}
goto qyFnY;
BY6cb: E5jqw: goto EyM8Y;
Wsc5d: $orders = pdo_fetchall('select c.card_no,dh.mobile,dh.consignee,dh.addr,dh.product_name,dh.receive_type,dh.duihuan_id,dh.duihuan_time
from ' . tablename($this->TABLE_DUIHUAN) . ' dh
left join ' . tablename($this->TABLE_CARD) . ' c on c.card_id = dh.card_id
where dh.user_id = :user_id and dh.uniacid = :uniacid and dh.activity_id = :activity_id order by dh.create_time desc', array(":user_id" => $user['user_id'], ":uniacid" => $_W['uniacid'], ":activity_id" => $actId));
goto P8a2O;
A7s0c: eDlat: goto L3zD5;
XW4m6: $res = $this->checkValidDo($act);
goto urcaf;
nlIDO: $user['head_img'] = $oauthuser['avatar'];
goto LuLkq;
ucwy6: if (!(strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == false)) {
goto ROp02;
}
goto riWLb;
eEKHw: $act = null;
goto a1Gzb;
lnqH6: $act = CacheUtil::getActivity($actId);
goto b0YKT;
b0YKT: TuM51: goto XW4m6;
LvHgr: $_W['page']['title'] = $act['title2'];
goto ucwy6;
Ak0PR: switch ($res) {
case self::ACTIVITY_ERROR_NOT_START: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_START_STR;
goto E5jqw;
case self::ACTIVITY_ERROR_ALREADY_END: $rst['pageMsg'] = self::ACTIVITY_ERROR_ALREADY_END_STR;
goto E5jqw;
case self::ACTIVITY_ERROR_NOT_EXIST: $rst['pageMsg'] = self::ACTIVITY_ERROR_NOT_EXIST_STR;
goto E5jqw;
default: goto E5jqw;
}
goto hJpSh;
KjQge: pdo_insert($this->TABLE_USER, $user);
goto iEdSA;
EC1ci: AabwV: goto LvHgr;
VgQ1r:
}
public function doWebActivityRule() {
}
function checkMobile($str) {
goto HRX3S;
utStm: YSV3F: goto rDQlB;
HRX3S: $pattern = '/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(14[0-9]{1}))+\\d{8})$/';
goto aAe3p;
RIGb4: return false;
goto ylVJZ;
aAe3p: if (preg_match($pattern, $str)) {
goto qNM1j;
}
goto RIGb4;
ylVJZ: goto YSV3F;
goto zTMHm;
zTMHm: qNM1j: goto vt2Fw;
vt2Fw: return true;
goto utStm;
rDQlB:
}
function encryptCode($code) {
return sha1(md5($code) . sha1($code));
}
function getMillisecond() {
list($t1, $t2) = explode(' ', microtime());
return (double) sprintf('%.0f', (floatval($t1) + floatval($t2)) * 1000);
}
}
?>
Function Calls
None |
Stats
MD5 | b5bab246c823159dc35964807abcccc0 |
Eval Count | 0 |
Decode Time | 140 ms |