ESTAES LA PARTE DE MI CODIGO QUE DEBE HACER LOQ LES DIGO, PORQUE LE PUSE ESO ECHO PARA PROBAR QUE ME IMPRIME Y CUNDO LE DOY ATRAS O ADELANTE ME PONE EL -1 SI ES ATRAS Y 1 SI ES SIGUIENTE
Código PHP:
function mostrar_calendario($mes,$ano){
//tomo el nombre del mes que hay que imprimir
$nombre_mes = dame_nombre_mes($mes);
//construyo la cabecera de la tabla
echo "<table width=190 cellspacing=3 cellpadding=0 border=0><tr><td colspan=7 align=center class=tit>";
echo "<table width=100% cellspacing=2 cellpadding=0 border=0><tr><td style=font-size:10pt;font-weight:bold;color:white>";
//calculo el mes y ano del mes anterior
$mes_anterior = $mes-1; //ESTO NO ME LO ESTA HACIENDO CUANDO LO SUBO A INTERNET
$ano_anterior = $ano;
if ($mes_anterior==0){
$ano_anterior--;
$mes_anterior=12;
}
echo "NOMBRE $nombre_mes<br>";
echo "MES $mes<br>";
echo "ANTERIOR $mes_anterior";
echo "<a style=color:#000000;text-decoration:none href=index.php?nuevo_mes=$mes_anterior&nuevo_ano=$ano_anterior><<</a></td>";
echo "<td align=center class=tit>$nombre_mes $ano</td>";
echo "<td align=left style=font-size:10pt;font-weight:bold;color:white>";
//calculo el mes y ano del mes siguiente
$mes_siguiente = $mes+1;//ESTO NO ME LO ESTA HACIENDO CUANDO LO SUBO A INTERNET
$ano_siguiente = $ano;
if ($mes_siguiente==13){
$ano_siguiente++;
$mes_siguiente=1;
}
echo "NOMBRE $nombre_mes<br>";
echo "MES $mes<br>";