if ( !empty( $db_asunto ) && !empty( $db_noticia ) )
{
if ( isset( $add ) && $user_auth && $user_level == -2)
$res = mysql_query( "INSERT INTO news (fecha, uid, asunto, noticia) VALUES (CURDATE(), '$user_id', '".addslashes($db_asunto)."','".addslashes($db_noticia)."')", $conexion ) OR die("No puedo insertar la noticia");
if ( isset( $mod ) && ( $user_auth ) && $user_level == -2 )
$res = mysql_query( "UPDATE news SET uid='$user_id', asunto='".addslashes($db_asunto)."', noticia='".addslashes($db_noticia)."' WHERE id=$mod", $conexion ) OR die("No puedo modificar la noticia");
}
if ( !isset( $go ) )
$go = 1;
$go--;
if ( isset( $smod ) )
$res = mysql_query( "SELECT fecha, asunto, noticia, id FROM news WHERE id=$smod", $conexion ) OR die("No puedo realizar la consulta
$sql_upd
".mysql_error($conexion));
else
$res = mysql_query( "SELECT fecha, asunto, noticia, id FROM news ORDER BY fecha+id DESC LIMIT $go, 5", $conexion ) OR die("No puedo realizar la consulta
$sql_upd
".mysql_error($conexion));
?>
if ( isset( $sadd ) || isset( $smod ) ) { ?>
'; $numrows = mysql_num_rows( $res ); if ( $numrows > 0 ) { while( ($datos = mysql_fetch_array($res)) ) { echo '
";
echo "![]() | "; if ( $user_auth && $user_level == -2 ) echo "[ E ] "; echo"$datos[0] >> > ".stripslashes($datos[1])." |
".nl2br(stripslashes($datos[2]))." |