349 lines
23 KiB
PHP
349 lines
23 KiB
PHP
<!-- Topbar Start -->
|
|
<div class="navbar-custom">
|
|
<div class="container-fluid">
|
|
|
|
<ul class="list-unstyled topnav-menu float-right mb-0">
|
|
|
|
<li class="dropdown d-inline-block d-lg-none">
|
|
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
|
<i class="fe-search noti-icon"></i>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-lg dropdown-menu-right p-0">
|
|
<form class="p-3">
|
|
<input type="text" class="form-control" placeholder="Search ..." aria-label="Recipient's username">
|
|
</form>
|
|
</div>
|
|
</li>
|
|
<!-- <li class="dropdown d-none d-lg-inline-block">
|
|
<a class="nav-link dropdown-toggle waves-effect waves-light" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
|
|
|
<?php $reminder_count = session()->getFlashdata('count');
|
|
if($reminder_count>1){ ?>
|
|
<span class="badge badge-danger rounded-circle noti-icon-badge"><?php echo $reminder_count; ?></span>
|
|
<?php }?>
|
|
</a>
|
|
</li> -->
|
|
<!-- <li class="dropdown d-none d-lg-inline-block">
|
|
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
|
|
<i class="fe-maximize noti-icon"></i>
|
|
</a>
|
|
</li> -->
|
|
|
|
<li class="dropdown d-none d-lg-inline-block topbar-dropdown">
|
|
<!-- <a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
|
<i class="fe-grid noti-icon"></i>
|
|
</a> -->
|
|
<div class="dropdown-menu dropdown-lg dropdown-menu-right p-0">
|
|
|
|
<div class="p-2">
|
|
<div class="row no-gutters">
|
|
<div class="col">
|
|
<a class="dropdown-icon-item" href="https://web.whatsapp.com/" target="_blank">
|
|
<img src="<?= base_url()."public/assets/images/brands/whatsapp.png" ?>" alt="whatsapp">
|
|
<span>Whatsapp</span>
|
|
</a>
|
|
|
|
</div>
|
|
<div class="col">
|
|
<a class="dropdown-icon-item" href="https://meet.google.com" target="_blank">
|
|
<img src="<?= base_url()."public/assets/images/brands/meet.png" ?>" alt="G meet">
|
|
<span>G Meet</span>
|
|
</a>
|
|
</div>
|
|
<div class="col">
|
|
<a class="dropdown-icon-item" href="https://mail.google.com" target="_blank">
|
|
<!-- <img src="https://ssl.gstatic.com/ui/v1/icons/mail/rfr/logo_gmail_lockup_default_1x_r5.png" alt="G Suite"> -->
|
|
<img src="<?= base_url()."public/assets/images/brands/gmail.png" ?>" alt="G mail">
|
|
<span>G Mail</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</li>
|
|
|
|
<li class="dropdown notification-list topbar-dropdown">
|
|
<!-- <a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
|
<i class="fe-bell noti-icon"></i>
|
|
<?php // $reminder_messages = session()->getFlashdata('reminder');
|
|
// $reminder_count = count($reminder_messages);
|
|
// if((int)$reminder_count > 0){ ?>
|
|
<span class="badge badge-danger rounded-circle noti-icon-badge"><?php echo $reminder_count; ?></span>
|
|
<?php // } ?>
|
|
</a> -->
|
|
<div class="dropdown-menu dropdown-menu-right dropdown-lg">
|
|
|
|
<!-- item-->
|
|
<div class="dropdown-item noti-title">
|
|
<h5 class="m-0">
|
|
<!-- <span class="float-right">
|
|
<a href="" class="text-dark">
|
|
<small>Clear All</small>
|
|
</a>
|
|
</span>Notification -->
|
|
Reminder
|
|
</h5>
|
|
</div>
|
|
|
|
<div class="noti-scroll" data-simplebar>
|
|
<?php
|
|
$reminder_messages = session()->getFlashdata('reminder');
|
|
if(!empty($reminder_messages)): ?>
|
|
<?php foreach ($reminder_messages as $message): ?>
|
|
<a href="javascript:void(0);" class="dropdown-item notify-item active">
|
|
<div class="notify-icon bg-soft-primary text-primary">
|
|
<i class="mdi mdi-comment-processing-outline"></i>
|
|
</div>
|
|
<p class="notify-details"></p>
|
|
<p class="text-muted mb-0 user-msg">
|
|
<small class="text-muted"><?=$message?></small>
|
|
</p>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
<?php else: ?>
|
|
<a href="javascript:void(0);" class="dropdown-item notify-item active">
|
|
<small class="text-muted"><center><?php echo "No Reminder Message Available :) "?></center></small>
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<!-- All-->
|
|
<a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
|
|
<!-- View all
|
|
<i class="fe-arrow-right"></i> -->
|
|
</a>
|
|
|
|
</div>
|
|
</li>
|
|
|
|
<li class="dropdown notification-list topbar-dropdown">
|
|
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
|
|
|
<span class="pro-user-name ml-1"><?= $loggedin_person; ?><i class="mdi mdi-chevron-down"></i>
|
|
</span>
|
|
</a>
|
|
|
|
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
|
|
<!-- item-->
|
|
<div class="dropdown-header noti-title">
|
|
<h6 class="text-overflow m-0"><?= $loggedin_person_role; ?></h6>
|
|
</div>
|
|
|
|
<!-- item-->
|
|
<a href="<?= base_url()."user_page/".$loggedin_person_id."/1"; ?>" class="dropdown-item notify-item">
|
|
<i class="ri-account-circle-line"></i>
|
|
<span>My Account</span>
|
|
</a>
|
|
|
|
<?php if ($loggedin_person_role !== 'manager' && $loggedin_person_role !== 'sadmin') : ?>
|
|
<a href="<?= base_url()."new_org/".$bid; ?>"class="dropdown-item notify-item">
|
|
<i class="ri-briefcase-4-fill"></i><span> Org Setting </span>
|
|
</a>
|
|
<?php endif; ?>
|
|
|
|
<a href="javascript: void(0);" class="dropdown-item notify-item" data-toggle="modal" data-target="#changepwd-modal">
|
|
<i class=" ri-lock-password-line"></i>
|
|
<span>Change Password</span>
|
|
</a>
|
|
|
|
<a href="<?= base_url()."lock"; ?>" class="dropdown-item notify-item">
|
|
<i class="ri-lock-line"></i>
|
|
<span>Lock Screen</span>
|
|
</a>
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<!-- item-->
|
|
<a href="<?= base_url()."logout"; ?>" class="dropdown-item notify-item">
|
|
<i class="ri-logout-box-line"></i>
|
|
<span>Logout</span>
|
|
</a>
|
|
|
|
</div>
|
|
</li>
|
|
|
|
|
|
<!-- <li class="dropdown notification-list">
|
|
<a href="javascript:void(0);" class="nav-link right-bar-toggle waves-effect waves-light">
|
|
<i class="fe-settings noti-icon"></i>
|
|
</a>
|
|
</li> -->
|
|
|
|
</ul>
|
|
|
|
<!-- LOGO -->
|
|
<div class="logo-box">
|
|
<a href="dashboard" class="logo logo-dark text-center">
|
|
<span class="logo-sm">
|
|
<img src="<?= $company_logo_small; ?>" alt="<?= $company_short_name; ?>" height="24">
|
|
<!-- <span class="logo-lg-text-light">Minton</span> -->
|
|
</span>
|
|
<span class="logo-lg">
|
|
<img src="<?= $company_logo_large; ?>" alt="<?= $company_name; ?>" height="50">
|
|
<!-- <img src="<?= base_url()."public/uploads/default.png" ?>" alt="<?= $company_name; ?>" height="20"> -->
|
|
<!-- <span class="logo-lg-text-light">M</span> -->
|
|
</span>
|
|
</a>
|
|
|
|
<a href="dashboard" class="logo logo-light text-center">
|
|
<span class="logo-sm" style="background: white;">
|
|
<img src="<?= $company_logo_small; ?>" alt="<?= $company_short_name; ?>" height="24">
|
|
</span>
|
|
<span class="logo-lg" style="background: white;">
|
|
<!-- <img src="<?= base_url()."public/uploads/default.png" ?>" alt="<?= $company_name; ?>" height="24"> -->
|
|
<img src="<?= $company_logo_large; ?>" alt="<?= $company_name; ?>" height="70">
|
|
</span>
|
|
</a>
|
|
</div>
|
|
|
|
<ul class="list-unstyled topnav-menu topnav-menu-left m-0">
|
|
<li>
|
|
<button class="button-menu-mobile waves-effect waves-light">
|
|
<i class="fe-menu"></i>
|
|
</button>
|
|
</li>
|
|
|
|
<li>
|
|
<!-- Mobile menu toggle (Horizontal Layout)-->
|
|
<a class="navbar-toggle nav-link" data-toggle="collapse" data-target="#topnav-menu-content">
|
|
<div class="lines">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
</div>
|
|
</a>
|
|
<!-- End mobile menu toggle-->
|
|
</li>
|
|
</ul>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
<!-- end Topbar -->
|
|
<div id="changepwd-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header mt-1">
|
|
<h5 class="modal-title text-center">Change Password</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="message-container"></div>
|
|
<form id="passwordChangeForm" class="px-3 parsley-examples" data-parsley-validate>
|
|
<!-- <div class="form-group">
|
|
<label for="emailaddress1">Email address</label>
|
|
<input class="form-control" type="text" readonly="" id="emailaddress1" name="user_mail" value="email@example.com">
|
|
</div> -->
|
|
|
|
<div class="form-group">
|
|
<label for="password">Password</label>
|
|
<input class="form-control" type="password" required="" id="password0" name="user_old_password" placeholder="Enter your password" autocomplete="off">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password1">New Password</label>
|
|
<input class="form-control" type="password" required="" id="password1" name="user_new_password" placeholder="Enter your new password" data-parsley-not-equal-to-old-password="" autocomplete="off">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password2">Confirm Password</label>
|
|
<input class="form-control" type="password" required="" id="password2" name="user_confirm_password" placeholder="Enter your confirm password" data-parsley-equal-to-new-password="" autocomplete="off">
|
|
</div>
|
|
|
|
<div class="form-group text-center mt-1">
|
|
<button type="submit" class="btn btn-rounded btn-primary">Update</button>
|
|
</div>
|
|
<!-- <div class="form-group text-center"> -->
|
|
<!-- <button class="btn btn-rounded btn-primary" onclick="changePassword()">Update</button> -->
|
|
<!-- <button class="btn btn-rounded btn-primary" onclick="changePassword(event)">Update</button> -->
|
|
<!-- </div> -->
|
|
|
|
</form>
|
|
|
|
</div>
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div><!-- /.modal -->
|
|
<script>
|
|
$(document).ready(function() {
|
|
|
|
$('#passwordChangeForm').parsley();
|
|
|
|
window.Parsley.addValidator('notEqualToOldPassword', {
|
|
validateString: function(value, requirement) {
|
|
var oldPassword = $('#password0').val();
|
|
return value !== oldPassword;
|
|
},
|
|
messages: {
|
|
en: 'New password must not be the same as the old password.'
|
|
}
|
|
});
|
|
|
|
window.Parsley.addValidator('equalToNewPassword', {
|
|
validateString: function(value, requirement) {
|
|
var newPassword = $('#password1').val();
|
|
return value === newPassword;
|
|
},
|
|
messages: {
|
|
en: 'Confirm password must match the new password.'
|
|
}
|
|
});
|
|
|
|
$('#passwordChangeForm').on('submit', function(event) {
|
|
event.preventDefault(); // Prevent default form submission
|
|
|
|
if ($(this).parsley().isValid()) {
|
|
var formData = $(this).serialize();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "<?= base_url() . 'change_password' ?>",
|
|
data: formData,
|
|
success: function(response) {
|
|
if (response['data']['status']) {
|
|
// setTimeout(function() {
|
|
$('#message-container').html('<div class="alert alert-success alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+response['data']['message']+'</div>');
|
|
// $('#changepwd-modal').modal('hide');
|
|
$("#passwordChangeForm")[0].reset();
|
|
// }, 6000);
|
|
} else {
|
|
// setTimeout(function() {
|
|
$('#message-container').html('<div class="alert alert-warning alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+response['data']['message']+'</div>');
|
|
// $('#changepwd-modal').modal('hide');
|
|
$("#passwordChangeForm")[0].reset();
|
|
// }, 6000);
|
|
}
|
|
},
|
|
error: function(xhr, status, error) {
|
|
// setTimeout(function() {
|
|
$('#message-container').html('<div class="alert alert-danger alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> Error Occur : '+xhr.responseText+'</div>');
|
|
// }, 6000);
|
|
console.error(xhr.responseText);
|
|
console.error(error);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
|
|
</script>
|
|
<!-- Start Content-->
|
|
<div class="container-fluid"> <!-- close div on footer.php -->
|
|
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<h4 class="page-title"><?= $heading;?></h4>
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);"><?= $company_name; ?></a></li>
|
|
<li class="breadcrumb-item active"><?= $page_name;?></li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|