- md5
- 187ae8bc9e7acea5624256ccf15b1481
- sha1
- b56eac2d71f50aff888c729ec49de9b8ee86f6ff
- sha256
- 6f83ece41b5098fd966855a983d684786e3642ded1244aa8ee0da084815e8a49
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
<?php
/**
* @version $Id: admin.statistics.html.php 10002 2008-02-08 10:56:57Z willebil $
* @package Joomla
* @subpackage Statistics
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
/**
* @package Joomla
* @subpackage Statistics
*/
class HTML_statistics {
function show( &$browsers, &$platforms, $tldomains, $bstats, $pstats, $dstats, $sorts, $option ) {
global $mosConfig_live_site;
$tab = mosGetParam( $_REQUEST, 'tab', 'tab1' );
$width = 400; // width of 100%
$tabs = new mosTabs(1);
?>
<style type="text/css">
.bar_1{ background-color: #8D1B1B; border: 2px ridge #B22222; }
.bar_2{ background-color: #6740E1; border: 2px ridge #4169E1; }
.bar_3{ background-color: #8D8D8D; border: 2px ridge #D2D2D2; }
.bar_4{ background-color: #CC8500; border: 2px ridge #FFA500; }
.bar_5{ background-color: #5B781E; border: 2px ridge #6B8E23; }
</style>
<table class="adminheading">
<tr>
<th class="browser">Browser, OS, Domain Statistics</th>
</tr>
</table>
<form action="index2.php" method="post" name="adminForm">
<?php
$tabs->startPane("statsPane");
$tabs->startTab("Browsers","browsers-page");
?>
<table class="adminlist">
<tr>
<th align="left"> Browser <?php echo $sorts['b_agent'];?></th>
<th> </th>
<th width="100" align="left">% <?php echo $sorts['b_hits'];?></th>
<th width="100" align="left">#</th>
</tr>
<?php
$c = 1;
if (is_array($browsers) && count($browsers) > 0) {
$k = 0;
foreach ($browsers as $b) {
$f = $bstats->totalhits > 0 ? $b->hits / $bstats->totalhits : 0;
$w = $width * $f;
?>
<tr class="row<?php echo $k;?>">
<td width="200" align="left">
<?php echo $b->agent; ?>
</td>
<td align="left" width="<?php echo $width+10;?>">
<div align="left"> <img src="<?php echo $mosConfig_live_site; ?>/components/com_poll/images/blank.png" class="bar_<?php echo $c; ?>" height="6" width="<?php echo $w; ?>"></div>
</td>
<td align="left">
<?php printf( "%.2f%%", $f * 100 );?>
</td>
<td align="left">
<?php echo $b->hits;?>
</td>
</tr>
<?php
$c = $c % 5 + 1;
$k = 1 - $k;
}
}
?>
<tr>
<th colspan="4"> </th>
</tr>
</table>
<?php
$tabs->endTab();
$tabs->startTab("OS Stats","os-page");
?>
<table class="adminlist">
<tr>
<th align="left"> Operating System <?php echo $sorts['o_agent'];?></th>
<th> </th>
<th width="100" align="left">% <?php echo $sorts['o_hits'];?></th>
<th width="100" align="left">#</th>
</tr>
<?php
$c = 1;
if (is_array($platforms) && count($platforms) > 0) {
$k = 0;
foreach ($platforms as $p) {
$f = $pstats->totalhits > 0 ? $p->hits / $pstats->totalhits : 0;
$w = $width * $f;
?>
<tr class="row<?php echo $k;?>">
<td width="200" align="left">
<?php echo $p->agent; ?>
</td>
<td align="left" width="<?php echo $width+10;?>">
<div align="left"> <img src="<?php echo $mosConfig_live_site; ?>/components/com_poll/images/blank.png" class="bar_<?php echo $c; ?>" height="6" width="<?php echo $w; ?>"></div>
</td>
<td align="left">
<?php printf( "%.2f%%", $f * 100 );?>
</td>
<td align="left">
<?php echo $p->hits;?>
</td>
</tr>
<?php
$c = $c % 5 + 1;
$k = 1 - $k;
}
}
?>
<tr>
<th colspan="4"> </th>
</tr>
</table>
<?php
$tabs->endTab();
$tabs->startTab("Domain Stats","domain-page");
?>
<table class="adminlist">
<tr>
<th align="left"> Domain <?php echo $sorts['d_agent'];?></th>
<th> </th>
<th width="100" align="left">% <?php echo $sorts['d_hits'];?></th>
<th width="100" align="left">#</th>
</tr>
<?php
$c = 1;
if (is_array($tldomains) && count($tldomains) > 0) {
$k = 0;
foreach ($tldomains as $b) {
$f = $dstats->totalhits > 0 ? $b->hits / $dstats->totalhits : 0;
$w = $width * $f;
?>
<tr class="row<?php echo $k;?>">
<td width="200" align="left">
<?php echo $b->agent; ?>
</td>
<td align="left" width="<?php echo $width+10;?>">
<div align="left"> <img src="<?php echo $mosConfig_live_site; ?>/components/com_poll/images/blank.png" class="bar_<?php echo $c; ?>" height="6" width="<?php echo $w; ?>"></div>
</td>
<td align="left">
<?php printf( "%.2f%%", $f * 100 );?>
</td>
<td align="left">
<?php echo $b->hits;?>
</td>
</tr>
<?php
$c = $c % 5 + 1;
$k = 1 - $k;
}
}
?>
<tr>
<th colspan="4"> </th>
</tr>
</table>
<?php
$tabs->endTab();
$tabs->endPane();
?>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="tab" value="<?php echo $tab;?>" />
<input type="hidden" name="<?php echo josSpoofValue(); ?>" value="1" />
</form>
<?php
}
function pageImpressions( &$rows, $pageNav, $option, $task ) {
?>
<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminheading">
<tr>
<th width="100%" class="impressions">Page Impression Statistics</th>
</tr>
</table>
<form action="index2.php" method="post" name="adminForm">
<table class="adminlist">
<tr>
<th style="text-align:right">#</th>
<th class="title">Title</th>
<th align="center" nowrap="nowrap">Page Impressions</th>
</tr>
<?php
$i = $pageNav->limitstart;
$k = 0;
foreach ($rows as $row) {
?>
<tr class="row<?php echo $k;?>">
<td align="right">
<?php echo ++$i; ?>
</td>
<td align="left">
<?php echo $row->title." (".$row->created.")"; ?>
</td>
<td align="center">
<?php echo $row->hits; ?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="<?php echo $task;?>" />
<input type="hidden" name="<?php echo josSpoofValue(); ?>" value="1" />
</form>
<?php
}
function showSearches( &$rows, $pageNav, $option, $task, $showResults ) {
global $mainframe;
mosCommonHTML::loadOverlib();
?>
<form action="index2.php" method="post" name="adminForm">
<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminheading">
<tr>
<th class="searchtext">
Search Engine Text :
<span class="componentheading">logging is :
<?php echo $mainframe->getCfg( 'enable_log_searches' ) ? '<b><font color="green">Enabled</font></b>' : '<b><font color="red">Disabled</font></b>' ?>
</span>
</th>
<td align="right">
<?php
if ( !$showResults ) {
echo mosWarning('Activating this can dramatically slow and even lock your site as it is a highly query intensive operation');
}
?>
</td>
<td align="right">
<?php
if ( $showResults ) {
?>
<input name="search_results" type="button" class="button" value="Hide Search Results" onclick="submitbutton('searches');">
<?php
} else {
?>
<input name="search_results" type="button" class="button" value="Show Search Results" onclick="submitbutton('searchesresults');">
<?php
}
?>
</td>
</tr>
</table>
<table class="adminlist">
<tr>
<th style="text-align:right" width="10">
#
</th>
<th class="title">
Search Text
</th>
<th nowrap="nowrap">
Times Requested
</th>
<?php
if ( $showResults ) {
?>
<th nowrap="nowrap">
Results Returned
</th>
<?php
}
?>
</tr>
<?php
$k = 0;
for ($i=0, $n = count($rows); $i < $n; $i++) {
$row =& $rows[$i];
?>
<tr class="row<?php echo $k;?>">
<td align="right">
<?php echo $i+1+$pageNav->limitstart; ?>
</td>
<td align="left">
<?php echo $row->search_term;?>
</td>
<td align="center">
<?php echo $row->hits; ?>
</td>
<?php
if ( $showResults ) {
?>
<td align="center">
<?php echo $row->returns; ?>
</td>
<?php
}
?>
</tr>
<?php
$k = 1 - $k;
}
?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="<?php echo $task;?>" />
<input type="hidden" name="<?php echo josSpoofValue(); ?>" value="1" />
</form>
<?php
}
}
?>
The same content is in 2 releases, Joomla 1.0.14 to 1.0.15. See them all, or every version of this file.