51 parent::__construct(
'',
'pref_form',
'admin.php?fct=preferences',
'post',
true);
52 if ($mod->
getVar(
'dirname') !=
'system') {
53 $xoops->loadLanguage(
'modinfo', $mod->
getVar(
'dirname'));
57 $configNames = array();
61 $configCats = $mod->
getInfo(
'configcat');
71 if (!in_array(
'default', array_keys($configCats))) {
72 $configCats[
'default'] = array(
78 foreach (array_keys($configNames) as
$name) {
79 if (!isset($configNames[$name][
'category'])) {
80 $configNames[
$name][
'category'] =
'default';
86 foreach ($configCats as $name =>
$info) {
88 if (isset(
$info[
'description']) &&
$info[
'description'] !=
'') {
89 $tabs[
$name]->addElement(
new Xoops\Form\Label(
'',
$info[
'description']));
93 $xoops->preload()->triggerEvent(
'onSystemPreferencesForm', array($mod));
95 if (!empty($_REQUEST[
"redirect"])) {
97 $this->
addElement(
new Xoops\Form\Hidden(
'redirect',
$myts->htmlspecialchars($_REQUEST[
"redirect"])));
98 } elseif ($mod->
getInfo(
'adminindex')) {
107 $desc = ($obj[
$i]->getVar(
'conf_desc') !=
'') ?
109 switch ($obj[$i]->getVar(
'conf_formtype')) {
113 if ($obj[$i]->getVar(
'conf_valuetype') ==
'array') {
115 $ele = ($obj[
$i]->getVar(
'conf_value') !=
'')
116 ?
new Xoops\Form\TextArea(
118 $obj[$i]->getVar(
'conf_name'),
119 $myts->htmlspecialchars(implode(
'|', $obj[$i]->getConfValueForOutput())),
123 :
new Xoops\Form\TextArea(
$title, $obj[$i]->getVar(
'conf_name'),
'', 5, 5);
127 $obj[$i]->getVar(
'conf_name'),
128 $myts->htmlspecialchars($obj[$i]->getConfValueForOutput()),
138 $obj[$i]->getVar(
'conf_name'),
139 $obj[$i]->getConfValueForOutput()
143 for (
$j = 0;
$j < $opcount; ++
$j) {
146 $ele->addOption($optval, $optkey);
151 $ele =
new Xoops\Form\Select(
$title, $obj[$i]->getVar(
'conf_name'), $obj[$i]->getConfValueForOutput(), 5,
true);
154 for (
$j = 0;
$j < $opcount; ++
$j) {
157 $ele->addOption($optval, $optkey);
167 $ele = ($obj[
$i]->getVar(
'conf_formtype') !=
'theme_multi') ?
new Xoops\Form\Select(
$title, $obj[$i]->getVar(
'conf_name'), $obj[
$i]->getConfValueForOutput()) :
new Xoops\Form\Select(
$title, $obj[$i]->getVar(
'conf_name'), $obj[
$i]->getConfValueForOutput(), 5,
true);
168 $dirlist = XoopsLists::getThemesList();
176 $tplset_handler =
$xoops->getHandlerTplset();
177 $tplsetlist = $tplset_handler->getNameList();
179 foreach ($tplsetlist as $key => $name) {
180 $ele->addOption($key, $name);
185 $ele =
new Xoops\Form\Hidden($obj[$i]->getVar(
'conf_name'), $obj[$i]->getConfValueForOutput());
213 $ele->addOptionArray($moduleslist);
235 $currrent_val = $obj[
$i]->getConfValueForOutput();
236 $cache_options = array(
252 $c_val = isset($currrent_val[$mid]) ? intval($currrent_val[$mid]) : null;
254 $selform->addOptionArray($cache_options);
255 $ele->addElement($selform);
265 $ele->addOptionArray(array(
292 $ele =
new Xoops\Form\Hidden($obj[$i]->getVar(
'conf_name'),
$myts->htmlspecialchars($obj[$i]->getConfValueForOutput()));
298 $ele =
new Xoops\Form\Text(
$title, $obj[$i]->getVar(
'conf_name'), 5, 255,
$myts->htmlspecialchars($obj[$i]->getConfValueForOutput()));
303 $ele->setDescription($desc);
304 if ($obj[$i]->getVar(
'conf_formtype') !=
'hidden') {
306 if (isset($configNames[$obj[$i]->getVar(
'conf_name')][
'category'])) {
307 $name = $configNames[$obj[
$i]->getVar(
'conf_name')][
'category'];
309 $tabs[
$name]->addElement($ele);
318 foreach (array_keys($tabs) as $name) {
320 $tabtray->addElement($tabs[$name]);
getVar($key, $format= 's')
if($_SERVER['REQUEST_METHOD']== 'POST') $config_handler
if(isset($_POST['name'])) $info
static translate($key, $dirname= 'xoops')