public function doConfigPageInit($page) { $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; $itemid = isset($_REQUEST['itemid']) ? $_REQUEST['itemid'] : ''; switch ($action) { case "add": $_REQUEST['itemid'] = disa_add($_POST); needreload(); break; case "delete": $oldItem = disa_get($itemid); disa_del($itemid); needreload(); break; case "edit": //just delete and re-add disa_edit($itemid, $_POST); $_REQUEST['itemid'] = $itemid; needreload(); break; } }
//modify it under the terms of version 2 the GNU General Public //License as published by the Free Software Foundation. // //This program 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. $tabindex = 0; $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; $itemid = isset($_REQUEST['itemid']) ? $_REQUEST['itemid'] : ''; $dispnum = "disa"; //used for switch on config.php //if submitting form, update database switch ($action) { case "add": disa_add($_POST); needreload(); redirect_standard(); break; case "delete": $oldItem = disa_get($itemid); disa_del($itemid); needreload(); redirect_standard(); break; case "edit": //just delete and re-add disa_edit($itemid, $_POST); needreload(); redirect_standard('itemid'); break;