function delCategoy() { checkPerm('view'); require_once _base_ . '/lib/lib.form.php'; $id_category = importVar('id_category', true, 0); $lang =& DoceboLanguage::createInstance('reservation'); $out = $GLOBALS['page']; $out->setWorkingZone('content'); $man_res = new Man_Reservation(); if (isset($_GET['confirm'])) { $confirm = importVar('confirm', true, 0); if ($confirm) { $result = $man_res->delCategory($id_category); } if ($result) { Util::jump_to('index.php?modname=reservation&op=view_category'); } else { Util::jump_to('index.php?modname=reservation&op=view_category&error=del_category'); } } $GLOBALS['page']->add(getTitleArea($lang->def('_DEL_CATEGORY_TITLE'), '', $lang->def('_NEW_CATEGORY')) . '<div class="std_block">' . getDeleteUi($lang->def('_AREYOUSURE'), $lang->def('_DEL_CATEGORY_INFO'), true, 'index.php?modname=reservation&op=del_category&id_category=' . $id_category . '&confirm=1', 'index.php?modname=reservation&op=view_category') . '</div>', 'content'); }