XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
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
30
$xoops
=
Xoops::getInstance
();
31
32
// setup legacy db support
33
$GLOBALS
[
'xoopsDB'
] =
\XoopsDatabaseFactory::getDatabaseConnection
(
true
);
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();
52
$criteria
=
new
CriteriaCompo
();
53
$criteria
->add(
new
Criteria
(
'conf_modid'
, 1));
54
55
$criteria2
=
new
CriteriaCompo
();
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'
);
61
$configs
=
$config_handler
->getConfigs(
$criteria
);
62
63
include
XOOPS_INSTALL_PATH
.
'/include/createconfigform.php'
;
64
$wizard
->form =
createConfigform
(
$configs
);
65
66
$_SESSION
[
'pageHasHelp'
] =
true
;
67
$_SESSION
[
'pageHasForm'
] =
true
;
68
$_SESSION
[
'content'
] =
$wizard
->CreateForm();
69
include
XOOPS_INSTALL_PATH
.
'/include/install_tpl.php'
;
createConfigform
createConfigform($config)
Definition:
createconfigform.php:32
Xoops\getInstance
static getInstance()
Definition:
Xoops.php:160
$_SERVER
$_SERVER['REQUEST_URI']
Definition:
comment_delete.php:23
$xoops
$xoops
Definition:
page_configsite.php:30
XOOPS_INSTALL_PATH
const XOOPS_INSTALL_PATH
Definition:
common.inc.php:33
$xoopsOption
$xoopsOption['checkadmin']
Definition:
page_configsite.php:25
$wizard
$wizard
Definition:
page_configsite.php:36
$config_handler
if($_SERVER['REQUEST_METHOD']== 'POST') $config_handler
Definition:
page_configsite.php:51
include
$criteria2
$criteria2
Definition:
page_configsite.php:55
XoopsDatabaseFactory\getDatabaseConnection
static getDatabaseConnection()
Definition:
databasefactory.php:45
$config
return $config
Definition:
config.image.php:29
$configs
$configs
Definition:
page_configsite.php:61
$criteria
$criteria
Definition:
page_configsite.php:52
$GLOBALS
$GLOBALS['xoopsDB']
Definition:
page_configsite.php:33
CriteriaCompo
Definition:
criteria.php:22
Criteria
Definition:
criteria.php:29
$_SESSION
$_SESSION['pageHasHelp']
Definition:
page_configsite.php:66
usr64
htdocs
install
page_configsite.php
Generated on Fri May 22 2015 03:07:02 for XOOPS by
1.8.9.1