\n\n",
"";
echo get_lang('CsvExplain');
}*/
}
if (isset($down))
{
movecatlink($down);
}
if (isset($up))
{
movecatlink($up);
}
/*
-----------------------------------------------------------
Action Links
-----------------------------------------------------------
*/
if(is_allowed_to_edit())
{
echo Display::return_icon('linksnew.gif')." ".get_lang("LinkAdd")."\n";
echo Display::return_icon('folder_new.gif')." ".get_lang("CategoryAdd")."\n";
/* "".get_lang('CsvImport')."\n", // RH*/
}
//making the show none / show all links. Show none means urlview=0000 (number of zeros depending on the
//number of categories). Show all means urlview=1111 (number of 1 depending on teh number of categories).
$sqlcategories="SELECT * FROM ".$tbl_categories." ORDER BY display_order DESC";
$resultcategories=api_sql_query($sqlcategories);
$aantalcategories = @mysql_num_rows($resultcategories);
echo Display::return_icon('remove.gif')." $shownone";
echo Display::return_icon('add.gif')." $showall";
$sqlcategories="SELECT * FROM ".$tbl_categories." ORDER BY display_order DESC";
$resultcategories=api_sql_query($sqlcategories);
//Starting the table which contains the categories
echo "
";
// displaying the links which have no category (thus category = 0 or NULL), if none present this will not be displayed
$sqlLinks = "SELECT * FROM ".$tbl_link." WHERE category_id=0 or category_id IS NULL";
$result = api_sql_query($sqlLinks);
$numberofzerocategory=mysql_num_rows($result);
if ($numberofzerocategory!==0)
{
echo "
".get_lang('NoCategory')."
";
echo "
";
showlinksofcategory(0);
echo "
";
}
$i=0;
$catcounter=1;
$view="0";
while ($myrow=@mysql_fetch_array($resultcategories))
{
if (!isset($urlview))
{
// No $view set in the url, thus for each category link it should be all zeros except it's own
makedefaultviewcode($i);
}
else
{
$view=$urlview;
$view[$i]="1";
}
// if the $urlview has a 1 for this categorie, this means it is expanded and should be desplayed as a
// - instead of a +, the category is no longer clickable and all the links of this category are displayed
$myrow["description"]=text_filter($myrow["description"]);
if ($urlview[$i]=="1")
{
$newurlview=$urlview;
$newurlview[$i]="0";
echo "