[ Index ] |
|
Code source de Cr@wltr@ck 2.2.1 |
1 <?php 2 //---------------------------------------------------------------------- 3 // CrawlTrack 2.2.1 4 //---------------------------------------------------------------------- 5 // Crawler Tracker for website 6 //---------------------------------------------------------------------- 7 // Author: Jean-Denis Brun 8 //---------------------------------------------------------------------- 9 // Website: www.crawltrack.fr 10 //---------------------------------------------------------------------- 11 // That script is distributed under GNU GPL license 12 //---------------------------------------------------------------------- 13 // file: admindatabase.php 14 //---------------------------------------------------------------------- 15 16 if (!defined('IN_CRAWLT_ADMIN')) 17 { 18 echo"<h1>Hacking attempt !!!!</h1>"; 19 exit(); 20 } 21 22 23 $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword); 24 $selection = mysql_select_db($crawltdb); 25 26 $requete = mysql_query("show table status",$connexion); 27 28 29 echo "<h1>".$language['database_size']."</h1>\n"; 30 31 //summary table display 32 echo"<div class='tableau' align='center' onmouseout=\"javascript:montre();\">\n"; 33 echo"<table cellpadding='0px' cellspacing='0' width='550px'>\n"; 34 echo"<tr><th class='tableau1' >\n"; 35 echo"".$language['table_name']."\n"; 36 echo"</th>\n"; 37 echo"<th class='tableau1'>\n"; 38 echo"".$language['nbr_of_data']."\n"; 39 echo"</th>\n"; 40 echo"<th class='tableau2'>\n"; 41 echo"".$language['table_size']."\n"; 42 echo"</th></tr>\n"; 43 44 //counter for alternate color lane 45 $comptligne=2; 46 47 $tablesize = 1024; 48 $databasesize = 0; 49 50 while($result = mysql_fetch_assoc($requete)) 51 { 52 if ($comptligne%2 ==0) 53 { 54 echo"<tr><td class='tableau3'>".$result['Name']."</td>\n"; 55 echo"<td class='tableau3'>".numbdisp($result['Rows'])."</td>\n"; 56 $tablesize=($tablesize+$result['Data_length'])/1024; 57 $databasesize+=$tablesize; 58 echo"<td class='tableau5'>".numbdisp(round($tablesize))." KB</td></tr>\n"; 59 } 60 else 61 { 62 echo"<tr><td class='tableau30'>".$result['Name']."</td>\n"; 63 echo"<td class='tableau30'>".numbdisp($result['Rows'])."</td>\n"; 64 $tablesize=($tablesize+$result['Data_length'])/1024; 65 $databasesize+=$tablesize; 66 echo"<td class='tableau50'>".numbdisp(round($tablesize))." KB</td></tr>\n"; 67 } 68 $comptligne++; 69 } 70 71 if ($comptligne%2 ==0) 72 { 73 echo"<tr><td class='tableau3d' colspan='2'><b>".$language['total']."</b></td>\n"; 74 echo"<td class='tableau5'><b>".numbdisp(round($databasesize))." KB</b></td></tr>\n"; 75 } 76 else 77 { 78 echo"<tr><td class='tableau30d' colspan='2'><b>".$language['total']."</b></td>\n"; 79 echo"<td class='tableau50'><b>".numbdisp(round($databasesize))." KB</b></td></tr>\n"; 80 } 81 82 echo"</table></div><br><br>\n"; 83 84 85 86 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Sep 6 14:14:11 2007 | par Balluche grâce à PHPXref 0.7 |