53 lines
1.5 KiB
PHP
53 lines
1.5 KiB
PHP
|
@php
|
||
|
|
||
|
use Illuminate\Support\Facades\Session;
|
||
|
use Illuminate\Support\Facades\DB;
|
||
|
$token = Session::get('token');
|
||
|
$user = null;
|
||
|
if(Session::get('imagetoken') == null){
|
||
|
Session::put('imagetoken', date('Ymdhis'));
|
||
|
}
|
||
|
if(Session::get('token') == null){
|
||
|
echo "<script>location.href = '/login-admin';</script>";
|
||
|
}else{
|
||
|
$user = DB::select("SELECT * FROM userapp WHERE token = '$token' ")[0];
|
||
|
$user = json_encode($user);
|
||
|
}
|
||
|
|
||
|
@endphp
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||
|
<title>Masuksini</title>
|
||
|
<style type="text/css">
|
||
|
#app{
|
||
|
width: 100vw;
|
||
|
height: 100vh;
|
||
|
overflow-y: auto;
|
||
|
max-height: 100vh;
|
||
|
position: fixed !important;;
|
||
|
top: 0;
|
||
|
}
|
||
|
.modal-backdrop{
|
||
|
display: none;
|
||
|
}
|
||
|
.modal{
|
||
|
background-color: rgba(125,125,125,0.5) !important;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body id="page-top">
|
||
|
<script type="text/javascript">
|
||
|
localStorage.setItem('loginCond', '{{Session::get('token')}}');
|
||
|
globalThis.bashpath = "{{'/'}}";
|
||
|
globalThis.urlapp = "{{'assets/pwa/'}}";
|
||
|
globalThis.pathRoot = "{{'assets/'}}";
|
||
|
globalThis.getScript = 55;
|
||
|
globalThis.user = JSON.parse('{!!$user!!}');
|
||
|
</script>
|
||
|
<script id="moduleapp" src="{{'assets/pwa/route.js?v='.date('ymdhis')}}" type="module" ></script>
|
||
|
</body>
|
||
|
</html>
|