Rates

$date = $_REQUEST['check_in'];
list($year ,$month, $day ) = split('[-.-]', $date);
$date2 = $_REQUEST['check_out'];
list($year2, $month2, $day2 ) = split('[-.-]', $date2);
$monthi=(int)$month;
$day_in = (int)$day;
$day_out=(int)$day2;
$year_full=(int)$year;
if($day_in>$day_out)
{
if($monthi==1)
{
$monthend= 31 – $day_in;
}
else if($monthi==2)
{

if(($yeari % 4 )== 0)
{
if(($yeari % 100)==0)
{
$monthend= 28 – $day_in;
}
else
{
$monthend= 29 – $day_in;
}
}
else
{
$monthend= 29 – $day_in;
}
}
else if($monthi==3)
{
$monthend= 31 – $day_in;

}
else if($monthi==4)
{
$monthend= 30 – $day_in;

}
else if($monthi==5)
{
$monthend= 31 – $day_in;

}
else if($monthi==6)
{
$monthend= 30 – $day_in;

}
else if($monthi==7)
{
$monthend= 31 – $day_in;

}
else if($monthi==8)
{
$monthend= 31 – $day_in;

}
else if($monthi==9)
{
$monthend= 30 – $day_in;

}
else if($monthi==10)
{
$monthend= 31 – $day_in;

}
else if($monthi==11)
{
$monthend= 30 – $day_in;

}
else
{
$monthend= 31 – $day_in;
}
$day_out=$day_out+$monthend;
}
else
{

$day_out=($day_out)-($day_in);

}

?>