1
|
<?php
|
2
|
|
3
|
// $Id: details.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
|
4
|
|
5
|
/*
|
6
|
|
7
|
Website Baker Project <http://www.websitebaker.org/>
|
8
|
Copyright (C) 2004-2005, Ryan Djurovich
|
9
|
|
10
|
Website Baker is free software; you can redistribute it and/or modify
|
11
|
it under the terms of the GNU General Public License as published by
|
12
|
the Free Software Foundation; either version 2 of the License, or
|
13
|
(at your option) any later version.
|
14
|
|
15
|
Website Baker is distributed in the hope that it will be useful,
|
16
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18
|
GNU General Public License for more details.
|
19
|
|
20
|
You should have received a copy of the GNU General Public License
|
21
|
along with Website Baker; if not, write to the Free Software
|
22
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
23
|
|
24
|
*/
|
25
|
|
26
|
// Include the config file
|
27
|
require('../../config.php');
|
28
|
|
29
|
// Get module name
|
30
|
if(!isset($_POST['file']) OR $_POST['file'] == "") {
|
31
|
header("Location: index.php");
|
32
|
} else {
|
33
|
$file = $_POST['file'];
|
34
|
}
|
35
|
|
36
|
// Check if the module exists
|
37
|
if(!file_exists(WB_PATH.'/modules/'.$file)) {
|
38
|
header("Location: index.php");
|
39
|
}
|
40
|
|
41
|
// Print admin header
|
42
|
require_once(WB_PATH.'/framework/class.admin.php');
|
43
|
$admin = new admin('Addons', 'modules_view');
|
44
|
|
45
|
// Setup module object
|
46
|
$template = new Template(ADMIN_PATH.'/modules');
|
47
|
$template->set_file('page', 'details.html');
|
48
|
$template->set_block('page', 'main_block', 'main');
|
49
|
|
50
|
// Insert values
|
51
|
require(WB_PATH.'/modules/'.$file.'/info.php');
|
52
|
$template->set_var(array(
|
53
|
'NAME' => $module_name,
|
54
|
'AUTHOR' => $module_author,
|
55
|
'DESCRIPTION' => $module_description,
|
56
|
'VERSION' => $module_version,
|
57
|
'DESIGNED_FOR' => $module_designed_for
|
58
|
)
|
59
|
);
|
60
|
if(!isset($module_type)) {
|
61
|
$type_name = $TEXT['UNKNOWN'];
|
62
|
} elseif($module_type == 'page') {
|
63
|
$type_name = $TEXT['PAGE'];
|
64
|
} elseif($module_type == 'admin') {
|
65
|
$type_name = $TEXT['ADMIN'];
|
66
|
} elseif($module_type == 'administration') {
|
67
|
$type_name = $TEXT['ADMINISTRATION'];
|
68
|
} elseif($module_type == 'block') {
|
69
|
$type_name = $TEXT['BLOCK'];
|
70
|
} else {
|
71
|
$type_name = $TEXT['UNKNOWN'];
|
72
|
}
|
73
|
$template->set_var('TYPE', $type_name);
|
74
|
|
75
|
// Insert language headings
|
76
|
$template->set_var(array(
|
77
|
'HEADING_MODULE_DETAILS' => $HEADING['MODULE_DETAILS']
|
78
|
)
|
79
|
);
|
80
|
// Insert language text and messages
|
81
|
$template->set_var(array(
|
82
|
'TEXT_NAME' => $TEXT['NAME'],
|
83
|
'TEXT_TYPE' => $TEXT['TYPE'],
|
84
|
'TEXT_AUTHOR' => $TEXT['AUTHOR'],
|
85
|
'TEXT_VERSION' => $TEXT['VERSION'],
|
86
|
'TEXT_DESIGNED_FOR' => $TEXT['DESIGNED_FOR'],
|
87
|
'TEXT_DESCRIPTION' => $TEXT['DESCRIPTION']
|
88
|
)
|
89
|
);
|
90
|
|
91
|
// Parse module object
|
92
|
$template->parse('main', 'main_block', false);
|
93
|
$template->pparse('output', 'page');
|
94
|
|
95
|
// Print admin footer
|
96
|
$admin->print_footer();
|
97
|
|
98
|
?>
|