<?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");
$project=$_SESSION[var_project];
$table=$_SESSION[var_table];
?>
<?php
$intern=quote($_POST['intern']);
$name=quote($_POST['name']);
$title=quote($_POST['title']);
$id_field=quote($_POST['id_field']);
$width=quote($_POST['width']);
$height=quote($_POST['height']);
$where=quote($_POST['where']);
$edit_where=quote($_POST['edit_where']);
$sql->Insert("INSERT INTO `table`
(
`project`,
`sql`,
`name`,
`title`,
`id_field`,
`width`,
`height`,
`where`,
`edit_where`
)
VALUES (
'$project',
$intern,
$name,
$title,
$id_field,
$width,
$height,
$where,
$edit_where
)");
$affected_rows = $sql->a_rows;
echo "Er is/zijn $affected_rows records toegevoegd<BR>";
echo "$project<BR>";
echo "$intern<BR>";
echo "$name<BR>";
echo "$title<BR>";
echo "$id_field<BR>";
echo "$width<BR>";
echo "$height<BR>";
echo "$where<BR>";
echo "$edit_where<BR>";
echo "</P>";
if ($affected_rows>0) {
echo "<script>window.opener.location.reload(true)</script>";
echo "<script>window.close(self)</script>";
}
$_SESSION[last_61]=$table;
;
?>
<INPUT TYPE=BUTTON VALUE="Close" onClick="window.opener.location.reload(true);self.close()">