#!/usr/local/bin/perl ##################################################################### # 初期設定 ##################################################################### require './pref.pl'; # ヘッダー外部ファイル $Css = <<'_END_OF_HTML_'; _END_OF_HTML_ # html出力ヘッダー $heaer = <<'_END_OF_HTML_';
無料相談会
HOME > 無料相談会
無料相談会受付中!【要予約】 毎週水曜日 00:00〜00:00 毎週土曜日 00:00〜00:00 場所 東京都渋谷区道玄坂1丁目19番2号 SPLINE 6F

お仕事が終わってから・土曜日に
マンション経営について、どんなことでもご相談できます。

マンション経営を始めたい

毎月安定した家賃収入を確保したい

マンション経営のリスク・メリット

資産の組み換え

自分に合ったプランを知りたい

相談会日程

_END_OF_HTML_ $footer = <<'_END_OF_HTML_';

お申し込みの方は、ご希望の日にちをクリックして下さい。

このページの上部へ
_END_OF_HTML_ ##################################################################### # 初期処理 ##################################################################### # 現在の日時を取得 ($second,$minute,$hour,$day,$month,$year)=localtime(); $year += 1900; $month += 1; $presetmonth = $month; $start_day = $day + $delay; # # html出力 # print "Content-type: text/html; charset=shift_jis\n\n"; print <<"EOL"; 無料相談会($year/$month)|株式会社グローバル・リンク・マネジメント Global Link Management $Css $heaer
EOL &calender; &calender; &calender; print <<"EOL";
$footer EOL exit; sub calender { # うるう年の判定(4の倍数ならうるう年、しかし100の倍数ならうるう年でない、また400の倍数ならうるう年) if( (($year%4 ==0)&&($year%100 != 0))||($year%400 == 0) ){ $days[1]=29; } # 月の初日の曜日(ツェラーの公式)、月の末日を取得 $start = wday($year,$month,1); $lastday=$days[$month-1]; # 予約開始日の翌月繰越 if ( $start_day > $lastday ){ $carry_over_delay = $start_day - $lastday; } # カレンダー表示 print "
\n"; print "\n"; print ""; print "\n"; # 月の初日の前まで、表のセルにスペース(改行)を入れる if($start!=0){ print ""; for($i=0;$i<$start;$i++){ print ""; $col++; } } # カレンダーのセルを作成 for($i=1;$i<=$lastday;$i++){ $css_day = ""; $flag_posiible = 0; $flag_close = 0; $temp_holiday = $month."-".$i; foreach(@holiday){ if($temp_holiday eq $_){$css_day .= "holiday";} } foreach(@Possible){ if($col == $_){ $flag_posiible = 1; if($css_day eq ""){ $css_day .= "possible";} else { $css_day .= " possible";} } } foreach(@close){ if($temp_holiday eq $_){$flag_close = 1;} } if($month == $presetmonth && $i == $day){ if($css_day eq ""){ $css_day .= "today";} else { $css_day .= " today";} } if ($col == 6){ if($css_day eq ""){ $css_day .= "saturday";} else { $css_day .= " saturday";} } if($col==0){ print ""; if($css_day eq ""){ $css_day .= "sunday";} else { $css_day .= " sunday";} } if($start_day > $i){ if($css_day ne ""){print "";} else{print "";} } elsif($flag_posiible == 1 && $flag_close == 0 && $carry_over_delay < $i){ if($css_day ne ""){print "";} else{print "";} } else{ if($css_day ne ""){print "";} else{print "";} } $col++; if($col>=7){ print "\n"; if ($i<$lastday) { $col=0; } } } for($i=$col;$i<7;$i++){ print ""; } print "
$year年$month月

$i$i$i$i

"; print "
\n"; # 来月のカレンダーを作成 if ($presetmonth != $month){$carry_over_delay = 0;} $col=0; $month++; $year = $year; if ($month == 13) { $month = 1; $year++; } $start_day = 1; } # end sub calender sub wday { my ($year,$month,$day)=@_; if($month<3){ $month += 12; $year--; } return ($year+int($year/4)-int($year/100)+int($year/400)+int((13*$month+8)/5)+$day)% 7; }