Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

refererlist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: refererlist.php 9639 2002-06-19 15:02:28Z br $
5 //
6 // Created on: <07-Jan-2001 16:13:21 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "classes/INIFile.php" );
28 $ini =& eZINI::instance( 'site.ini' );
29 $Language = $ini->variable( "eZStatsMain", "Language" );
30
31 // include_once( "classes/eztemplate.php" );
32 // include_once( "classes/ezdate.php" );
33 // include_once( "classes/ezlist.php" );
34
35 // include_once( "ezstats/classes/ezpageview.php" );
36 // include_once( "ezstats/classes/ezpageviewquery.php" );
37
38 $t = new eZTemplate( "kernel/ezstats/admin/" . $ini->variable( "eZStatsMain", "AdminTemplateDir" ),
39 "kernel/ezstats/admin/intl", $Language, "refererlist.php" );
40
41 $t->setAllStrings();
42
43 $t->set_file( "referer_page_tpl", "refererlist.tpl" );
44
45 $t->set_block( "referer_page_tpl", "referer_list_tpl", "referer_list" );
46 $t->set_block( "referer_list_tpl", "referer_tpl", "referer" );
47
48 if ( !isset( $Offset ) or !is_numeric( $Offset ) )
49 $Offset = 0;
50
51 if ( !isset( $ViewLimit ) or !is_numeric( $ViewLimit ) )
52 $ViewLimit = 20;
53
54 $latest =& eZPageViewQuery::topReferers( $ViewLimit, $ExcludeDomain, $Offset );
55 $ItemCount = eZPageViewQuery::topReferersCount( $ExcludeDomain );
56
57 $t->set_var( "item_start", $Offset + 1 );
58 $t->set_var( "item_end", $Offset + $ViewLimit );
59 $t->set_var( "item_count", $ItemCount );
60 $t->set_var( "item_limit", $ViewLimit );
61 $t->set_var( "exclude_domain", trim( $ExcludeDomain ) );
62
63 if ( count( $latest ) > 0 )
64 {
65 $i = 0;
66 foreach ( $latest as $referer )
67 {
68 if ( ( $i %2 ) == 0 )
69 $t->set_var( "bg_color", "bglight" );
70 else
71 $t->set_var( "bg_color", "bgdark" );
72
73 $t->set_var( "referer_domain", $referer["Domain"] );
74 $t->set_var( "referer_uri", $referer["URI"] );
75 $t->set_var( "page_view_count", $referer["Count"] );
76
77 $t->parse( "referer", "referer_tpl", true );
78 $i++;
79 }
80
81 eZList::drawNavigator( $t, $ItemCount, $ViewLimit, $Offset, "referer_list_tpl" );
82 $t->parse( "referer_list", "referer_list_tpl" );
83 }
84 else
85 {
86 $t->set_var( "referer_list", "" );
87 }
88
89 $t->set_var( "view_mode", $ViewMode );
90 $t->set_var( "view_limit", $ViewLimit );
91
92 $t->pparse( "output", "referer_page_tpl" );
93
94 ?>
$referer
$referer
Definition: account_static.php:8
$i
$i
Definition: admin/adlist.php:91
eZList\drawNavigator
static drawNavigator(&$t, $total_types, $max_types, $index, $parent=false, $variables=false)
Definition: ezlist.php:401
eZPageViewQuery\topReferers
static & topReferers( $limit=40, $excludeDomain="", $offset=0)
Definition: ezpageviewquery.php:290
eZPageViewQuery\topReferersCount
static & topReferersCount( $excludeDomain="")
Definition: ezpageviewquery.php:325
eZTemplate
Definition: eztemplate.php:107
$Offset
$Offset
Definition: ezarticle/user/search.php:110
$latest
$latest
Definition: refererlist.php:54
$t
$t
Definition: refererlist.php:38
$Language
$Language
Definition: refererlist.php:29
$ini
$ini
Definition: refererlist.php:28
$ItemCount
$ItemCount
Definition: refererlist.php:55
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.