root/trunk/wifidog-auth/wifidog/admin/stats_show_graph.php @ 942

Revision 942, 3.1 KB (checked in by benoitg, 7 years ago)

Fix a bunch of file inclusion bugs in the statistics subsystem.

This is only a ad-hac fix. It seems the requires for just about every class have been stripped off.
This must be fixed, all classes should require_once all classes or include that they need that isn't
included by a parent class.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2
3/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5// +-------------------------------------------------------------------+
6// | WiFiDog Authentication Server                                     |
7// | =============================                                     |
8// |                                                                   |
9// | The WiFiDog Authentication Server is part of the WiFiDog captive  |
10// | portal suite.                                                     |
11// +-------------------------------------------------------------------+
12// | PHP version 5 required.                                           |
13// +-------------------------------------------------------------------+
14// | Homepage:     http://www.wifidog.org/                             |
15// | Source Forge: http://sourceforge.net/projects/wifidog/            |
16// +-------------------------------------------------------------------+
17// | This program is free software; you can redistribute it and/or     |
18// | modify it under the terms of the GNU General Public License as    |
19// | published by the Free Software Foundation; either version 2 of    |
20// | the License, or (at your option) any later version.               |
21// |                                                                   |
22// | This program is distributed in the hope that it will be useful,   |
23// | but WITHOUT ANY WARRANTY; without even the implied warranty of    |
24// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     |
25// | GNU General Public License for more details.                      |
26// |                                                                   |
27// | You should have received a copy of the GNU General Public License |
28// | along with this program; if not, contact:                         |
29// |                                                                   |
30// | Free Software Foundation           Voice:  +1-617-542-5942        |
31// | 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        |
32// | Boston, MA  02111-1307,  USA       gnu@gnu.org                    |
33// |                                                                   |
34// +-------------------------------------------------------------------+
35
36/**
37 * Selects the class for which a graph is to be displayed.
38 *
39 * Parameters: $_REQUEST['graph_class']:
40 * - the name of the class for which we want the graph displayed.
41 *
42 * @package    WiFiDogAuthServer
43 * @author     Philippe April
44 * @copyright  2005-2006 Philippe April
45 * @version    Subversion $Id$
46 * @link       http://www.wifidog.org/
47 */
48require_once ('../include/path_defines_base.php');
49
50if (empty($_REQUEST['graph_class'])) {
51    echo "You must specify the class of the graph you want";
52} else {
53    $classname = $_REQUEST['graph_class'];
54
55    /**
56     * Load requested statistics file
57     */
58    require_once('classes/StatisticGraph/' . $classname . '.php');
59
60    $graph = call_user_func(array ($classname, 'getObject'), $classname);
61    $graph->showImageData();
62}
63
64/*
65 * Local variables:
66 * tab-width: 4
67 * c-basic-offset: 4
68 * c-hanging-comment-ender-p: nil
69 * End:
70 */
71
72?>
Note: See TracBrowser for help on using the browser.