$stopf_msg
\n";*/ $fp = fopen("$TMP_DIR/NIGHTF","r"); $nightf_msg = ""; while (!feof($fp)){ $nightf_msg = fgets($fp,10000); } fclose($fp); /*echo "
$nightf_msg
\n";*/ $fp = fopen("$TMP_DIR/HOLIDAYF","r"); $holidayf_msg = ""; while (!feof($fp)){ $holidayf_msg = fgets($fp,10000); } fclose($fp); /*echo "
$holidayf_msg
\n";*/ /* stopf */ if ($stopf_msg!=""){ $i=0; $string = $stopf_msg; $tok= strtok($string,":"); while($tok!=""){ $i++; $stopf[$i]=$tok; $tok = strtok(":"); } } else { $i=0; while ($i<14){ $i++; $stopf[$i]=""; } } /* holidayf */ if ($holidayf_msg!=""){ $i=0; $string = $holidayf_msg; $tok= strtok($string,":"); while($tok!=""){ $i++; $holidayf[$i]=$tok; $tok = strtok(":"); } /*echo "
i=$i
\n";*/ } else { $i=0; while ($i<14){ $i++; $holidayf[$i]=""; } } /* nightf */ if ($nightf_msg!=""){ $i=0; $string = $nightf_msg; $tok= strtok($string,":"); while($tok!=""){ $i++; $nightf[$i]=$tok; $tok = strtok(":"); } /* echo "
i=$i
\n";*/ } else { $i=0; while ($i<14){ $i++; $nightf[$i]=""; } } $fp = fopen("$TMP_DIR/HOLIDAY","r"); $holidy_msg = ""; while (!feof($fp)){ $holiday_msg = fgets($fp,10000); } fclose($fp); /* holiday */ if ($holiday_msg!=""){ $i=0; $string = $holiday_msg; $tok= strtok($string,","); while($tok!=""){ $i++; $holiday[$i]=$tok; if($holiday[$i]=="00"){ $holiday[$i]=""; } $tok = strtok(","); } } else { $i=0; while ($i<14){ $i++; $holiday[$i]=""; } } /*当日日付曜日取得*/ /* 登録日付取得 */ $d0=DATE("YmdHis"); $YEAR=substr($d0,0,4); $MONTH=substr($d0,4,2); $DAY=substr($d0,6,2); $HOUR=substr($d0,8,2); $MIN=substr($d0,10,2); $SEC=substr($d0,12,2); /* 曜日文字列作成 */ /* $d0=DATE("Ymd");*/ $d0=DATE("YmdHis"); $d1=substr($d0,0,4); $d11=substr($d0,2,2); $d2=substr($d0,4,2); $d3=substr($d0,6,2); $d4=substr($d0,8,2); $d5=substr($d0,10,2); /*検索日付生成*/ $wtime=MkTime(0,0,0,$d2,$d3,$d1); /*$keytime=$wtime - $nissu1;*/ $keytime = $wtime; $datekey = DATE("D",$keytime); /*echo "WeekDAY:",$datekey,"

\n";*/ if ($datekey == "Mon") { $jwdate="(月)";} if ($datekey == "Tue") { $jwdate="(火)";} if ($datekey == "Wed") { $jwdate="(水)";} if ($datekey == "Thu") { $jwdate="(木)";} if ($datekey == "Fri") { $jwdate="(金)";} if ($datekey == "Sat") { $jwdate="(土)";} if ($datekey == "Sun") { $jwdate="(日)";} $gf = 0; if($holidayf[5]=="1" && ($datekey=="Sat" || $datekey=="Sun")){ $gf=2; } /*if($holidayf[5]=="1" && (strstr($DAY,$holiday[$MONTH])){*/ if(($holidayf[5]=="1") && (strpos($holiday[$WM],$DAY)!="")){ $gf=2; } $WHOUR = $HOUR.$MIN; if($nightf[5]=="1" && ($WHOUR > "1700" || $WHOUR < "0830")){ $gf=2; } if($stopf[5]=="1"){ $gf=1; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "

\n"; echo "\n"; echo "
\n"; echo "【一般国道157号 金沢市武蔵ケ辻(静止画:10秒間隔)】\n"; echo "
\n"; echo "\n"; echo "\n"; echo "
\n"; if ($gf == 0){ echo "\n"; } else { if ($gf == 1){ echo "\n"; } else { echo "\n"; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
【標準画面へ】
\n"; echo "
\n"; if ($gf == 0){ echo "\n"; } echo "\n"; echo "\n"; ?>