Пример #1
0
 function delslot()
 {
     checkPerm('mod');
     require_once _base_ . '/lib/lib.form.php';
     require_once $GLOBALS['where_lms'] . '/lib/lib.coursepath.php';
     $out =& $GLOBALS['page'];
     $lang =& DoceboLanguage::createInstance('coursepath', 'lms');
     $id_slot = importVar('id_slot');
     $id_path = importVar('id_path');
     $cpath_man = new CoursePath_Manager();
     $path = $cpath_man->getCoursepathInfo($id_path);
     if (isset($_POST['confirm'])) {
         if ($id_slot != false) {
             $re = $cpath_man->deleteSlot($id_slot, $id_path);
         }
         Util::jump_to('index.php?modname=coursepath&op=pathelem&id_path=' . $id_path);
     }
     $slot = $cpath_man->getSlotInfo($id_slot);
     $title_area = array('index.php?modname=coursepath&op=pathlist' => $lang->def('_COURSEPATH'));
     $title_area['index.php?modname=coursepath&op=pathelem&id_path=' . $id_path] = $path['path_name'];
     $title_area[] = $lang->def('_DEL_SLOT');
     $GLOBALS['page']->add(getTitleArea($title_area, 'coursepath') . '<div class="std_block">' . Form::openForm('deletepath', 'index.php?modname=coursepath&amp;op=delslot') . Form::getHidden('id_path', 'id_path', $id_path) . Form::getHidden('id_slot', 'id_slot', $id_slot) . getDeleteUi($lang->def('_AREE_YOU_SURE_TO_DELETE_SLOT'), '<span class="text_bold">' . $lang->def('_MIN_SELECTION') . ' : </span>' . $slot['min_selection'] . '<br />' . '<span class="text_bold">' . $lang->def('_MAX_SELECTION') . ' : </span>' . $slot['max_selection'], false, 'confirm', 'undo') . Form::closeForm() . '</div>', 'content');
 }