XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
install_mainfile.inc.php
1<?php
11
12
13// checking XOOPS_ROOT_PATH and XOOPS_URL
14include_once '../mainfile.php';
15
16$detected = str_replace( ['\\', '/install'], ['/', ''], getcwd() );
17if ( '/' === substr( $detected, - 1 ) ) {
18 $detected = substr( $detected, 0, - 1 );
19}
20
21if ( empty( $detected ) ) {
22 $wizard->addArray( 'checks', _NGIMG . _INSTALL_L95 );
23} elseif ( XOOPS_ROOT_PATH !== $detected ) {
24 $wizard->addArray( 'checks', _NGIMG . sprintf( _INSTALL_L96, $detected ) );
25} else {
26 $wizard->addArray( 'checks', _OKIMG . _INSTALL_L97 );
27}
28
29if ( ! is_dir( XOOPS_ROOT_PATH ) ) {
30 $wizard->addArray( 'checks', _NGIMG . _INSTALL_L99 );
31}
32
33if ( preg_match( '/^http[s]?:\/\/(.*)[^\/]+$/i', XOOPS_URL ) ) {
34 $wizard->addArray( 'checks', _OKIMG . _INSTALL_L100 );
35} else {
36 $wizard->addArray( 'checks', _NGIMG . _INSTALL_L101 );
37}
38
39$wizard->render( 'install_mainfile.tpl.php' );