=0;$i=$i-1) { $eachfile = file("logs/logshow$i.log"); foreach ($eachfile as $line) { $line2 = split( ',' , "$line" ); if (($line2[0] <= $lid and $line2[9] == $hyouji) or $line2[0] == $lid) { $file[$j] = $line; $j++; } } if ($j > 1) { $tsugiari = 'tsugiari'; break; } } $line2 = split( ',' , "$file[1]" ); $nextid = $line2[0]; if ($lid != $maxid) { $num = 0; $j = 0; for ($i=$fid;$i<=$maxfid;$i++) { $eachfile = file("logs/logshow$i.log"); $eachfile = array_reverse($eachfile); foreach ($eachfile as $line) { $line2 = split( ',' , "$line" ); if ($line2[0] > $lid and $line2[9] == $hyouji) { $filemae[$j] = $line; //print $line; //print $line2[0]; //print $line2[9]; //print "
"; $j++; } } if ($j > 0) { break; } } $maeari = 'maeari'; $line2 = split( ',' , "$filemae[0]" ); $maeid = $line2[0]; } foreach ($file as $line) { //$line = mb_convert_encoding($line, "SJIS", "UTF-8"); $line2 = split( ',' , "$line" ); if ($line2[0] == $lid) { break; } } $checkurl = $line2[5]; $checkurl2 = split('http',$checkurl); foreach ($checkurl2 as $line) { $line3 = split(' ',$line); $line3 = split(' ',$line3[0]); $line3 = split("\n",$line3[0]); $line3 = split("
",$line3[0]); $maeword = "http$line3[0]"; if ($maeword != 'http') { $atoword = "$maeword"; $line2[5] = str_replace( "$maeword", "$atoword" , $line2[5]); } } if ($line2[0] != $lid) { print 'error'; exit; } if ($line2[9] == '非表示' and $t != 1) { print 'error'; exit; } if ($line2[2] < 10) { $line2[2] = "0$line2[2]"; } if ($line2[3] < 10) { $line2[3] = "0$line2[3]"; } $gazouwidth = ' width = 0'; if ($line2[6] != '') { $userfilename = $line2[6]; $userfilenamesplit = split("\.","$userfilename"); if ($userfilenamesplit[1] == 'pdf' or $userfilenamesplit[1] == 'PDF') { if ($line2[10] != '') { $pdflink1 = "$line2[10]"; } else { $pdflink1 = "PDF"; } $gazoulink1 = ""; } elseif ($userfilenamesplit[1] == 'jpg' or $userfilenamesplit[1] == 'JPG') { //$gazoulink1 = ""; if ($line2[10] != '') { $gazoulink1 = "
$line2[10]
"; } else { $gazoulink1 = ""; } $pdflink1 = ""; $gazouwidth = ' width = 300'; } elseif ($userfilenamesplit[1] == 'gif' or $userfilenamesplit[1] == 'GIF') { //$gazoulink1 = ""; //$gazoulink1 = ""; if ($line2[10] != '') { $gazoulink1 = "
$line2[10]
"; } else { $gazoulink1 = ""; } $pdflink1 = ""; $gazouwidth = ' width = 300'; } else { $pdflink1 = ""; $gazoulink1 = ""; } } if ($line2[7] != '') { $userfilename = $line2[7]; $userfilenamesplit = split("\.","$userfilename"); if ($userfilenamesplit[1] == 'pdf' or $userfilenamesplit[1] == 'PDF') { //$pdflink2 = "
PDF
"; if ($line2[11] != '') { $pdflink2 = "$line2[11]"; } else { $pdflink2 = "PDF"; } $gazoulink2 = ""; } elseif ($userfilenamesplit[1] == 'jpg' or $userfilenamesplit[1] == 'JPG') { //$gazoulink2 = ""; if ($line2[11] != '') { $gazoulink2 = "
$line2[11]
"; } else { $gazoulink2 = ""; } $pdflink2 = ""; $gazouwidth = ' width = 300'; } elseif ($userfilenamesplit[1] == 'gif' or $userfilenamesplit[1] == 'GIF') { //$gazoulink2 = ""; //$gazoulink2 = ""; if ($line2[11] != '') { $gazoulink2 = "
$line2[11]
"; } else { $gazoulink2 = ""; } $pdflink2 = ""; $gazouwidth = ' width = 300'; } else { $gazoulink2 = ""; $pdflink2 = ""; } } if ($line2[8] != '') { $userfilename = $line2[8]; $userfilenamesplit = split("\.","$userfilename"); if ($userfilenamesplit[1] == 'pdf' or $userfilenamesplit[1] == 'PDF') { //$pdflink3 = "
PDF
"; if ($line2[12] != '') { $pdflink3 = "$line2[12]"; } else { $pdflink3 = "PDF"; } $gazoulink3 = ""; } elseif ($userfilenamesplit[1] == 'jpg' or $userfilenamesplit[1] == 'JPG') { //$gazoulink3 = ""; if ($line2[12] != '') { $gazoulink3 = "
$line2[12]
"; } else { $gazoulink3 = ""; } $pdflink3 = ""; $gazouwidth = ' width = 300'; } elseif ($userfilenamesplit[1] == 'gif' or $userfilenamesplit[1] == 'GIF') { //$gazoulink3 = ""; //$gazoulink3 = ""; if ($line2[12] != '') { $gazoulink3 = "
$line2[12]
"; } else { $gazoulink3 = ""; } $pdflink3 = ""; $gazouwidth = ' width = 300'; } else { $pdflink3 = ""; $gazoulink3 = ""; } } if ($maeari == 'maeari' and $maeid != '') { $before = "前へ"; } if ($tsugiari == 'tsugiari') { $next = "次へ"; } $tdgazoutd = <<$line2[1].$line2[2].$line2[3] $line2[13]更新
$line2[4]
$gazoulink1 $gazoulink2 $gazoulink3
$line2[5]
$pdflink1 $pdflink2 $pdflink3
EOD; if ($line2[13] != '') { header("HTTP/1.1 301 Moved Permanently"); header("Location: $line2[13]"); exit; } require "lib/template.php"; template("$line2[4]","$message"); ?>