Location: PHPKode > projects > ARBS > arbs-1.5.1.78/trailer.inc.php
<?php
/*
 * ARBS - Advanced Resource Booking System
 * Copyright (C) 2005-2007 ITMC der TU Dortmund
 * Based on MRBS by Daniel Gardner <http://mrbs.sourceforge.net/>
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

/* DON'T REMOVE THESE LINE!!! */
/* It will be automatically changed by the Makefile! */
$version="1.5.1.78";

if ( $pview != 1 ) {

	echo "<style>";
	echo ".trail_td1{";
	echo "text-align:center; border-bottom-style:solid;border-bottom-width:1px;";
	echo "border-right-style:solid;border-right-width:1px";
	echo "}";
	echo ".trail_td2{";
	echo "border-left-style:solid;border-left-width:1px;";
	echo "border-top-style:solid;border-top-width:1px;";
	echo "text-align:center; border-bottom-style:solid;border-bottom-width:1px;";
	echo "border-right-style:solid;border-right-width:1px";
	echo "}";
	echo "</style>";
	echo "<br><br><table cellpadding='0' cellspacing='0' width='100%'>";
	echo "<tr><td class='trail_td2'><b>", _("Show day"), "</b></td>";
	if(!isset($year))
		$year = strftime("%Y");

	if(!isset($month))
		$month = strftime("%m");

	if(!isset($day))
		$day = strftime("%d");
	if (empty($area))
		$params = "";
	else
		$params = "&area=$area";

	if (!empty($room)) 
		$params .= "&room=$room";
	for($i = -5; $i <= 6; $i++){
		$ctime = mktime(0, 0, 0, $month, $day + $i, $year);
		$str = parseDate(strftime(empty($dateformat)? "%b %d" : "%d %b", $ctime));
		$cyear  = date("Y", $ctime);
		$cmonth = date("m", $ctime);
		$cday   = date("d", $ctime);
		echo "<td class='trail_td1' style='border-top-style:solid;border-top-width:1px;'><a href=\"day.php?year=$cyear&month=$cmonth&day=$cday$params\">$str</a></td>\n";
	}
	echo "</tr><tr><td class='trail_td1' style='border-left-style:solid;border-left-width:1px;'><b>", _("Show week"), "</b></td>";

	$ctime = mktime(0, 0, 0, $month, $day, $year);
# How many days to skip back to first day of week:
	$skipback = (date("w", $ctime) - $weekstarts + 7) % 7;
	
	for ($i = -5; $i <= 6; $i++){
		$ctime = mktime(0, 0, 0, $month, $day + 7 * $i - $skipback, $year);
		$str = parseDate(strftime(empty($dateformat)? "%b %d" : "%d %b", $ctime));
		$cday   = date("d", $ctime);
		$cmonth = date("m", $ctime);
		$cyear  = date("Y", $ctime);
		echo "<td class='trail_td1'><a href=\"week.php?year=$cyear&month=$cmonth&day=$cday$params\">$str</a></td>\n";
	}
	echo "<tr><td class='trail_td1' style='border-left-style:solid;border-left-width:1px;'><b>", _("Show month"), "</b></td>";
	for ($i = -3; $i <= 8; $i++){
		$ctime = mktime(0, 0, 0, $month + $i, 1, $year);
		$str = parseDate(strftime("%b %Y", $ctime));
		$str = ereg_replace(" ","&#160;",$str);
		$cmonth = date("m", $ctime);
		$cyear  = date("Y", $ctime);
		echo "<td class='trail_td1'><a href=\"week.php?day=1&year=$cyear&month=$cmonth$params\">$str</a></td>\n";
	}
	echo "</tr></table>";
}
?>
<div style="margin-top: 50px; width: 100%; text-align: center; background-color: #c0e0ff; border: 1px solid #5b69a6;">
  <?php 
  	if ($version!="unknown") printf(_("This page was created by ARBS Version %s, a free software under the GPL license."), $version);
  	else echo _("This page was created by ARBS, a free software under the GPL license.");
  ?>
  <br><a href="http://sourceforge.net/projects/arbs/"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=205347&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
</div>
</BODY>
</HTML>
Return current item: ARBS