- Desde
- 7 Ene 2013
- Mensajes
- 193
El Error es:
y el codigo es:Parse error: syntax error, unexpected '}' in /home2/cscminec/public_html/Nikan/mp.php on line 52
PHP:
<?php
# Incluimos la configuracion
include('config.php');
if(!isset($_SESSION[usuario]) ){
Header("Location: index.php");
} else {
$nombre = $_SESSION[usuario];
$nivel=mysql_query("SELECT * FROM usuarios WHERE nick='$nombre' ");
if($lvl = mysql_fetch_array($nivel)) {
$rango = $lvl['nivel'];
if($rango == '1'){
?>
<!doctype>
<html>
<head>
<title>Nikan - Pagina Oficial</title>
<link rel="stylesheet" href="index.css?nocache=<?php echo mt_rand();?>" type="text/css"/>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<header><div class="main"><h1>Nikan</h1><nav><ul><li><a href="index.php">Inicio</a></li><li><a href="quienes.php">¿Quienes somos?</a></li><li><a href="perfil.php">Mis datos</a></li><li><a href="http://cscminecraft.ir/Nikan/mis-notas.php">Notas</a></li><li><a href="mp.php">Comunicacion</a></li><li class="ingresar"><a href="logout.php">Salir</a></li></nav></div></header>
<header><div class="main"><nav><ul><li class="ingresar"><a href="redactarmensaje.php">Redactar Mensaje</a></li><li><a href="mp.php">Bandeja de Entrada</a></li></nav></div></header>
<?php
$id = $_GET['id'];
$sql = "SELECT * FROM mensaje WHERE para='".$_SESSION['usuario']."' and ID='".$id."'";
$res = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($res);
?>
<strong>De:</strong> <?=$row['de']?><br />
<strong>Fecha:</strong> <?=$row['fecha']?><br />
<strong>Asunto:</strong> <?=$row['asunto']?><br /><br />
<strong>Mensaje:</strong><br />
<?=$row['texto']?>
?>
<?php
# Avisamos que ya lo leimos
if($row['leido'] != "si")
{
mysql_query("UPDATE mensaje SET leido='si' WHERE ID='".$id."'",$link) or die(mysql_error());
}
?>
<footer><a href="index.php">Inicio</a> - <a href="contactanos.php">Contactanos</a></footer>
<?php
include('js.php');
?>
</body>
</html>
<?php
}
}
}
}
?>