Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Admin Home</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!-- Bootstrap -->
- <link href="css/bootstrap.min1.css" rel="stylesheet">
- <link href="css/custom1.css" rel="stylesheet">
- <link href="css/font-awesome.css" rel="stylesheet">
- <link href="jquery-ui-1.11.4.custom/jquery-ui.css" rel="stylesheet">
- <link href="jquery-ui-1.11.4.custom/jquery-ui.theme.min.css" rel="stylesheet">
- <link href="jquery-ui-1.11.4.custom/jquery-ui.structure.min.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="css/font-awesome.css">
- <link rel="stylesheet" type="text/css" href="css/summernote.css">
- <link rel="stylesheet" type="text/css" href="css/summernote-bs3.css">
- <script src="js/respond.js"></script>
- <?php
- session_start();
- $db = new mysqli ("localhost","svccedux","Playdota16","svccedux_svcc");
- if(isset($_POST['submit'])){
- $_password = $_POST['passsword'];
- $_username = $_POST['username'];
- $_id = $_POST['id'];
- $update = $db->query("UPDATE `admin` SET `username`='$_username',`password`='$_password',`status`='0' WHERE id = '$_id'") or die ($db->query);
- }
- if(!$_SESSION){
- $_SESSION['login']="false";
- }else{
- if($_SESSION['login'] == "false"){
- //session_destroy();
- header("location:index.php");
- }else{
- //echo "wasak";
- $_SESSION['login']="true";
- }
- }
- include("include/connection.php");
- $_admin = $_SESSION["admin"];
- $_status = "";
- $_id = "";
- $query = "SELECT * FROM admin WHERE username = '$_admin'";
- $result = mysql_query($query);
- $rows = mysql_fetch_array($result,MYSQL_ASSOC);
- while($row = mysql_fetch_array($result,MYSQL_ASSOC)){
- $_id = $row["id"];
- $_status = $row["status"];
- }
- if($_status == 1){
- $showDivFlag=true;
- $found = true;
- }
- else{
- $showDivFlag=false;
- $found=false;
- }
- ?>
- </head>
- <body style="background-color:#fff;">
- <div class="container-fluid" style="padding-top:30px;">
- <div class="row">
- <nav class="navbar navbar-inverse navbar-fixed-top">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="#">Admin Area</a>
- </div>
- <div id="myNavbar" class="collapse navbar-collapse">
- <ul class="nav navbar-nav navbar-right">
- <li><a href="adminHome.php"><i class="glyphicon glyphicon-home" style="color:inherit;"></i> Home</a></li>
- <li><a href="adminOffers.php"><i class="glyphicon glyphicon-briefcase" style="color:inherit;"></i> Offers</a></li>
- <li><a href="adminAbout.php"><i class="glyphicon glyphicon-user" style="color:inherit;"></i> About</a></li>
- <li><a href="tempmap.php"><i class="glyphicon glyphicon-map-marker" style="color:inherit;"></i> Map</a></li>
- <li><a href="adminContact.php"><i class="glyphicon glyphicon-phone" style="color:inherit;"></i> Contact</a></li>
- <li <?php if ($showDivFlag===false){?>style="display:none"<?php }?>><a href="adminManage.php"><i class="glyphicon glyphicon-list-alt" style="color:inherit;"></i> Manage Admin</a></li>
- <li class="active" <?php if ($found===true){?>style="display:none"<?php }?>><a href="updateAccount.php"><i class="glyphicon glyphicon-edit" style="color:inherit;"></i> Update Account</a></li>
- <li><a href="#" id="btnlogout"><i class="glyphicon glyphicon glyphicon-log-out" style="color:inherit;"></i>Logout</a></li>
- <li><a href="#" class="btnhide" style="display:none;" id="loadFA" data-toggle="modal" data-target="#myModaleditFA">rename</a></li>
- <li><a href="#" class="btnhide" style="display:none;" id="loaddeleteFA" data-toggle="modal" data-target="#myModaldeleteFA">delete</a></li>
- <li><a href="" class="btnhide" style="display:none;" onclick="loadFA()" id="loadFAtemp">load</a></li>
- </ul>
- </div>
- </div>
- </nav>
- </div>
- </div><!-- end of container-->
- <div class="container" style="padding-top:40px;">
- <div class="row" style="margin-top:20px;">
- <div class="col-md-6 col-md-offset-3">
- <div id="loginForm">
- <form method="post">
- <input name="id" type="hidden" id="id" value="<?php echo $rows['id']; ?>">
- <label for="txtUsername">Username:</label>
- <input type="text" name="username" class="form-control" value="<?php echo $rows['username']; ?>" placeholder="Input Username Here..." readonly>
- <label for="txtPassword">Password:</label>
- <input type="password" name="password" value="yu" class="form-control" placeholder="Input Password Here...">
- <input type="submit" name="submit" value="Update Acount" class="btn btn-default col-md-offset-8" style="margin-top:10px;">
- </form>
- </div><!--end of loginForm-->
- </div><!--end of col-->
- </div><!--end of row-->
- </div><!--end of container-->
- <div id="dialog-message" title="Warning">
- <p style="color:red;">
- The username is already exists please try another one.
- </p>
- </div>
- <div id="dialog" title="Message">
- <p>
- Successfully Inserted.
- </p>
- </div>
- <!-- javascript -->
- <script src="jquery-ui-1.11.4.custom/external/jquery/jquery.js"></script>
- <script src="js/bootstrap.min1.js"></script>
- <script src="jquery-ui-1.11.4.custom/jquery-ui.js"></script>
- <script type="text/javascript" src="js/summernote.min.js"></script>
- <script type="text/javascript" src="js/summernote-ext-video.js"></script>
- <script src="js/script.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement