<?php
class Body
{
// description: Use with class_windowlink.php.
// Put the object-instantiation in the HEAD-part of an HTML-file.
// Calling Show_clean produces a normal body-tag.
// Calling Show_UPC produces a UPC-body-tag.
// The UPC-body-tag updates the parent-window
// and closes the current form. Handy with database-updating.
// version: 2.1
// history: 13-2-2002 release version 1.0 (bug with reloads after new row)
// history: 23-2-2002 release version 2.0 (no reload, new load of parent)
// history: 28-2-2002 release version 2.1 AutoClose can be set on/off
function Body($Parent_page = "", $AutoClose = 1)
{
print"<script language=javascript>\n";
print"function UpdateParentClose()\n";
print"{\n";
print"window.opener.location = \"".$Parent_page."\";\n";
if ($AutoClose == 1) print"window.close();\n";
print"}\n";
print"</script>\n";
}
function Show_clean()
{
print"<body>";
}
function Show_UPC()
{
print"<body onload='UpdateParentClose()'>";
}
}
?>
|