'.Display::return_icon($icon_add,get_lang('TermAddNew')).get_lang('TermAddNew').'';
/*======================================
Form Glossary
======================================*/
echo '
';
}
/*======================================
Add Glossary Details
======================================*/
if ($ctok==$_GET['sec_token']) {
if (isset($_GET['name_glossary']) || isset($_GET['description_glossary'])) {
$name_glossary = Security::remove_XSS($_GET['name_glossary']);
$description_glossary = Security::remove_XSS($_GET['description_glossary']);
$add_glossary = add_glossary_details($name_glossary,$description_glossary);
}
}
/*======================================
Edit Glossary Details
======================================*/
if ($ctok==$_GET['sec_token']) {
if (isset($_GET['g_id']) || isset($_GET['n_glossary']) || isset($_GET['d_glossary'])) {
$g_id = Security::remove_XSS($_GET['g_id']);
$n_glossary = Security::remove_XSS($_GET['n_glossary']);
$d_glossary = Security::remove_XSS($_GET['d_glossary']);
$edit_glossary = edit_glossary_details($g_id,$n_glossary,$d_glossary);
}
}
/*======================================
Delete Glossary Details
======================================*/
if (isset($_GET['action']) && $_GET['action'] == 'delete_glossary') {
$g_id = Security::remove_XSS($_GET['glossary_id']);
$delete_glossary = delete_glossary_details($g_id);
Display::display_confirmation_message(get_lang('TermDeleted'));
}
/*======================================
Display Glossary Details
======================================*/
// order by up/down
$action = (!empty($_REQUEST['action'])?$_REQUEST['action']:'');
switch($action) {
case 'move_lp_up':
move_up($_REQUEST['id']);
break;
case 'move_lp_down':
move_down($_REQUEST['id']);
break;
}
// order by type (one = By Start Date, two = By End Date, three = By Term Name)
isset($_GET['type'])?$type=(int)$_GET['type']:$type='';
$glossary_list=get_glossary_details($type); //returns a results resource
$max = Database::num_rows($glossary_list);
$current = 0;
if ($max > 1) {
if ($type == 1) {
echo '';
} elseif ($type == 2) {
echo '';
} elseif ($type == 3) {
echo '';
} elseif ($type == 4){
echo '';
} else {
echo '';
}
}
echo '
';
echo '';
// glossary list
while ($row_glossary_list=Database::fetch_array($glossary_list)) {
$dsp_order = '';
if ( (isset($_GET['action']) && $_GET['action'] == 'edit_glossary') && (isset($_GET['glossary_id']) && $_GET['glossary_id'] == $row_glossary_list['glossary_id']) ) {
if ($is_allowed_to_edit) {
echo '
';
echo '
';
}
} else {
echo '';
}
$current++;
}
echo '';
/*
==============================================================================
FOOTER
==============================================================================
*/
Display::display_footer();