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,
|
||||
'HeadDept'=>$res->HeadDept,
|
||||
'DepartmentName'=>$res->DepartmentName,
|
||||
'EmpID' => $res->EmpID,
|
||||
'EmpID' => $res->EmpID,
|
||||
'ProfilePic' =>$res->ProfilePic,
|
||||
'isLoggedIn' => TRUE
|
||||
);
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@ class BaseController extends CI_Controller {
|
||||
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
||||
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
||||
$this->EmpID = $this->session->userdata ( 'EmpID' );
|
||||
$this->profilepic = $this->session->userdata ( 'ProfilePic' );
|
||||
$this->global ['name'] = $this->name;
|
||||
$this->global ['role'] = $this->role;
|
||||
$this->global ['role_text'] = $this->roleText;
|
||||
|
||||
@ -10,7 +10,7 @@ class Login_model extends CI_Model
|
||||
*/
|
||||
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->join('tbl_roles as Roles','Roles.roleId = BaseTbl.roleId');
|
||||
$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="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"/>
|
||||
<label for="photo">Select profile picture<br/><small>(only .jpg or .png)</small></label>
|
||||
|
||||
|
||||
@ -679,7 +679,7 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3">
|
||||
<div class="box-header">
|
||||
<div class="box-header">
|
||||
<img id="profilepicture" src="<?php echo base_url().'uploads/images/'.$ProfilePic ; ?>" alt="your image" style="width: 139px;"/><br/>
|
||||
<input type='file' onchange="readURL(this);" id="photo" value="<?php echo $ProfilePic ; ?>" name="photo"/>
|
||||
<label for="photo">Select profile picture<br/><small>(only .jpg or .png)</small></label>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Resico Industries</b> Admin System | Version 1.0
|
||||
</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>
|
||||
|
||||
<!-- jQuery UI 1.11.2 -->
|
||||
|
||||
@ -723,13 +723,21 @@ $(function() {
|
||||
<?php } ?>
|
||||
<li class="dropdown user user-menu">
|
||||
<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>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<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>
|
||||
<?php echo $name; ?>-<?php echo $role; ?>
|
||||
<small><?php echo $role_text; ?></small>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user