<?php
session_start();
$user_ID=$_SESSION[user_ID];
if (!$user_ID || $user_ID=='0')
{
header('location: index.php');
die('Login failed');
}
require("util.php");
$sql = new MySQL_class;
$sql->Create("generator");
$esql = new MySQL_class;
$esql->Create("generator");
if ($_GET[user]) { $_SESSION[var_user] = $_GET[user]; }
$user=$_SESSION[var_user];
?>
<?php
$sql = new MySQL_class;
$sql->Create("generator");
$username=quote($_POST['username']);
$password=quote($_POST['password']);
$special=quote($_POST['special']);
$type=quote($_POST['type']);
$sql->Insert("INSERT INTO `user`
(
`username`,
`password`,
`special`,
`type`
)
VALUES (
$username,
$password,
$special,
$type
)");
$affected_rows = $sql->a_rows;
echo "<P><FONT FACE=\"Verdana, sans-serif\"><FONT SIZE=1 STYLE=\"font-size: 8pt\">";
echo "Er is/zijn $affected_rows records toegevoegd<BR>";
echo "</P>";
if ($affected_rows>0) {
echo "<script>window.opener.location.reload(true)</script>";
echo "<script>window.close(self)</script>";
}
$_SESSION['last_68']=$username;
;
?>
<INPUT TYPE=BUTTON VALUE="Close" onClick="window.opener.location.reload(true);self.close()">