123 lines
3.8 KiB
PHP
123 lines
3.8 KiB
PHP
<?php $this->load->view('front/includes/header'); ?>
|
|
<?php $primaryid=$this->session->userdata('primaryid');
|
|
$userrole=$this->session->userdata('userrole');
|
|
$loggedname=$this->session->userdata('loggedname');
|
|
|
|
|
|
$tables="users";
|
|
$wheres=array("id"=>$primaryid);
|
|
$shows=("*");
|
|
|
|
$userdet=$this->commonsql_model->selectTable($tables,$wheres,$shows);
|
|
if($userdet->num_rows()>0)
|
|
{
|
|
$u=$userdet->row();
|
|
$loggedusername=$u->name;
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
<style>
|
|
.fbox-center .fbox-icon {
|
|
margin-bottom: 1rem!important;
|
|
}
|
|
.fbox-bg.fbox-center {
|
|
|
|
padding: 0 1rem 1rem !important;
|
|
|
|
}
|
|
.form-error{ text-align:end!important; }
|
|
</style>
|
|
<section id="page-title" style="background-image: url('<?=base_url();?>fassets/images/about/333.jpg');">
|
|
|
|
<div class="container clearfix">
|
|
<h1 style="text-align:center"> Agent Profile</h1>
|
|
<span style="text-align:center;font-weight:500">Hi <?=ucwords($loggedusername);?> , Welcome to policybot</span>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section id="content">
|
|
<div class="content-wrap ">
|
|
<div class="container clearfix">
|
|
<div class="row" >
|
|
<div class="col-md-4 col-lg-3">
|
|
<?php $this->load->view('front/includes/leftmenu'); ?>
|
|
</div>
|
|
<div class="col-md-8 col-lg-9">
|
|
<h3>Change Password</h3>
|
|
<?php
|
|
if(isset($userdet)&& $userdet->num_rows()>0)
|
|
{
|
|
$ud=$userdet->row();
|
|
$id=$ud->id;
|
|
$name=$ud->name;
|
|
$email=$ud->email;
|
|
$mobile=$ud->mobile;
|
|
$pincode=$ud->pincode;
|
|
$state=$ud->state;
|
|
$city=$ud->city;
|
|
$address=$ud->address;
|
|
$country=$ud->country;
|
|
$password=$ud->password;
|
|
|
|
|
|
}
|
|
?>
|
|
<form action="<?=base_url();?>agent-change-password" method="POST">
|
|
<input type="hidden" name="primaryid" value="<?=$id;?>">
|
|
<input type="hidden" name="old_pass" value="<?=$password;?>">
|
|
<div class="form-group row">
|
|
<label class="col-sm-4" style="text-transform: capitalize;">Change Password<span style="color: red;"> * </span></label>
|
|
<div class="col-sm-8">
|
|
<input type="password" class="form-control" id="passwords" data-validation="required" name="change_passwords" placeholder="Change Password">
|
|
<span class="required" style="text-align:end;"></span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4" style="text-transform: capitalize;">Conform Password <span style="color: red;"> * </span></label>
|
|
<div class="col-sm-8">
|
|
<input type="password" class="form-control" id="conform_passwords" data-validation="required" name="conform_passwords" placeholder="Conform Password">
|
|
<span class="required" style="text-align:end;"></span>
|
|
</div>
|
|
<div id="passnotmatchs" style="text-align:end;"></div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<div class="col-sm-10">
|
|
<input type="submit" class="btn btn-primary" id="regbtns" name="submit" value="Submit" style="float:right;">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<?php $this->load->view('front/includes/footer'); ?>
|
|
<script>
|
|
$("#conform_passwords").mouseout(function(){
|
|
var pass =$("#passwords").val();
|
|
var cpass =$("#conform_passwords").val();
|
|
if(pass!=cpass){ msg="Password Not Matched <a id='removepassx' class='dismiss' href='javascript::' style='color:red;margin-left:10px'>x</a>";
|
|
$("#passnotmatchs").html(msg); $("#regbtns").attr("disabled", true); $("#regbtns").css("cursor", "no-drop");
|
|
$("#passwords").val("");
|
|
$("#conform_passwords").val("");
|
|
}
|
|
else if(pass==cpass){ msg="";
|
|
$("#passnotmatchs").html(msg);
|
|
$("#regbtns").attr("disabled", false); $("#regbtns").css("cursor", "pointer");
|
|
}
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
$("#passnotmatchs").on("click","#removepassx",function(){
|
|
|
|
var msg="";
|
|
$("#passnotmatchs").html(msg);
|
|
});
|
|
|
|
</script>
|