コード例 #1
0
        $cal->tpl['dayNoEvent'] = file_get_contents($basePath . 'templates/default/dayNoEvent.tpl');
        $cal->tpl['dayWithEvent'] = file_get_contents($basePath . 'templates/default/dayWithEvent.tpl');
        $cal->tpl['eachEvent'] = file_get_contents($basePath . 'templates/default/eachEvent.tpl');
        $cal->tpl['notInMonth'] = file_get_contents($basePath . 'templates/default/notInMonth.tpl');
    }
    if ($cal_dates) {
        foreach ($cal_dates as $date) {
            if ($date['status'] != "canceled" && $date['startMonth'] == $month && strlen(trim($date['sortDate'])) > 0) {
                $cal->addEvent($date['startDay'], $date);
            }
        }
        #echo '<pre>';
        #print_r($cal_dates);
        #echo '</pre>';
    }
    $output = $cal->display();
}
/* End of Calendar Output */
/* Beginning of List Output */
if ($display == 'list') {
    $tpl['wrapper'] = file_get_contents($basePath . 'templates/' . $template . '/wrapper.tpl');
    $tpl['eachEvent'] = file_get_contents($basePath . 'templates/' . $template . '/eachEvent.tpl');
    $tpl['eachEventAlt'] = file_get_contents($basePath . 'templates/' . $template . '/eachEventAlt.tpl');
    if ($cal_dates) {
        $innerList = '';
        for ($i = 0; $i < $limit; $i++) {
            if ($cal_dates[$i]['startMonth'] == $month) {
                if ($i % 2) {
                    $eachEvent = $tpl['eachEvent'];
                } else {
                    $eachEvent = $tpl['eachEventAlt'];