Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/04/2006, 06:50
RJD
 
Fecha de Ingreso: enero-2006
Mensajes: 64
Antigüedad: 18 años, 3 meses
Puntos: 0
Quizas podria arreglarse aqui

Esta es una parte del script del calendario:

Cita:

if ( ( $cal_year == $now_year ) && ( $cal_month == $now_month ) )
$today_day = $now_day;
else
$today_day = 0;

$days_last_month = gmdate( "d", gmmktime(0,0,0,$cal_month,0,$cal_year ) );
$days_this_month = gmdate( "d", gmmktime(0,0,0,$cal_next_month, 0, $cal_next_year ) );

$first_day_this_month = gmmktime( "0","0","0",$cal_month, "1", $cal_year );
$l_tm = localtime( $first_day_this_month, 1);

// $posx = array();

// what's the weekday of the 1st day of this month?*/
$first_day_pos = $l_tm[ "tm_wday" ];


if ( $first_day_pos == 0 ) $first_day_pos = 7; // convert to Mo=1 to Su=7

$day_num = $days_last_month - ($first_day_pos-2); $class=' class="last_month"';

for ( $y=1; $y<=6; $y++ )
{
echo " <tr>\n";
for ( $x=1; $x<=7; $x++ )
{
if ( ($y==1) && ($x==$first_day_pos) )
{
$day_num = 1; $class="";
}

if ( ($y >1) && ($day_num==$days_this_month+1) )
{
$day_num = 1; $class=' class="next_month"';
}

if ( ($class=="") && ($day_num == $today_day) ) $id=' id="today"'; else $id="";
if ( ( $id!=' id="today"') && ($class=="") && ($day_num == $cal_day ) ) $id=' id="selected"';

if ( $class != "" )
{ $ap1 = ""; $ap2 = ""; }
else
{ $ap1 = '<a href="'.$calendar_open_url."?Y=$cal_year&m=$cal_mo nth&d=$day_num&$ox_tail".'" target="'.$calendar_open_target.'">'; $ap2 = '</a>'; }

if (($booked_events[$day_num] != 0) && $class=="")
echo ' <td'.$class.$id.'>'.$ap1.'<span class="reserved">'.$day_num.'</span>'.$ap2.'</td>'."\n";
else
echo ' <td'.$class.$id.'>'.$ap1.$day_num.$ap2.'</td>'."\n";

$day_num++;
}
echo " </tr>\n";
}

Yo creo que modificando algo de aqui podria arreglarse el problema.
Donde dice // what's the weekday of the 1st day of this month?*/
Solo habria que desplazar el primer dia del mes hacia la derecha. De esta forma todo encajaría.

Alguien sabe como se puede hacer eso??

Muchas gracias
Saludos cordiales