<select name="id_item">
<option value="1">Property 1</option>
<option value="2">Property 2</option>
<option value="3">Property 3</option>
etc.
</select>
<a href="calendar.php?id_item=2">check availability</a>
ALTER TABLE `calendar_table` ADD `comments` VARCHAR( 255 ) NOT NULL
$sql="ALTER TABLE `".T_BOOKINGS."` ADD `comments` VARCHAR( 255 ) NOT NULL";
mysql_query($sql) or die("error");
date_comments=document.getElementById('date_comment').value;
var the_url=update_url+"?id_item="+id_item+"&the_date="+the_date+"&special_state="+special_state+"&date_comments="+date_comments
, comments='".mysql_escape_string($_REQUEST["date_comments"])."'
$booked_days[$row["the_date"]]=$row["state"];
$booked_days[$row["the_date"]]=array("state"=>$row["state"],"comments"=>$row["comments"]);
if($booked_days[$this_date]=="am") $day_image='cal_am_'.$day_counter.'.png';
elseif($booked_days[$this_date]=="pm") $day_image='cal_pm_'.$day_counter.'.png';
if($booked_days[$this_date]["state"]=="am") $day_image='cal_am_'.$day_counter.'.png';
elseif($booked_days[$this_date]["state"]=="pm") $day_image='cal_pm_'.$day_counter.'.png';
$the_cal .= '
<td class="cal_data" '.$border.'>
'.$day_link_start.'
<span id="state_'.$this_date.'">
<img src="'.DIR_IMAGES.''.$day_image.'" alt="'.$lang["day_".$week_day.""].' '. $date_format.'" border="0" width="20px" height="20px">
</span>
'.$day_link_end.'
</td>
';
if($booked_days[$this_date]["comments"]!="") $date_title=$booked_days[$this_date]["comments"];
else $date_title=$lang["day_".$week_day.""].' '. $date_format;
$the_cal .= '
<td class="cal_data" '.$border.'>
'.$day_link_start.'
<span id="state_'.$this_date.'">
<img src="'.DIR_IMAGES.''.$day_image.'" alt="'.$lang["day_".$week_day.""].' '. $date_format.'" title="'.$date_title.'" border="0" width="20px" height="20px">
</span>
'.$day_link_end.'
</td>
';
Users browsing this forum: Bing [Bot] and 1 guest