Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1.  
  2.  
  3. <!--
  4. _ _ _ ______ _ _ _ _
  5. | \ | | | | | _ (_) | | (_) | |
  6. | \| | ___ __ _| |__ | | | |_ ___ __| | ___ _ __ _ ___| |__
  7. | . ` |/ _ \ / _` | '_ \ | | | | |/ _ \/ _` |/ _ \ '__| |/ __| '_ \
  8. | |\ | (_) | (_| | | | | | |/ /| | __/ (_| | __/ | | | (__| | | |
  9. \_| \_/\___/ \__,_|_| |_| |___/ |_|\___|\__,_|\___|_| |_|\___|_| |_|
  10.  
  11. -->
  12. <?php
  13. include_once("common.php");
  14. session_start();
  15. if(!$_SESSION['loggedin']) {
  16. header('Location: index.php');
  17. }
  18.  
  19. include '../php/interface/mysql/main.php';
  20.  
  21. $uname = $_SESSION['loggedin'];
  22. $query = "SELECT * FROM users WHERE username = '$uname' OR email = '$uname' LIMIT 1";
  23.  
  24. $result = mysqli_query($dbc, $query); //Hier liegt der Fehler aufjedenfall, da er kein Result zurück bekommt.
  25.  
  26.  
  27. if (mysqli_num_rows($result) > 0) {
  28.  
  29. $row1 = $result->fetch_assoc();
  30. $first_name1 = ucfirst(strtolower($row1['first_name']));
  31. }
  32. if(isset($_POST['submit'])) {
  33. $first_name1 = $row1['first_name'];
  34. }
  35.  
  36. if($first_name!="") {
  37. $sql = "UPDATE users SET 'first_name'='$first_name' WHERE username = '$uname' OR email = '$email'";
  38. $res = mysqli_query($dbc, $sql);
  39. if($res) {
  40. $notice = "<div class='alert alert-success' role='alert'>
  41. <span class='glyphicon glyphicon-ok' aria-hidden='true'></span>
  42. <span class='sr-only'>Error:</span>
  43. Den Member gouf erfollegraich agedroen. Dir gidd an e puer Sekonnen weidergeleed ...
  44. </div>";
  45. header( "refresh:2;url=test.php" );
  46. } else {
  47. $notice = "<div class='alert alert-danger' role='alert'>
  48. <span class='glyphicon glyphicon-warning-sign' aria-hidden='true'></span>
  49. <span class='sr-only'>Error:</span>
  50. Een Fehler ass opgetrueden. Kontaktéiert den Webmaster!
  51. </div>";
  52. }
  53. } else {
  54. $notice = "<div class='alert alert-warning' role='alert'>
  55. <span class='glyphicon glyphicon-warning-sign' aria-hidden='true'></span>
  56. <span class='sr-only'>Error:</span>
  57. Fellt w.e.g alles aus!
  58. </div>";
  59. }
  60.  
  61.  
  62. ?>
  63. </body>
  64. </html>
  65.  
  66. <!DOCTYPE html>
  67. <html lang="en">
  68.  
  69. <head>
  70.  
  71. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  72. <meta charset="utf-8">
  73. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  74. <meta name="viewport" content="width=device-width, initial-scale=1">
  75. <meta name="description" content="Noah Diederich, Webdesigner">
  76. <meta name="author" content="Noah Diederich">
  77.  
  78. <title>Webinterface | NoahDiederich.lu</title>
  79.  
  80. <!-- Bootstrap Core CSS -->
  81. <link href="css/bootstrapi.css" rel="stylesheet">
  82.  
  83. <!-- Custom CSS -->
  84. <link href="css/sb-admin.css" rel="stylesheet">
  85.  
  86. <!-- Morris Charts CSS -->
  87. <link href="css/plugins/morris.css" rel="stylesheet">
  88.  
  89. <!-- Custom Fonts -->
  90. <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  91.  
  92. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  93. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  94. <!--[if lt IE 9]>
  95. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  96. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  97. <![endif]-->
  98.  
  99. </head>
  100.  
  101. <body>
  102.  
  103. <div id="wrapper">
  104.  
  105. <!-- Navigation -->
  106. <nav class="navbar-fixed-top navbar-inverse" role="navigation">
  107. <!-- Brand and toggle get grouped for better mobile display -->
  108. <div class="navbar-header">
  109. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
  110. <span class="sr-only">Toggle navigation</span>
  111. <span class="icon-bar"></span>
  112. <span class="icon-bar"></span>
  113. <span class="icon-bar"></span>e
  114. </button>
  115. <a class="navbar-brand" href="index.html">Noah Diederich | Webinterface</a>
  116. </div>
  117. <!-- Top Menu Items -->
  118. <ul class="nav navbar-right top-nav">
  119. <li>
  120. <a href="logout.php"><i class="fa fa-fw fa-dashboard"></i> Séch Ausloggen</a>
  121. </li>
  122. <li class="dropdown">
  123. <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> Ageloggt als: <?php echo $dname;?> [#<?php echo $id;?>]<b class="caret"></b></a>
  124. <ul class="dropdown-menu">
  125. <li>
  126. <a href="#"><i class="fa fa-fw fa-user"></i> Profile</a>
  127. </li>
  128. <li>
  129. <a href="#"><i class="fa fa-fw fa-envelope"></i> Inbox</a>
  130. </li>
  131. <li>
  132. <a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
  133. </li>
  134. <li class="divider"></li>
  135. <li>
  136. <a href="#"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
  137. </li>
  138. </ul>
  139. </li>
  140. </ul>
  141. <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
  142. <div class="collapse navbar-collapse navbar-ex1-collapse">
  143. <ul class="nav navbar-nav side-nav">
  144. <li>
  145. <a href="start"><i class="fa fa-fw fa-dashboard"></i> Dashboard</a>
  146. </li>
  147. <li>
  148. <a href="users"><i class="fa fa-fw fa-bar-chart-o"></i> Benotzer</a>
  149. </li>
  150. <li class="active">
  151. <a href="#"><i class="fa fa-fw fa-bar-chart-o"></i> Support</a>
  152. </li>
  153. </ul>
  154. </div>
  155. <!-- /.navbar-collapse -->
  156. </nav>
  157.  
  158. <div id="page-wrapper">
  159.  
  160. <div class="container-fluid">
  161.  
  162. <!-- Page Heading -->
  163. <div class="row">
  164. <div class="col-lg-12">
  165. <h1 class="page-header">
  166. Dashboard <small>Statësch Iwwersiicht</small>
  167. </h1>
  168. <ol class="breadcrumb">
  169. <li>Dashboard>
  170. <li class="active">
  171. <i class="fa fa-dashboard"></i> Support
  172. </li>
  173. </ol>
  174. </div>
  175. </div>
  176. <div class="form-group">
  177. <label class="col-sm-2 control-label">Virnumm:</label>
  178. <div class="col-sm-10">
  179. <input type="text" name="first_name" class="form-control" placeholder="Virnumm" value="<?php echo $fnumm1; ?>">
  180. </div>
  181. </div></form>
  182. <input type="submit" name="submit" class="btn btn-default" value="Wärter aktualiséieren">
  183.  
  184.  
  185. <!-- /.row -->
  186. <!-- Footer -->
  187. <?php include '../php/interface/footer.php'; ?>
  188. </div>
  189. <!-- /.container-fluid -->
  190.  
  191. </div>
  192. <!-- /#page-wrapper -->
  193.  
  194. </div>
  195. <!-- /#wrapper -->
  196.  
  197. <!-- jQuery -->
  198. <script src="js/jquery.js"></script>
  199.  
  200. <!-- Bootstrap Core JavaScript -->
  201. <script src="js/bootstrap.min.js"></script>
  202.  
  203. <!-- Morris Charts JavaScript -->
  204. <script src="js/plugins/morris/raphael.min.js"></script>
  205. <script src="js/plugins/morris/morris.min.js"></script>
  206. <script src="js/plugins/morris/morris-data.js"></script>
  207.  
  208. </body>
  209.  
  210. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement