Ver Mensaje Individual
  #5 (permalink)  
Antiguo 09/04/2005, 23:08
raml
 
Fecha de Ingreso: abril-2005
Mensajes: 50
Antigüedad: 19 años
Puntos: 0
Gracias, pero como cambio la función

El tip en sí es muy bueno y lo puedo aplicar en general, gracias.

Sin embargo, aún estoy aprendiendo y mi problema es con esta función que mencionaba ya que la estoy estudiando de un script ya hecho. Es por eso que necesito ayuda en alterar esta funcion en específico para poder obtener la fecha de las noticias publicadas en español.

Ojalá me puedan ayudar a modificar esta funcion en específico.

En todo caso como complemento para que tengan más información, el script que llama la función y despliega la información y las fechas, es el siguiente:

Código PHP:
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<basefont face="Verdana">
</head>

<body>

<!-- standard page header begins -->
<p><p>

<table width="100%" cellspacing="0" cellpadding="5">
<tr>
    <td></td>
</tr>
<tr>
    <td bgcolor="Navy"><font size="-1" color="White">
    <b>Megalomaniacs Inc : Press Releases</b></font>
    </td>
</tr>
</table>
<!-- standard page header ends -->

<ul>
<?php
// includes
include('../conf.php');
include(
'../functions.php');

// open database connection
$connection mysql_connect($host$user$pass) or die ('Unable to connect!');

// select database
mysql_select_db($db) or die ('Unable to select database!');

// generate and execute query
$query "SELECT id, title, timestamp FROM news ORDER BY timestamp DESC LIMIT 0, 5";

$result mysql_query($query) or die ("Error in query: $query. " mysql_error());

// if records present
if (mysql_num_rows($result) > 0)
{
    
// iterate through resultset
    // print article titles
    // abrir las noticias como pop up window
    
while($row mysql_fetch_object($result))
    {
    
$id $row->id;
    
?>
        <li><font size="-1"><b>
        
        <a href="#self" onClick="MM_openBrWindow('story.php?id=<?php echo $id?>','','toolbar=yes,status=yes,scrollbars=yes,resizable=yes,width=650,height=550')"><?php echo $row->title?></a></b></font><br>
        
        <font size="-2"><?php echo formatDate($row->timestamp); ?>
        </font>
        <p>
    <?php
    
}
}
// if no records present
// display message
else
{
?>
    <font size="-1">No press releases currently available</font>
<?php
}

// close database connection
mysql_close($connection);
?>
<br>
<a href="../admin/list.php">Admin Page </a>    
        </ul>

<!-- standard page footer begins -->
<p>
<table width="100%" cellspacing="0" cellpadding="5">
<tr>
    <td align="center"><font size="-2">
    All rights reserved. Visit Melonfire 
    <a href="http://www.melonfire.com/community/columns/trog/"> 
    here</a> for <a href="#" onClick="MM_openBrWindow('story.php','','toolbar=yes,status=yes,scrollbars=yes,resizable=yes,width=650,height=550')">more</a>.</td>
</tr>
</table>
<!-- standard page footer ends -->

</body>
</html>
Gracias,