Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- /********************************************************************************
- * Erweiterte Status Navbox von KC-Cracky - edited by Proggi *
- * Version 1.1 *
- * Datiert: 10.02.2009 *
- * Website http://www.kit-coding.de *
- * Hergestellt für PHPKIT Version 1.6.03 und 1.6.1 *
- * Weiterverbreitung durch Fremde (auch in modifizierter Form) ist nicht erlaubt *
- * Entfernen oder unsichbar machen des Copyrights, wenn vorhanden *
- * ist nicht erlaubt *
- * Support erhalten Sie ausschliesslich unter folgenden Adressen: *
- * http://www.kit-coding.de - http://www.kit-spiele.de *
- *********************************************************************************/
- #Config ANFANG
- // Breite der Navigationsbox - Pixel oder Prozentwerte
- $width = '100%';
- // Sollen Downloadinfos angezeigt werden? 1 = Ja | 0 = Nein
- $showdltable = "0";
- // Sollen Artikelinfos angezeigt werden? 1 = Ja | 0 = Nein
- $showarttable = "0";
- // Sollen Linkinfos angezeigt werden? 1 = Ja | 0 = Nein
- $showlnktable = "0";
- // Sollen Newsinfos angezeigt werden? 1 = Ja | 0 = Nein
- $shownstable = "0";
- // Sollen Foreninformationen angezeigt werden? 1 = Ja | 0 = Nein
- $showforumstable = "0";
- // Soll die Anzahl der GB-Eintraege angezeigt werden? 1 = Ja | 0 = Nein
- $showgbstable = "0";
- // Soll der Neueste User angezeigt werden? 1 = Ja | 0 = Nein
- $shownewuser = "1";
- // Soll das Neueste Mitglied angezeigt werden? 1 = Ja | 0 = Nein
- $shownewmember = "1";
- // Highlightcolor als 6-stelliger HEX-Code
- $highlightcolor = "BABC89";
- // Wie lange darf ein Username hoechstens sein - Anzahl in Zeichen
- $userNameCut = 16;
- // Sollen die Seitenzugriffe angezeigt werden? 1 = Ja | 0 = Nein
- $showPageImpressions = "1";
- // Ende Konfiguration
- ## Ab hier bitte nichts mehr aendern ##
- $phpkit_status = phpkitstatus();
- if (is_array($phpkit_status['online_user'])) {
- unset($online_list);
- $k=1;
- foreach($phpkit_status['online_user'] as $userinfo) {
- if ($config['user_ghost']!=1 || ($config['user_ghost']==1 && $userinfo['user_ghost']!=1)) {
- if ($k>1) $online_list.=', ';
- $k++;
- }
- }
- if (isset($online_list)) $online_list.=" ".$lang['and']." ";
- }
- // Robots-Anzeige von Dooki auf KNW
- //---> Gäste by Dooki inkl. Robots
- unset($online_robots);
- if ($phpkit_status['online_guests']>0) {
- if ($phpkit_status['online_guests']==1) {
- $online_list.=$phpkit_status['online_guests']." ".$lang['guest'].".";
- }else{
- $online_list.=$phpkit_status['online_guests']." ".$lang['guests'].".";
- }
- $online_robots = function_robots_anzeigen($phpkit_status['guests_hash']);
- if($online_robots != "") $online_robots = '<b>Aktive Robots:</b><br>'.$online_robots;
- }else{
- $online_list.=$lang['no']." ".$lang['guests'].".";
- }
- //---> Gäste by Dooki inkl. Robots
- #Newest USER
- if (intval($shownewuser) === 1) {
- $userinfo = $DB->fetch_array(
- $DB->query("SELECT
- user_id,
- user_nick,
- logtime
- FROM
- ".$sqlprefix."_user
- ORDER by
- user_id DESC
- LIMIT
- 1
- "));
- $user_name = cutstring(htmlentities($userinfo['user_nick']), $userNameCut);
- // Der User ist zwar registriert, aber noch nicht aktiviert
- if($userinfo['logtime'] == 0)
- $user_name='<span style="color:#cc0000;">'.$user_name.'</span>';
- eval ("\$listnewuser= \"".templateinclude("navigation/extnbst/newest_user")."\";");
- }
- #Newest Member
- if (intval($shownewmember) === 1) {
- $userinfo2 = $DB->fetch_array(
- $DB->query("SELECT
- user_id,
- user_nick,
- logtime,
- user_status
- FROM
- ".$sqlprefix."_user
- WHERE
- user_status = 'member'
- ORDER by
- user_id DESC
- LIMIT
- 1
- "));
- $user_name2 = cutstring(htmlentities($userinfo2['user_nick']), $userNameCut);
- if($userinfo2['logtime']==0)
- $user_name2 = '<span style="color:#cc0000;">'.$user_name2.'</span>';
- eval ("\$listnewmember= \"".templateinclude("navigation/extnbst/newest_member")."\";");
- }
- #Begrüßung
- if(intval($USER['id']) > 0) {
- $since = number_format(((time()-$USER['logtime'])/60),0,",",".");
- $time = formattime($USER['logtime'],'','time');
- $usernick = htmlentities(cutstring($USER['nick'], 15));
- eval ("\$gruss= \"".templateinclude("navigation/extnbst/gruss")."\";");
- }else{
- $gruss = '';
- }
- #Zugriffe
- if(intval($showPageImpressions) === 1) {
- $piCountToday = $DB->fetch_assoc(
- $DB->query("SELECT
- calender_id,
- calender_date,
- calender_picount
- FROM
- ".$sqlprefix."_calender
- WHERE
- calender_id != 1
- ORDER BY
- calender_id DESC
- LIMIT
- 1
- "));
- $piCountToday = number_format($piCountToday['calender_picount'],0,",",".");
- //$yesterdayID = $DB->num_rows($DB->query("SELECT calender_id FROM ".$sqlprefix."_calender"));
- //$yesterdayID = $yesterdayID-1;
- $counter_t = $DB->fetch_assoc(
- $DB->query("SELECT
- calender_counter,
- calender_id,
- calender_picount
- FROM
- ".$sqlprefix."_calender
- WHERE
- calender_id!='1'
- ORDER by
- calender_id DESC
- LIMIT
- 1
- "));
- $counter_y = $DB->fetch_assoc(
- $DB->query("SELECT
- calender_id,
- calender_counter,
- calender_picount
- FROM
- ".$sqlprefix."_calender
- WHERE
- calender_id<'$counter_t[calender_id]'
- and
- calender_id!='1'
- ORDER by
- calender_id DESC
- LIMIT
- 1
- "));
- $piCountYesterday = $DB->fetch_assoc(
- $DB->query("SELECT
- calender_id,
- calender_counter,
- calender_picount
- FROM
- ".$sqlprefix."_calender
- WHERE
- calender_id = '".$counter_y['calender_id']."'
- LIMIT
- 1
- "));
- $piCountYesterday = number_format($piCountYesterday['calender_picount'],0,",",".");
- $allcounter = $DB->fetch_array(
- $DB->query("SELECT
- SUM(calender_picount)
- FROM
- ".$sqlprefix."_calender
- "));
- $allcounter = number_format($allcounter[0],0,",",".");
- $rekord = $DB->fetch_array(
- $DB->query("SELECT
- MAX(calender_counter)
- FROM
- ".$sqlprefix."_calender
- WHERE
- calender_id != '1'
- ORDER by
- calender_id DESC
- "));
- $rekord = number_format($rekord[0],0,",",".");
- eval ("\$pageImpressions= \"".templateinclude("navigation/extnbst/page_impressions")."\";");
- }
- // Ende Pageimpressions
- #Pfeilgrafik UP & DOWN im Vergleich gestern zu heute
- if ($phpkit_status['counter_today'] > $phpkit_status['counter_yesterday'])
- $difftoyes='<span class="small"><b>'.number_format($phpkit_status['counter_today'],0,",",".").'</b></span>';
- else
- $difftoyes='<span class="small"><b>'.number_format($phpkit_status['counter_today'],0,",",".").'</b></span>';
- $phpkit_status['counter_yesterday'] = number_format($phpkit_status['counter_yesterday'],0,",",".");
- $phpkit_status['counter_total'] = number_format($phpkit_status['counter_total'],0,",",".");
- $phpkit_status['user_counter'] = number_format($phpkit_status['user_counter'],0,",",".");
- # Liste alle Seiteninfos auf
- eval ("\$boxlinks[1]= \"".getTemplate("navigation/extnbst/sitemaininfos")."\";");
- $getuserinfo = $DB->query("SELECT
- user_nick,
- user_id,
- logtime,
- user_status
- FROM
- ".$db_tab['user']."
- WHERE
- user_activate=1
- ORDER by
- logtime DESC
- LIMIT
- 5
- ");
- while ($userinfo = $DB->fetch_array($getuserinfo)) {
- if (isonline($userinfo['user_id'])) $onlinestatus = '<img src="images/extnbst/bullet_green.png" width="12" height="12" alt="Online" title="Online"
- border="0" />';
- else $onlinestatus = '<img src="images/extnbst/bullet_red.png" width="12" height="12" alt="'.htmlentities($userinfo['user_nick']).' ist offline"
- title="'.htmlentities($userinfo['user_nick']).' ist offline" border="0" />';
- $usernick=cutstring(htmlentities($userinfo['user_nick']), $userNameCut);
- $userlogtime = date("H:i", $userinfo['logtime']);
- if($userinfo['user_status'] == 'admin') {
- $fontStyle = 'color:#BB0000;';
- }elseif($userinfo['user_status'] == 'mod') {
- $fontStyle = 'color:#000080;';
- }elseif($userinfo['user_status'] == 'member') {
- $fontStyle = 'color:#006400;';
- }elseif($userinfo['user_status'] == 'vip') {
- $fontStyle = 'color:#8f8f8f;';
- }else{
- $fontStyle = '';
- }
- eval ("\$zonline_row.= \"".templateinclude("navigation/extnbst/zonline_row")."\";");
- }
- eval ("\$zonline= \"".templateinclude("navigation/extnbst/zonline")."\";");
- if (is_array($phpkit_status['online_user'])) {
- unset($online_user);
- $online_usercount=count($phpkit_status['online_user']);
- foreach($phpkit_status['online_user'] as $userinfo) {
- $getava = $DB->fetch_array($DB->query("SELECT user_avatar FROM ".$db_tab['user']." where user_id='".intval($userinfo['user_id'])."' LIMIT 1"));
- if($getava['user_avatar']=="") {
- $Avatar = '';
- }
- else {
- $Avatar = '<img src="images/avatar/'.$getava['user_avatar'].'" alt="" title="" width="20" height="20" border="0" />';
- }
- $info_group=reUserGroup('Test', $userinfo['user_groupid']);
- if ($online_user) $online_user.=', ';
- if ($userinfo['user_status'] == 'admin' ) {
- $admin.='<tr><td style="text-align:left; width:100%;"><a class="small" style="color: #BB0000;" href="include.php?
- path=login/userinfo.php&id='.$userinfo['user_id'].'"><b>'.$userinfo['user_nick'].'</b></a>'.$userinfo['user_groupid'].'</td><td nowrap="nowrap">'.
- $Avatar.'</td></tr>';
- }elseif ($userinfo['user_status']=='mod'){
- $mod.='<tr><td style="text-align:left; width:100%;"><a class="small" style="color: #000080;" href="include.php?
- path=login/userinfo.php&id='.$userinfo['user_id'].'"><b>'.$userinfo['user_nick'].'</b></a></td><td nowrap="nowrap">'.$Avatar.'</td></tr>';
- }elseif ($userinfo['user_status']=='member'){
- $member.='<tr><td style="text-align:left; width:100%;"><a class="small" style="color: #006400;" href="include.php?
- path=login/userinfo.php&id='.$userinfo['user_id'].'"><b>'.$userinfo['user_nick'].'</b></a></td><td nowrap="nowrap">'.$Avatar.'</td></tr>';
- }
- //VIP Status erweiterung muss installiert sein, sonst nicht aktivieren! ANFANG
- #elseif ($userinfo['user_status']=='vip'){
- # $VIP.='<a class="small" href="include.php?path=login/userinfo.php&id='.$userinfo['user_id'].'"><b>'.$userinfo
- ['user_nick'].'</b></a><br />';
- #}
- //VIP Status erweiterung muss installiert sein, sonst nicht aktivieren! ENDE
- else{
- $user.='<a class="small" style="color: #8f8f8f;" href="include.php?path=login/userinfo.php&id='.$userinfo['user_id'].'"><b>'.
- $userinfo['user_nick'].'</b></a><br />';
- }
- }
- }
- if($phpkit_status['online_guests'] == 0) {
- $guestsOnline = 'Keine';
- }elseif($phpkit_status['online_guests'] == 1) {
- $guestsOnline = 'Einer';
- }else{
- $guestsOnline = $phpkit_status['online_guests'];
- }
- eval ("\$boxlinks[2]= \"".getTemplate("navigation/extnbst/online_row")."\";");
- #Forum anzeige
- if ($config['forum_eod'] == 1 && $showforumstable == "1") {
- $counter_post = $DB->fetch_row(
- $DB->query("SELECT
- COUNT(*)
- FROM
- ".$sqlprefix."_forumpost
- "));
- $counter_post[0] = number_format($counter_post[0],0,",",".");
- $counter_themen = $DB->fetch_row(
- $DB->query("SELECT
- COUNT(*)
- FROM
- ".$sqlprefix."_forumthread
- "));
- $counter_themen[0] = number_format($counter_themen[0],0,",",".");
- $counter_views_complete = $DB->fetch_assoc(
- $DB->query("SELECT
- SUM(forumthread_viewcount) as forumthread_viewcount
- FROM
- ".$sqlprefix."_forumthread
- "));
- $counter_views_complete['forumthread_viewcount'] = number_format($counter_views_complete['forumthread_viewcount'],0,",",".");
- eval ("\$listforum= \"".templateinclude("navigation/extnbst/listforum")."\";");
- }
- #Artikel anzeige
- if ($showarttable=="1"){
- $art_count = $DB->fetch_row(
- $DB->query("SELECT
- COUNT(*)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '1'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $art_count[0] = number_format($art_count[0],0,",",".");
- $art_klicks = $DB->fetch_row(
- $DB->query("SELECT
- SUM(content_views)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '1'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $art_klicks[0] = number_format($art_klicks[0],0,",",".");
- eval ("\$listart= \"".templateinclude("navigation/extnbst/listartikel")."\";");
- }
- #News anzeigen
- if ($shownstable=="1"){
- $news_count = $DB->fetch_row(
- $DB->query("SELECT
- COUNT(*)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '2'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $news_count[0] = number_format($news_count[0],0,",",".");
- $news_klicks = $DB->fetch_row(
- $DB->query("SELECT
- SUM(content_views)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '2'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $news_klicks[0] = number_format($news_klicks[0],0,",",".");
- eval ("\$listns= \"".templateinclude("navigation/extnbst/listnews")."\";");
- }
- #Links anzeigen
- if ($showlnktable=="1"){
- $link_count = $DB->fetch_row(
- $DB->query("SELECT
- COUNT(*)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '3'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $link_count[0] = number_format($link_count[0],0,",",".");
- $link_klicks = $DB->fetch_row(
- $DB->query("SELECT
- SUM(content_views)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '3'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $link_klicks[0] = number_format($link_klicks[0],0,",",".");
- eval ("\$listlnk= \"".templateinclude("navigation/extnbst/listlinks")."\";");
- }
- #Downloads anzeigen
- if ($showdltable=="1"){
- $down_count = $DB->fetch_row(
- $DB->query("SELECT
- COUNT(*)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '4'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $down_count[0] = number_format($down_count[0],0,",",".");
- $down_klicks = $DB->fetch_row(
- $DB->query("SELECT
- SUM(content_views)
- FROM
- ".$sqlprefix."_content
- WHERE
- content_option = '4'
- AND
- content_status = '1'
- AND
- (content_expire > ".time()." || content_expire = '0')
- "));
- $down_klicks[0] = number_format($down_klicks[0],0,",",".");
- eval ("\$listdl= \"".templateinclude("navigation/extnbst/listdownloads")."\";");
- }
- #Gästebuch anzeigen
- if ($config['gbook_eod']==1 && $showgbstable=="1") {
- $counter_3 = $DB->fetch_row(
- $DB->query("SELECT
- COUNT(*)
- FROM
- ".$sqlprefix."_gbook
- "));
- $counter_3[0] = number_format($counter_3[0],0,",",".");
- eval ("\$listgb= \"".templateinclude("navigation/extnbst/listgbook")."\";");
- }
- if($online_robots != "") {
- eval ("\$listbots= \"".templateinclude("navigation/extnbst/listrobots")."\";");
- }
- eval ("\$boxlinks[3]= \"".getTemplate("navigation/extnbst/contentstats")."\";");
- return $boxlinks;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement