<?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");
$table=$_SESSION[var_table];
$action=$_SESSION[var_action];
?>
<?php
$action=($_POST['action']);
$Action=quote($_POST['Action']);
$Part=quote($_POST['Part']);
$Code=quote($_POST['Code']);
$sql->Update("UPDATE `action` SET
`type`=$Action,
`part`=$Part,
`code`=$Code WHERE `table`='$table' AND `action`='$action'");
$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 gewijzigd<BR>";
echo "$action<BR>";
echo "$Action<BR>";
echo "$Part<BR>";
echo "$Code<BR>";
echo "</P>";
if ($affected_rows=1) {
echo "<script>window.opener.location.reload(true)</script>";
echo "<script>window.close(self)</script>";
}
$_SESSION[last_64]=$action;
?>
<INPUT TYPE=BUTTON VALUE="Close" onClick="window.opener.location.reload(true);self.close()">