Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/12/2004, 15:01
Avatar de el_cesar
el_cesar
 
Fecha de Ingreso: mayo-2001
Ubicación: Cali
Mensajes: 2.423
Antigüedad: 22 años, 10 meses
Puntos: 20
el nuevo archivo
Código PHP:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.Estilo1 {
    color: #FFFFFF;
    font-weight: bold;
}
-->
</style>
</head>

<body>
<div id="Layer1" style="position:absolute; left:210px; top:163px; width:544px; height:145px; z-index:1">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><?


$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>
      <td><?


$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>
    </tr>
    <tr>
      <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td >&nbsp;</td>
        </tr>
        <tr>
          <td bgcolor="#FF0000"><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>
                  <td width="86%"><input type="text" name="nombre"></td>
                </tr>
                <tr>
                  <td>Apellido: </td>
                  <td><input type="text" name="apellido"></td>
                </tr>
                <tr>
                  <td colspan="2"><p>
                      <textarea name="mensaje" cols="60" rows="5"></textarea>
                    </p>
                      <p align="center">
                        <input type="submit" name="Submit2" value="Enviar">
                    </p></td>
                </tr>
                <tr>
                  <td colspan="2">&nbsp;</td>
                </tr>
              </table>
          </form></td>
        </tr>
      </table></td>
    </tr>
  </table>
</div>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="27%"><p><img src="imagenes/logo.jpg" width="151" height="100"></p>
    </td>
    <td width="73%">&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="27%">&nbsp;</td>
    <td width="40%"><div align="right"><img src="imagenes/tab2.gif" width="12" height="24"></div></td>
    <td width="6%" bgcolor="#FF0000"><a href="eventos/ver_evento.php" class="unnamed1">Eventos</a></td>
    <td width="2%"><div align="right"><img src="imagenes/tab2.gif" width="12" height="24"></div></td>
    <td width="9%" bgcolor="#FF0000"><a href="registro/registro.htm" class="unnamed1">Registrarse</a></td>
    <td width="2%"><div align="right"><img src="imagenes/tab2.gif" width="12" height="24"></div></td>
    <td width="5%" bgcolor="#FF0000"><a href="links/buscar.htm"><span class="unnamed1">Buscar</span></a></td>
    <td width="2%"><div align="right"><img src="imagenes/tab2.gif" width="12" height="24"></div></td>
    <td width="7%" bgcolor="#FF0000"><a href="mail/mail.htm"><span class="unnamed1">Contacto</span></a></td>
  </tr>
  <tr>
    <td><?
include('lebasi444.php');
?></td>
    <td colspan="8" bgcolor="#FF0000">&nbsp;</td>
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="189" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#0099FF">
      <tr>
        <td><table width=189 border=0 align="center" cellpadding="0" cellspacing="0" bordercolor="#009999" bgcolor="#CCFFCC">
            <form action="/menu_admon.php" method="post">
              <tr bgcolor="#ff0000">
                <td colspan="2" height="45"><div align="center"><font face="Arial" color="#FFFFFF" size=2><b>Zona Privada<br>
                                      <font color="#FFFF00">Ingreso</font></b></font></div></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#FFCCCC"><div align="center">
                    <table width="189" border="0" cellspacing="0" cellpadding="5">
                      <tr valign="middle">
                        <td colspan="2" height="30"><div align="center">
                            <?
                          
// Mostrar error de Autentificaci&oacute;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="47%"><div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Usuario : </font></div></td>
                        <td width="53%"><div align="left">
                            <input type="text" name="user" size="15" class="imputbox">
                        </div></td>
                      </tr>
                      <tr>
                        <td width="47%"><div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Password : </font></div></td>
                        <td width="53%"><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" bgcolor="#FFCCCC"><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></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
y el archivo de conexion

Código PHP:
<?
$dbh
=mysql_connect ("localhost""root""") or die ('I cannot connect to the database because: ' mysql_error());
mysql_select_db ("consultex"); 
?>
gracias por cualquier ayuda
__________________
Say no more.......