parent
5403f6707d
commit
2777fd61fe
|
@ -451,6 +451,114 @@ return [
|
|||
'Title' => 'Title+',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Edit User Page (Admin)
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| resources/views/panel/edit-user.blade.php
|
||||
|
|
||||
*/
|
||||
|
||||
'Edit User' => 'Edit User+',
|
||||
'Email' => 'Email+',
|
||||
'Password' => 'Password+',
|
||||
'Logo' => 'Logo+',
|
||||
'Delete' => 'Delete+',
|
||||
'Custom background' => 'Custom background+',
|
||||
'No image selected' => 'No image selected+',
|
||||
'Page URL' => 'Page URL+',
|
||||
'Page description' => 'Page description+',
|
||||
'Role' => 'Role+',
|
||||
'Save' => 'Save+',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Links Page (Admin)
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| resources/views/panel/links.blade.php
|
||||
|
|
||||
*/
|
||||
|
||||
'Links' => 'Links+',
|
||||
'Link' => 'Link+',
|
||||
'Title' => 'Title+',
|
||||
'Clicks' => 'Clicks+',
|
||||
'Back' => 'Back+',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PHP info Page
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| resources/views/panel/phpinfo.blade.php
|
||||
|
|
||||
*/
|
||||
|
||||
'Information about PHP’s configuration' => 'Information about PHP’s configuration+',
|
||||
'Outputs information about the current state of PHP' => 'Outputs information about the current state of PHP+',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Delete themes page
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| resources/views/panel/theme.blade.php
|
||||
|
|
||||
*/
|
||||
|
||||
'Delete a theme' => 'Delete a theme+',
|
||||
'Delete theme' => 'Delete theme+',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Manage Users Page
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| resources/views/panel/users.blade.php
|
||||
|
|
||||
*/
|
||||
|
||||
'Manage Users' => 'Manage Users+',
|
||||
'Search user' => 'Search user+',
|
||||
'ID' => 'ID+',
|
||||
'Name' => 'Name+',
|
||||
'E-Mail' => 'E-Mail+',
|
||||
'Page' => 'Page+',
|
||||
'Links' => 'Links+',
|
||||
'Clicks' => 'Clicks+',
|
||||
'Created at' => 'Created at+',
|
||||
'Last seen' => 'Last seen+',
|
||||
'Status' => 'Status+',
|
||||
'Action' => 'Action+',
|
||||
'N/A' => 'N/A+',
|
||||
'Pending' => 'Pending+',
|
||||
'Verified' => 'Verified+',
|
||||
'Approved' => 'Approved+',
|
||||
'Add new user' => 'Add new user+',
|
||||
|
||||
# Tooltips
|
||||
'tt.Delete' => 'Delete+',
|
||||
'tt.Edit' => 'Edit+',
|
||||
'tt.All links' => 'All links+',
|
||||
|
||||
'confirm.delete.user' => 'Are you sure you want to delete this user? \nThis action cannot be undone!+',
|
||||
|
||||
# Date Format
|
||||
'date.format' => 'd/m/Y',
|
||||
|
||||
'days ago' => 'days ago+',
|
||||
'1 day ago' => '1 day ago+',
|
||||
'Today' => 'Today+',
|
||||
'1 year ago' => '1 year ago+',
|
||||
'years ago' => 'years ago+',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Config Page
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
@extends('layouts.sidebar')
|
||||
|
||||
@section('content')
|
||||
<style>button{border-style: none;background-color: #0085ff;color: #fff;border-radius: 5px;}button:hover {background-color:#0065c1;color: #FFF;box-shadow: 0 10px 20px -10px rgba(0,0,0, 0.6);}.btn {color: #FFF !important;}.buttondm{display:inline-block;text-decoration:none;height:48px;text-align:center;vertical-align:middle;font-size:18px;width:300px;font-weight:700;line-height:48px;letter-spacing:.1px;white-space:wrap;border-radius:8px;cursor:pointer}.button-hover,.credit-hover{display:inline-block;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.button-hover:active,.credit-hover:active,.button-hover:focus,.credit-hover:focus,.button-hover:hover,.credit-hover:hover{-webkit-transform:scale(1.06);transform:scale(1.06)}.container{align-items:center;display:flex;flex-direction:column;justify-content:center;height:50%;width:100%}</style>
|
||||
<!-- Custom icons font-awesome -->
|
||||
<script src="{{ asset('assets/external-dependencies/fontawesome.js') }}" crossorigin="anonymous"></script>
|
||||
@if (file_exists(base_path('backups/updater-backups/')) and is_dir(base_path('backups/updater-backups/')))
|
||||
@if($_SERVER['QUERY_STRING'] != '')
|
||||
<?php
|
||||
$filename = $_SERVER['QUERY_STRING'];
|
||||
|
||||
$filepath = base_path('backups/updater-backups/') . $filename;
|
||||
|
||||
$strFile = file_get_contents($filepath);
|
||||
|
||||
header("Content-type: application/force-download");
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
|
||||
header('Content-Length: ' . filesize($filepath));
|
||||
echo $strFile;
|
||||
while (ob_get_level()) {
|
||||
ob_end_clean();
|
||||
}
|
||||
readfile($filepath);
|
||||
exit;
|
||||
?>
|
||||
@endif
|
||||
|
||||
<div class="container">
|
||||
<br><br><h3>{{__('messages.Download your updater backups')}}</h3>
|
||||
<hp>{{__('messages.The server will never store more that two backups at a time')}}</hp><br><br><br>
|
||||
<?php
|
||||
$test="test";
|
||||
if ($handle = opendir('backups/updater-backups')) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != "..") {
|
||||
echo '<div class="button-entrance"><a class="buttondm button-hover icon-hover" style="color:#ffffff; background-color:#000;" href="' . url()->current() . '/?' . $entry . '"><i style="color: " class="icon hvr-icon fa fa-download"></i> '; print_r($entry); echo '</a></div><br>';
|
||||
}}} ?>
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="container">
|
||||
<h3>{{__('messages.No backups found')}}</h3></div>
|
||||
@endif
|
||||
<center><a class="btn" href="{{ url('backup') }}"><button><i class="fa-solid fa-floppy-disk"></i>{{__('messages.Backup your instance')}}</button></a></center>
|
||||
@endsection
|
|
@ -1,50 +0,0 @@
|
|||
@extends( ($_SERVER['QUERY_STRING'] === 'restore-defaults') ? 'layouts.lang' : 'layouts.sidebar')
|
||||
|
||||
@if($_SERVER['QUERY_STRING'] === 'restore-defaults')
|
||||
<?php
|
||||
copy(base_path('storage/templates/advanced-config.php'), base_path('config/advanced-config.php'));
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; " . url()->current() . "/../../admin/config#2\" />";
|
||||
?>
|
||||
@else
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
@if(str_ends_with($_SERVER['REQUEST_URI'], 'advanced-config'))
|
||||
<h2 class="mb-4"><i class="bi bi-pencil-square">{{__('messages.Advanced config')}}</i></h2>
|
||||
<p>{{__('messages.AC.description')}}</p>
|
||||
<form action="{{ route('editAC') }}" method="post">
|
||||
@csrf
|
||||
<div class="form-group col-lg-8">
|
||||
<label>{{__('messages.Advanced Configuration file.')}}</label>
|
||||
<pre><textarea class="form-control" name="AdvancedConfig" rows="280">{{ file_get_contents('config/advanced-config.php') }}</textarea></pre>
|
||||
</div>
|
||||
<button type="submit" class="mt-3 ml-3 btn btn-info">{{__('messages.Save')}}</button>
|
||||
<a class="mt-3 ml-3 btn btn-primary confirmation" href="{{url('/panel/advanced-config?restore-defaults')}}">{{__('messages.Restore defaults')}}</a>
|
||||
<script type="text/javascript">
|
||||
var elems = document.getElementsByClassName('confirmation');
|
||||
var confirmIt = function (e) {
|
||||
if (!confirm('Are you sure?')) e.preventDefault();
|
||||
};
|
||||
for (var i = 0, l = elems.length; i < l; i++) {
|
||||
elems[i].addEventListener('click', confirmIt, false);
|
||||
}
|
||||
</script>
|
||||
</form>
|
||||
@elseif(str_ends_with($_SERVER['REQUEST_URI'], 'env'))
|
||||
<h2 class="mb-4"><i class="bi bi-pencil-square">.ENV</i></h2>
|
||||
|
||||
<form action="{{ route('editENV') }}" method="post">
|
||||
@csrf
|
||||
<div class="form-group col-lg-8">
|
||||
<label>env.</label>
|
||||
<pre><textarea class="form-control" name="AdvancedConfig" rows="80">{{ file_get_contents('.env') }}</textarea></pre>
|
||||
</div>
|
||||
<button type="submit" class="mt-3 ml-3 btn btn-info">{{__('messages.Save')}}</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
@endif
|
|
@ -1,110 +0,0 @@
|
|||
@extends('layouts.sidebar')
|
||||
|
||||
@section('content')
|
||||
|
||||
<?php
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
$wtrue = "<td style=\"text-align: center; cursor: help;\" title=\"{{__('messages.wtrue')}}\">✔️</td>";
|
||||
$wfalse = "<td style=\"text-align: center; cursor: help;\" title=\"{{__('messages.wfalse')}}\">❌</td>";
|
||||
|
||||
$utrue = "<td style=\"text-align: center; cursor: help;\" title=\"{{__('messages.utrue')}}\">❗</td>";
|
||||
$ufalse = "<td style=\"text-align: center; cursor: help;\" title=\"{{__('messages.ufalse')}}\">✔️</td>";
|
||||
$unull = "<td style=\"text-align: center; cursor: help;\" title=\"{{__('messages.unull')}}\">➖</td>";
|
||||
|
||||
|
||||
$server = $_SERVER['SERVER_NAME'];
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Tests if a URL has a valid SSL certificate
|
||||
function has_ssl( $domain ) {
|
||||
$ssl_check = @fsockopen( 'ssl://' . $domain, 443, $errno, $errstr, 30 );
|
||||
$res = !! $ssl_check;
|
||||
if ( $ssl_check ) { fclose( $ssl_check ); }
|
||||
return $res;
|
||||
}
|
||||
|
||||
// Changes probed URL to HTTP if no valid SSL certificate is present, otherwise an error would be thrown
|
||||
if (has_ssl($server)) {
|
||||
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
} else {
|
||||
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
}
|
||||
|
||||
function getUrlSatusCode($url, $timeout = 3)
|
||||
{
|
||||
$ch = curl_init();
|
||||
$opts = array(CURLOPT_RETURNTRANSFER => true, // do not output to browser
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_NOBODY => true, // do a HEAD request only
|
||||
CURLOPT_TIMEOUT => $timeout);
|
||||
curl_setopt_array($ch, $opts);
|
||||
curl_exec($ch);
|
||||
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
return $status;
|
||||
}
|
||||
|
||||
//Files or directories to test if writable
|
||||
$wrt1 = is_writable('.env');
|
||||
$wrt2 = is_writable('database/database.sqlite');
|
||||
|
||||
//Files or directories to test if accessible externally
|
||||
$url1 = getUrlSatusCode($actual_link . '/../../.env');
|
||||
$url2 = getUrlSatusCode($actual_link . '/../../database/database.sqlite');
|
||||
|
||||
?>
|
||||
|
||||
<h2 class="mb-4"><i class="bi bi-braces-asterisk">{{__('messages.Debugging information')}}</i></h2>
|
||||
|
||||
@if($url1 == '200' or $url2 == '200')
|
||||
<a href="https://docs.linkstack.org/d/installation-requirements/" target="_blank"><h4 style="color:tomato;">{{__('messages.security.risk')}}</h4></a>
|
||||
@endif
|
||||
|
||||
<h3 class="mb-4">Write access</h3>
|
||||
<p>{{__('messages.Write access.description.1-3')}} '✔️' {{__('messages.Write access.description.2-3')}} '❌' {{__('messages.Write access.description.3-3')}}</p>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width: 90%;">{{__('messages.File')}}</th>
|
||||
<th title="You can hover over entries to learn more about their current status" style="cursor: help;" scope="col">{{__('messages.Hover for more')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td title="">{{ base_path(".env") }}</td>
|
||||
<?php if ($wrt1 > 0) {echo "$wtrue";} else {echo "$wfalse";} ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="">{{ base_path("database/database.sqlite") }}</td>
|
||||
<?php if ($wrt2 > 0) {echo "$wtrue";} else {echo "$wfalse";} ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br><h3 class="mb-4">{{__('messages.Security')}}</h3>
|
||||
<p>{{__('messages.security.risk.1-3')}} '✔️' {{__('messages.security.risk.2-3')}} '❗' {{__('messages.security.risk.3-3')}}</p>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width: 90%;">{{__('messages.Link')}}</th>
|
||||
<th title="You can hover over entries to learn more about their current status" style="cursor: help;" scope="col">{{__('messages.Hover for more')}}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td title="">{{ url('/.env') }}</td>
|
||||
<?php if($url1 == '200'){echo "$utrue";} elseif($url1 == '0'){echo "$unull";} else{echo "$ufalse";} ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="">{{ url('/database/database.sqlite') }}</td>
|
||||
<?php if($url2 == '200'){echo "$utrue";} elseif($url2 == '0'){echo "$unull";} else{echo "$ufalse";} ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@endsection
|
|
@ -84,8 +84,8 @@
|
|||
<div style="position: relative; top: 50px; z-index: 2;"><a href="{{ url('admin/config') }}" style="font-size: 40px;" > Back</a></div>
|
||||
<div style="position: relative; bottom: 60px; right: 15px; z-index: 1;" align="right"><a onclick="this.href='data:text/html;charset=UTF-8,'+encodeURIComponent(document.documentElement.outerHTML)" href="#" download="phpinfo.html"><button class="btn btn-primary">Download</button></a></div>
|
||||
<div id='presentation'>
|
||||
<h1>Information about PHP's configuration</h1>
|
||||
<h2>Outputs information about the current state of PHP</h2>
|
||||
<h1>{{__('messages.Information about PHP’s configuration')}}</h1>
|
||||
<h2>{{__('messages.Outputs information about the current state of PHP')}}</h2>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -15,28 +15,28 @@
|
|||
<div class="col-sm-12">
|
||||
|
||||
<section class="text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-person">{{__('messages.Site Customization')}}</i></h2>
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-person"> Site Customization</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
|
||||
<form action="{{ route('editSite') }}" enctype="multipart/form-data" method="post">
|
||||
@csrf
|
||||
<div class="form-group col-lg-8">
|
||||
<label>{{__('messages.Site Logo')}}</label>@if(file_exists(base_path("assets/linkstack/images/").findFile('avatar')))<a title="Remove icon" class="hvr-grow p-1 text-danger" style="padding-left:5px;" href="{{ route('delAvatar') }}"><i class="bi bi-trash-fill"></i></a>@endif
|
||||
<label>Site logo</label>@if(file_exists(base_path("assets/linkstack/images/").findFile('avatar')))<a title="Remove icon" class="hvr-grow p-1 text-danger" style="padding-left:5px;" href="{{ route('delAvatar') }}"><i class="bi bi-trash-fill"></i></a>@endif
|
||||
<div class="mb-3">
|
||||
<input type="file" class="form-control form-control-lg" name="image" aria-label="Large file input example">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-lg-8">
|
||||
<label>{{__('messages.Favicon')}}</label>@if(file_exists(base_path("assets/linkstack/images/").findFile('favicon')))<a title="Remove icon" class="hvr-grow p-1 text-danger" style="padding-left:5px;" href="{{ route('delFavicon') }}"><i class="bi bi-trash-fill"></i></a>@endif
|
||||
<label>Favicon</label>@if(file_exists(base_path("assets/linkstack/images/").findFile('favicon')))<a title="Remove icon" class="hvr-grow p-1 text-danger" style="padding-left:5px;" href="{{ route('delFavicon') }}"><i class="bi bi-trash-fill"></i></a>@endif
|
||||
<div class="mb-3">
|
||||
<input type="file" class="form-control form-control-lg" name="icon" aria-label="Large file input example">
|
||||
</div><br>
|
||||
</div>
|
||||
<div class="form-group col-lg-8">
|
||||
<h3>{{__('messages.Home message')}}</h3>
|
||||
<h3>Home message</h3>
|
||||
<textarea class="form-control ckeditor" name="message" rows="3">{{ $home_message }}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="mt-3 ml-3 btn btn-primary">{{__('messages.Save')}}</button>
|
||||
<button type="submit" class="mt-3 ml-3 btn btn-primary">Save</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="col-sm-12">
|
||||
|
||||
<section class="text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-person"> Manage Users</i></h2>
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-person"> {{__('messages.Manage Users')}}</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
|
||||
<form action="{{ route('searchUser') }}" method="post">
|
||||
|
@ -23,7 +23,7 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" name="name" placeholder="search user" class="form-control">
|
||||
<input type="text" name="name" placeholder="{{__('messages.Search user')}}" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-primary"><i class="bi bi-search"></i></button>
|
||||
</div>
|
||||
|
@ -41,27 +41,27 @@
|
|||
<table class="table table-stripped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="cs" scope="col" data-sort="id" data-order="asc">ID</th>
|
||||
<th id="cs" scope="col" data-sort="name" data-order="asc">Name</th>
|
||||
<th id="cs" scope="col" data-sort="email" data-order="asc">E-Mail</th>
|
||||
<th id="cs" scope="col" data-sort="page" data-order="asc">Page</th>
|
||||
<th id="cs" scope="col" data-sort="role" data-order="asc">Role</th>
|
||||
<th id="cs" scope="col" data-sort="links" data-order="asc">Links</th>
|
||||
<th id="cs" scope="col" data-sort="clicks" data-order="asc">Clicks</th>
|
||||
<th id="cs" scope="col" data-sort="created" data-order="asc">Created at</th>
|
||||
<th id="cs" scope="col" data-sort="last" data-order="asc">Last seen</th>
|
||||
@if(env('REGISTER_AUTH') !== 'auth')<th id="cs" scope="col">E-Mail</th>@endif
|
||||
<th id="cs" scope="col" data-sort="block" data-order="asc">Status</th>
|
||||
<th scope="col" data-sortable="false">Action</th>
|
||||
<th id="cs" scope="col" data-sort="id" data-order="asc">{{__('messages.ID')}}</th>
|
||||
<th id="cs" scope="col" data-sort="name" data-order="asc">{{__('messages.Name')}}</th>
|
||||
<th id="cs" scope="col" data-sort="email" data-order="asc">{{__('messages.E-Mail')}}</th>
|
||||
<th id="cs" scope="col" data-sort="page" data-order="asc">{{__('messages.Page')}}</th>
|
||||
<th id="cs" scope="col" data-sort="role" data-order="asc">{{__('messages.Role')}}</th>
|
||||
<th id="cs" scope="col" data-sort="links" data-order="asc">{{__('messages.Links')}}</th>
|
||||
<th id="cs" scope="col" data-sort="clicks" data-order="asc">{{__('messages.Clicks')}}</th>
|
||||
<th id="cs" scope="col" data-sort="created" data-order="asc">{{__('messages.Created at')}}</th>
|
||||
<th id="cs" scope="col" data-sort="last" data-order="asc">{{__('messages.Last seen')}}</th>
|
||||
@if(env('REGISTER_AUTH') !== 'auth')<th id="cs" scope="col">{{__('messages.E-Mail')}}</th>@endif
|
||||
<th id="cs" scope="col" data-sort="block" data-order="asc">{{__('messages.Status')}}</th>
|
||||
<th scope="col" data-sortable="false">{{__('messages.Action')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($users as $user)
|
||||
@php
|
||||
$dateFormat = 'd/m/Y';
|
||||
$dateFormat = __('messages.date.format');
|
||||
|
||||
$date = date($dateFormat, strtotime($user->created_at));
|
||||
if(!isset($user->created_at)){$date = "N/A";}
|
||||
if(!isset($user->created_at)){$date = __('messages.N/A');}
|
||||
|
||||
$lastSeen = $user->updated_at;
|
||||
$lastSeenDate = date($dateFormat, strtotime($lastSeen));
|
||||
|
@ -69,22 +69,22 @@
|
|||
$datetime = new DateTime($lastSeen, $timezone);
|
||||
$now = new DateTime(null, $timezone);
|
||||
$interval = $now->diff($datetime);
|
||||
$daysAgo = $interval->days." days ago";
|
||||
if($interval->days == 1) $daysAgo = "1 day ago";
|
||||
if($interval->days == 0) $daysAgo = "Today";
|
||||
$daysAgo = $interval->days." ".__('messages.days ago');
|
||||
if($interval->days == 1) $daysAgo = __('messages.1 day ago');
|
||||
if($interval->days == 0) $daysAgo = __('messages.Today');
|
||||
if ($interval->days >= 365) {
|
||||
$yearsAgo = floor($interval->days / 365);
|
||||
if ($yearsAgo == 1) {
|
||||
$daysAgo = "1 year ago";
|
||||
$daysAgo = __('messages.1 year ago');
|
||||
} else {
|
||||
$daysAgo = "$yearsAgo years ago";
|
||||
$daysAgo = $yearsAgo . __('messages.years ago');
|
||||
}}
|
||||
@endphp
|
||||
<tr>
|
||||
<td data-id>{{ $user->id }}</td>
|
||||
<td class="shorten" title="{{ $user->name }}" data-name> {{ $user->name }} </td>
|
||||
<td class="shorten" title="{{ $user->email }}" data-email> {{ $user->email }} </td>
|
||||
<td class="shorten" title="{{ $user->littlelink_name }}" data-page>@if(isset($user->littlelink_name))<a href="{{ url('') }}/@<?= $user->littlelink_name ?>" target="_blank" class="text-info"><i class="bi bi-box-arrow-up-right"></i> {{ $user->littlelink_name }} </a>@else N/A @endif</td>
|
||||
<td class="shorten" title="{{ $user->littlelink_name }}" data-page>@if(isset($user->littlelink_name))<a href="{{ url('') }}/@<?= $user->littlelink_name ?>" target="_blank" class="text-info"><i class="bi bi-box-arrow-up-right"></i> {{ $user->littlelink_name }} </a>@else {{__('messages.N/A')}} @endif</td>
|
||||
<td data-role>{{ $user->role }}</td>
|
||||
<td data-links>{{$user->links}}</td>
|
||||
<td data-clicks>{{$user->clicks}}</td>
|
||||
|
@ -92,15 +92,15 @@
|
|||
<td class="shorten" data-last title="{{ $lastSeenDate }}">{{$daysAgo}}</td>
|
||||
@if(env('REGISTER_AUTH') !== 'auth')
|
||||
<td>@if($user->find($user->id)->role == 'admin' and $user->email_verified_at != '')<center>-</center> @else
|
||||
<a href="{{ route('verifyUser', ['verify' => '-' . $user->email_verified_at, 'id' => $user->id] ) }}" class="text-danger">@if($user->email_verified_at == '')<span class="badge bg-danger">Pending</span>@else<span class="badge bg-success">Verified</span></a>@endif</td>
|
||||
<a href="{{ route('verifyUser', ['verify' => '-' . $user->email_verified_at, 'id' => $user->id] ) }}" class="text-danger">@if($user->email_verified_at == '')<span class="badge bg-danger">{{__('messages.Pending')}}</span>@else<span class="badge bg-success">{{__('messages.Verified')}}</span></a>@endif</td>
|
||||
@endif
|
||||
@endif
|
||||
<td>@if($user->find($user->id)->role == 'admin' and $user->id == 1)<center>-</center>@else<a href="{{ route('blockUser', ['block' => $user->block, 'id' => $user->id] ) }}">@if($user->block == 'yes') <span class="badge bg-danger">Pending</span> @elseif($user->block == 'no') <span class="badge bg-success">Approved</span> @endif</a>@endif</td>
|
||||
<td>@if($user->find($user->id)->role == 'admin' and $user->id == 1)<center>-</center>@else<a href="{{ route('blockUser', ['block' => $user->block, 'id' => $user->id] ) }}">@if($user->block == 'yes') <span class="badge bg-danger">{{__('messages.Pending')}}</span> @elseif($user->block == 'no') <span class="badge bg-success">{{__('messages.Approved')}}</span> @endif</a>@endif</td>
|
||||
<td>
|
||||
@if($user->find($user->id)->role == 'admin' and $user->id == 1)<center>-</center>
|
||||
@else
|
||||
<div class="flex align-items-center list-user-action">
|
||||
<a class="btn btn-sm btn-icon btn-success" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="All links" href="{{ route('showLinksUser', $user->id ) }}" aria-label="All links" data-bs-original-title="All links">
|
||||
<a class="btn btn-sm btn-icon btn-success" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="{{__('messages.tt.All links')}}" href="{{ route('showLinksUser', $user->id ) }}" aria-label="All links" data-bs-original-title="All links">
|
||||
<span class="btn-inner">
|
||||
<svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11.7669" cy="11.7666" r="8.98856" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></circle>
|
||||
|
@ -108,7 +108,7 @@
|
|||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-icon btn-warning" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="Edit" href="{{ route('editUser', $user->id ) }}" aria-label="Edit" data-bs-original-title="Edit">
|
||||
<a class="btn btn-sm btn-icon btn-warning" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="{{__('messages.tt.Edit')}}" href="{{ route('editUser', $user->id ) }}" aria-label="Edit" data-bs-original-title="Edit">
|
||||
<span class="btn-inner">
|
||||
<svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.4925 2.78906H7.75349C4.67849 2.78906 2.75049 4.96606 2.75049 8.04806V16.3621C2.75049 19.4441 4.66949 21.6211 7.75349 21.6211H16.5775C19.6625 21.6211 21.5815 19.4441 21.5815 16.3621V12.3341" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
|
@ -117,7 +117,7 @@
|
|||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-icon btn-danger confirmation" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="Delete" href="{{ route('deleteUser', ['id' => $user->id] ) }}" aria-label="Delete" data-bs-original-title="Delete">
|
||||
<a class="btn btn-sm btn-icon btn-danger confirmation" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="{{__('messages.tt.Delete')}}" href="{{ route('deleteUser', ['id' => $user->id] ) }}" aria-label="Delete" data-bs-original-title="Delete">
|
||||
<span class="btn-inner">
|
||||
<svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor">
|
||||
<path d="M19.3248 9.46826C19.3248 9.46826 18.7818 16.2033 18.4668 19.0403C18.3168 20.3953 17.4798 21.1893 16.1088 21.2143C13.4998 21.2613 10.8878 21.2643 8.27979 21.2093C6.96079 21.1823 6.13779 20.3783 5.99079 19.0473C5.67379 16.1853 5.13379 9.46826 5.13379 9.46826" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
|
@ -134,12 +134,12 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div></div></div>
|
||||
<a href="{{ url('') }}/admin/new-user">+ Add new user</a>
|
||||
<a href="{{ url('') }}/admin/new-user">+ {{__('messages.Add new user')}}</a>
|
||||
|
||||
<script type="text/javascript">
|
||||
var elems = document.getElementsByClassName('confirmation');
|
||||
var confirmIt = function (e) {
|
||||
if (!confirm('Are you sure you want to delete this user? \nThis action cannot be undone!')) e.preventDefault();
|
||||
if (!confirm("{{__('messages.confirm.delete.user')}}")) e.preventDefault();
|
||||
};
|
||||
for (var i = 0, l = elems.length; i < l; i++) {
|
||||
elems[i].addEventListener('click', confirmIt, false);
|
||||
|
|
Loading…
Reference in New Issue