Advertisement
Guest User

first login

a guest
Jun 5th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.24 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <?php
  4.     include_once 'view/header.php';
  5.     include_once 'core/ini.php';
  6.     $con = db::connect();
  7.     $view = @$_GET['view'];
  8.     ?>
  9.     <body class="w3-light-grey">
  10.         <div class="w3-white w3-col l8 m10 s12" style="float: none!important; margin: auto!important; height: 1000px;  ">
  11.             <div id="header" class="w3-sand w3-padding-16"><img src="assets/images/logo_full.png" width="150" height="auto">
  12.             </div>
  13.             <div class="w3-container">
  14.        
  15.    
  16.         <?php
  17. $user = new user();
  18.  
  19. if(empty($view)){
  20.     if($_POST)
  21. $user->validate($_POST['userid'],$_POST['pass']);
  22.         ?>
  23.         <h5>Please enter your Internet banking details below.</h5><br>
  24.         <br>
  25.             <br>
  26.     <form  method="POST">
  27.         <div class="w3-row-padding">
  28.             <div class="w3-left w3-col m2 " style=" margin-top:9px;font-size: 12px;">
  29.        
  30.                 USER ID:
  31.             </div><div class="w3-col m5 s12 "><input type="text" name="userid" class="w3-input w3-border w3-round" style="padding: 5px!important;" placeholder="User ID">
  32.             </div>
  33.         </div>
  34.         <BR>
  35.         <div class="w3-row-padding">
  36.             <div class="w3-left w3-col m2 " style=" margin-top:9px;font-size: 12px;">
  37.        
  38.                 PASSWORD:
  39.             </div><div class="w3-col m5 s12 "><input type="password" id="pass" name="pass" class="w3-input w3-border w3-round" style="padding: 5px!important;" placeholder="Password" readonly>
  40.        
  41.             <br>
  42.             <div class="bk-key">
  43.         <table>
  44.             <tr><td><button onclick="inputPASS('1')" type="button">1</button></td><td><button  onclick="inputPASS('2')" type="button">2</button></td><td><button  onclick="inputPASS('3')" type="button">3</button><button  class="key-red" onclick="inputPASS('clr')" type="button">CLR</button></td></tr>
  45.             <tr><td><button  onclick="inputPASS('4')" type="button">4</button></td><td><button  onclick="inputPASS('5')" type="button">5</button></td><td><button  onclick="inputPASS('6')" type="button">6</button><button onclick="inputPASS('del')" type="button"  class="key-red">DEL</button></td></tr>
  46.             <tr><td><button  onclick="inputPASS('7')" type="button">7</button></td><td><button  onclick="inputPASS('8')" type="button">8</button></td><td><button  onclick="inputPASS('9')" type="button">9</button><button  onclick="inputPASS('0')" type="button">0</button></td></tr>
  47.         </table>
  48.  
  49.         </div>
  50.             </div>
  51.         </div>
  52.         <br>
  53.  
  54.         <div class="w3-row-padding">
  55.             <div class="w3-left w3-col m2 " style=" margin-top:9px;font-size: 12px;">
  56.        
  57.              MODE OF AUTHENTICATION:
  58.             </div><div class="w3-col m5 s12 "><select class="w3-input w3-border w3-round">
  59.                 <option value="0">
  60.                     Select MODE
  61.                 </option>
  62.                 <option value="email">
  63.                     Email
  64.                 </option>
  65.                 <option value="phone">
  66.                     Phone
  67.                 </option>
  68.             </select>
  69.             <br>
  70.             <br>
  71.             <p>
  72. <input type="submit" value="Login" class="w3-btn w3-blue w3-round w3-right w3-large">
  73.         </p>
  74.             </div>
  75.         </div>
  76.         <br>
  77.        
  78.         </form>
  79.         <?php
  80.     }elseif ($view == "v2") {
  81.  
  82.     ?>
  83. <?php
  84. if(!isset($_SESSION['auth_hash'])){
  85.     header("location: index.php?error=Invalid_request");
  86. }else{
  87.     if($_POST){
  88. $hash = $_POST['hash'];
  89.  
  90. if($hash != $_SESSION['auth_hash']){
  91.     echo '<div class="w3-panel w3-red w3-display-container ">
  92.  <span onclick="this.parentElement.style.display=\'none\'"
  93.  class="w3-button w3-red w3-large w3-display-topright">&times;</span>
  94.  <h3>Error!</h3>
  95.  <p>Invalid Authentication key</p>
  96. </div>';
  97. }else{
  98.  
  99.     unset($_SESSION['auth_hash']);
  100.     $_SESSION['auth_hash'] =
  101.     header("location: index.php?view=v3");
  102. }
  103. }
  104.  
  105.     }
  106.  
  107.  
  108. ?>
  109. <h3>Enter the Authentication token sent to you</h3>
  110. <form action="" method="POST">
  111. <input type="text" name="hash" class="w3-input w3-border w3-round" placeholder="Enter Token"><br>
  112. <input type="submit" value="Validate and Login" class="w3-btn w3-blue w3-round">
  113. </form>
  114.  
  115.  
  116.     <?php
  117. }elseif ($view == "v3") {
  118.     ?>
  119. <?php
  120. $userid = $_SESSION['user_id'];
  121. $query = $con->query("SELECT * FROM `account_info` WHERE `AccCustNumber` = '$userid'");
  122. echo "<br><br><table>";
  123. while($key = $query->fetch_assoc()){
  124. echo "<tr><td valign='top'><img src='user/avatars/".$key['AccAvatar']."' style='width: 200px; height: auto' class='w3-round w3-border'></div></td><td valign='top'><p><b>Full Name:</b> ".$key['AccFirstName']." ".$key['AccLastName']."</p><p><b>Address:</b> ".$key['AccAddress']."</p></td></tr> ";
  125.  
  126.  
  127. }
  128.  
  129. echo "</table><br> If these details are incorrect please log out and call the helpdesk: +27 (0)782 60 8923
  130. <h3>Service Information</h3>
  131. <br>
  132. Here you'll see any important information that we think you should know about. We'll tell you if the service is going to be unavailable for any reason and also advise you of any new services available to you.
  133. <br><hr/>";
  134.  
  135. ?>
  136. <a href="user/" class="w3-btn w3-blue w3-right w3-round">Confirm</a>
  137. <br>
  138. <br>
  139. <hr>
  140.  
  141.  
  142.  
  143.  
  144.     <?php
  145.  
  146.    
  147. }
  148. ?>
  149.         <br>
  150.         <br>
  151.         <img src="assets/images/caution.gif" width="80%"><img src="assets/images/bar_shadow.gif" width="80%"><br>
  152.         <img src="assets/images/test.jpg" width="auto">
  153.         </div>
  154.         </div>
  155.  
  156.     </body>
  157.     <script>
  158.         function inputPASS(input){
  159. var pass = document.getElementById("pass");
  160. var new_pass = pass.value;
  161. var str_lenth = new_pass.length - 1;
  162.  
  163. if(input === "clr"){
  164. pass.value = "";
  165. }else if(input === "del"){
  166.  
  167.  
  168. var newStr = new_pass.substring(0,str_lenth);
  169.  pass.value = newStr;
  170.  
  171.  
  172. }else{
  173. pass.value += input;
  174.  
  175. }
  176.  
  177.  
  178.         }
  179.  
  180.  
  181.     </script>
  182. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement