1 こんにちは このコードは、ユーザーがカレンダーを開いた時点で現在の日付から年 + 1 年だけを表示しますが、年 + 2、年 + 3... カレンダーを取得するにはどのようなコードが必要ですか? 親ファイルと子ファイルのコードも必要かどうかを指定してください
<?php
include ("access.php");
include ("header.php");
include("../includes/conf.class.php");
include("../includes/admin.class.php");
date_default_timezone_set($bsiCore->config['conf_hotel_timezone']);
$monthNames = array(
"January" => 1,
"February" => 2,
"March" => 3,
"April" => 4,
"May" => 5,
"June" => 6,
"July" => 7,
"August" => 8,
"September" => 9,
"October" => 10,
"November" => 11,
"December" => 12
);
if (!isset($_REQUEST["year"])) $_REQUEST["year"] = 2012;
$time = time();
$today = date("Y/n/j", $time);
$current_month = date("n", $time);
$current_year = date("Y", $time);
$cMonth = 1;
$cYear = $_REQUEST["year"];
$prev_year = $cYear;
$next_year = $cYear;
$prev_month = $cMonth-1;
$next_month = $cMonth+1;
if ($prev_month == 0 ) {
$prev_month = 12;
$prev_year = $cYear - 1;
}
if ($next_month == 13 ) {
$next_month = 1;
$next_year = $cYear + 1;
}
?>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#year').change(function(){
window.location = 'calendar_view.php?year='+$('#year').val();
});
$('#roomtype').change(function(){
if($('#roomtype').val() != 0){
capacityConmboShow();
$('#submitButton').show();
}else{
$('#submitButton').hide();
}
});