SHARE
TWEET

Untitled

a guest Sep 11th, 2019 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     require('database.php');
  3.     require('auth.php');
  4.     require('smartproxy.php');
  5.  
  6.     $email = $_SESSION['email'];
  7.  
  8.     $sql = "SELECT * FROM users WHERE email='$email'";
  9.     $result = mysqli_query($connection,$sql);
  10.     $row = mysqli_fetch_assoc($result);
  11.  
  12.     if($row['role'] != 'admin')
  13.     {
  14.         header('Location: dashboard.php');
  15.     }
  16.  
  17.     if(isset($_POST['username']) && isset($_POST['password']) && isset($_POST['traffic_limit']))
  18.     {
  19.         $username = $_POST['username'];
  20.         $password = $_POST['password'];
  21.         $traffic_limit = $_POST['traffic_limit'];
  22.         $data = CreateSubUser($username,$password,$traffic_limit);
  23.  
  24.         print_r($data);
  25.     }
  26. ?>
  27.  
  28. <!DOCTYPE HTML>
  29. <html>
  30.     <head>
  31.         <title>Cop-A-Lot Proxies</title>
  32.         <meta charset="UTF-8"/>
  33.         <meta name="viewport" content="width=device-width; initial-scale=1.0;">
  34.         <link rel="stylesheet" type="text/css" href="css/main.css"/>
  35.         <link rel="stylesheet" type="text/css" href="css/panel.css"/>
  36.         <link rel="shortcut icon" type="image/png" href="images/Icon.png"/>
  37.     </head>
  38.  
  39.     <body>
  40.         <div class="container">
  41.             <div class="form-container">
  42.                 <form action="panel.php" method="POST">
  43.                     <input type="text" name="username" class="form-input" placeholder="New Username..." required/>
  44.                     <input type="password" name="password" class="form-input" placeholder="New Password..." required/>
  45.                     <input type="number" name="traffic_limit" class="form-input" min="0" placeholder="Traffic Limit..." required/>
  46.                     <input type="submit" class="btn btn-white" value="Create"/>
  47.                 </form>
  48.             </div>
  49.         </div>
  50.     </body>
  51. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top