Beispiel #1
0
            // Default action, view the calendar or event
            COM_setArgNames(array('eid', 'ts', 'range', 'cat'));
            $eid = COM_sanitizeID(COM_getArgument('eid'), false);
        }
        if (!empty($eid)) {
            USES_evlist_class_repeat();
            $Rep = new evRepeat($eid);
            $pagetitle = COM_stripslashes($Rep->Event->title);
            if ($view == 'print') {
                $template = 'event_print';
                $query = '';
            }
            $query = isset($_GET['query']) ? $_GET['query'] : '';
            $content .= $Rep->Detail('', $query, $template);
        } else {
            // Shouldn't be in this file without an event ID to display or edit
            echo COM_refresh(EVLIST_URL . '/index.php');
            exit;
        }
        break;
}
$display = EVLIST_siteHeader($pagetitle);
$display .= EVLIST_calHeader(date('Y'), date('m'), date('d'), 'detail', $cat_id, $cal_id);
if (!empty($msg)) {
    $display .= COM_startBlock($LANG_EVLIST['alert'], '', 'blockheader-message.thtml');
    $display .= $LANG_EVLIST['messages'][$msg];
    $display .= COM_endBlock('blockfooter-message.thtml');
}
$display .= $content;
$display .= EVLIST_siteFooter();
echo $display;
Beispiel #2
0
                // Next 1 month
                $block_title = $LANG_EVLIST['this_month_events'];
                break;
            default:
                // Upcoming events
                $range = 2;
            case 2:
                $block_title = $LANG_EVLIST['upcoming_events'];
                break;
        }
        if (!empty($category)) {
            $block_title .= ' / ' . $LANG_EVLIST['category'] . ': ' . $catname;
        }
        $content .= EVLIST_calHeader($year, $month, $day, 'list', $category, $calendar, $range);
        $content .= EVLIST_listview($range, $category, $calendar, $block_title);
        break;
    default:
        $content = EVLIST_view('', 0, 0, 0);
        break;
}
$display = EVLIST_siteHeader($LANG_EVLIST['pi_name']);
if (!empty($msg)) {
    //msg block
    $display .= COM_startBlock('', '', 'blockheader-message.thtml');
    $display .= $LANG_EVLIST['messages'][$msg];
    $display .= COM_endBlock('blockfooter-message.thtml');
}
$display .= $content;
$display .= EVLIST_siteFooter();
echo $display;
exit;