XOOPS  2.6.0
page_configsite.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 // setup legacy db support
34 
35 /* @var $wizard XoopsInstallWizard */
36 $wizard = $_SESSION['wizard'];
37 $xoops->loadLocale('system');
38 if ($_SERVER['REQUEST_METHOD'] == 'POST') {
39  $config_handler = $xoops->getHandlerConfig();
40  if (array_key_exists('conf_ids', $_REQUEST)) {
41  foreach ($_REQUEST['conf_ids'] as $key => $conf_id) {
42  $config = $config_handler->getConfig($conf_id);
43  $new_value = $_REQUEST[$config->getVar('conf_name')];
44  $config->setConfValueForInput($new_value);
45  $config_handler->insertConfig($config);
46  }
47  }
48  $wizard->redirectToPage('+1');
49 }
50 
51 $config_handler = $xoops->getHandlerConfig();
53 $criteria->add(new Criteria('conf_modid', 1));
54 
56 foreach ($wizard->configs['conf_names'] as $conf_name) {
57  $criteria2->add(new Criteria('conf_name', $conf_name), 'OR');
58 }
59 $criteria->add($criteria2);
60 $criteria->setSort('conf_catid ASC, conf_order');
62 
63 include XOOPS_INSTALL_PATH . '/include/createconfigform.php';
65 
66 $_SESSION['pageHasHelp'] = true;
67 $_SESSION['pageHasForm'] = true;
68 $_SESSION['content'] = $wizard->CreateForm();
69 include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
createConfigform($config)
static getInstance()
Definition: Xoops.php:160
$_SERVER['REQUEST_URI']
const XOOPS_INSTALL_PATH
Definition: common.inc.php:33
$xoopsOption['checkadmin']
if($_SERVER['REQUEST_METHOD']== 'POST') $config_handler
$criteria2
return $config
$configs
$criteria
$GLOBALS['xoopsDB']
$_SESSION['pageHasHelp']