database, "INSERT INTO parameter_class
(name, property_name, property_type, notify) VALUES ('"
. $_POST['classname'] . "','" . $_POST['propname'] . "','STATIC', 'true')");
}
if (isset($_POST['action']) && $_POST['action'] == 'Remove'
&& !empty($_POST['classname']) && !empty($_POST['propname']))
{
pg_exec($this->database, "DELETE FROM parameter_class WHERE name='"
. $_POST['classname'] . "' AND property_name='" . $_POST['propname'] . "'");
}
if (isset($_GET['classname']) && isset($_GET['propname']))
{
echo "
";
echo "
for property " . $_GET['propname']
. " of class " . $_GET['classname'] . "
\n";
if (isset($_POST['action']) && $_POST['action'] == 'Save Changes')
{
$notify = 'f';
if (!empty($_POST['notify']) && $_POST['notify'] == 'on')
{
$notify='t';
}
$qry = "UPDATE parameter_class SET description='" . $_POST['description'] . "'";
$qry .= ", property_type='" . $_POST['proptype'] . "'";
$qry .= ", notify='" . $notify . "'";
if (isset($_POST['min']))
{
$qry .= ", min='" . $_POST['min'] . "'";
}
if (isset($_POST['max']))
{
$qry .= ", max='" . $_POST['max'] . "'";
}
$qry .= " WHERE name='" . $_GET['classname'] . "'";
$qry .= " AND property_name='" . $_GET['propname'] . "'";
echo $qry . "
";
pg_exec($this->database, $qry);
echo pg_errormessage($this->database) . "
";
print_r($_POST);
}
$res = pg_exec($this->database, "SELECT * FROM parameter_class
WHERE name='" . $_GET['classname']
. "' AND property_name='" . $_GET['propname'] . "'");
$cls = pg_fetch_object($res, 0);
echo "";
}
else
{
echo "
";
$res = pg_exec($this->database, "SELECT name, property_name, description FROM parameter_class
ORDER BY name, property_name");
echo "";
echo "Class | Property | Description |
";
$cls = 0;
while ($cls < pg_numrows($res))
{
$u = pg_fetch_object($res, $cls);
?>
name ?>
|
property_name ?>
|
description ?>
|
|
";
?>
Create new parameter class property:
Showpage();
?>