|
30 | 30 | require_once('../../lib/config.inc.php'); |
31 | 31 | require_once('../../lib/app.inc.php'); |
32 | 32 |
|
33 | | -//* Securoty checkpoint |
| 33 | +//* Security checkpoint |
34 | 34 | if($_SESSION['s']['user']['typ'] != 'admin'){ |
35 | 35 | die('Admin permissions required.'); |
36 | 36 | } |
37 | 37 |
|
38 | | -// Checke Berechtigungen f�r Modul |
39 | | -if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) { |
40 | | - header("Location: ../index.php"); |
| 38 | +//* Check permissions for module |
| 39 | +if(!stristr($_SESSION['s']['user']['modules'],$_SESSION['s']['module']['name'])) { |
| 40 | + header('Location: ../index.php'); |
41 | 41 | exit; |
42 | 42 | } |
43 | 43 |
|
44 | 44 | //* Load template |
45 | 45 | $app->uses('tpl'); |
46 | | -$app->tpl->newTemplate("form.tpl.htm"); |
47 | | -$app->tpl->setInclude('content_tpl','templates/module_nav_edit.htm'); |
| 46 | +$app->tpl->newTemplate('form.tpl.htm'); |
| 47 | +$app->tpl->setInclude('content_tpl', 'templates/module_nav_edit.htm'); |
48 | 48 |
|
49 | 49 | // TODO: Check module and nav_id for malicius chars, nav_id can be empty or any number, even 0 |
50 | 50 | $module_name = $_REQUEST['module_name']; |
|
70 | 70 |
|
71 | 71 | if($error == '') { |
72 | 72 |
|
73 | | - $filename = "../$module_name/lib/module.conf.php"; |
| 73 | + $filename = '../'.$module_name.'/lib/module.conf.php'; |
74 | 74 |
|
75 | 75 | if(!@is_file($filename)){ |
76 | 76 | die("File not found: $filename"); |
|
104 | 104 |
|
105 | 105 |
|
106 | 106 | //* Jump to list |
107 | | - header("Location: module_show.php?id=$module_name"); |
| 107 | + header('Location: module_show.php?id='.urlencode($module_name)); |
108 | 108 | exit; |
109 | 109 |
|
110 | 110 | } else { |
|
116 | 116 | if($nav_id != '') { |
117 | 117 | //* Data record exists |
118 | 118 | if($error == '') { |
119 | | - include_once("../$module_name/lib/module.conf.php"); |
| 119 | + include_once('../'.$module_name.'/lib/module.conf.php'); |
120 | 120 | $record = $module['nav'][$nav_id]; |
121 | 121 | } else { |
122 | 122 | //* error |
|
0 commit comments