require_once dirname(dirname(__FILE__)) . '/app.php'; $action = strval($_GET['action']); if ('unsubscribe' == $action) { $html = render('ajax_dialog_smsun'); json($html, 'dialog'); } elseif ('unsubscribecheck' == $action) { $mobile = trim(strval($_GET['mobile'])); $verifycode = trim(strval($_GET['verifycode'])); if (Utility::CaptchaCheck($verifycode)) { $sms = Table::Fetch('smssubscribe', $mobile, 'mobile'); if (!$sms) { $html = render('ajax_dialog_smsunsuc'); } else { if ($sms['enable'] == 'N') { ZSMSSubscribe::UnSubscribe($mobile); $html = render('ajax_dialog_smsunsuc'); } else { $secret = ZSMSSubscribe::Secret($mobile); $html = render('ajax_dialog_smscode'); sms_secret($mobile, $secret, false); } } json($html, 'dialog'); } else { json('captcha_again();', 'eval'); } } else { if ('subscribe' == $action) { $html = render('ajax_dialog_smssub'); json($html, 'dialog');