21if ( PHP_VERSION_ID >= 70000 ) {
23 ini_set(
'error_reporting', E_ALL);
24 ini_set(
'display_errors',
'0');
28if (version_compare(PHP_VERSION,
'7.4.0',
'<')) {
29 echo
'<style>body{background:#222730;color:#bfcbd9;font-family:sans-serif;}
30 .phpalert{background:#9a0a0a;color:white;font-size:16px;font-weight:600;line-height:2;width:50%;margin:3em auto;padding:1em;border:1 px solid orange;border-radius:6px;}
31 .phpversion{background:#222730;color:#bfcbd9;border-radius:6px;padding:4px 6px}</style>
32 <div class="phpalert">Your PHP version <i class="phpversion">' . PHP_VERSION .
'</i>
33 does not satisfy XOOPSCube requirements.<br>
34 PHP version <i class="phpversion">PHP 7.4</i> is required !</div>';
72include_once
'./passwd.php';
74if ( INSTALL_USER !==
'' || INSTALL_PASSWD !==
'' ) {
75 if ( ! isset( $_SERVER[
'PHP_AUTH_USER'] ) ) {
76 header(
'WWW-Authenticate: Basic realm="XOOPSCube Installer"' );
77 header(
'HTTP/1.0 401 Unauthorized' );
78 echo
'You can not access this XOOPSCube installer.';
81 if ( INSTALL_USER !==
'' && INSTALL_USER != $_SERVER[
'PHP_AUTH_USER'] ) {
82 header(
'HTTP/1.0 401 Unauthorized' );
83 echo
'You can not access this XOOPSCube installer.';
86 if ( INSTALL_PASSWD !== $_SERVER[
'PHP_AUTH_PW'] ) {
87 header(
'HTTP/1.0 401 Unauthorized' );
88 echo
'You can not access this XOOPSCube installer.';
95include_once
'./class/textsanitizer.php';
97$myts = TextSanitizer::getInstance();
99if ( isset( $_POST ) ) {
100 foreach ( $_POST as $k => $v ) {
101 ${$k} = $myts->stripSlashesGPC( $v );
106include_once
'./include/functions.php';
108$language = getLanguage();
110include_once
'./language/' . $language .
'/install.php';
111include_once
'../language/' . $language .
'/timezone.php';
113const _OKIMG =
'<img src="img/yes.svg" alt="OK">';
114const _NGIMG =
'<img src="img/no.svg" alt="NG">';
117include_once
'./class/simplewizard.php';
120$wizard->setBaseTemplate(
'./install_tpl.php' );
121$wizard->setTemplatePath(
'./templates' );
125$wizardSeq->add(
'langselect', _INSTALL_L0,
'start', _INSTALL_L80 );
126$wizardSeq->add(
'start', _INSTALL_L0,
'modcheck', _INSTALL_L81 );
127$wizardSeq->add(
'modcheck', _INSTALL_L82,
'dbform', _INSTALL_L89);
128$wizardSeq->add(
'dbform', _INSTALL_L90,
'dbconfirm', _INSTALL_L91 );
129$wizardSeq->add(
'dbconfirm', _INSTALL_L53,
'dbsave', _INSTALL_L92,
'', _INSTALL_L93 );
130$wizardSeq->add(
'dbsave', _INSTALL_L92,
'modcheck_trust', _INSTALL_L166 );
131$wizardSeq->add(
'modcheck_trust', _INSTALL_L167,
'mainfile', _INSTALL_L94 );
132$wizardSeq->add(
'mainfile', _INSTALL_L94,
'initial', _INSTALL_L102,
'start', _INSTALL_L103 );
133$wizardSeq->add(
'initial', _INSTALL_L102,
'checkDB', _INSTALL_L104,
'start', _INSTALL_L103 );
134$wizardSeq->add(
'checkDB', _INSTALL_L104,
'createDB', _INSTALL_L105,
'start', _INSTALL_L103,
true );
135$wizardSeq->add(
'createDB', _INSTALL_L105,
'checkDB', _INSTALL_L104 );
136$wizardSeq->add(
'createTables', _INSTALL_L40,
'siteInit', _INSTALL_L112 );
137$wizardSeq->add(
'siteInit', _INSTALL_L112,
'insertData', _INSTALL_L116 );
138$wizardSeq->add(
'insertData', _INSTALL_L116,
'finish', _INSTALL_L117 );
139$wizardSeq->add(
'finish', _INSTALL_L32,
'nextStep', _INSTALL_L210 );
141if ( file_exists(
'./custom/custom.inc.php' ) ) {
142 include
'./custom/custom.inc.php';
146$xoopsOption[
'nocommon'] =
true;
147const XOOPS_INSTALL = 1;
149if ( ! empty( $_POST[
'op'] ) ) {
151} elseif ( ! empty( $_GET[
'op'] ) ) {
156$wizard->setOp( $op );
158$op = basename( $op );
159$fname =
'./wizards/install_' . $op .
'.inc.php';
160$custom_fname =
'./custom/install_' . $op .
'.inc.php';
162if ( file_exists( $fname ) ) {
164} elseif ( file_exists( $custom_fname ) ) {
165 include $custom_fname;