suseendhiran
@ -53,12 +53,28 @@ public function index()
|
||||
public function authendicate()
|
||||
{
|
||||
$user = $this->auth_model->validate_user();
|
||||
//print_r($user);die();
|
||||
// print_r($user);die();
|
||||
// echo hash_password('password');die();
|
||||
|
||||
if (empty($user)) {
|
||||
redirect('login');
|
||||
}
|
||||
$this->session->set_flashdata('msg', "username not avaiable");
|
||||
redirect('login');
|
||||
}
|
||||
if (!empty($user) && $user->is_active == 0) {
|
||||
$this->session->set_flashdata('msg', "deactivate user");
|
||||
redirect('login');
|
||||
}
|
||||
// if (!empty($user)) {
|
||||
// if ($user->is_active == 0) {
|
||||
// $this->session->set_flashdata('msg', $user);
|
||||
// redirect('login');
|
||||
// }
|
||||
// else{
|
||||
// $this->session->set_flashdata('msg', $user);
|
||||
// redirect('login');
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// if (!empty($user) && $user->status == 0) {
|
||||
// // account pending
|
||||
// echo json_encode(array('st'=>2));
|
||||
@ -105,6 +121,8 @@ public function authendicate()
|
||||
$this->session->set_userdata($data);
|
||||
redirect('dashboard');
|
||||
}
|
||||
// pass the value 1 when the username or password is wrong
|
||||
$this->session->set_flashdata('msg',"password doesn't match");
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
|
||||
@ -130,6 +130,7 @@ function validate_user()
|
||||
$this->db->from('users');
|
||||
$this->db->where('email', $this->input->post('user_name'));
|
||||
$this->db->or_where('user_name', $this->input->post('user_name'));
|
||||
// $this->db->where('is_active', 1);
|
||||
$this->db->limit(1);
|
||||
$query = $this->db->get();
|
||||
if($query->num_rows() == 1){
|
||||
|
||||
@ -39,25 +39,32 @@
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" class="form-control" value="password" name="password" placeholder="Password" required="" />
|
||||
<?php
|
||||
if ( $this->session->flashdata('msg')) {
|
||||
?>
|
||||
<p id='message' style="color:red"><?php echo $this->session->flashdata('msg'); ?></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="btn btn-primary">Log in</button>
|
||||
<a class="reset_pass" href="#">Lost your password?</a>
|
||||
<!-- <a class="reset_pass" href="#">Lost your password?</a> -->
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="separator">
|
||||
<p class="change_link">New to site?
|
||||
<!-- <p class="change_link">New to site?
|
||||
<a href="#signup" class="to_register"> Create Account </a>
|
||||
</p>
|
||||
</p> -->
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<h1>Venba Infotech!</h1>
|
||||
<p>©2016 All Rights Reserved. Venba Infotech! is a Bootstrap 4 template. Privacy and Terms</p>
|
||||
<!-- <h1>Venba Infotech!</h1> -->
|
||||
<p>All Rights Reserved.Privacy and Terms</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -39,7 +39,8 @@
|
||||
<link href="<?php echo base_url(); ?>/assets/default/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
|
||||
<!-- bootstrap-datetimepicker -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
|
||||
|
||||
<!-- style.css -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/customize/style.css" rel="stylesheet">
|
||||
|
||||
|
||||
|
||||
@ -93,13 +94,19 @@
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-usermenu pull-right" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="<?php echo base_url()?>user/profile/"> Profile</a>
|
||||
<a class="dropdown-item" href="javascript:;">
|
||||
<a class="dropdown-item" href="<?php echo base_url()?>user/changepassword/">Change Password</a>
|
||||
<?php
|
||||
if (is_admin()) {
|
||||
?>
|
||||
<a class="dropdown-item" href="<?php echo base_url()?>user/businessProfile/<?php echo md5(user()->business_id); ?>"> Business</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<a class="dropdown-item" href="javascript:;">
|
||||
<span class="badge bg-red pull-right">50%</span>
|
||||
<span>Settings</span>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?php echo base_url()?>user/changepassword/">Change password</a>
|
||||
<a class="dropdown-item" href="<?php echo base_url()?>user/businessProfile/"> business</a>
|
||||
<a class="dropdown-item" href="javascript:;">Help</a>
|
||||
<!-- <a class="dropdown-item" href="javascript:;">Help</a> -->
|
||||
<a class="dropdown-item" href="<?php echo base_url();?>auth/logout"><i class="fa fa-sign-out pull-right"></i> Log Out</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -187,10 +187,10 @@ public function check_password()
|
||||
}
|
||||
|
||||
|
||||
public function businessProfile()
|
||||
public function businessProfile($business_id)
|
||||
{
|
||||
// $user_list = $this->MY_Model->get_by_id( user()->id , 'users');
|
||||
// $this->layout->set('userData', $user_list);
|
||||
$business_list = $this->user_model->get_business_by_md5_id($business_id);
|
||||
$this->layout->set('businessData', $business_list);
|
||||
$this->layout->buffer('main_content', 'User/business');
|
||||
$this->layout->render('default_layout');
|
||||
}
|
||||
|
||||
@ -64,5 +64,17 @@ public function business()
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function get_business_by_md5_id($business_id)
|
||||
{
|
||||
$this->db->select('B.* , state.name as state_name ');
|
||||
$this->db->from('business B');
|
||||
$this->db->join('state', 'state.id = B.state', 'left');
|
||||
$this->db->where('B.is_active', 1);
|
||||
$this->db->where('md5(uid)', $business_id);
|
||||
$query = $this->db->get();
|
||||
$query = $query->row();
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,18 +1,5 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<style>
|
||||
.field-icon {
|
||||
float: right;
|
||||
margin-left: -25px;
|
||||
margin-top: -25px;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="">
|
||||
@ -56,7 +43,7 @@
|
||||
<input type="text" id="business_id" name="business_id" value="<?php echo $data->business_id ?>" class="form-control " hidden>
|
||||
<?php }
|
||||
else if(is_superadmin()) { ?>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Business </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Business<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="business_id" name="business_id" required="required" class="form-control" >
|
||||
<option value="<?php if(isset($businessData)) { echo $businessData->uid; } ?>">
|
||||
@ -78,7 +65,7 @@
|
||||
<input type="text" id="role" name="role" value="user" class="form-control " hidden>
|
||||
<?php }
|
||||
else if(is_superadmin()) { ?>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Role </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Role<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="role" name="role" required="required" class="form-control" >
|
||||
<option value="">Select role</option>
|
||||
@ -96,12 +83,12 @@
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Email </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="email" name="email" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
@ -110,15 +97,15 @@
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="mobile" name="mobile" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Permit </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Permission<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="action_permit" name="action_permit" required="required" class="form-control" >
|
||||
<option value="">Select permit</option>
|
||||
<option value="">Select Permission</option>
|
||||
<option value="all">All</option>
|
||||
<option value="view">View</option>
|
||||
</select>
|
||||
@ -130,18 +117,18 @@
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Username </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Username<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="text" id="user_name" name="user_name" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Password </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Password<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="password" name="password" value="" required="required" class="form-control " title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
<span toggle="#password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="confirm_password" name="confirm_password" value="" required="required" class="form-control ">
|
||||
<span id='message'></span>
|
||||
@ -151,49 +138,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
// match the password and confirm password equal or not
|
||||
$('#password, #confirm_password').on('keyup', function () {
|
||||
$(':input[type="submit"]').prop('disabled', true);
|
||||
if ($('#password').val() == $('#confirm_password').val() && $('#confirm_password').val().length > 0 ) {
|
||||
$('#message').html('Matching').css('color', 'green');
|
||||
$('button[type="submit"]').attr("disabled", false);
|
||||
}
|
||||
else if($('#password').val().length == 0 || $('#confirm_password').val().length == 0){
|
||||
$('#message').html('');
|
||||
}
|
||||
else
|
||||
$('#message').html('Not Matching').css('color', 'red');
|
||||
});
|
||||
|
||||
// password eye icon
|
||||
$(".toggle-password").click(function() {
|
||||
$(this).toggleClass("fa-eye fa-eye-slash");
|
||||
var input = $($(this).attr("toggle"));
|
||||
if (input.attr("type") == "password") {
|
||||
input.attr("type", "text");
|
||||
}
|
||||
else {
|
||||
input.attr("type", "password");
|
||||
}
|
||||
});
|
||||
|
||||
// sadmin create admin onchange function select permit as all default
|
||||
$('#role').on('change', function() {
|
||||
if(this.value == "admin")
|
||||
{
|
||||
$('#action_permit').html('<option value="all">All</option>');
|
||||
$('#action_permit').attr("style", "pointer-events: none;");
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#action_permit').attr("style", "pointer-events: default;");
|
||||
$('#action_permit').html(`<option value="">Select permit</option>
|
||||
<option value="all">All</option>
|
||||
<option value="view">View</option>`);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -27,10 +27,10 @@
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>User Report
|
||||
<h2>Business Report
|
||||
<!-- <small>Activity report</small> -->
|
||||
</h2>
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
@ -42,7 +42,7 @@
|
||||
</li>
|
||||
<li><a class="close-link"><i class="fa fa-close"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul> -->
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
@ -51,13 +51,13 @@
|
||||
<div id="crop-avatar">
|
||||
<!-- Current avatar -->
|
||||
<?php
|
||||
if ($userData->profile_image == NULL) {
|
||||
if ($businessData->logo == NULL) {
|
||||
?>
|
||||
<img style="width: 100%; display: block;" src="<?php echo base_url(); ?>assets/uploads/profile_picture/profile.jpg ?>" alt="Avatar" title="Change the avatar">
|
||||
<img style="width: 100%; display: block;" src="<?php echo base_url(); ?>assets/uploads/logo/company-logo.png ?>" alt="Avatar" title="Change the avatar">
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<img style="width: 100%; display: block;" src="<?php echo base_url(); ?>assets/uploads/profile_picture/<?php echo $userData->profile_image ?> ?>" alt="Avatar" title="Change the avatar">
|
||||
<img style="width: 100%; display: block;" src="<?php echo base_url(); ?>assets/uploads/logo/<?php echo $businessData->logo ?>" alt="Avatar" title="Change the avatar">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@ -65,18 +65,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<h3><?php echo user()->name ?></h3>
|
||||
<h3><?php echo $businessData->business_name ?></h3>
|
||||
|
||||
<ul class="list-unstyled user_data">
|
||||
<li><i class="fa fa-envelope user-profile-icon"></i> <?php echo user()->email ?>
|
||||
<li><i class="fa fa-map-marker user-profile-icon"></i> <?php echo $businessData->address,' , ',$businessData->city,' , ',$businessData->state_name,' , ',$businessData->pincode,' , ',$businessData->country ?>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="fa fa-phone user-profile-icon"></i> <?php echo user()->mobile ?>
|
||||
<i class="fa fa-envelope user-profile-icon"></i> <?php echo $businessData->email ?>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="fa fa-phone user-profile-icon"></i> <?php echo $businessData->phone ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a class="btn btn-success" href="<?php echo base_url()?>user/editprofile/<?php echo md5(user()->id);?>"><i class="fa fa-edit m-right-xs"></i>Edit Profile</a>
|
||||
<a class="btn btn-success" href="<?php echo base_url()?>business/get_business/<?php echo md5($businessData->id);?>"><i class="fa fa-edit m-right-xs"></i>Edit Business</a>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
@ -1,25 +1,12 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<style>
|
||||
.field-icon {
|
||||
float: right;
|
||||
margin-left: -25px;
|
||||
margin-top: -25px;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Add User</h3>
|
||||
<h3>Change Password</h3>
|
||||
</div>
|
||||
|
||||
|
||||
@ -46,9 +33,9 @@
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Old password </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Old Password </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="old_password" name="old_password" value="" required="required" class="form-control ">
|
||||
<input type="password" id="old_password" name="old_password" value="" required="required" class="form-control ">
|
||||
<span id='message1'></span>
|
||||
</div>
|
||||
|
||||
@ -59,7 +46,7 @@
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> New Password </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="password" id="password" name="password" value="" required="required" class="form-control " title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
<span toggle="#password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -75,6 +62,7 @@
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
@ -87,7 +75,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Edit User</h3>
|
||||
<h3>Edit Profile</h3>
|
||||
</div>
|
||||
|
||||
|
||||
@ -59,14 +59,14 @@
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
<!-- <div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Profile </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="formFile" name="profile_image" class="typeFile" type="file" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- --------------------------- -->
|
||||
|
||||
|
||||
|
||||
@ -53,12 +53,22 @@
|
||||
<input type="text" id="mobile" name="mobile" value="<?php echo $editData->mobile; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Permit </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Permission </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="action_permit" name="action_permit" required="required" class="form-control" >
|
||||
<option value="<?php echo $editData->action_permit; ?>"><?php echo $editData->action_permit; ?></option>
|
||||
<option value="all">all</option>
|
||||
<option value="view">view</option>
|
||||
<?php
|
||||
if ($editData->action_permit == "all") {
|
||||
?>
|
||||
<option value="view">view</option>
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
?>
|
||||
<option value="all">all</option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -71,9 +81,9 @@
|
||||
<input type="text" id="user_name" name="user_name" value="<?php echo $editData->user_name; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Password </label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name" hidden> Password </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="password" name="password" value="<?php echo $editData->password; ?>" required="required" class="form-control ">
|
||||
<input type="hidden" id="password" name="password" value="<?php echo $editData->password; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
|
||||
|
||||
|
||||
<!-- page content -->
|
||||
<div class="" role="main">
|
||||
<div class="">
|
||||
@ -27,10 +25,10 @@
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>User Report
|
||||
<h2>User Details
|
||||
<!-- <small>Activity report</small> -->
|
||||
</h2>
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
@ -42,10 +40,15 @@
|
||||
</li>
|
||||
<li><a class="close-link"><i class="fa fa-close"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul> -->
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>User/editprofiles" enctype="multipart/form-data">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo user()->id; ?>">
|
||||
<button type="submit" class="btn btn-success" hidden>Update</button>
|
||||
|
||||
<div class="col-md-3 col-sm-3 profile_left">
|
||||
<div class="profile_img">
|
||||
<div id="crop-avatar">
|
||||
@ -53,11 +56,25 @@
|
||||
<?php
|
||||
if ($userData->profile_image == NULL) {
|
||||
?>
|
||||
<img style="width: 100%; display: block;" src="<?php echo base_url(); ?>assets/uploads/profile_picture/profile.jpg ?>" alt="Avatar" title="Change the avatar">
|
||||
<div class="profilepic">
|
||||
<img style="width: 100%;height: 100%; display: block;" src="<?php echo base_url(); ?>assets/uploads/profile_picture/profile.jpg ?>" alt="Avatar" title="Change the avatar">
|
||||
<input id="file_profile" name="profile_image" class="typeFile1" type="file" hidden/>
|
||||
<div class="profilepic__content">
|
||||
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:black"></i></span>
|
||||
<span class="profilepic__text"><b>Edit Profile</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<img style="width: 100%; display: block;" src="<?php echo base_url(); ?>assets/uploads/profile_picture/<?php echo $userData->profile_image ?> ?>" alt="Avatar" title="Change the avatar">
|
||||
?>
|
||||
<div class="profilepic">
|
||||
<img class="profilepic__image" style="width: 100%; display: block;border-radius:50%" src="<?php echo base_url(); ?>assets/uploads/profile_picture/<?php echo $userData->profile_image ?> ?>" alt="Avatar" title="Change the avatar">
|
||||
<input id="file_profile" name="profile_image" class="typeFile1" type="file" hidden/>
|
||||
<div class="profilepic__content">
|
||||
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:black"></i></span>
|
||||
<span class="profilepic__text"><b>Edit Profile</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@ -75,15 +92,37 @@
|
||||
<i class="fa fa-phone user-profile-icon"></i> <?php echo user()->mobile ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a class="btn btn-success" href="<?php echo base_url()?>user/editprofile/<?php echo md5(user()->id);?>"><i class="fa fa-edit m-right-xs"></i>Edit Profile</a>
|
||||
<br />
|
||||
<?php
|
||||
if (is_superadmin()) {
|
||||
?>
|
||||
<a class="btn btn-success" href="<?php echo base_url()?>user/editprofile/<?php echo md5(user()->id);?>"><i class="fa fa-edit m-right-xs"></i>Edit Profile</a>
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
|
||||
<!-- <script>
|
||||
// file open => file name : user/profile.php
|
||||
$(".profilepic").click(function(){
|
||||
$("#file_profile").trigger("click");
|
||||
});
|
||||
|
||||
// change login person profile pic => file name : user/profile.php
|
||||
$(document).ready(function(){
|
||||
$("#file_profile").change(function(){
|
||||
$(".btn-success").click();
|
||||
});
|
||||
});
|
||||
</script> -->
|
||||
@ -1,22 +1,4 @@
|
||||
<style>
|
||||
.btn.active {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn span:nth-of-type(1) {
|
||||
display: none;
|
||||
}
|
||||
.btn span:last-child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.btn.active span:nth-of-type(1) {
|
||||
display: block;
|
||||
}
|
||||
.btn.active span:last-child {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
@ -54,12 +36,12 @@
|
||||
<a href="<?php echo base_url()?>user/editUser/<?php echo md5($value->id);?>" ><i class="fa fa-pencil"></i></a>
|
||||
|
||||
<a href="<?php echo base_url()?>user/deleteUser/<?php echo md5($value->id);?>" >
|
||||
<i class="darkgreen fa fa-check-circle" style="font-size:20px;" title="inactive"></i></a>
|
||||
<i class="#008000 fa fa-check-circle" style="font-size:20px;" title="deactivate"></i></a>
|
||||
|
||||
<?php } ?>
|
||||
<?php if ($value->is_active == 0) { ?>
|
||||
<a href="<?php echo base_url()?>user/activateUser/<?php echo md5($value->id);?>" >
|
||||
<i class="green fa fa-check-circle" style="font-size:20px;" title="active"></i></a>
|
||||
<i class="green fa fa-check-circle" style="font-size:20px;" title="activate"></i></a>
|
||||
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
@ -149,8 +149,21 @@ $( document ).ready(function() {
|
||||
});
|
||||
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ################################################################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// show error msg for wrong password => file name : user/change_password.php
|
||||
$(document).on('click','#submit',function(){
|
||||
var data = $("#change-pass").serialize();
|
||||
$.ajax({
|
||||
@ -163,42 +176,24 @@ $(document).on('click','#submit',function(){
|
||||
// location.href = "<?php echo base_url();?>auth";
|
||||
}
|
||||
else {
|
||||
$('#message1').html('Worng password').css('color', 'red');
|
||||
alert(response);
|
||||
$('#message1').html('Worng password').css('color', 'red');
|
||||
$('#password').val('');
|
||||
$('#confirm_password').val('');
|
||||
$('#message').html('');
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// match the password and confirm password equal or not
|
||||
$('#password, #confirm_password').on('keyup', function () {
|
||||
$(':input[type="submit"]').prop('disabled', true);
|
||||
if ($('#password').val() == $('#confirm_password').val() && $('#confirm_password').val().length > 0 ) {
|
||||
$('#message').html('Matching').css('color', 'green');
|
||||
$('button[type="submit"]').attr("disabled", false);
|
||||
}
|
||||
else if($('#password').val().length == 0 || $('#confirm_password').val().length == 0){
|
||||
$('#message').html('');
|
||||
}
|
||||
else
|
||||
$('#message').html('Not Matching').css('color', 'red');
|
||||
});
|
||||
|
||||
// password eye icon
|
||||
$(".toggle-password").click(function() {
|
||||
$(this).toggleClass("fa-eye fa-eye-slash");
|
||||
var input = $($(this).attr("toggle"));
|
||||
if (input.attr("type") == "password") {
|
||||
input.attr("type", "text");
|
||||
}
|
||||
else {
|
||||
input.attr("type", "password");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// match the password and confirm password equal or not
|
||||
// hide err msg when the input is empty => file name : user/change_password.php , label name : Old Password
|
||||
$('#old_password').on('keyup', function () {
|
||||
if($('#old_password').val().length == 0){
|
||||
$('#message1').html('');
|
||||
}
|
||||
});
|
||||
|
||||
// match the password and confirm password equal or not => file name : user/change_password.php and user/add_user.php
|
||||
$('#password, #confirm_password').on('keyup', function () {
|
||||
$(':input[type="submit"]').prop('disabled', true);
|
||||
if ($('#password').val() == $('#confirm_password').val() && $('#confirm_password').val().length > 0 ) {
|
||||
@ -210,10 +205,10 @@ $('#password, #confirm_password').on('keyup', function () {
|
||||
}
|
||||
else
|
||||
$('#message').html('Not Matching').css('color', 'red');
|
||||
});
|
||||
});
|
||||
|
||||
// password eye icon
|
||||
$(".toggle-password").click(function() {
|
||||
// password eye icon => file name : user/add_user.php && user/change_password.php
|
||||
$("#toggle-password").click(function() {
|
||||
$(this).toggleClass("fa-eye fa-eye-slash");
|
||||
var input = $($(this).attr("toggle"));
|
||||
if (input.attr("type") == "password") {
|
||||
@ -222,10 +217,10 @@ $('#password, #confirm_password').on('keyup', function () {
|
||||
else {
|
||||
input.attr("type", "password");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// sadmin create admin onchange function select permit as all default
|
||||
$('#role').on('change', function() {
|
||||
// sadmin create admin onchange function select permit as all default => file name : user/add_user.php
|
||||
$('#role').on('change', function() {
|
||||
if(this.value == "admin")
|
||||
{
|
||||
$('#action_permit').html('<option value="all">All</option>');
|
||||
@ -238,4 +233,26 @@ $('#password, #confirm_password').on('keyup', function () {
|
||||
<option value="all">All</option>
|
||||
<option value="view">View</option>`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// file open => file name : user/profile.php
|
||||
// The handler is executed at most once per element per event type => one()
|
||||
$(".profilepic").one('click',function() {
|
||||
$("#file_profile").trigger("click");
|
||||
});
|
||||
|
||||
// $(".profilepic").click(function(){
|
||||
// console.log("aaaa");
|
||||
// // $("#file_profile").trigger("click");
|
||||
// });
|
||||
|
||||
// change login person profile pic => file name : user/profile.php
|
||||
$(document).ready(function(){
|
||||
$("#file_profile").change(function(){
|
||||
$(".btn-success").click();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
101
assets/default/customize/style.css
Normal file
@ -0,0 +1,101 @@
|
||||
/* file name =>user/change_password.php and user/add_user.php */
|
||||
.field-icon {
|
||||
float: right;
|
||||
margin-left: -25px;
|
||||
margin-top: -25px;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* file name =>user/profile.php */
|
||||
.fa-plus {
|
||||
float: right;
|
||||
margin-left: -25px;
|
||||
margin-top: -70px;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
font-size: 30px;
|
||||
}
|
||||
/* profile pic */
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.profilepic {
|
||||
position: relative;
|
||||
/* width: 125px;
|
||||
height: 125px; */
|
||||
/* border-radius: 50%; */
|
||||
overflow: hidden;
|
||||
background-color: #fffff7;
|
||||
}
|
||||
|
||||
.profilepic:hover .profilepic__content {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.profilepic:hover .profilepic__image {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.profilepic__image {
|
||||
object-fit: cover;
|
||||
opacity: 1;
|
||||
transition: opacity .2s ease-in-out;
|
||||
}
|
||||
|
||||
.profilepic__content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: black;
|
||||
opacity: 0;
|
||||
transition: opacity .2s ease-in-out;
|
||||
}
|
||||
|
||||
.profilepic__icon {
|
||||
color: white;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.fas {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.profilepic__text {
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* file name =>user/user_list.php */
|
||||
.btn.active {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn span:nth-of-type(1) {
|
||||
display: none;
|
||||
}
|
||||
.btn span:last-child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.btn.active span:nth-of-type(1) {
|
||||
display: block;
|
||||
}
|
||||
.btn.active span:last-child {
|
||||
display: none;
|
||||
}
|
||||
BIN
assets/uploads/logo/company-logo.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/logo/company-logo1.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/Screenshot_(237)11.png
Normal file
|
After Width: | Height: | Size: 211 KiB |
BIN
assets/uploads/profile_picture/Screenshot_(237)2.png
Normal file
|
After Width: | Height: | Size: 211 KiB |
BIN
assets/uploads/profile_picture/Screenshot_(237)21.png
Normal file
|
After Width: | Height: | Size: 211 KiB |
BIN
assets/uploads/profile_picture/company-logo.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/company-logo1.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/company-logo11.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/company-logo12.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/company-logo121.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/company-logo122.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/company-logo13.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/uploads/profile_picture/profile10.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile11.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile12.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile31.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile41.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile5.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile6.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile7.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile8.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/profile9.jpg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/uploads/profile_picture/venba-information-technology1.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |