Advertisement
Guest User

Untitled

a guest
Aug 4th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function showLogin() {
  3.     header('WWW-Authenticate: Basic realm="Acceso Restringido"');
  4.     header('HTTP/1.0 401 Unauthorized');
  5.     echo "Usted no tiene permisos para ingresar\n";
  6.     exit;
  7. }
  8. $username = $_SERVER['PHP_AUTH_USER'];
  9. $userpass = $_SERVER['PHP_AUTH_PW'];
  10. if (!isset($username)) {
  11.     showLogin();
  12. } else {
  13.     if ($username == "Nightmare" && $userpass == "Contraseña") {
  14.    
  15.     } else {
  16.         showLogin();
  17.     }
  18. }
  19. ?>
  20.  
  21. <?php
  22.     $state = false;
  23.  
  24.     if (isset($_POST['action']) == "add") {
  25.         $conexion = mysql_connect("184.171.168.186", "fuegox_admin", "+V;V9N%t345B");
  26.         mysql_select_db("fuegox_adminservers", $conexion);
  27.    
  28.         $que = "INSERT INTO admins ";
  29.         $que.= "VALUES ('', '".$_POST['nombre']."', '".$_POST['steamid']."', '".$_POST['access']."', '".$_POST['account']."', '".$_POST['ciudad']."') ";
  30.         $res = mysql_query($que, $conexion) or die(mysql_error());t
  31.         $state = true;
  32.     }
  33. ?>
  34.  
  35. <html>
  36. <head>
  37. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  38. <style type="text/css">
  39. ::-moz-selection{
  40.     background:#BE81F7;
  41.     color:black;
  42. }
  43. ::selection {
  44.     background:#BE81F7;
  45.     color:black;
  46. }
  47. </style>
  48. <title>Añadir Administrador</title>
  49. <form name="Form1" method="post" action="" id="Form1">
  50. <div id="wb_Text1" style="position:absolute;left:10px;top:18px;width:87px;height:16px;z-index:0;" align="left">
  51. <font style="font-size:13px" color="#000000" face="Arial"><b>Nombre:</b></font></div>
  52. <input type="text" id="Editbox1" style="position:absolute;left:104px;top:15px;width:213px;height:18px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:1" name="nombre">
  53. <div id="wb_Text2" style="position:absolute;left:8px;top:43px;width:90px;height:16px;z-index:2;" align="left">
  54. <font style="font-size:13px" color="#000000" face="Arial"><b>Steam ID:</b></font></div>
  55. <input type="text" id="Editbox2" style="position:absolute;left:104px;top:40px;width:213px;height:18px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:3" name="steamid">
  56. <input type="submit" id="Button1" name="" value="Añadir" style="position:absolute;left:104px;top:147px;width:80px;height:25px;font-family:Arial;font-size:13px;z-index:4">
  57. <div id="wb_Text3" style="position:absolute;left:9px;top:67px;width:87px;height:16px;z-index:5;" align="left">
  58. <font style="font-size:13px" color="#000000" face="Arial"><b>Access flags:</b></font></div>
  59. <input type="text" id="Editbox3" style="position:absolute;left:104px;top:65px;width:213px;height:18px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:6" name="access" value="abcdefiju">
  60. <input type="text" id="Editbox4" style="position:absolute;left:104px;top:90px;width:213px;height:18px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:7" name="account" value="ce">
  61. <div id="wb_Text4" style="position:absolute;left:8px;top:91px;width:90px;height:32px;z-index:8;" align="left">
  62. <font style="font-size:13px" color="#000000" face="Arial"><b>Account flags:</b></font></div>
  63. <div id="wb_Text5" style="position:absolute;left:9px;top:117px;width:87px;height:16px;z-index:9;" align="left">
  64. <font style="font-size:13px" color="#000000" face="Arial"><b>Ciudad:</b></font></div>
  65. <input type="text" id="Editbox5" style="position:absolute;left:104px;top:115px;width:213px;height:18px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:10" name="ciudad">
  66. <input type="reset" id="Button2" name="" value="Limpiar Datos" style="position:absolute;left:207px;top:147px;width:113px;height:25px;font-family:Arial;font-size:13px;z-index:11">
  67. <input type="hidden" name="action" value="add" />
  68. </form>
  69. <?php if ($state) { ?>
  70. <SCRIPT language="JavaScript">
  71. alert('Administrador Añadido con éxito!');
  72. window.opener.location.reload(true);
  73. javascript:close();
  74. </SCRIPT>
  75. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement