Revision 223
Added by stefan about 19 years ago
details.php | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
// $Id: details.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
|
|
3 |
// $Id$ |
|
4 | 4 |
|
5 | 5 |
/* |
6 | 6 |
|
... | ... | |
48 | 48 |
$template->set_block('page', 'main_block', 'main'); |
49 | 49 |
|
50 | 50 |
// Insert values |
51 |
require(WB_PATH.'/modules/'.$file.'/info.php'); |
|
51 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND directory = '$file'"); |
|
52 |
if($result->numRows() > 0) { |
|
53 |
$module = $result->fetchRow(); |
|
54 |
} |
|
55 |
|
|
52 | 56 |
$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
|
|
57 |
'NAME' => $module['name'],
|
|
58 |
'AUTHOR' => $module['author'],
|
|
59 |
'DESCRIPTION' => $module['description'],
|
|
60 |
'VERSION' => $module['version'],
|
|
61 |
'DESIGNED_FOR' => $module['platform']
|
|
58 | 62 |
) |
59 | 63 |
); |
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']; |
|
64 |
|
|
65 |
switch ($module['function']) { |
|
66 |
case NULL: |
|
67 |
$type_name = $TEXT['UNKNOWN']; |
|
68 |
break; |
|
69 |
case 'page': |
|
70 |
$type_name = $TEXT['PAGE']; |
|
71 |
break; |
|
72 |
case 'wysiwyg': |
|
73 |
$type_name = $TEXT['WYSIWYG_EDITOR']; |
|
74 |
break; |
|
75 |
case 'tool': |
|
76 |
$type_name = $TEXT['ADMINISTRATION_TOOL']; |
|
77 |
break; |
|
78 |
case 'admin': |
|
79 |
$type_name = $TEXT['ADMIN']; |
|
80 |
break; |
|
81 |
case 'administration': |
|
82 |
$type_name = $TEXT['ADMINISTRATION']; |
|
83 |
break; |
|
84 |
$type_name = $TEXT['unknown']; |
|
72 | 85 |
} |
73 | 86 |
$template->set_var('TYPE', $type_name); |
74 | 87 |
|
Also available in: Unified diff
Fixed ticket #46 - addon details are taken from database. Minor changes to install/save.php.