Hallo
Habe da mal eine Frage
Wie kann ich im Forum {lastregistuser} mit einbauen?
zb: Wir begrüßen unseren neuesten Benutzer: Test
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
1 2 3 4 5 6 7 | $erg = db_query( "SELECT id, name, regist FROM prefix_user ORDER BY regist DESC LIMIT 5" ); $lastregistuser = '' ; while ( $row = db_fetch_object( $erg ) ) { $lastregistuser .= '<a class="box" href="?user-details-' . $row ->id. '">' . $row ->name. '</a>, ' ; } $lastregistuser = substr ( $lastregistuser , 0, -2); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | <?php # Copyright by: Manuel # Support: www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); $title = $allgAr [ 'title' ]. ' :: Forum' ; $hmenu = $extented_forum_menu . 'Forum' . $extented_forum_menu_sufix ; $design = new design ( $title , $hmenu , 1); $design ->header(); if ( $menu ->get(1) == 'markallasread' ) { user_markallasread (); } $tpl = new tpl ( 'forum/showforum' ); $tpl ->out (0); $category_array = array (); $forum_array = array (); $q = "SELECT a.id, a.cid, a.name, a.besch, a.topics, a.posts, b.name as topic, c.id as pid, c.tid, b.rep, c.erst, c.time, a.cid, k.name as cname FROM prefix_forums a LEFT JOIN prefix_forumcats k ON k.id = a.cid LEFT JOIN prefix_posts c ON a.last_post_id = c.id LEFT JOIN prefix_topics b ON c.tid = b.id LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = a.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = a.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = a.start WHERE (( ".$_SESSION['authright']." <= a.view AND a.view < 1) OR ( ".$_SESSION['authright']." <= a.reply AND a.reply < 1) OR ( ".$_SESSION['authright']." <= a.start AND a.start < 1) OR vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR -9 = ".$_SESSION['authright']." ) AND k.cid = 0 ORDER BY k.pos, a.pos"; $erg1 = db_query( $q ); $xcid = 0; while ( $r = db_fetch_assoc( $erg1 ) ) { $r [ 'topicl' ] = $r [ 'topic' ]; $r [ 'topic' ] = html_enc_substr( $r [ 'topic' ],0,23); $r [ 'ORD' ] = forum_get_ordner( $r [ 'time' ], $r [ 'id' ]); $r [ 'mods' ] = getmods( $r [ 'id' ]); $r [ 'datum' ] = date ( 'd.m.y - H:i' , $r [ 'time' ]); $r [ 'page' ] = ceil ( ( $r [ 'rep' ]+1) / $allgAr [ 'Fpanz' ] ); $tpl ->set_ar ( $r ); if ( $r [ 'cid' ] <> $xcid ) { $tpl ->out(1); //Unterkategorien $sql = db_query( "SELECT DISTINCT a.name as cname, a.id as cid FROM `prefix_forumcats` a LEFT JOIN `prefix_forums` b ON a.id = b.cid WHERE a.cid = {$r['cid']} AND a.id = b.cid ORDER BY a.pos, a.name" ); while ( $ucat = db_fetch_assoc( $sql )) { $tpl ->set_ar_out( $ucat ,2); } //Unterkategorien - Ende $xcid = $r [ 'cid' ]; } $tpl ->set_ar_out( $r ,3); } ##### Moderartoren $moda = array (); $erg = db_query( "SELECT b.id as uid, b.name, b.recht,c.id FROM prefix_forummods a LEFT JOIN prefix_user b ON b.id = a.uid LEFT JOIN prefix_grundrechte c ON c.id = b.recht GROUP BY b.name ORDER BY b.id" ); while ( $row = db_fetch_object( $erg )) { //$recht_name=@db_result(db_query('SELECT name FROM prefix_grundrechte WHERE id='.$row->recht),0); switch ( $row ->recht) { case -9: $color = '#ff0000' ; break ; //Super Administrator case -8: $color = '#ff8c00' ; break ; //Co Administrator case -7: $color = '#1e90ff' ; break ; //Super-Moderator case -6: $color = '#9F00FF' ; break ; //Css Admin case -5: $color = '#33E500' ; break ; //Coder und Designer case -4: $color = '#ff1493' ; break ; //Member case -3: $color = '#a0522d' ; break ; //Trialmember case -2: case -1: default : $color = '#ffffff' ; break ; //User } $moda [] = '<a href="index.php?user-details-' . $row ->uid. '" style="font-weight: bold; color:' . $color . '">' . $row ->name. '</a>' ; } # statistic # $ges_online_user = ges_online(); $stats_array = array ( 'privmsgpopup' => check_for_pm_popup (), 'topics' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_topics`" ),0), 'posts' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_posts`" ),0), 'users' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_user`" ),0), 'istsind' => ( $ges_online_user > 1 ? 'sind' : 'ist' ), 'gesonline' => $ges_online_user , 'gastonline' => ges_gast_online(), 'useronline' => ges_user_online(), 'userliste' => user_online_liste(), 'moda' => implode( ', ' , $moda ), 'userliste_today' => user_online_today_liste(), ); $tpl ->set_ar_out( $stats_array ,4); function user_online_today_liste(){ $OnListe = '' ; $dif = mktime (0,0,0, date ( 'm' ), date ( 'd' ), date ( 'Y' )); $erg = db_query( "SELECT a.id, a.name, a.llogin, b.bez, a.spezrank FROM `prefix_user` a LEFT JOIN prefix_ranks b ON b.id = a.spezrank WHERE a.llogin > '" . $dif . "' ORDER BY llogin" ); while ( $row = db_fetch_object( $erg )) { if ( $row ->spezrank <> 0 ) { $OnListe .= '<a class="' . $row ->bez. '" title="' . $row ->bez. '" href="index.php?user-details-' . $row ->id. '">' . $row ->name. '</a>, ' ; } else { $OnListe .= '<a href="index.php?user-details-' . $row ->id. '">' . $row ->name. '</a>, ' ; } } $OnListe = substr ( $OnListe ,0, strlen ( $OnListe ) - 3); return ( $OnListe ); } $design ->footer(); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | <?php # Copyright by: Manuel # Support: www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); $title = $allgAr [ 'title' ]. ' :: Forum' ; $hmenu = $extented_forum_menu . 'Forum' . $extented_forum_menu_sufix ; $design = new design ( $title , $hmenu , 1); $design ->header(); if ( $menu ->get(1) == 'markallasread' ) { user_markallasread (); } $tpl = new tpl ( 'forum/showforum' ); $tpl ->out (0); $category_array = array (); $forum_array = array (); $q = "SELECT a.id, a.cid, a.name, a.besch, a.topics, a.posts, b.name as topic, c.id as pid, c.tid, b.rep, c.erst, c.time, a.cid, k.name as cname FROM prefix_forums a LEFT JOIN prefix_forumcats k ON k.id = a.cid LEFT JOIN prefix_posts c ON a.last_post_id = c.id LEFT JOIN prefix_topics b ON c.tid = b.id LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = a.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = a.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = a.start WHERE (( ".$_SESSION['authright']." <= a.view AND a.view < 1) OR ( ".$_SESSION['authright']." <= a.reply AND a.reply < 1) OR ( ".$_SESSION['authright']." <= a.start AND a.start < 1) OR vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR -9 = ".$_SESSION['authright']." ) AND k.cid = 0 ORDER BY k.pos, a.pos"; $erg1 = db_query( $q ); $xcid = 0; while ( $r = db_fetch_assoc( $erg1 ) ) { $r [ 'topicl' ] = $r [ 'topic' ]; $r [ 'topic' ] = html_enc_substr( $r [ 'topic' ],0,23); $r [ 'ORD' ] = forum_get_ordner( $r [ 'time' ], $r [ 'id' ]); $r [ 'mods' ] = getmods( $r [ 'id' ]); $r [ 'datum' ] = date ( 'd.m.y - H:i' , $r [ 'time' ]); $r [ 'page' ] = ceil ( ( $r [ 'rep' ]+1) / $allgAr [ 'Fpanz' ] ); $tpl ->set_ar ( $r ); if ( $r [ 'cid' ] <> $xcid ) { $tpl ->out(1); //Unterkategorien $sql = db_query( "SELECT DISTINCT a.name as cname, a.id as cid FROM `prefix_forumcats` a LEFT JOIN `prefix_forums` b ON a.id = b.cid WHERE a.cid = {$r['cid']} AND a.id = b.cid ORDER BY a.pos, a.name" ); while ( $ucat = db_fetch_assoc( $sql )) { $tpl ->set_ar_out( $ucat ,2); } //Unterkategorien - Ende $xcid = $r [ 'cid' ]; } $tpl ->set_ar_out( $r ,3); } ##### Moderartoren $moda = array (); $erg = db_query( "SELECT b.id as uid, b.name, b.recht,c.id FROM prefix_forummods a LEFT JOIN prefix_user b ON b.id = a.uid LEFT JOIN prefix_grundrechte c ON c.id = b.recht GROUP BY b.name ORDER BY b.id" ); while ( $row = db_fetch_object( $erg )) { //$recht_name=@db_result(db_query('SELECT name FROM prefix_grundrechte WHERE id='.$row->recht),0); switch ( $row ->recht) { case -9: $color = '#ff0000' ; break ; //Super Administrator case -8: $color = '#ff8c00' ; break ; //Co Administrator case -7: $color = '#1e90ff' ; break ; //Super-Moderator case -6: $color = '#9F00FF' ; break ; //Css Admin case -5: $color = '#33E500' ; break ; //Coder und Designer case -4: $color = '#ff1493' ; break ; //Member case -3: $color = '#a0522d' ; break ; //Trialmember case -2: case -1: default : $color = '#ffffff' ; break ; //User } $moda [] = '<a href="index.php?user-details-' . $row ->uid. '" style="font-weight: bold; color:' . $color . '">' . $row ->name. '</a>' ; } # lastregistuser # $erg = db_query( "SELECT id, name, regist FROM prefix_user ORDER BY regist DESC LIMIT 5" ); $lastregistuser = '' ; while ( $row = db_fetch_object( $erg ) ) { $lastregistuser .= '<a class="box" href="?user-details-' . $row ->id. '">' . $row ->name. '</a>, ' ; } $lastregistuser = substr ( $lastregistuser , 0, -2); # statistic # $ges_online_user = ges_online(); $stats_array = array ( 'lastregistuser' => $lastregistuser , 'privmsgpopup' => check_for_pm_popup (), 'topics' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_topics`" ),0), 'posts' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_posts`" ),0), 'users' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_user`" ),0), 'istsind' => ( $ges_online_user > 1 ? 'sind' : 'ist' ), 'gesonline' => $ges_online_user , 'gastonline' => ges_gast_online(), 'useronline' => ges_user_online(), 'userliste' => user_online_liste(), 'moda' => implode( ', ' , $moda ), 'userliste_today' => user_online_today_liste(), ); $tpl ->set_ar_out( $stats_array ,4); function user_online_today_liste(){ $OnListe = '' ; $dif = mktime (0,0,0, date ( 'm' ), date ( 'd' ), date ( 'Y' )); $erg = db_query( "SELECT a.id, a.name, a.llogin, b.bez, a.spezrank FROM `prefix_user` a LEFT JOIN prefix_ranks b ON b.id = a.spezrank WHERE a.llogin > '" . $dif . "' ORDER BY llogin" ); while ( $row = db_fetch_object( $erg )) { if ( $row ->spezrank <> 0 ) { $OnListe .= '<a class="' . $row ->bez. '" title="' . $row ->bez. '" href="index.php?user-details-' . $row ->id. '">' . $row ->name. '</a>, ' ; } else { $OnListe .= '<a href="index.php?user-details-' . $row ->id. '">' . $row ->name. '</a>, ' ; } } $OnListe = substr ( $OnListe ,0, strlen ( $OnListe ) - 3); return ( $OnListe ); } $design ->footer(); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | <?php # Copyright by: Manuel # Support: www.ilch.de /** * @name IlchBB Forum * @version 3.1 * @author Florian Koerner * @link http://www.koerner-ws.de/ * @license GNU General Public License */ defined ( 'main' ) or die ( 'no direct access' ); // IlchBB Forum 3.1 :: Loader :: Start require_once ( 'include/contents/ilchbb_forum/ilchbb_loader.php' ); // IlchBB Forum 3.1 :: Loader :: Ende $title = $allgAr [ 'title' ]. ' :: Forum' ; $hmenu = $extented_forum_menu . 'Forum' . $extented_forum_menu_sufix ; $design = new design ( $title , $hmenu , 1); $design ->header(); // IlchBB Forum 3.1 :: Extensions :: Start $ilchbb_tpl = new tpl( 'ilchbb_forum/load_extensions' ); $ilchbb_tpl ->out(0); // IlchBB Forum 3.1 :: Extensions :: End if ( $menu ->get(1) == 'markallasread' ) { $ilchBB ->deleteNewTopics(); } $tpl = new tpl ( 'ilchbb_forum/showforum' ); $tpl ->out (0); $category_array = array (); $forum_array = array (); $q = "SELECT a.id, a.cid, a.name, a.besch, a.topics, a.posts, b.name as topic, c.id as pid, c.tid, b.rep, c.erst, c.time, a.cid, k.name as cname FROM prefix_forums a LEFT JOIN prefix_forumcats k ON k.id = a.cid LEFT JOIN prefix_posts c ON a.last_post_id = c.id LEFT JOIN prefix_topics b ON c.tid = b.id LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = a.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = a.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = a.start WHERE (( ".$_SESSION['authright']." <= a.view AND a.view < 1) OR ( ".$_SESSION['authright']." <= a.reply AND a.reply < 1) OR ( ".$_SESSION['authright']." <= a.start AND a.start < 1) OR vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR -9 = ".$_SESSION['authright']." ) AND k.cid = 0 ORDER BY k.pos, a.pos"; $erg1 = db_query( $q ); $xcid = 0; while ( $r = db_fetch_assoc( $erg1 ) ) { // IlchBB Forum 3.1 :: Get Forum Status :: Start $ord = $ilchBB ->checkNewTopics( $r [ 'id' ]); if ( $ord === TRUE) { $r [ 'ORD' ] = 'forum_unread' ; $r [ 'TORD' ] = 'Neue Beiträge' ; } else { $r [ 'ORD' ] = 'forum_read' ; $r [ 'TORD' ] = 'Keine neuen Beiträge' ; } // IlchBB Forum 3.1 :: Get Forum Status :: Ende $r [ 'topicl' ] = $r [ 'topic' ]; $r [ 'topic' ] = html_enc_substr( $r [ 'topic' ],0,23); $r [ 'mods' ] = getmods( $r [ 'id' ]); $r [ 'datum' ] = date ( 'd.m.y - H:i' , $r [ 'time' ]); $r [ 'page' ] = ceil ( ( $r [ 'rep' ]+1) / $allgAr [ 'Fpanz' ] ); $r [ 'erst' ] = forum_farbname( $r [ 'erst' ]); $r [ 'name' ] = bbcode( $r [ 'name' ]); $tpl ->set_ar( $r ); if ( $r [ 'cid' ] <> $xcid ) { $tpl ->out(1); // IlchBB Forum 3.1 :: Set CSS Class :: Start $class = 'ilchbb_Cmite' ; // IlchBB Forum 3.1 :: Set CSS Class :: End //Unterkategorien $sql = db_query( "SELECT DISTINCT a.name as cname, a.id as cid FROM `prefix_forumcats` a LEFT JOIN `prefix_forums` b ON a.id = b.cid WHERE a.cid = {$r['cid']} AND a.id = b.cid ORDER BY a.pos, a.name" ); while ( $ucat = db_fetch_assoc( $sql )) { // IlchBB Forum 3.1 :: Change CSS Class :: Start $class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' ); $ucat [ 'class' ] = $class ; // IlchBB Forum 3.1 :: Change CSS Class :: Start $tpl ->set_ar_out( $ucat ,2); } //Unterkategorien - Ende $xcid = $r [ 'cid' ]; } // IlchBB Forum 3.1 :: Change CSS Class :: Start $class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' ); $r [ 'class' ] = $class ; // IlchBB Forum 3.1 :: Change CSS Class :: Start $tpl ->set_ar_out( $r ,3); } // IlchBB Forum 3.1 :: Online Today :: Start if ( $allgAr [ 'ilchbb_forum_dayonline' ] == 1) { $time = mktime (0,0,0, date ( "n" ), date ( "j" ), date ( "Y" )); $query = 'SELECT `id`,`name` FROM `prefix_user` WHERE llogin > ' . $time ; $query = db_query( $query ); $cache = '' ; while ( $row = db_fetch_assoc( $query )) { if (! empty ( $cache )) $cache .= ', ' ; $cache .= '<a href="index.php?user-details-' . $row [ 'id' ]. '">' . $row [ 'name' ]. '</a>' ; } $tpl ->set( 'dayonline' , '<br /><br />Heute waren bereits online:<br />' . $cache ); } else { $tpl ->set( 'dayonline' , '' ); } // IlchBB Forum 3.1 :: Online Today :: End # statistic # $dif = date ( 'Y-m-d H:i:s' , time() - USERUPTIME); $erg = db_query( "SELECT DISTINCT uid, name, prefix_ranks.bez, spezrank FROM `prefix_online` left join prefix_user on prefix_user.id = prefix_online.uid left join prefix_ranks ON prefix_ranks.id = prefix_user.spezrank WHERE uid > 0 and uptime > '" . $dif . "'" ); while ( $row = db_fetch_object( $erg )) { if ( $row ->spezrank != 0) { $userliste .= '<a title="' . $row ->bez . '" href="index.php?user-details-' . $row ->uid . '"><b><i>' . forum_farbname( $row ->name) . '</i></b></a> , ' ; } else { $userliste .= '<a href="index.php?user-details-' . $row ->uid . '">' . forum_farbname( $row ->name) . '</a> , ' ; } } $userliste = substr ( $userliste , 0, strlen ( $userliste ) - 3); $ges_online_user = ges_online(); $stats_array = array ( 'privmsgpopup' => check_for_pm_popup (), 'topics' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_topics`" ),0), 'posts' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_posts`" ),0), 'users' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_user`" ),0), 'istsind' => ( $ges_online_user > 1 ? 'sind' : 'ist' ), 'gesonline' => $ges_online_user , 'gastonline' => ges_gast_online(), 'useronline' => ges_user_online(), 'userliste' => $userliste , ); $tpl ->set_ar_out( $stats_array ,4); // IlchBB Forum 3.1 :: Copyright :: Start $ilchbb_tpl ->out(1); // IlchBB Forum 3.1 :: Copryright :: End $design ->footer(); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | <?php # Copyright by: Manuel # Support: www.ilch.de /** * @name IlchBB Forum * @version 3.1 * @author Florian Koerner * @link http://www.koerner-ws.de/ * @license GNU General Public License */ defined ( 'main' ) or die ( 'no direct access' ); // IlchBB Forum 3.1 :: Loader :: Start require_once ( 'include/contents/ilchbb_forum/ilchbb_loader.php' ); // IlchBB Forum 3.1 :: Loader :: Ende $title = $allgAr [ 'title' ]. ' :: Forum' ; $hmenu = $extented_forum_menu . 'Forum' . $extented_forum_menu_sufix ; $design = new design ( $title , $hmenu , 1); $design ->header(); // IlchBB Forum 3.1 :: Extensions :: Start $ilchbb_tpl = new tpl( 'ilchbb_forum/load_extensions' ); $ilchbb_tpl ->out(0); // IlchBB Forum 3.1 :: Extensions :: End if ( $menu ->get(1) == 'markallasread' ) { $ilchBB ->deleteNewTopics(); } $tpl = new tpl ( 'ilchbb_forum/showforum' ); $tpl ->out (0); $category_array = array (); $forum_array = array (); $q = "SELECT a.id, a.cid, a.name, a.besch, a.topics, a.posts, b.name as topic, c.id as pid, c.tid, b.rep, c.erst, c.time, a.cid, k.name as cname FROM prefix_forums a LEFT JOIN prefix_forumcats k ON k.id = a.cid LEFT JOIN prefix_posts c ON a.last_post_id = c.id LEFT JOIN prefix_topics b ON c.tid = b.id LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = a.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = a.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = a.start WHERE (( ".$_SESSION['authright']." <= a.view AND a.view < 1) OR ( ".$_SESSION['authright']." <= a.reply AND a.reply < 1) OR ( ".$_SESSION['authright']." <= a.start AND a.start < 1) OR vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR -9 = ".$_SESSION['authright']." ) AND k.cid = 0 ORDER BY k.pos, a.pos"; $erg1 = db_query( $q ); $xcid = 0; while ( $r = db_fetch_assoc( $erg1 ) ) { // IlchBB Forum 3.1 :: Get Forum Status :: Start $ord = $ilchBB ->checkNewTopics( $r [ 'id' ]); if ( $ord === TRUE) { $r [ 'ORD' ] = 'forum_unread' ; $r [ 'TORD' ] = 'Neue Beiträge' ; } else { $r [ 'ORD' ] = 'forum_read' ; $r [ 'TORD' ] = 'Keine neuen Beiträge' ; } // IlchBB Forum 3.1 :: Get Forum Status :: Ende $r [ 'topicl' ] = $r [ 'topic' ]; $r [ 'topic' ] = html_enc_substr( $r [ 'topic' ],0,23); $r [ 'mods' ] = getmods( $r [ 'id' ]); $r [ 'datum' ] = date ( 'd.m.y - H:i' , $r [ 'time' ]); $r [ 'page' ] = ceil ( ( $r [ 'rep' ]+1) / $allgAr [ 'Fpanz' ] ); $r [ 'erst' ] = forum_farbname( $r [ 'erst' ]); $r [ 'name' ] = bbcode( $r [ 'name' ]); $tpl ->set_ar( $r ); if ( $r [ 'cid' ] <> $xcid ) { $tpl ->out(1); // IlchBB Forum 3.1 :: Set CSS Class :: Start $class = 'ilchbb_Cmite' ; // IlchBB Forum 3.1 :: Set CSS Class :: End //Unterkategorien $sql = db_query( "SELECT DISTINCT a.name as cname, a.id as cid FROM `prefix_forumcats` a LEFT JOIN `prefix_forums` b ON a.id = b.cid WHERE a.cid = {$r['cid']} AND a.id = b.cid ORDER BY a.pos, a.name" ); while ( $ucat = db_fetch_assoc( $sql )) { // IlchBB Forum 3.1 :: Change CSS Class :: Start $class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' ); $ucat [ 'class' ] = $class ; // IlchBB Forum 3.1 :: Change CSS Class :: Start $tpl ->set_ar_out( $ucat ,2); } //Unterkategorien - Ende $xcid = $r [ 'cid' ]; } // IlchBB Forum 3.1 :: Change CSS Class :: Start $class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' ); $r [ 'class' ] = $class ; // IlchBB Forum 3.1 :: Change CSS Class :: Start $tpl ->set_ar_out( $r ,3); } // IlchBB Forum 3.1 :: Online Today :: Start if ( $allgAr [ 'ilchbb_forum_dayonline' ] == 1) { $time = mktime (0,0,0, date ( "n" ), date ( "j" ), date ( "Y" )); $query = 'SELECT `id`,`name` FROM `prefix_user` WHERE llogin > ' . $time ; $query = db_query( $query ); $cache = '' ; while ( $row = db_fetch_assoc( $query )) { if (! empty ( $cache )) $cache .= ', ' ; $cache .= '<a href="index.php?user-details-' . $row [ 'id' ]. '">' . $row [ 'name' ]. '</a>' ; } $tpl ->set( 'dayonline' , '<br /><br />Heute waren bereits online:<br />' . $cache ); } else { $tpl ->set( 'dayonline' , '' ); } // IlchBB Forum 3.1 :: Online Today :: End # lastregistuser # $erg = db_query( "SELECT id, name, regist FROM prefix_user ORDER BY regist DESC LIMIT 5" ); $lastregistuser = '' ; while ( $row = db_fetch_object( $erg ) ) { $lastregistuser .= '<a class="box" href="?user-details-' . $row ->id. '">' . $row ->name. '</a>, ' ; } $lastregistuser = substr ( $lastregistuser , 0, -2); # statistic # $dif = date ( 'Y-m-d H:i:s' , time() - USERUPTIME); $erg = db_query( "SELECT DISTINCT uid, name, prefix_ranks.bez, spezrank FROM `prefix_online` left join prefix_user on prefix_user.id = prefix_online.uid left join prefix_ranks ON prefix_ranks.id = prefix_user.spezrank WHERE uid > 0 and uptime > '" . $dif . "'" ); while ( $row = db_fetch_object( $erg )) { if ( $row ->spezrank != 0) { $userliste .= '<a title="' . $row ->bez . '" href="index.php?user-details-' . $row ->uid . '"><b><i>' . forum_farbname( $row ->name) . '</i></b></a> , ' ; } else { $userliste .= '<a href="index.php?user-details-' . $row ->uid . '">' . forum_farbname( $row ->name) . '</a> , ' ; } } $userliste = substr ( $userliste , 0, strlen ( $userliste ) - 3); $ges_online_user = ges_online(); $stats_array = array ( 'privmsgpopup' => check_for_pm_popup (), 'topics' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_topics`" ),0), 'posts' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_posts`" ),0), 'users' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_user`" ),0), 'istsind' => ( $ges_online_user > 1 ? 'sind' : 'ist' ), 'gesonline' => $ges_online_user , 'gastonline' => ges_gast_online(), 'useronline' => ges_user_online(), 'userliste' => $userliste , ); $tpl ->set_ar_out( $stats_array ,4); // IlchBB Forum 3.1 :: Copyright :: Start $ilchbb_tpl ->out(1); // IlchBB Forum 3.1 :: Copryright :: End $design ->footer(); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | <?php # Copyright by: Manuel # Support: www.ilch.de /** * @name IlchBB Forum * @version 3.1 * @author Florian Koerner * @link http://www.koerner-ws.de/ * @license GNU General Public License */ defined ( 'main' ) or die ( 'no direct access' ); // IlchBB Forum 3.1 :: Loader :: Start require_once ( 'include/contents/ilchbb_forum/ilchbb_loader.php' ); // IlchBB Forum 3.1 :: Loader :: Ende $title = $allgAr [ 'title' ]. ' :: Forum' ; $hmenu = $extented_forum_menu . 'Forum' . $extented_forum_menu_sufix ; $design = new design ( $title , $hmenu , 1); $design ->header(); // IlchBB Forum 3.1 :: Extensions :: Start $ilchbb_tpl = new tpl( 'ilchbb_forum/load_extensions' ); $ilchbb_tpl ->out(0); // IlchBB Forum 3.1 :: Extensions :: End if ( $menu ->get(1) == 'markallasread' ) { $ilchBB ->deleteNewTopics(); } $tpl = new tpl ( 'ilchbb_forum/showforum' ); $tpl ->out (0); $category_array = array (); $forum_array = array (); $q = "SELECT a.id, a.cid, a.name, a.besch, a.topics, a.posts, b.name as topic, c.id as pid, c.tid, b.rep, c.erst, c.time, a.cid, k.name as cname FROM prefix_forums a LEFT JOIN prefix_forumcats k ON k.id = a.cid LEFT JOIN prefix_posts c ON a.last_post_id = c.id LEFT JOIN prefix_topics b ON c.tid = b.id LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = a.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = a.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = a.start WHERE (( ".$_SESSION['authright']." <= a.view AND a.view < 1) OR ( ".$_SESSION['authright']." <= a.reply AND a.reply < 1) OR ( ".$_SESSION['authright']." <= a.start AND a.start < 1) OR vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR -9 = ".$_SESSION['authright']." ) AND k.cid = 0 ORDER BY k.pos, a.pos"; $erg1 = db_query( $q ); $xcid = 0; while ( $r = db_fetch_assoc( $erg1 ) ) { // IlchBB Forum 3.1 :: Get Forum Status :: Start $ord = $ilchBB ->checkNewTopics( $r [ 'id' ]); if ( $ord === TRUE) { $r [ 'ORD' ] = 'forum_unread' ; $r [ 'TORD' ] = 'Neue Beiträge' ; } else { $r [ 'ORD' ] = 'forum_read' ; $r [ 'TORD' ] = 'Keine neuen Beiträge' ; } // IlchBB Forum 3.1 :: Get Forum Status :: Ende $r [ 'topicl' ] = $r [ 'topic' ]; $r [ 'topic' ] = html_enc_substr( $r [ 'topic' ],0,23); $r [ 'mods' ] = getmods( $r [ 'id' ]); $r [ 'datum' ] = date ( 'd.m.y - H:i' , $r [ 'time' ]); $r [ 'page' ] = ceil ( ( $r [ 'rep' ]+1) / $allgAr [ 'Fpanz' ] ); $r [ 'erst' ] = forum_farbname( $r [ 'erst' ]); $r [ 'name' ] = bbcode( $r [ 'name' ]); $tpl ->set_ar( $r ); if ( $r [ 'cid' ] <> $xcid ) { $tpl ->out(1); // IlchBB Forum 3.1 :: Set CSS Class :: Start $class = 'ilchbb_Cmite' ; // IlchBB Forum 3.1 :: Set CSS Class :: End //Unterkategorien $sql = db_query( "SELECT DISTINCT a.name as cname, a.id as cid FROM `prefix_forumcats` a LEFT JOIN `prefix_forums` b ON a.id = b.cid WHERE a.cid = {$r['cid']} AND a.id = b.cid ORDER BY a.pos, a.name" ); while ( $ucat = db_fetch_assoc( $sql )) { // IlchBB Forum 3.1 :: Change CSS Class :: Start $class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' ); $ucat [ 'class' ] = $class ; // IlchBB Forum 3.1 :: Change CSS Class :: Start $tpl ->set_ar_out( $ucat ,2); } //Unterkategorien - Ende $xcid = $r [ 'cid' ]; } // IlchBB Forum 3.1 :: Change CSS Class :: Start $class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' ); $r [ 'class' ] = $class ; // IlchBB Forum 3.1 :: Change CSS Class :: Start $tpl ->set_ar_out( $r ,3); } // IlchBB Forum 3.1 :: Online Today :: Start if ( $allgAr [ 'ilchbb_forum_dayonline' ] == 1) { $time = mktime (0,0,0, date ( "n" ), date ( "j" ), date ( "Y" )); $query = 'SELECT `id`,`name` FROM `prefix_user` WHERE llogin > ' . $time ; $query = db_query( $query ); $cache = '' ; while ( $row = db_fetch_assoc( $query )) { if (! empty ( $cache )) $cache .= ', ' ; $cache .= '<a href="index.php?user-details-' . $row [ 'id' ]. '">' . $row [ 'name' ]. '</a>' ; } $tpl ->set( 'dayonline' , '<br /><br />Heute waren bereits online:<br />' . $cache ); } else { $tpl ->set( 'dayonline' , '' ); } // IlchBB Forum 3.1 :: Online Today :: End # statistic # $dif = date ( 'Y-m-d H:i:s' , time() - USERUPTIME); $erg = db_query( "SELECT DISTINCT uid, name, prefix_ranks.bez, spezrank FROM `prefix_online` left join prefix_user on prefix_user.id = prefix_online.uid left join prefix_ranks ON prefix_ranks.id = prefix_user.spezrank WHERE uid > 0 and uptime > '" . $dif . "'" ); while ( $row = db_fetch_object( $erg )) { if ( $row ->spezrank != 0) { $userliste .= '<a title="' . $row ->bez . '" href="index.php?user-details-' . $row ->uid . '"><b><i>' . forum_farbname( $row ->name) . '</i></b></a> , ' ; } else { $userliste .= '<a href="index.php?user-details-' . $row ->uid . '">' . forum_farbname( $row ->name) . '</a> , ' ; } } $lgu = db_result(db_query( "SELECT name FROM prefix_user ORDER BY id DESC LIMIT 1" ), 0); $userliste = substr ( $userliste , 0, strlen ( $userliste ) - 3); $ges_online_user = ges_online(); $stats_array = array ( 'privmsgpopup' => check_for_pm_popup (), 'topics' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_topics`" ),0), 'posts' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_posts`" ),0), 'users' => db_result(db_query( "SELECT COUNT(ID) FROM `prefix_user`" ),0), 'istsind' => ( $ges_online_user > 1 ? 'sind' : 'ist' ), 'gesonline' => $ges_online_user , 'gastonline' => ges_gast_online(), 'useronline' => ges_user_online(), 'userliste' => $userliste , 'lgu' => $lgu ); $tpl ->set_ar_out( $stats_array ,4); // IlchBB Forum 3.1 :: Copyright :: Start $ilchbb_tpl ->out(1); // IlchBB Forum 3.1 :: Copryright :: End $design ->footer(); ?> |
Geschlossen | ||
![]() |
Zurück zu Module und Modifikationen |