Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'includes/accountassets/class.user.php';
- $user = new USER();
- if(isset($_GET['id']) && isset($_GET['code']))
- {
- $id = base64_decode($_GET['id']);
- $code = $_GET['code'];
- $stmt = $user->runQuery("SELECT * FROM customer WHERE user_id=:uid AND tokenCode=:token");
- $stmt->execute(array(":uid"=>$id,":token"=>$code));
- $rows = $stmt->fetch(PDO::FETCH_ASSOC);
- if($stmt->rowCount() == 1)
- {
- if(isset($_POST['btn-reset-pass']))
- {
- $sfname = $_POST['sub_fname'];
- $slname = $_POST['sub_lname'];
- $suni = $_POST['sub_uni'];
- $ssnum = $_POST['sub_snum'];
- $sac = $_POST['sub_ac'];
- $sdob = $_POST['sub_dob'];
- {
- $stmt = $user->runQuery("UPDATE customer SET fname=:ufname, lname=:ulname, CustomerUniversity=:uuni, CustomerStudentNumber=:usnum, CustomerAcademicYear=:uac, CustomerDOB=:udob WHERE user_id=:"uid");
- $stmt->execute(array(":ufname"=>$sfname,":ulname"=>$slname,":uuni"=>$suni,":usnum"=>$ssnum,":uac"=>$sac,":udob"=>$sdob,
- :uid"=>$rows['user_id']));
- $msg = "<div class='alert alert-success'>
- <button class='close' data-dismiss='alert'>×</button>
- Password Changed.
- </div>";
- header("refresh:5;signin.php");
- }
- }
- }
- else
- {
- $msg = "<div class='alert alert-success'>
- <button class='close' data-dismiss='alert'>×</button>
- No Account Found, Try again
- </div>";
- }
- }
- ?>
- <?php include_once("includes/header.php"); ?>
- <?php include_once("includes/membersdata.php"); ?>
- <title>Welcome to
- <?php include_once("includes/brandname.php"); ?>
- </title>
- <!-- Main jumbotron for a primary marketing message or call to action -->
- <div class="jumbotron" style="background-image: url(images/pages/forks.png);">
- <div class="container">
- <p> </p>
- <p> </p>
- <h1>Welcome</h1>
- <h2>As this is your first time you signed into your account, please take the time to update your information</h2>
- <p> </p>
- <p> </p>
- <form class="form-signin" method="post">
- <table style="width:100%">
- <tr>
- <td>
- <input type="text" name="sub_fname" class="form-control" placeholder="First Name" aria-describedby="basic-addon1" required>
- </td>
- <td>
- <p> </p>
- </td>
- <td>
- <input type="text" class="form-control" name="sub_lname" placeholder="Last Name" aria-describedby="basic-addon1">
- </td>
- </tr>
- <tr>
- <td>
- <input type="text" class="form-control" name="sub_uni" placeholder="University or HEI Name" aria-describedby="basic-addon1" required>
- </td>
- <td>
- <p> </p>
- </td>
- <td>
- <input type="password" class="form-control" name="sub_snum" placeholder="Student Number" aria-describedby="basic-addon1" required>
- </td>
- </tr>
- <tr>
- <td>
- <select name="sub_ac" class="form-control">
- <option value="unknown">Current academic year</option>
- <option value="1st year">1st year</option>
- <option value="2nd year">2nd year</option>
- <option value="3rd year">3rd year</option>
- <option value="4th year">4th year</option>
- <option value="5th year">5th year</option>
- <option value="Over 5th year">Over 5th year</option>
- </select>
- </td>
- <td>
- <p> </p>
- </td>
- <td>
- <input type="date" class="form-control" name="sub_dob" placeholder="<?php echo $row['CustomerDOB']; ?>" aria-describedby="basic-addon1">
- </td>
- </tr>
- </table>
- <p> </p>
- <input type="submit" class="btn ban-primary" name="btn-reset-pass">
- </form>
- </div>
- </div>
- <div class="container">
- <p> </p>
- <ol class="breadcrumb" style="align:left; text-align:left;">
- <p>You are here:</p>
- <li><a href="index.php">Home</a></li>
- <li><a href="members.php">Members Home</a></li>
- <li class="active">Edit your details</li>
- </ol>
- <!-- Example row of columns -->
- <div class="row">
- <div class="col-md-2">
- </div>
- </div>
- <?php include_once("includes/footer.php"); ?>
- ****
- Page URL with errors: http://jburford.worcestercomputing.com/rrworc/first_edit.php
- /home/skjsfdnm/public_html/rrworc/first_edit.php
- email: test@worc.ac.uk
- password: Example2016
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement