Location: PHPKode > projects > Wombat Open Source > wombat/calendar/gotoweek_hour.php
<?
/* 
		WOMBAT Open Source
		Small business simple project management and customer relation management tool.

		Version		:
		Last Update	:

		Copyright (C) 2001-2003 Outdare Internet Service B.V.

		Wombat 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.

		Wombat 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.
		(LICENSE file)

		You should have received a copy of the GNU General Public License 
		along with this program; if not, write to :

		Free Software Foundation, Inc., 
		59 Temple Place, Suite 330,
		Boston, MA 02111-1307 USA

		File Description : Delete Client .
					
*/
include("../inc/local.inc.php");
include("../inc/wombat.inc.php");


$goto_week = $_POST['goto_week'];
$goto_year = $_POST['goto_year'];
$firstday = getdate(mktime(0,0,0,1,1,$goto_year));
$firstdayw = $firstday['wday'];
if($firstdayw == 0)
		$firstdayw = 7;
$firstparamday = 32 - $firstdayw;
if($firstparamday < 32)
{
  $firstparamyear = $goto_year - 1;
  $firstparammonth = 12;
}
else 
{
  $firstparamday = 1;
  $firstparamyear = $goto_year;
  $firstparammonth = 1;
}
$firstparam = mktime(12,0,0,$firstparammonth,$firstparamday,$firstparamyear);


$diff = ceil($goto_week*(3600*24*7));

$curday = $diff + $firstparam;


$gotoday = date("d",$curday);
$gotomon = date("n",$curday);
$gotoyear = date("Y",$curday);


header("location:weekindex.php?day=$gotoday&&month=$gotomon&&year=$gotoyear"); 

?>
Return current item: Wombat Open Source