[go: up one dir, main page]

Menu

[r10]: / pages / create / user.php  Maximize  Restore  History

Download this file

22 lines (17 with data), 831 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
session_start();
include('../../includes/databaseLogin.php');
include('../../includes/installedLanguage.php');
$name = htmlentities(mysql_real_escape_string($_GET[name]), ENT_QUOTES);
$user = htmlentities(mysql_real_escape_string($_GET[user]), ENT_QUOTES);
$pass = htmlentities(mysql_real_escape_string($_GET[pass]), ENT_QUOTES);
$email = htmlentities(mysql_real_escape_string($_GET[email]), ENT_QUOTES);
$priv = $_GET[priv];
$queryResult = mysql_query("INSERT INTO users (userID, userPassword, userMail, userFullName, userPrivList) VALUES ('$user', '" . md5($pass) . "', '$email', '$name', '$priv')");
if($queryResult){
$responseArray = array ('opResult'=>0, 'opText'=>_T("NI_p_c_user_I"));
}else{
$responseArray = array ('opResult'=>1, 'opText'=>_T("NI_p_c_user_II"));
}
echo json_encode($responseArray);
?>