1
|
<?php
|
2
|
/*
|
3
|
getstats.php
|
4
|
Copyright (C) 2009 Bill Marquette
|
5
|
All rights reserved.
|
6
|
|
7
|
Redistribution and use in source and binary forms, with or without
|
8
|
modification, are permitted provided that the following conditions are met:
|
9
|
|
10
|
1. Redistributions of source code must retain the above copyright notice,
|
11
|
this list of conditions and the following disclaimer.
|
12
|
|
13
|
2. Redistributions in binary form must reproduce the above copyright
|
14
|
notice, this list of conditions and the following disclaimer in the
|
15
|
documentation and/or other materials provided with the distribution.
|
16
|
|
17
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
18
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
19
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
20
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
21
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
22
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
23
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
24
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
25
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
26
|
POSSIBILITY OF SUCH DAMAGE.
|
27
|
*/
|
28
|
/*
|
29
|
pfSense_MODULE: ajax
|
30
|
*/
|
31
|
|
32
|
##|+PRIV
|
33
|
##|*IDENT=page-getstats
|
34
|
##|*NAME=AJAX: Get Stats
|
35
|
##|*DESCR=Allow access to the 'AJAX: Get Stats' page.
|
36
|
##|*MATCH=getstats.php*
|
37
|
##|-PRIV
|
38
|
|
39
|
header("Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" );
|
40
|
header("Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT" );
|
41
|
header("Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1
|
42
|
header("Cache-Control: post-check=0, pre-check=0", FALSE );
|
43
|
header("Pragma: no-cache"); // HTTP/1.0
|
44
|
|
45
|
require_once("guiconfig.inc");
|
46
|
include_once("includes/functions.inc.php");
|
47
|
|
48
|
echo get_stats();
|
49
|
|
50
|
?>
|