function delEvent() { checkPerm('view'); require_once _base_ . '/lib/lib.form.php'; $id_event = importVar('id_event', 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->delEvent($id_event); } if ($result) { Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=subscribed_user'); } else { Util::jump_to('index.php?modname=reservation&op=reservation&error=del_event'); } } $GLOBALS['page']->add(getTitleArea($lang->def('_DEL'), '', $lang->def('_EVENT')) . '<div class="std_block">' . getDeleteUi($lang->def('_AREYOUSURE'), $lang->def('_EVENT'), true, 'index.php?modname=reservation&op=del_event&id_event=' . $id_event . '&confirm=1', 'index.php?modname=reservation&op=reservation') . '</div>', 'content'); }