Enhance UI and functionality across multiple pages
- Added filter panels and search functionality to media, orders, partners, pricelists, products, products attributes, software versions, translations, and users pages. - Implemented security checks for create, update, and delete permissions on various pages. - Updated CSS styles for improved layout and responsiveness, including new styles for filter panels and buttons. - Refactored existing forms to utilize the new filter panel design for a more consistent user experience. - Adjusted API versioning in servicereport and servicereports pages for better compatibility. - Improved button icons for filter actions and form submissions for better user interaction.
This commit is contained in:
65
accounts.php
65
accounts.php
@@ -12,12 +12,18 @@ include_once './settings/settings_redirector.php';
|
||||
|
||||
//SET ORIGIN FOR NAVIGATION
|
||||
$_SESSION['prev_origin'] = '';
|
||||
$page = 'accounts';
|
||||
|
||||
//Check if allowed
|
||||
if (isAllowed('accounts',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'account_manage';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -62,6 +68,16 @@ $view = '
|
||||
<p>'.$account_p .'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=account_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -71,30 +87,33 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=account_manage" class="btn">'.$button_create_account.'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="accounts">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$account_status.'</option>
|
||||
<option value="0">'.$accountstatus_0.'</option>
|
||||
<option value="1">'.$accountstatus_1.'</option>
|
||||
<option value="2">'.$accountstatus_2.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="accounts">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$account_status.'</option>
|
||||
<option value="0">'.$accountstatus_0.'</option>
|
||||
<option value="1">'.$accountstatus_1.'</option>
|
||||
<option value="2">'.$accountstatus_2.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$account_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$account_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=accounts">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -51,6 +51,26 @@ if (document.querySelector('.filters a')) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Filter panel toggle functions
|
||||
function toggleFilters() {
|
||||
const panel = document.getElementById("filter-panel");
|
||||
if (panel.style.display === "none" || panel.style.display === "") {
|
||||
panel.style.display = "block";
|
||||
} else {
|
||||
panel.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// Close filter panel when clicking outside
|
||||
document.addEventListener("click", function(event) {
|
||||
const panel = document.getElementById("filter-panel");
|
||||
const toggle = document.getElementById("filter-toggle");
|
||||
|
||||
if (panel && toggle && !panel.contains(event.target) && !toggle.contains(event.target)) {
|
||||
panel.style.display = "none";
|
||||
}
|
||||
});
|
||||
if (document.querySelector('.sort a')) {
|
||||
let filtersList = document.querySelector('.sort .list');
|
||||
let filtersListStyle = window.getComputedStyle(filtersList);
|
||||
|
||||
@@ -1803,7 +1803,7 @@ function serviceEvents ($messages,$page){
|
||||
include dirname(__FILE__,2).'/settings/translations/translations_US.php';
|
||||
}
|
||||
|
||||
$view_header = '<table class="sortable">
|
||||
$view_header = '<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$equipment_label2.'</th>
|
||||
|
||||
66
cartests.php
66
cartests.php
@@ -68,6 +68,16 @@ $view = '
|
||||
<p>'.$cartests_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=cartest_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -77,38 +87,40 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">';
|
||||
if ($create_allowed ===1){
|
||||
$view .= '<a href="index.php?page=cartest_manage" class="btn">'.$button_create_cartest.'</a>';
|
||||
}
|
||||
$view .= '
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="cartests">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0">'.$disabled.'</option>
|
||||
<option value="1">'.$enabled.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="cartests">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0">'.$disabled.'</option>
|
||||
<option value="1">'.$enabled.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$cartest_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=cartests">'.$general_filters_clear.'</a>';
|
||||
|
||||
//SHOW DOWNLOAD TO EXCELL OPTION ONLY TO ADMIN USERS
|
||||
if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){
|
||||
$view .='<div class="filters">
|
||||
<a href="index.php?page=cartests&download="><i class="fa-solid fa-download"></i></a>
|
||||
</div>';
|
||||
$view .= '<a class="btn alt" href="index.php?page=cartests&download=">
|
||||
<i class="fa-solid fa-download"></i> Download
|
||||
</a>';
|
||||
}
|
||||
$view .= '<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$cartest_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
$view .= ' </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'communication';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -71,7 +76,21 @@ $view = '
|
||||
<p>'.$communication_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
<div class="title-actions">
|
||||
'.$back_btn_orgin;
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=communication" class="btn">'.$button_create_communication.'</a>';
|
||||
}
|
||||
|
||||
if (isAllowed('communication_send',$_SESSION['profile'],$_SESSION['permission'],'U') === 1){
|
||||
$view .= '<a href="index.php?page=communication_send" class="btn red mar-right-2">'.$button_create_communication_send.'</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -81,33 +100,32 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=communication" class="btn">'.$button_create_communication.'</a>';
|
||||
|
||||
if (isAllowed('communication_send',$_SESSION['profile'],$_SESSION['permission'],'U') === 1){
|
||||
$view .= '<a href="index.php?page=communication_send" class="btn red mar-right-2">'.$button_create_communication_send.'</a>';
|
||||
}
|
||||
$view .= '<form action="" method="get">
|
||||
<input type="hidden" name="page" value="communications">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$communication_status.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$comm_status_0.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$comm_status_1.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
$view .= '
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="communications">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$communication_status.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$comm_status_0.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$comm_status_1.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$communication_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$communication_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=communications">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -22,6 +22,12 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'contract_manage';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//Close Contracts when end_date expired
|
||||
closeContract();
|
||||
|
||||
@@ -68,7 +74,17 @@ $view = '
|
||||
<p>'.$contract_p .'</p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
<div class="title-actions">
|
||||
'.$back_btn_orgin;
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=contract_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -78,31 +94,34 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=contract_manage" class="btn">'.$button_create_contract.'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="contracts">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$contract_status.'</option>
|
||||
<option value="0">'.$contract_status0.'</option>
|
||||
<option value="1">'.$contract_status1.'</option>
|
||||
<option value="2">'.$contract_status2.'</option>
|
||||
<option value="3">'.$contract_status3.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="contracts">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$contract_status.'</option>
|
||||
<option value="0">'.$contract_status0.'</option>
|
||||
<option value="1">'.$contract_status1.'</option>
|
||||
<option value="2">'.$contract_status2.'</option>
|
||||
<option value="3">'.$contract_status3.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$contract_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$contract_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=contracts">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ $media_responses = ioServer($api_url,'');
|
||||
|
||||
//Decode Payload
|
||||
if (!empty($media_responses)){$media_responses = json_decode($media_responses,true);}else{$media_responses = null;}
|
||||
$media_responses = $media_responses[0];
|
||||
$media_responses = $media_responses[0] ?? '';
|
||||
|
||||
//CALL TO API FOR History
|
||||
$api_url = '/v2/equipments/equipmentID='.$responses->equipmentID.'&type=ServiceReport&history=1';
|
||||
@@ -314,7 +314,7 @@ $view .= '<div class="content-block">
|
||||
<i class="fa-solid fa-bars fa-sm"></i>'.($view_asset_data_text ?? '').'
|
||||
</div>
|
||||
<div class="table">
|
||||
<table class="sortable">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$view_asset_data_rowID.'</th>
|
||||
@@ -347,7 +347,7 @@ if ($update_allowed === 1){
|
||||
<i class="fa-solid fa-bars fa-sm"></i>'.$view_asset_notes.'
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
<textarea id="description" name="description" placeholder="'.$view_asset_notes.'" style="width: 100%;height: 150px;" onchange="this.form.submit();"></textarea>
|
||||
<textarea id="description" name="description" placeholder="'.$view_asset_notes.'" style="width: 100%;height: 150px;background: var(--color-gray);border: none;" onchange="this.form.submit();"></textarea>
|
||||
<input type="hidden" name="equipmentid" value="'.$responses->equipmentID.'">
|
||||
<input type="hidden" name="type" value="'.$type16.'">
|
||||
</form>
|
||||
|
||||
@@ -201,7 +201,7 @@ $view .= '<div class="content-block tab-content active">
|
||||
</select>
|
||||
<label for="productrowid">'.$equipment_label4.'</label>
|
||||
<select id="productrowid" name="productrowid" '.($update_allowed_special==0? 'disabled':'').'>
|
||||
<option value="'.$equipment['productrowid'].'">'.(${$equipment['productname']} ?? $equipment['productname']).'</option>
|
||||
'.(isset($equipment['productname']) ? '<option value="'.$equipment['productrowid'].'">'.(${$equipment['productname']} ?? $equipment['productname']).'</option>' : '').'
|
||||
'.$product_option_list.'
|
||||
</select>
|
||||
<label for="serialnumber">'.$equipment_label2.'</label>
|
||||
|
||||
113
equipments.php
113
equipments.php
@@ -117,7 +117,17 @@ $view = '
|
||||
<p>'.$assets_p.' </p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
<div class="title-actions">
|
||||
'.$back_btn_orgin;
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=equipment_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -129,65 +139,62 @@ $view .= ' <div class="msg success">
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">';
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
'.$filter.'
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$equipment_label3.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$status0_text.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$status1_text.'</option>
|
||||
<option value="2"'.($status==2?' selected':'').'>'.$status2_text.'</option>
|
||||
<option value="3"'.($status==3?' selected':'').'>'.$status3_text.'</option>
|
||||
<option value="4"'.($status==4?' selected':'').'>'.$status4_text.'</option>
|
||||
<option value="5"'.($status==5?' selected':'').'>'.$status5_text.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
if ($create_allowed ===1){
|
||||
$view .= '<a href="index.php?page=equipment_manage" class="btn">'.$button_create_asset.'</a>';
|
||||
}
|
||||
$view .= '
|
||||
<form action="" method="get">
|
||||
'.$filter.'
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$equipment_label3.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$status0_text.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$status1_text.'</option>
|
||||
<option value="2"'.($status==2?' selected':'').'>'.$status2_text.'</option>
|
||||
<option value="3"'.($status==3?' selected':'').'>'.$status3_text.'</option>
|
||||
<option value="4"'.($status==4?' selected':'').'>'.$status4_text.'</option>
|
||||
<option value="5"'.($status==5?' selected':'').'>'.$status5_text.'</option>
|
||||
</select>
|
||||
'.$product_list.'
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<a class="cancel_link" style="color: #FFFFFF;text-decoration: none;" href="index.php?page=equipments">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sort">
|
||||
<a href="#"><i class="fa-solid fa-sort"></i>'.$general_sort.'</a>
|
||||
<div class="list">
|
||||
<select name="sort">
|
||||
<option value="" disabled selected>'.$general_sort.'</option>
|
||||
<option value="1"'.($sort==1?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_1.'</option>
|
||||
<option value="2"'.($sort==2?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_2.'</option>
|
||||
<option value="3"'.($sort==3?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_1.'</option>
|
||||
<option value="4"'.($sort==4?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_2.'</option>
|
||||
<option value="5"'.($sort==5?' selected':'').'>'.$warranty_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="6"'.($sort==6?' selected':'').'>'.$warranty_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="7"'.($sort==7?' selected':'').'>'.$service_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="8"'.($sort==8?' selected':'').'>'.$service_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="9"'.($sort==9?' selected':'').'>'.$general_sort_type_3.'</option>
|
||||
<option value="10"'.($sort==10?' selected':'').'>'.$general_sort_type_4.'</option>
|
||||
<div class="filter-group">
|
||||
'.$product_list.'
|
||||
</div>
|
||||
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div class="filter-group">
|
||||
<select name="sort">
|
||||
<option value="" disabled selected>'.$general_sort.'</option>
|
||||
<option value="1"'.($sort==1?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_1.'</option>
|
||||
<option value="2"'.($sort==2?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_2.'</option>
|
||||
<option value="3"'.($sort==3?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_1.'</option>
|
||||
<option value="4"'.($sort==4?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_2.'</option>
|
||||
<option value="5"'.($sort==5?' selected':'').'>'.$warranty_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="6"'.($sort==6?' selected':'').'>'.$warranty_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="7"'.($sort==7?' selected':'').'>'.$service_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="8"'.($sort==8?' selected':'').'>'.$service_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="9"'.($sort==9?' selected':'').'>'.$general_sort_type_3.'</option>
|
||||
<option value="10"'.($sort==10?' selected':'').'>'.$general_sort_type_4.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$equiment_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=equipments">X</a>';
|
||||
|
||||
//SHOW DOWNLOAD TO EXCELL OPTION ONLY TO ADMIN USERS
|
||||
if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){
|
||||
$view .='<div class="filters">
|
||||
<a href="index.php?page=equipments&download="><i class="fa-solid fa-download"></i></a>
|
||||
</div>';
|
||||
$view .= '<a class="btn alt" href="index.php?page=equipments&download=">
|
||||
<i class="fa-solid fa-download"></i>
|
||||
</a>';
|
||||
}
|
||||
$view .= '<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$equiment_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
$view .= ' </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
$view .= '
|
||||
|
||||
@@ -229,7 +229,7 @@ if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){
|
||||
<div class="order-detail">
|
||||
<textarea id="excel_data" name="excel_data" onkeydown="countLines()" style="width:100%;height:150px;" placeholder="'.$paste_excel_1.' '.$paste_excel_2.'"></textarea>
|
||||
</div>
|
||||
<input type="submit" id="mass_update_submit" value="'.$button_apply.'" onclick="return confirm(\''.$mass_update_confirm_message.'\')" class="btn">
|
||||
<input type="submit" id="mass_update_submit" value="<i class="fas fa-level-down-alt fa-rotate-90"></i>" onclick="return confirm(\''.$mass_update_confirm_message.'\')" class="btn">
|
||||
';
|
||||
$view .='
|
||||
</div>
|
||||
|
||||
@@ -51,33 +51,41 @@ $view = '
|
||||
<p>'.$history_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">
|
||||
<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="histories">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="type">
|
||||
<option value="" disabled selected>Type</option>
|
||||
<option value="'.$type1.'"'.($status==$type1 ?' selected':'').'>'.$type1.'</option>
|
||||
<option value="'.$type2.'"'.($status==$type2 ?' selected':'').'>'.$type2.'</option>
|
||||
<option value="'.$type3.'"'.($status==$type3 ?' selected':'').'>'.$type3.'</option>
|
||||
<option value="'.$type9.'"'.($status==$type9 ?' selected':'').'>'.$type9.'</option>
|
||||
<option value="'.$type14.'"'.($status==$type14 ?' selected':'').'>'.$type14.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="histories">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="type">
|
||||
<option value="" disabled selected>Type</option>
|
||||
<option value="'.$type1.'"'.($status==$type1 ?' selected':'').'>'.$type1.'</option>
|
||||
<option value="'.$type2.'"'.($status==$type2 ?' selected':'').'>'.$type2.'</option>
|
||||
<option value="'.$type3.'"'.($status==$type3 ?' selected':'').'>'.$type3.'</option>
|
||||
<option value="'.$type9.'"'.($status==$type9 ?' selected':'').'>'.$type9.'</option>
|
||||
<option value="'.$type14.'"'.($status==$type14 ?' selected':'').'>'.$type14.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$history_Search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$history_Search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=histories">X</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
68
media.php
68
media.php
@@ -96,6 +96,20 @@ $view = '
|
||||
<p>'.($media_p ?? 'View, manage, and search media details.').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1 && isAllowed('media_scanner' ,$_SESSION['profile'],$_SESSION['permission'],'C') === 1){
|
||||
$view .= '<a href="index.php?page=media_scanner" class="btn">📷</a>';
|
||||
}
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=media_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -105,40 +119,32 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">';
|
||||
if ($create_allowed ===1 && isAllowed('media_scanner' ,$_SESSION['profile'],$_SESSION['permission'],'C') === 1){
|
||||
$view .= '<a href="index.php?page=media_scanner" class="btn">'.($button_media_scanner ?? 'media_scanner').'</a>';
|
||||
}
|
||||
|
||||
if ($create_allowed ===1){
|
||||
$view .= '
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
<input type="file" onchange="this.form.submit()" name="fileToUpload[]" id="fileToUpload" accept=".png, .PNG, .jpg,.JPG,.jpeg,.JPEG" style="width: 30%;padding: 50px 0 0 0;height: 10px;" multiple>
|
||||
</form>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="media">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0">'.$disabled.'</option>
|
||||
<option value="1">'.$enabled.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="media">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0">'.$disabled.'</option>
|
||||
<option value="1">'.$enabled.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($media_search ?? 'Search media...').'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
$view .= '<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.($media_search ?? 'Search media...').'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=media">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
37
orders.php
37
orders.php
@@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'order';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -64,6 +69,16 @@ $view = '
|
||||
<p>'.($orders_p ?? '').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=orders_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -75,9 +90,27 @@ $view .= ' <div class="msg success">
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=orders_manage" class="btn">'.($button_create_orders ?? 'Create order').'</a>
|
||||
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="orders">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($orders_search ?? 'Search orders...').'" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=orders">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
$view .= '
|
||||
<div class="content-block">
|
||||
<div class="table">
|
||||
<table>
|
||||
|
||||
58
partners.php
58
partners.php
@@ -65,6 +65,16 @@ $view = '
|
||||
<p>'.$partners_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=partner" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -74,32 +84,32 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">';
|
||||
if ($create_allowed ===1){
|
||||
$view .= '<a href="index.php?page=partner" class="btn">'.$button_create_partner.'</a>';
|
||||
}
|
||||
$view .= '
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="partners">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$disabled.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$enabled.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="partners">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$disabled.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$enabled.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$partner_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$partner_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=partners">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'pricelists_manage';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -64,6 +69,16 @@ $view = '
|
||||
<p>'.($pricelists_p ?? 'Manage pricelists').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=pricelists_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -73,18 +88,24 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=pricelists_manage" class="btn">'.($button_create_pricelist ?? 'Create pricelist').'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="pricelists">
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.($pricelists_search ?? '').'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="pricelists">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($pricelists_search ?? 'Search pricelists...').'" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=pricelists">X</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
60
products.php
60
products.php
@@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'product_manage';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -65,6 +70,16 @@ $view = '
|
||||
<p>'.$products_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=product_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -74,29 +89,32 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=product_manage" class="btn">'.$button_create_product.'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$prod_status_text.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$prod_status_0.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$prod_status_1.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$prod_status_text.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$prod_status_0.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$prod_status_1.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$product_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$product_search .'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=products">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -19,7 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//PAGE Security
|
||||
$page_manage = 'products_attributes_manage';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -65,6 +69,16 @@ $view = '
|
||||
<p>'.($products_attributes_p ?? '').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=products_attributes_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -74,18 +88,24 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=products_attributes_manage" class="btn">'.($button_create_products_attribute ?? 'Create attribute').'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products_attributes">
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.($products_attribute_search ?? '').'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products_attributes">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($products_attribute_search ?? 'Search attributes...').'" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=products_attributes">X</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'products_software_version_manage';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -75,6 +80,16 @@ $view = '
|
||||
<p>'.$software_versions_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=products_software_version_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -84,20 +99,29 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=products_software_version_manage" class="btn">'.$button_create_software_version.'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products_software_versions">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$prod_status_text.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$prod_status_0.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$prod_status_1.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products_software_versions">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$prod_status_text.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$prod_status_0.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$prod_status_1.'</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=products_software_versions">X</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
|
||||
@@ -127,7 +127,7 @@ $view .= '
|
||||
<option value="12" '.($contract['month']==12 ?' selected':'').'>Dec</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<button type="submit"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
|
||||
@@ -109,7 +109,7 @@ $view .= '
|
||||
<option value="5"'.($status==5?' selected':'').'>'.$status5_text.'</option>
|
||||
</select>
|
||||
'.$product_list.'
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<button type="submit"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="cancel_link" style="color: #FFFFFF;text-decoration: none;" href="index.php?page=report_healthindex">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,7 +129,7 @@ $view .= '
|
||||
<option value="9"'.($sort==9?' selected':'').'>'.$view_asset_data_ranking .' '.$general_sort_type_2.'</option>
|
||||
<option value="10"'.($sort==10?' selected':'').'>'.$view_asset_data_ranking .' '.$general_sort_type_1.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<button type="submit"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
67
rmas.php
67
rmas.php
@@ -68,6 +68,16 @@ $view = '
|
||||
<p>'.($rmas_p ?? 'View, manage, and search RMA details.').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=rma_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -77,38 +87,41 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">';
|
||||
if ($create_allowed ===1){
|
||||
$view .= '<a href="index.php?page=rma_manage" class="btn">'.($button_create_rma ?? 'Create RMA').'</a>';
|
||||
}
|
||||
$view .= '
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="rma">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0">'.$disabled.'</option>
|
||||
<option value="1">'.$enabled.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="rmas">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0">'.$disabled.'</option>
|
||||
<option value="1">'.$enabled.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($rma_search ?? 'Search RMA...').'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=rmas">'.$general_filters_clear.'</a>';
|
||||
|
||||
//SHOW DOWNLOAD TO EXCELL OPTION ONLY TO ADMIN USERS
|
||||
if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){
|
||||
$view .='<div class="filters">
|
||||
<a href="index.php?page=rma&download="><i class="fa-solid fa-download"></i></a>
|
||||
</div>';
|
||||
$view .= '<a class="btn alt" href="index.php?page=rmas&download=">
|
||||
<i class="fa-solid fa-download"></i> Download
|
||||
</a>';
|
||||
}
|
||||
$view .= '<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.($rma_search ?? 'Search RMA...').'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
$view .= ' </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
//GET Details from URL
|
||||
$GET_VALUES = urlGETdetails($_GET) ?? '';
|
||||
//CALL TO API FOR History
|
||||
$api_url = '/v1/history/'.$GET_VALUES;
|
||||
$api_url = '/v2/history/'.$GET_VALUES;
|
||||
$history = ioServer($api_url,'');
|
||||
|
||||
//Decode Payload
|
||||
if (!empty($history)){$history = decode_payload($history);}else{$history = null;}
|
||||
if (!empty($history)){$history = json_decode($history);}else{$history = null;}
|
||||
|
||||
template_header('Servicereport', 'servicereport','view');
|
||||
$view = '
|
||||
@@ -60,7 +60,6 @@ if (empty($history)){
|
||||
$view .= '<div class="content-block">
|
||||
<div class="block-header">
|
||||
<i class="fa-solid fa-bars fa-sm"></i>'.$servicereport_details.' - '.$_GET['historyID'].'
|
||||
<a href="index.php?page=render_service_report&historyID='.$_GET['historyID'].'" class="btn"></a>
|
||||
</div>
|
||||
'.$service_events.'
|
||||
</div>
|
||||
|
||||
@@ -35,16 +35,16 @@ $url = 'index.php?page=servicereports'.$status.$search.$equipmentid;
|
||||
//GET Details from URL
|
||||
$GET_VALUES = urlGETdetails($_GET) ?? '';
|
||||
//CALL TO API FOR History
|
||||
$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'';
|
||||
$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.'';
|
||||
$history = ioServer($api_url,'');
|
||||
|
||||
//Decode Payload
|
||||
if (!empty($history)){$history = decode_payload($history);}else{$history = null;}
|
||||
if (!empty($history)){$history = json_decode($history);}else{$history = null;}
|
||||
//Return QueryTotal from API
|
||||
$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'&totals=';
|
||||
$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.'&totals=';
|
||||
$query_total = ioServer($api_url,'');
|
||||
//Decode Payload
|
||||
if (!empty($query_total)){$query_total = decode_payload($query_total);}else{$query_total = null;}
|
||||
if (!empty($query_total)){$query_total = json_decode($query_total);}else{$query_total = null;}
|
||||
|
||||
template_header('Servicereports', 'servicereports','view');
|
||||
$view = '
|
||||
@@ -56,22 +56,33 @@ $view = '
|
||||
<p>'.$servicereports_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
<div class="title-actions">
|
||||
'.$back_btn_orgin.'
|
||||
<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="servicereports">
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$servicereports_Search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
';
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="servicereports">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$servicereports_Search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=servicereports">X</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
//Get all related service events
|
||||
if (empty($history)){
|
||||
$service_events = '
|
||||
@@ -83,9 +94,6 @@ if (empty($history)){
|
||||
}
|
||||
|
||||
$view .= '<div class="content-block">
|
||||
<div class="block-header">
|
||||
<i class="fa-solid fa-bars fa-sm"></i>'.$servicereports_details.'
|
||||
</div>
|
||||
<div class="table order-table">'.$service_events.'</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
174
style/admin.css
174
style/admin.css
@@ -3,6 +3,7 @@
|
||||
--color-light-green: #2FAC66;
|
||||
--color-green: #005655;
|
||||
--color-red: #a75151;
|
||||
--color-gray: #f9fafb;
|
||||
--text-color: #555555;
|
||||
--text-color-accent: #4a5361;
|
||||
--text-color-accent-2:#606c7e;
|
||||
@@ -121,7 +122,6 @@ aside {
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
height: 100%;
|
||||
width: 260px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
background-color: var(--color-white);
|
||||
@@ -517,10 +517,15 @@ main .content-header .sort .list button:hover {
|
||||
main .content-block {
|
||||
background-color: var(--color-white);
|
||||
margin-top: 25px;
|
||||
padding: 15px;
|
||||
box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.03);
|
||||
padding: 10px;
|
||||
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
||||
overflow: hidden;
|
||||
border-radius: 3px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
main .content-block:has(.sortable) {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
main .content-block .block-header {
|
||||
@@ -821,6 +826,7 @@ main .pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 25px 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
main .pagination a {
|
||||
@@ -977,18 +983,28 @@ main .manage-order-table .delete-item:hover {
|
||||
|
||||
.table {
|
||||
overflow-x: auto;
|
||||
padding: 0 10px;
|
||||
padding: 0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.table table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background-color: var(--color-white);
|
||||
}
|
||||
|
||||
.table table thead th,
|
||||
.table table thead td {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
padding: 15px 0;
|
||||
font-size: 13px;
|
||||
padding: 16px 20px;
|
||||
color: #64748b;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
background-color: #f8fafc;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.table table thead td a {
|
||||
@@ -1002,12 +1018,24 @@ main .manage-order-table .delete-item:hover {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.table table tbody tr:first-child td {
|
||||
padding-top: 10px;
|
||||
.table table tbody tr {
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.table table tbody tr:hover {
|
||||
background-color: #f8fafc;
|
||||
}
|
||||
|
||||
.table table tbody tr:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.table table tbody td {
|
||||
padding: 5px;
|
||||
padding: 16px 20px;
|
||||
font-size: 14px;
|
||||
color: #334155;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table table tbody .img {
|
||||
@@ -1019,48 +1047,60 @@ main .manage-order-table .delete-item:hover {
|
||||
}
|
||||
|
||||
.table table tbody .status {
|
||||
padding: 4px 7px;
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-indicator-3);
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
background-color: #10b981;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: var(--color-white);
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
.table table tbody .status.enabled {
|
||||
padding: 4px 7px;
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-indicator-1);
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
background-color: #10b981;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: var(--color-white);
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
.table table tbody .status.disabled {
|
||||
padding: 4px 7px;
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-indicator-2);
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
background-color: #ef4444;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: var(--color-white);
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
|
||||
.status {
|
||||
padding: 4px 7px;
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-indicator-3);
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
background-color: #10b981;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: var(--color-white);
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
.status.enabled {
|
||||
background-color: var(--color-indicator-1);
|
||||
background-color: #10b981;
|
||||
}
|
||||
|
||||
.status.disabled {
|
||||
background-color: var(--color-indicator-2);
|
||||
background-color: #ef4444;
|
||||
}
|
||||
|
||||
.status.id4 {
|
||||
@@ -1255,11 +1295,9 @@ background-color: var(--color-indicator-1);
|
||||
color: var(--color-white);
|
||||
padding: 0 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
border-radius: 4px;
|
||||
border-radius: 3px;
|
||||
height: 38px;
|
||||
margin: 2px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
@@ -2870,3 +2908,85 @@ main .products .product .price, main .products .products-wrapper .product .price
|
||||
height: 25px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
/* Filter Panel Styles */
|
||||
.content-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
background: #f8f9fa;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.filter-content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-group {
|
||||
flex: 1;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
.search-group {
|
||||
flex: 2;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.filter-group select,
|
||||
.filter-group input {
|
||||
width: 100%;
|
||||
padding: 8px 8px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.filter-actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.content-title {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.title-actions {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.filter-actions {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'translation_manage';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -64,6 +69,16 @@ $view = '
|
||||
<p>'.($text_variables_p ?? '').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=translation_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -73,18 +88,25 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=translation_manage" class="btn">'.($button_create_text_variable ?? '').'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="translations">
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.($text_variable_search ?? '').'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="translations">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($text_variable_search ?? '').'" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=translations">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
60
users.php
60
users.php
@@ -72,7 +72,17 @@ $view = '
|
||||
<p>'.$users_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
<div class="title-actions">
|
||||
'.$back_btn_orgin;
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=user" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -82,32 +92,32 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">';
|
||||
if ($create_allowed ===1){
|
||||
$view .= '<a href="index.php?page=user" class="btn">'.$button_create_user.'</a>';
|
||||
}
|
||||
$view .= '
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="users">
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="userkey">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$disabled.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$enabled.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="users">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="userkey">
|
||||
<option value="" disabled selected>Active</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$disabled.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$enabled.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$users_search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$users_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=users">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user