Source for file 22.php
Documentation is available at 22.php
* Description: demonstrates using the Uri util
if (!@include 'Calendar/Calendar.php') {
define ('CALENDAR_ROOT', '../../');
require_once CALENDAR_ROOT. 'Month/Weekdays.php';
require_once CALENDAR_ROOT. 'Util/Uri.php';
if (!isset ($_GET['jahr'])) $_GET['jahr'] = date('Y');
if (!isset ($_GET['monat'])) $_GET['monat'] = date('m');
echo ( '<p>The current month is '
. $Calendar->thisMonth (). ' of year '. $Calendar->thisYear (). '</p>');
$Uri->setFragments ('jahr','monat');
echo "\"Vector\" URIs<pre>";
echo ( "This Uri:\t". htmlentities($Uri->this ($Calendar, 'month')). "\n" );
$Uri->separator = '/'; // Default is &
$Uri->scalar = true; // Omit variable names
echo "\"Scalar\" URIs<pre>";
echo ( "Previous Uri:\t". $Uri->prev($Calendar, 'month'). "\n" );
echo ( "This Uri:\t". $Uri->this ($Calendar, 'month'). "\n" );
echo ( "Next Uri:\t". $Uri->next($Calendar, 'month'). "\n" );
// Restore the vector URIs
$Uri->separator = '&';
<a href=" <?php echo ($_SERVER['PHP_SELF']. '?'. $Uri->prev($Calendar, 'month')); ?>">Prev</a> :
<a href=" <?php echo ($_SERVER['PHP_SELF']. '?'. $Uri->next($Calendar, 'month')); ?>">Next</a>
Documentation generated on Mon, 11 Mar 2019 15:37:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|