Hello,
I'm trying to retro-fit this lovely script to an existing site.
The holiday cottage site, runs its bookings Fri-Fri.... is there an easy'ish way of getting your script to generate calenders Fri - Thurs?
Ta muchly
Geoff
if(CAL_START_DAY=="sun"){
//$cal_row_counter=0;
for($k=0; $k<7; $k++){
$weekday = substr($lang["days"][$k],0,1);
$the_cal.='<td class="cal_title" width="'.$td_width.'"> '.$weekday.'</td>';
}
}else{
//$cal_row_counter=1;
if ($first_week_day == 0) $first_week_day =7;
for($k=1; $k<=7; $k++){
if($k==7) $weekday = substr($lang["days"][0],0,1);
else $weekday = substr($lang["days"][$k],0,1);
$the_cal.='<td class="cal_title" width="'.$td_width.'"> '.$weekday.'</td>';
}
}
// friday start
$d=5; # Friday is number 5
for($k=1; $k<=7; $k++){
$the_cal.='<td class="cal_title" width="'.$td_width.'"> '.substr($lang["days"][$d],0,1).'</td>';
++$d;
$d %= 7; # reset to 0
}
if(CAL_START_DAY=="sun") $first_week_day_start = $first_week_day; # start sunday
else $first_week_day = $first_week_day-1; # current version starts monday
$first_week_day = $first_week_day+1;
$first_week_day = $first_week_day+2;
if($first_week_day!=7){
for($week_day = 0; $week_day < $first_week_day; $week_day++){
$the_cal.='<td class="cal_empty">'.$cal_no_day.'</td>';
$j++;
}
}
if($first_week_day<6){
for($week_day = 0; $week_day <= $first_week_day; $week_day++){
$the_cal.='<td class="cal_empty">'.$cal_no_day.'</td>';
$j++;
}
}
The following words in your search query were ignored because they are too common words: changing start day the.
You must specify at least one word to search for. Each word must consist of at least 3 characters and must not contain more than 14 characters excluding wildcards.
Users browsing this forum: No registered users and 2 guests