// page vars
$page_title = "";
$id = $_REQUEST['id'];
// id required
if ($id == "") {
    header("Location:mainpage.php");
    exit;
}
// if form was submitted
if ($_POST['commit'] == "Cancel") {
    header("Location:setting_list.php");
    exit;
}
if ($_POST['commit'] == "Delete Setting") {
    $obj = new GenericDb();
    $obj->delete("setting", "id = ?", $id);
    header("Location:setting_list.php");
    exit;
}
$db = new GenericDb();
$rows = $db->run("select * from setting where id = ?", $id);
$setting = $rows[0];
include "includes/pagetemplate.php";
function PageContent()
{
    global $setting;
    global $id;
    ?>

            <div class="layout laymidwidth">