Location: PHPKode > projects > JaxBlog > JaxBlog/module/JaxCalendar/example.php
<?php

$request = isset($_GET['request']) ? $_GET['request'] : '';
$test = isset($_GET['test']) ? $_GET['test'] : '';

if ($request == 'xml') {
	$year = $_GET['year'];
	$month = $_GET['month'];
	
	header('Content-Type: text/xml');
	
	sleep(1);
	
	if ($year == date('Y') && $month == date('m')) {
		echo "<root>\n";
		echo "  <record>\n";
		echo "    <day>4</day>\n";
		echo "    <title>First Test Message</title>\n";
		echo "    <description>First Test Message</description>\n";
		echo "  </record>\n";
		echo "  <record>\n";
		echo "    <day>4</day>\n";
		echo "    <title>Another Test Message</title>\n";
		echo "    <description>Another Day 4 Test Message, this one a bit longer so we can see if we trigger the scrollbar.  Let's hope I do soon, 'cuz writing out this message is getting awfully tedious, and my brain hurts already from trying to position the exit 'X' so it align to the right side, which just ain't happening.</description>\n";
		echo "  </record>\n";
		echo "  <record>\n";
		echo "    <day>21</day>\n";
		echo "    <title>Second Test Message</title>\n";
		echo "    <description>Second Test Message</description>\n";
		echo "  </record>\n";
		echo "  <record>\n";
		echo "    <day>24</day>\n";
		echo "    <title>Third</title>\n";
		echo "    <description>Third Test Message</description>\n";
		echo "  </record>\n";
		echo "  <record>\n";
		echo "    <day>24</day>\n";
		echo "    <title>Fourth</title>\n";
		echo "    <description>Fourth Test Message</description>\n";
		echo "  </record>\n";
		echo "</root>\n";
		
	} else {
		echo "<root></root>\n";
	}
	exit;
}

if ($test == 'test_empty') {
	$onload = 'example.php?request=xml&test=test_empty';
} else {
	$onload = 'example.php?request=xml';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link type="text/css" rel="stylesheet" href="jax-calendar.css">
<script type="text/javascript" src="../common/jax-xmlhttprequest.js"></script>
<script type="text/javascript" src="../common/jax-common.js"></script>
<script type="text/javascript" src="../common/jax-effect.js"></script>
<script type="text/javascript" src="jax-calendar.js"></script>
</head>

<body onLoad="jaxCalendarRegister('example.php?request=xml', 'example');">

<div class="example_indent">
	<div id="example"></div>
</div>

Click on a date to view an expanded description for that date.

</body>
</html>
Return current item: JaxBlog