security department
This commit is contained in:
parent
d049be389b
commit
d6c244988d
@ -49,7 +49,7 @@ define('ROLE_ACCOUNTS', '8');*/
|
|||||||
|
|
||||||
|
|
||||||
/***** USER DESIGNATION ******/
|
/***** USER DESIGNATION ******/
|
||||||
define('SECURITY', 'SECURITY');
|
//define('SECURITY', 'SECURITY');
|
||||||
|
|
||||||
define('SEGMENT', 2);
|
define('SEGMENT', 2);
|
||||||
|
|
||||||
@ -140,6 +140,7 @@ define('FINANCE', 'DEP10');
|
|||||||
define('PURCHASE', 'DEP11');
|
define('PURCHASE', 'DEP11');
|
||||||
define('MANAGEMENT', 'DEP12');
|
define('MANAGEMENT', 'DEP12');
|
||||||
define('HR', 'DEP13');
|
define('HR', 'DEP13');
|
||||||
|
define('SECURITY', 'DEP15');
|
||||||
/* PO Type */
|
/* PO Type */
|
||||||
define('REVENUE', 'REVENUE');
|
define('REVENUE', 'REVENUE');
|
||||||
define('SERVICE', 'SERVICE');
|
define('SERVICE', 'SERVICE');
|
||||||
|
|||||||
@ -78,10 +78,10 @@ class Login extends CI_Controller
|
|||||||
foreach ($result as $res)
|
foreach ($result as $res)
|
||||||
{
|
{
|
||||||
$sessionArray = array('userId'=>$res->userId,
|
$sessionArray = array('userId'=>$res->userId,
|
||||||
'role'=>$res->roleId,
|
// 'role'=>$res->roleId,
|
||||||
'roleText'=>$res->role,
|
'roleText'=>$res->role,
|
||||||
'name'=>$res->FirstName,
|
'name'=>$res->FirstName,
|
||||||
'Designation'=>$res->Designation,
|
//'Designation'=>$res->Designation,
|
||||||
'DEPCode'=>$res->DEPCode,
|
'DEPCode'=>$res->DEPCode,
|
||||||
'HeadDept'=>$res->HeadDept,
|
'HeadDept'=>$res->HeadDept,
|
||||||
'depaccess'=>$this->login_model->Accessdep($res->EmpID),
|
'depaccess'=>$this->login_model->Accessdep($res->EmpID),
|
||||||
@ -92,13 +92,14 @@ class Login extends CI_Controller
|
|||||||
|
|
||||||
$this->session->set_userdata($sessionArray);
|
$this->session->set_userdata($sessionArray);
|
||||||
|
|
||||||
$role=$res->roleId;
|
//$role=$res->roleId;
|
||||||
$designation=$res->Designation;
|
//$designation=$res->Designation;
|
||||||
|
$DEPCode=$res->DEPCode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($role == ROLE_EMPLOYEE && $designation == SECURITY)
|
if ($DEPCode == SECURITY)
|
||||||
{
|
{
|
||||||
redirect('/Addigr');
|
redirect('/Addigr');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,11 +40,11 @@ class BaseController extends CI_Controller {
|
|||||||
if (! isset ( $isLoggedIn ) || $isLoggedIn != TRUE) {
|
if (! isset ( $isLoggedIn ) || $isLoggedIn != TRUE) {
|
||||||
redirect ( 'login' );
|
redirect ( 'login' );
|
||||||
} else {
|
} else {
|
||||||
$this->role = $this->session->userdata ( 'role' );
|
//$this->role = $this->session->userdata ( 'role' );
|
||||||
$this->vendorId = $this->session->userdata ( 'userId' );
|
$this->vendorId = $this->session->userdata ( 'userId' );
|
||||||
$this->name = $this->session->userdata ( 'name' );
|
$this->name = $this->session->userdata ( 'name' );
|
||||||
$this->roleText = $this->session->userdata ( 'roleText' );
|
$this->roleText = $this->session->userdata ( 'roleText' );
|
||||||
$this->Designation = $this->session->userdata ( 'Designation' );
|
//$this->Designation = $this->session->userdata ( 'Designation' );
|
||||||
$this->DEPCode = $this->session->userdata ( 'DEPCode' );
|
$this->DEPCode = $this->session->userdata ( 'DEPCode' );
|
||||||
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
||||||
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
||||||
|
|||||||
@ -171,7 +171,7 @@ $(function() {
|
|||||||
</a>
|
</a>
|
||||||
</li> -->
|
</li> -->
|
||||||
<!-- <?php echo $Designation;?> -->
|
<!-- <?php echo $Designation;?> -->
|
||||||
<!-- <?php echo $DEPCode;?> -->
|
<!-- <?php echo $DEPCode;?> -->
|
||||||
<!-- <?php print_r($DepAccesslist); echo $DEPCode?> -->
|
<!-- <?php print_r($DepAccesslist); echo $DEPCode?> -->
|
||||||
|
|
||||||
<!-- <?php if(empty($DepAccesslist)){echo "empty";}
|
<!-- <?php if(empty($DepAccesslist)){echo "empty";}
|
||||||
@ -180,7 +180,7 @@ $(function() {
|
|||||||
|
|
||||||
<?php if($DEPCode != HR){?>
|
<?php if($DEPCode != HR){?>
|
||||||
|
|
||||||
<?php if($Designation != SECURITY){?>
|
<?php if($DEPCode != SECURITY){?>
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i> Requisition<span class="caret"></span></span>
|
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i> Requisition<span class="caret"></span></span>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
||||||
@ -241,7 +241,7 @@ $(function() {
|
|||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<?php if($DEPCode != HR){?>
|
<?php if($DEPCode != HR){?>
|
||||||
<?php if($Designation != SECURITY){?>
|
<?php if($DEPCode != SECURITY){?>
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-check-square-o"></i> Store Requisition<span class="caret"></span></span>
|
<span id="menu" data-toggle="dropdown" ><i class="fa fa-check-square-o"></i> Store Requisition<span class="caret"></span></span>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
||||||
@ -345,7 +345,7 @@ $(function() {
|
|||||||
|
|
||||||
<!-- <?php print_r($DepAccesslist)?> -->
|
<!-- <?php print_r($DepAccesslist)?> -->
|
||||||
<?php if(empty($DepAccesslist)){ ?>
|
<?php if(empty($DepAccesslist)){ ?>
|
||||||
<?php if($DEPCode == FINANCE || $DEPCode == SALES || $DEPCode == HR || $DEPCode == SYSTEM_ADMIN || $DEPCode == ADMIN && $Designation != SECURITY){?>
|
<?php if($DEPCode == FINANCE || $DEPCode == SALES || $DEPCode == HR || $DEPCode == SYSTEM_ADMIN || $DEPCode == ADMIN && $DEPCode != SECURITY){?>
|
||||||
|
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<span id="menu" data-toggle="dropdown"><i class="fa fa-database" aria-hidden="true"></i> Master Details<span class="caret"></span></span>
|
<span id="menu" data-toggle="dropdown"><i class="fa fa-database" aria-hidden="true"></i> Master Details<span class="caret"></span></span>
|
||||||
@ -391,7 +391,7 @@ $(function() {
|
|||||||
|
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<?php if($DEPCode == ADMIN && $Designation != SECURITY ){?>
|
<?php if($DEPCode == ADMIN && $DEPCode != SECURITY ){?>
|
||||||
|
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<a href="<?php echo base_url(); ?>companyview" >
|
<a href="<?php echo base_url(); ?>companyview" >
|
||||||
@ -809,14 +809,13 @@ $(function() {
|
|||||||
<?php if($check ==1){break;}}}?>
|
<?php if($check ==1){break;}}}?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(empty($DepAccesslist)){
|
||||||
|
|
||||||
<?php if(empty($DepAccesslist)){
|
if($DEPCode == STORE || $DEPCode == QUALITY || $DEPCode == SECURITY){ ?>
|
||||||
|
|
||||||
if($DEPCode == STORE || $DEPCode == QUALITY || $Designation == SECURITY){?>
|
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-check-square-o"></i> Inspection<span class="caret"></span></span>
|
<span id="menu" data-toggle="dropdown" ><i class="fa fa-check-square-o"></i> Inspection<span class="caret"></span></span>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu1">
|
<ul class="dropdown-menu" role="menu" aria-labelledby="menu1">
|
||||||
<?php if($DEPCode == STORE || $DEPCode == QUALITY){?>
|
<?php if($DEPCode == STORE || $DEPCode == QUALITY || $DEPCode == SECURITY){?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -826,6 +825,18 @@ $(function() {
|
|||||||
<span>Inward Gate Register Entry</span>
|
<span>Inward Gate Register Entry</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="treeview">
|
||||||
|
<a href="<?php echo base_url(); ?>ViewigrDetails">
|
||||||
|
<i class="fa fa-upload"></i>
|
||||||
|
<span>View Inward Gate Register</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php if($DEPCode != SECURITY){?>
|
||||||
|
|
||||||
|
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<a href="<?php echo base_url(); ?>Viewigr">
|
<a href="<?php echo base_url(); ?>Viewigr">
|
||||||
@ -864,7 +875,7 @@ $(function() {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
<!-- <li class="treeview">
|
<!-- <li class="treeview">
|
||||||
<a href="<?php echo base_url(); ?>ViewigrDetails">
|
<a href="<?php echo base_url(); ?>ViewigrDetails">
|
||||||
@ -875,7 +886,7 @@ $(function() {
|
|||||||
|
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<?php if($Designation == SECURITY){?>
|
<!-- <?php if($DEPCode == SECURITY){?>
|
||||||
|
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<a href="<?php echo base_url(); ?>Addigr">
|
<a href="<?php echo base_url(); ?>Addigr">
|
||||||
@ -883,9 +894,16 @@ $(function() {
|
|||||||
<span>Inward Gate Register Entry</span>
|
<span>Inward Gate Register Entry</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="treeview">
|
||||||
|
<a href="<?php echo base_url(); ?>ViewigrDetails">
|
||||||
|
<i class="fa fa-upload"></i>
|
||||||
|
<span>View Inward Gate Register</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<?php }?>
|
<?php }?> -->
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@ -908,7 +926,7 @@ $(function() {
|
|||||||
|
|
||||||
//echo $assd;
|
//echo $assd;
|
||||||
|
|
||||||
if($assd == STORE || $DEPCode == QUALITY || $assd == QUALITY || DEPCode == STORE){ $check = $check+1;?>
|
if($assd == STORE || $DEPCode == QUALITY || $assd == QUALITY || DEPCode == STORE || $DEPCode == SECURITY || $assd == SECURITY){ $check = $check+1;?>
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-check-square-o"></i> Inspection<span class="caret"></span></span>
|
<span id="menu" data-toggle="dropdown" ><i class="fa fa-check-square-o"></i> Inspection<span class="caret"></span></span>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu1">
|
<ul class="dropdown-menu" role="menu" aria-labelledby="menu1">
|
||||||
@ -1123,7 +1141,7 @@ $(function() {
|
|||||||
|
|
||||||
<?php if(empty($DepAccesslist)){?>
|
<?php if(empty($DepAccesslist)){?>
|
||||||
<?php if($DEPCode == ADMIN){?>
|
<?php if($DEPCode == ADMIN){?>
|
||||||
<?php if($Designation != SECURITY){?>
|
<?php if($DEPCode != SECURITY){?>
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i> Attendance<span class="caret"></span></span>
|
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i> Attendance<span class="caret"></span></span>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user