| ".$lang['admin']['stats_rank']." |
".$lang['admin']['stats_search_word']." |
".$lang['admin']['stats_searches']." |
".sprintf($lang['admin']['stats_percent_total'],$totalHits[0]['totalHits'])." |
\n";
for ($i=0; $i<$noResults; $i++){
$cellColor = cellColor($i);
$percentage = 100*($results[$i]['hits'] / $totalHits[0]['totalHits']);
$percentage = number_format($percentage,2);
$position = (($page*$rowsPerPage)+1)+$i;
$chartData[] = array($position,$percentage);
$keyStr .= "
| ".$position." |
".ucfirst(strtolower($results[$i]['searchstr']))." |
".$results[$i]['hits']." |
".$percentage."% |
\n";
}
$keyStr .= "
";
$imageNo++;
$filename = md5(CC_ROOT_DIR.$glob['license_key'].$imageNo).".png";
$graph = new PHPlot;
$graph->SetIsInline(true);
$graph->SetPlotType('bars');
$graph->SetNumXTicks(1);
$graph->SetSkipRightTick(true);
$graph->SetSkipLeftTick(true);
$graph->SetPlotAreaWorld(null, 0, null, 100);
$graph->PHPlot(550,300,"cache".CC_DS.$filename);
$graph->SetDataValues($chartData);
$graph->SetXLabelAngle('0');
$graph->SetTitle($lang['admin']['stats_search_terms']." (".(($page*$rowsPerPage)+1)." - ".(($page*$rowsPerPage) + $noResults).")");
$graph->SetXTitle($lang['admin']['stats_search_term_key']);
$graph->SetYTitle($lang['admin']['stats_percent']);
$graph->DrawGraph();
echo "