validate_id($id); } if ($list_id) { $site->validate_id($list_id); } $date = new Date(); $cats = new Taglist(); $list_obj = new List_lists(); if ($ac == 'list') { $catlist = $cats->list_cats($id); $template->assign("LIST", $catlist); $count_fics = new Count_Values(); $total = $count_fics->get_total(LISTMAP_TABLE, "list_id = $id"); $template->assign("LIST_TOTAL", $total); $list_info = $list_obj->get_list_info($id); $title = $list_info['name'].$lang['category_listing']; $title_h = $list_info['name'].$lang['category_listing']; $text = new Text(); $template->assign("LIST_INTRO", $text->format_text($list_info['info_long'], 0, 1)); $template->assign_if("intro", 1); $template->assign_if("list_info", 1); // $last = $date->last_update('', 'list', $id); $last = $date->last_update('raw', 'list', $id); $template->assign("LAST_DATE", $last); $template->assign("LAST_FORMATTED", $text->format_date($last)); $template->assign("LIST_ID", $id); $list_admin = $list_obj->list_admin('list_admin', $id); $template->assign("ADMINS", $list_admin); $template->assign_if("cat_list", 1); } elseif ($ac == 'tag') { $fic_list = new Fic_list(); $list = $fic_list->ficlist('tag', $id, $list_id, '', 1); $template->assign("LIST", $list[0]); $template->assign("COUNT", $list[1]); $template->assign_if("tags", 1); $catlist = $cats->get_tags('id', $id); if ($list_id) { $list_info = $list_obj->get_list_info($list_id); $title = str_replace('{LIST_ID}', $list_id, $lang['showcat_title']); $title = str_replace('{LIST_NAME}', $list_info['name'], $title); $title = str_replace('{CAT}', $catlist[0]['tag'], $title); $template->assign_if("filter_tag", 1); $template->assign("LIST_ID", $list_id); $format_list_s = $list_obj->list_lists('', 'form', $list_id); } else { $title = $lang['showtag_title'].$catlist[0]['tag']; $template->assign_if("filter", 1); $template->assign_if("filter_tag_list", 1); $format_list_s = $list_obj->list_lists('', 'form'); } $template->assign("TAG", $id); $template->assign("SEARCH_LISTS", $format_list_s); $template->assign("SEARCH_TAGS", $list[2]); $title_h = $lang['showtag_title'].$catlist[0]['tag']; } elseif ($ac == 'date') { $date = $_GET['date']; $fic_list = new Fic_list(); $list = $fic_list->ficlist('date', $date, $list_id); $template->assign("LIST", $list[0]); $template->assign("COUNT", $list[1]); $template->assign_if("date", 1); $list_info = $list_obj->get_list_info($list_id); $title = str_replace('{LIST_ID}', $list_id, $lang['shownew_title']); $title = str_replace('{LIST_NAME}', $list_info['name'], $title); $txt = new Text(); $title = str_replace('{DATE}', $txt->format_date($date), $title); $title_h = $list_info['name']; } else { $list = new List_lists(); $format_list = $list->list_lists(); $template->assign("LIST", $format_list); $title = $lang['fic_index_title']; $title_h = $lang['fic_index_title']; } // Process template $template->assign("PAGE_TITLE", $title); $template->assign("HEAD_TITLE", $site->site_title($title_h, 1)); $template->pparse("layout/fic_index.tmpl"); ?>