English translation of category_list_table.php:
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* Scriptversion: 4images 1.7 *
* Copyright: (C) 2002 Jan Sorgalla *
* Web: http://www.4homepages.de *
**************************************************************************
* File: detail_list_table.php *
* Autor : www.detlev-kostka.de *
**************************************************************************
* Diese Datei ist nicht Bestandteil des Ursprungscipts ! *
* Sie wurde für www.detlev-kostka.de zur erweiterten Verwendung *
* des 4image-Gallery-Management-Systems erstellt. *
*************************************************************************/
// Als gesicherte Datei angelegt !
if (!defined('ROOT_PATH')) {
die("Security violation");
}
//---------------------------------------------------------------
//-- Auskommentieren, wenn nur reg.User die Liste sehen sollen --
//---------------------------------------------------------------
//if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
// show_error_page($lang['no_permission_sitemap']);
// exit;
//}
//----------------------------------------------------------------
//-- Kategorie-Liste eingebaut am 09.07.2005 ---------------------
//----------------------------------------------------------------
function get_category_html_bits($cat_id = 0, $cid = 0, $depth = 1) {
global $site_db, $html_cat_cache, $cat_cache, $new_image_cache, $site_sess;
if (!isset($html_cat_cache[$cid])) {
return "";
}
$category_list = "";
foreach ($html_cat_cache[$cid] as $key => $category_id) {
$cat_num_new = (isset($new_image_cache[$category_id])) ? $new_image_cache[$category_id] : 0;
if (check_permission("auth_viewcat", $category_id)) {
if ($depth > 1) {
$category_list .= " ";
}
else {
$category_list .= "<br>";
}
$category_list .= str_repeat(" ", $depth - 1)."<img src=\"".get_gallery_image("node_last.gif")."\" alt=\"\">\n";
if ($depth > 1) {
if ($cat_num_new > 0) {
$category_list .= "<img src=\"".get_gallery_image("folder_sl_new.gif")."\" alt=\"New Images in this Category\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> ... [ Images: ".$cat_cache[$category_id]['num_images']." ; <span style=\"color:#FF0000;\">New Images: <b>".$cat_num_new."</b></span> ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";
}
else {
$category_list .= "<img src=\"".get_gallery_image("folder_sl.gif")."\" alt=\"\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> - [ Images: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";
}
}
else {
if ($cat_num_new > 0) {
$category_list .= "<img src=\"".get_gallery_image("folder_new.gif")."\" alt=\"New Images in this Category\"><b><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\">".$cat_cache[$category_id]['cat_name']."</a><small> - Main Category - [ Images: ".$cat_cache[$category_id]['num_images']." ; <span style=\"color:#FF0000;\">New: <b>".$cat_num_new."</b></span>; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</b><br /> ".$cat_cache[$category_id]['cat_description']."</small><br>";
}
else {
$category_list .= "<img src=\"".get_gallery_image("folder.gif")."\" alt=\"\"><b><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\">".$cat_cache[$category_id]['cat_name']."</a><small> - Main Category - [ Images: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</b><br /> ".$cat_cache[$category_id]['cat_description']."</small><br>";
}
}
$category_list .= get_category_html_bits($cat_id, $category_id, $depth + 1);
}
}
unset($html_cat_cache[$cid]);
return $category_list;
}
?>
Cheers!