Advertisement
Guest User

Untitled

a guest
Mar 25th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.76 KB | None | 0 0
  1. <?php
  2. if( !isset( $_SESSION ) ) session_start();
  3. ?>
  4. <?php include dirname(dirname(__DIR__)).'/resources/includes/header.html'; ?>
  5. <?php include dirname(dirname(__DIR__)).'/resources/dbconnect/dbconfig.inc.php'; ?>
  6.  
  7. <!--container start-->
  8. <div class="component-bg">
  9. <div class="container">
  10. <div class="bs-docs-section">
  11. <h2 id="tables-hover-rows">
  12. Profile Settings
  13. </h2>
  14. <p>
  15. Change your profile settings here.
  16. </p>
  17. <div class="bs-example">
  18. <table class="table table-hover">
  19. <thead>
  20. <tr>
  21. <th>
  22. #
  23. </th>
  24. <th>
  25. Information
  26. </th>
  27. <th>
  28.  
  29. </th>
  30. <th>
  31. <!-- Set 5 change buttons in the html instead?
  32. <h5 a href="../../php/user/test.php">Change</h5> -->
  33. </th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <?php
  38. $stmt = $mysqli->prepare("SELECT firstname, lastname, username, email, password FROM login WHERE username ='$_SESSION[username]'");
  39.  
  40. $stmt->execute();
  41.  
  42. $firstname = null;
  43. $lastname = null;
  44. $username = null;
  45. $email = null;
  46. $password = null;
  47.  
  48. $stmt->bind_result($firstname, $lastname, $username, $email, $password);
  49. while($stmt->fetch()) {
  50. echo "<tr><td>Firstname</td><td>".$firstname."</td><td><h5><a href='test.php'>Change</a></h5></td></tr>".
  51. "<tr><td>Lastname</td><td>".$lastname."</td><td><h5><a href='test.php'>Change</a></h5></td></tr>".
  52. "<tr><td>Username</td><td>".$username."</td><td><h5><a href='test.php'>Change</a></h5></td></tr>".
  53. "<tr><td>Email</td><td>".$email."</td><td><h5><a href='test.php'>Change</a></h5></td></tr>".
  54. "<tr><td>Password</td><td>".$password."</td><td><h5><a href='test.php'>Change</a></h5></td></tr>";
  55. }
  56.  
  57. $stmt->close();
  58. $mysqli->close();
  59. ?>
  60. </tbody>
  61. </table>
  62. </div>
  63. <!-- /example -->
  64. </div>
  65. <!-- Docs Section end -->
  66. </div>
  67. <!--container end-->
  68. </div>
  69. <!-- Component end -->
  70. <br/>
  71.  
  72. <?php include dirname(dirname(__DIR__)).'/resources/includes/footer.html'; ?>
  73.  
  74. <?php
  75. if( !isset( $_SESSION ) ) session_start();
  76. ?>
  77. <?php include 'resources/dbconnect/dbconfig.inc.php' ?>
  78. <!DOCTYPE html>
  79. <html lang="en">
  80. <head>
  81. <title>Bootstrap Example</title>
  82.  
  83.  
  84. <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  85. <!--external css-->
  86. <link href="assets/fonts/font-awesome/css/font-awesome.css" rel="stylesheet" />
  87.  
  88. <link rel="stylesheet" href="assets/css/core/animate.css">
  89.  
  90. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  91. <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  92.  
  93. <link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
  94.  
  95. <!-- Custom styles -->
  96. <link href="assets/css/core/style.css" rel="stylesheet">
  97.  
  98. </head>
  99. <body>
  100.  
  101. <div class="container">
  102. <h2>Modal Example</h2>
  103. <!-- Trigger the modal with a button -->
  104. <button type="button" class="btn btn-info btn-xs" data-toggle="modal" data-target="#myModal">Open Modal</button>
  105.  
  106. <!-- Modal -->
  107. <div class="modal fade" id="myModal" role="dialog">
  108. <div class="modal-dialog">
  109.  
  110. <!-- Modal content-->
  111. <div class="form-wrapper-change-userinformation">
  112. <div class="modal-header">
  113. <button type="button" class="close" data-dismiss="modal">&times;</button>
  114. <h4 class="modal-title">Modal Header</h4>
  115. </div>
  116. <div class="form-wrapper-change-userinformation">
  117.  
  118. <!-- Modal -->
  119.  
  120. <div class="form-wrapper-change-userinformation">
  121. <form class="form-signin wow fadeInUp" method="post" action="">
  122. <h2 class="form-signin-heading">Update</h2>
  123. <div class="login-wrap">
  124. <hr>
  125. <p>Username</p>
  126. <input id="disabledInput" type="text" disabled class="form-control" name="username" placeholder="User ID"
  127.  
  128. value="<?php
  129. $stmt = $mysqli->prepare("SELECT username FROM login WHERE username ='$_SESSION[username]'");
  130.  
  131. $stmt->execute();
  132.  
  133. $username = null;
  134.  
  135. $stmt->bind_result($username);
  136. while($stmt->fetch()) {
  137. echo $username;
  138. }
  139. ?>">
  140.  
  141. <hr>
  142. <input type="text" class="form-control" name="username" placeholder="New Username" autofocus>
  143. </hr>
  144. </label>
  145. <button class="btn btn-lg btn-login btn-block">Update<a href="index.php?todo=logout">Update</a></button>
  146. </div>
  147. </form>
  148. </div>
  149.  
  150. <!-- End Modal Container -->
  151. </div>
  152. <!-- End Modal Content -->
  153. </div>
  154. <!-- End Modal Content -->
  155. </div>
  156. <!-- End Modal-dialog -->
  157. </div>
  158. <!-- End Container -->
  159. <?php
  160. include 'resources/includes/footer.html'
  161. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement