diff options
Diffstat (limited to 'graph.php')
-rw-r--r-- | graph.php | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -2,26 +2,20 @@ | |||
2 | 2 | ||
3 | require_once 'conf/common.inc.php'; | 3 | require_once 'conf/common.inc.php'; |
4 | 4 | ||
5 | $host = $_GET['h']; | ||
6 | $plugin = $_GET['p']; | ||
7 | $pinstance = $_GET['pi']; | ||
8 | $type = $_GET['t']; | ||
9 | $tinstance = $_GET['ti']; | ||
10 | $width = empty($_GET['x']) ? $CONFIG['width'] : $_GET['x']; | 5 | $width = empty($_GET['x']) ? $CONFIG['width'] : $_GET['x']; |
11 | $heigth = empty($_GET['y']) ? $CONFIG['heigth'] : $_GET['y']; | 6 | $heigth = empty($_GET['y']) ? $CONFIG['heigth'] : $_GET['y']; |
12 | $seconds = $_GET['s']; | ||
13 | 7 | ||
14 | if (!preg_match('/^[a-z]+$/', $plugin)) { | 8 | if (!preg_match('/^[a-z]+$/', $_GET['p'])) { |
15 | die_img('Error: plugin contains unknown characters.'); | 9 | die_img('Error: plugin contains unknown characters.'); |
16 | exit; | 10 | exit; |
17 | } | 11 | } |
18 | 12 | ||
19 | if (!file_exists($CONFIG['webdir']."/plugin/$plugin.php")) { | 13 | if (!file_exists($CONFIG['webdir'].'/plugin/'.$_GET['p'].'.php')) { |
20 | die_img(sprintf('Error: plugin not available (%s).', $plugin)); | 14 | die_img(sprintf('Error: plugin not available (%s).', $_GET['p'])); |
21 | exit; | 15 | exit; |
22 | } | 16 | } |
23 | 17 | ||
24 | include $CONFIG['webdir']."/plugin/$plugin.php"; | 18 | include $CONFIG['webdir'].'/plugin/'.$_GET['p'].'.php'; |
25 | 19 | ||
26 | 20 | ||
27 | function die_img($msg) { | 21 | function die_img($msg) { |