XOOPS  2.6.0
page_theme.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
25 $xoopsOption['checkadmin'] = true;
26 $xoopsOption['hascommon'] = true;
27 
28 require_once __DIR__ . '/include/common.inc.php';
29 
31 
32 /* @var $wizard XoopsInstallWizard */
33 $wizard = $_SESSION['wizard'];
34 $config_handler = $xoops->getHandlerConfig();
35 
36 if ($_SERVER['REQUEST_METHOD'] == 'POST') {
37  if (array_key_exists('conf_ids', $_REQUEST)) {
38  foreach ($_REQUEST['conf_ids'] as $key => $conf_id) {
39  $config =& $config_handler->getConfig($conf_id);
40  $new_value = $_REQUEST[$config->getVar('conf_name')];
41  $config->setConfValueForInput($new_value);
42  $config_handler->insertConfig($config);
43  }
44  }
45 
46  $member_handler = $xoops->getHandlerMember();
47  $member_handler->updateUsersByField('theme', $new_value);
48 
49  $wizard->redirectToPage('+1');
50 }
51 
52 $xoops->loadLocale('system');
53 
55 $criteria->add(new Criteria('conf_modid', 1));
56 $criteria->add(new Criteria('conf_name', 'theme_set'));
57 
59 $config = array_pop($tempvar);
60 
61 include XOOPS_INSTALL_PATH . '/include/createconfigform.php';
63 $content = $wizard->CreateForm();
64 
65 $_SESSION['pageHasHelp'] = false;
66 $_SESSION['pageHasForm'] = false;
67 $_SESSION['content'] = $content;
68 include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
$tempvar
Definition: page_theme.php:58
if($uname== ''||$pass== '') $member_handler
Definition: checklogin.php:44
$xoopsOption['checkadmin']
Definition: page_theme.php:25
$wizard
Definition: page_theme.php:33
static getInstance()
Definition: Xoops.php:160
$criteria
Definition: page_theme.php:54
$_SERVER['REQUEST_URI']
$_SESSION['pageHasHelp']
Definition: page_theme.php:65
$config
Definition: page_theme.php:59
const XOOPS_INSTALL_PATH
Definition: common.inc.php:33
$content
Definition: page_theme.php:63
$config_handler
Definition: page_theme.php:34
$xoops
Definition: page_theme.php:30
createThemeform(XoopsConfigItem $config)