Source for file stat.count_table.php
Documentation is available at stat.count_table.php
* @desc Statistica di default sul popolamento delle tabelle del database
* @author Mario Marcello Verona <marcelloverona@gmail.com>
* @copyright 2007 Mario Marcello Verona
* @license http://www.gnu.org/licenses/gpl.html GNU Public License
require_once("../inc/conn.php");
require_once("../inc/layouts.php");
require_once("../inc/func.stat.php");
require_once("./stat.graph.php");
// PRENDI TUTTE LE TABELLE e le viste
$sql_tab= "SELECT t1.table_name, t1.table_type
FROM {$db1['frontend']}.registro_tab t1
ORDER BY t1.table_type, t1.table_name";
$nome_file_img= 'tab_count';
$nome_file_viste_img= 'view_count';
if($RS['table_type']== 'BASE TABLE'){
$tabella[$i]= $RS['table_name'];
$q_count= vmsql_query("SELECT count(*) FROM ". $RS['table_name'],$link);
$scala = ($count_tabella[$i]> $scala) ? $count_tabella[$i]: $scala;
$vista[$v]= $RS['table_name'];
$q_count_v= vmsql_query("SELECT count(*) FROM ". $RS['table_name'],$link);
$scala_vista = ($count_vista[$v]> $scala) ? $count_vista[$v]: $scala_vista;
// GRAFICO E TABELLA PER LE TABELLE
$altezza_grafico_t = (($stima_altezza_t)< 280) ? 280: $stima_altezza_t;
$grafico = barre($count_tabella,$tabella,$scala,'Popolamento tabelle',$nome_file_img,540,$altezza_grafico_t,array('red','orange'),165,'%d','ivory');
$OUT.= "<table summary=\"cont\" class=\"tab-cont\">\n<tr>";
$OUT.= "<td><img src=\"". FRONT_DOCROOT. "/tmp/$nome_file_img.png\" alt=\"test\" class=\"img-stat\" /></td>\n";
$OUT.= "<td>". stat_tabella($tabella,$count_tabella) . "</td>";
// GRAFICO E TABELLA PER LE VISTE
$altezza_grafico_v = (($stima_altezza_v)< 220) ? 220: $stima_altezza_v;
$grafico2 = barre($count_vista,$vista,$scala_v,'Popolamento viste',$nome_file_viste_img,540,$altezza_grafico_v,array('green','yellowgreen'),165,'%d','ivory');
$OUT.= "<table summary=\"cont\" class=\"tab-cont\">\n<tr>";
$OUT.= "<td><img src=\"". FRONT_DOCROOT. "/tmp/$nome_file_viste_img.png\" alt=\"dati popolamento\" class=\"img-stat\" /></td>\n";
$files= array("sty/stat.css");
echo "<div id=\"briciole\"><a href=\"../admin/index.php\">home amministrazione</a> » <a href=\"index.php\">statistiche</a> » popolamento tabelle </div>\n";
echo "<h1>Dati popolamento tabelle</h1>\n";
|