1
Pixel Art / Re:Mi primer PixelArt
« en: 15 de Junio de 2013, 00:13:25 am »
Esta lindp
Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.
A ver si entiendo, ¿pudiste crear el sistema de alertas que según tu lo tienes desde hace tiempo pero no sabes sobre la base de datos?porque un amigo surpu iso la base de datos y cuando contacte con el le formatearon la pc y se le borro la db que había echo osea yo hice el sistema pero no la db el modifico el sistema pero de hay no se :S
Y si según la creaste desde "hace tiempo", como fue que en ese "hace tiempo" te funciono?, creas algo que no pruebas?
Da información mas detallada por que esto huele a otra cosa que aun es un poco apresurado decir.
Saludos.
<?
session_start();
include("conectar.php");
$n=$_SESSION[nick];
$q=mysql_query("SELECT * FROM usuarios WHERE nick='$n'");
$ar=mysql_fetch_array($q);
if($ar[rango] == "Administrador" or $ar[rango] == "Coordinador" or $ar[rango] == "Hobba-Gold" or $ar[rango] == "Hobba-Silver" or $ar[rango] == "Hobba-Bronce" or $ar[rango] == "Moderador") {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<style type="text/css">
<!--
body,td,th {
font-family: Tahoma, Geneva, sans-serif;
font-size: 8pt;
}
-->
</style></head>
<body>
<?
if(isset($_POST['OK'])) {
if($_POST['IP'] == NULL or $_POST['Nombre'] == NULL or $_POST['Razon'] == NULL) {
print('No puedes dejar campos en blanco');
}else{
include("conectar.php");
if(mysql_query("INSERT INTO `alertas` (`nick`,`texto`,`leido`,`autor`,`ip`) VALUES ('$_POST[Nombre]','$_POST[Razon]','No','$_SESSION[nick]','$_POST[IP]')")){
echo "El usuario ha sido alertado.";
} else {
echo mysql_error();
}
}
}
?>
Mi ip :
<?
if (isset( $_SERVER [ 'HTTP_X_FORWARDED_FOR' ])) {
$ip = $_SERVER [ 'HTTP_X_FORWARDED_FOR' ];
}
elseif (isset( $_SERVER [ 'HTTP_VIA' ])) {
$ip = $_SERVER [ 'HTTP_VIA' ];
}
elseif (isset( $_SERVER [ 'REMOTE_ADDR' ])) {
$ip = $_SERVER [ 'REMOTE_ADDR' ];
}
else {
$ip = "Anonima" ;
}
print $ip;
?>
<form method="POST" action="<?=$PHP_SELF;?>">
<p>
<b><font size="1" face="Tahoma">IP a alertar:</font></b><br>
<input name="IP" type="text" style="font-size: 8pt; font-family: Verdana; font-weight: bold" value="<?=$_GET['ip']?>" size="20">
</p>
<p>
<b><font size="1" face="Tahoma">Nombre de Usuario:<br></font></b>
<input name="Nombre" type="text" style="font-size: 8pt; font-family: Verdana; font-weight: bold" value="<?=$_GET['nick']?>" size="20"><br><br>
<b><font face="Tahoma" size="1">Alerta:<br>
<label>
<textarea name="Razon" cols="30" rows="5" id="Razon"></textarea>
</label>
<br />
</font></b><br><input type="submit" value="Enviar" name="OK">
</p>
</form>
<center>
<strong>Alertas: </strong><br />
<br />
<table bgcolor="#E1EDF2" width="440" border="0" cellspacing="" cellpadding="">
<tr>
<td width="100"><strong>Nick</strong></td>
<td width="140"><strong>IP</strong></td>
<td width="100"><strong>Alerta</strong></td>
<td width="100"><strong>Alertado por</strong></td>
<td><strong>Leida</strong></td>
</tr>
</table>
<?
include("conectar.php");
$a = mysql_query("SELECT * FROM alertas ORDER by id DESC LIMIT 0,10");
$rows = mysql_num_rows($a);
if($rows == 0) {
print('No hay alertas');
}else{
print('<table bgcolor="#F7F7F7" cellpadding="2" width="440" border="0" cellspacing="0" cellpadding="0">');
while($datos = mysql_fetch_array($a)) {
print('<tr>
<td width="100"><strong>'.$datos['nick'].'</strong></td>
<td width="140"><strong>'.$datos['ip'].'</strong></td>
<td width="100"><strong>'.$datos['texto'].'</strong></td>
<td width="100"><strong>'.$datos['autor'].'</strong></td>
<td><strong>'.$datos['leido'].'</strong></td>
</tr>');
}
print('</table>');
}
?>
</center>
</body>
</html>
<? }else{ print('No tienes acceso'); } ?>
PD: ¿Porque te estas haciendo pasar por mi en otros foros cuando ni te conozco?
Saludos
Pasar por ti?? ni que fuera clon tuyo -.-