- Code: Select all
draw_mycal()
Chris
draw_mycal()
<?php
/***********************************************/
/*
File: calendar.ajax.php
Author: cbolson.com
Script: availability calendar
Version: 3.02
Url: http://www.ajaxavailabilitycalendar.com
Date Created: 2009-07-29
Date Modified: 2010-01-30
Use: Called via ajax to draw calendar
Receives: $_REQUEST["id_item"] - id of the item
$_REQUEST["month"] - calendar month
$_REQUEST["year"] - calendar year
*/
/***********************************************/
// include common file for ajax settings
$the_file=dirname(__FILE__)."/ajax-common.inc.php";
if(!file_exists($the_file)) die("<b>".$the_file."</b> not found");
else require_once($the_file);
// define variables
$id_item = $_REQUEST["id_item"];
$the_month = $_REQUEST["month"];
$the_year = $_REQUEST["year"];
// required data
if($id_item=="") die("no item defined");
if($the_month=="") die("no month defined");
if($the_year=="") die("no year defined");
// create the calendar
if ($id_item ==0 )
echo draw_mycal($id_item,$the_month,$the_year);
else
echo draw_cal($id_item,$the_month,$the_year);
?>
if(AC_START_DAY=="sun"){
//$cal_row_counter=0;
for($k=0; $k<7; $k++){
$weekday = substr($lang["day_".$k.""],0,1);
$list_day_titles.='<li class="cal_weekday"> '.$weekday.'</li>';
}
}else{
for($k=0; $k<7; $k++){
for($k=0; $k<$days_in_this_month; $k++){
chris wrote:Take that back, it is working now.
However as far as I can tell it is just the default calendar installation. I can't see any sign of it having been modified.
What is it that you are stuck on?
Chris
f I understand the Cypriano's code correctly he creates a new way of drawing the calendar (called mycal ), and when the item is fixed to 0 it should choose mycall. right?
Users browsing this forum: No registered users and 2 guests