category-less link is always visible. * * @author Patrick Cool, main author, completely rewritten * @author Rene Haentjens, added CSV file import (October 2004) * @package dokeos.link * @todo improve organisation, tables should come from database library ============================================================================== */ /* ============================================================================== INIT SECTION ============================================================================== */ // name of the language file that needs to be included $language_file = "link"; // including libraries include("../inc/global.inc.php"); include(api_get_path(LIBRARY_PATH).'events.lib.inc.php'); include("linkfunctions.php"); $this_section=SECTION_COURSES; api_protect_course_script(); // @todo change the $_REQUEST into $_POST or $_GET // @todo remove this code $link_submitted = $_POST["submitLink"]; $category_submitted = $_POST["submitCategory"]; $urlview = $_GET["urlview"]; $submitImport = $_POST["submitImport"]; $down = $_GET['down']; $up = $_GET['up']; $catmove = $_GET['catmove']; $editlink = $_REQUEST['editlink']; $id = $_REQUEST['id']; $urllink = $_REQUEST['urllink']; $title = $_REQUEST['title']; $description = $_REQUEST['description']; $selectcategory = $_REQUEST['selectcategory']; $submitLink = $_REQUEST['submitLink']; $action = $_REQUEST['action']; $category_title = $_REQUEST['category_title']; $submitCategory = $_REQUEST['submitCategory']; $nameTools = get_lang('Links'); if ($_GET['action']=='addlink') { $nameTools = ''; $interbreadcrumb[] = array ('url' => 'link.php', 'name' => get_lang('Links')); $interbreadcrumb[] = array ('url' => 'link.php?action=addlink', 'name' => get_lang('AddLink')); } if ($_GET['action']=='addcategory') { $nameTools = ''; $interbreadcrumb[] = array ('url' => 'link.php', 'name' => get_lang('Links')); $interbreadcrumb[] = array ('url' => 'link.php?action=addcategory', 'name' => get_lang('AddCategory')); } if ($_GET['action']=='editlink') { $nameTools = ''; $interbreadcrumb[] = array ('url' => 'link.php', 'name' => get_lang('Links')); $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('EditLink')); } // Database Table definitions $tbl_link = Database::get_course_table(TABLE_LINK); $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY); //statistics event_access_tool(TOOL_LINK); Display::display_header($nameTools, 'Links'); ?> "; if ($_GET['action']=="addlink") {echo get_lang("LinkAdd");} else {echo get_lang("LinkMod");} echo "\n\n"; if ($category=="") {$category=0;} echo "
"; } elseif(($_GET['action']=="addcategory" or $_GET['action']=="editcategory") and !$submitCategory) { echo "| ".get_lang('General')." |
|---|
';
echo '";
echo " ".htmlentities($myrow["category_title"],ENT_QUOTES,$charset)."".$myrow["description"]; if (is_allowed_to_edit()) { echo ' | '; showcategoryadmintools($myrow["id"]); echo ' | '; } echo ''; echo '
|---|
". htmlentities($myrow["category_title"],ENT_QUOTES,$charset);
echo''; echo $myrow["description"]; if (is_allowed_to_edit()) { echo ' | '; showcategoryadmintools($myrow["id"]); echo ' | '; } echo ''; echo '
|---|