El codigo
Código
<?php //Ban System 0.1 //Coded By Doddy H //Datos para la DB $host = "localhost"; $userw = "root"; $passw = ""; $db = "ban"; // $ip = $_SERVER[REMOTE_ADDR]; if ($ipa == -1 || $ipa === FALSE) { echo "<center><h1>Has sido baneado de esta pagina</h1></center>"; } else { echo "<center><h2>Bienvenido</h2></center>"; } } else { echo "<script>alert('Muy gracioso');</script>"; } // The End ? ?>
El administrador
Código
<?php //Ban System Admin 0.1 //Coded By Doddy H //Datos para el login $username = "admin"; $password = "21232f297a57a5a743894a0e4a801fc3"; //admin // //Datos para la DB $host = "localhost"; $userw = "root"; $passw = ""; $db = "ban"; // $user = $plit[0]; $pass = $plit[1]; if ($user == $username and $pass == $password) { $todo = "create table bansystem ( id int(10) UNSIGNED NOT NULL AUTO_INCREMENT, ip TEXT NOT NULL, PRIMARY KEY(id)); "; echo "<script>alert('Instalado correctamente');</script>"; echo '<meta http-equiv="refresh" content=0;URL=>'; } else { echo "<script>alert('Error');</script>"; } } //Lo demas echo "<title>BanSystem Administracion</title>"; echo "<center><h1>BanSystem Administracion</h1></center><br><br>"; $ipaz = $_POST['ipadd']; if ($ipfinal == -1 || $ipfinal === FALSE) { echo "<script>alert('Eso no es una IP');</script>"; } else { echo "<script>alert('IP Agregada');</script>"; } else { echo "<script>alert('Error');</script>"; } } } $id = $_GET['del']; echo "<script>alert('Borrado');</script>"; } else { echo "<script>alert('Error');</script>"; } } echo " <center> <h2>Agregar una IP</h2><br><br> <form action='' method=POST> IP : <input type=text name=ipadd value=127.0.0.1><input type=submit value=Agregar> </form> <br><br> <h2>Baneados</h2><br><br> <table border=1> <td>ID</td><td>IP</td><td>Option</td><tr>"; echo "<td>".htmlentities($ab[0])."</td><td>".htmlentities($ab[1])."</td><td><a href=?del=".htmlentities($ab[0]).">Delete</a></td><tr>"; } echo "</table> </center> "; // } else { echo " <center><br><br> <form action='' method=POST> <h2>Deseas instalar Ban System ?</h2><br><br> <input type=submit name=instalar value=Instalar> </form>"; } // End } else { echo "<script>alert('Segui Participando');</script>"; } } echo "<script>alert('Bienvenido idiota');</script>"; echo '<meta http-equiv="refresh" content=0;URL=>'; } else { echo "<script>alert('Segui Participando');</script>"; } } else { echo " <title>Ban System</title> <h1><center>Ban System</center></h1> <br><br><center> <form action='' method=POST> Username : <input type=text name=user><br> Password : <input type=text name=password><br><br> <input type=submit name=login value=Enter><br> </form> </center><br><br>"; } // The End ? ?>