Revision 1912
Added by Dietmar over 11 years ago
index.php | ||
---|---|---|
4 | 4 |
* @category admin |
5 | 5 |
* @package settings |
6 | 6 |
* @author Ryan Djurovich, WebsiteBaker Project |
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 |
* @link http://www.websitebaker2.org/
|
|
7 |
* @copyright 2009-2013, WebsiteBaker Org. e.V.
|
|
8 |
* @link http://www.websitebaker.org/ |
|
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
11 | 11 |
* @requirements PHP 5.2.2 and higher |
... | ... | |
57 | 57 |
$oTpl->set_file('page', 'settings.htt'); |
58 | 58 |
$oTpl->set_block('page', 'main_block', 'main'); |
59 | 59 |
|
60 |
$mLang = ModLanguage::getInstance(); |
|
61 |
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE); |
|
62 |
|
|
63 |
$oTpl->set_var('FTAN', $admin->getFTAN());
|
|
60 |
//$mLang = ModLanguage::getInstance();
|
|
61 |
//$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
|
|
62 |
$mLang = Translate::getinstance(); |
|
63 |
$mLang->enableAddon('admin\settings');
|
|
64 | 64 |
/*-- insert all needed vars from language files ----------------------------------------*/ |
65 | 65 |
$oTpl->set_var($mLang->getLangArray()); |
66 | 66 |
|
67 |
$oTpl->set_var('FTAN', $admin->getFTAN()); |
|
68 |
|
|
67 | 69 |
// Query current settings in the db, then loop through them and print them |
68 | 70 |
$query = "SELECT * FROM `".TABLE_PREFIX."settings`"; |
69 | 71 |
if($results = $database->query($query)) { |
... | ... | |
82 | 84 |
$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box'); |
83 | 85 |
$oTpl->set_var('BASIC_FILE_PERMS_ID', 'hide'); |
84 | 86 |
$oTpl->set_var('ADVANCED', 'yes'); |
85 |
$oTpl->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
|
|
87 |
$oTpl->set_var('ADVANCED_BUTTON', '<< '.$mLang->TEXT_HIDE_ADVANCED);
|
|
86 | 88 |
$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=no'); |
87 | 89 |
|
88 | 90 |
} else { |
... | ... | |
91 | 93 |
$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'hide'); |
92 | 94 |
|
93 | 95 |
$oTpl->set_var('ADVANCED', 'no'); |
94 |
$oTpl->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
|
|
96 |
$oTpl->set_var('ADVANCED_BUTTON', $mLang->TEXT_SHOW_ADVANCED.' >>');
|
|
95 | 97 |
$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=yes'); |
96 | 98 |
} |
97 | 99 |
|
... | ... | |
104 | 106 |
'ADMIN_URL' => ADMIN_URL, |
105 | 107 |
)); |
106 | 108 |
|
107 |
// Insert language headings |
|
108 |
$oTpl->set_var(array( |
|
109 |
'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'], |
|
110 |
'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'], |
|
111 |
'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'], |
|
112 |
'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'], |
|
113 |
'HEADING_WBMAILER_SETTINGS' => $HEADING['WBMAILER_SETTINGS'], |
|
114 |
'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS'] |
|
115 |
) |
|
116 |
); |
|
117 |
|
|
118 |
// Insert language textarea label |
|
119 |
$oTpl->set_var(array( |
|
120 |
'TEXT_WEBSITE_TITLE' => $TEXT['WEBSITE_TITLE'], |
|
121 |
'TEXT_WEBSITE_DESCRIPTION' => $TEXT['WEBSITE_DESCRIPTION'], |
|
122 |
'TEXT_WEBSITE_KEYWORDS' => $TEXT['WEBSITE_KEYWORDS'], |
|
123 |
'TEXT_WEBSITE_HEADER' => $TEXT['WEBSITE_HEADER'], |
|
124 |
'TEXT_WEBSITE_FOOTER' => $TEXT['WEBSITE_FOOTER'], |
|
125 |
'TEXT_HEADER' => $TEXT['HEADER'], |
|
126 |
'TEXT_FOOTER' => $TEXT['FOOTER'], |
|
127 |
'TEXT_TEXT' => $TEXT['TEXT'], |
|
128 |
'TEXT_RESULTS_HEADER' => $TEXT['RESULTS_HEADER'], |
|
129 |
'TEXT_RESULTS_LOOP' => $TEXT['RESULTS_LOOP'], |
|
130 |
'TEXT_RESULTS_FOOTER' => $TEXT['RESULTS_FOOTER'], |
|
131 |
)); |
|
132 |
|
|
133 |
// Insert generell language |
|
134 |
$oTpl->set_var(array( |
|
135 |
'TEXT_SAVE' => $TEXT['SAVE'], |
|
136 |
'TEXT_RESET' => $TEXT['RESET'], |
|
137 |
'TEXT_ENABLED' => $TEXT['ENABLED'], |
|
138 |
'TEXT_DISABLED' => $TEXT['DISABLED'], |
|
139 |
'TEXT_DEFAULT' => $TEXT['DEFAULT'], |
|
140 |
'TEXT_NO_RESULTS' => $TEXT['NO_RESULTS'], |
|
141 |
'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'], |
|
142 |
)); |
|
143 |
|
|
144 |
// Insert language labels |
|
145 |
$oTpl->set_var(array( |
|
146 |
'TEXT_PAGE_TRASH' => $TEXT['PAGE_TRASH'], |
|
147 |
'TEXT_PAGE_LANGUAGES' => $TEXT['PAGE_LANGUAGES'], |
|
148 |
'TEXT_FRONTEND' => $TEXT['FRONTEND'], |
|
149 |
'TEXT_LOGIN' => $TEXT['LOGIN'], |
|
150 |
'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'], |
|
151 |
'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'], |
|
152 |
'TEXT_MANAGE' => $TEXT['MANAGE'], |
|
153 |
'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'], |
|
154 |
'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'], |
|
155 |
'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'], |
|
156 |
'TEXT_CHARSET' => $TEXT['CHARSET'], |
|
157 |
'TEXT_REDIRECT_AFTER' => $TEXT['REDIRECT_AFTER'], |
|
158 |
'TEXT_SIGNUP' => $TEXT['SIGNUP'].' '.$TEXT['GROUP'], |
|
159 |
'TEXT_MULTILINGUAL' => $TEXT['MULTILINGUAL'], |
|
160 |
'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'], |
|
161 |
'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'], |
|
162 |
'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'], |
|
163 |
'TEXT_INLINE' => $TEXT['INLINE'], |
|
164 |
'TEXT_SEPARATE' => $TEXT['SEPARATE'], |
|
165 |
'TEXT_LANGUAGE' => $TEXT['LANGUAGE'], |
|
166 |
'TEXT_TIMEZONE' => $TEXT['TIMEZONE'], |
|
167 |
'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'], |
|
168 |
'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'], |
|
169 |
'TEXT_TEMPLATE' => $TEXT['TEMPLATE'], |
|
170 |
'TEXT_THEME' => $TEXT['THEME'], |
|
171 |
'TEXT_WYSIWYG_EDITOR' => $TEXT['WYSIWYG_EDITOR'], |
|
172 |
'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'], |
|
173 |
'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'], |
|
174 |
)); |
|
175 |
|
|
176 | 109 |
// Insert permissions values |
177 | 110 |
if($admin->get_permission('settings_advanced') != true) |
178 | 111 |
{ |
... | ... | |
293 | 226 |
} |
294 | 227 |
|
295 | 228 |
// Work-out if media home folder feature is enabled |
296 |
$oTpl->set_var('TEXT_HOME_FOLDERS', $TEXT['HOME_FOLDERS']);
|
|
229 |
$oTpl->set_var('TEXT_HOME_FOLDERS', $mLang->TEXT_HOME_FOLDERS);
|
|
297 | 230 |
if(HOME_FOLDERS) |
298 | 231 |
{ |
299 | 232 |
$oTpl->set_var(array( |
... | ... | |
450 | 383 |
} |
451 | 384 |
} else { |
452 | 385 |
$oTpl->set_var('ID', 'disabled'); |
453 |
$oTpl->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
|
|
386 |
$oTpl->set_var('NAME', $mLang->MESSAGE_GROUPS_NO_GROUPS_FOUND);
|
|
454 | 387 |
$oTpl->parse('group_list', 'group_list_block', true); |
455 | 388 |
} |
456 | 389 |
} |
... | ... | |
503 | 436 |
$oTpl->set_block('main_block', 'show_wysiwyg_block', 'show_wysiwyg'); |
504 | 437 |
$oTpl->set_block('show_wysiwyg_block', 'editor_list_block', 'editor_list'); |
505 | 438 |
$file='none'; |
506 |
$module_name=$TEXT['NONE'];
|
|
439 |
$module_name=$mLang->TEXT_NONE;
|
|
507 | 440 |
$oTpl->set_var('FILE', $file); |
508 | 441 |
$oTpl->set_var('NAME', $module_name); |
509 | 442 |
$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : ''; |
... | ... | |
775 | 708 |
|
776 | 709 |
$oTpl->set_var(array( |
777 | 710 |
'FILE' => '', |
778 |
'TEXT_MODULE_ORDER' => $TEXT['MODULE_ORDER'],
|
|
779 |
'NAME' => $TEXT['SYSTEM_DEFAULT'],
|
|
711 |
'TEXT_MODULE_ORDER' => $mLang->TEXT_MODULE_ORDER,
|
|
712 |
'NAME' => $mLang->TEXT_SYSTEM_DEFAULT,
|
|
780 | 713 |
'SELECTED' => $selected |
781 | 714 |
)); |
782 | 715 |
$oTpl->parse('search_template_list', 'search_template_list_block', true); |
... | ... | |
800 | 733 |
} |
801 | 734 |
|
802 | 735 |
// Insert search select |
803 |
$oTpl->set_var(array( |
|
804 |
'TEXT_REGISTERED' => $TEXT['REGISTERED'],
|
|
805 |
'TEXT_PUBLIC' => $TEXT['PUBLIC'],
|
|
806 |
'TEXT_PRIVATE' => $TEXT['PRIVATE'],
|
|
807 |
'TEXT_NONE' => $TEXT['NONE'],
|
|
808 |
'TEXT_MAX_EXCERPT' => $TEXT['MAX_EXCERPT'],
|
|
809 |
'TEXT_TIME_LIMIT' => $TEXT['TIME_LIMIT'],
|
|
810 |
'TEXT_VISIBILITY' => $TEXT['VISIBILITY'],
|
|
811 |
'TEXT_SEARCH' => $TEXT['SEARCH'],
|
|
812 |
)); |
|
736 |
// $oTpl->set_var(array(
|
|
737 |
// 'TEXT_REGISTERED' => $mLang->TEXT_REGISTERED'],
|
|
738 |
// 'TEXT_PUBLIC' => $mLang->TEXT_PUBLIC,
|
|
739 |
// 'TEXT_PRIVATE' => $mLang->TEXT_PRIVATE'],
|
|
740 |
// 'TEXT_NONE' => $mLang->TEXT_NONE'],
|
|
741 |
// 'TEXT_MAX_EXCERPT' => $mLang->TEXT_MAX_EXCERPT'],
|
|
742 |
// 'TEXT_TIME_LIMIT' => $mLang->TEXT_TIME_LIMIT'],
|
|
743 |
// 'TEXT_VISIBILITY' => $mLang->TEXT_VISIBILITY'],
|
|
744 |
// 'TEXT_SEARCH' => $mLang->TEXT_SEARCH'],
|
|
745 |
// ));
|
|
813 | 746 |
if(SEARCH == 'private') |
814 | 747 |
{ |
815 | 748 |
$oTpl->set_var(array( |
... | ... | |
847 | 780 |
$oTpl->set_block('main_block', 'show_access_block','show_access'); |
848 | 781 |
// Work-out which wbmailer routine should be checked |
849 | 782 |
$oTpl->set_var(array( |
850 |
'TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE' => $TEXT['WBMAILER_DEFAULT_SETTINGS_NOTICE'],
|
|
851 |
'TEXT_WBMAILER_DEFAULT_SENDER_MAIL' => $TEXT['WBMAILER_DEFAULT_SENDER_MAIL'],
|
|
852 |
'TEXT_WBMAILER_DEFAULT_SENDER_NAME' => $TEXT['WBMAILER_DEFAULT_SENDER_NAME'],
|
|
853 |
'TEXT_WBMAILER_NOTICE' => $TEXT['WBMAILER_NOTICE'],
|
|
854 |
'TEXT_WBMAILER_FUNCTION' => $TEXT['WBMAILER_FUNCTION'],
|
|
855 |
'TEXT_WBMAILER_SMTP_HOST' => $TEXT['WBMAILER_SMTP_HOST'],
|
|
856 |
'TEXT_WBMAILER_PHP' => $TEXT['WBMAILER_PHP'],
|
|
857 |
'TEXT_WBMAILER_SMTP' => $TEXT['WBMAILER_SMTP'],
|
|
858 |
'TEXT_WBMAILER_SMTP_AUTH' => $TEXT['WBMAILER_SMTP_AUTH'],
|
|
859 |
'TEXT_WBMAILER_SMTP_AUTH_NOTICE' => $TEXT['REQUIRED'].' '.$TEXT['WBMAILER_SMTP_AUTH'],
|
|
860 |
'TEXT_WBMAILER_SMTP_USERNAME' => $TEXT['WBMAILER_SMTP_USERNAME'],
|
|
861 |
'TEXT_WBMAILER_SMTP_PASSWORD' => $TEXT['WBMAILER_SMTP_PASSWORD'],
|
|
862 |
'SMTP_AUTH_SELECTED' => $checked
|
|
783 |
'TEXT_WBMAILER_SMTP_AUTH_NOTICE' => $mLang->TEXT_REQUIRED.' '.$mLang->TEXT_WBMAILER_SMTP_AUTH,
|
|
784 |
'SMTP_AUTH_SELECTED' => $checked,
|
|
785 |
'TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE' => $mLang->TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE,
|
|
786 |
'TEXT_WBMAILER_DEFAULT_SENDER_MAIL' => $mLang->TEXT_WBMAILER_DEFAULT_SENDER_MAIL,
|
|
787 |
'TEXT_WBMAILER_DEFAULT_SENDER_NAME' => $mLang->TEXT_WBMAILER_DEFAULT_SENDER_NAME,
|
|
788 |
'TEXT_WBMAILER_NOTICE' => $mLang->TEXT_WBMAILER_NOTICE,
|
|
789 |
'TEXT_WBMAILER_FUNCTION' => $mLang->TEXT_WBMAILER_FUNCTION,
|
|
790 |
'TEXT_WBMAILER_SMTP_HOST' => $mLang->TEXT_WBMAILER_SMTP_HOST,
|
|
791 |
'TEXT_WBMAILER_PHP' => $mLang->TEXT_WBMAILER_PHP,
|
|
792 |
'TEXT_WBMAILER_SMTP' => $mLang->TEXT_WBMAILER_SMTP,
|
|
793 |
'TEXT_WBMAILER_SMTP_AUTH' => $mLang->TEXT_WBMAILER_SMTP_AUTH,
|
|
794 |
'TEXT_WBMAILER_SMTP_USERNAME' => $mLang->TEXT_WBMAILER_SMTP_USERNAME,
|
|
795 |
'TEXT_WBMAILER_SMTP_PASSWORD' => $mLang->TEXT_WBMAILER_SMTP_PASSWORD,
|
|
863 | 796 |
)); |
864 | 797 |
|
865 | 798 |
// Work-out if developer infos feature is enabled |
... | ... | |
1043 | 976 |
|
1044 | 977 |
// Insert language text and messages |
1045 | 978 |
$oTpl->set_var(array( |
1046 |
'TEXT_DEV_INFOS' => $TEXT['DEV_INFOS'], |
|
1047 |
'TEXT_PAGES_DIRECTORY' => $TEXT['PAGES_DIRECTORY'], |
|
1048 |
'TEXT_PAGE_ICON_DIR' => $TEXT['PAGE_ICON_DIR'], |
|
1049 |
'TEXT_MEDIA_DIRECTORY' => $TEXT['MEDIA_DIRECTORY'], |
|
1050 |
'TEXT_PAGE_EXTENSION' => $TEXT['PAGE_EXTENSION'], |
|
1051 |
'TEXT_PAGE_SPACER' => $TEXT['PAGE_SPACER'], |
|
1052 |
'TEXT_RENAME_FILES_ON_UPLOAD' => $TEXT['RENAME_FILES_ON_UPLOAD'], |
|
1053 |
'TEXT_APP_NAME' => $TEXT['APP_NAME'], |
|
1054 |
'TEXT_SESSION_IDENTIFIER' => $TEXT['SESSION_IDENTIFIER'], |
|
1055 |
'TEXT_SEC_ANCHOR' => $TEXT['SEC_ANCHOR'], |
|
1056 |
'TEXT_SERVER_OPERATING_SYSTEM' => $TEXT['SERVER_OPERATING_SYSTEM'], |
|
1057 |
'TEXT_LINUX_UNIX_BASED' => $TEXT['LINUX_UNIX_BASED'], |
|
1058 |
'TEXT_WINDOWS' => $TEXT['WINDOWS'], |
|
1059 |
'TEXT_ADMIN' => $TEXT['ADMIN'], |
|
1060 |
'TEXT_TYPE' => $TEXT['TYPE'], |
|
1061 |
'TEXT_DATABASE' => $TEXT['DATABASE'], |
|
1062 |
'TEXT_HOST' => $TEXT['HOST'], |
|
1063 |
'TEXT_USERNAME' => $TEXT['USERNAME'], |
|
1064 |
'TEXT_PASSWORD' => $TEXT['PASSWORD'], |
|
1065 |
'TEXT_NAME' => $TEXT['NAME'], |
|
1066 |
'TEXT_TABLE_PREFIX' => $TEXT['TABLE_PREFIX'], |
|
1067 |
'TEXT_CHANGES' => $TEXT['CHANGES'], |
|
1068 |
'TEXT_FILES' => strtoupper(substr($TEXT['FILES'], 0, 1)).substr($TEXT['FILES'], 1), |
|
1069 |
'TEXT_DIRECTORIES' => $TEXT['DIRECTORIES'], |
|
1070 |
'TEXT_FILESYSTEM_PERMISSIONS' => $TEXT['FILESYSTEM_PERMISSIONS'], |
|
1071 |
'TEXT_USER' => $TEXT['USER'], |
|
1072 |
'TEXT_GROUP' => $TEXT['GROUP'], |
|
1073 |
'TEXT_OTHERS' => $TEXT['OTHERS'], |
|
1074 |
'TEXT_READ' => $TEXT['READ'], |
|
1075 |
'TEXT_WRITE' => $TEXT['WRITE'], |
|
1076 |
'TEXT_EXECUTE' => $TEXT['EXECUTE'], |
|
979 |
'TEXT_CHANGES' => $mLang->TEXT_CHANGES, |
|
980 |
'TEXT_FILES' => strtoupper(substr($mLang->TEXT_FILES, 0, 1)).substr($mLang->TEXT_FILES, 1), |
|
1077 | 981 |
'TEXT_WARN_PAGE_LEAVE' => '', |
1078 |
'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $TEXT['WORLD_WRITEABLE_FILE_PERMISSIONS'],
|
|
1079 |
'MODE_SWITCH_WARNING' => $MESSAGE['SETTINGS_MODE_SWITCH_WARNING'],
|
|
1080 |
'WORLD_WRITEABLE_WARNING' => $MESSAGE['SETTINGS_WORLD_WRITEABLE_WARNING'],
|
|
982 |
'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $mLang->TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS,
|
|
983 |
'MODE_SWITCH_WARNING' => $mLang->MESSAGE_SETTINGS_MODE_SWITCH_WARNING,
|
|
984 |
'WORLD_WRITEABLE_WARNING' => $mLang->MESSAGE_SETTINGS_WORLD_WRITEABLE_WARNING
|
|
1081 | 985 |
)); |
1082 | 986 |
|
1083 | 987 |
if($is_advanced && $admin->get_user_id()=='1') |
Also available in: Unified diff
! /admin/preferences/index.php change to new Translate class
languages only given for existing page languages
! /admin/settings/ change to new Translate class