<?php
/*
+--------------------------------------------------------------------------
| D4WStatsLittle v1.1.2 - Developers4Web Web Stats Software
| ==========================================================
| by Developers4Web.com
| D4WStatsLittle is a Trade Mark of Developers4Web
| Copyright Developers4Web 2005 - 2006. All rights reserved.
| English:
| http://stats-service.developers4web.com
| Español:
| http://www.developers4web.com
| ========================================
| optimized by Trio Solutions
| Dreamweaver Extensions and Web Development Components
| English:
| http://components.developers4web.com
| Español:
| http://componentes.developers4web.com
| ========================================
| Web: http://www.d4wstats.com
| Date: Tuesday, February 20, 2006
| Email: info (at) developers4web (dot) com
| License Type: D4WSTATSLITTLE is NOT Open Source Software and Limitations Apply
| Licence Info: /d4wstatslittle/license.txt
+--------------------------------------------------------------------------
*/
?>
<?php
function ChartPie($content, $width, $imagename,$title,$page,$goo=false)
{
global $color;
$querystring = "";
for ($i = 0; $i < count($content); $i++)
$querystring .= "&i".$i."=".$content[$i]['value'];
$querystring = "?c=".count($content).$querystring;
if ($goo)
$querystring .= "&goo=1";
return '<img align="center" src="reportes/tools/piechart.php'.$querystring.'" width="152" height="85" />';
}
function ChartColumn2($content, $width, $height,$title)
{
$str .= "<table width=\"".$width."\" height=\"".$height."\" border=\"0\" class=\"cajastext\" cellpadding=\"0\" cellspacing=\"0\">";
$str .= "<tr>";
$h = 100 - ($content[0]['value']*$height);
for ($i = 0; $i < count($content); $i++)
{
if ($h > 100 - ($content[$i]['value']*$height))
{
$h = 100 - ($content[$i]['value']*$height);
}
$str .= "<td width=\"3\" valign=\"top\" bgcolor=\"#ffffff\"><img src=\"/imagenes/white.gif\" width=\"3\" height=\"".round(($h*$height/100),0)."\" /></td>";
$h = 100 - ($content[$i]['value']*$height);
$str .= "<td width=\"1\" valign=\"top\" bgcolor=\"#000000\"><img src=\"/imagenes/white.gif\" width=\"1\" height=\"".round(($h*$height/100),0)."\" /></td>";
$str .= "<td width=\"".round(($width/count($content)),0)."\" valign=\"top\" bgcolor=\"#".$content[$i]['color']."\"><img src=\"/imagenes/white.gif\" width=\"".round(($width/count($content)),0)."\" height=\"".round(($h*$height/100),0)."\" /><img src=\"/imagenes/black.gif\" width=\"".round(($width/count($content)),0)."\" height=\"1\" /></td>";
$str .= "<td width=\"1\" valign=\"top\" bgcolor=\"#000000\"><img src=\"/imagenes/white.gif\" width=\"1\" height=\"".round(($h*$height/100),0)."\" /></td>";
}
$str .= "<td width=\"2\" valign=\"top\" bgcolor=\"#ffffff\"><img src=\"/imagenes/white.gif\" width=\"2\" height=\"".round(($h*$height/100),0)."\" /></td>";
$str .= "</tr>";
$str .= "</table>";
return $str;
}
function ChartColumn($content,$max,$count)
{
global $color;
$querystring = "";
for ($i = 0; $i < count($content); $i++)
$querystring .= ",".($content[$i]);
$querystring = "?w=570&h=200&c=".$count."&max=".$max."&x=".$querystring;
return '<img align="center" src="reportes/tools/column.php'.$querystring.'" width="598" height="210" />';
}
function ChartMultiColumn($content,$max,$count)
{
global $color;
$querystring = "";
for ($i = 0; $i < count($content); $i++)
$querystring .= ",".($content[$i][0]).",".($content[$i][1]).",".($content[$i][2]);
$querystring = "?w=570&h=200&c=".$count."&max=".$max."&x=".$querystring;
return '<img align="center" src="reportes/tools/multicolumn.php'.$querystring.'" width="598" height="210" />';
}
function ChartMultiColumnTwo($content,$max,$count)
{
global $color;
$color[1] = $color[2];
$querystring = "";
for ($i = 0; $i < count($content); $i++)
$querystring .= ",".($content[$i][0]).",".($content[$i][1]).",".($content[$i][2]);
$querystring = "?w=570&h=200&c=".$count."&max=".$max."&x=".$querystring;
return '<img align="center" src="reportes/tools/multicolumn.php'.$querystring.'" width="598" height="210" />';
}
?>