/acp/inc/config.php konnte nicht gefunden werden. Sie können zunächst versuchen, die Datei über das Webinterface zu erstellen, doch diese Methode funktioniert leider nicht auf allen Webservern. Der einfachste Weg ist es daher, die Datei von Hand zu erstellen.'); } // ****** INCLUDE CORE FUNCTIONS ****** // ************************************ require_once './global.php'; $title = $lang->get('Startseite'); $index_cat = ''; $linkcount = array(); $cat_ids = array(); $cache_cats = array(); $main_cats = array(); $children_cats = array(); // ================================================================ // // Statistiken ermitteln / einlesen // ================================================================ // $pr = $Cache->get('stats-pagerank'); $DirectoryStats = $Cache->get('stats-directory'); $sum_links = $DirectoryStats['TotalLinks']; $sum_cats = $DirectoryStats['TotalCats']; // ****** GET MAIN CATS ****** // *************************** $result = $db->query(" SELECT cat_id, name, image, description, links FROM " . TABLE_PREFIX . "cats WHERE parent_cat_id = 0 AND links > ". (int) $core->options['hide_empty_cats'] ." ORDER BY pos ASC, name ASC "); while ($cache_cats[] = $db->fetch_array($result)); // :FIXME: // Das letzte leere Element im Array löschen // um eine korrekte Berechung zu erreichen array_pop($cache_cats); // ****** GET DIRECT CHILDREN OF MAIN CATS ****** // ********************************************** if ($core->options['show_subcats'] == 1) { if (is_array($cache_cats)) { foreach ($cache_cats as $key => $value) { if ($value) { $main_cats[] = $value['cat_id']; } } } $result = $db->query(" SELECT cat_id, name, description, links, parent_cat_id FROM " . TABLE_PREFIX . "cats WHERE parent_cat_id IN (".implode(',', $main_cats).") ORDER BY pos ASC, name ASC "); while ($children_cats[] = $db->fetch_array($result)); } // ****** DISPLAY MAIN CATS ****** // ******************************* if (is_array($cache_cats)) { $cat_count = count($cache_cats); // Anzahl der Spalten $columns = (int) $core->options['cat_colums']; // Zeilen berechnen $table_rows = ($cat_count % $columns) ? (($cat_count - ($cat_count % $columns)) / $columns + 1) : $cat_count / $columns; for ($i = 0; $i < $table_rows; ++$i) { $index_cat .= ""; for ($ii = 0; $ii < $columns; ++$ii) { $cat_active = ($i * $columns + $ii); // wenns nichts mehr gibt, ein   $index_cat .= ""; if (isset($cache_cats[$cat_active])) { // Mark New Links $new = $db->query_fetch(" SELECT count(*) as count FROM " . TABLE_PREFIX . "links WHERE parent_cat_id = '".$cache_cats[$cat_active]['cat_id']."' AND date_entry >= '".(time() - 60 * 60 * 24 * $core->options['newlinks_img'])."' AND activated = 1 AND deactivated = 0 "); // Display direct children of main cats if ($core->options['show_subcats'] == 1) { $z = 0; $max = (int) $core->options['ShowSubCatsLimit']; foreach ($children_cats as $key => $sub_cat) { if ($sub_cat['parent_cat_id'] == $cache_cats[$cat_active]['cat_id'] && $z < $max) { $SubCategoryLink = Rewrite::getLinkCategory($sub_cat['cat_id']); $tpl->load('subcats','cat_bit_subcats_bit'); $z++; } } } $CategoryLink = Rewrite::getLinkCategory($cache_cats[$cat_active]['cat_id']); $tpl->load('cat_bit','cat_bit'); $index_cat .= $cat_bit; } else { $index_cat .= " "; } $index_cat .= ""; $cat_bit = null; $subcats = null; } $index_cat .= ""; } } // ****** DISPLAY LAST COMMENTS ****** // *********************************** $result = $db->query(" SELECT comments.*, links.url, links.name FROM " . TABLE_PREFIX . "links_comments AS comments LEFT JOIN " . TABLE_PREFIX ."links AS links ON links.link_id = comments.link_id WHERE comments.status = 0 ORDER BY comments.date_entry DESC LIMIT 0," . $core->options['show_comment_limit'] ); while ($row = $db->fetch_array($result)) { get_comment_tpl($row); } $tpl->load('content','index'); $tpl->output(); ?>