?
Current Path : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/Settings/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/Settings/userlist.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <script type="text/javascript"> function ShowChangePassword(uid) { if(uid!="") { $("#user_id").val(uid); $(".anchor1").colorbox({width:"66%",height:"70%", inline:true, href:"#ChangeAllUserPassword"}); } } $('.tdlink').mouseover(function() { $(this).css({'color':'#8542c1','cursor':'pointer'}); }); $('.tdlink').mouseleave(function() { $(this).css({'color':'#2756c1','cursor':'pointer'}); }); function EditUser1(rwd,user_id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { document.getElementById('addmenu').style.display="none"; document.getElementById('backmenu').style.display="block"; $('#Main-content').load("<?php echo site_url('settings/GetSingleUserControler1/'); ?>" +"/" + user_id); } }); } </script> <script> function ValidatePassword() { var pass1=document.getElementById('newpassword').value; var pass2=document.getElementById('retypepassword').value; if(pass1!=pass2) { document.getElementById('retypepassword').className="error"; } else { document.getElementById('retypepassword').className=""; } } function savepassword() { if(validateform('newpassword','retypepassword')) { var uid=document.getElementById('user_id').value; var pass1=document.getElementById('newpassword').value; var oldpass=document.getElementById('oldpassword').value; var pass2=document.getElementById('retypepassword').value; if(pass1==pass2) { $('#passresult').load("<?php echo site_url('settings/change_Pass_Without_old_Controler/'); ?>/" + uid + "/" + pass1, function(data) { if(data!="Invalide Password") { $.fn.colorbox.close(); } }); } else { document.getElementById('passresult').value="Password Not Match"; } } } </script> <table class="sort" cellpadding="0" cellspacing="0"> <caption>User List</caption> <thead><tr> <th>Sl.NO</th><th>User Name</th><th>Profile</th> <th>Staff</th><th class="last">Action</th> </tr> <?php $id=1; if(count($userlist)>0) { $z=1; $sno=1; foreach ($userlist as $row) { if($z%2==0) { $alt="alt"; } else { $alt="alt1"; } $rolename=$this->settingsmodel->getSingleFieldValue('user_roles','name','id',$row['role_id']); $name=$this->settingsmodel->getSingleFieldValue('designation','designation','id',$rolename); echo '<tr class="'.$alt.'">' ;?> <td> <?php echo $sno; ?> </td> <td id="myTd" style="color:#2756c1" onclick="EditUser1(0,<?= $row['id']?>)" class="tdlink"> <?php echo $row['username'] ?></td> <td><?php echo $name; ?></td> <td><?php echo $this->settingsmodel->getSingleField('staffpersonaldetails','name','id', $row['staff_id']);?></td> <td> <?php if($row['id']!='111'){?> <img src="<?= base_url()?>/assets/images/edit-icon.gif" class="clickimage" onclick="EditUser(1,<?= $row['id']?>)" title="Edit" alt="" width="20" height="20" /> <?php } ?> <img src="<?= base_url()?>/assets/images/pref.png" style="cursor: pointer" class="anchor1" title="Change Password" onclick="ShowChangePassword(<?= $row['id']?>)" alt="Change Password" width="20" height="20" /> </td> </tr> <?php $sno++; $z++; } ?> </table> <?php } ?> <div style="display: none" > <div id="ChangeAllUserPassword" > <form id="customForm"> <fieldset><legend>Change User Passsword</legend> <input type="hidden" name="user_id" id="user_id"/> <ul> <li> <label>New Password</label> <input type="password" id="newpassword" name="newpassword" onblur="validateform('newpassword')" /> </li> <li> <label>Retype Password</label> <input type="password" id="retypepassword" name="retypepassword" onblur="ValidatePassword()"/> </li> <li> <input type="button" id="submit" value="Change" onclick="savepassword()"/> <span id="passresult"></span> </li> </ul> </fieldset> </form> </div> </div>