Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
034deb05fc
|
|
@ -16,7 +16,7 @@ return [
|
|||
|
||||
'enabled' => env('DEBUGBAR_ENABLED', null),
|
||||
'except' => [
|
||||
//
|
||||
'telescope*'
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ return array(
|
|||
|
|
||||
| Enter the routes name to enable dynamic imagecache manipulation.
|
||||
| This handle will define the first part of the URI:
|
||||
|
|
||||
|
|
||||
| {route}/{template}/{filename}
|
||||
|
|
||||
|
|
||||
| Examples: "images", "img/cache"
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
'route' => 'cache',
|
||||
|
||||
/*
|
||||
|
|
@ -23,13 +23,13 @@ return array(
|
|||
| Storage paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following paths will be searched for the image filename, submited
|
||||
| by URI.
|
||||
|
|
||||
| The following paths will be searched for the image filename, submited
|
||||
| by URI.
|
||||
|
|
||||
| Define as many directories as you like.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
'paths' => array(
|
||||
storage_path('app/public'),
|
||||
public_path('storage')
|
||||
|
|
@ -41,7 +41,7 @@ return array(
|
|||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify your own manipulation filter templates.
|
||||
| The keys of this array will define which templates
|
||||
| The keys of this array will define which templates
|
||||
| are available in the URI:
|
||||
|
|
||||
| {route}/{template}/{filename}
|
||||
|
|
@ -50,7 +50,7 @@ return array(
|
|||
| will be applied, by its fully qualified name.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
'templates' => array(
|
||||
'small' => 'Webkul\Product\CacheFilters\Small',
|
||||
'medium' => 'Webkul\Product\CacheFilters\Medium',
|
||||
|
|
@ -65,7 +65,7 @@ return array(
|
|||
| Lifetime in minutes of the images handled by the imagecache route.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
'lifetime' => 43200,
|
||||
|
||||
);
|
||||
);
|
||||
|
|
@ -2,6 +2,21 @@
|
|||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add additional Artisan commands that should
|
||||
| be available within the Tinker environment. Once the command is in
|
||||
| this array you may execute the command in Tinker using its name.
|
||||
|
|
||||
*/
|
||||
|
||||
'commands' => [
|
||||
// App\Console\Commands\ExampleCommand::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Alias Blacklist
|
||||
|
|
|
|||
|
|
@ -113,4 +113,4 @@ return [
|
|||
|
|
||||
*/
|
||||
'to_array_always_loads_translations' => true,
|
||||
];
|
||||
];
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
<label for="type" class="required">{{ __('admin::app.catalog.products.product-type') }}</label>
|
||||
<select class="control" v-validate="'required'" id="type" name="type" {{ $familyId ? 'disabled' : '' }} data-vv-as=""{{ __('admin::app.catalog.products.product-type') }}"">
|
||||
@foreach($productTypes as $key => $productType)
|
||||
<option value="{{ $key }}">{{ $productType['name'] }}</option>
|
||||
<option value="{{ $key }}" {{ $key == $productType['key'] ? 'selected' : '' }}>{{ $productType['name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
@if (isset($field['repository']))
|
||||
@foreach ($value as $key => $option)
|
||||
|
||||
<option value="{{ $key }}" {{ $option == $selectedOption ? 'selected' : ''}}>
|
||||
<option value="{{ $key }}" {{ $key == $selectedOption ? 'selected' : ''}}>
|
||||
{{ trans($option) }}
|
||||
</option>
|
||||
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
@if (isset($field['repository']))
|
||||
@foreach ($value as $key => $option)
|
||||
|
||||
<option value="{{ $value[$key] }}" {{ in_array($value[$key], explode(',', $selectedOption)) ? 'selected' : ''}}>
|
||||
<option value="{{ $key }}" {{ in_array($key, explode(',', $selectedOption)) ? 'selected' : ''}}>
|
||||
{{ trans($value[$key]) }}
|
||||
</option>
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
} else {
|
||||
$('.tree-container').addClass('hide')
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
"dependencies": {
|
||||
"vee-validate": "2.0.0-rc.26",
|
||||
"vue-flatpickr": "^2.3.0",
|
||||
"vue-slider-component": "^2.7.5"
|
||||
"vue-slider-component": "^2.7.5",
|
||||
"ez-plus":"^1.2.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=391400bc9a994e60b97f",
|
||||
"/css/shop.css": "/css/shop.css?id=460297557fd9ee391499"
|
||||
}
|
||||
"/js/shop.js": "/js/shop.js?id=412d129ed770afb5dee3",
|
||||
"/css/shop.css": "/css/shop.css?id=aa96d0d4c9331da1e0c2"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ window.Vue = require("vue");
|
|||
window.VeeValidate = require("vee-validate");
|
||||
window.axios = require("axios");
|
||||
require("./bootstrap");
|
||||
require("ez-plus/src/jquery.ez-plus.js");
|
||||
|
||||
Vue.use(VeeValidate);
|
||||
Vue.prototype.$http = axios
|
||||
|
|
|
|||
|
|
@ -931,7 +931,7 @@ section.slider-block {
|
|||
width: 300px;
|
||||
|
||||
.btn.btn-sm {
|
||||
padding: 9px 30px;
|
||||
padding: 9px 25px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1120,7 +1120,7 @@ section.slider-block {
|
|||
white-space: nowrap;
|
||||
border: 1px solid $border-color;
|
||||
background-color:white;
|
||||
z-index: 1;
|
||||
z-index: 10000;
|
||||
left: -99999em;
|
||||
}
|
||||
|
||||
|
|
@ -1822,6 +1822,7 @@ section.product-detail {
|
|||
|
||||
.details {
|
||||
width: 50%;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
.product-price {
|
||||
margin-bottom: 14px;
|
||||
|
|
@ -3483,7 +3484,6 @@ section.review {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// rtl css start here
|
||||
.rtl {
|
||||
direction: rtl;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
{!! view_render_event('bagisto.shop.home.content.before') !!}
|
||||
|
||||
{!! DbView::make(core()->getCurrentChannel())->field('home_page_content')->with(['sliderData' => $sliderData])->render() !!}
|
||||
|
||||
|
||||
{{ view_render_event('bagisto.shop.home.content.after') }}
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
window.flashMessages = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
<i class="icon arrow-up-white-icon"></i>
|
||||
</li>
|
||||
|
||||
<li class="thumb-frame" v-for='(thumb, index) in thumbs' @mouseover="changeImage(thumb)" :class="[thumb.large_image_url == currentLargeImageUrl ? 'active' : '']">
|
||||
<img :src="thumb.small_image_url"/>
|
||||
<li class="thumb-frame" v-for='(thumb, index) in thumbs' @mouseover="changeImage(thumb)" :class="[thumb.large_image_url == currentLargeImageUrl ? 'active' : '']" id="thumb-frame">
|
||||
<img :src="thumb.small_image_url" :data-image="thumb.original_image_url" :data-zoom-image="thumb.original_image_url"/>
|
||||
</li>
|
||||
|
||||
<li class="gallery-control bottom" @click="moveThumbs('bottom')" v-if="(thumbs.length > 4) && this.is_move.down">
|
||||
|
|
@ -143,4 +143,21 @@
|
|||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var image = $('#thumb-frame img');
|
||||
var zoomImage = $('img#pro-img');
|
||||
|
||||
zoomImage.ezPlus();
|
||||
|
||||
image.mouseover( function(){
|
||||
$('.zoomContainer').remove();
|
||||
zoomImage.removeData('elevateZoom');
|
||||
zoomImage.attr('src', $(this).data('image'));
|
||||
zoomImage.data('zoom-image', $(this).data('zoom-image'));
|
||||
zoomImage.ezPlus();
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -1,18 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container admin" id="admin">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src="Images/logo.svg">
|
||||
<div class="initial-display">
|
||||
<p>Admin Details</p>
|
||||
|
||||
<form action="AdminConfig.php" method= "POST" id="admin-form">
|
||||
|
|
@ -33,13 +24,13 @@
|
|||
<div class="control-group" id="admin_password">
|
||||
<label for="admin_password" class="required">Password</label>
|
||||
<input type="password" name="admin_password" class="control"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
data-validation="length required" data-validation-length="min6">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="admin_re_password">
|
||||
<label for="admin_re_password" class="required">Re-Password</label>
|
||||
<input type="password" name="admin_re_password" class="control"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
data-validation="length required" data-validation-length="min6">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -49,10 +40,6 @@
|
|||
</form>
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
<img class="left-patern" src="Images/left-side.svg">
|
||||
<img class="right-patern" src="Images/right-side.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
@ -63,7 +50,6 @@
|
|||
$.validate({});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// process the form
|
||||
|
|
@ -77,10 +63,12 @@
|
|||
'admin_password' : $('input[name=admin_password]').val(),
|
||||
'admin_re_password' : $('input[name=admin_re_password]').val(),
|
||||
};
|
||||
|
||||
var adminTarget = window.location.href.concat('/AdminConfig.php');
|
||||
// process the form
|
||||
$.ajax({
|
||||
type : 'POST', // define the type of HTTP verb we want to use (POST for our form)
|
||||
url : 'AdminConfig.php', // the url where we want to POST
|
||||
url : adminTarget, // the url where we want to POST
|
||||
data : formData, // our data object
|
||||
dataType : 'json', // what type of data do we expect back from the server
|
||||
encode : true
|
||||
|
|
|
|||
|
|
@ -41,17 +41,16 @@ $data = array();
|
|||
$envFile = $desiredLocation . '/' . '.env';
|
||||
|
||||
// reading env content
|
||||
$str= file_get_contents($envFile);
|
||||
|
||||
// converting env content to key/value pair
|
||||
$data = explode(PHP_EOL,$str);
|
||||
$data = file($envFile);
|
||||
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION'];
|
||||
|
||||
$key = $value = [];
|
||||
|
||||
if ($data) {
|
||||
foreach ($data as $line) {
|
||||
$line = preg_replace('/\s+/', '', $line);
|
||||
$rowValues = explode('=', $line);
|
||||
if (count($rowValues) === 2) {
|
||||
|
||||
if (strlen($line) !== 0) {
|
||||
if (in_array($rowValues[0], $databaseArray)) {
|
||||
$key[] = $rowValues[0];
|
||||
$value[] = $rowValues[1];
|
||||
|
|
|
|||
|
|
@ -1,112 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Permission {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $results = [];
|
||||
|
||||
/**
|
||||
* Set the result array permissions and errors.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->results['permissions'] = [];
|
||||
|
||||
$this->results['errors'] = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for the folders permissions.
|
||||
*
|
||||
* @param array $folders
|
||||
* @return array
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
$folders = [
|
||||
// 'permissions' => [
|
||||
'storage/framework/' => '775',
|
||||
'storage/logs/' => '775',
|
||||
'bootstrap/cache/' => '775'
|
||||
// ]
|
||||
];
|
||||
|
||||
foreach($folders as $folder => $permission)
|
||||
{
|
||||
if (!($this->getPermission($folder) >= $permission)) {
|
||||
$this->addFileAndSetErrors($folder, $permission, false);
|
||||
} else {
|
||||
$this->addFile($folder, $permission, true);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a folder permission.
|
||||
*
|
||||
* @param $folder
|
||||
* @return string
|
||||
*/
|
||||
private function getPermission($folder)
|
||||
{
|
||||
$location = str_replace('\\', '/', getcwd());
|
||||
$currentLocation = explode("/", $location);
|
||||
array_pop($currentLocation);
|
||||
array_pop($currentLocation);
|
||||
$desiredLocation = implode("/", $currentLocation);
|
||||
$fileLocation = $desiredLocation . '/' .$folder;
|
||||
|
||||
return substr(sprintf('%o', fileperms($fileLocation)), -4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the file to the list of results.
|
||||
*
|
||||
* @param $folder
|
||||
* @param $permission
|
||||
* @param $isSet
|
||||
*/
|
||||
private function addFile($folder, $permission, $isSet)
|
||||
{
|
||||
array_push($this->results['permissions'], [
|
||||
'folder' => $folder,
|
||||
'permission' => $permission,
|
||||
'isSet' => $isSet
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the file and set the errors.
|
||||
*
|
||||
* @param $folder
|
||||
* @param $permission
|
||||
* @param $isSet
|
||||
*/
|
||||
private function addFileAndSetErrors($folder, $permission, $isSet)
|
||||
{
|
||||
$this->addFile($folder, $permission, $isSet);
|
||||
|
||||
$this->results['errors'] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render view for class.
|
||||
*
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
ob_start();
|
||||
|
||||
$permissions = $this->check();
|
||||
|
||||
include __DIR__ . '/../Views/permission.blade.php';
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
|
@ -24,9 +24,6 @@ $data = array();
|
|||
if (empty($_POST['user_name']))
|
||||
$errors['user_name'] = 'User Name is required.';
|
||||
|
||||
if (empty($_POST['user_password']))
|
||||
$errors['user_password'] = 'User Password is required.';
|
||||
|
||||
if (empty($_POST['port_name']))
|
||||
$errors['port_name'] = 'Port Name is required.';
|
||||
|
||||
|
|
@ -83,20 +80,16 @@ $data = array();
|
|||
}
|
||||
|
||||
// reading env content
|
||||
$str= file_get_contents($envFile);
|
||||
|
||||
// converting env content to key/value pair
|
||||
$data = explode(PHP_EOL,$str);
|
||||
$data = file($envFile);
|
||||
$keyValueData = [];
|
||||
|
||||
if ($data) {
|
||||
foreach ($data as $line) {
|
||||
$line = preg_replace('/\s+/', '', $line);
|
||||
$rowValues = explode('=', $line);
|
||||
if (count($rowValues) === 2) {
|
||||
|
||||
if (strlen($line) !== 0) {
|
||||
$keyValueData[$rowValues[0]] = $rowValues[1];
|
||||
} else if (count($rowValues) > 2) {
|
||||
$eqPos = strpos($line, '=');
|
||||
$keyValueData[substr($line, 0, $eqPos)] = substr($line,$eqPos+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,102 +1,87 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container environment" id="environment">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src="Images/logo.svg">
|
||||
<div class="initial-display">
|
||||
<p>Environment Configuration</p>
|
||||
|
||||
<form action="EnvConfig.php" method="POST" id="environment-form">
|
||||
<div class="content">
|
||||
<div class="databse-error" style="text-align: center; padding-top: 10px" id="database_error">
|
||||
<form action="EnvConfig.php" method="POST" id="environment-form">
|
||||
<div class="content">
|
||||
<div class="databse-error" style="text-align: center; padding-top: 10px" id="database_error">
|
||||
</div>
|
||||
<div class="form-container" style="padding: 10%; padding-top: 35px">
|
||||
<div class="control-group" id="app_name">
|
||||
<label for="app_name" class="required">App Name</label>
|
||||
<input type = "text" name = "app_name" class = "control"
|
||||
value = "Bagisto_"
|
||||
data-validation="required length" data-validation-length="max50"
|
||||
>
|
||||
</div>
|
||||
<div class="form-container" style="padding: 10%; padding-top: 35px">
|
||||
<div class="control-group" id="app_name">
|
||||
<label for="app_name" class="required">App Name</label>
|
||||
<input type = "text" name = "app_name" class = "control"
|
||||
value = "Bagisto_"
|
||||
data-validation="required length" data-validation-length="max50"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="app_url">
|
||||
<label for="app_url" class="required">App URL</label>
|
||||
<input type="text" name="app_url" class="control"
|
||||
placeholder="http://localhost"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
<div class="control-group" id="app_url">
|
||||
<label for="app_url" class="required">App URL</label>
|
||||
<input type="text" name="app_url" class="control"
|
||||
placeholder="http://localhost"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="database_connection" class="required">
|
||||
Database Connection
|
||||
</label>
|
||||
<select name="database_connection" id="database_connection" class="control">
|
||||
<option value="mysql" selected>Mysql</option>
|
||||
<option value="sqlite">SQlite</option>
|
||||
<option value="pgsql">pgSQL</option>
|
||||
<option value="sqlsrv">SQLSRV</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="database_connection" class="required">
|
||||
Database Connection
|
||||
</label>
|
||||
<select name="database_connection" id="database_connection" class="control">
|
||||
<option value="mysql" selected>Mysql</option>
|
||||
<option value="sqlite">SQlite</option>
|
||||
<option value="pgsql">pgSQL</option>
|
||||
<option value="sqlsrv">SQLSRV</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="port_name">
|
||||
<label for="port_name" class="required">Database Port</label>
|
||||
<input type="text" name="port_name" class="control"
|
||||
placeholder="3306"
|
||||
data-validation="required alphanumeric number length" data-validation-length="max4">
|
||||
</div>
|
||||
<div class="control-group" id="port_name">
|
||||
<label for="port_name" class="required">Database Port</label>
|
||||
<input type="text" name="port_name" class="control"
|
||||
placeholder="3306"
|
||||
data-validation="required alphanumeric number length" data-validation-length="max4">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="host_name">
|
||||
<label for="host_name" class="required">Database Host</label>
|
||||
<input type="text" name="host_name" class="control"
|
||||
placeholder="127.0.0.1"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
<div class="control-group" id="host_name">
|
||||
<label for="host_name" class="required">Database Host</label>
|
||||
<input type="text" name="host_name" class="control"
|
||||
placeholder="127.0.0.1"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="database_name">
|
||||
<label for="database_name" class="required">Database Name</label>
|
||||
<input type="text" name="database_name" class="control"
|
||||
placeholder="database name"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
<div class="control-group" id="database_name">
|
||||
<label for="database_name" class="required">Database Name</label>
|
||||
<input type="text" name="database_name" class="control"
|
||||
placeholder="database name"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="user_name">
|
||||
<label for="user_name" class="required">User Name</label>
|
||||
<input type="text" name="user_name" class="control"
|
||||
value = "bagisto_"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
<div class="control-group" id="user_name">
|
||||
<label for="user_name" class="required">User Name</label>
|
||||
<input type="text" name="user_name" class="control"
|
||||
value = "bagisto_"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="user_password">
|
||||
<label for="user_password" class="required">User Password</label>
|
||||
<input type="text" name="user_password" class="control"
|
||||
placeholder="database password"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
<div class="control-group" id="user_password">
|
||||
<label for="user_password" class="required">User Password</label>
|
||||
<input type="text" name="user_password" class="control"
|
||||
placeholder="database password">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="prepare-btn" id="environment-check">Save & Continue</button>
|
||||
<div style="cursor: pointer; margin-top:10px">
|
||||
<span id="envronment-back">back</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="prepare-btn" id="environment-check">Save & Continue</button>
|
||||
<div style="cursor: pointer; margin-top:10px">
|
||||
<span id="envronment-back">back</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<img class="left-patern" src="Images/left-side.svg">
|
||||
<img class="right-patern" src="Images/right-side.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
@ -125,13 +110,14 @@
|
|||
'user_name' : $('input[name=user_name]').val(),
|
||||
'user_password' : $('input[name=user_password]').val(),
|
||||
'database_connection' : $("#database_connection" ).val(),
|
||||
|
||||
};
|
||||
|
||||
var target = window.location.href.concat('/EnvConfig.php');
|
||||
|
||||
// process the form
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : 'EnvConfig.php',
|
||||
url : target,
|
||||
data : formData,
|
||||
dataType : 'json',
|
||||
encode : true
|
||||
|
|
|
|||
|
|
@ -1,16 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container finish" id="finish">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src="Images/logo.svg">
|
||||
<div class="initial-display">
|
||||
<p>Finish Installment</p>
|
||||
<div class="content">
|
||||
<div class="content-container" style="padding: 20px">
|
||||
|
|
@ -23,10 +16,6 @@
|
|||
<button class="prepare-btn" onclick="finish()">Finish</button>
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
<img class="left-patern" src="Images/left-side.svg">
|
||||
<img class="right-patern" src="Images/right-side.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
@ -37,8 +26,8 @@
|
|||
|
||||
function finish() {
|
||||
lastIndex = window.location.href.lastIndexOf("/");
|
||||
secondlast = window.location.href.slice(0,lastIndex).lastIndexOf("/");
|
||||
next = window.location.href.slice(0,secondlast);
|
||||
secondlast = window.location.href.slice(0, lastIndex).lastIndexOf("/");
|
||||
next = window.location.href.slice(0, secondlast);
|
||||
next = next.concat('/admin/login');
|
||||
window.location.href = next;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
||||
</head>
|
||||
|
||||
<style>
|
||||
.window {
|
||||
|
|
@ -59,8 +53,7 @@
|
|||
<body>
|
||||
|
||||
<div class="container migration" id="migration">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src="Images/logo.svg">
|
||||
<div class="initial-display">
|
||||
<p>Migration & Seed</p>
|
||||
|
||||
<div class="cp-spinner cp-round" id="loader">
|
||||
|
|
@ -115,10 +108,6 @@
|
|||
</form>
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
<img class="left-patern" src="Images/left-side.svg">
|
||||
<img class="right-patern" src="Images/right-side.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
@ -144,10 +133,12 @@
|
|||
$('#storage').hide();
|
||||
$('#composer').hide();
|
||||
|
||||
var composerTarget = window.location.href.concat('/Composer.php');
|
||||
|
||||
// process form
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : 'Composer.php',
|
||||
url : composerTarget,
|
||||
dataType : 'json',
|
||||
encode : true
|
||||
})
|
||||
|
|
@ -163,10 +154,12 @@
|
|||
if (data['install'] == 0) {
|
||||
$('#composer-migrate').show();
|
||||
|
||||
var migrationTarget = window.location.href.concat('/MigrationRun.php');
|
||||
|
||||
// post the request again
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : 'MigrationRun.php',
|
||||
url : migrationTarget,
|
||||
dataType : 'json',
|
||||
encode : true
|
||||
})
|
||||
|
|
@ -178,9 +171,11 @@
|
|||
if (data['results'] == 0) {
|
||||
$('#composer-seed').show();
|
||||
|
||||
var seederTarget = window.location.href.concat('/Seeder.php');
|
||||
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : 'Seeder.php',
|
||||
url : seederTarget,
|
||||
dataType : 'json',
|
||||
encode : true
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
ini_set('max_execution_time', 300);
|
||||
|
||||
// array to pass back data
|
||||
$data = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ $data = array();
|
|||
// run command on terminal
|
||||
$key = 'cd ../.. && php artisan key:generate 2>&1';
|
||||
$seeder = 'cd ../.. && php artisan db:seed 2>&1';
|
||||
$publish = 'cd ../.. && php artisan vendor:publish 2>&1';
|
||||
$publish = 'cd ../.. && php artisan vendor:publish --all --force 2>&1';
|
||||
|
||||
$key_output = exec($key, $data['key'], $data['key_results']);
|
||||
$seeder_output = exec($seeder, $data['seeder'], $data['seeder_results']);
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container permission" id="permission">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src="Images/logo.svg">
|
||||
<p>Permission</p>
|
||||
|
||||
<div class="content">
|
||||
<div class="title" style="text-align: center; margin-top: 10px">
|
||||
Please wait while we are checking the permissions
|
||||
</div>
|
||||
|
||||
<?php foreach($permissions['permissions'] as $permission): ?>
|
||||
<div class="check" style="margin-left: 20%">
|
||||
<?php if($permission['isSet'] ? $src = 'Images/green-check.svg' : $src = 'Images/red-check.svg' ): ?>
|
||||
<img src="<?php echo $src ?>">
|
||||
<?php endif; ?>
|
||||
<span style="margin-left: 10px"><b><?php echo $permission['folder'] ?></b></span>
|
||||
<span>(<?php echo $permission['permission'] ?> folder permission Required)</span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php if(!isset($permissions['errors'])): ?>
|
||||
<div>
|
||||
<button class="prepare-btn" id="permission-check">Continue</button>
|
||||
</div>
|
||||
<div style="cursor: pointer; margin-top:10px">
|
||||
<span id="permission-back">back</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<img class="left-patern" src="Images/left-side.svg">
|
||||
<img class="right-patern" src="Images/right-side.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
||||
</head>
|
||||
|
||||
<?php
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
|
||||
$greenCheck = $actual_link .'/'. 'Images/green-check.svg';
|
||||
$redCheck = $actual_link .'/'. 'Images/red-check.svg';
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container requirement" id="requirement">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src="Images/logo.svg">
|
||||
<div class="initial-display">
|
||||
<p>Requirement</p>
|
||||
|
||||
<div class="content">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
|
||||
<div class="check" style="margin-left: 25%">
|
||||
<?php if($phpVersion['supported'] ? $src = 'Images/green-check.svg' : $src = 'Images/red-check.svg' ): ?>
|
||||
<?php if($phpVersion['supported'] ? $src = $greenCheck : $src = $redCheck): ?>
|
||||
<img src="<?php echo $src ?>">
|
||||
<?php endif; ?>
|
||||
<span style="margin-left: 10px"><b>PHP</b></span>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<?php foreach($requirements['requirements'][$type] as $extention => $enabled) : ?>
|
||||
<div class="check" style="margin-left: 25%">
|
||||
<?php if($enabled ? $src = 'Images/green-check.svg' : $src = 'Images/red-check.svg' ): ?>
|
||||
<?php if($enabled ? $src = $greenCheck : $src = $redCheck ): ?>
|
||||
<img src="<?php echo $src ?>">
|
||||
<?php endif; ?>
|
||||
<span style="margin-left: 10px"><b><?php echo $extention ?></b></span>
|
||||
|
|
@ -49,11 +49,6 @@
|
|||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<img class="left-patern" src="Images/left-side.svg">
|
||||
<img class="right-patern" src="Images/right-side.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container welcome" id="welcome">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src="Images/logo.svg">
|
||||
<div class="initial-display">
|
||||
<p>Welcome to Bagisto</p>
|
||||
|
||||
<div class="content">
|
||||
|
|
@ -31,11 +26,6 @@
|
|||
<button type="button" class="prepare-btn" id="welcome-check">Accept</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<img class="left-patern" src="Images/left-side.svg">
|
||||
<img class="right-patern" src="Images/right-side.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,104 +1,141 @@
|
|||
<?php
|
||||
// getting env file
|
||||
$location = str_replace('\\', '/', getcwd());
|
||||
$currentLocation = explode("/", $location);
|
||||
array_pop($currentLocation);
|
||||
array_pop($currentLocation);
|
||||
$desiredLocation = implode("/", $currentLocation);
|
||||
$envFile = $desiredLocation . '/' . '.env';
|
||||
<html>
|
||||
|
||||
$installed = false;
|
||||
|
||||
if (file_exists($envFile)) {
|
||||
|
||||
// reading env content
|
||||
$str= file_get_contents($envFile);
|
||||
|
||||
// converting env content to key/value pair
|
||||
$data = explode(PHP_EOL,$str);
|
||||
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION','DB_PORT'];
|
||||
|
||||
$key = $value = [];
|
||||
if ($data) {
|
||||
foreach ($data as $line) {
|
||||
$rowValues = explode('=', $line);
|
||||
if (count($rowValues) === 2) {
|
||||
if (in_array($rowValues[0], $databaseArray)) {
|
||||
$key[] = $rowValues[0];
|
||||
$value[] = $rowValues[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$databaseData['DB_HOST'] = $databaseData['DB_USERNAME'] = $databaseData['DB_PASSWORD'] = $databaseData['DB_DATABASE'] = $databaseData['DB_CONNECTION'] = $databaseData['DB_PORT'] = '';
|
||||
|
||||
$databaseData = array_combine($key, $value);
|
||||
|
||||
// getting database info
|
||||
$servername = $databaseData['DB_HOST'];
|
||||
$username = $databaseData['DB_USERNAME'];
|
||||
$password = $databaseData['DB_PASSWORD'];
|
||||
$dbname = $databaseData['DB_DATABASE'];
|
||||
$connection = $databaseData['DB_CONNECTION'];
|
||||
$port = $databaseData['DB_PORT'];
|
||||
|
||||
if ($connection == 'mysql') {
|
||||
@$conn = new mysqli($servername, $username, $password, $dbname, $port);
|
||||
|
||||
if (!$conn->connect_error) {
|
||||
// retrieving admin entry
|
||||
$sql = "SELECT id, name FROM admins";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$installed = true;
|
||||
}
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
} else {
|
||||
$installed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$installed) {
|
||||
// including classes
|
||||
include __DIR__ . '/Classes/Permission.php';
|
||||
include __DIR__ . '/Classes/Requirement.php';
|
||||
include __DIR__ . '/Classes/Welcome.php';
|
||||
|
||||
// including php files
|
||||
include __DIR__ . '/Environment.php';
|
||||
include __DIR__ . '/Migration.php';
|
||||
include __DIR__ . '/Admin.php';
|
||||
include __DIR__ . '/Finish.php';
|
||||
|
||||
// including js
|
||||
include __DIR__ . '/JS/script';
|
||||
|
||||
// object creation
|
||||
$requirement = new Requirement();
|
||||
$permission = new Permission();
|
||||
$welcome = new Welcome();
|
||||
|
||||
// calling render function for template
|
||||
echo $requirement->render();
|
||||
echo $permission->render();
|
||||
echo $welcome->render();
|
||||
|
||||
$storage_output = exec('cd ../.. && php artisan storage:link 2>&1');
|
||||
} else {
|
||||
// getting url
|
||||
<?php
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
|
||||
$url = explode("/", $actual_link);
|
||||
array_pop($url);
|
||||
array_pop($url);
|
||||
$url = implode("/", $url);
|
||||
$url = $url . '/404';
|
||||
$cssUrl = $actual_link .'/'. 'CSS/style.css';
|
||||
$logo = $actual_link .'/'. 'Images/logo.svg';
|
||||
$leftIcon = $actual_link .'/'. 'Images/left-side.svg';
|
||||
$rightIcon = $actual_link .'/'. 'Images/right-side.svg';
|
||||
?>
|
||||
|
||||
// redirecting to 404 error page
|
||||
header("Location: $url");
|
||||
}
|
||||
?>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<title>Bagisto Installer</title>
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href= "<?php echo $cssUrl; ?> ">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container requirement">
|
||||
<div class="initial-display" style="padding-top: 100px;">
|
||||
<img class="logo" src= "<?php echo $logo; ?>" >
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<img class="left-patern" src= "<?php echo $leftIcon; ?>" >
|
||||
<img class="right-patern" src= "<?php echo $rightIcon; ?>" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// getting env file
|
||||
$location = str_replace('\\', '/', getcwd());
|
||||
$currentLocation = explode("/", $location);
|
||||
array_pop($currentLocation);
|
||||
array_pop($currentLocation);
|
||||
$desiredLocation = implode("/", $currentLocation);
|
||||
$envFile = $desiredLocation . '/' . '.env';
|
||||
|
||||
$installed = false;
|
||||
|
||||
if (file_exists($envFile)) {
|
||||
|
||||
// reading env content
|
||||
$data = file($envFile);
|
||||
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION','DB_PORT'];
|
||||
$key = $value = [];
|
||||
|
||||
if ($data) {
|
||||
foreach ($data as $line) {
|
||||
$line = preg_replace('/\s+/', '', $line);
|
||||
$rowValues = explode('=', $line);
|
||||
|
||||
if (strlen($line) !== 0) {
|
||||
if (in_array($rowValues[0], $databaseArray)) {
|
||||
$key[] = $rowValues[0];
|
||||
$value[] = $rowValues[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$databaseData = array_combine($key, $value);
|
||||
|
||||
if (isset($databaseData['DB_HOST'])) {
|
||||
$servername = $databaseData['DB_HOST'];
|
||||
}
|
||||
if (isset($databaseData['DB_USERNAME'])) {
|
||||
$username = $databaseData['DB_USERNAME'];
|
||||
}
|
||||
if (isset($databaseData['DB_PASSWORD'])) {
|
||||
$password = $databaseData['DB_PASSWORD'];
|
||||
}
|
||||
if (isset($databaseData['DB_DATABASE'])) {
|
||||
$dbname = $databaseData['DB_DATABASE'];
|
||||
}
|
||||
if (isset($databaseData['DB_CONNECTION'])) {
|
||||
$connection = $databaseData['DB_CONNECTION'];
|
||||
}
|
||||
if (isset($databaseData['DB_PORT'])) {
|
||||
$port = $databaseData['DB_PORT'];
|
||||
}
|
||||
|
||||
if (isset($connection) && $connection == 'mysql') {
|
||||
@$conn = new mysqli($servername, $username, $password, $dbname, (int)$port);
|
||||
|
||||
if (!$conn->connect_error) {
|
||||
// retrieving admin entry
|
||||
$sql = "SELECT id, name FROM admins";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$installed = true;
|
||||
}
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
} else {
|
||||
$installed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$installed) {
|
||||
|
||||
// including classes
|
||||
include __DIR__ . '/Classes/Requirement.php';
|
||||
|
||||
// including php files
|
||||
include __DIR__ . '/Environment.php';
|
||||
include __DIR__ . '/Migration.php';
|
||||
include __DIR__ . '/Admin.php';
|
||||
include __DIR__ . '/Finish.php';
|
||||
|
||||
// including js
|
||||
include __DIR__ . '/JS/script';
|
||||
|
||||
// object creation
|
||||
$requirement = new Requirement();
|
||||
echo $requirement->render();
|
||||
|
||||
$storage_output = exec('cd ../.. && php artisan storage:link 2>&1');
|
||||
} else {
|
||||
// getting url
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
|
||||
$url = explode("/", $actual_link);
|
||||
array_pop($url);
|
||||
array_pop($url);
|
||||
$url = implode("/", $url);
|
||||
$url = $url . '/404';
|
||||
|
||||
// redirecting to 404 error page
|
||||
header("Location: $url");
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -11,18 +11,16 @@
|
|||
if (file_exists($envFile)) {
|
||||
|
||||
// reading env content
|
||||
$str = file_get_contents($envFile);
|
||||
|
||||
// converting env content to key/value pair
|
||||
$data = explode(PHP_EOL,$str);
|
||||
$data = file($envFile);
|
||||
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION','DB_PORT'];
|
||||
|
||||
$key = $value = [];
|
||||
|
||||
if ($data) {
|
||||
foreach ($data as $line) {
|
||||
$line = preg_replace('/\s+/', '', $line);
|
||||
$rowValues = explode('=', $line);
|
||||
|
||||
if (count($rowValues) === 2) {
|
||||
if (strlen($line) !== 0) {
|
||||
if (in_array($rowValues[0], $databaseArray)) {
|
||||
$key[] = $rowValues[0];
|
||||
$value[] = $rowValues[1];
|
||||
|
|
@ -31,20 +29,29 @@
|
|||
}
|
||||
}
|
||||
|
||||
$databaseData['DB_HOST'] = $databaseData['DB_USERNAME'] = $databaseData['DB_PASSWORD'] = $databaseData['DB_DATABASE'] = $databaseData['DB_CONNECTION'] = $databaseData['DB_PORT'] = '';
|
||||
|
||||
$databaseData = array_combine($key, $value);
|
||||
|
||||
// getting database info
|
||||
$servername = $databaseData['DB_HOST'];
|
||||
$username = $databaseData['DB_USERNAME'];
|
||||
$password = $databaseData['DB_PASSWORD'];
|
||||
$dbname = $databaseData['DB_DATABASE'];
|
||||
$connection = $databaseData['DB_CONNECTION'];
|
||||
$port = $databaseData['DB_PORT'];
|
||||
if (isset($databaseData['DB_HOST'])) {
|
||||
$servername = $databaseData['DB_HOST'];
|
||||
}
|
||||
if (isset($databaseData['DB_USERNAME'])) {
|
||||
$username = $databaseData['DB_USERNAME'];
|
||||
}
|
||||
if (isset($databaseData['DB_PASSWORD'])) {
|
||||
$password = $databaseData['DB_PASSWORD'];
|
||||
}
|
||||
if (isset($databaseData['DB_DATABASE'])) {
|
||||
$dbname = $databaseData['DB_DATABASE'];
|
||||
}
|
||||
if (isset($databaseData['DB_CONNECTION'])) {
|
||||
$connection = $databaseData['DB_CONNECTION'];
|
||||
}
|
||||
if (isset($databaseData['DB_PORT'])) {
|
||||
$port = $databaseData['DB_PORT'];
|
||||
}
|
||||
|
||||
if ($connection == 'mysql') {
|
||||
@$conn = new mysqli($servername, $username, $password, $dbname, $port);
|
||||
if (isset($connection) && $connection == 'mysql') {
|
||||
@$conn = new mysqli($servername, $username, $password, $dbname, (int)$port);
|
||||
|
||||
if (!$conn->connect_error) {
|
||||
// retrieving admin entry
|
||||
|
|
@ -75,4 +82,7 @@
|
|||
} else {
|
||||
return null;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
{{-- Footer --}}
|
||||
@slot('footer')
|
||||
@component('mail::footer')
|
||||
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
||||
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endcomponent
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
{{-- Footer --}}
|
||||
@slot('footer')
|
||||
@component('mail::footer')
|
||||
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
||||
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endcomponent
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
'into your web browser: [:actionURL](:actionURL)',
|
||||
[
|
||||
'actionText' => $actionText,
|
||||
'actionURL' => $actionUrl
|
||||
'actionURL' => $actionUrl,
|
||||
]
|
||||
)
|
||||
@endcomponent
|
||||
|
|
|
|||
Loading…
Reference in New Issue