$form->run(); } elseif ($mode == 'edit') { $typeid = cleanvar($_REQUEST['typeid']); $sql = "SELECT typename FROM `{$dbSiteTypes}` WHERE typeid = {$typeid}"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_WARNING); } if (mysql_num_rows($result) > 0) { list($typename) = mysql_fetch_array($result); } $form = new Form("sitetypes", $strEdit, $dbSiteTypes, "update", $strEditSiteType); $form->setReturnURLFailure($_SERVER['PHP_SELF']); $form->setReturnURLSuccess($_SERVER['PHP_SELF']); $c1 = new Cell(); $c1->setIsHeader(TRUE); $c1->addComponent(new Label($strSiteType)); $c2 = new Cell(); $c2->addComponent(new SingleLineEntry("typename", 10, "typename", $typename)); $r = new Row(); $r->addComponent($c1); $r->addComponent($c2); $form->addRow($r); $hr = new HiddenRow(); $hr->addComponent(new HiddenEntry("mode", "", "edit")); $hr->addComponent(new HiddenEntry("typeid", "", $typeid)); $form->addRow($hr); $form->setKey("typeid", $typeid); $form->run(); } include APPLICATION_INCPATH . 'htmlfooter.inc.php';