load( $cont_2 ); $lang = $tpl_2->loadLanguage( $langs ); include($global['php_root'].'_inc/func/functionen_forum.php'); /* -------------------------- */ $out = ''; $sql_k = mysql_query("SELECT * FROM `shk_forum_kat` WHERE `laden` > 0 AND `active` = 1 ORDER BY `laden` ASC "); while ($erg_k = @mysql_fetch_object( $sql_k ) ) { // Beschreibung zur Kategorie $f_des = $erg_k->des; $f_icon = ''; // falls Kategorie ein Shop ist if ( $erg_k->shop ) { $sql_shop_query = " SELECT anb.anb_id, seo.meta_des FROM shk_anbieter anb LEFT JOIN shk_anbieter_seo seo ON (seo.anb_id = anb.anb_id) WHERE anb.anb_pos = ".$erg_k->shop." "; $sql_shop = mysql_query($sql_shop_query); $erg_shop = @mysql_fetch_object($sql_shop); $f_des = $erg_shop->meta_des; $f_icon = ' '; } else { } // Kategorie $tpl_k = new Template( $sprache, $sprache, $tpl_2->getSubpart('loop_k') ); $tpl_k->sr('k_id', $erg_k->k_id ); $tpl_k->sr('f_name', $erg_k->name ); $tpl_k->sr('f_name_url', $erg_k->name_url ); $tpl_k->sr('f_laden', $erg_k->laden ); $tpl_k->sr('f_des', $f_des ); $tpl_k->sr('f_icon', $f_icon ); if ( $erg_k->cc >= 1 ) { // Themen $sql_t = mysql_query("SELECT * FROM `shk_forum_t` WHERE `k_id` = '".$erg_k->k_id."' ORDER BY wichtig DESC, t_id DESC LIMIT 5"); $out_t = ''; $cc = 0; while ( $erg_t = @mysql_fetch_object($sql_t) ) { $cc++; $tpl_t = new Template( $sprache, $sprache, $tpl_k->getSubpart('loop_t') ); // css für tabellen $css = ( $cc % 2 == 0 ) ? 'tr_col_1' : 'tr_col_2'; $tpl_t->sr('css', $css ); // icon $tpl_t->sr('t_w', $erg_t->wichtig ? $lang['forum_w'] : '' ); $tpl_t->sr('t_g', $erg_t->close ? $lang['forum_g'] : '' ); if ( strlen($erg_t->titel) > 60 ) $k_title = substr($erg_t->titel,0,55).'...'; else $k_title = $erg_t->titel; $tpl_t->sr('t_id', $erg_t->t_id ); $tpl_t->sr('k_title', $k_title ); $tpl_t->sr('t_title', $erg_t->titel ); $tpl_t->sr('t_title_url', $erg_t->titel_url ); // neu, user einzeln auslesen $userDataT = getAllUserDataUID( $erg_t->von_uid ); $tpl_t->sr('f_nick', $userDataT['forumNick'] ? $userDataT['forumNick'] : $userDataT['firstname'] ); $tpl_t->sr('f_uid', $erg_t->von_uid ); $tpl_t->sr('f_datum', $erg_t->t_time ? get_datum($erg_t->t_time) : '' ); $tpl_t->sr('f_ac', $erg_t->ac ? $erg_t->ac : '-' ); $tpl_t->sr('f_cc', $erg_t->cc ); if ( $erg_t->ac > 0 ) { // neu $sql_a = mysql_query("SELECT von_uid FROM `shk_forum_a` WHERE `t_id` = '".$erg_t->t_id."' ORDER BY a_id DESC LIMIT 1 "); $erg_a = @mysql_fetch_object($sql_a); $userDataA = getAllUserDataUID( $erg_a->von_uid ); $tpl_t->sr('a_nick', $userDataA['forumNick'] ? '('.$userDataA['forumNick'].')' : '('.$userDataA['firstname'].')' ); } else { $tpl_t->sr('a_nick', ''); } $out_t .= $tpl_t->out(1); } $tpl_k->replaceSubpart('loop_t', $out_t ); } else { $tpl_k->replaceSubpart('loop_t', ' ' ); } $out .= $tpl_k->out(1); } $tpl_2->replaceSubpart('loop_k', $out ); /* -------------------------- */ $page_title = 'SHK Direkt Forum'; $meta_des = 'SHK Forum für Sanitärtechnik, Heizungstechnik sowie Klima- und Kältetechnik, Rohrsysteme, Dämmung und Rohrisolierung'; $meta_key = 'Sanitärtechnik, Heizungstechnik, Klimatechnik, Kältetechnik, Rohrsysteme, Dämmerung, Rohrisolierung'; $tpl->sr('content', $tpl_2->out(1) ); include('_footer.php'); ?>