59 if (@empty(
$_SERVER[
'REQUEST_URI'])) {
64 $this->
initLanguage(!empty($_COOKIE[
'xo_install_lang']) ? $_COOKIE[
'xo_install_lang'] :
'en_US');
67 include_once dirname(__DIR__) .
'/include/page.php';
72 include_once dirname(__DIR__) .
'/include/config.php';
79 $pagename = preg_replace(
'~(page_)(.*)~',
'$2', basename(
$_SERVER[
'PHP_SELF'],
".php"));
83 header(
"Cache-Control: no-store, no-cache, must-revalidate",
false);
84 header(
"Pragma: no-cache");
95 if (!isset(
$_SERVER[
'PHP_AUTH_USER'])) {
96 header(
'WWW-Authenticate: Basic realm="XOOPS Installer"');
97 header(
'HTTP/1.0 401 Unauthorized');
98 echo
'You can not access this XOOPS installer.';
102 header(
'HTTP/1.0 401 Unauthorized');
103 echo
'You can not access this XOOPS installer.';
107 header(
'HTTP/1.0 401 Unauthorized');
108 echo
'You can not access this XOOPS installer.';
113 if (!isset($xoopsOption[
'checkadmin']) || !$xoopsOption[
'checkadmin']) {
118 if (!
$xoops->isUser() && !empty($_COOKIE[
"xo_install_user"])) {
168 $pages = array_keys($this->pages);
170 $this->pageIndex =
$page;
173 if (isset($this->pages[
$page])) {
174 $this->currentPage =
$page;
175 $this->pageIndex = array_search($this->currentPage,
$pages);
181 if ($this->pageIndex > 0 && !isset($_COOKIE[
'xo_install_lang'])) {
182 header(
'Location: index.php');
193 $proto = (@
$_SERVER[
'HTTPS'] ==
'on') ?
'https' :
'http';
196 return $proto .
'://' . $host .
$base;
206 $pages = array_keys($this->pages);
208 if (!(
int)
$page{0}) {
209 if (
$page{0} ==
'+') {
212 if (
$page{0} ==
'-') {
220 if (defined(
"XOOPS_URL")) {
221 return XOOPS_URL .
'/';
240 $proto = !@empty(
$_SERVER[
'SERVER_PROTOCOL']) ?
$_SERVER[
'SERVER_PROTOCOL'] :
'HTTP/1.1';
241 header(
"{$proto} {$status} {$message}");
243 header(
"Location: {$location}");
256 $ret .=
"<fieldset><legend>" . $form->getTitle() .
"</legend>\n";
259 foreach ($form->getElements() as $ele) {
261 if ($ele instanceof
Xoops\Form\Element) {
262 if (!$ele->isHidden()) {
263 if (($caption = $ele->getCaption()) !=
'') {
264 $ret .=
"<label class='xolabel' for='" . $ele->getName() .
"'>" . $caption .
"</label>";
265 if (($desc = $ele->getDescription()) !=
'') {
266 $ret .=
"<div class='xoform-help'>";
271 $ret .= $ele->render() .
"\n";
273 $hidden .= $ele->render() .
"\n";
277 $ret .=
"</fieldset>\n" . $hidden .
"\n" . $form->renderValidationJS(
true);
283 $cache = array(1,2,3);
284 if (!empty($cache)) {
285 for (
$i = 0;
$i < count($cache); ++
$i) {
286 switch ($cache[
$i]) {
288 $files = glob($cacheFolder.
'/caches/smarty_cache/*.*');
289 foreach (
$files as $filename) {
290 if (basename(strtolower($filename)) !=
'index.html') {
297 $files = glob($cacheFolder .
'/caches/smarty_compile/*.*');
298 foreach (
$files as $filename) {
299 if (basename(strtolower($filename)) !=
'index.html') {
306 $files = glob($cacheFolder .
'/caches/xoops_cache/*.*');
307 foreach (
$files as $filename) {
308 if (basename(strtolower($filename)) !=
'index.html') {
redirectToPage($page, $status=303, $message= 'See other')
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
install_acceptUser($hash= '')