You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/speed_config.inc.php');
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config/db.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'] . 'ag/include/user.inc.php');
$nick_name = validateName($_POST['nick_name']);
$pw_1 = validateString($_POST['pw_1']);
$ip_con = mysql_fetch_array(mysql_query("SELECT nickname FROM user WHERE ip='$REMOTE_ADDR' AND nickname !='$nick_name' LIMIT 1"));
if (!checkLoginPassword($nick_name, $pw_1)) {
displayErrorMessage(NULL,'Username oder Passwort falsch!', displayHistoryBackLink());
exit;
}
// MumbleAddon!!
if(isset($GLOBALS['mumble_db_name'])){
include_once($_SERVER['DOCUMENT_ROOT'] . 'ag/include/mumble.inc.php');
insertUser($_POST['nick_name'], $_POST['pw_1']);
}
setCookies($nick_name, $pw_1);
header ("Location: index.php");
?>