function showHistory() { checkPerm('mod'); require_once _base_ . '/lib/lib.form.php'; require_once _base_ . '/lib/lib.table.php'; $lang =& DoceboLanguage::createInstance('conference', 'lms'); $conference = new Conference_Manager(); cout('<div class="yui-navset yui-navset-top tab_block"> <ul class="yui-nav"> <li class="first"> <a href="index.php?modname=conference&op=show"> <em>' . Lang::t('_ACTIVE', 'conference') . '</em> </a> </li> <li class="selected"> <a href="index.php?modname=conference&op=history"> <em>' . Lang::t('_HISTORY', 'conference') . '</em> </a> </li> </ul> <div class="yui-content">', 'content'); $tb = new Table(10, $lang->def('_OLD_ROOMS'), $lang->def('_OLD_ROOM')); $tb->initNavBar('ini', 'button'); $ini = $tb->getSelectedElement(); if (isset($_POST['unset_filter'])) { unset($_POST['filter_date']); } $date_filter = Get::req('filter_date', DOTY_MIXED, ''); $rooms = $conference->getOldRoom($_SESSION['idCourse'], $ini); $rooms_number = $conference->getOldRoomNumber($_SESSION['idCourse']); if ($rooms_number == 0) { $GLOBALS['page']->add(Form::openForm('history_table', 'index.php?modname=conference&op=history') . Form::openElementSpace() . Form::getDatefield($lang->def('_DATE'), 'filter_date', 'filter_date', $date_filter) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('filter', 'filter', $lang->def('_FILTER')) . Form::getButton('unset_filter', 'unset_filter', $lang->def('_UNDO')) . Form::closeElementSpace() . Form::closeForm() . '<strong id="noroom">' . $lang->def('_NO_ROOM_AVAILABLE') . '</strong>' . '<br/>' . getBackUi('index.php?modname=conference&op=list', $lang->def('_BACK')), 'content'); } else { $cont_h = array($lang->def('_VIDEOCONFERENCE'), $lang->def('_START_DATE'), $lang->def('_MEETING_HOURS'), ''); $type_h = array('table_main_colum', 'align_center nowrap', 'align_center nowrap', 'image'); $tb->setColsStyle($type_h); $tb->addHead($cont_h); foreach ($rooms as $room_info) { $room_id = $room_info['id']; $cont = array(); $cont[] = $room_info['name'] . " (" . $room_info['room_type'] . ")"; $cont[] = Format::date(date('Y-m-d H:i:s', $room_info['starttime']), 'datetime'); $cont[] = $room_info['meetinghours']; $now = time(); if ($room_info['room_type'] == 'teleskill') { $cont[] = '<a href="index.php?modname=conference&op=log&id=' . $room_info['id'] . '" ' . 'title="' . $lang->def('_LOG') . ' : ' . strip_tags($room_info['name']) . '"><img src="' . getPathImage() . '/standard/edit.png' . '" /></a>'; } else { $cont[] = ''; } $tb->addBody($cont); } cout(Form::openForm('history_table', 'index.php?modname=conference&op=history') . Form::openElementSpace() . Form::getDatefield($lang->def('_DATE'), 'filter_date', 'filter_date', $date_filter) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('filter', 'filter', $lang->def('_FILTER')) . Form::getButton('unset_filter', 'unset_filter', $lang->def('_UNDO')) . Form::closeElementSpace() . Form::closeForm() . $tb->getTable() . $tb->getNavBar($ini, $rooms_number) . '<br/>' . getBackUi('index.php?modname=conference&op=list', $lang->def('_BACK')), 'content'); } cout('<div class="nofloat"></div></div></div>', 'content'); }