[Member]
- level 10 추가 - level 10 은 CUSTOMER 메뉴만 접근 가능 - level 10 은 Customer 수정 불가
This commit is contained in:
parent
7c3e577e59
commit
06718fc388
|
|
@ -1,6 +1,6 @@
|
||||||
<?
|
<?
|
||||||
// Level 9 이하만 사용 가능
|
// Level 10 이하만 사용 가능
|
||||||
$func->checkLevelModal(9);
|
$func->checkLevelModal(10);
|
||||||
|
|
||||||
// Delete 기능 제한 (Admin : 1, Staff : 5, Accounting : 6 만 가능)
|
// Delete 기능 제한 (Admin : 1, Staff : 5, Accounting : 6 만 가능)
|
||||||
$permit = array("1", "5", "6");
|
$permit = array("1", "5", "6");
|
||||||
|
|
@ -18,6 +18,7 @@ else $setTagAdm = "DISABLED";
|
||||||
|
|
||||||
$goStr = "switched=$switched&page=$page&key_word=$key_word&column=$column&sorting_type=$sorting_type&switch=$switch&cstatus=$cstatus";
|
$goStr = "switched=$switched&page=$page&key_word=$key_word&column=$column&sorting_type=$sorting_type&switch=$switch&cstatus=$cstatus";
|
||||||
|
|
||||||
|
//
|
||||||
if ($mode == "create" || $mode == "") {
|
if ($mode == "create" || $mode == "") {
|
||||||
$btnName = "CREATE";
|
$btnName = "CREATE";
|
||||||
$mode = "create";
|
$mode = "create";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?
|
<?
|
||||||
|
|
||||||
// Level 9 이하만 사용 가능
|
// Level 10 이하만 사용 가능
|
||||||
$func->checkLevelModal(9);
|
$func->checkLevelModal(10);
|
||||||
|
|
||||||
// Delete, Add 기능 제한 (Admin : 1, Staff : 5, Accounting : 6 만 가능)
|
// Delete, Add 기능 제한 (Admin : 1, Staff : 5, Accounting : 6 만 가능)
|
||||||
$permit = array("1", "5", "6");
|
$permit = array("1", "5", "6");
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ $arrPaymentCycle = array ('A' => 'A', 'B' => 'B', 'C' => 'C', 'D' => 'D', 'F' =>
|
||||||
$arrNoteType = array ('B' => 'Accounting', 'S' => 'Staff', 'D' => 'Driver', 'A' => 'All' );
|
$arrNoteType = array ('B' => 'Accounting', 'S' => 'Staff', 'D' => 'Driver', 'A' => 'All' );
|
||||||
$arrPaidStatus = array ('P' => 'Paid', 'N' => 'UnPaid');
|
$arrPaidStatus = array ('P' => 'Paid', 'N' => 'UnPaid');
|
||||||
|
|
||||||
$arrMemberLevel = array ('1' => 'Administrator', '5' => 'Staff', '6' => 'Accounting', '7' => 'Sales', '9' => 'Driver' );
|
$arrMemberLevel = array ('1' => 'Administrator', '5' => 'Staff', '6' => 'Accounting', '7' => 'Sales', '9' => 'Driver', '10' => 'Sales Agent' );
|
||||||
|
|
||||||
//$arrClass = array ('M' => 'Math', 'P' => 'Physics', 'C' => 'Chemistry', 'B' => 'Biology', 'S' => 'Science', 'O' => 'Others' );
|
//$arrClass = array ('M' => 'Math', 'P' => 'Physics', 'C' => 'Chemistry', 'B' => 'Biology', 'S' => 'Science', 'O' => 'Others' );
|
||||||
//$arrLevel = array ('A' => 'All', '1' => 'Basic', '2' => 'Intermediate', '3' => 'Advanced');
|
//$arrLevel = array ('A' => 'All', '1' => 'Basic', '2' => 'Intermediate', '3' => 'Advanced');
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,50 @@
|
||||||
<?
|
<?php
|
||||||
|
$level = $_SESSION['ss_LEVEL'] ?? 0;
|
||||||
//require_once getenv("DOCUMENT_ROOT")."/lib/Mobile_Detect.php";
|
$isLogin = ($_SESSION['ss_LOGIN'] ?? 0) == 1;
|
||||||
//$detect = new Mobile_Detect;
|
$userName = $_SESSION['ss_NAME'] ?? '';
|
||||||
|
|
||||||
|
|
||||||
|
// ---- Level Groups ----
|
||||||
|
$isAdmin = in_array($level, [1, 5]);
|
||||||
|
$isManager = in_array($level, [1, 5, 9]);
|
||||||
|
$canExport = in_array($level, [1, 5, 6, 7]);
|
||||||
|
$canOrder = ($level != 7);
|
||||||
|
$isCustomerOnly = ($level == 10);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- ======= Header ======= -->
|
|
||||||
<header id="header" class="header fixed-top d-flex align-items-center">
|
<header id="header" class="header fixed-top d-flex align-items-center">
|
||||||
<div class="container d-flex align-items-center justify-content-between">
|
<div class="container d-flex align-items-center justify-content-between">
|
||||||
|
|
||||||
|
<!-- Logo -->
|
||||||
<a href="/index_intranet.php" class="logo d-flex align-items-center me-auto me-lg-0">
|
<a href="/index_intranet.php" class="logo d-flex align-items-center me-auto me-lg-0">
|
||||||
<img src="assets/img/green-oil-logo-dark.jpg">
|
<img src="assets/img/green-oil-logo-dark.jpg">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<!-- Navigation -->
|
||||||
<nav id="navbar" class="navbar">
|
<nav id="navbar" class="navbar">
|
||||||
<ul>
|
<ul>
|
||||||
<? if ($_SESSION['ss_LEVEL'] == 1 || $_SESSION['ss_LEVEL'] == 5 || $_SESSION['ss_LEVEL'] == 9) { ?>
|
<?php if ($isCustomerOnly): ?>
|
||||||
|
<!-- Level 10: CUSTOMER only -->
|
||||||
|
<li><a href="/index_intranet.php?view=customer_list">CUSTOMER</a></li>
|
||||||
|
<?php else: ?>
|
||||||
|
|
||||||
|
<?php if ($isManager): ?>
|
||||||
<li><a href="/index_intranet.php?view=forecast">FORECAST</a></li>
|
<li><a href="/index_intranet.php?view=forecast">FORECAST</a></li>
|
||||||
<? } ?>
|
<?php endif; ?>
|
||||||
<!--li><a href="/index_intranet.php?view=drzone_list">DRZONE</a></li-->
|
|
||||||
<? if ($_SESSION['ss_LEVEL'] != 7) { ?>
|
<?php if ($canOrder): ?>
|
||||||
<li><a href="/index_intranet.php?view=order_list">ORDER</a></li>
|
<li><a href="/index_intranet.php?view=order_list">ORDER</a></li>
|
||||||
<? } ?>
|
<?php endif; ?>
|
||||||
<? if ($_SESSION['ss_LEVEL'] == 1 || $_SESSION['ss_LEVEL'] == 5 || $_SESSION['ss_LEVEL'] == 9) { ?>
|
|
||||||
|
<?php if ($isManager): ?>
|
||||||
<li><a href="/index_intranet.php?view=map">MAP</a></li>
|
<li><a href="/index_intranet.php?view=map">MAP</a></li>
|
||||||
<? } ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<li><a href="/index_intranet.php?view=customer_list">CUSTOMER</a></li>
|
<li><a href="/index_intranet.php?view=customer_list">CUSTOMER</a></li>
|
||||||
<li><a href="/index_intranet.php?view=oilhistory_list">OIL HISTORY</a></li>
|
<li><a href="/index_intranet.php?view=oilhistory_list">OIL HISTORY</a></li>
|
||||||
<li><a href="/index_intranet.php?view=receipt_list">RECEIPT</a></li>
|
<li><a href="/index_intranet.php?view=receipt_list">RECEIPT</a></li>
|
||||||
|
|
||||||
<? if ($_SESSION['ss_LEVEL'] == 1 || $_SESSION['ss_LEVEL'] == 5 || $_SESSION['ss_LEVEL'] == 6 || $_SESSION['ss_LEVEL'] == 7) { ?>
|
<?php if ($canExport): ?>
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#"><span>EXPORT</span> <i class="bi bi-chevron-down dropdown-indicator"></i></a>
|
<a href="#"><span>EXPORT</span> <i class="bi bi-chevron-down dropdown-indicator"></i></a>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -41,8 +52,7 @@
|
||||||
<li><a href="/index_intranet.php?view=export_oilhistory">OIL HISTORY DATA</a></li>
|
<li><a href="/index_intranet.php?view=export_oilhistory">OIL HISTORY DATA</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<? } ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#"><span>REPORT</span> <i class="bi bi-chevron-down dropdown-indicator"></i></a>
|
<a href="#"><span>REPORT</span> <i class="bi bi-chevron-down dropdown-indicator"></i></a>
|
||||||
|
|
@ -52,33 +62,35 @@
|
||||||
<li><a href="/index_intranet.php?view=report_yearly">YEARLY</a></li>
|
<li><a href="/index_intranet.php?view=report_yearly">YEARLY</a></li>
|
||||||
<li><a href="/index_intranet.php?view=report_monthly">MONTHLY</a></li>
|
<li><a href="/index_intranet.php?view=report_monthly">MONTHLY</a></li>
|
||||||
<li><a href="/index_intranet.php?view=report_daily">DAILY</a></li>
|
<li><a href="/index_intranet.php?view=report_daily">DAILY</a></li>
|
||||||
<!--li><a href="#">ACCOUNT</a></li-->
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<?php if ($isAdmin): ?>
|
||||||
<? if ($_SESSION['ss_LEVEL'] == 1 || $_SESSION['ss_LEVEL'] == 5) { ?>
|
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#"><span>CONFIGURATION</span> <i class="bi bi-chevron-down dropdown-indicator"></i></a>
|
<a href="#"><span>CONFIGURATION</span> <i class="bi bi-chevron-down dropdown-indicator"></i></a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/index_intranet.php?view=member_list">MEMBER</a></li>
|
<li><a href="/index_intranet.php?view=member_list">MEMBER</a></li>
|
||||||
<li><a href="/index_intranet.php?view=configure">CONFIGURATION</a></li>
|
<li><a href="/index_intranet.php?view=configure">CONFIGURATION</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<? } ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav><!-- .navbar -->
|
</nav>
|
||||||
|
|
||||||
<? if ($_SESSION['ss_LOGIN'] == 1) { ?>
|
|
||||||
<a class="txt-user" data-toggle="modal" data-target="#member-detail-modal" style="cursor:pointer;">User: <span class="txt-user-name"><?=$_SESSION["ss_NAME"]?></span></a>
|
|
||||||
|
|
||||||
|
<!-- User Info -->
|
||||||
|
<?php if ($isLogin): ?>
|
||||||
|
<a class="txt-user" data-toggle="modal" data-target="#member-detail-modal" style="cursor:pointer;">
|
||||||
|
User: <span class="txt-user-name"><?=htmlspecialchars($userName)?></span>
|
||||||
|
</a>
|
||||||
<a class="txt-logout" href="/lib/login_process.php?action=logout">Logout</a>
|
<a class="txt-logout" href="/lib/login_process.php?action=logout">Logout</a>
|
||||||
<? } ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<!-- Mobile -->
|
||||||
<i class="mobile-nav-toggle mobile-nav-show bi bi-list"></i>
|
<i class="mobile-nav-toggle mobile-nav-show bi bi-list"></i>
|
||||||
<i class="mobile-nav-toggle mobile-nav-hide d-none bi bi-x"></i>
|
<i class="mobile-nav-toggle mobile-nav-hide d-none bi bi-x"></i>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</header><!-- End Header -->
|
</header>
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,9 @@ if ($c_paymenttype =="CA") {
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<div class="text-center grid-layout-col-2">
|
<div class="text-center grid-layout-col-2">
|
||||||
|
<?php if ($_SESSION['ss_LEVEL'] != 10): ?>
|
||||||
<button type="submit" id="buttonADD" class="btn-sub">SAVE</button>
|
<button type="submit" id="buttonADD" class="btn-sub">SAVE</button>
|
||||||
|
<?php endif; ?>
|
||||||
<button type="button" class="btn-gray" data-dismiss="modal">CLOSE</button>
|
<button type="button" class="btn-gray" data-dismiss="modal">CLOSE</button>
|
||||||
</div>
|
</div>
|
||||||
</FORM>
|
</FORM>
|
||||||
|
|
@ -240,7 +242,7 @@ $(document).ready(function(){
|
||||||
//For debugging
|
//For debugging
|
||||||
//$('.rt_debugging').html(response);
|
//$('.rt_debugging').html(response);
|
||||||
//alert(response);
|
//alert(response);
|
||||||
if (response) {
|
if (response == "1") {
|
||||||
$('.myModalPopup-body').html("Saved Successfully.");
|
$('.myModalPopup-body').html("Saved Successfully.");
|
||||||
$('.myModalPopup-body').css('background-color', '#2A9B56');
|
$('.myModalPopup-body').css('background-color', '#2A9B56');
|
||||||
$('#myModalcustomerShortInfo').modal('hide');
|
$('#myModalcustomerShortInfo').modal('hide');
|
||||||
|
|
@ -251,6 +253,15 @@ $(document).ready(function(){
|
||||||
$('#myModalPopup').modal('hide');
|
$('#myModalPopup').modal('hide');
|
||||||
parent.location.reload();
|
parent.location.reload();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
} else if (response == "-1") {
|
||||||
|
$('.myModalPopup-body').html("You do not have permission.");
|
||||||
|
$('.myModalPopup-body').css('background-color', '#FF8205');
|
||||||
|
|
||||||
|
$('#myModalPopup').modal('show');
|
||||||
|
setTimeout(function () {
|
||||||
|
$('#myModalPopup').modal('hide');
|
||||||
|
}, 1500);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.myModalPopup-body').html("Failed. Please Try again.");
|
$('.myModalPopup-body').html("Failed. Please Try again.");
|
||||||
$('.myModalPopup-body').css('background-color', '#FF8205');
|
$('.myModalPopup-body').css('background-color', '#FF8205');
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,11 @@ if($c_uid == "") {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_SESSION['ss_LEVEL'] == 10) {
|
||||||
|
echo -1;
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$c_comment_riSTR = str_replace("\\", "", trim($c_comment_ri));
|
$c_comment_riSTR = str_replace("\\", "", trim($c_comment_ri));
|
||||||
$c_locationSTR = str_replace("\\", "", trim($c_location));
|
$c_locationSTR = str_replace("\\", "", trim($c_location));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue