function __construct() { parent::__construct(); $this->_user = get_user(); $error = null; if ($this->_user) { $salesman = M('loan_salesman')->where(['uid' => $this->_user['uid']])->find(); if ($salesman) { if ($salesman['status'] != 1) { $error = '此账号已被禁用!'; } } else { $error = '此已登录账号' . $this->_user['uname'] . '尚未开通审核权限!'; } $this->_salesman = $salesman; } else { $error = '登录超时,请重新登录!'; } // 停用 // $error = '审单网页版已停用,请使用指尖审单App。'; if ($error) { if (IS_POST) { ajax_error($error); } $this->display('login'); exit; } }
/** * @title 申请兑换 * * @param int $gift_id 物品编号 * * @method get */ public function apply($gift_id = 0) { $user = get_user() or ajax_error('USER_NOT_LOGIN', '登录超时,请重新登录!'); $creditModel = D('Credit'); $creditModel->apply($user['uid'], $gift_id) or ajax_error($creditModel->getError()); ajax_success(); }
/** * @title 获取"我的"信息 * * @param string $os 操作系统 android android/ios(弃用,将改为通过http_user_agent自动分析) * @method get */ public function user($os) { $user = get_user() or ajax_error('USER_NOT_LOGIN', '登录超时,请重新登录!'); $uid = $user['uid']; // 判断此学校的信用额度 $limit_range = '3000~8000元'; $university_config = M('loan_config_university')->find($user['university_id']); if ($university_config) { $money = M('loan_config_university_money')->where(['education' => $university_config['education']])->field('min(money) min,max(money) max')->find(); $limit_range = $money ? number_format($money['min'], 0, '.', '') . '~' . number_format($money['max'], 0, '.', '') : $limit_range; } // 认证状态 $contract_status = M('loan_user_contract')->where(['uid' => $uid])->getField('status'); $auth_status = $contract_status === null ? 0 : $contract_status + 1; $user_money_limit = $limit_range; if ($auth_status == 2) { $user_money_limit = M('loan_user')->where(['uid' => $uid])->getField('money_limit') + 0; } $auth_btn_config = ['0' => '立即认证', '1' => '等待审核', '2' => '认证完成', '3' => '认证失败']; $auth_text_config = ['0' => '立即完成身份认证,即可获得' . $limit_range . '信用额度', '1' => '等待完成身份认证,即可获得' . $limit_range . '信用额度', '2' => '恭喜,已通过身份认证,现已获得' . $user_money_limit . '信用额度', '3' => '等待完成身份认证,即可获得' . $limit_range . '信用额度']; $loan_max_money = $loan_available_money = 0; if ($auth_status == 2) { $loan_user = M('loan_user')->where('uid=' . $uid)->find(); if ($loan_user) { $loan_max_money = $loan_user['money_limit']; $loan_available_money = $loan_user['money_limit'] - ($loan_user['total_money_loan'] - $loan_user['total_money_return']); } } // 'loan_max_money' => number_format ( $loan_max_money, 2, '.', '' ), $userMoneyModel = new \Common\Model\UserMoneyModel(); ajax_success(['user' => ['uname' => $user['uname'], 'realname' => $user['realname']], 'title' => '你好,' . ($user['realname'] ?: $user['uname']), 'sub_title' => isset($auth_text_config[$auth_status]) ? $auth_text_config[$auth_status] : '', 'auth_btn' => ['text' => isset($auth_btn_config[$auth_status]) ? $auth_btn_config[$auth_status] : '', 'title' => '个人认证', 'url' => U('/user/contract@loan') . '?from=' . $os], 'top_menu' => [['title' => '可用额度', 'number' => number_format($loan_available_money, 2, '.', ''), 'url' => U('/user/contract@loan') . '?from=' . $os], ['title' => '我的钱包', 'number' => $userMoneyModel->get($user['uid']), 'url' => U('/wallet/@mobile') . '?from=' . $os], ['title' => '我的积分', 'number' => M('credit')->where('uid=' . $uid)->getField('credit') + 0, 'url' => U('/credit/@mobile') . '?from=' . $os]], 'list_menu' => [['title' => '我的订单', 'icon' => 'http://zjdxdl.qiniudn.com/app_resource_v3_me_order.png', 'tip' => '', 'url' => U('/user/order/@loan') . '?from=' . $os], ['title' => '我的账单', 'icon' => 'http://zjdxdl.qiniudn.com/app_resource_v3_me_bill.png', 'tip' => '', 'url' => U('/user/bill/@loan') . '?from=' . $os], ['title' => '我的兼职', 'icon' => 'http://zjdxdl.qiniudn.com/app_resource_v3_me_job.png', 'tip' => '', 'url' => U('/job/user/@mobile') . '?from=' . $os]], 'feedback' => ['uncheck' => M('feedback_list')->where(['uid' => $uid])->getField('unread_num') ?: 0]]); }
public function vote() { $id = I('get.id'); $vote = $model = M('common_vote')->find($id) or $this->error('此投票不存在!'); $vote['status'] == 1 or $this->errror('投票已结束!'); if (IS_POST) { $user = get_user() or $this->error('请先登录!'); $model = M("common_vote_log"); $model->where(['vote_id' => $vote['id'], 'uid' => $user['uid']])->count() && ajax_error('每人仅限投一票!'); $option_id = I('get.option_id'); $option_title = M('common_vote_option')->where(['id' => $option_id, 'status' => 1])->getField('title') or ajax_error('此投票项不存在!'); $model->add(['vote_id' => $vote['id'], 'option_id' => $option_id, 'option_title' => $option_title, 'uid' => $user['uid'], 'uname' => $user['uname'], 'created' => time()]); M('common_vote_option')->where(['id' => $option_id])->setInc('votes'); ajax_success(); } $option = M('common_vote_option')->where(['vote_id' => $vote['id'], 'status' => 1])->order('id')->select(); $total_votes = 0; foreach ($option as $key => $vo) { $total_votes += $vo['votes']; } foreach ($option as $key => $vo) { $option[$key]['rate'] = $total_votes > 0 ? intval($vo['votes'] / $total_votes * 100) : 0; } $this->assign('vote', $vote); $this->assign('_option', $option); $this->display(); }
protected function _error($data) { if (IS_AJAX) { ajax_error($data); } else { $this->error($data); } }
function olc_output_warning($warning, $force_errorBox = false) { if (IS_AJAX_PROCESSING && !$force_errorBox) { ajax_error($warning, true); } else { new errorBox(array(array('text' => HTML_BR . olc_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . BLANK . $warning . '<br/><br/>'))); } }
public function upload() { $_FILES && isset($_FILES['file']) or ajax_error('FILE_NOT_FOUND', '请选择上传文件!'); $upload = new \Think\Upload(['maxSize' => 0, 'subName' => 'loan_' . date('YmdH'), 'exts' => ['jpg', 'gif', 'png', 'jpeg']]); $info = $upload->upload() or ajax_error('UPLOAD_ERROR', $upload->getError()); $url = array_shift($info)['url']; ajax_success(['url' => $url]); }
public function get_resumes($job_id) { $job_rel = M()->table('__JOB_IMPORT_REL__ jir')->join('__JOB__ j ON j.id = jir.job_id')->where(['j.from_type' => static::TYPE, 'jir.externel_id' => $job_id])->find(); if (!$job_rel) { ajax_error('not found job'); } $resumes = $this->_get_resumes_by_job_id($job_rel['job_id']); ajax_success($resumes); }
function setClearanceLevel($level) { //cannot currently detect clearance level for basic-auth users if (isset($_SERVER['PHP_AUTH_USER'])) { return; } if ((int) $_SESSION['clearance'] < $level) { ajax_error('You do not have sufficient permissions to perform this operation.'); } }
/** * 输入用户真实姓名 */ public function input_realname() { if (IS_POST) { $realname = I('post.realname') or ajax_error('请输入真实姓名'); M('user')->where(['uid' => $this->user->self()['uid'], 'realname' => ''])->save(['realname' => $realname]); ajax_success(); } else { $this->display(); } }
public function login() { $account = I('post.account'); $password = I('post.password'); $userModel = D('Common/User'); $user = $userModel->field('uid,uname,password,salt')->where(['mobile' => $account])->find() or ajax_error('ACCOUNT_NOT_FOUND', '此账号不存在!'); $userModel->password($password, $user['salt']) == $user['password'] or ajax_error('PASSWORD_ERROR', '登录密码错误!'); $salesman = M('loan_salesman')->where(['uid' => $user['uid']])->find() or ajax_error('此账号' . $user['uname'] . '尚未开通校园专员权限!'); $salesman['status'] == 1 or ajax_error('此账号已被禁用!'); $userModel->login_success($user['uid'], $user['uname']); ajax_success($user); }
public function contract_auth() { $uid = $this->user['uid']; $auth_id = I('auth_id', 0, 'intval'); $url = I('url') or ajax_error('上传图片异常!'); $url_watermark = \Common\Util\ImageUtil::qiniu_watermark($url); $auth = M('loan_user_contract_auth')->where(['uid' => $uid, 'auth_id' => $auth_id])->find(); if ($auth) { M('loan_user_contract_auth')->where(['uid' => $uid, 'auth_id' => $auth_id])->save(['created' => time(), 'url' => $url, 'url_watermark' => $url_watermark]); } else { $auth = M('loan_config_auth')->find($auth_id) or $this->error('找不到此认证项资料!'); M('loan_user_contract_auth')->add(['uid' => $uid, 'auth_id' => $auth_id, 'auth_name' => $auth['name'], 'auth_sort' => $auth['sort'], 'created' => time(), 'url' => $url, 'url_watermark' => $url_watermark]); } ajax_success(); }
public function index() { $key = I('key', false); $token = I('token', false); if ($key && $token) { // $class = '\\Job\\Controller\\OuterService\\' . ucfirst($key) . 'Controller'; // if (class_exists($class) && $class::TOKEN === $token) { ajax_success(['auth' => password_hash($key . $token, PASSWORD_DEFAULT)]); // } else { // ajax_error('Accounts Error'); // } } else { ajax_error(); } }
function PostToHost($url, $post_data_to_send, $wait_for_response = false) { //$url = 'https://www.paypal.com/de/cgi-bin/webscr'; $timeout = 9; $url_parts = parse_url($url); $host = $url_parts['host']; $path = $url_parts['path']; /* $query=$url_parts['query']; $scheme=$url_parts['scheme']; $port=$url_parts['port']; $user=$url_parts['user']; $pass=$url_parts['pass']; $fragment=$url_parts['fragment']; */ if ($_SERVER['HTTP_HOST'] != 'localhost') { $use_ssl = !(strpos($url, "https") === false); } if ($use_ssl) { $fp = pfsockopen("ssl://" . $host, 443, $errno, $errstr, $timeout); } else { $fp = fsockopen($host, 80, $errno, $errstr, $timeout); } if ($fp) { fputs($fp, "POST {$path} HTTP/1.1\r\n"); fputs($fp, "Host: {$host}\r\n"); fputs($fp, "Referer: {$referer}\r\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Content-length: " . strlen($post_data_to_send) . "\r\n"); fputs($fp, "Connection: close\r\n\r\n"); fputs($fp, $post_data_to_send); if ($wait_for_response) { while (!feof($fp)) { $res .= fgets($fp, 128); } return $res; } else { echo 'AJAX_NODATA'; } fclose($fp); } else { include_once DIR_FS_INC . "ajax_error.inc.php"; ajax_error(sprintf(PAYMENT_PROBLEM, ${$_SESSION}['payment']->title)); } }
public function edit($id = 0) { $majorModel = M('university_college_major'); if (IS_POST) { $university = M('university')->find(I('post.university_id')) or $this->error('找不到此学校信息!'); $_POST['university_name'] = $university['name']; // 读取学校名称 $college = M('university_college')->where('id=' . I('post.college_id'))->find() or ajax_error(); $_POST['university_name'] = $college['university_name']; $_POST['college_name'] = $college['name']; $majorModel->create() or $this->error($majorModel->getError()); $id = $majorModel->id; $name = $majorModel->name; $ret = $majorModel->save(); $ret === false and $this->error($majorModel->getError()); if ($ret) { // 存在更新,则同步更新冗余字段 M('user_info')->where('major_id=' . $id)->setField('major_name', $name); } $this->success('编辑成功!', U('index')); } else { $info = $majorModel->find($id) or $this->error('找不到此记录信息!'); $university = get_university() or $this->error('请先添加大学信息!'); $college_id = $info['college_id']; $university_id = $info['university_id']; $sel_university_id = I('university_id', 0); if ($sel_university_id && $university_id) { // 指定了不同的大学 $university_id = $sel_university_id; } $college = $this->_getCollege($university_id); $this->assign('_list_university', $university); $this->assign('_list_college', $college); $this->assign('university_id', $university_id); $this->assign('college_id', $college_id); $this->assign('info', $info); $this->meta_title = '编辑学院'; $this->display(); } }
function before_process() { if ($_POST['x_response_code'] != '1') { if (USE_AJAX) { ajax_error(MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR_MESSAGE); } else { olc_redirect(olc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR_MESSAGE), SSL, true, false)); } } }
protected function verify() { if (!password_verify(static::KEY . static::TOKEN, I('auth', ''))) { ajax_error('Auth Error'); } }
/** * @title 获取订单统计 * * @param string $company_id 商铺编号 * * @method get */ public function order_stat($company_id) { $uid = $this->_user['uid']; M('loan_company')->where(['id' => $company_id, 'uid' => $uid])->count() or ajax_error('无权访问此商铺!'); $orderModel = new \Loan\Model\OrderModel(); $where = ['company_id' => $company_id, 'status' => ['neq', $orderModel::STATUS_CLOSED]]; ajax_success(['statistiscs' => [['label' => '订单统计', 'content' => [['text' => '进行中的订单', 'value' => $orderModel->where($where + ['check_status' => ['neq', 1]])->count() + 0 . ''], ['text' => '已签约订单', 'value' => $orderModel->where($where + ['check_status' => 1])->count() + 0 . '']]], ['label' => '签约订单贷款金额统计', 'content' => [['text' => '待付款金额(元)', 'value' => number_format($orderModel->where($where + ['check_status' => 1, 'lend_status' => ['neq', 2]])->sum('loan_money'), 2)], ['text' => '已付款金额(元)', 'value' => number_format($orderModel->where($where + ['check_status' => 1, 'lend_status' => 2])->sum('loan_money'), 2)]]]]]); }
function guest_login($username, $password) { if ($username == "*****@*****.**" && $password == "guest") { $_SESSION['auth'] = true; $result = array("success" => 1); ajax_result($result); } else { ajax_error("Invalid username or password."); } }
/** * @title 获取当前登录用户信息 * * @method get */ public function info() { $user = get_user() or ajax_error('USER_NOT_LOGIN', '登录超时,请重新登录!'); $university = M('user_info')->where(['uid' => $user['uid']])->field('university_id,university_name,college_id,college_name,major_id,major_name,campus_id,campus_name,start_year')->find(); ajax_success(['user' => ['mobile' => $user['mobile'], 'uname' => $user['uname'], 'realname' => $user['realname'], 'gender' => $user['gender'], 'avatar' => $user['avatar']], 'university' => $university]); }
} $_SESSION['cart']->reset(true); // unregister session variables used during checkout unset($_SESSION['sendto']); unset($_SESSION['billto']); unset($_SESSION['shipping']); unset($_SESSION['payment']); unset($_SESSION['customers_order_reference']); unset($_SESSION['comments']); unset($_SESSION['last_order']); $last_order = $orders_id; //GV Code Start unset($_SESSION['credit_covers']); $order_total_modules->clear_posts(); //ICW ADDED FOR CREDIT CLASS SYSTEM // GV Code End if ($real_checkout) { if (isset($mail_error)) { global $message; $message = $messageStack->output('*'); if (IS_AJAX_PROCESSING) { require_once ADMIN_PATH_PREFIX . DIR_FS_INC . 'ajax_error.inc.php'; ajax_error($message); } else { echo nl2br($message); } } else { olc_redirect(olc_href_link(FILENAME_CHECKOUT_SUCCESS, EMPTY_STRING, SSL)); } require ADMIN_PATH_PREFIX . DIR_WS_INCLUDES . 'application_bottom.php'; }
//Skip subjects that were not locked if (!$db->isSubjectLocked($subjectLabel)) { continue; } $xml = NULL; $xml = getSubjectFinalDataAsXML($subjectLabel, $db); if ($xml) { $converted_data = convertFinalDataToArray($xml, array('DATA_LABEL', 'RESP')); applyHQHack($converted_data); applyDEMHack($converted_data); $result['data'][$subjectLabel] = $converted_data; ++$result['count']; } } } catch (Exception $e) { ajax_error($e->getMessage()); } $content_type = 'application/json'; //output header('Content-type: ' . $content_type); print json_encode($result); function applyHQHack(array &$data) { $totalHQ = 0; $totalEmpty = 0; foreach ($data as $row) { $label = $row[0]; $value = trim($row[1]); if (strpos(strtoupper($label), 'HQ_') !== 0) { continue; }
function before_process() { if ($_POST['valid'] == TRUE_STRING_S) { if ($remote_host = getenv('REMOTE_HOST')) { if ($remote_host != 'secpay.com') { $remote_host = gethostbyaddr($remote_host); } if ($remote_host != 'secpay.com') { $error = $this->code; } } else { $error = $this->code; } if ($error) { if (USE_AJAX) { ajax_error($error); } else { olc_redirect(olc_href_link(FILENAME_CHECKOUT_PAYMENT, olc_session_name() . '=' . $_POST[olc_session_name()] . '&payment_error=' . $error, SSL, false, false)); } } } }
//$IsUserModeEdit = true; $IsCreateAccount = true; define('MESSAGE_STACK_NAME', 'create_account'); define('SMARTY_TEMPLATE', MESSAGE_STACK_NAME); $process = $_POST['action'] == 'process'; if ($process) { // W. Kaiser - Common code for "create_account.php" and "customers.php" include DIR_FS_INC . 'olc_get_check_customer_data.php'; // W. Kaiser - Common code for "create_account.php" and "customers.php" if ($error) { if (IS_AJAX_PROCESSING) { //Add messagestackinfo if (is_object($messageStack)) { $m = $messageStack->size(MESSAGE_STACK_NAME); if ($m > 0) { ajax_error($messageStack->output(MESSAGE_STACK_NAME)); } } } } else { // build the message content $name = trim($customers_firstname . BLANK . $customers_lastname); // load data into array $module_content = array(); $module_content = array('MAIL_NAME' => $name, 'MAIL_REPLY_ADDRESS' => EMAIL_SUPPORT_REPLY_ADDRESS, 'MAIL_GENDER' => $customers_gender); // assign data to smarty $smarty->assign('content', $module_content); $txt_mail = CURRENT_TEMPLATE_MAIL . 'create_account_mail.'; $html_mail = $smarty->fetch($txt_mail . 'html'); $txt_mail = $smarty->fetch($txt_mail . 'txt'); // GV Code Start
require_once "NRG/Configuration.php"; require_once '../database.php'; //Require data entry privileges setClearanceLevel(30); //Check for errors if (empty($_POST) || empty($_POST['subjectid'])) { ajax_error('Invalid request.'); } $subjectid = trim($_POST['subjectid']); if (empty($subjectid)) { ajax_error('Invalid Subject ID.'); } if (!preg_match('/^[A-Za-z0-9]+$/', $subjectid)) { ajax_error('The Subject ID you have entered contains invalid characters.'); } //Connect to the database try { $config = new \NRG\Configuration(CONFIG_FILE); $dbconf = $config->Database; $db = new Database($dbconf['host'], $dbconf['user'], $dbconf['pass'], $dbconf['name'], $dbconf['port']); //Verify the subject isn't locked if ($db->isSubjectLocked($subjectid)) { ajax_error('Sorry, this subject has been locked. No data entry is allowed for locked subjects.'); } $session = $db->createSession($subjectid, $_SESSION['aclID']); $result = array("success" => 1, "session" => $session['label']); ajax_result($result); } catch (Exception $e) { error_log($e->getMessage(), 0); ajax_error('An internal server error has occured. Please try again later.' . $e->getMessage()); }
/** * @title 验证已登录用户信息 * * @param string $access_key 访问授权码 zhSlIyYzTppqY2XT * @method get */ public function checkLogin($access_key = '', $return_type = 1) { $access_key == 'zhSlIyYzTppqY2XT' or ajax_error('ACCESS_KEY_ERROR', '系统授权码错误,请检查!'); $user = get_user() or ajax_error('USER_NOT_LOGIN', '登录超时,请重新登录!'); ajax_success($user); }
public function uploadToken() { $expires = 600; $ext = pathinfo(I('filename'), PATHINFO_EXTENSION); if (!in_array(strtolower($ext), ['png', 'jpg', 'jpeg', 'gif'])) { system_warn('检测到错误的上传图片格式:' . I('filename') . ',提交参数:' . print_r($_REQUEST, true)); ajax_error(strpos(I('filename'), '.') > 0 ? '仅限上传png/jpg/gif图片' : '服务器无法读取图片格式!'); } $file_name = (I('type') ?: 'loan') . '_auth_' . date('YmdH') . '_' . uniqid() . '.' . $ext; $policy['scope'] = 'yszjdx:' . $file_name; $policy['deadline'] = time() + $expires; $policy['fsizeLimit'] = 5 * 1024 * 1024; $policy = json_encode($policy); function base64_urlSafeEncode($data) { $find = array('+', '/'); $replace = array('-', '_'); return str_replace($find, $replace, base64_encode($data)); } $policy = base64_urlSafeEncode($policy); $qiniu = C('UPLOAD_TYPE_CONFIG'); $sign = hash_hmac('sha1', $policy, $qiniu['secrectKey'], true); $token = $qiniu['accessKey'] . ':' . base64_urlSafeEncode($sign) . ':' . $policy; ajax_success(['file_name' => $file_name, 'token' => $token]); }
function libxml_error_handler($errno, $errstr, $errfile, $errline) { global $config; $message = "Sorry, this subject\\'s data has been corrupted."; $ir = $config->IssueReport; //Prepare an e-mail message $email = "Issue Report:\n\n" . "Date: " . date('Y-m-d') . "\n" . "User: "******"\n" . "File: " . $errfile . ":" . $errline . "\n" . "Message: " . $errstr . "\n" . "\n" . "POST:\n" . "--------------------------------------\n" . print_r($_POST, true) . "\n" . "--------------------------------------\n"; //Send e-mail $result = mail($ir['to'], $ir['subject'], $email, get_mail_headers($config)); if ($result) { $message .= "<br><br>This issue has been reported to " . $ir['to'] . ".<br>You will receive an e-mail when the issue is fixed."; } else { $message .= "<br><br>Also, we were unable automatically notify " . $ir['to'] . " of this issue." . "<br>Please send an e-mail to <a href='mailto:" . $ir['to'] . "'>" . $ir['to'] . "</a>" . " with screenshots and other relevant information."; } ajax_error($message); }
$result = doInsertUpdateUsers($users, $db); break; case 'DELETE': $data = file_get_contents('php://input'); $data = explode('=', $data, 2); if (!isset($data[1]) || empty($data[1])) { ajax_error('Your browser has sent an invalid request. Please try again.'); } $user = trim(urldecode($data[1])); if (empty($user)) { ajax_error('Sorry, but we cannot delete this user. Please try again later.'); } $result = $db->deleteUser($user); break; default: ajax_error("Unsupported request method."); } } catch (Exception $e) { $success = 0; $message = $e->getMessage(); } //Output result ajax_result(array("success" => $success, "message" => $message, "total" => count($result), "users" => $result)); } catch (\Exception $e) { error_log('[OnlineQuestionnaire] ERROR: ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine(), 0); } function doInsertUpdateUsers(array $users, Database $db) { $result = array(); foreach ($users as $user) { if (property_exists($user, 'aclID')) {
function pre_confirmation_check() { global $banktransfer_number, $banktransfer_blz; if ($_POST['banktransfer_fax'] == false) { if ($banktransfer_result > 0 || $_POST['banktransfer_owner'] == EMPTY_STRING) { if ($_POST['banktransfer_owner'] == EMPTY_STRING) { $error = 'Name des Kontoinhabers fehlt!'; $recheckok = EMPTY_STRING; } else { include_once DIR_WS_CLASSES . 'banktransfer_validation.php'; $banktransfer_validation = new AccountCheck(); $banktransfer_result = $banktransfer_validation->CheckAccount($banktransfer_number, $banktransfer_blz); switch ($banktransfer_result) { case 1: // number & blz not ok $error = MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_ERROR_1; $recheckok = TRUE_STRING_S; break; case 5: // BLZ not found $error = MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_ERROR_5; $recheckok = TRUE_STRING_S; break; case 8: // no blz entered $error = MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_ERROR_8; $recheckok = EMPTY_STRING; break; case 9: // no number entered $error = MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_ERROR_9; $recheckok = EMPTY_STRING; break; default: $error = MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_ERROR_4; $recheckok = TRUE_STRING_S; break; } } if (USE_AJAX) { ajax_error($error); } else { if ($_POST['recheckok'] != TRUE_STRING_S) { $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&banktransfer_owner=' . urlencode($_POST['banktransfer_owner']) . '&banktransfer_number=' . urlencode($_POST['banktransfer_number']) . '&banktransfer_blz=' . urlencode($_POST['banktransfer_blz']) . '&banktransfer_bankname=' . urlencode($_POST['banktransfer_bankname']) . '&recheckok=' . $recheckok; olc_redirect(olc_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, SSL, true, false)); } } } } $this->banktransfer_owner = $_POST['banktransfer_owner']; $this->banktransfer_blz = $_POST['banktransfer_blz']; $this->banktransfer_number = $_POST['banktransfer_number']; $this->banktransfer_prz = $banktransfer_validation->PRZ; $this->banktransfer_status = $banktransfer_result; if ($banktransfer_validation->Bankname != EMPTY_STRING) { $this->banktransfer_bankname = $banktransfer_validation->Bankname; } else { $this->banktransfer_bankname = $_POST['banktransfer_bankname']; } //W. Kaiser - AJAX }