CIM77 - Update

This commit is contained in:
“VeLiTi”
2024-05-17 10:51:45 +02:00
parent 448c08fec3
commit 2036869663
6 changed files with 33 additions and 22 deletions

View File

@@ -10,8 +10,16 @@ if (debug && debug_id == $_SESSION['id']){
include_once './assets/functions.php';
include_once './settings/settings.php';
//SET PAGE ORIGIN FOR NAVIGATION AND SECURITY
$prev_page = (isset($_SESSION['origin']) && $_SESSION['origin'] == 'equipments') ? $_SESSION['prev_origin_equipment'] : $_SESSION['prev_origin_servicereport'];
$page = 'servicereport';
//create backbutton to prev_origin
$back_btn_orgin = ($prev_page != '')? '<a href="'.$prev_page.'" class="btn alt mar-right-2">'.$button_back.'</a>':'';
//Check if allowed
if (isAllowed('servicereport',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
@@ -35,14 +43,9 @@ $view = '
<p>'.$servicereport_p.'</p>
</div>
</div>
'.$back_btn_orgin.'
</div>';
$view .= '
<div class="content-header responsive-flex-column pad-top-5">
<a href="index.php?page=equipment&equipmentID='.$_GET['equipmentID'].'" class="btn">'.$button_cancel.'</a>
</div>
';
//Get all related service events
if (empty($history)){
$service_events = '