示例#1
0
            $m = $m2;
        }
    }
}
$objname = getParameter("objname");
$dp = getParameter("dp", "boolean");
$cobj = new tc_calendar("");
$cobj->setDate($sld, $slm, $sly);
$cobj->startDate($startDate);
$cobj->dsb_days = explode(",", $dsb_txt);
$cobj->time_allow1 = $time_allow1;
$cobj->time_allow2 = $time_allow2;
$cobj->setYearInterval($year_start, $year_end);
$cobj->setTimezone($timezone);
//set for further usage, nothing for now
$theme_path = $theme != "" ? $cobj->getThemePath($theme) : "";
if (!is_file($theme_path)) {
    $theme_path = "";
}
//check and show default calendar month and year on valid range of date_allow
if (!isset($_REQUEST["m"])) {
    if ($time_allow1 != "") {
        //get date of time allow1
        if ($cdate->validDate($time_allow1)) {
            //check valid if today is after date_allow1
            if (!$cdate->dateAfter($time_allow1, $today)) {
                //reset default calendar display
                $y = $cdate->getDate('Y', $time_allow1);
                $m = $cdate->getDate('m', $time_allow1);
            }
        }