update v 1.0.7.5
This commit is contained in:
15
resources/views/themes/default1/update/database.blade.php
Normal file
15
resources/views/themes/default1/update/database.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@extends('themes.default1.layouts.login')
|
||||
@section('body')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3>Database Update Required</h3>
|
||||
<p>{{ucfirst(Config::get('app.name'))}} has been updated! Before we send you on your own way,
|
||||
we have to update your database to the newest version.</p>
|
||||
<p>The update process may take a little while, so please be patient.</p>
|
||||
<p><a href="{{$url}}" class="btn btn-default">Update {{ucfirst(Config::get('app.name'))}} Database</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
15
resources/views/themes/default1/update/file.blade.php
Normal file
15
resources/views/themes/default1/update/file.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@extends('themes.default1.layouts.login')
|
||||
@section('body')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3>File Update Required</h3>
|
||||
<p>{{ucfirst(Config::get('app.name'))}} has been updated! Before we send you on your own way,
|
||||
we have to update your files to the newest version.</p>
|
||||
<p>The update process may take a little while, so please be patient.</p>
|
||||
<p><a href="{{$url}}" class="btn btn-default">Update {{ucfirst(Config::get('app.name'))}} Files</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
@if($data->count()>0)
|
||||
@foreach($data as $notify)
|
||||
@if($notify->value)
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! ucfirst($notify->value) !!}
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
77
resources/views/themes/default1/update/update.blade.php
Normal file
77
resources/views/themes/default1/update/update.blade.php
Normal file
@@ -0,0 +1,77 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
@section('content')
|
||||
<div class="box box-primary">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box-body">
|
||||
|
||||
<p>CURRENT VERSION: {{$current_version}}</p>
|
||||
<p>Reading Current Releases List</p>
|
||||
|
||||
<?php
|
||||
$updated = false;
|
||||
$controller = new \App\Http\Controllers\Update\UpgradeController();
|
||||
if ($latest_version > $current_version) {
|
||||
|
||||
echo '<p>New Update Found: v' . $latest_version . '</p>';
|
||||
$found = true;
|
||||
if (!is_file("$controller->dir/UPDATES/faveo-helpdesk-master.zip")) {
|
||||
if (key_exists("dodownload", $_GET) && $_GET["dodownload"] == true) {
|
||||
$download_url = $controller->downloadLatestCode();
|
||||
if ($download_url != null) {
|
||||
$controller->saveLatestCodeAtTemp($download_url);
|
||||
} else {
|
||||
echo '<p>Error in you network connection.</p>';
|
||||
//exit();
|
||||
}
|
||||
} else {
|
||||
echo '<p>Latest code found. <a href=' . url('file-upgrade?dodownload=true') . '>» Download Now?</a></p>';
|
||||
//exit();
|
||||
}
|
||||
} else {
|
||||
echo '<p>Update ready. <a href=' . url('file-upgrade?doUpdate=true') . '>» Install Now?</a></p>';
|
||||
//echo '<p>Update already downloaded.</p>';
|
||||
}
|
||||
if ($request->get('doUpdate') == true) {
|
||||
?>
|
||||
<div class="col-md-12" style="padding-top: 20px; padding-right: 20px;">
|
||||
<div class="box" style="border-top: 0px solid #3C8DBC;">
|
||||
|
||||
|
||||
<div class="box-header" style="padding: 20px; padding-top: 1px; ">
|
||||
<h4 style="padding: 1px;font-size: 18px;margin-left: -7px; color:#021CA2;"><strong> Updating Status</strong>
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-body" style="background-color: black; height: 410px; overflow: scroll;" id="data">
|
||||
<?php $updated = $controller->doUpdate(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($updated == true) {
|
||||
$controller->copyToActualDirectory($latest_version);
|
||||
} elseif ($found != true) {
|
||||
echo '<p>» No update is available.</p>';
|
||||
}
|
||||
} else
|
||||
echo '<p>Could not find latest realeases.</p>';
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.setInterval(function() {
|
||||
var elem = document.getElementById('data');
|
||||
elem.scrollTop = elem.scrollHeight;
|
||||
}, 500);
|
||||
</script>
|
||||
|
||||
@stop
|
||||
Reference in New Issue
Block a user