Links and categories";
if (!count($data)) {
echo "
There are no categories. Click here to add one.
";
return;
}
$hasAccount = (is_array($_SESSION) && !is_null($_SESSION['userid']));
for ($i=0;$i" . utf8entities($data[$i]['title']) . "";
if (!is_null($data[$i]['description'])) {
echo "
" . preg_replace('/\n/', '
', utf8entities($data[$i]['description']));
}
echo "
Add link - Edit";
echo " - Delete";
if ($i > 0) {
echo " - Move up";
}
if ($i < count($data) - 1) {
echo " - Move down";
}
echo "";
echo "";
if (!count($data[$i]['links'])) {
echo "- No links in this category.
";
} else {
foreach ($data[$i]['links'] as $l) {
echo "- " . utf8entities($l['title']) . "";
if (!is_null($l['description'])) {
echo "
" . preg_replace('/\n/', '
', utf8entities($l['description']));
}
echo "
Edit - Delete";
echo "
";
}
}
echo "
";
}
echo "Add category
";
?>