Tema: Problema
Ver Mensaje Individual
  #7 (permalink)  
Antiguo 28/12/2012, 13:13
XD2XD2
 
Fecha de Ingreso: diciembre-2012
Mensajes: 223
Antigüedad: 11 años, 5 meses
Puntos: 2
Respuesta: Problema

Código PHP:
Ver original
  1. /* Establecemos las variables */
  2. $ruta = "test.tpl";
  3. $menu = array();
  4. $m = mysqli_query($conectar, "SELECT * FROM Noticias WHERE Dominio = '".mysqli_real_escape_string($conectar, $_GET[d])."'");
  5. while($m1 = mysqli_fetch_array($m)){
  6.     $menu[] = "$m1[Menu]";
  7. }
  8. $n = mysqli_fetch_array(mysqli_query($conectar, "SELECT * FROM Noticias WHERE Dominio = '".mysqli_real_escape_string($conectar, $_GET[d])."' AND Menu = '".mysqli_real_escape_string($conectar, $_GET[n])."'"));
  9. if($n){
  10. $array = array(
  11.     "header" => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  12.  
  13. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  14. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
  15. <head>
  16.     <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  17.     <meta name="GENERATOR" content="BlogIn">
  18.     <meta name="description" content=""/>
  19.   <meta name="keywords" content="HTML, tags, commands">
  20.     <meta name="author" content="" />
  21.     <title>{titulo}</title>
  22. </head>',
  23.     "titulo" => $c['Titulo'],
  24.     "descripcion" => $c['Descripcion'],
  25.     "noticiatitulo" => $n['Titulo'],
  26.     "noticia" => $n['Contenido'],
  27.     "fecha" => $n['Fecha'],
  28.     "menu" => $menu,
  29.     "footer" => "© 2012-2013 Simple Organization. All rights Reserved. Todos los derechos reservados <a href='http://iblog.net'>iBlog</a>"
  30. );
  31. }else{
  32. $array = array(
  33.     "header" => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  34.  
  35. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  36. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
  37. <head>
  38.     <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  39.     <meta name="GENERATOR" content="BlogIn">
  40.     <meta name="description" content=""/>
  41.   <meta name="keywords" content="HTML, tags, commands">
  42.     <meta name="author" content="" />
  43.     <title>{titulo}</title>
  44. </head>',
  45.     "titulo" => $c['Titulo'],
  46.     "descripcion" => $c['Descripcion'],
  47.     "noticiatitulo" => "El articulo no existe.",
  48.     "noticia" => "",
  49.     "fecha" => "",
  50.     "menu" => $menu,
  51.     "footer" => "© 2012-2013 Simple Organization. All rights Reserved. Todos los derechos reservados <a href='http://iblog.net'>iBlog</a>"
  52. );
  53. }
  54. /* Llamamos a la funci¨®n */

Pero me da error del else