ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » Fehler Anzeige im Admin Menü

Geschlossen
  1. #1
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    Hay Leute,

    So einen kleinen fehler habe ich noch gefunden und zwar im Admin Bereich

    Da wird mir folgender Fehler angezeigt regist; $regday = round($regsek / 86400); $user = $row->name; echo'';} ?>
    '.$user.' Registriert am "'.date('d.m.Y',$row->regist).'"
    ';} ?>
    '.$row->news_title.' Siehe Bild


    gesperrtes Bild

    Habe schon PimpmyilchAdminI noch mal hoch geladen aber das brachte auch keine Lösung und wenn da jemand eine Lösung weis dann immer her damit :-)


    verwendete ilch Version: 1.1 P

    betroffene Homepage: freiezocker.de/
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    Lord|Schirmer Administrator
    Registriert seit
    21.03.2007
    Beiträge
    7.675
    Beitragswertungen
    1212 Beitragspunkte
    Du hast eine Modifikation des Admin-Bereiches drauf.
    Deshalb kann der Fehler schwer nachvollzogen werden.

    Prüfe mal den Code der include/admin/admin.php evtl. fehlt hier nur ein echo
    rules :: doku :: faq :: linkus
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    ZitatZitat geschrieben von Lord|Schirmer
    Du hast eine Modifikation des Admin-Bereiches drauf.
    Deshalb kann der Fehler schwer nachvollzogen werden.

    Prüfe mal den Code der include/admin/admin.php evtl. fehlt hier nur ein echo


    Hallo Lord Schirmer hier mal der Code
    <?php
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    defined ('admin') or die ( 'only admin access' );
    
    
    $design = new design ( 'Admins Area', 'Admins Area', 2 );
    $design->header();
    
    # script version
    $scriptVersion = 11;
    $scriptUpdate = 'M';
    
    # statistik wird bereinigt.
    $mon = date('n');
    $lastmon = $mon - 1;
    $jahr = date('Y');
    $lastjahr = $jahr;
    if ( $lastmon <= 0 ) { $lastmon = 12; $lastjahr = $jahr - 1; }
    
    db_query("DELETE FROM prefix_stats WHERE NOT ((mon = $mon OR mon = $lastmon) AND (yar = $jahr OR yar = $lastjahr))");
    db_query("OPTIMIZE TABLE prefix_stats");
    
    
        $um = $menu->get(1);
        switch($um)
        {
    
            default :
    				{
               ?>
    <table class="border" cellspacing="1" cellpadding="0" width="100%" border="0">
     <tr>
      <td class="Chead" height="20">&nbsp;Info</td>
     </tr>
    	<td>
      <table  cellspacing="0" cellpadding="0" width="100%" border="0">
    <tr>
    <td class="Cnorm" align="center" width="20%">
    <?php echo getCalendar($mon, $jahr, $url, $urlod, $data, $cellpadding=2);?>
    </td>
    <td class="Cnorm" align="center" valign="top" width="60%">N&auml;chsten Geburtstage<hr style="height: 0px; border: dotted #444444 0px; border-top-width: 1px; " /><br>
    <? include ('include/boxes/geburtstag.php');?>
    </td>
    <td class="Cnorm" align="center" width="20%">
    <embed src="http://www.clocklink.com/clocks/0008-Orange.swf?TimeZone=WET" width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">
    </td>
    
    </tr>
    </table>
    
      </td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="4">Statistik</td>
     </tr>
    	<tr>
      <td class="Cnorm" width="25%"><font class="smalfont">Design</font></td>
      <td class="Cnorm" width="25%" nowrap><font class="smalfont">
    <? echo $allgAr['gfx']; ?>
      </font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">Installierte Version</font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">
    <?php echo ''.$scriptVersion.'&nbsp; Update: '.$scriptUpdate.''; ?>
      </font></td>
      </tr>
      <tr>
      <td class="Cnorm"><font class="smalfont">Datenbankgr&ouml;&szlig;e</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
    // gibt die groesse der Datenbank  aus
    $result = db_query("SHOW TABLE STATUS");
        $dbsize = 0;
        while($row = mysql_fetch_assoc($result)) {
            $dbsize += $row['Data_length'];
        }echo nicebytes($dbsize);
    ?>
      </font></td>
      <td class="Cnorm"><font class="smalfont">Downloads</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      echo nicebytes(dirsize('include/downs/'));
    ?>
     </font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">Benutzer &amp; G&auml;ste online</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php echo '<b>'.ges_online().'</b> Benutzer und <b>'.ges_gast_online().'</b> G&auml;ste';?>
      &nbsp; <a class="smalfont" href="admin.php?admin-userOnline">&#187; anzeigen</a></font></td>
    
      <td class="Cnorm" nowrap><font class="smalfont">Web Status</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?
      if ($allgAr['wartung'] == 0){
         echo 'Seite &Ouml;ffentlich';
      }else
        echo '<b>Wartungs Modus</b>&nbsp;<img src="include/images/icons/wartung.png">';
    ?>
      </a></font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">nicht aktivierte Accounts</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?
      $gesuser  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 1"),0);
      echo '<b>'.$gesuser.'</b>';
    ?>
      &nbsp; <a class="smalfont" href="admin.php?puser">&#187; anzeigen</a>
      </font></td>
    
      <td class="Cnorm"nowrap><font class="smalfont">nicht aktivierte Join Us</font></td>
      <td class="Cnorm"><font class="smalfont">
      <?
     $joinus  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 4"),0);
      echo '<b>'.$joinus.'</b>';
      ?>
      &nbsp; <a class="smalfont" href="admin.php?groups-joinus">&#187; anzeigen</a>
      </font></td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="2">Die neusten Mitglieder</td>
      <td class="Chead" colspan="2">Die letzten Artikel, News ...</td>
     </tr>
     <tr>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?
      $abf = 'SELECT * FROM prefix_user ORDER BY regist DESC LIMIT 5';
    	$erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
      $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') )  - $row->regist;
      $regday = round($regsek / 86400);
      $user = $row->name;
      echo'<tr class="Cnorm"><td><a href="?user-1-'.$row->id.'"><b>'.$user.'</b></a></td><td> Registriert am "'.date('d.m.Y',$row->regist).'"</td></tr>';}
    ?>
       </table>
      </td>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?
      $abf = 'SELECT news_id,news_title FROM `prefix_news` ORDER BY news_time DESC LIMIT 5';
    	$erg = db_query($abf);
    	while ($row = db_fetch_object($erg) ) {
    		echo'<tr class="Cnorm"><td><a href="?news-edit-'.$row->news_id.'">'.$row->news_title.'</a></td></tr>';}
    ?>
       </table>
      </td>
     </tr>
     <tr>
      <td class="Chead" colspan="4" align="right"><a class="Chead" href="admin.php?about">Systeminformationen</a></td>
     </tr>
    </table>
    
    
    
    
               <?php
    				   break;
            }
    
    				case 'versionsKontrolle' :
            {
    
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/version_check.png" /></td><td width="30"></td><td valign="bottom"><h1>Versionskontrolle</h1></td></tr></table>';
    
    
    						echo 'Scripte Version: '.$scriptVersion.'<br />Update Version: '.$scriptUpdate.'<br /><br />';
    						echo '<script language="JavaScript" type="text/javascript" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></script>';
    						#echo '<iframe width="100%" height="60" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></iframe>';
    
    						break;
            }
    
    				#####################################
    
    				case 'besucherStatistik' :
    				{
                function echo_admin_site_statistik ($title, $col, $smon, $ges, $orderQuery ) {
                  $sql = db_query("SELECT COUNT(*) AS wert, $col as schl FROM  `prefix_stats` WHERE mon = ".$smon." GROUP BY schl ORDER BY ".$orderQuery);
                  $max = @db_result(db_query("SELECT COUNT(*) as wert, $col as schl FROM prefix_stats WHERE mon = ".$smon." GROUP BY schl ORDER BY wert DESC LIMIT 1"),0,0);
                  if ( empty($max) ) { $max = 1; }
                  if ( empty($ges) ) { $ges = 1; }
                  echo '<tr><th align="left" colspan="4">'.$title.'</th></tr>';
                  while ( $r = db_fetch_assoc($sql) ) {
                    $wert = ( empty($r['wert']) ? 1 : $r['wert'] );
                    $weite = ($wert / $max) * 200;
    					      $prozent = ($wert * 100) / $ges;
    					      $prozent = number_format(round($prozent,2), 2, ',', '');
                    $name = $r['schl'];
                    if ( strlen ( $name ) >= 50 ) {
                      $name = substr($name,0,50).'<b>...</b>';
                    }
                    echo '<tr class="norm"><td width="150" title="'.$r['schl'].'">'.$name.'</td><td width="250">';
                    echo '<hr width="'.$weite.'" align="left" /></td>';
                    echo '<td width="50" align="right">'.$prozent.'%</td>';
                    echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                  }
                }
    
                // ICON Anzeige...
                echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
    
                echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
                $smon  = $menu->get(2);
                if ( empty($smon) ) { $smon = $mon; }
    
    
                $ges = db_result(db_query("SELECT COUNT(*) FROM prefix_stats WHERE mon = ".$smon),0,0);
                echo '<br /><br /><b>Gesamt diesen Monat: '.$ges.'</b>';
                echo '<table cellpadding="2" border="0" cellspacing="0">';
    
                echo_admin_site_statistik ('Besucher nach Tagen', 'day', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Wochentagen', 'DAYNAME(FROM_UNIXTIME((wtag+3)*86400))', $smon, $ges, "wtag DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Uhrzeit', 'stunde', $smon, $ges, "schl ASC LIMIT 50");
                echo_admin_site_statistik ('Besucher nach Browsern', 'browser', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Betriebssytemen', 'os', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Herkunft', 'ref', $smon, $ges, "wert DESC LIMIT 50" );
    
    				    echo '</table>';
    
    
    				    break;
    				}
    
    
    
    
    				case 'userOnline' :
            {
    
              ?>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_online.png" /></td><td width="30"></td><td valign="bottom"><h1>Online Statistik</h1></td></tr></table>
           <br>
           <table cellpadding="0" cellspacing="0" border="0"><tr><td></td><td width="30"></td><td valign="bottom"><h2>Online</h2></td></tr></table>
    
           <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Username</th>
                <th>Letzte aktivitaet</th>
                <th>IP-Adresse</th>
                <th>Anbieter</th>
              </tr>
    
              <?php
              echo user_admin_online_liste();
              ?>
              </table>
              <br><br>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td widht="48"></td><td width="30"></td><td valign="bottom"><h2>Last log Member List</h2></td></tr></table>
             <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Letzte aktivitaet</th>
                <th>Username</th>
             </tr>
    
             <?php
               $abf = 'SELECT * FROM prefix_user where recht <= -3 ORDER BY llogin DESC';
    	$erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
    	$datum = date('d.m.y-H:m:s',$row->llogin);
    $user = $row->name;
    
    echo'<tr class="Chead"><td>'.$datum.'</td><td>&nbsp;&nbsp;<a href="?user-1-'.$row->id.'">'.$user.'</a></td></tr>';}
                ?>
    
              </table>
    
              <?php
              break;
    				}
    				case 'besucherUebersicht' :
            {
                function get_max_from_x ($q) {
                  $q = db_query($q);
                  $m = 0;
                  while($r = db_fetch_row($q)) {
                    if ($r[0] > $m) { $m = $r[0]; }
                  }
                  return ($m);
                }
    
                function echo_admin_site_uebersicht ($schl, $wert, $max, $ges) {
                  $wert = ( empty($wert) ? 1 : $wert );
                  $weite = ($wert / $max ) * 100;
    					    $prozent = ($wert * 100) / $ges;
    					    $prozent = number_format(round($prozent,2), 2, ',', '');
                  $name = $schl;
                  if ( strlen ( $name ) >= 50 ) {
                    $name = substr($name,0,50).'<b>...</b>';
                  }
                  echo '<tr class="norm"><td width="150" title="'.$schl.'">'.$name.'</td><td width="250">';
                  echo '<hr width="'.$weite.'" align="left" /></td>';
                  echo '<td width="50" align="right">'.$prozent.'%</td>';
                  echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                }
    
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
    
    
              echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
    
              echo '<br /><br /><table cellpadding="0" border="0" cellspacing="0" width="100%">';
              echo '<tr><td valign="top" width="33%"><b>Nach Tagen (letzten 5 Monate):</b><br />';
    
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = db_result(db_query("SELECT MAX(`count`) FROM prefix_counter"),0);
              $ges = db_result(db_query("SELECT SUM(`count`) FROM prefix_counter"),0);
              $erg = db_query("SELECT `count` as sum, DATE_FORMAT(`date`, '%d.%m.%Y') as datum FROM prefix_counter ORDER BY `date` DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['datum'], $r['sum'], $max, $ges);
              }
              echo '</table>';
    
              echo '</td><td valign="top" width="33%"><b>Nach Monaten:</b><br />';
    
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY MONTH(`date`), YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, MONTH(`date`) as monat, YEAR(`date`) as jahr FROM prefix_counter GROUP BY monat, jahr ORDER BY jahr DESC, monat DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ((strlen($r['monat'])==1?'0':'').$r['monat'].'.'.$r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
    
              echo '</td><td valign="top" width="33%"><b>Nach Jahren:</b><br />';
    
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, YEAR(`date`) as jahr FROM prefix_counter GROUP BY jahr ORDER BY jahr DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
    
              echo '</td></tr></table>';
              break;
    
            }
    				case 'siteStatistik' :
    				{
    ##########################################
    function forum_statistic_show ($sql,$ges) {
      $erg = db_query($sql);
      echo '<table border="0" cellpadding="0" cellspacing="0">';
      while ($r = db_fetch_row($erg)) {
    #    str_repeat('|',abs($row['regs'] / 2))
        echo '<tr><td>'.$r[1].'</td><td>'.str_repeat('|',$r[0]).' '.$r[0].'</td></tr>';
      }
      echo '</table>';
    }
    
    
    // ICON Anzeige...
    echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_site.png" /></td><td width="30"></td><td valign="bottom"><h1>Seiten Statistik</h1></td></tr></table>';
    
    echo '<table><tr><td valign="top">';
    $heute = mktime(0,0,0,date('m'),date('d'),date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute),0,0);
    echo 'Gesamt Posts heute: '.$anzheute.'<br /><hr>';
    
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User heute</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen heute</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren heute</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User heute</b><br />';
    forum_statistic_show($sql,$gsh);
    
    echo '</td><td valign="top">';
    $heute1 = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute),0,0);
    echo 'Gesamt Posts gestern: '.$anzheute.'<br /><hr>';
    
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User gestern</b><br />';
    forum_statistic_show($sql,$gsh);
    echo '</td></tr></table>';
    
    echo '<h1>Es ist ganz erlich noch mehr geplant :P</h1>';
    
    ##########################################
    				    break;
    				}
    
    		}
    
    $design->footer();
    ?>
    0 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    Lord|Schirmer Administrator
    Registriert seit
    21.03.2007
    Beiträge
    7.675
    Beitragswertungen
    1212 Beitragspunkte
    OK ... mach mal aus allen <? folgendes <?php

    Zeilen: 46, 66, 100, 111, 120, 137, 150
    rules :: doku :: faq :: linkus
    1 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    ZitatZitat geschrieben von Lord|Schirmer
    OK ... mach mal aus allen <? folgendes <?php

    Zeilen: 46, 66, 100, 111, 120, 137, 150


    Dann bekomme ich folgenden Fehler
    Parse error: syntax error, unexpected end of file in /var/www/vhosts/freiezocker.de/httpdocs/include/admin/admin.php on line 429
    <?php
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    defined ('admin') or die ( 'only admin access' );
    
    
    $design = new design ( 'Admins Area', 'Admins Area', 2 );
    $design->header();
    
    # script version
    $scriptVersion = 11;
    $scriptUpdate = 'M';
    
    # statistik wird bereinigt.
    $mon = date('n');
    $lastmon = $mon - 1;
    $jahr = date('Y');
    $lastjahr = $jahr;
    if ( $lastmon <= 0 ) { $lastmon = 12; $lastjahr = $jahr - 1; }
    
    db_query("DELETE FROM prefix_stats WHERE NOT ((mon = $mon OR mon = $lastmon) AND (yar = $jahr OR yar = $lastjahr))");
    db_query("OPTIMIZE TABLE prefix_stats");
    
    
        $um = $menu->get(1);
        switch($um)
        {
    
            default :
    				{
               ?>
    <table class="border" cellspacing="1" cellpadding="0" width="100%" border="0">
     <tr>
      <td class="Chead" height="20">&nbsp;Info</td>
     </tr>
    	<td>
      <table  cellspacing="0" cellpadding="0" width="100%" border="0">
    <tr>
    <td class="Cnorm" align="center" width="20%">
    <?phpphp echo getCalendar($mon, $jahr, $url, $urlod, $data, $cellpadding=2);?>
    </td>
    <td class="Cnorm" align="center" valign="top" width="60%">N&auml;chsten Geburtstage<hr style="height: 0px; border: dotted #444444 0px; border-top-width: 1px; " /><br>
    <?php include ('include/boxes/geburtstag.php');?>
    </td>
    <td class="Cnorm" align="center" width="20%">
    <embed src="http://www.clocklink.com/clocks/0008-Orange.swf?TimeZone=WET" width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">
    </td>
    
    </tr>
    </table>
    
      </td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="4">Statistik</td>
     </tr>
    	<tr>
      <td class="Cnorm" width="25%"><font class="smalfont">Design</font></td>
      <td class="Cnorm" width="25%" nowrap><font class="smalfont">
    <?php echo $allgAr['gfx']; ?>
      </font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">Installierte Version</font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">
    <?php echo ''.$scriptVersion.'&nbsp; Update: '.$scriptUpdate.''; ?>
      </font></td>
      </tr>
      <tr>
      <td class="Cnorm"><font class="smalfont">Datenbankgr&ouml;&szlig;e</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
    // gibt die groesse der Datenbank  aus
    $result = db_query("SHOW TABLE STATUS");
        $dbsize = 0;
        while($row = mysql_fetch_assoc($result)) {
            $dbsize += $row['Data_length'];
        }echo nicebytes($dbsize);
    ?>
      </font></td>
      <td class="Cnorm"><font class="smalfont">Downloads</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      echo nicebytes(dirsize('include/downs/'));
    ?>
     </font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">Benutzer &amp; G&auml;ste online</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php echo '<b>'.ges_online().'</b> Benutzer und <b>'.ges_gast_online().'</b> G&auml;ste';?>
      &nbsp; <a class="smalfont" href="admin.php?admin-userOnline">&#187; anzeigen</a></font></td>
    
      <td class="Cnorm" nowrap><font class="smalfont">Web Status</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      if ($allgAr['wartung'] == 0){
         echo 'Seite &Ouml;ffentlich';
      }else
        echo '<b>Wartungs Modus</b>&nbsp;<img src="include/images/icons/wartung.png">';
    ?>
      </a></font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">nicht aktivierte Accounts</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      $gesuser  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 1"),0);
      echo '<b>'.$gesuser.'</b>';
    ?>
      &nbsp; <a class="smalfont" href="admin.php?puser">&#187; anzeigen</a>
      </font></td>
    
      <td class="Cnorm"nowrap><font class="smalfont">nicht aktivierte Join Us</font></td>
      <td class="Cnorm"><font class="smalfont">
      <?php
     $joinus  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 4"),0);
      echo '<b>'.$joinus.'</b>';
      ?>
      &nbsp; <a class="smalfont" href="admin.php?groups-joinus">&#187; anzeigen</a>
      </font></td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="2">Die neusten Mitglieder</td>
      <td class="Chead" colspan="2">Die letzten Artikel, News ...</td>
     </tr>
     <tr>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?php
      $abf = 'SELECT * FROM prefix_user ORDER BY regist DESC LIMIT 5';
    	$erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
      $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') )  - $row->regist;
      $regday = round($regsek / 86400);
      $user = $row->name;
      echo'<tr class="Cnorm"><td><a href="?user-1-'.$row->id.'"><b>'.$user.'</b></a></td><td> Registriert am "'.date('d.m.Y',$row->regist).'"</td></tr>';}
    ?>
       </table>
      </td>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?php
      $abf = 'SELECT news_id,news_title FROM `prefix_news` ORDER BY news_time DESC LIMIT 5';
    	$erg = db_query($abf);
    	while ($row = db_fetch_object($erg) ) {
    		echo'<tr class="Cnorm"><td><a href="?news-edit-'.$row->news_id.'">'.$row->news_title.'</a></td></tr>';}
    ?>
       </table>
      </td>
     </tr>
     <tr>
      <td class="Chead" colspan="4" align="right"><a class="Chead" href="admin.php?about">Systeminformationen</a></td>
     </tr>
    </table>
    
    
    
    
               <?phpphp
    				   break;
            }
    
    				case 'versionsKontrolle' :
            {
    
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/version_check.png" /></td><td width="30"></td><td valign="bottom"><h1>Versionskontrolle</h1></td></tr></table>';
    
    
    						echo 'Scripte Version: '.$scriptVersion.'<br />Update Version: '.$scriptUpdate.'<br /><br />';
    						echo '<script language="JavaScript" type="text/javascript" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></script>';
    						#echo '<iframe width="100%" height="60" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></iframe>';
    
    						break;
            }
    
    				#####################################
    
    				case 'besucherStatistik' :
    				{
                function echo_admin_site_statistik ($title, $col, $smon, $ges, $orderQuery ) {
                  $sql = db_query("SELECT COUNT(*) AS wert, $col as schl FROM  `prefix_stats` WHERE mon = ".$smon." GROUP BY schl ORDER BY ".$orderQuery);
                  $max = @db_result(db_query("SELECT COUNT(*) as wert, $col as schl FROM prefix_stats WHERE mon = ".$smon." GROUP BY schl ORDER BY wert DESC LIMIT 1"),0,0);
                  if ( empty($max) ) { $max = 1; }
                  if ( empty($ges) ) { $ges = 1; }
                  echo '<tr><th align="left" colspan="4">'.$title.'</th></tr>';
                  while ( $r = db_fetch_assoc($sql) ) {
                    $wert = ( empty($r['wert']) ? 1 : $r['wert'] );
                    $weite = ($wert / $max) * 200;
    					      $prozent = ($wert * 100) / $ges;
    					      $prozent = number_format(round($prozent,2), 2, ',', '');
                    $name = $r['schl'];
                    if ( strlen ( $name ) >= 50 ) {
                      $name = substr($name,0,50).'<b>...</b>';
                    }
                    echo '<tr class="norm"><td width="150" title="'.$r['schl'].'">'.$name.'</td><td width="250">';
                    echo '<hr width="'.$weite.'" align="left" /></td>';
                    echo '<td width="50" align="right">'.$prozent.'%</td>';
                    echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                  }
                }
    
                // ICON Anzeige...
                echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
    
                echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
                $smon  = $menu->get(2);
                if ( empty($smon) ) { $smon = $mon; }
    
    
                $ges = db_result(db_query("SELECT COUNT(*) FROM prefix_stats WHERE mon = ".$smon),0,0);
                echo '<br /><br /><b>Gesamt diesen Monat: '.$ges.'</b>';
                echo '<table cellpadding="2" border="0" cellspacing="0">';
    
                echo_admin_site_statistik ('Besucher nach Tagen', 'day', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Wochentagen', 'DAYNAME(FROM_UNIXTIME((wtag+3)*86400))', $smon, $ges, "wtag DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Uhrzeit', 'stunde', $smon, $ges, "schl ASC LIMIT 50");
                echo_admin_site_statistik ('Besucher nach Browsern', 'browser', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Betriebssytemen', 'os', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Herkunft', 'ref', $smon, $ges, "wert DESC LIMIT 50" );
    
    				    echo '</table>';
    
    
    				    break;
    				}
    
    
    
    
    				case 'userOnline' :
            {
    
              ?>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_online.png" /></td><td width="30"></td><td valign="bottom"><h1>Online Statistik</h1></td></tr></table>
           <br>
           <table cellpadding="0" cellspacing="0" border="0"><tr><td></td><td width="30"></td><td valign="bottom"><h2>Online</h2></td></tr></table>
    
           <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Username</th>
                <th>Letzte aktivitaet</th>
                <th>IP-Adresse</th>
                <th>Anbieter</th>
              </tr>
    
              <?phpphp
              echo user_admin_online_liste();
              ?>
              </table>
              <br><br>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td widht="48"></td><td width="30"></td><td valign="bottom"><h2>Last log Member List</h2></td></tr></table>
             <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Letzte aktivitaet</th>
                <th>Username</th>
             </tr>
    
             <?phpphp
               $abf = 'SELECT * FROM prefix_user where recht <= -3 ORDER BY llogin DESC';
    	$erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
    	$datum = date('d.m.y-H:m:s',$row->llogin);
    $user = $row->name;
    
    echo'<tr class="Chead"><td>'.$datum.'</td><td>&nbsp;&nbsp;<a href="?user-1-'.$row->id.'">'.$user.'</a></td></tr>';}
                ?>
    
              </table>
    
              <?phpphp
              break;
    				}
    				case 'besucherUebersicht' :
            {
                function get_max_from_x ($q) {
                  $q = db_query($q);
                  $m = 0;
                  while($r = db_fetch_row($q)) {
                    if ($r[0] > $m) { $m = $r[0]; }
                  }
                  return ($m);
                }
    
                function echo_admin_site_uebersicht ($schl, $wert, $max, $ges) {
                  $wert = ( empty($wert) ? 1 : $wert );
                  $weite = ($wert / $max ) * 100;
    					    $prozent = ($wert * 100) / $ges;
    					    $prozent = number_format(round($prozent,2), 2, ',', '');
                  $name = $schl;
                  if ( strlen ( $name ) >= 50 ) {
                    $name = substr($name,0,50).'<b>...</b>';
                  }
                  echo '<tr class="norm"><td width="150" title="'.$schl.'">'.$name.'</td><td width="250">';
                  echo '<hr width="'.$weite.'" align="left" /></td>';
                  echo '<td width="50" align="right">'.$prozent.'%</td>';
                  echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                }
    
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
    
    
              echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
    
              echo '<br /><br /><table cellpadding="0" border="0" cellspacing="0" width="100%">';
              echo '<tr><td valign="top" width="33%"><b>Nach Tagen (letzten 5 Monate):</b><br />';
    
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = db_result(db_query("SELECT MAX(`count`) FROM prefix_counter"),0);
              $ges = db_result(db_query("SELECT SUM(`count`) FROM prefix_counter"),0);
              $erg = db_query("SELECT `count` as sum, DATE_FORMAT(`date`, '%d.%m.%Y') as datum FROM prefix_counter ORDER BY `date` DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['datum'], $r['sum'], $max, $ges);
              }
              echo '</table>';
    
              echo '</td><td valign="top" width="33%"><b>Nach Monaten:</b><br />';
    
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY MONTH(`date`), YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, MONTH(`date`) as monat, YEAR(`date`) as jahr FROM prefix_counter GROUP BY monat, jahr ORDER BY jahr DESC, monat DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ((strlen($r['monat'])==1?'0':'').$r['monat'].'.'.$r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
    
              echo '</td><td valign="top" width="33%"><b>Nach Jahren:</b><br />';
    
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, YEAR(`date`) as jahr FROM prefix_counter GROUP BY jahr ORDER BY jahr DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
    
              echo '</td></tr></table>';
              break;
    
            }
    				case 'siteStatistik' :
    				{
    ##########################################
    function forum_statistic_show ($sql,$ges) {
      $erg = db_query($sql);
      echo '<table border="0" cellpadding="0" cellspacing="0">';
      while ($r = db_fetch_row($erg)) {
    #    str_repeat('|',abs($row['regs'] / 2))
        echo '<tr><td>'.$r[1].'</td><td>'.str_repeat('|',$r[0]).' '.$r[0].'</td></tr>';
      }
      echo '</table>';
    }
    
    
    // ICON Anzeige...
    echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_site.png" /></td><td width="30"></td><td valign="bottom"><h1>Seiten Statistik</h1></td></tr></table>';
    
    echo '<table><tr><td valign="top">';
    $heute = mktime(0,0,0,date('m'),date('d'),date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute),0,0);
    echo 'Gesamt Posts heute: '.$anzheute.'<br /><hr>';
    
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User heute</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen heute</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren heute</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User heute</b><br />';
    forum_statistic_show($sql,$gsh);
    
    echo '</td><td valign="top">';
    $heute1 = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute),0,0);
    echo 'Gesamt Posts gestern: '.$anzheute.'<br /><hr>';
    
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
    
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User gestern</b><br />';
    forum_statistic_show($sql,$gsh);
    echo '</td></tr></table>';
    
    echo '<h1>Es ist ganz erlich noch mehr geplant :P</h1>';
    
    ##########################################
    				    break;
    				}
    
    		}
    
    $design->footer();
    ?>
    0 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    Nex4T Moderator
    Registriert seit
    28.02.2007
    Beiträge
    3.414
    Beitragswertungen
    213 Beitragspunkte
    Ändere mal <?phpphp in <?php z.b zeile 279
    while(!asleep()) sheep++;
    www.movely.biz
    www.webplant.eu
    1 Mitglieder finden den Beitrag gut.
  7. #7
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    ZitatZitat geschrieben von Nex4T
    Ändere mal <?phpphp in <?php z.b zeile 279


    Super das funktioniert gesperrtes Bild

    Aber jetzt habe ich unten Fehler, wo muß ich das noch einfügen?
    <?php
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
     
     
    defined ('main') or die ( 'no direct access' );
    defined ('admin') or die ( 'only admin access' );
     
     
    $design = new design ( 'Admins Area', 'Admins Area', 2 );
    $design->header();
     
    # script version
    $scriptVersion = 11;
    $scriptUpdate = 'M';
     
    # statistik wird bereinigt.
    $mon = date('n');
    $lastmon = $mon - 1;
    $jahr = date('Y');
    $lastjahr = $jahr;
    if ( $lastmon <= 0 ) { $lastmon = 12; $lastjahr = $jahr - 1; }
     
    db_query("DELETE FROM prefix_stats WHERE NOT ((mon = $mon OR mon = $lastmon) AND (yar = $jahr OR yar = $lastjahr))");
    db_query("OPTIMIZE TABLE prefix_stats");
     
     
        $um = $menu->get(1);
        switch($um)
        {
     
            default :
                    {
               ?>
    <table class="border" cellspacing="1" cellpadding="0" width="100%" border="0">
     <tr>
      <td class="Chead" height="20">&nbsp;Info</td>
     </tr>
        <td>
      <table  cellspacing="0" cellpadding="0" width="100%" border="0">
    <tr>
    <td class="Cnorm" align="center" width="20%">
    <?phpphp echo getCalendar($mon, $jahr, $url, $urlod, $data, $cellpadding=2);?>
    </td>
    <td class="Cnorm" align="center" valign="top" width="60%">N&auml;chsten Geburtstage<hr style="height: 0px; border: dotted #444444 0px; border-top-width: 1px; " /><br>
    <?php include ('include/boxes/geburtstag.php');?>
    </td>
    <td class="Cnorm" align="center" width="20%">
    <embed src="http://www.clocklink.com/clocks/0008-Orange.swf?TimeZone=WET" width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">
    </td>
     
    </tr>
    </table>
     
      </td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="4">Statistik</td>
     </tr>
        <tr>
      <td class="Cnorm" width="25%"><font class="smalfont">Design</font></td>
      <td class="Cnorm" width="25%" nowrap><font class="smalfont">
    <?php echo $allgAr['gfx']; ?>
      </font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">Installierte Version</font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">
    <?php echo ''.$scriptVersion.'&nbsp; Update: '.$scriptUpdate.''; ?>
      </font></td>
      </tr>
      <tr>
      <td class="Cnorm"><font class="smalfont">Datenbankgr&ouml;&szlig;e</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
    // gibt die groesse der Datenbank  aus
    $result = db_query("SHOW TABLE STATUS");
        $dbsize = 0;
        while($row = mysql_fetch_assoc($result)) {
            $dbsize += $row['Data_length'];
        }echo nicebytes($dbsize);
    ?>
      </font></td>
      <td class="Cnorm"><font class="smalfont">Downloads</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      echo nicebytes(dirsize('include/downs/'));
    ?>
     </font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">Benutzer &amp; G&auml;ste online</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php echo '<b>'.ges_online().'</b> Benutzer und <b>'.ges_gast_online().'</b> G&auml;ste';?>
      &nbsp; <a class="smalfont" href="admin.php?admin-userOnline">&#187; anzeigen</a></font></td>
     
      <td class="Cnorm" nowrap><font class="smalfont">Web Status</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      if ($allgAr['wartung'] == 0){
         echo 'Seite &Ouml;ffentlich';
      }else
        echo '<b>Wartungs Modus</b>&nbsp;<img src="include/images/icons/wartung.png">';
    ?>
      </a></font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">nicht aktivierte Accounts</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      $gesuser  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 1"),0);
      echo '<b>'.$gesuser.'</b>';
    ?>
      &nbsp; <a class="smalfont" href="admin.php?puser">&#187; anzeigen</a>
      </font></td>
     
      <td class="Cnorm"nowrap><font class="smalfont">nicht aktivierte Join Us</font></td>
      <td class="Cnorm"><font class="smalfont">
      <?php
     $joinus  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 4"),0);
      echo '<b>'.$joinus.'</b>';
      ?>
      &nbsp; <a class="smalfont" href="admin.php?groups-joinus">&#187; anzeigen</a>
      </font></td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="2">Die neusten Mitglieder</td>
      <td class="Chead" colspan="2">Die letzten Artikel, News ...</td>
     </tr>
     <tr>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?php
      $abf = 'SELECT * FROM prefix_user ORDER BY regist DESC LIMIT 5';
        $erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
      $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') )  - $row->regist;
      $regday = round($regsek / 86400);
      $user = $row->name;
      echo'<tr class="Cnorm"><td><a href="?user-1-'.$row->id.'"><b>'.$user.'</b></a></td><td> Registriert am "'.date('d.m.Y',$row->regist).'"</td></tr>';}
    ?>
       </table>
      </td>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?php
      $abf = 'SELECT news_id,news_title FROM `prefix_news` ORDER BY news_time DESC LIMIT 5';
        $erg = db_query($abf);
        while ($row = db_fetch_object($erg) ) {
            echo'<tr class="Cnorm"><td><a href="?news-edit-'.$row->news_id.'">'.$row->news_title.'</a></td></tr>';}
    ?>
       </table>
      </td>
     </tr>
     <tr>
      <td class="Chead" colspan="4" align="right"><a class="Chead" href="admin.php?about">Systeminformationen</a></td>
     </tr>
    </table>
     
     
     
     
               <?phpphp
                       break;
            }
     
                    case 'versionsKontrolle' :
            {
     
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/version_check.png" /></td><td width="30"></td><td valign="bottom"><h1>Versionskontrolle</h1></td></tr></table>';
     
     
                            echo 'Scripte Version: '.$scriptVersion.'<br />Update Version: '.$scriptUpdate.'<br /><br />';
                            echo '<script language="JavaScript" type="text/javascript" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></script>';
                            #echo '<iframe width="100%" height="60" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></iframe>';
     
                            break;
            }
     
                    #####################################
     
                    case 'besucherStatistik' :
                    {
                function echo_admin_site_statistik ($title, $col, $smon, $ges, $orderQuery ) {
                  $sql = db_query("SELECT COUNT(*) AS wert, $col as schl FROM  `prefix_stats` WHERE mon = ".$smon." GROUP BY schl ORDER BY ".$orderQuery);
                  $max = @db_result(db_query("SELECT COUNT(*) as wert, $col as schl FROM prefix_stats WHERE mon = ".$smon." GROUP BY schl ORDER BY wert DESC LIMIT 1"),0,0);
                  if ( empty($max) ) { $max = 1; }
                  if ( empty($ges) ) { $ges = 1; }
                  echo '<tr><th align="left" colspan="4">'.$title.'</th></tr>';
                  while ( $r = db_fetch_assoc($sql) ) {
                    $wert = ( empty($r['wert']) ? 1 : $r['wert'] );
                    $weite = ($wert / $max) * 200;
                              $prozent = ($wert * 100) / $ges;
                              $prozent = number_format(round($prozent,2), 2, ',', '');
                    $name = $r['schl'];
                    if ( strlen ( $name ) >= 50 ) {
                      $name = substr($name,0,50).'<b>...</b>';
                    }
                    echo '<tr class="norm"><td width="150" title="'.$r['schl'].'">'.$name.'</td><td width="250">';
                    echo '<hr width="'.$weite.'" align="left" /></td>';
                    echo '<td width="50" align="right">'.$prozent.'%</td>';
                    echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                  }
                }
     
                // ICON Anzeige...
                echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
     
                echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
                $smon  = $menu->get(2);
                if ( empty($smon) ) { $smon = $mon; }
     
     
                $ges = db_result(db_query("SELECT COUNT(*) FROM prefix_stats WHERE mon = ".$smon),0,0);
                echo '<br /><br /><b>Gesamt diesen Monat: '.$ges.'</b>';
                echo '<table cellpadding="2" border="0" cellspacing="0">';
     
                echo_admin_site_statistik ('Besucher nach Tagen', 'day', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Wochentagen', 'DAYNAME(FROM_UNIXTIME((wtag+3)*86400))', $smon, $ges, "wtag DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Uhrzeit', 'stunde', $smon, $ges, "schl ASC LIMIT 50");
                echo_admin_site_statistik ('Besucher nach Browsern', 'browser', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Betriebssytemen', 'os', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Herkunft', 'ref', $smon, $ges, "wert DESC LIMIT 50" );
     
                        echo '</table>';
     
     
                        break;
                    }
     
     
     
     
                    case 'userOnline' :
            {
     
              ?>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_online.png" /></td><td width="30"></td><td valign="bottom"><h1>Online Statistik</h1></td></tr></table>
           <br>
           <table cellpadding="0" cellspacing="0" border="0"><tr><td></td><td width="30"></td><td valign="bottom"><h2>Online</h2></td></tr></table>
     
           <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Username</th>
                <th>Letzte aktivitaet</th>
                <th>IP-Adresse</th>
                <th>Anbieter</th>
              </tr>
     
              <?phpphp
              echo user_admin_online_liste();
              ?>
              </table>
              <br><br>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td widht="48"></td><td width="30"></td><td valign="bottom"><h2>Last log Member List</h2></td></tr></table>
             <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Letzte aktivitaet</th>
                <th>Username</th>
             </tr>
     
             <?phpphp
               $abf = 'SELECT * FROM prefix_user where recht <= -3 ORDER BY llogin DESC';
        $erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
        $datum = date('d.m.y-H:m:s',$row->llogin);
    $user = $row->name;
     
    echo'<tr class="Chead"><td>'.$datum.'</td><td>&nbsp;&nbsp;<a href="?user-1-'.$row->id.'">'.$user.'</a></td></tr>';}
                ?>
     
              </table>
     
              <?php
              break;
                    }
                    case 'besucherUebersicht' :
            {
                function get_max_from_x ($q) {
                  $q = db_query($q);
                  $m = 0;
                  while($r = db_fetch_row($q)) {
                    if ($r[0] > $m) { $m = $r[0]; }
                  }
                  return ($m);
                }
     
                function echo_admin_site_uebersicht ($schl, $wert, $max, $ges) {
                  $wert = ( empty($wert) ? 1 : $wert );
                  $weite = ($wert / $max ) * 100;
                            $prozent = ($wert * 100) / $ges;
                            $prozent = number_format(round($prozent,2), 2, ',', '');
                  $name = $schl;
                  if ( strlen ( $name ) >= 50 ) {
                    $name = substr($name,0,50).'<b>...</b>';
                  }
                  echo '<tr class="norm"><td width="150" title="'.$schl.'">'.$name.'</td><td width="250">';
                  echo '<hr width="'.$weite.'" align="left" /></td>';
                  echo '<td width="50" align="right">'.$prozent.'%</td>';
                  echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                }
     
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
     
     
              echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
     
              echo '<br /><br /><table cellpadding="0" border="0" cellspacing="0" width="100%">';
              echo '<tr><td valign="top" width="33%"><b>Nach Tagen (letzten 5 Monate):</b><br />';
     
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = db_result(db_query("SELECT MAX(`count`) FROM prefix_counter"),0);
              $ges = db_result(db_query("SELECT SUM(`count`) FROM prefix_counter"),0);
              $erg = db_query("SELECT `count` as sum, DATE_FORMAT(`date`, '%d.%m.%Y') as datum FROM prefix_counter ORDER BY `date` DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['datum'], $r['sum'], $max, $ges);
              }
              echo '</table>';
     
              echo '</td><td valign="top" width="33%"><b>Nach Monaten:</b><br />';
     
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY MONTH(`date`), YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, MONTH(`date`) as monat, YEAR(`date`) as jahr FROM prefix_counter GROUP BY monat, jahr ORDER BY jahr DESC, monat DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ((strlen($r['monat'])==1?'0':'').$r['monat'].'.'.$r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
     
              echo '</td><td valign="top" width="33%"><b>Nach Jahren:</b><br />';
     
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, YEAR(`date`) as jahr FROM prefix_counter GROUP BY jahr ORDER BY jahr DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
     
              echo '</td></tr></table>';
              break;
     
            }
                    case 'siteStatistik' :
                    {
    ##########################################
    function forum_statistic_show ($sql,$ges) {
      $erg = db_query($sql);
      echo '<table border="0" cellpadding="0" cellspacing="0">';
      while ($r = db_fetch_row($erg)) {
    #    str_repeat('|',abs($row['regs'] / 2))
        echo '<tr><td>'.$r[1].'</td><td>'.str_repeat('|',$r[0]).' '.$r[0].'</td></tr>';
      }
      echo '</table>';
    }
     
     
    // ICON Anzeige...
    echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_site.png" /></td><td width="30"></td><td valign="bottom"><h1>Seiten Statistik</h1></td></tr></table>';
     
    echo '<table><tr><td valign="top">';
    $heute = mktime(0,0,0,date('m'),date('d'),date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute),0,0);
    echo 'Gesamt Posts heute: '.$anzheute.'<br /><hr>';
     
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User heute</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen heute</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren heute</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User heute</b><br />';
    forum_statistic_show($sql,$gsh);
     
    echo '</td><td valign="top">';
    $heute1 = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute),0,0);
    echo 'Gesamt Posts gestern: '.$anzheute.'<br /><hr>';
     
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User gestern</b><br />';
    forum_statistic_show($sql,$gsh);
    echo '</td></tr></table>';
     
    echo '<h1>Es ist ganz erlich noch mehr geplant :P</h1>';
     
    ##########################################
                        break;
                    }
     
            }
     
    $design->footer();
    ?>
    0 Mitglieder finden den Beitrag gut.
  8. #8
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    Okay habe es hin bekommen :-) Besten besten dank für Eure Hilfe :-)
    <?php
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
     
     
    defined ('main') or die ( 'no direct access' );
    defined ('admin') or die ( 'only admin access' );
     
     
    $design = new design ( 'Admins Area', 'Admins Area', 2 );
    $design->header();
     
    # script version
    $scriptVersion = 11;
    $scriptUpdate = 'M';
     
    # statistik wird bereinigt.
    $mon = date('n');
    $lastmon = $mon - 1;
    $jahr = date('Y');
    $lastjahr = $jahr;
    if ( $lastmon <= 0 ) { $lastmon = 12; $lastjahr = $jahr - 1; }
     
    db_query("DELETE FROM prefix_stats WHERE NOT ((mon = $mon OR mon = $lastmon) AND (yar = $jahr OR yar = $lastjahr))");
    db_query("OPTIMIZE TABLE prefix_stats");
     
     
        $um = $menu->get(1);
        switch($um)
        {
     
            default :
                    {
               ?>
    <table class="border" cellspacing="1" cellpadding="0" width="100%" border="0">
     <tr>
      <td class="Chead" height="20">&nbsp;Info</td>
     </tr>
        <td>
      <table  cellspacing="0" cellpadding="0" width="100%" border="0">
    <tr>
    <td class="Cnorm" align="center" width="20%">
    <?php echo getCalendar($mon, $jahr, $url, $urlod, $data, $cellpadding=2);?>
    </td>
    <td class="Cnorm" align="center" valign="top" width="60%">N&auml;chsten Geburtstage<hr style="height: 0px; border: dotted #444444 0px; border-top-width: 1px; " /><br>
    <?php include ('include/boxes/geburtstag.php');?>
    </td>
    <td class="Cnorm" align="center" width="20%">
    <embed src="http://www.clocklink.com/clocks/0008-Orange.swf?TimeZone=WET" width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">
    </td>
     
    </tr>
    </table>
     
      </td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="4">Statistik</td>
     </tr>
        <tr>
      <td class="Cnorm" width="25%"><font class="smalfont">Design</font></td>
      <td class="Cnorm" width="25%" nowrap><font class="smalfont">
    <?php echo $allgAr['gfx']; ?>
      </font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">Installierte Version</font></td>
      <td class="Cnorm" width="25%"><font class="smalfont">
    <?php echo ''.$scriptVersion.'&nbsp; Update: '.$scriptUpdate.''; ?>
      </font></td>
      </tr>
      <tr>
      <td class="Cnorm"><font class="smalfont">Datenbankgr&ouml;&szlig;e</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
    // gibt die groesse der Datenbank  aus
    $result = db_query("SHOW TABLE STATUS");
        $dbsize = 0;
        while($row = mysql_fetch_assoc($result)) {
            $dbsize += $row['Data_length'];
        }echo nicebytes($dbsize);
    ?>
      </font></td>
      <td class="Cnorm"><font class="smalfont">Downloads</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      echo nicebytes(dirsize('include/downs/'));
    ?>
     </font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">Benutzer &amp; G&auml;ste online</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php echo '<b>'.ges_online().'</b> Benutzer und <b>'.ges_gast_online().'</b> G&auml;ste';?>
      &nbsp; <a class="smalfont" href="admin.php?admin-userOnline">&#187; anzeigen</a></font></td>
     
      <td class="Cnorm" nowrap><font class="smalfont">Web Status</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      if ($allgAr['wartung'] == 0){
         echo 'Seite &Ouml;ffentlich';
      }else
        echo '<b>Wartungs Modus</b>&nbsp;<img src="include/images/icons/wartung.png">';
    ?>
      </a></font></td>
     </tr>
     <tr>
      <td class="Cnorm"><font class="smalfont">nicht aktivierte Accounts</font></td>
      <td class="Cnorm"><font class="smalfont">
    <?php
      $gesuser  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 1"),0);
      echo '<b>'.$gesuser.'</b>';
    ?>
      &nbsp; <a class="smalfont" href="admin.php?puser">&#187; anzeigen</a>
      </font></td>
     
      <td class="Cnorm"nowrap><font class="smalfont">nicht aktivierte Join Us</font></td>
      <td class="Cnorm"><font class="smalfont">
      <?php
     $joinus  = @db_result(db_query("SELECT count(name) FROM prefix_usercheck WHERE ak = 4"),0);
      echo '<b>'.$joinus.'</b>';
      ?>
      &nbsp; <a class="smalfont" href="admin.php?groups-joinus">&#187; anzeigen</a>
      </font></td>
      </tr>
    </table>
    <br>
    <table class="border" cellspacing="1" cellpadding="4" width="100%" border="0">
     <tr>
      <td class="Chead" colspan="2">Die neusten Mitglieder</td>
      <td class="Chead" colspan="2">Die letzten Artikel, News ...</td>
     </tr>
     <tr>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?php
      $abf = 'SELECT * FROM prefix_user ORDER BY regist DESC LIMIT 5';
        $erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
      $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') )  - $row->regist;
      $regday = round($regsek / 86400);
      $user = $row->name;
      echo'<tr class="Cnorm"><td><a href="?user-1-'.$row->id.'"><b>'.$user.'</b></a></td><td> Registriert am "'.date('d.m.Y',$row->regist).'"</td></tr>';}
    ?>
       </table>
      </td>
      <td class="Cnorm" colspan="2" valign="top">
       <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <?php
      $abf = 'SELECT news_id,news_title FROM `prefix_news` ORDER BY news_time DESC LIMIT 5';
        $erg = db_query($abf);
        while ($row = db_fetch_object($erg) ) {
            echo'<tr class="Cnorm"><td><a href="?news-edit-'.$row->news_id.'">'.$row->news_title.'</a></td></tr>';}
    ?>
       </table>
      </td>
     </tr>
     <tr>
      <td class="Chead" colspan="4" align="right"><a class="Chead" href="admin.php?about">Systeminformationen</a></td>
     </tr>
    </table>
     
     
     
     
               <?php
                       break;
            }
     
                    case 'versionsKontrolle' :
            {
     
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/version_check.png" /></td><td width="30"></td><td valign="bottom"><h1>Versionskontrolle</h1></td></tr></table>';
     
     
                            echo 'Scripte Version: '.$scriptVersion.'<br />Update Version: '.$scriptUpdate.'<br /><br />';
                            echo '<script language="JavaScript" type="text/javascript" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></script>';
                            #echo '<iframe width="100%" height="60" src="http://www.ilch.de/down/ilchClan/update.php?version='.$scriptVersion.'&update='.$scriptUpdate.'"></iframe>';
     
                            break;
            }
     
                    #####################################
     
                    case 'besucherStatistik' :
                    {
                function echo_admin_site_statistik ($title, $col, $smon, $ges, $orderQuery ) {
                  $sql = db_query("SELECT COUNT(*) AS wert, $col as schl FROM  `prefix_stats` WHERE mon = ".$smon." GROUP BY schl ORDER BY ".$orderQuery);
                  $max = @db_result(db_query("SELECT COUNT(*) as wert, $col as schl FROM prefix_stats WHERE mon = ".$smon." GROUP BY schl ORDER BY wert DESC LIMIT 1"),0,0);
                  if ( empty($max) ) { $max = 1; }
                  if ( empty($ges) ) { $ges = 1; }
                  echo '<tr><th align="left" colspan="4">'.$title.'</th></tr>';
                  while ( $r = db_fetch_assoc($sql) ) {
                    $wert = ( empty($r['wert']) ? 1 : $r['wert'] );
                    $weite = ($wert / $max) * 200;
                              $prozent = ($wert * 100) / $ges;
                              $prozent = number_format(round($prozent,2), 2, ',', '');
                    $name = $r['schl'];
                    if ( strlen ( $name ) >= 50 ) {
                      $name = substr($name,0,50).'<b>...</b>';
                    }
                    echo '<tr class="norm"><td width="150" title="'.$r['schl'].'">'.$name.'</td><td width="250">';
                    echo '<hr width="'.$weite.'" align="left" /></td>';
                    echo '<td width="50" align="right">'.$prozent.'%</td>';
                    echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                  }
                }
     
                // ICON Anzeige...
                echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
     
                echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
                $smon  = $menu->get(2);
                if ( empty($smon) ) { $smon = $mon; }
     
     
                $ges = db_result(db_query("SELECT COUNT(*) FROM prefix_stats WHERE mon = ".$smon),0,0);
                echo '<br /><br /><b>Gesamt diesen Monat: '.$ges.'</b>';
                echo '<table cellpadding="2" border="0" cellspacing="0">';
     
                echo_admin_site_statistik ('Besucher nach Tagen', 'day', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Wochentagen', 'DAYNAME(FROM_UNIXTIME((wtag+3)*86400))', $smon, $ges, "wtag DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Uhrzeit', 'stunde', $smon, $ges, "schl ASC LIMIT 50");
                echo_admin_site_statistik ('Besucher nach Browsern', 'browser', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Betriebssytemen', 'os', $smon, $ges, "schl DESC LIMIT 50" );
                echo_admin_site_statistik ('Besucher nach Herkunft', 'ref', $smon, $ges, "wert DESC LIMIT 50" );
     
                        echo '</table>';
     
     
                        break;
                    }
     
     
     
     
                    case 'userOnline' :
            {
     
              ?>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_online.png" /></td><td width="30"></td><td valign="bottom"><h1>Online Statistik</h1></td></tr></table>
           <br>
           <table cellpadding="0" cellspacing="0" border="0"><tr><td></td><td width="30"></td><td valign="bottom"><h2>Online</h2></td></tr></table>
     
           <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Username</th>
                <th>Letzte aktivitaet</th>
                <th>IP-Adresse</th>
                <th>Anbieter</th>
              </tr>
     
              <?phpphp
              echo user_admin_online_liste();
              ?>
              </table>
              <br><br>
              <table cellpadding="0" cellspacing="0" border="0"><tr><td widht="48"></td><td width="30"></td><td valign="bottom"><h2>Last log Member List</h2></td></tr></table>
             <table border="0" cellpadding="2" cellspacing="1" class="border">
              <tr class="Chead">
                <th>Letzte aktivitaet</th>
                <th>Username</th>
             </tr>
     
             <?php
               $abf = 'SELECT * FROM prefix_user where recht <= -3 ORDER BY llogin DESC';
        $erg = db_query($abf);
      while ($row = db_fetch_object($erg)) {
        $datum = date('d.m.y-H:m:s',$row->llogin);
    $user = $row->name;
     
    echo'<tr class="Chead"><td>'.$datum.'</td><td>&nbsp;&nbsp;<a href="?user-1-'.$row->id.'">'.$user.'</a></td></tr>';}
                ?>
     
              </table>
     
              <?php
              break;
                    }
                    case 'besucherUebersicht' :
            {
                function get_max_from_x ($q) {
                  $q = db_query($q);
                  $m = 0;
                  while($r = db_fetch_row($q)) {
                    if ($r[0] > $m) { $m = $r[0]; }
                  }
                  return ($m);
                }
     
                function echo_admin_site_uebersicht ($schl, $wert, $max, $ges) {
                  $wert = ( empty($wert) ? 1 : $wert );
                  $weite = ($wert / $max ) * 100;
                            $prozent = ($wert * 100) / $ges;
                            $prozent = number_format(round($prozent,2), 2, ',', '');
                  $name = $schl;
                  if ( strlen ( $name ) >= 50 ) {
                    $name = substr($name,0,50).'<b>...</b>';
                  }
                  echo '<tr class="norm"><td width="150" title="'.$schl.'">'.$name.'</td><td width="250">';
                  echo '<hr width="'.$weite.'" align="left" /></td>';
                  echo '<td width="50" align="right">'.$prozent.'%</td>';
                  echo '<td  width="50" align="right">'.$wert.'</td></tr>';
                }
     
              // ICON Anzeige...
              echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_visitor.png" /></td><td width="30"></td><td valign="bottom"><h1>Besucher Statistik</h1></td></tr></table>';
     
     
              echo '<a href="admin.php?admin-besucherUebersicht">&Uuml;bersicht</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$lastmon.'" title="'.$lastmon.'. '.$lastjahr.'">letzter Monat</a>&nbsp;<b>|</b>&nbsp;<a href="?admin-besucherStatistik-'.$mon.'" title="'.$mon.'. '.$jahr.'">dieser Monat</a>';
     
              echo '<br /><br /><table cellpadding="0" border="0" cellspacing="0" width="100%">';
              echo '<tr><td valign="top" width="33%"><b>Nach Tagen (letzten 5 Monate):</b><br />';
     
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = db_result(db_query("SELECT MAX(`count`) FROM prefix_counter"),0);
              $ges = db_result(db_query("SELECT SUM(`count`) FROM prefix_counter"),0);
              $erg = db_query("SELECT `count` as sum, DATE_FORMAT(`date`, '%d.%m.%Y') as datum FROM prefix_counter ORDER BY `date` DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['datum'], $r['sum'], $max, $ges);
              }
              echo '</table>';
     
              echo '</td><td valign="top" width="33%"><b>Nach Monaten:</b><br />';
     
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY MONTH(`date`), YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, MONTH(`date`) as monat, YEAR(`date`) as jahr FROM prefix_counter GROUP BY monat, jahr ORDER BY jahr DESC, monat DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ((strlen($r['monat'])==1?'0':'').$r['monat'].'.'.$r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
     
              echo '</td><td valign="top" width="33%"><b>Nach Jahren:</b><br />';
     
              echo '<table cellpadding="0" border="0" cellspacing="0" width="90%">';
              $max = get_max_from_x("SELECT SUM(`count`) FROM prefix_counter GROUP BY YEAR(`date`)");
              $erg = db_query("SELECT SUM(`count`) as sum, YEAR(`date`) as jahr FROM prefix_counter GROUP BY jahr ORDER BY jahr DESC");
              while ($r = db_fetch_assoc($erg)) {
                echo_admin_site_uebersicht ($r['jahr'], $r['sum'], $max, $ges);
              }
              echo '</table>';
     
              echo '</td></tr></table>';
              break;
     
            }
                    case 'siteStatistik' :
                    {
    ##########################################
    function forum_statistic_show ($sql,$ges) {
      $erg = db_query($sql);
      echo '<table border="0" cellpadding="0" cellspacing="0">';
      while ($r = db_fetch_row($erg)) {
    #    str_repeat('|',abs($row['regs'] / 2))
        echo '<tr><td>'.$r[1].'</td><td>'.str_repeat('|',$r[0]).' '.$r[0].'</td></tr>';
      }
      echo '</table>';
    }
     
     
    // ICON Anzeige...
    echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/stats_site.png" /></td><td width="30"></td><td valign="bottom"><h1>Seiten Statistik</h1></td></tr></table>';
     
    echo '<table><tr><td valign="top">';
    $heute = mktime(0,0,0,date('m'),date('d'),date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute),0,0);
    echo 'Gesamt Posts heute: '.$anzheute.'<br /><hr>';
     
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User heute</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen heute</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren heute</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User heute</b><br />';
    forum_statistic_show($sql,$gsh);
     
    echo '</td><td valign="top">';
    $heute1 = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
    $anzheute = db_result(db_query("SELECT COUNT(*) FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute),0,0);
    echo 'Gesamt Posts gestern: '.$anzheute.'<br /><hr>';
     
    # aktivsten user
    $sql = "SELECT COUNT(*) as kk , erst as vv FROM prefix_posts WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<b>Aktivsten User gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten themen
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_topics LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Themen gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # aktivsten foren
    $sql = "SELECT COUNT(*) as kk , prefix_forums.name as vv FROM prefix_topics LEFT JOIN prefix_forums ON prefix_forums.id = prefix_topics.fid LEFT JOIN prefix_posts ON prefix_posts.tid = prefix_topics.id WHERE time >= ".$heute1." AND time <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Aktivsten Foren gestern</b><br />';
    forum_statistic_show($sql,$anzheute);
     
    # neue user heute
    $gsh = db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute),0,0);
    $sql = "SELECT COUNT(*) as kk , name as vv FROM prefix_user WHERE regist >= ".$heute1." AND regist <= ".$heute." GROUP BY vv ORDER BY kk DESC LIMIT 10";
    echo '<hr><b>Neue User gestern</b><br />';
    forum_statistic_show($sql,$gsh);
    echo '</td></tr></table>';
     
    echo '<h1>Es ist ganz erlich noch mehr geplant :P</h1>';
     
    ##########################################
                        break;
                    }
     
            }
     
    $design->footer();
    ?>
    0 Mitglieder finden den Beitrag gut.
  9. #9
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    Noch ne kleine Frage, bei 1 Benutzer und 0 Gäste » anzeigen wenn ich da auf anzeigen gehe zeigt er mir null user an obwohl eben 3 Gäste und ich drauf waren ? Ist jetzt kein großes Problem aber wäre doch cool wenn das auch noch geht :-)


    Zuletzt modifiziert von xRebellx am 28.04.2017 - 19:24:41
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten