Zitat
Ps. Bin dringend auf der suche nach dieser Statistik und damit sich meine Chancen erhöhen diese content datei wieder zu erlangen.
Dachte ich mir ich poste es auch mal hier in ilch.de
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
function mysqlDbSize( $database ) { $sql = "SHOW TABLE STATUS FROM " . $database; $result = @db_query( $sql ); $dbSize = 0; while( ( $row = @db_fetch_assoc( $result, MYSQL_ASSOC ) ) == true ){ $dbSize += $row["Data_length"] + $row["Index_length"]; } return $dbSize; } # Aufruf der Funktion echo mysqlDbSize(DBDATE) # Mit Einheit echo nicebytes(mysqlDbSize(DBDATE));
<?php $datum="17.10.2008"; $d=explode(".",$datum); $unix=mktime(0,0,0,$d[1],$d[0],$d[2]); $stamp=time(); $diff=$stamp-$unix; $diff=$diff/86400; echo 'Es sind '.floor($diff).' Tage seit dem '.$datum.' vergangen'; ?>
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: Statistik'; $hmenu = 'Statistik'; $design = new design ( $title , $hmenu ); $design->header(); $topics = db_query('SELECT COUNT(ID) FROM prefix_topics'); $topics = @db_result($topics,0); $posts = db_query('SELECT COUNT(ID) FROM prefix_posts'); $posts = @db_result($posts,0); $gb = db_query('SELECT COUNT(ID) FROM prefix_gbook'); $gb = @db_result($gb,0); $user = db_query('SELECT COUNT(ID) FROM prefix_user'); $user = @db_result($user,0); $userm = db_query('SELECT COUNT(ID) FROM prefix_user WHERE geschlecht = 1'); $userm = @db_result($userm,0); $userw = db_query('SELECT COUNT(ID) FROM prefix_user WHERE geschlecht = 2'); $userw = @db_result($userw,0); $down = db_query('SELECT COUNT(ID) FROM prefix_downloads'); $down = @db_result($down,0); $downc = db_query('SELECT COUNT(ID) FROM prefix_downcats'); $downc = @db_result($downc,0); $galimg = db_query('SELECT COUNT(ID) FROM prefix_gallery_imgs'); $galimg = @db_result($galimg,0); $galcat = db_query('SELECT COUNT(ID) FROM prefix_gallery_cats'); $galcat = @db_result($galcat,0); $usergal = db_query('SELECT COUNT(ID) FROM prefix_usergallery'); $usergal = @db_result($usergal,0); $komges = db_query('SELECT COUNT(ID) FROM prefix_koms'); $komges = @db_result($komges,0); $link = db_query('SELECT COUNT(ID) FROM prefix_links'); $link = @db_result($link,0); $linkc = db_query('SELECT COUNT(ID) FROM prefix_linkcats'); $linkc = @db_result($linkc,0); $smile = db_query('SELECT COUNT(ID) FROM prefix_smilies'); $smile = @db_result($smile,0); $poll = db_query('SELECT COUNT(POLL_ID) FROM prefix_poll'); $poll = @db_result($poll,0); $partner = db_query('SELECT COUNT(ID) FROM prefix_partners'); $partner = @db_result($partner,0); $ges_visits = db_query("SELECT SUM(count) FROM prefix_counter"); $ges_visits = @db_result($ges_visits,0); $heute = date ('Y-m-d'); $ges_heute = db_query("SELECT count FROM prefix_counter WHERE date = '".$heute."'"); $ges_heute = @db_result($ges_heute,0); $ges_gestern = db_query('SELECT count FROM prefix_counter WHERE date < "'.$heute.'" ORDER BY date DESC LIMIT 1'); $ges_gestern = @db_result($ges_gestern,0); $maxErg = db_query('SELECT MAX(count) FROM `prefix_counter`'); $max_in = db_result($maxErg,0); $datum="25.07.2013"; $d=explode(".",$datum); $unix=mktime(0,0,0,$d[1],$d[0],$d[2]); $stamp=time(); $diff=$stamp-$unix; $diff=$diff/86400; $anzahlShownTage = 7; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>Sonstiges</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Smilies:</td> <td>$smile</td> </tr> <tr class='Cmite'> <td>Kommentare:</td> <td>$komges</td> </tr> <tr class='Cnorm'> <td>Umfragen:</td> <td>$poll</td> </tr> <tr class='Cmite'> <td>Partner:</td> <td>$partner</td> </tr> </table><br><br>"; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>Links</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Links:</td> <td>$link</td> </tr> <tr class='Cmite'> <td>Kategorien:</td> <td>$linkc</td> </tr> </table><br><br>"; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>Galerie</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Bilder:</td> <td>$galimg</td> </tr> <tr class='Cmite'> <td>Kategorien:</td> <td>$galcat</td> </tr> <tr class='Cnorm'> <td>in Usergallery:</td> <td>$usergal</td> </tr> </table><br><br>"; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>Downloads</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Downloads:</td> <td>$down</td> </tr> <tr class='Cmite'> <td>Kategorien:</td> <td>$downc</td> </tr> </table><br><br>"; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>Gästebuch:</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Einträge:</td> <td>$gb</td> </tr> </table><br><br>"; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>User:</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Gesamt:</td> <td>$user</td> </tr> <tr class='Cmite'> <td>männlich:</td> <td>$userm</td> </tr> <tr class='Cnorm'> <td>weiblich:</td> <td>$userw</td> </tr> </table><br><br>"; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>Forum</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Topics:</td> <td>$topics</td> </tr> <tr class='Cmite'> <td>Posts:</td> <td>$posts</td> </tr> </table><br><br>"; echo "<table align='center' width='90%' border='0' cellspacing='1' cellpadding='3' class='border'> <tr class='Chead'> <td width='50%'><b>Seiten</b></td> <td width='50%'><b>Statistik</b></td> </tr> <tr class='Cnorm'> <td>Seite ist Online:</td> <td>seit $datum ($diff Tage)</td> </tr> <tr class='Cmite'> <td>Größe der Datenbank:</td> <td>?????</td> </tr> <tr class='Cnorm'> <td>Besucher Gesamt:</td> <td>$ges_visits</td> </tr> <tr class='Cmite'> <td>Besucher Heute:</td> <td>$ges_heute</td> </tr> <tr class='Cnorm'> <td>Besucher Gestern:</td> <td>$ges_gestern</td> </tr> <tr class='Cmite'> <td>Maximal am Tag:</td> <td>$max_in</td> </tr> </table><br><br>"; echo '<br /><table width=90%" align="center" class="border" cellpadding="0" cellspacing="1" border="0"><tr><td>'; echo '<table width="100%" border="0" cellpadding="5" cellspacing="0">'; echo '<tr class="Chead"><td colspan="3" align="left"><b>Wochentags Statistik</b></td></tr>'; $max_in = 0; $ges = 0; $dat = array(); $max_width = 200; $maxErg = db_query('SELECT MAX(count) FROM `prefix_counter`'); $max_in = db_result($maxErg,0); $erg = db_query ("SELECT count, DATE_FORMAT(date,'%a der %d. %b') as datum FROM `prefix_counter` ORDER BY date DESC LIMIT ".$anzahlShownTage); while ($row = db_fetch_row($erg) ) { $value = $row[0]; if ( empty($value) ) { $bwidth = 0; } else { $bwidth = $value/$max_in * $max_width; $bwidth = round($bwidth,0); } echo '<tr class="Cnorm">'; echo '<td>'.$row[1].'</td>'; echo '<td><table width="'.$bwidth.'" border="0" cellpadding="0" cellspacing="0">'; echo '<tr><td height="2" class="border"></td></tr></table>'; echo '</td><td align="right">'.$value.'</td></tr>'; $ges += $value; } $gesBesucher = db_query('SELECT SUM(count) FROM prefix_counter'); $gesBesucher = @db_result($gesBesucher,0); echo '<tr class="Cmite"><td colspan="3"><div align="right">'; echo $lang['weeksum'].': '.$ges.'</div>'; echo $lang['wholevisitor'].' '.$gesBesucher.' '.$lang['max'].' '.$max_in.'<br /><br />'; echo '</td></tr></table></td></tr></table><br />'; $design->footer(); ?>
function mysqlDbSize( $database ) { $sql = "SHOW TABLE STATUS FROM " . $database; $result = @db_query( $sql ); $dbSize = 0; while( ( $row = @db_fetch_assoc( $result, MYSQL_ASSOC ) ) == true ){ $dbSize += $row["Data_length"] + $row["Index_length"]; } return $dbSize; }
<tr class='Cmite'> <td>Größe der Datenbank:</td> <td>".mysqlDbSize(DBDATE)."</td> </tr>
<tr class='Cmite'> <td>Größe der Datenbank:</td> <td>".nicebytes(mysqlDbSize(DBDATE))."</td> </tr>
function nicebytes($bytes){ if ($bytes<1000000) { return round($bytes/1024,2).' KB'; } else { return round($bytes/(1024*1024),2).' MB'; } }
Geschlossen | ||
Zurück zu Plauder Ecke |