Bueno he creado un codigo en que usamos fopen para guardar los comentarios del tagboard, así, no se usa SQL para los inexpertos.
Código antihackeable:<title>TagBoard No Hackeable mediante HTML - Sin SQL - By Erik - Eriksharp@hotmail.es</title>
<?php
error_reporting(0);
$mensajes = "mensajess.php";
?>
<?php
error_reporting(0);
$mensaje = $_POST['mensaje'];
$nick = $_POST['nick'];
$mensaje_total = htmlentities($mensaje);
$nick_total = htmlentities($nick);
if($mensaje_total != ''){
if($fp = fopen($mensajes, "a.")){
fwrite($fp, stripslashes('<b>'));
fwrite($fp, stripslashes($nick_total).': ');
fwrite($fp, stripslashes('</b>'));
fwrite($fp, stripslashes($mensaje_total).'<br><br>');
}
fclose($fp);
}
$fp = fopen($mensajes, "r");
fclose($fp);
echo '<iframe marginwidth="2" marginheight="2" src="mensajess.php" frameborder="2" width="200" height="300"></iframe>';
echo '<form action="tagboardantihack.php" method="POST"><input type="text" value="tunick" name="nick"><br><textarea name="mensaje" size="20">'.$contenido.'</textarea> <br> <input type="Submit" value="Comentar"><input type="button" value="Actualizar" onClick="javascript:history.go(0)"></form><a href="admin.php"><input type="button" value="Administración"></a>';
?>
Código de la administraciónNEW:
<title>Administración TagBoard v1.6 - Sistema de administración 0.2</title>
<center>
<?php
if(isset($_POST['ok'])) {
if($_POST['user'] == "tu_name" && $_POST['pass'] == "tu_password"){
unlink("mensajess.php");
echo "Limpieza completada";
}else{
echo '<b>ERROR:</b> Cuenta de administrador incorrecta';
}
}
echo '<form action="admin.php" method="POST"><input type="text" name="user" value="Admin"><input type="password" name="pass" value="password"><br><input type="submit" name="ok" value="Limpiar TagBoard"></form><br><br>';
echo '<br><b>Sistema de administración 0.2</b>: TagBoard v1.6 by <a href="http://www.zoomz.net">Erik</a>';
?>
</center>
Prueba del tagboard antihackeable: www.zoomz.net/erik/tagboardantihack.php
Prueba de la administración (No DEMO): www.zoomz.net/erik/admin.php
Donde pone tu_name y tu_pass en el admin.php, teneis que añadir el nombre de admin y la pass que quereis.Actualizacione s:- Sistemas de nicks
- Saltos de lineas
- Anti HTML Hack
- Sistemas strong en nick
- Sistema de Refresh mediante un button
- Sistema de administración añadida