forked from intelliants/elitius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
statistics.php
executable file
·50 lines (42 loc) · 1.59 KB
/
statistics.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/***************************************************************************
*
* PROJECT: eLitius Open Source Affiliate Software
* VERSION: 1.0
* LISENSE: GNU GPL (http://www.opensource.org/licenses/gpl-license.html)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* Link to eLitius.com can not be removed from the software pages without
* permission of the eLitius respective owners. It is the only requirement
* for using this software.
*
* Copyright 2009 Intelliants LLC
* http://www.intelliants.com/
*
***************************************************************************/
$gProtected = TRUE;
require_once('header.php');
$title = $gXpLang['site_title'].' - '.$gXpLang['general_statistics'];
$traffic['visits'] = $aff['hits'];
$traffic['visitors'] = $gXpDb->getVisitorsCount($aff);
$traffic['sales'] = $gXpDb->getSalesCount($aff);
if ($traffic['sales'] && $traffic['visits'])
{
$traffic['ratio'] = format($traffic['sales'] / $traffic['visits'] * 100);
}
else
{
$traffic['ratio'] = "0.000";
}
$description = $gXpLang['desc_statistics'];
$keywords = $gXpLang['keyword_statistics'];
$gXpSmarty->assign_by_ref('description', $description);
$gXpSmarty->assign_by_ref('keywords', $keywords);
$gXpSmarty->assign_by_ref('xproot', $gXpConfig['xpurl']);
$gXpSmarty->assign_by_ref('title', $title);
$gXpSmarty->assign_by_ref('traffic', $traffic);
$gXpSmarty->display("general-statistics.tpl");
?>