menu bar - user image
This commit is contained in:
parent
212fe62e6c
commit
ba7b0106a5
@ -82,7 +82,8 @@ class Login extends CI_Controller
|
|||||||
'DEPCode'=>$res->DEPCode,
|
'DEPCode'=>$res->DEPCode,
|
||||||
'HeadDept'=>$res->HeadDept,
|
'HeadDept'=>$res->HeadDept,
|
||||||
'DepartmentName'=>$res->DepartmentName,
|
'DepartmentName'=>$res->DepartmentName,
|
||||||
'EmpID' => $res->EmpID,
|
'EmpID' => $res->EmpID,
|
||||||
|
'ProfilePic' =>$res->ProfilePic,
|
||||||
'isLoggedIn' => TRUE
|
'isLoggedIn' => TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -49,6 +49,7 @@ class BaseController extends CI_Controller {
|
|||||||
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
||||||
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
||||||
$this->EmpID = $this->session->userdata ( 'EmpID' );
|
$this->EmpID = $this->session->userdata ( 'EmpID' );
|
||||||
|
$this->profilepic = $this->session->userdata ( 'ProfilePic' );
|
||||||
$this->global ['name'] = $this->name;
|
$this->global ['name'] = $this->name;
|
||||||
$this->global ['role'] = $this->role;
|
$this->global ['role'] = $this->role;
|
||||||
$this->global ['role_text'] = $this->roleText;
|
$this->global ['role_text'] = $this->roleText;
|
||||||
|
|||||||
@ -10,7 +10,7 @@ class Login_model extends CI_Model
|
|||||||
*/
|
*/
|
||||||
function loginMe($email, $password)
|
function loginMe($email, $password)
|
||||||
{
|
{
|
||||||
$this->db->select('BaseTbl.userId, BaseTbl.password, Emp.EmpID,Emp.FirstName,Emp.Designation, BaseTbl.roleId, Roles.role,DEPT.DEPCode,DEPT.DepartmentName,DEPT.HeadDept');
|
$this->db->select('BaseTbl.userId, BaseTbl.password, Emp.EmpID,Emp.FirstName,Emp.Designation, BaseTbl.roleId, Roles.role,DEPT.DEPCode,DEPT.DepartmentName,DEPT.HeadDept,Emp.ProfilePic');
|
||||||
$this->db->from('tbl_users as BaseTbl');
|
$this->db->from('tbl_users as BaseTbl');
|
||||||
$this->db->join('tbl_roles as Roles','Roles.roleId = BaseTbl.roleId');
|
$this->db->join('tbl_roles as Roles','Roles.roleId = BaseTbl.roleId');
|
||||||
$this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID');
|
$this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID');
|
||||||
|
|||||||
@ -465,7 +465,7 @@ function validateESI() {
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<img id="profilepicture" src="<?php echo base_url(); ?>assets/dist/img/avatar.png" alt="your image" style="width: 139px;"/><br/>
|
<img id="profilepicture" src="<?php echo base_url().'assets/dist/img/avatar.png' ?>" alt="your image" style="width: 139px;"/><br/>
|
||||||
<input type='file' onchange="readURL(this);" id="photo" name="photo"/>
|
<input type='file' onchange="readURL(this);" id="photo" name="photo"/>
|
||||||
<label for="photo">Select profile picture<br/><small>(only .jpg or .png)</small></label>
|
<label for="photo">Select profile picture<br/><small>(only .jpg or .png)</small></label>
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="pull-right hidden-xs">
|
<div class="pull-right hidden-xs">
|
||||||
<b>Resico Industries</b> Admin System | Version 1.0
|
<b>Resico Industries</b> Admin System | Version 1.0
|
||||||
</div>
|
</div>
|
||||||
<strong>Copyright © 2017-2018 <a href="<?php echo base_url(); ?>">Resico Industries</a>.</strong> All rights reserved.
|
<strong>Copyright © 2017 <a href="<?php echo base_url(); ?>">Resico Industries</a>.</strong> All rights reserved.
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- jQuery UI 1.11.2 -->
|
<!-- jQuery UI 1.11.2 -->
|
||||||
|
|||||||
@ -723,13 +723,21 @@ $(function() {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li class="dropdown user user-menu">
|
<li class="dropdown user user-menu">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<img src="<?php echo base_url(); ?>assets/dist/img/avatar.png" class="user-image" alt="User Image"/>
|
<?php if($this->profilepic != '') {?>
|
||||||
|
<img src="<?php echo base_url().'uploads/images/'.$this->profilepic ; ?>" class="user-image" alt="User Image" />
|
||||||
|
<?php } else {?>
|
||||||
|
<img src="<?php echo base_url(); ?>assets/dist/img/avatar5.png" class="user-image" alt="User Image"/>
|
||||||
|
<?php } ?>
|
||||||
<span class="hidden-xs"><?php echo $name; ?></span>
|
<span class="hidden-xs"><?php echo $name; ?></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<!-- User image -->
|
<!-- User image -->
|
||||||
<li class="user-header">
|
<li class="user-header">
|
||||||
<img src="<?php echo base_url(); ?>assets/dist/img/avatar.png" class="img-circle" alt="User Image" />
|
<?php if($this->profilepic != '') {?>
|
||||||
|
<img src="<?php echo base_url().'uploads/images/'.$this->profilepic ; ?>" class="img-circle" alt="User Image" />
|
||||||
|
<?php } else {?>
|
||||||
|
<img src="<?php echo base_url(); ?>assets/dist/img/avatar5.png" class="img-circle" alt="User Image"/>
|
||||||
|
<?php } ?>
|
||||||
<p>
|
<p>
|
||||||
<?php echo $name; ?>-<?php echo $role; ?>
|
<?php echo $name; ?>-<?php echo $role; ?>
|
||||||
<small><?php echo $role_text; ?></small>
|
<small><?php echo $role_text; ?></small>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user