<?php if (!defined('INITIALIZED')) { exit; } echo '<?xml version="1.0" encoding="utf-8" standalone="yes"?>'; $account = strtoupper(trim($_REQUEST['account'])); if (empty($account)) { echo '<font color="red">Please enter an account number.</font>'; exit; } if (strlen($account) < 32) { if (!check_account_name($account)) { echo '<font color="red">Invalid account name format. Use only A-Z and numbers 0-9.</font>'; exit; } $account_db = new Account(); $account_db->find($account); if ($account_db->isLoaded()) { echo '<font color="red">Account with this name already exist.</font>'; } else { echo '<font color="green">Good account name ( ' . htmlspecialchars($account) . ' ). You can create account.</font>'; } } else { echo '<font color="red">Account name is too long (max. 32 chars).</font>'; } exit;
</TD> <TD><IMG SRC="' . $layout_name . '/images/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD> </TR> </TABLE>'; } //CREATE ACCOUNT PAGE (save account in database) if ($action == "saveaccount") { $reg_name = strtoupper(trim($_POST['reg_name'])); $reg_email = trim($_POST['reg_email']); $reg_password = trim($_POST['reg_password']); $reg_code = trim($_POST['reg_code']); //FIRST check //check e-mail if (empty($reg_name)) { $reg_form_errors[] = "Please enter account name."; } elseif (!check_account_name($reg_name)) { $reg_form_errors[] = "Invalid account name format. Use only A-Z and numbers 0-9."; } if (empty($reg_email)) { $reg_form_errors[] = "Please enter your email address."; } else { if (!check_mail($reg_email)) { $reg_form_errors[] = "E-mail address is not correct."; } } if ($config['site']['verify_code']) { //check verification code $string = strtoupper($_SESSION['string']); $userstring = strtoupper($reg_code); session_destroy(); if (empty($string)) {