CIM63 - asset search on email

This commit is contained in:
“VeLiTi”
2024-04-05 14:10:07 +02:00
parent 40d40ae0f8
commit da3dc228d9
5 changed files with 30 additions and 4 deletions

View File

@@ -8,6 +8,9 @@ defined(page_security_key) or exit;
include_once './assets/functions.php';
include_once './settings/settings.php';
//SET ORIGIN FOR NAVIGATION
$_SESSION['prev_origin'] = '';
//Check if allowed
if (isAllowed('accounts',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');

View File

@@ -61,7 +61,7 @@ if(isset($get_content) && $get_content!=''){
}
elseif ($v[0] == 'search') {
//build up search
$clause .= ' AND h.rowID like :'.$v[0];
$clause .= ' AND (h.rowID like :'.$v[0].' OR h.createdby like :'.$v[0].')';
}
else {//create clause
$clause .= ' AND '.$v[0].' = :'.$v[0];

View File

@@ -1,7 +1,10 @@
<?php
defined(page_security_key) or exit;
$page = 'communication';
//SET ORIGIN FOR NAVIGATION
$_SESSION['prev_origin'] = $_SERVER['REQUEST_URI'];
$page = $_SESSION['origin'] = 'communication';
//Check if allowed
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
@@ -117,6 +120,15 @@ $view .= '<div class="tabs">
</div>
';
//GET PARTNERID
$view_partners = '';
if(isset($communication['partnerID']) && $communication['partnerID'] !=''){
$partner_ID = strtok($communication['partnerID'],'-');
$view_partners = '
<label for="">'.$partner_view_assigned_assets.'</label>
<a href="index.php?page=equipments&partnerid='.$partner_ID.'" class="btn" style="width: 15%;">'.$button_view.'</a>';
}
$view .= '<div class="content-block tab-content active">
<div class="form responsive-width-100">
<label for="status">'.$communication_status.'</label>
@@ -149,6 +161,7 @@ $view .= '<div class="content-block tab-content active">
<option value="0" '.($communication['type_3']==0?' selected':'').'>'.$coms_status_0 .'</option>
</select>
<input type="hidden" name="rowID" value="'.$communication['rowID'].'">
'.$view_partners.'
</div>
</div>';

View File

@@ -8,6 +8,9 @@ defined(page_security_key) or exit;
include_once './assets/functions.php';
include_once './settings/settings.php';
//SET ORIGIN FOR NAVIGATION
$_SESSION['prev_origin'] = '';
//Check if allowed
if (isAllowed('communications',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');

View File

@@ -8,8 +8,12 @@ defined(page_security_key) or exit;
include_once './assets/functions.php';
include_once './settings/settings.php';
//SET ORIGIN FOR NAVIGATION
$_SESSION['prev_origin'] = $_SERVER['REQUEST_URI'];
$page = $_SESSION['origin'] = 'histories';
//Check if allowed
if (isAllowed('histories',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
@@ -74,6 +78,7 @@ $view .= '
</form>
</div>
';
$view .= '
<div class="content-block">
<div class="table">
@@ -85,6 +90,7 @@ $view .= '
<th class="responsive-hidden">'.$history_label3.'</th>
<th class="responsive-hidden">'.$history_label4.'</th>
<th>'.$history_label5.'</th>
<th>'.$view_asset_actions.'</th>
</tr>
</thead>
<tbody>
@@ -109,6 +115,7 @@ $view .= '
<td class="responsive-hidden">'.$response->created.'</td>
<td class="responsive-hidden">'.$response->createdby.'</td>
<td><pre>' . $description . '</pre></td>
<td><a href="index.php?page=equipment&equipmentID='.$response->equipmentID.'" class="btn_link">'.$general_view .'</a></td>
</tr>
';
}