$Meses = array ("", "ENE", "FEB", "MAR", "ABR", "MAY", "JUN", "JUL", "AGO", "SEP", "OCT", "NOV", "DIC");
$enlace = mysql_connect("localhost", "africa", "emiliano");
mysql_select_db("Africa");
$consulta = "SELECT * FROM Tbl_Diario WHERE Visible=1 ORDER BY Fecha DESC";
$resultado = mysql_query($consulta);
$Mes = 0;
while($row = mysql_fetch_array($resultado)) {
if($Mes==0) {?>
99 |
$Mes=intval(strftime("%m",mktime(0,0,0,substr($row["Fecha"],5,2),substr($row["Fecha"],8,2),substr($row["Fecha"],0,4))));
} else {
if($Mes==intval(strftime("%m",mktime(0,0,0,substr($row["Fecha"],5,2),substr($row["Fecha"],8,2),substr($row["Fecha"],0,4))))) {
} else {?>
99
$Mes=intval(strftime("%m",mktime(0,0,0,substr($row["Fecha"],5,2),substr($row["Fecha"],8,2),substr($row["Fecha"],0,4))));?>
|
}
}
?>
|
$consulta2 = "SELECT COUNT(*) as Comentarios FROM Tbl_Comentarios WHERE IdDiario=".$row["IdDiario"];
$resultado2 = mysql_query($consulta2);
$row2 = mysql_fetch_object($resultado2);
if(($row2->Comentarios)!=0) {
echo("");
};
?>
|
}?>
|
|
if($_POST["Alias"]!="") {
$consultaG = "INSERT Tbl_Comentarios (IdDiario, Fecha, Alias, Comentario) VALUES (".$_POST["Valor"].", NOW(), '".$_POST["Alias"]."', '".$_POST["Comentario"]."')";
$resultadoG = mysql_query($consultaG);
}
if($_POST["Valor"]!="") {
$consulta = "SELECT * FROM Tbl_Diario WHERE IdDiario=".$_POST["Valor"];
} else {
$consulta = "SELECT * FROM Tbl_Diario WHERE 1 AND Visible=1 ORDER BY Fecha DESC";
}
$resultado = mysql_query($consulta);
$row = mysql_fetch_object($resultado);
?>
|
Posicion)>1) {?>
()
|
} else {?>
()
|
}?>
|
30-11-1999 |
|
Autor: |
$consulta2 = "SELECT COUNT(*) as Comentarios FROM Tbl_Comentarios WHERE IdDiario=".$row->IdDiario;
$resultado2 = mysql_query($consulta2);
$row2 = mysql_fetch_object($resultado2);
?>
echo($row2->Comentarios." Comentario(s)");
?>
|
}?>
|