Revision 1923
Added by darkviper over 11 years ago
details.php | ||
---|---|---|
17 | 17 |
|
18 | 18 |
// Include the config file |
19 | 19 |
require('../../config.php'); |
20 |
$mLang = Translate::getinstance(); |
|
21 |
$mLang->enableAddon('admin\addons'); |
|
20 | 22 |
require_once(WB_PATH .'/framework/functions.php'); |
21 | 23 |
require_once(WB_PATH.'/framework/class.admin.php'); |
22 | 24 |
// suppress to print the header, so no new FTAN will be set |
... | ... | |
24 | 26 |
if( !$admin->checkFTAN() ) |
25 | 27 |
{ |
26 | 28 |
$admin->print_header(); |
27 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
|
|
29 |
$admin->print_error($mLang->MESSAGE_GENERIC_SECURITY_ACCESS);
|
|
28 | 30 |
} |
29 | 31 |
|
30 | 32 |
// After check print the header |
31 | 33 |
$admin->print_header(); |
32 | 34 |
// Get template name |
33 | 35 |
if(!isset($_POST['file']) OR $_POST['file'] == "") { |
34 |
$admin->print_error($MESSAGE['GENERIC_FORGOT_OPTIONS']);
|
|
36 |
$admin->print_error($mLang->MESSAGE_GENERIC_FORGOT_OPTIONS);
|
|
35 | 37 |
} else { |
36 | 38 |
$file = preg_replace('/[^a-z0-9_-]/i', "", $_POST['file']); // fix secunia 2010-92-2 |
37 | 39 |
} |
38 | 40 |
|
39 | 41 |
// Check if the template exists |
40 | 42 |
if(!is_dir(WB_PATH.'/templates/'.$file)) { |
41 |
$admin->print_error($MESSAGE['GENERIC_NOT_INSTALLED']);
|
|
43 |
$admin->print_error($mLang->MESSAGE_GENERIC_NOT_INSTALLED);
|
|
42 | 44 |
} |
43 | 45 |
|
44 | 46 |
// Check if the template exists |
45 | 47 |
if(!is_readable(WB_PATH.'/templates/'.$file)) { |
46 |
$admin->print_error($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']);
|
|
48 |
$admin->print_error($mLang->MESSAGE_ADMIN_INSUFFICIENT_PRIVELLIGES);
|
|
47 | 49 |
} |
48 |
|
|
49 |
/* |
|
50 |
if(!isset($_POST['file']) OR $_POST['file'] == "") { |
|
51 |
header("Location: index.php"); |
|
52 |
exit(0); |
|
53 |
} else { |
|
54 |
$file = preg_replace('/[^a-z0-9_-]/i', "", $_POST['file']); // fix secunia 2010-92-2 |
|
55 |
} |
|
56 |
|
|
57 |
if(!file_exists(WB_PATH.'/templates/'.$file)) { |
|
58 |
header("Location: index.php"); |
|
59 |
exit(0); |
|
60 |
} |
|
61 |
// Check if the template exists |
|
62 |
if(!is_dir(WB_PATH.'/templates/'.$file)) { |
|
63 |
$admin->print_error($MESSAGE['GENERIC_NOT_INSTALLED']); |
|
64 |
} |
|
65 |
*/ |
|
66 |
|
|
67 | 50 |
// Print admin header |
68 | 51 |
//$admin = new admin('Addons', 'templates_view'); |
69 | 52 |
|
... | ... | |
109 | 92 |
'LICENSE' => $row['license'], |
110 | 93 |
) |
111 | 94 |
); |
112 |
|
|
113 |
//$mLang = ModLanguage::getInstance(); |
|
114 |
//$mLang->setLanguage(ADMIN_PATH.'/addons/languages/', LANGUAGE, DEFAULT_LANGUAGE); |
|
115 |
$mLang = Translate::getinstance(); |
|
116 |
$mLang->enableAddon('admin\addons'); |
|
117 |
|
|
118 | 95 |
/*-- insert all needed vars from language files ----------------------------------------*/ |
119 | 96 |
$template->set_var($mLang->getLangArray()); |
120 | 97 |
|
... | ... | |
122 | 99 |
// Parse template object |
123 | 100 |
$template->parse('main', 'main_block', false); |
124 | 101 |
$template->pparse('output', 'page'); |
125 |
|
|
126 | 102 |
// Print admin footer |
127 | 103 |
$admin->print_footer(); |
Also available in: Unified diff
syncronize project and some small typo corrections in /admin/