$clean_op = htmlentities($_GET["op"]); } if (isset($_POST["op"])) { $clean_op = htmlentities($_POST["op"]); } $valid_op = array("mod", "changedField", "clone", "addcustomtag", "del", ""); if (in_array($clean_op, $valid_op, TRUE)) { switch ($clean_op) { case "mod": case "changedField": $customtagid = isset($_GET["customtagid"]) ? (int) $_GET["customtagid"] : 0; editcustomtag($customtagid); break; case "clone": $customtagid = isset($_GET["customtagid"]) ? (int) $_GET["customtagid"] : 0; editcustomtag($customtagid, TRUE); break; case "addcustomtag": $controller = new icms_ipf_Controller($icms_customtag_handler); $controller->storeFromDefaultForm(_CO_ICMS_CUSTOMTAG_CREATED, _CO_ICMS_CUSTOMTAG_MODIFIED); break; case "del": $controller = new icms_ipf_Controller($icms_customtag_handler); $controller->handleObjectDeletion(); break; default: icms_cp_header(); $objectTable = new icms_ipf_view_Table($icms_customtag_handler); $objectTable->addColumn(new icms_ipf_view_Column("name", _GLOBAL_LEFT, 150, "getCustomtagName")); $objectTable->addColumn(new icms_ipf_view_Column("description", _GLOBAL_LEFT)); $objectTable->addColumn(new icms_ipf_view_Column(_CO_ICMS_CUSTOMTAGS_TAG_CODE, "center", 200, "getXoopsCode"));
if (isset($_GET['op'])) { $op = $_GET['op']; } if (isset($_POST['op'])) { $op = $_POST['op']; } switch ($op) { case "mod": $customtagid = isset($_GET['customtagid']) ? intval($_GET['customtagid']) : 0; smart_xoops_cp_header(); editcustomtag(true, $customtagid); break; case "clone": $customtagid = isset($_GET['customtagid']) ? intval($_GET['customtagid']) : 0; smart_xoops_cp_header(); editcustomtag(true, $customtagid, true); break; case "addcustomtag": include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php"; $controller = new SmartObjectController($smartobject_customtag_handler); $controller->storeFromDefaultForm(_AM_SOBJECT_CUSTOMTAGS_CREATED, _AM_SOBJECT_CUSTOMTAGS_MODIFIED); break; case "del": include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php"; $controller = new SmartObjectController($smartobject_customtag_handler); $controller->handleObjectDeletion(); break; default: smart_xoops_cp_header(); smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS); smart_collapsableBar('createdcustomtags', _AM_SOBJECT_CUSTOMTAGS, _AM_SOBJECT_CUSTOMTAGS_DSC);