* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with N/X; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **********************************************************************/ require_once "../../config.inc.php"; require_once "ingredient_editor.php"; require_once "tag_selector.php"; $auth = new auth("ADMINISTRATOR"); $page = new Page("Edit Recipe"); $form = new stdEDForm($lang->get("edrecipe", "Edit Recipe")); $cond = $form->setPK("pgn_recipes", "ID"); $form->addHeaderLink(crHeaderLink($lang->get("back"), "plugin/recipe/overview.php?sid=" . $sid)); $form->add(new TextInput($lang->get("name", "NAME"), "pgn_recipes", "NAME", $cond, "type:text,size:64,width:200", "MANDATORY")); if ($page_action == "UPDATE") { $values = createNameValueArrayEx("pgn_recipes_tags", "TAG", "TAG_ID", "1", "ORDER BY TAG ASC"); $form->add(new TagEditor("Tags", "pgn_recipes_tag_relation", "REC_ID", $oid, "TAG_ID", $values)); } $form->add(new SubTitle("st", $lang->get("ingredients", "Ingredients"), 2)); $form->add(new IngredientEditor("pgn_recipes", $cond)); $form->add(new SubTitle("st", $lang->get("preparation", "Preparation"), 2)); $form->add(new TextInput($lang->get("preparation", "Preparation"), "pgn_recipes", "PREPARATION", $cond, "type:textarea,size:6,width:300", "")); $form->add(new TextInput($lang->get("description", "Description"), "pgn_recipes", "DESCRIPTION", $cond, "type:textarea,size:6,width:300", "")); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM pgn_recipes WHERE ID={$oid} "); $deleteHandler->addDbAction("DELETE FROM pgn_recipes_tag_relation WHERE REC_ID={$oid} "); $form->registerActionHandler($deleteHandler); $page->add($form); $page->draw();
$auth = new auth("USER_MANAGEMENT"); $page = new page("User Administration"); $page->setJS("md5"); $filter = new Filter("auth_user", "user_id"); $filter->addRule($lang->get("email"), "email", "email"); $filter->icon = "li_user.gif"; $filter->type_name = "Users"; $filtermenu = new Filtermenu($lang->get("user_filtermenu"), $filter); $filtermenu->addMenuEntry($lang->get("user_link"), "user_general.php", "user_premissions.php"); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM auth_user where user_id=$oid and user_id > 999"); $form = new stdEDForm($lang->get("user_head"), "i_myprofile.gif"); $form->submitButtonAction = "if (document.form1.auth_user_password_1.value != '') document.form1.auth_user_password_1.value = document.form1.auth_user_password_2.value = hex_md5(document.form1.auth_user_password_1.value);"; $cond = $form->setPK("auth_user", "user_id"); $form->add(new TextInput($lang->get("email"), "auth_user", "email", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE")); $form->add(new TextInput($lang->get("password"), "auth_user", "password", $cond, "type:text,width:200,size:40", "MANDATORY")); $form->add(new CheckboxInput($lang->get("user_active"), "auth_user", "active", $cond, "1", "0")); $form->add(new TextInput($lang->get("confirmcode", "Confirm-Code"), "auth_user", "confirm", $cond, "type:text,width:300,size:40", "MANDATORY&UNIQUE")); // Control Information $form->add(new NonDisplayedValueOnInsert("auth_user", "registration_date", $cond, "NOW()", "TIMESTAMP")); $form->registerActionHandler($deleteHandler); $page->addMenu($filtermenu);
<?php require_once "../../config.inc.php"; $auth = new auth("CALENDAR_CREATE"); $page = new Page("Edit Calendars"); $selcal = new SelectMenu($lang->get("calendar_select", "Select Calendar"), "calsel", "pgn_cal_calendars", "NAME", "CALID", "1"); $filter = new Filter("pgn_cal_calendars", "CALID"); $filter->addRule($lang->get("cal_name", "Calendar Name"), "NAME", "NAME"); $filter->type_name = $lang->get("calendars", "Calendars"); $filtermenu = new Filtermenu("", $filter); $filtermenu->addMenuEntry($lang->get("calendars_edit", "Edit Calendar"), "edit.php", "", "CALENDAR_EDIT"); $filtermenu->addMenuEntry($lang->get("calendars_define", "Define Calendars"), "calendars.php", "", "CALENDAR_CREATE"); $filtermenu->addMenuEntry($lang->get("calendars_cat_define", "Define Categories"), "categories.php", "", "CALENDAR_CREATE"); $filtermenu->tipp = $lang->get("calendars_tipp", "You can create several calendars here. Each calendar will have its own events and dates."); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM pgn_cal_calendars WHERE CALID = {$oid}"); $deleteHandler->addDbAction("DELETE FROM pgn_cal_appointment WHERE CALID = {$oid}"); $deleteHandler->addDbAction("DELETE FROM pgn_cal_categories WHERE CALID = {$oid}"); if ($oid == 0) { $addtext = ""; } else { $addtext = ": " . getDBCell("pgn_cal_calendars", "NAME", "CALID = " . $oid); } $form = new stdEDForm($lang->get("calendar", "Calendar") . $addtext); $cond = $form->setExPK("pgn_cal_calendars", "CALID"); $form->add(new TextInput($lang->get("name"), "pgn_cal_calendars", "NAME", $cond, "type:text,width:200,size:64", "MANDATORY&UNIQUE")); $form->registerActionHandler($deleteHandler); $page->addMenu($filtermenu); $page->add($form); $page->draw();
$filter->type_name = "Users"; $filtermenu = new Filtermenu($lang->get("user_filtermenu"), $filter); $filtermenu->addMenuEntry($lang->get("user_link"), "user_general.php", "user_premissions.php"); $filtermenu->addMenuEntry($lang->get("group_link"), "group_general.php"); $filtermenu->addMenuEntry($lang->get("role_link"), "role_general.php"); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM users where user_id=$oid and user_id > 999"); $deleteHandler->addDbAction("DELETE FROM temp_vars where user_id=$oid and user_id > 999"); $deleteHandler->addDbAction("DELETE FROM user_session where user_id=$oid and user_id > 999"); $deleteHandler->addDbAction("DELETE FROM user_permissions where user_id=$oid and user_id > 999"); $insertHandler = new ActionHandler("INSERT"); $insertHandler->addDbAction("INSERT INTO user_session (USER_ID) VALUES (<oid>)"); $insertHandler->addDbAction("INSERT INTO temp_vars (NAME, USER_ID, VALUE) VALUES ('variation', <oid>, 1)"); $insertHandler->addDBAction("INSERT INTO temp_vars (NAME, USER_ID, VALUE) VALUES ('mid', <oid>, 0)"); if ($oid == 0) { $addtext = ""; } else { $addtext = ": " . getDBCell("users", "USER_NAME", "USER_ID = " . $oid); } $form = new stdEDForm($lang->get("user_head"). $addtext, "i_myprofile.gif"); $form->submitButtonAction = "if (document.form1.users_PASSWORD_1.value != '') document.form1.users_PASSWORD_1.value = document.form1.users_PASSWORD_2.value = hex_md5(document.form1.users_PASSWORD_1.value);"; $cond = $form->setPK("users", "USER_ID"); if ($oid != "") {
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with N/X; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **********************************************************************/ require_once "../../config.inc.php"; $auth = new auth("ADMINISTRATOR|QUOTER"); $page = new page("Quote of the day"); $filter = new Filter("pgn_quote", "QUOTE_ID"); $filter->addRule("Title", "TITLE", "TITLE"); $filter->addRule("Quote", "QUOTE", "TITLE"); $filtermenu = new Filtermenu("Browse Quotes", $filter); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM pgn_quote where QUOTE_ID=$oid"); $form = new stdEDForm("Edit Quote", ""); $cond = $form->setPK("pgn_quote", "QUOTE_ID"); $form->add(new TextInput("Title", "pgn_quote", "TITLE", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE")); $form->add(new TextInput("Quote", "pgn_quote", "QUOTE", $cond, "type:textarea,width:300,size:3", "")); $form->registerActionHandler($deleteHandler); $page->addMenu($filtermenu); $page->add($form); $page->draw(); ?>
require_once "../../config.inc.php"; $auth = new auth("COMPOUND_GROUPS"); $page = new page("Compound Groups"); $filter = new Filter("compound_groups", "CGID"); $filter->addRule($lang->get("name"), "NAME", "NAME"); $filter->setAdditionalCondition("VERSION = 0"); $filter->icon = "li_cggroup.gif"; $filter->type_name = $lang->get("cp_group"); $filtermenu = new Filtermenu($lang->get("cp_group"), $filter); $filtermenu->tipp = $lang->get("help_compgrp", "Compound group is a group of clusters. Clusters templates may have an own layout. This enables you to build your homepage out of blocks, e.g. News-Article, Poll, Image-Gallery all on one page and on demand."); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM compound_groups where CGID=$oid AND CGID > 999"); $deleteHandler->addDbAction("DELETE FROM compound_group_members where CGID=$oid"); $form = new stdEDForm($lang->get("ed_cpgroup", "Edit Compound Group")); $cond = $form->setPK("compound_groups", "CGID"); if ($oid != "" && $page_action != "DELETE") { $form->buttonbar->add("todo", $lang->get("launch"), "submit", ""); $form->headerlink = crHeaderLink($lang->get("ed_cpgroup"), "modules/compoundgroup/compound_group_members.php?sid=$sid&oid=$oid&go=update"); } $form->add(new TextInput($lang->get("group_name"), "compound_groups", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE")); $form->add(new TextInput($lang->get("group_description", "Description"), "compound_groups", "DESCRIPTION", $cond, "type:textarea,width:340,size:2", "")); $form->add(new Hidden("todo", "")); $values = array(); array_push($values, array($lang->get("latest", "Latest changed first"), 2));
$filtermenu = new StdMenu(""); $filtermenu->addMenuEntry($lang->get("calendars_edit", "Edit Calendar"), "edit.php", "", "CALENDAR_EDIT"); $filtermenu->addMenuEntry($lang->get("calendars_define", "Define Calendars"), "calendars.php", "", "CALENDAR_CREATE"); $filtermenu->addMenuEntry($lang->get("calendars_cat_define", "Define Categories"), "categories.php", "", "CALENDAR_CREATE"); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM pgn_cal_calendars WHERE CALID = {$oid}"); $deleteHandler->addDbAction("DELETE FROM pgn_cal_appointments WHERE CALID = {$oid}"); $deleteHandler->addDbAction("DELETE FROM pgn_cal_categories WHERE CALID = {$oid}"); $oid = value("oid", "NUMERIC"); if ($selcal->selected != "0" && $selcal->selected != "-1") { if ($oid == "0" && $page_action != "INSERT") { $form = new MenuForm($lang->get("sel_event", "Select Event or Appointment"), array($lang->get("startdate", "Startdate"), $lang->get("starttime", "Starttime"), $lang->get("title", "Title")), "pgn_cal_appointment", "APID", array("STARTDATE", "STARTTIME", "TITLE"), "CALID=" . $selcal->selected); $form->newAction = "plugin/calendar/edit.php?sid={$sid}&go=create"; } else { $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM pgn_cal_appointment WHERE APID = {$oid}"); $addtext = ": " . getDBCell("pgn_cal_appointment", "TITLE", "APID = " . $oid); $form = new stdEDForm($lang->get("cal_edit", "Edit Appointment") . $addtext); $form->addHeaderLink(crHeaderLink('Back', "plugin/calendar/edit.php?sid={$sid}")); $cond = $form->setExPK("pgn_cal_appointment", "APID"); $form->add(new TextInput($lang->get("title"), "pgn_cal_appointment", "TITLE", $cond, "type:text,width:300,size:64", "MANDATORY")); $form->add(new RichEditInput($lang->get("description"), "pgn_cal_appointment", "DESCRIPTION", $cond, "type:rich,width:350,size:6", "")); $form->add(new DateInput($lang->get("startdate"), "pgn_cal_appointment", "STARTDATE", $cond, "param:form1", "MANDATORY")); $form->add(new TimeInput($lang->get("starttime"), "pgn_cal_appointment", "STARTTIME", $cond)); $form->add(new DateInput($lang->get("endate"), "pgn_cal_appointment", "ENDDATE", $cond, "param:form1", "MANDATORY")); $form->add(new TimeInput($lang->get("endtime"), "pgn_cal_appointment", "ENDTIME", $cond)); $form->add(new SelectOneInput($lang->get("category"), "pgn_cal_appointment", "CATID", "pgn_cal_categories", "NAME", "CATID", "CALID = " . $selcal->selected, $cond)); $form->add(new NonDisplayedValueOnInsert("pgn_cal_appointment", "CALID", $cond, $selcal->selected, "NUMBER")); $form->add(new SubTitle("st", $lang->get("Report", "Veranstaltungsbericht"), 3)); $form->add(new RichEditInput($lang->get("report"), "pgn_cal_appointment", "REPORT", $cond, "type:rich,width:350,size:6", "")); $form->add(new PluginInput("", "pgn_cal_appointment", "GALLERY", $cond, "GALLERY", $form));
$filter = new Filter("roles", "ROLE_ID"); $filter->addRule($lang->get("role_name"), "ROLE_NAME", "ROLE_NAME"); $filter->setAdditionalCondition("UPPER(ROLE_NAME) <> 'ADMINISTRATOR'"); $filter->prevent_sysvar_disp = false; $filter->icon = "li_role.gif"; $filter->type_name = "Roles"; $filtermenu = new Filtermenu($lang->get("role_filtermenu"), $filter); $filtermenu->addMenuEntry($lang->get("user_link"), "user_general.php"); $filtermenu->addMenuEntry($lang->get("group_link"), "group_general.php"); $filtermenu->addMenuEntry($lang->get("role_link"), "role_general.php"); $filtermenu->tipp = ""; //$filtermenu->addLink("test", "test.php"); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM roles where role_id=$oid AND role_id>999"); $deleteHandler->addDbAction("DELETE FROM user_permissions where role_id=$oid AND role_id > 999"); $deleteHandler->addDbAction("DELETE FROM role_sys_functions where role_id=$oid AND role_id > 999"); if ($oid == 0) { $addtext = ""; } else { $addtext = ": " . getDBCell("roles", "ROLE_NAME", "ROLE_ID = " . $oid); } $form = new stdEDForm($lang->get("role_head"). $addtext, "i_role.gif"); $cond = $form->setExPK("roles", "ROLE_ID"); $cond .= " AND UPPER(ROLE_NAME) <> 'ADMINISTRATOR'"; if ($oid != "") { $form->headerlink = crHeaderLink($lang->get("role_permission", "Edit role permissions"), "modules/user/role_permissions.php?sid=$sid&go=update&oid=$oid");
/********************************************************************** * @module Application **********************************************************************/ require_once "../../config.inc.php"; $auth= new auth("CUSTOMERCAREADMIN"); $page= new page ("Tickets Category Administration"); $filter = new Filter("tickets_categories", "id"); $filter->addRule("Category", "name", "name"); $menu = new Filtermenu("Edit Categories", $filter); include "menudef.inc.php"; $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM tickets_categories where id=$oid"); $form = new stdEDForm("Edit Ticket Categories", ""); $cond = $form->setPK("tickets_categories", "id"); $form->add(new TextInput("Name", "tickets_categories", "name", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE")); $form->add(new TextInput("POP-Server", "tickets_categories", "pophost", $cond, "type:text,width:200,size:32", "MANDATORY")); $form->add(new TextInput("POP-Username", "tickets_categories", "popuser", $cond, "type:text,width:200,size:32", "MANDATORY")); $form->add(new TextInput("POP-Password", "tickets_categories", "poppass", $cond, "type:text,width:200,size:32", "MANDATORY")); $form->add(new TextInput("Reply-To-Address", "tickets_categories", "replyto", $cond, "type:text,width:200,size:32", "MANDATORY")); $form->add(new TextInput("Notify From", "tickets_categories", "notify_from", $cond, "type:text,width:200,size:64", "")); $form->add(new TextInput("Notify To", "tickets_categories", "notify_to", $cond, "type:text,width:200,size:64", "")); $form->add(new TextInput("Notify Subject", "tickets_categories", "notify_subject", $cond, "type:text,width:200,size:64", "")); $form->add(new TextInput("Notify ReplyTo", "tickets_categories", "notify_replyto", $cond, "type:text,width:200,size:64", "")); $form->add(new TextInput("Notify Body", "tickets_categories", "notify_body", $cond, "type:textarea,width:350,size:6", "")); $form->add(new TextInput("Notify Headers", "tickets_categories", "notify_headers", $cond, "type:textarea,width:350,size:6", ""));
// Initialize Page-Container $page = new page("Tags"); // Create Menu-Filter $filter = new Filter("pgn_recipes_tags", "TAG_ID"); $filter->addRule($lang->get("name"), "TAG", "TAG"); $filter->type_name = "Tags"; // Create Menu $filtermenu = new Filtermenu("Recipe Editor", $filter); $filtermenu->addMenuEntry("Recipes", "overview.php"); $filtermenu->addMenuEntry("Tags", "tags.php"); // ActionHandler for deleting groups $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM pgn_recipes_tags Where TAG_ID=$oid"); $deleteHandler->addDbAction("DELETE FROM pgn_recipes_tag_relation Where TAG_ID=$oid"); // Create Form Container and add widgets $form = new stdEDForm("Edit Tags"); $cond = $form->setPK("pgn_recipes_tags", "TAG_ID"); $form->add(new TextInput("Tag", "pgn_recipes_tags", "TAG", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE")); $values = array(); $values[] = array("Category 1",1); $values[] = array("Category 2",2); $values[] = array("Internal",0); $form->add(new SelectOneInputFixed("Tag-Type", "pgn_recipes_tags", "TAG_CAT", $values, $cond)); $form->registerActionHandler($deleteHandler);
require_once "../../config.inc.php"; $auth = new auth("VARIATIONS"); $page = new page("Variations"); $filter = new Filter("variations", "VARIATION_ID"); $filter->prevent_sysvar_disp = false; $filter->addRule($lang->get("v_name"), "NAME", "NAME"); $filter->addRule($lang->get("v_short"), "SHORTTEXT", "SHORTTEXT"); $filter->setAdditionalCondition("DELETED=0"); $filter->icon = "li_variation.gif"; $filtermenu = new Filtermenu($lang->get("variations"), $filter); include "menu.php"; $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("UPDATE variations SET DELETED=1 where variation_id=$oid and variation_id > 999"); $form = new stdEDForm($lang->get("v_name", "Edit Language"), "i_variation.gif"); $cond = $form->setExPK("variations", "VARIATION_ID"); $form->add(new TextInput($lang->get("v_name"), "variations", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE")); $form->add(new TextInput($lang->get("v_short"), "variations", "SHORTTEXT", $cond, "type:text,width:40,size:5", "MANDATORY&UNIQUE")); $form->add(new TextInput($lang->get("description"), "variations", "DESCRIPTION", $cond, "type:textarea,width:300,size:4", "")); if ($oid==1) $form->forbidDelete(true); $form->registerActionHandler($deleteHandler); $page->addMenu($filtermenu); $page->add($form); $page->tipp = $lang->get("help_variation", "Content may have different variations. So variations can be languages or different profiles of content."); $page->draw(); $db->close(); ?>
$auth = new auth("META_TEMP"); $page = new page("Meta-Templates"); $filter = new Filter("meta_templates", "MT_ID"); $filter->addRule($lang->get("name"), "NAME", "NAME"); $filter->setNewAction("meta.php"); $filter->setAdditionalCondition("INTERNAL = 0 AND VERSION = 0"); $filter->icon = "li_meta.gif"; $filter->type_name = "Meta Templates"; $filtermenu = new Filtermenu($lang->get("metatemplates"), $filter); $deleteHandler = new ActionHandler("DELETE"); // add update action for referenced meta-templates!!! $deleteHandler->addDbAction("DELETE FROM meta_templates where MT_ID=$oid and MT_ID > 999"); $deleteHandler->addDbAction("DELETE FROM meta_template_items where MT_ID=$oid and MT_ID>999"); $form = new stdEDForm($lang->get("mt_properties"), "i_meta.gif"); $cond = $form->setPK("meta_templates", "MT_ID"); $form->add(new TextInput($lang->get("name"), "meta_templates", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE")); $form->add(new TextInput($lang->get("description"), "meta_templates", "DESCRIPTION", $cond, "type:textarea,width:300,size:4", "")); $form->registerActionHandler($deleteHandler); //check, if deletion is alowed or not. $amount = countRows("cluster_templates", "MT_ID", "MT_ID = $oid"); $amount += countRows("content", "MT_ID", "MT_ID = $oid"); if ($amount > 0) $form->forbidDelete(true); if ($page_action == 'UPDATE' || $page_action == "DELETE" || ($page_action=="INSERT" && $page_state == 'processing' && $errors == "")) {
* (at your option) any later version. * * N/X is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with N/X; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **********************************************************************/ require_once "../../config.inc.php"; $auth = new auth("ADMINISTRATOR"); $page = new Page("Edit Link"); $form = new stdEDForm($lang->get("edlink", "Edit Link")); $cond = $form->setPK("pgn_linkexchange", "ID"); $form->addHeaderLink(crHeaderLink($lang->get("back"), "plugin/linkexchange/overview.php?sid=" . $sid)); $form->add(new TextInput($lang->get("title", "Title"), "pgn_linkexchange", "TITLE", $cond, "type:text,size:128,width:300", "MANDATORY")); $form->add(new TextInput($lang->get("url", "URL"), "pgn_linkexchange", "URL", $cond, "type:url,size:256,width:300", "MANDATORY")); $form->add(new TextInput($lang->get("backlink", "Backlink"), "pgn_linkexchange", "RECIPROCALURL", $cond, "type:url,size:256,width:300", "")); $form->add(new TextInput($lang->get("email"), "pgn_linkexchange", "EMAIL", $cond, "type:text,size:256,width:300", "")); $form->add(new SitepageSelector('Page', 'pgn_linkexchange', 'SOURCEID', $cond, "", "", "NUMBER", true)); $form->add(new CheckboxTxtInput($lang->get("approved", "Approved"), "pgn_linkexchange", "APPROVED", $cond)); $form->add(new TextInput($lang->get("description"), "pgn_linkexchange", "DESCRIPTION", $cond, "type:textarea,size:5,width:300", "")); $form->add(new TextInput($lang->get("Keywords"), "pgn_linkexchange", "KEYWORDS", $cond, "type:textarea,size:5,width:300", "")); $form->add(new NonDisplayedValueOnInsert("pgn_linkexchange", 'INSERTTIMESTAMP', $cond, getdate())); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM pgn_linkexchange WHERE ID={$oid} "); $form->registerActionHandler($deleteHandler); $page->add($form); $page->draw();
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with N/X; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **********************************************************************/ require_once "../../config.inc.php"; $auth = new auth("ADMINISTRATOR|DEVELOPER"); $page = new page("Global Values"); $filter = new Filter("global", "G_ID"); $filter->addRule("Key", "NAME", "NAME"); $filtermenu = new Filtermenu("Global Values", $filter); $filtermenu->addMenuEntry("Edit Values", "global.php"); $deleteHandler = new ActionHandler("DELETE"); $deleteHandler->addDbAction("DELETE FROM global where g_id=$oid and g_id > 999"); $form = new stdEDForm("Edit Values", "i_user.gif"); $cond = $form->setPK("global", "G_ID"); $form->add(new TextInput("Key", "global", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE")); $form->add(new TextInput("Value", "global", "VALUE", $cond, "type:textarea,width:300,size:4", "")); $form->registerActionHandler($deleteHandler); $page->addMenu($filtermenu); $page->add($form); $page->draw(); ?>