Location: PHPKode > projects > Astanda Open Directory Project > adp-1.3b/admin/main.php
<?php
//-------------------------------------------------//
//                                                 //
//        ASTANDA DIRECTORY PROJECT  [ADP]         //
//                  Version 1.3b                   //
//               License: SHAREWARE                //
//             http://www.astanda.com              //
//      © Copyright 2005, 2006, Pavel Golovko      //
//                                                 //
//-------------------------------------------------//
//                                                 //
// Any attempt to remove or alter "Powered by ADP" //
// recip link will automatically wave your rights  //
// to any use of ADP software!                     //
//                                                 //
// Reverse engineering and redistribution of       //
// ADP code or any part of its code is strictly    //
// prohibited!                                     //
//                                                 //
//-------------------------------------------------//
//                                                 //
// ADP is distributed in the hope that it will be  //
// useful, but WITHOUT ANY WARRANTY; without even  //
// the implied warranty of MERCHANTABILITY or      //
// FITNESS FOR A PARTICULAR PURPOSE.               //
//                                                 //
//-------------------------------------------------//

menu($adp); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td width="40%" valign="top"><font size="2"> <? if(cfg("admin_stats") == "1"){ $result = mysql_query("SELECT COUNT(`id`) FROM `categories`"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $cats_total = $row[0]; } } $result = mysql_query("SELECT COUNT(`id`) FROM `categories` WHERE `parent` = '0'"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $cats_main = $row[0]; } $cats_sub = $cats_total - $cats_main; } ?> Main categories: <?=$cats_main?><br> Sub categories: <?=$cats_sub?><br> Total categories: <?=$cats_total?><p> <? $result = mysql_query("SELECT COUNT(`id`) FROM `links`"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $links_total = $row[0]; } } $result = mysql_query("SELECT COUNT(`id`) FROM `links` WHERE `recip` = '0'"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $links_nonrecip = $row[0]; } $links_recip = $links_total - $links_nonrecip; } } $result = mysql_query("SELECT COUNT(`id`) FROM `new_links`"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $new_links = $row[0]; } } else{ $new_links = "0"; } if(cfg("admin_stats") == "1"){ ?> <a href="index.php?adp=links&action=main&orderby=recip&how=DESC">Recip links: <?=$links_recip?></a><br> <a href="index.php?adp=links&action=main&orderby=recip&how=ASC">Non-Recip links: <?=$links_nonrecip?></a><br> Total links: <?=$links_total?><br> <? } ?> <a href="index.php?adp=links&action=approve">New links waiting approval: <?=$new_links?></a><p> <? if(cfg("admin_stats") == "1"){ $result = mysql_query("SELECT COUNT(`id`) FROM `pages`"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $pages_total = $row[0]; } } $result = mysql_query("SELECT COUNT(`id`) FROM `pages` WHERE `recip` = '1'"); echo mysql_error(); $pages_recip = 0; if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $pages_recip = $row[0]; } $pages_nonrecip = $pages_total - $pages_recip; } ?> <a href="index.php?adp=pages&action=main&orderby=recip&how=DESC">Recip pages: <?=$pages_recip?></a><br> <a href="index.php?adp=pages&action=main&orderby=recip&how=ASC">Non-Recip pages: <?=$pages_nonrecip?></a><br> Total pages: <?=$pages_total?><p> <? $banned_num = 0; $result = mysql_query("SELECT COUNT(`id`) FROM `banned`"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $banned_num = $row[0]; } } $bad_keywords = 0; $result = mysql_query("SELECT COUNT(`id`) FROM `bad_keywords`"); echo mysql_error(); if(mysql_num_rows($result)){ while($row = mysql_fetch_array($result)){ $bad_keywords = $row[0]; } } ?> <a href="index.php?adp=banned&action=main">Banned URLs: <?=$banned_num?></a><br> <a href="index.php?adp=banned&action=keywords">Banned Keywords: <?=$bad_keywords?></a> </td><td bgcolor="#008000"><img border="0" src="images/pixel.png" width="1" height="1"></td><td><img border="0" src="images/pixel.png" width="10" height="1"></td><td width="90%" valign="top"><font size="2"> <? $total_size = 0; $result = mysql_query("SHOW TABLE STATUS FROM `$database`"); while($array = mysql_fetch_array($result)) { $total = $array['Data_length']+$array['Index_length']; print "Table: ".$array['Name']."<br />"; print "Last Update: ".$array['Update_time']."<br />"; print "Data Size: ".$array['Data_length']." bytes<br />"; print "Index Size: ".$array['Index_length']." bytes<br />"; print "Total Size: ".$total." bytes<br />"; $total_size = $total_size + $total; print "Total Rows: ".$array['Rows']."<br />"; print "Average Size Per Row: ".$array['Avg_row_length']." bytes<p>"; } print "Total database size: ".$total_size." bytes<p>"; } ?> </td></tr></table> <? 
?>
Return current item: Astanda Open Directory Project