session_start(); $starttime = microtime(true); require_once '../other/config.php'; require_once '../ts3_lib/TeamSpeak3.php'; require_once '../lang.php'; require_once '../other/session.php'; if (!isset($_SESSION['tsuid'])) { $hpclientip = ip2long($_SERVER['REMOTE_ADDR']); set_session_ts3($hpclientip, $ts['voice'], $mysqlcon, $dbname); } require_once 'nav.php'; ?> <div id="page-wrapper"> <?php if (isset($err_msg)) { error_handling($err_msg, 3); } ?> <div class="container-fluid"> <!-- Page Heading --> <div class="row"> <div class="col-lg-12"> <h1 class="page-header"> Battle Area <div class="btn-group"> <a href="#myModal3" data-toggle="modal" class="btn btn-primary"> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> </a> </div> </h1>
public function error_handling($context = null) { return error_handling($this); }
/** * error handling function */ function error_handling($context = null) { $context1 = array(); $context1 = error_handling($this); if (isset($context1['config'])) { $context1['config'] = 'Settings hidden'; } return $context1; }
} //Determine the email address is empty, if empty, will use InfusionsoftEmail instead. if (empty($_POST["Email"])) { //no pre-defined email, use InfusionsoftEmail instead $Email = $_POST["InfusionsoftEmail"]; } else { //already existed email $Email = $_POST["Email"]; } //Assign a default country short code for wrong country $Country = "AU"; //Match Country from database to find out the short code. eg. Australia -> AU $db = mysql_connect('localhost', 'stylefin_user', 'magnus'); mysql_select_db('stylefin_db', $db); $query_cnt = "SELECT `ccode`, `country` FROM `Countries` Order by `order`, `country`"; $result_cnt = mysql_query($query_cnt, $db) or error_handling(basename($_SERVER['PHP_SELF']) . ' - ' . mysql_error() . ' - ' . $query_cnt); while ($line_cnt = mysql_fetch_assoc($result_cnt)) { if ($line_cnt["country"] == $_POST["Country"]) { $Country = $line_cnt["ccode"]; break; } } //Assign the rest post info to local variable $FirstName = $_POST["FirstName"]; $LastName = $_POST["LastName"]; $contactID = $_POST["contactID"]; $ZipCode = $_POST["ZipCode"]; //create user in database and lead the CreatePage info to step 1 $query_rem = "INSERT INTO `Users` (`email`, `password`, `name`, `surname`, `CreatePage`, `InfusionSoftId`, `country`, `zip`) VALUES ('" . mysql_real_escape_string($Email) . "', '" . mysql_real_escape_string($Password) . "', '" . mysql_real_escape_string($FirstName) . "', '" . mysql_real_escape_string($LastName) . "', '1','" . mysql_real_escape_string($contactID) . "', '" . mysql_real_escape_string($Country) . "', '" . mysql_real_escape_string($ZipCode) . "')"; mysql_query($query_rem, $db); //Send back info to infusionsoft
function error_check($var) { if ($var == "") { error_handling("Bitte alle notwendigen Felder ausfüllen!"); } }
function error_handling($context = null) { $context1 = array(); if (is_null($context)) { // if no array set get currently define variables in this object $context = get_defined_vars($this); } $context1 = error_handling($context); if (isset($context1['settings'])) { $context1['settings'] = 'hidden for security'; } return $context1; }