Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include_once '../include/class.user.php';
- $user = new User();
- $uid = $_SESSION['uid'];
- if (!$user->get_session()){
- header("location: ../login.php");
- }
- if (isset($_GET['q'])){
- $user->user_logout();
- header("location: ../login.php");
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>WebTools</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
- <!--<link rel="stylesheet" type="text/css" href="style.css">-->
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
- </head>
- <body>
- <style>
- body{
- background: #F5F5F5;
- }
- </style>
- <nav class="navbar navbar-inverse">
- <div class="container-fluid">
- <div class="navbar-header">
- <a class="navbar-brand" href="#">WebTools</a>
- </div>
- <div>
- <ul class="nav navbar-nav">
- <li class="active"><a href="index.php">Strona Główna</a></li>
- <li><a href="info.php">Informacje</a></li>
- <li><a href="konsola.php">Konsola</a></li>
- <li><a href="report.php">Zgłoszenia</a></li>
- <li><a href="itemshop.php">ItemShop</a></li>
- </ul>
- <ul class="nav navbar-nav navbar-right">
- <li class="dropdown">
- <li><a href="#"><?php echo ''.$user->get_money($uid).'$' ?>
- <li><a class="dropdown-toggle" data-toggle="dropdown" href="#"><?php echo "".$user->get_name($uid); ?>
- <span class="caret"></span></a>
- <ul class="dropdown-menu">
- <li><a href="#" data-toggle='modal' data-target='#addMoney'>Dodaj kase</a></li>
- <li><a href="index.php?q=logout">Wyloguj się</a></li>
- </ul>
- </div>
- </div>
- </nav>
- <div class="container">
- <!-- Modal -->
- <div class="modal fade" id="addMoney" role="dialog">
- <div class="modal-dialog modal-sm">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">Dodawanie kasy</h4>
- </div>
- <form action="" method="POST">
- <div class="modal-body">
- <p>Wpisz ilość kasy poniżej, aby dodać</p>
- <input name="money_input" type="text" class="form-control input-sm" id="inputsm"></input>
- </div>
- <div class="modal-footer">
- <input type="submit" value="Dodaj" name="money_button" class="btn btn-success">
- <button type="button" class="btn btn-danger" data-dismiss="modal"> Wyjdź</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </body>
- <?php
- if(isset($_POST['money_button']))
- {
- $value = $_POST['money_input'];
- $newmoney = $money2 + $value;
- $sql = "UPDATE users SET " . $newmoney . " WHERE uid= " . $uid . "";
- echo '<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
- <strong>Sukces!</strong> Dodałeś <strong>' . $value . ' $</strong> do konta <strong>' . $_SESSION["user"] . '</strong> !
- </div>';
- }
- ?>
- <body>
- <center>
- <div id="wrapper">
- <div class="jumbotron">
- <?php
- if ($_SERVER['HTTP_X_FORWARDED_FOR']) {
- $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
- }
- else {
- $ip = $_SERVER['REMOTE_ADDR'];
- }
- $host = gethostbyaddr($ip);
- ?>
- <h5><strong>Twoje IP:</strong> <?php echo "$ip"; ?></h5>
- <h5><strong>IP serwera:</strong> localhost</h5>
- </div>
- </div>
- <div id="wrapper">
- <div class="jumbotron">
- <h4></h4>
- </div>
- </div>
- <div id="wrapper">
- <div class="jumbotron">
- <h4></h4>
- </div>
- </div>
- </center>
- </body>
- <audio autoplay>
- <source src="sound2.mp3" type="audio/mpeg">
- .
- </audio>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment