2022-11-23 15:52:33 +01:00
@ extends ( 'layouts.installing' )
@ Push ( 'installer-body' )
< div class = " container " >
@ if ( $_SERVER [ 'QUERY_STRING' ] === '' )
{{ -- Landing page -- }}
2022-12-02 16:30:10 +01:00
@ if ( ! DB :: table ( 'users' ) -> get () -> isEmpty ())
@ php
if ( file_exists ( base_path ( " INSTALLING " ))){ unlink ( base_path ( " INSTALLING " ));}
header ( " Refresh:0 " );
@ endphp
@ else
2022-11-23 15:52:33 +01:00
< div class = " logo-container fadein " >
2023-04-26 15:44:39 +02:00
< img class = " logo-img " src = " { { asset('assets/linkstack/images/logo.svg') }} " alt = " Logo " >
2022-11-23 15:52:33 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< h1 > {{ __ ( 'messages.Setup LinkStack' )}} </ h1 >
2022-11-23 15:52:33 +01:00
< p class = " inst-txt " >
< div class = " left-txt glass-container " >
2023-06-13 15:39:39 +02:00
{{ __ ( 'messages.Welcome to the setup for LinkStack!' )}} < br >< br >
< b > {{ __ ( 'messages.This setup will:' )}} </ b >< br >
{{ __ ( 'messages.Check the server dependencies' )}} < br >
{{ __ ( 'messages.Setup the database' )}} < br >
{{ __ ( 'messages.Create the admin user' )}} < br >
{{ __ ( 'messages.Configure the app' )}} < br >
2022-12-02 16:30:10 +01:00
</ div ></ p >
2023-06-13 15:19:39 +02:00
{{ -- start language -- }}
< ? php $configValue2 = str_replace ( '"' , " " , EnvEditor :: getKey ( 'LOCALE' )); ?>
< form id = " language-form " action = " { { route('editConfigInstaller')}} " enctype = " multipart/form-data " method = " post " >
< div class = " form-group col-lg-8 " >
< input value = " homeurl " name = " type " style = " display:none; " type = " text " class = " form-control form-control-lg " required >
< input value = " LOCALE " name = " entry " style = " display:none; " type = " text " class = " form-control form-control-lg " required >
2023-06-13 15:39:39 +02:00
< p class = " text-muted " > {{ __ ( 'messages.Choose a language' )}} </ p >
2023-06-13 15:19:39 +02:00
< div class = " input-group " >
< select style = " max-width:600px;min-width:300px; " class = " form-control " name = " value " >
@ if ( $configValue2 != '' )
< option > {{ $configValue2 }} </ option >
@ endif
< ? php
try {
$langFolders = array_filter ( glob ( base_path ( 'resources/lang' ) . '/*' ), 'is_dir' );
} catch ( \Exception $e ) {
$langFolders = [];
}
foreach ( $langFolders as $folder ) {
$folderName = basename ( $folder );
if ( $folderName != $configValue2 ) {
echo '<option>' . $folderName . '</option>' ;
}
}
?>
</ select >
</ div >
</ div >
< input type = " hidden " name = " _token " value = " { { csrf_token()}} " >
< script type = " text/javascript " >
document . getElementById ( " language-form " ) . addEventListener ( " change " , function () {
this . submit ();
});
</ script >
</ form >
{{ -- end language -- }}
2023-06-13 15:39:39 +02:00
& ensp ; < a class = " btn " href = " { { url('?2')}} " >< button > {{ __ ( 'messages.Next' )}} </ button ></ a >& ensp ;
2022-12-02 16:30:10 +01:00
@ endif
2022-11-23 15:52:33 +01:00
@ endif
@ if ( $_SERVER [ 'QUERY_STRING' ] === 'error' )
{{ -- Landing page -- }}
< div class = " logo-container fadein " >
2023-04-26 15:44:39 +02:00
< img class = " logo-img " src = " { { asset('assets/linkstack/images/logo.svg') }} " alt = " Logo " >
2022-11-23 15:52:33 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< h1 > {{ __ ( 'messages.Setup failed' )}} </ h1 >
< p class = " inst-txt " > {{ __ ( 'messages.An error has occured. Please try again' )}} </ p >
2022-11-23 15:52:33 +01:00
< div class = " row " >
2023-06-13 15:39:39 +02:00
& ensp ; < a class = " btn " href = " { { url('')}} " >< button > {{ __ ( 'messages.Try again' )}} </ button ></ a >& ensp ;
2022-11-23 15:52:33 +01:00
</ div >
@ endif
@ if ( $_SERVER [ 'QUERY_STRING' ] === '2' )
{{ -- Landing page -- }}
< div class = " logo-container fadein " >
2023-04-26 15:44:39 +02:00
< img class = " logo-img " src = " { { asset('assets/linkstack/images/logo.svg') }} " alt = " Logo " >
2022-11-23 15:52:33 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< h1 > {{ __ ( 'messages.Dependency check' )}} </ h1 >
< p class = " inst-txt " > {{ __ ( 'messages.Required PHP modules:' )}} </ p >
2022-11-23 15:52:33 +01:00
< div class = " left-txt glass-container " >
< table style = " width:115% " >
< style >. bi - x - lg { color : tomato } </ style >
< tr >< td > BCMath : </ td >< td >@ if ( extension_loaded ( 'bcmath' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > Ctype : </ td >< td >@ if ( extension_loaded ( 'Ctype' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > cURL : </ td >< td >@ if ( extension_loaded ( 'cURL' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > DOM : </ td >< td >@ if ( extension_loaded ( 'DOM' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > Fileinfo : </ td >< td >@ if ( extension_loaded ( 'Fileinfo' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > JSON : </ td >< td >@ if ( extension_loaded ( 'JSON' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
2023-05-10 15:08:20 +02:00
< tr >< td > iconv : </ td >< td >@ if ( extension_loaded ( 'iconv' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
2022-11-23 15:52:33 +01:00
< tr >< td > Mbstring : </ td >< td >@ if ( extension_loaded ( 'Mbstring' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > OpenSSL : </ td >< td >@ if ( extension_loaded ( 'OpenSSL' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > PCRE : </ td >< td >@ if ( extension_loaded ( 'PCRE' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > PDO : </ td >< td >@ if ( extension_loaded ( 'PDO' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > Tokenizer : </ td >< td >@ if ( extension_loaded ( 'Tokenizer' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > XML : </ td >< td >@ if ( extension_loaded ( 'XML' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
</ table >
< br >
2023-06-13 15:39:39 +02:00
< b style = " font-size:90%;margin-bottom:5px;display:flex; " > {{ __ ( 'messages.Depending on your database type:' )}} </ b >
2022-11-23 15:52:33 +01:00
< table style = " width:123% " >
< tr >< td > SQLite : </ td >< td >@ if ( extension_loaded ( 'PDO_SQLite' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
< tr >< td > MySQL : </ td >< td >@ if ( extension_loaded ( 'PDO_MySQL' )) < i class = " bi bi-check-lg " ></ i >@ else < i class = " bi bi-x-lg " ></ i >@ endif </ td ></ tr >
</ table >
</ div >< br >
< div class = " row " >
2023-06-13 15:39:39 +02:00
& ensp ; < a class = " btn " href = " ?3 " >< button > {{ __ ( 'messages.Next' )}} </ button ></ a >& ensp ;
2022-11-23 15:52:33 +01:00
</ div >
@ endif
@ if ( $_SERVER [ 'QUERY_STRING' ] === '3' )
{{ -- Landing page -- }}
< div class = " logo-container fadein " >
2023-04-26 15:44:39 +02:00
< img class = " logo-img " src = " { { asset('assets/linkstack/images/logo.svg') }} " alt = " Logo " >
2022-11-23 15:52:33 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< h1 > {{ __ ( 'messages.Setup LinkStack' )}} </ h1 >
< p class = " inst-txt " > {{ __ ( 'messages.Select a database type' )}} </ p >
< p > {{ __ ( 'messages.Under most circumstances, we recommend using SQLite' )}}
< br >
{{ __ ( 'messages.MySQL requires a separate, empty MySQL database' )}} </ p >< br >
2022-11-23 15:52:33 +01:00
< form id = " home-url-form " action = " { { route('db')}} " enctype = " multipart/form-data " method = " post " >
< div class = " form-group col-lg-8 " >
< div class = " input-group " >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Database type:' )}} </ label >
2022-11-23 15:52:33 +01:00
< select style = " max-width:300px " class = " form-control " name = " database " >
< option > SQLite </ option >
< option > MySQL </ option >
</ select >
</ div ></ div >< br >< br >
< input type = " hidden " name = " _token " value = " { { csrf_token()}} " >
2023-06-13 15:39:39 +02:00
< button type = " submit " class = " mt-3 ml-3 btn btn-info " > {{ __ ( 'messages.Next' )}} </ button >
2022-11-23 15:52:33 +01:00
</ form >
@ endif
@ if ( $_SERVER [ 'QUERY_STRING' ] === 'mysql' )
{{ -- Landing page -- }}
< div class = " logo-container fadein " >
2023-04-26 15:44:39 +02:00
< img class = " logo-img " src = " { { asset('assets/linkstack/images/logo.svg') }} " alt = " Logo " >
2022-11-23 15:52:33 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< h1 > {{ __ ( 'messages.Setup LinkStack' )}} </ h1 >
2022-11-23 15:52:33 +01:00
< p class = " inst-txt " > MySQL </ p >
< form id = " home-url-form " action = " { { route('mysql')}} " enctype = " multipart/form-data " method = " post " >
< div class = " form-group col-lg-8 " >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Database host:' )}} </ label >
2022-11-23 15:52:33 +01:00
< input style = " max-width:275px; " class = " form-control " name = " host " type = " text " required >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Database port:' )}} </ label >
2022-11-23 15:52:33 +01:00
< input style = " max-width:275px; " class = " form-control " name = " port " type = " text " required >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Database name:' )}} </ label >
2022-11-23 15:52:33 +01:00
< input style = " max-width:275px; " class = " form-control " name = " name " type = " text " required >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Database username:' )}} </ label >
2022-11-23 15:52:33 +01:00
< input style = " max-width:275px; " class = " form-control " name = " username " type = " text " required >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Database password:' )}} </ label >
2022-11-23 15:52:33 +01:00
< input style = " max-width:275px; " class = " form-control " name = " password " type = " password " />
< div class = " input-group " >
</ div ></ div >< br >
< input type = " hidden " name = " _token " value = " { { csrf_token()}} " >
2023-06-13 15:39:39 +02:00
< button type = " submit " class = " mt-3 ml-3 btn btn-info " > {{ __ ( 'messages.Next' )}} </ button >
2022-11-23 15:52:33 +01:00
</ form >
< div class = " row " >
</ div >
@ endif
@ if ( $_SERVER [ 'QUERY_STRING' ] === '4' )
{{ -- Landing page -- }}
< div class = " logo-container fadein " >
2023-04-26 15:44:39 +02:00
< img class = " logo-img " src = " { { asset('assets/linkstack/images/logo.svg') }} " alt = " Logo " >
2022-11-23 15:52:33 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< h1 > {{ __ ( 'messages.Setup LinkStack' )}} </ h1 >
< p class = " inst-txt " > {{ __ ( 'messages.Create an admin account' )}} </ p >
2022-11-23 15:52:33 +01:00
< form id = " home-url-form " action = " { { route('createAdmin')}} " enctype = " multipart/form-data " method = " post " >
< div class = " form-group col-lg-8 " >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Admin email:' )}} </ label >
2022-11-23 15:52:33 +01:00
< input style = " max-width:275px; " class = " form-control " placeholder = " admin@admin.com " name = " email " type = " email " required >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Admin password:' )}} </ label >
2022-11-23 15:52:33 +01:00
< input style = " max-width:275px; " class = " form-control " placeholder = " 12345678 " name = " password " type = " password " required >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Handle:' )}} </ label >
2022-11-23 22:09:59 +01:00
< div class = " input-group " >
< div class = " input-group-prepend " >< div class = " input-group-text " >@</ div ></ div >
2023-01-31 17:04:51 +01:00
< input style = " max-width:237px; padding-left:50px; " class = " form-control " name = " handle " type = " text " required >
2022-11-23 22:09:59 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Name:' )}} </ label >
2023-01-31 17:04:51 +01:00
< input style = " max-width:275px; " class = " form-control " name = " name " type = " text " required >
2022-11-23 15:52:33 +01:00
< div class = " input-group " >
</ div ></ div >< br >
< input type = " hidden " name = " _token " value = " { { csrf_token()}} " >
2023-06-13 15:39:39 +02:00
< button type = " submit " class = " mt-3 ml-3 btn btn-info " > {{ __ ( 'messages.Next' )}} </ button >
2022-11-23 15:52:33 +01:00
</ form >
@ endif
@ if ( $_SERVER [ 'QUERY_STRING' ] === '5' )
{{ -- Landing page -- }}
< div class = " logo-container fadein " >
2023-04-26 15:44:39 +02:00
< img class = " logo-img " src = " { { asset('assets/linkstack/images/logo.svg') }} " alt = " Logo " >
2022-11-23 15:52:33 +01:00
</ div >
2023-06-13 15:39:39 +02:00
< h1 > {{ __ ( 'messages.Setup LinkStack' )}} </ h1 >
< p class = " inst-txt " > {{ __ ( 'messages.Configure your page' )}} </ p >
2022-11-23 15:52:33 +01:00
< form id = " home-url-form " action = " { { route('options')}} " enctype = " multipart/form-data " method = " post " >
< div class = " form-group col-lg-8 " >
< div class = " input-group " >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Enable registration:' )}} </ label >
2022-11-23 15:52:33 +01:00
< select style = " max-width:300px " class = " form-control " name = " register " >
2023-06-13 15:39:39 +02:00
< option value = " Yes " > {{ __ ( 'messages.Yes' )}} </ option >
< option value = " No " > {{ __ ( 'messages.No' )}} </ option >
2022-11-23 15:52:33 +01:00
</ select >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Enable email verification:' )}} </ label >
2022-11-23 15:52:33 +01:00
< select style = " max-width:300px " class = " form-control " name = " verify " >
2023-06-13 15:39:39 +02:00
< option value = " Yes " > {{ __ ( 'messages.Yes' )}} </ option >
< option value = " No " > {{ __ ( 'messages.No' )}} </ option >
2022-11-23 15:52:33 +01:00
</ select >
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.Set your page as Home Page' )}} </ label >
2022-11-23 22:43:23 +01:00
< select id = " select " style = " max-width:300px " class = " form-control " name = " page " >
2023-06-13 15:39:39 +02:00
< option value = " No " > {{ __ ( 'messages.No' )}} </ option >
< option value = " Yes " > {{ __ ( 'messages.Yes' )}} </ option >
2022-11-23 15:52:33 +01:00
</ select >
2022-11-23 22:48:13 +01:00
< style >. hidden { display : flex ! important ;} </ style >
2023-06-13 15:39:39 +02:00
< span class = " " id = " hidden " style = " display:none;margin-top:-22px;margin-bottom:10px;color:#6c757d;font-size:90%; " > {{ __ ( 'messages.This will move the Home Page to /home' )}} </ span >
2023-04-26 15:44:39 +02:00
< script src = " { { asset('assets/external-dependencies/jquery-3.4.1.min.js') }} " ></ script >
2022-11-23 22:43:23 +01:00
< script >
$ ( " #select " ) . change ( function (){
if ( $ ( this ) . val () == " Yes " ) {
$ ( '#hidden' ) . addClass ( 'hidden' );
} else {
$ ( '#hidden' ) . removeClass ( 'hidden' );
}
});
</ script >
2022-11-23 15:52:33 +01:00
2023-06-13 15:39:39 +02:00
< label > {{ __ ( 'messages.App Name:' )}} </ label >
2023-04-26 15:44:39 +02:00
< input style = " max-width:275px; " class = " form-control " value = " LinkStack " name = " app " type = " text " required >
2022-11-23 15:52:33 +01:00
</ div ></ div >< br >
< input type = " hidden " name = " _token " value = " { { csrf_token()}} " >
2023-06-13 15:39:39 +02:00
< button type = " submit " class = " mt-3 ml-3 btn btn-info " > {{ __ ( 'messages.Finish setup' )}} </ button >
2022-11-23 15:52:33 +01:00
</ form >
@ endif
</ div >
@ endpush