Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- _ _ _ ______ _ _ _ _
- | \ | | | | | _ (_) | | (_) | |
- | \| | ___ __ _| |__ | | | |_ ___ __| | ___ _ __ _ ___| |__
- | . ` |/ _ \ / _` | '_ \ | | | | |/ _ \/ _` |/ _ \ '__| |/ __| '_ \
- | |\ | (_) | (_| | | | | | |/ /| | __/ (_| | __/ | | | (__| | | |
- \_| \_/\___/ \__,_|_| |_| |___/ |_|\___|\__,_|\___|_| |_|\___|_| |_|
- -->
- <?php
- include_once("common.php");
- session_start();
- if(!$_SESSION['loggedin']) {
- header('Location: index.php');
- }
- include '../php/interface/mysql/main.php';
- $uname = $_SESSION['loggedin'];
- $query = "SELECT * FROM users WHERE username = '$uname' OR email = '$uname' LIMIT 1";
- $result = mysqli_query($dbc, $query); //Hier liegt der Fehler aufjedenfall, da er kein Result zurück bekommt.
- if (mysqli_num_rows($result) > 0) {
- $row1 = $result->fetch_assoc();
- $first_name1 = ucfirst(strtolower($row1['first_name']));
- }
- if(isset($_POST['submit'])) {
- $first_name1 = $row1['first_name'];
- }
- if($first_name!="") {
- $sql = "UPDATE users SET 'first_name'='$first_name' WHERE username = '$uname' OR email = '$email'";
- $res = mysqli_query($dbc, $sql);
- if($res) {
- $notice = "<div class='alert alert-success' role='alert'>
- <span class='glyphicon glyphicon-ok' aria-hidden='true'></span>
- <span class='sr-only'>Error:</span>
- Den Member gouf erfollegraich agedroen. Dir gidd an e puer Sekonnen weidergeleed ...
- </div>";
- header( "refresh:2;url=test.php" );
- } else {
- $notice = "<div class='alert alert-danger' role='alert'>
- <span class='glyphicon glyphicon-warning-sign' aria-hidden='true'></span>
- <span class='sr-only'>Error:</span>
- Een Fehler ass opgetrueden. Kontaktéiert den Webmaster!
- </div>";
- }
- } else {
- $notice = "<div class='alert alert-warning' role='alert'>
- <span class='glyphicon glyphicon-warning-sign' aria-hidden='true'></span>
- <span class='sr-only'>Error:</span>
- Fellt w.e.g alles aus!
- </div>";
- }
- ?>
- </body>
- </html>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="description" content="Noah Diederich, Webdesigner">
- <meta name="author" content="Noah Diederich">
- <title>Webinterface | NoahDiederich.lu</title>
- <!-- Bootstrap Core CSS -->
- <link href="css/bootstrapi.css" rel="stylesheet">
- <!-- Custom CSS -->
- <link href="css/sb-admin.css" rel="stylesheet">
- <!-- Morris Charts CSS -->
- <link href="css/plugins/morris.css" rel="stylesheet">
- <!-- Custom Fonts -->
- <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
- <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
- <body>
- <div id="wrapper">
- <!-- Navigation -->
- <nav class="navbar-fixed-top navbar-inverse" role="navigation">
- <!-- Brand and toggle get grouped for better mobile display -->
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>e
- </button>
- <a class="navbar-brand" href="index.html">Noah Diederich | Webinterface</a>
- </div>
- <!-- Top Menu Items -->
- <ul class="nav navbar-right top-nav">
- <li>
- <a href="logout.php"><i class="fa fa-fw fa-dashboard"></i> Séch Ausloggen</a>
- </li>
- <li class="dropdown">
- <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>
- <ul class="dropdown-menu">
- <li>
- <a href="#"><i class="fa fa-fw fa-user"></i> Profile</a>
- </li>
- <li>
- <a href="#"><i class="fa fa-fw fa-envelope"></i> Inbox</a>
- </li>
- <li>
- <a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
- </li>
- <li class="divider"></li>
- <li>
- <a href="#"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
- </li>
- </ul>
- </li>
- </ul>
- <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
- <div class="collapse navbar-collapse navbar-ex1-collapse">
- <ul class="nav navbar-nav side-nav">
- <li>
- <a href="start"><i class="fa fa-fw fa-dashboard"></i> Dashboard</a>
- </li>
- <li>
- <a href="users"><i class="fa fa-fw fa-bar-chart-o"></i> Benotzer</a>
- </li>
- <li class="active">
- <a href="#"><i class="fa fa-fw fa-bar-chart-o"></i> Support</a>
- </li>
- </ul>
- </div>
- <!-- /.navbar-collapse -->
- </nav>
- <div id="page-wrapper">
- <div class="container-fluid">
- <!-- Page Heading -->
- <div class="row">
- <div class="col-lg-12">
- <h1 class="page-header">
- Dashboard <small>Statësch Iwwersiicht</small>
- </h1>
- <ol class="breadcrumb">
- <li>Dashboard>
- <li class="active">
- <i class="fa fa-dashboard"></i> Support
- </li>
- </ol>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">Virnumm:</label>
- <div class="col-sm-10">
- <input type="text" name="first_name" class="form-control" placeholder="Virnumm" value="<?php echo $fnumm1; ?>">
- </div>
- </div></form>
- <input type="submit" name="submit" class="btn btn-default" value="Wärter aktualiséieren">
- <!-- /.row -->
- <!-- Footer -->
- <?php include '../php/interface/footer.php'; ?>
- </div>
- <!-- /.container-fluid -->
- </div>
- <!-- /#page-wrapper -->
- </div>
- <!-- /#wrapper -->
- <!-- jQuery -->
- <script src="js/jquery.js"></script>
- <!-- Bootstrap Core JavaScript -->
- <script src="js/bootstrap.min.js"></script>
- <!-- Morris Charts JavaScript -->
- <script src="js/plugins/morris/raphael.min.js"></script>
- <script src="js/plugins/morris/morris.min.js"></script>
- <script src="js/plugins/morris/morris-data.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement