Example #1
0
<?php

include_once 'functions.php';
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHP Event Calendar by CodexWorld</title>
<link type="text/css" rel="stylesheet" href="style.css"/>
<script src="jquery.min.js"></script>
</head>
<body>

<div id="calendar_div">
	<?php 
echo getCalender();
?>
</div>

</body>
</html>
    echo monthBack($date);
    ?>
" class="last">&laquo;</a> 
        <span><a title="<?php 
    echo 'Termine ' . $htext;
    ?>
" href="<?php 
    echo $linkname_tl . '&amp;start=' . date('Y-m', $date) . '-01';
    ?>
"><?php 
    echo $htext;
    ?>
</a></span>
        <a href="?timestamp=<?php 
    echo monthForward($date);
    ?>
" class="next">&raquo;</a>
        <a href="?timestamp=<?php 
    echo yearForward($date);
    ?>
" class="next">&raquo;</a>
        <div class="clear"></div>  
    </div>
    <?php 
    getCalender($date, $headline, $event, $datum_stamp);
    ?>
    <div class="clear"></div>
</div>
</center>
<?php 
}
Example #3
0
<?php

/*
 * Function requested by Ajax
 */
if (isset($_POST['func']) && !empty($_POST['func'])) {
    switch ($_POST['func']) {
        case 'getCalender':
            getCalender($_POST['year'], $_POST['month']);
            break;
        case 'getEvents':
            getEvents($_POST['date']);
            break;
        default:
            break;
    }
}
/*
 * Get calendar full HTML
 */
function getCalender($year = '', $month = '')
{
    $dateYear = $year != '' ? $year : date("Y");
    $dateMonth = $month != '' ? $month : date("m");
    $date = $dateYear . '-' . $dateMonth . '-01';
    $currentMonthFirstDay = date("N", strtotime($date));
    $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN, $dateMonth, $dateYear);
    $totalDaysOfMonthDisplay = $currentMonthFirstDay == 7 ? $totalDaysOfMonth : $totalDaysOfMonth + $currentMonthFirstDay;
    $boxDisplay = $totalDaysOfMonthDisplay <= 35 ? 35 : 42;
    ?>
	<div id="calender_section">