exit;
}
if ($_POST['commit'] == "Save Light") {
    if ($id == 0) {
        // insert
        $obj = new Light();
        $obj->OverviewText = $_REQUEST["overview_text"];
        $obj->create();
        // redirect to listing list
        header("Location:light_list.php?cat=" . $_REQUEST['cat']);
        exit;
    } else {
        // update
        $obj = new Light($_REQUEST["id"]);
        $obj->OverviewText = $_REQUEST["overview_text"];
        $obj->update();
        // redirect to listing list
        header("Location:light_list.php?cat=" . $_REQUEST['cat']);
        exit;
    }
} else {
    if ($_REQUEST['mode'] == 'e') {
        //listing
        $objLight = new Light($id);
        $overview_text = $objLight->OverviewText;
    }
}
include "includes/pagetemplate.php";
function PageContent()
{
    global $id;