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.
20 lines
550 B
20 lines
550 B
14 years ago
|
<?php
|
||
|
/*
|
||
|
*
|
||
|
* @copyright (c) 2010 animegame.eu
|
||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
|
||
|
function insertUser($user_name, $password){
|
||
|
$sql = 'SELECT * FROM user WHERE nickname like \''.$user_name.'\'';
|
||
|
$user = mysql_fetch_assoc(mysql_query($sql));
|
||
|
|
||
|
// Insert User into mumble!
|
||
|
$sql = 'Insert into '.$GLOBALS['mumble_db_name'].'.players(server_id, player_id, name, pw) values(1, '.$user['id'].', \''.$user['nickname'].'\', sha(\''.$password.'\'))';
|
||
|
// Should do the trick!
|
||
|
mysql_query($sql);
|
||
|
}
|
||
|
|
||
|
?>
|