1
|
<?php
|
2
|
/**
|
3
|
*
|
4
|
* @category admin
|
5
|
* @package languages
|
6
|
* @author WebsiteBaker Project
|
7
|
* @copyright 2004-2009, Ryan Djurovich
|
8
|
* @copyright 2009-2011, Website Baker Org. e.V.
|
9
|
* @link http://www.websitebaker2.org/
|
10
|
* @license http://www.gnu.org/licenses/gpl.html
|
11
|
* @platform WebsiteBaker 2.8.x
|
12
|
* @requirements PHP 5.2.2 and higher
|
13
|
* @version $Id: index.php 1467 2011-07-02 00:06:53Z Luisehahne $
|
14
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/languages/index.php $
|
15
|
* @lastmodified $Date: 2011-07-02 02:06:53 +0200 (Sat, 02 Jul 2011) $
|
16
|
* @description
|
17
|
*
|
18
|
*/
|
19
|
|
20
|
// Print admin header
|
21
|
require('../../config.php');
|
22
|
require_once(WB_PATH.'/framework/class.admin.php');
|
23
|
$admin = new admin('Addons', 'languages');
|
24
|
|
25
|
// Setup template object
|
26
|
$template = new Template(THEME_PATH.'/templates');
|
27
|
$template->set_file('page', 'languages.htt');
|
28
|
$template->set_block('page', 'main_block', 'main');
|
29
|
|
30
|
// Insert values into language list
|
31
|
$template->set_block('main_block', 'language_list_block', 'language_list');
|
32
|
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by directory");
|
33
|
if($result->numRows() > 0) {
|
34
|
while($addon = $result->fetchRow()) {
|
35
|
$template->set_var('VALUE', $addon['directory']);
|
36
|
$template->set_var('NAME', $addon['name'].' ('.$addon['directory'].')');
|
37
|
$template->parse('language_list', 'language_list_block', true);
|
38
|
}
|
39
|
}
|
40
|
|
41
|
// Insert permissions values
|
42
|
if($admin->get_permission('languages_install') != true) {
|
43
|
$template->set_var('DISPLAY_INSTALL', 'hide');
|
44
|
}
|
45
|
if($admin->get_permission('languages_uninstall') != true) {
|
46
|
$template->set_var('DISPLAY_UNINSTALL', 'hide');
|
47
|
}
|
48
|
if($admin->get_permission('languages_view') != true) {
|
49
|
$template->set_var('DISPLAY_LIST', 'hide');
|
50
|
}
|
51
|
|
52
|
// Insert language headings
|
53
|
$template->set_var(array(
|
54
|
'HEADING_INSTALL_LANGUAGE' => $HEADING['INSTALL_LANGUAGE'],
|
55
|
'HEADING_UNINSTALL_LANGUAGE' => $HEADING['UNINSTALL_LANGUAGE'],
|
56
|
'HEADING_LANGUAGE_DETAILS' => $HEADING['LANGUAGE_DETAILS']
|
57
|
)
|
58
|
);
|
59
|
// insert urls
|
60
|
$template->set_var(array(
|
61
|
'ADMIN_URL' => ADMIN_URL,
|
62
|
'WB_URL' => WB_URL,
|
63
|
'THEME_URL' => THEME_URL,
|
64
|
'FTAN' => $admin->getFTAN()
|
65
|
)
|
66
|
);
|
67
|
// Insert language text and messages
|
68
|
$template->set_var(array(
|
69
|
'URL_MODULES' => $admin->get_permission('modules') ?
|
70
|
'<a href="' . ADMIN_URL . '/modules/index.php">' . $MENU['MODULES'] . '</a>' : '',
|
71
|
'URL_ADVANCED' => $admin->get_permission('admintools') ?
|
72
|
'<a href="' . ADMIN_URL . '/modules/index.php?advanced">' . $TEXT['ADVANCED'] . '</a>' : '',
|
73
|
'URL_TEMPLATES' => $admin->get_permission('templates') ?
|
74
|
'<a href="' . ADMIN_URL . '/templates/index.php">' . $MENU['TEMPLATES'] . '</a>' : '',
|
75
|
'TEXT_INSTALL' => $TEXT['INSTALL'],
|
76
|
'TEXT_UNINSTALL' => $TEXT['UNINSTALL'],
|
77
|
'TEXT_VIEW_DETAILS' => $TEXT['VIEW_DETAILS'],
|
78
|
'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT']
|
79
|
)
|
80
|
);
|
81
|
|
82
|
// Parse template object
|
83
|
$template->parse('main', 'main_block', false);
|
84
|
$template->pparse('output', 'page');
|
85
|
|
86
|
// Print admin footer
|
87
|
$admin->print_footer();
|