2008-03-22 14:13:16 +00:00
|
|
|
#!/usr/bin/php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
include("config.php");
|
|
|
|
include("includes/functions.php");
|
|
|
|
|
|
|
|
if($argv[1] && $argv[2] && $argv[3]) {
|
|
|
|
mysql_query("INSERT INTO `users` (`username`,`password`,`level`) VALUES ('".$argv[1]."',MD5('".$argv[2]."'),'".$argv[3]."')");
|
2008-03-22 15:03:55 +00:00
|
|
|
if(mysql_affected_rows()) {
|
|
|
|
echo("User ".$argv[1]." added successfully\n");
|
|
|
|
}
|
2008-03-22 14:13:16 +00:00
|
|
|
} else {
|
2008-03-22 15:03:55 +00:00
|
|
|
echo("Add User Tool\nUsage: ./adduser.php <username> <password> <level 1-10>\n");
|
2008-03-22 14:13:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|