18 if (!defined(
'XOOPS_INSTALL')) { die(
'XOOPS Custom Installation die'); }
20 include_once XOOPS_ROOT_PATH.
'/class/xoopsformloader.php';
21 include_once XOOPS_ROOT_PATH.
'/class/xoopslists.php';
29 if (defined(
"_MD_AM_AUTHENTICATION")) {
41 for (
$i = 0;
$i < $confcount;
$i++) {
42 $conf_catid =
$config[
$i]->getVar(
'conf_catid');
43 if ( !isset(
$ret[$conf_catid] ) ) {
44 $form_title = constant(
"PREF_" . $conf_catid);
50 switch (
$config[
$i]->getVar(
'conf_formtype')) {
54 if (
$config[
$i]->getVar(
'conf_valuetype') ==
'array') {
66 for (
$j = 0;
$j < $opcount;
$j++) {
69 $ele->addOption($optval, $optkey);
77 for (
$j = 0;
$j < $opcount;
$j++) {
80 $ele->addOption($optval, $optkey);
91 require_once XOOPS_ROOT_PATH.
"/class/xoopslists.php";
92 $dirlist = XoopsLists::getThemesList();
110 $tplsetlist =& $tplset_handler->getList();
112 foreach ($tplsetlist as $key => $name) {
113 $ele->addOption($key, $name);
134 $ele->addOptionArray($moduleslist);
157 $currrent_val =
$config[
$i]->getConfValueForOutput();
158 $cache_options = array(
'0' =>
_NOCACHE,
'30' => sprintf(
_SECONDS, 30),
'60' =>
_MINUTE,
'300' => sprintf(
_MINUTES, 5),
'1800' => sprintf(
_MINUTES, 30),
'3600' =>
_HOUR,
'18000' => sprintf(
_HOURS, 5),
'86400' =>
_DAY,
'259200' => sprintf(
_DAYS, 3),
'604800' =>
_WEEK);
159 if (count($modules) > 0) {
161 foreach (array_keys($modules) as
$mid) {
162 $c_val = isset($currrent_val[$mid]) ? intval($currrent_val[$mid]) : null;
164 $selform->addOptionArray($cache_options);
165 $ele->addElement($selform);
175 $ele->addOptionArray(array(
'0' =>
_NOCACHE,
'30' => sprintf(
_SECONDS, 30),
'60' =>
_MINUTE,
'300' => sprintf(
_MINUTES, 5),
'1800' => sprintf(
_MINUTES, 30),
'3600' =>
_HOUR,
'18000' => sprintf(
_HOURS, 5),
'86400' =>
_DAY,
'259200' => sprintf(
_DAYS, 3),
'604800' =>
_WEEK));
200 if ( defined(
$config[
$i]->getVar(
'conf_desc')) && constant(
$config[
$i]->getVar(
'conf_desc')) !=
'' ) {
201 $ele->setDescription( constant(
$config[
$i]->getVar(
'conf_desc')) );
203 $ret[$conf_catid]->addElement($ele);
206 $ret[$conf_catid]->addElement($hidden);
216 $title = (!defined(
$config->getVar(
'conf_desc')) || constant(
$config->getVar(
'conf_desc')) ==
'') ? constant(
$config->getVar(
'conf_title')) : constant(
$config->getVar(
'conf_title')).
'<br /><br /><span>'.constant(
$config->getVar(
'conf_desc')).
'</span>';
218 $dirlist = XoopsLists::getThemesList();
219 if (!empty($dirlist)) {
221 $form_theme_set->addOptionArray($dirlist);
228 foreach ( $dirlist as $theme ) {
241 'thumbnail' =>
'screenshot.gif',
242 'screenshot' =>
'screenshot.png',
247 if ( $theme ==
$config->getConfValueForOutput() ) {
248 $label_content .=
"<div id='$theme' rel='theme' style='display:block;'>";
250 $label_content .=
"<div id='$theme' rel='theme' style='display:none;'>";
252 if ( file_exists( XOOPS_ROOT_PATH .
"/themes/$theme/theme.ini" ) ) {
253 $theme_ini = parse_ini_file( XOOPS_ROOT_PATH .
"/themes/$theme/theme.ini" );
254 if ( $theme_ini[
'screenshot'] ==
'' ) {
255 $theme_ini[
'screenshot'] =
'screenshot.png';
256 $theme_ini[
'thumbnail'] =
'thumbnail.png';
260 if ( $theme_ini[
'screenshot'] !=
'' && file_exists( XOOPS_ROOT_PATH .
"/themes/$theme/" . $theme_ini[
'screenshot'] ) ) {
261 $label_content .=
"<img src='" . XOOPS_URL .
"/themes/" . $theme .
"/" . $theme_ini[
'screenshot'] .
"' alt='Screenshot' />";
262 } elseif ( $theme_ini[
'thumbnail'] !=
'' && file_exists( XOOPS_ROOT_PATH .
"/themes/$theme/" . $theme_ini[
'thumbnail'] ) ) {
263 $label_content .=
"<img src='" . XOOPS_URL .
"/themes/" . $theme .
"/" . $theme_ini[
'thumbnail'] .
"' alt='$theme' />";
267 $label_content .=
"</div>";
271 $form_theme_set->setExtra(
"onchange='showThemeSelected(this)'" );
274 $form->addElement($form_theme_set);
275 $form->addElement(
new XoopsFormLabel(
'',
"<div id='screenshot'>" . $label_content .
"</div>" ) );