<?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
+--------------------------------------------------------------------------
*/
?>
<div>
<div style="margin-bottom: 2px;color: #666666;">
<h3><?php echo ST_MSG_SEARCH_TRAFIC_T; ?></h3>
</div>
<?php
require "./menu.php";
define("_TEMP_WEBID",$web);
$report = readDatabaseII("report-searchengine.php");
if ($report != '')
{
define('SE_GOOGLE',1);
define('SE_YAHOO',2);
define('SE_MSN',3);
arsort($report["day"]["x".SE_GOOGLE]);
arsort($report["month"]["x".SE_GOOGLE]);
arsort($report["total"]["x".SE_GOOGLE]);
arsort($report["day"]["x".SE_YAHOO]);
arsort($report["month"]["x".SE_YAHOO]);
arsort($report["total"]["x".SE_YAHOO]);
arsort($report["day"]["x".SE_MSN]);
arsort($report["month"]["x".SE_MSN]);
arsort($report["total"]["x".SE_MSN]);
?>
<?php
$wordsArray1 = $report["day"]["x".SE_GOOGLE];
$wordsArray2 = $report["day"]["x".SE_YAHOO];
$wordsArray3 = $report["day"]["x".SE_MSN];
$wordsArray4 = $report["month"]["x".SE_GOOGLE];
$wordsArray5 = $report["month"]["x".SE_YAHOO];
$wordsArray6 = $report["month"]["x".SE_MSN];
$wordsArray7 = $report["total"]["x".SE_GOOGLE];
$wordsArray8 = $report["total"]["x".SE_YAHOO];
$wordsArray9 = $report["total"]["x".SE_MSN];
$total1 = $report["count"]["day"]["x".SE_GOOGLE];
$total2 = $report["count"]["day"]["x".SE_YAHOO];
$total3 = $report["count"]["day"]["x".SE_MSN];
$total = $total1+$total2+$total3;
if ($total==0) $total = 1;
if ($total!=0)
{
$content [0]['value']= $total1/$total*100;
$content [1]['value']= $total2/$total*100;
$content [2]['value']= $total3/$total*100;
$content [0]['color']= $color[0][0];
$content [1]['color']= $color[1][0];
$content [2]['color']= $color[2][0];
}
$total1 = $report["count"]["month"]["x".SE_GOOGLE];
$total2 = $report["count"]["month"]["x".SE_YAHOO];
$total3 = $report["count"]["month"]["x".SE_MSN];
$total = $total1+$total2+$total3;
if ($total==0) $total = 1;
if ($total!=0)
{
$content1 [0]['value']= $total1/$total*100;
$content1 [1]['value']= $total2/$total*100;
$content1 [2]['value']= $total3/$total*100;
$content1 [0]['color']= $color[0][0];
$content1 [1]['color']= $color[1][0];
$content1 [2]['color']= $color[2][0];
}
$total1 = $report["count"]["total"]["x".SE_GOOGLE];
$total2 = $report["count"]["total"]["x".SE_YAHOO];
$total3 = $report["count"]["total"]["x".SE_MSN];
$total = $total1+$total2+$total3;
if ($total==0) $total = 1;
if ($total!=0)
{
$content2 [0]['value']= $total1/$total*100;
$content2 [1]['value']= $total2/$total*100;
$content2 [2]['value']= $total3/$total*100;
$content2 [0]['color']= $color[0][0];
$content2 [1]['color']= $color[1][0];
$content2 [2]['color']= $color[2][0];
}
function showtr($title,$wordsArray,$color, $interval = 0, $maxshow = 100)
{
global $dbConnection;
$count = 0;
foreach ($wordsArray as $item => $value)
$count += $value;
echo ' <tr>';
echo ' <td>';
echo ' <table class="tableresume" width="100%">';
echo ' <tr><td colspan=4><table cellspacing="0" cellpadding="0" width="100%"><tr><td width="1%" style="padding-right:2px;" bgcolor="#'.$color.'"></td><td class="tdhead" colspan="3">'.$title.' ('.$count.')'.'</td></tr></table></td></tr>';
foreach ($wordsArray as $item => $value)
{
if ($i % 2 == 0)
echo '<tr class="tr1">';
else
echo '<tr class="tr2">';
echo '<td colspan="3" >'.myiconv2(urldecode(substr($item,1))).'</td><td width=1%>'.$value.'</td></tr>';
}
echo ' </table>';
echo ' </td> ';
echo ' </tr>';
}
?>
<table class="tableresume" width="600">
<tr><td colspan="3" class="tdheadslow"><?php echo ST_MSG_SEARCH_TRAFFIC_GRAPHICS; ?></td></tr>
<tr>
<td colspan=3><table><tr><td>
<table class="tableresume" width="198">
<tr><td class="tdhead" width="33%"><?php echo ST_MSG_TODAY; ?></td></tr>
<tr><td><?php echo ChartPie($content, 100,'','','',true);?></td></tr>
</table>
</td>
<td>
<table class="tableresume" width="198" height="110">
<tr><td class="tdhead" width="33%"><?php echo ST_MSG_MONTH; ?></td></tr>
<tr><td><?php echo VP_UPGRADE; ?><br /><br /><br /></td></tr>
</table>
</td>
<td>
<table class="tableresume" width="198" height="110">
<tr><td class="tdhead" width="33%"><?php echo ST_MSG_TOTALS; ?></td></tr>
<tr><td><?php echo VP_UPGRADE; ?><br /><br /><br /></td></tr>
</table></td></tr></table>
</td>
</tr>
<?php
echo '<tr><td colspan="4"> </td></tr>';
echo '<tr><td colspan="3" class="tdheadslow">'.ST_MSG_SEARCH_TRAFFIC_TODAY.'</td></tr>';
showtr('Google',$wordsArray1,$color[0][0]);
showtr('Bing',$wordsArray2,$color[1][0]);
showtr('Yahoo',$wordsArray3,$color[2][0]);
echo '<tr><td colspan="4"> </td></tr>';
echo '<tr><td colspan="3" class="tdheadslow">'.ST_MSG_SEARCH_TRAFFIC_MONTH.'</td></tr>';
echo '<tr><td>'.VP_UPGRADE.'</td></tr>';
echo '<tr><td colspan="4"> </td></tr>';
echo '<tr><td colspan="3" class="tdheadslow">'.ST_MSG_SEARCH_TRAFFIC_TOTALS.'</td></tr>';
echo '<tr><td>'.VP_UPGRADE.'</td></tr>';
echo '<tr><td colspan="4"> </td></tr>';
?>
</table>
<?php } ?>
</div>