Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/12/2004, 14:59
Avatar de el_cesar
el_cesar
 
Fecha de Ingreso: mayo-2001
Ubicación: Cali
Mensajes: 2.423
Antigüedad: 23 años
Puntos: 20
Algo muy extraño

Hola, resulta que por motivos de modificacion del diseño de mi proyecto, me vi en la tarea de hacer un nuevo index, para arrancar desde cero con el diseño, el problema esta en que cuando pase los scripts de php a mi nuevo archivo (absolutamente todos), cuando intento previsualizar, me dice que no puede tener acceso a la BD, es muy raro, teniendo en cuenta que ambos archivos utilizan exactamente el mismo archivo de conexion a la BD, que puede estar pasando? , a continuacion pongo mis codigos

el archivo original
Código PHP:
<body>
<?
include('../lebasi444.php');
?>
<p>&nbsp; </p>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
  <tr> 
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr> 
    <td width="60%"><div align="center"> </div></td>
    <td width="7%"><table width="300" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><div align="right"><img src="../imagenes/tab2.gif" width="12" height="24"></div></td>
          <td bgcolor="#FF0000"><a href="../eventos/ver_evento.php" class="unnamed1">Eventos</a></td>
          <td><div align="right"><img src="../imagenes/tab2.gif" width="12" height="24"></div></td>
          <td bgcolor="#FF0000"><a href="../registro/registro.htm" class="unnamed1">Registrarse</a></td>
          <td><div align="right"><img src="../imagenes/tab2.gif" width="12" height="24"></div></td>
          <td bgcolor="#FF0000"><a href="../links/buscar.htm"><span class="unnamed1">Buscar</span></a></td>
          <td><div align="right"><img src="../imagenes/tab2.gif" width="12" height="24"></div></td>
          <td bgcolor="#FF0000"><a href="../mail/mail.htm"><span class="unnamed1">Contacto</span></a></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td colspan="2" bgcolor="#FF0000">&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="19%" valign="top"> <table width="250" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#0099FF">
        <tr> 
          <td> <table width=100% border=0 align="center" cellpadding="0" cellspacing="0" bordercolor="#009999" bgcolor="#CCFFCC">
              <form action="/menu_admon.php" method="post">
                <tr bgcolor="#0099FF"> 
                  <td colspan="2" height="45"> <div align="center"><font face="Arial" color="#FFFFFF" size=2><b>Identificaci&oacute;n 
                      Usuarios<br>
                      <font color="#FFFF00">www.tupagina.tal</font></b></font></div></td>
                </tr>
                <tr> 
                  <td colspan="2"> <div align="center"> 
                      <table width="100%" border="0" cellspacing="0" cellpadding="5">
                        <tr valign="middle"> 
                          <td colspan="2" height="30"> <div align="center"> 
                              <?
                          
// Mostrar error de Autentificación.
                          
include ("../aut_mensaje_error.inc.php");
                          if (isset(
$_GET['error_login'])){
                              
$error=$_GET['error_login'];
                          echo 
"<font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#FF0000'>Error: $error_login_ms[$error]";
                          }
                         
?>
                            </div></td>
                        </tr>
                        <tr> 
                          <td width="39%"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Usuario 
                              : </font></div></td>
                          <td width="61%"> <div align="left"> 
                              <input type="text" name="user" size="15" class="imputbox">
                            </div></td>
                        </tr>
                        <tr> 
                          <td width="39%"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Password 
                              : </font></div></td>
                          <td width="61%"> <div align="left"> 
                              <input type="password" name="pass" size="15" class="imputbox">
                            </div></td>
                        </tr>
                      </table>
                    </div></td>
                </tr>
                <tr valign="middle"> 
                  <td colspan="2" height="50"> <div align="center"><font face="Arial" color=black size=2> 
                      <input name=submit type=submit value="  Entrar  " class="botones">
                      </font></div></td>
                </tr>
              </form>
            </table></td>
        </tr>
      </table>
      <p>&nbsp;</p></td>
    <td width="81%"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="47%"><table width="95%" border="0" cellspacing="0" cellpadding="0" >
              <tr>
                <td width="46%">&nbsp;</td>
                <td width="46%"> 
                  <?


$dte 
getdate();
$dt $dte['year'] . "-" str_pad($dte['mon'], 2"0"STR_PAD_LEFT) . "-" str_pad($dte['mday'], 2"0"STR_PAD_LEFT);
$tm $dte['hours'] . ":" $dte['minutes'] . ":" $dte['seconds'];
$dt2 $dte['year'] . "-" str_pad($dte['mon'], 2"0"STR_PAD_LEFT) . "-" str_pad($dte['mday']-12"0"STR_PAD_LEFT);



    
$consulta="SELECT * FROM notice WHERE fecha = '".$dt."' AND lado = 'Izquierda'";
    
$noticia=mysql_query($consulta);


        if(
mysql_num_rows($noticia)>0){
        while (
$row=mysql_fetch_array($noticia))
        {
            {
            
$tit=$row["titulo"];
            echo 
'<tr><td><b>'.$row["titulo"].'</b></td></tr>';
            echo 
'<tr><td><em>'.$row["encabezado"].'</em></td></tr>';
            
$conten=$row["contenido"]; 
            echo 
"<tr><td><span lang=ES-CO><a href='noticia2.php?not=".$tit."'>".substr($conten,0,430). '</span></td></tr>';
            echo 
'Fuente : ';
            echo 
"<a href='".$row['urlfuente']."'>".$row['fuente']."<br>"
    
            }
        }
        }
else { 
    
$consulta2="SELECT * FROM notice WHERE fecha = '".$dt2."' AND lado = 'Izquierda'";
    
$noticia2=mysql_query($consulta2);



        if(
mysql_num_rows($noticia2)>0){
        while (
$row=mysql_fetch_array($noticia2))
        
//$dir="noticia.php?titulo=".$row["titulo"].;
        
{
            {
            
$tit=$row["titulo"];
            echo 
'<tr><td><b>'.$row["titulo"].'</b></td></tr>';
            echo 
'<tr><td><em>'.$row["encabezado"].'</em></td></tr>';
            
$conten=$row["contenido"]; 
            echo 
"<tr><td><span lang=ES-CO><a href='noticia2.php?not=".$tit."'>".substr($conten,0,430). '</span></td></tr>';
            echo 
'Fuente : ';
            echo 
"<a href='".$row['urlfuente']."'>".$row['fuente']."<br>"
    
            }
        }
        };
}
?>
                </td>
              </tr>
            </table></td>
          <td width="53%"><table width="95%" border="0" cellspacing="0" cellpadding="0" >
              <tr> 
                <td width="46%"> 
                  <?


$dte 
getdate();
$dt $dte['year'] . "-" str_pad($dte['mon'], 2"0"STR_PAD_LEFT) . "-" str_pad($dte['mday'], 2"0"STR_PAD_LEFT);
$tm $dte['hours'] . ":" $dte['minutes'] . ":" $dte['seconds'];



    
$consulta="SELECT * FROM notice WHERE fecha = '".$dt."' AND lado = 'Derecha'";
    
$noticia=mysql_query($consulta);


        if(
mysql_num_rows($noticia)>0){
        while (
$row=mysql_fetch_array($noticia))
        {
            {
            
$tit2=$row["titulo"];
            echo 
'<tr><td><b>'.$row["titulo"].'</b></td></tr>';
            echo 
'<tr><td><em>'.$row["encabezado"].'</em></td></tr>';
            
$conten=$row["contenido"]; 
            echo 
"<tr><td><span lang=ES-CO><a href='noticia2.php?not=".$tit2."'>".substr($conten,0,430). '</span></td></tr>';
            echo 
'Fuente : ';
            echo 
"<a href='".$row['urlfuente']."'>".$row['fuente']."<br>"
    
            }
        }
        }
else { 
    
$consulta2="SELECT * FROM notice WHERE fecha = '".$dt2."' AND lado = 'Derecha'";
    
$noticia2=mysql_query($consulta2);


        if(
mysql_num_rows($noticia2)>0){
        while (
$row=mysql_fetch_array($noticia2))
        {
            {
            
$tit2=$row["titulo"];
            echo 
'<tr><td><b>'.$row["titulo"].'</b></td></tr>';
            echo 
'<tr><td><em>'.$row["encabezado"].'</em></td></tr>';
            
$conten=$row["contenido"]; 
            echo 
"<tr><td><span lang=ES-CO><a href='noticia2.php?not=".$tit2."'>".substr($conten,0,430). '</span></td></tr>';
            echo 
'Fuente : ';
            echo 
"<a href='".$row['urlfuente']."'>".$row['fuente']."<br>"
    
            }
        }
        }
        ;
}
?>
                </td>
                <td width="46%">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td >&nbsp;</td>
        </tr>
        <tr> 
          <td bgcolor="#990000"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>ENVIENOS 
              SUS COMENTARIOS</strong></font></div></td>
        </tr>
        <tr> 
          <td><form name="form1" method="post" action="/portal/mail/enviar_comentario.php">
              <table width="60%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td width="14%">Nombre: </td>
...
el nuevo archivo va en otro
__________________
Say no more.......