テスト中です。

お名前:

E-mail:

HomePage:

削除キー:

題目:

題目色:    

コメント:

タグ有効

添付画像:

  \n"; print "\n"; } else { print " \n"; } ?>

\\1\\2",$link); return $link; } //===============データの書き込み================= if($action == "regist"){ if(($name != "") && ($comment != "")){ $code = time(); //アクセス時の秒数 //ホスト名を取得 $host = getenv("REMOTE_HOST"); $addr = getenv("REMOTE_ADDR"); if($host == "" || $host == $addr){ $host = gethostbyaddr($addr); } //訪問者のブラウザを取得 $agent = getenv("HTTP_USER_AGENT"); //ここから書き込みデータの調整 $name = htmlspecialchars($name); //特殊文字のHTMLエントリへの変換 $email = htmlspecialchars($email); $hp = htmlspecialchars($hp); $subject = htmlspecialchars($subject); if(!$tag){ $comment = htmlspecialchars($comment); } $comment = nl2br($comment); //HTML改行文字の挿入 $comment = str_replace("\r", "", $comment); //文字列の置換 $comment = str_replace("\n", "", $comment); //ログファイルの区切文字(",")と区別するために文字コード(,)に書き換える。 $ress = str_replace(",", ",",$ress); $name = str_replace(",", ",",$name); $email = str_replace(",", ",",$email); $hp = str_replace(",", ",",$hp); $subject = str_replace(",", ",",$subject); $comment = str_replace(",", ",",$comment); //インラインリンクを実現(URLのみ) $comment = inline_link($comment); $message = file($data_file); //画像のアップロード処理 if(is_uploaded_file($upfile)){ $imagesize = getimagesize($upfile); //画像の属性を取得 switch($imagesize[2]){ case 1: $out = $code . ".gif"; break; case 2: $out = $code . ".jpg"; break; case 3: $out = $code . ".png"; break; default: unlink($upfile); } if($out){ $sendpath = $path.$out; if(move_uploaded_file($upfile, $sendpath)){ $fname = $out; } } } //ログファイルの区切文字(",")と区別するために文字コード(,)に書き換え。 $fname = str_replace(",", ",",$fname); //配列要素を文字列により連結 $input_msg = implode(",", array($code,$ress,$name,$email,$hp,$subject,$scolor,$comment,$fname,$pass,$now,$host,$agent)); $fp = fopen($data_file, "w"); rewind($fp); fputs($fp, "$input_msg\n"); //最大記録数の調整 if(($data_max * 1.2) < sizeof($message)){ $msg_num = $data_max - 1; }else{ $msg_num = sizeof($message); } for($i = 0; $i < $msg_num; $i++){ fputs($fp, $message[$i]); } fclose($fp); unset($message); echo "\n"; } } //親記事だけを配列に抜き出す $message = file($data_file); for($i=0; $i= $end_data) $page_end = $end_data; for($i=$p_line; $i<=$page_end; $i++){ list($code2,$ress2,$name2,$email2,$hp2,$subject2,$scolor2,$comment2,$fname2,$pass2,$now2,$host2,$agent2) = split(",", $PARENT[$i]); //親記事の表示 echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "$subject2\n"; if($email2 != ""){ echo " $name2\n"; }else{ echo " $name2\n"; } if($hp2 != ""){ echo " \n"; } echo " $now2\n"; echo "\n"; echo "削除キー:\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "
\n"; if($fname2 && file_exists("$path$fname2")){ $size = getimagesize("$path$fname2"); $img_w=$size[0]; $img_h=$size[1]; if($img_w > $w_max || $img_h > $h_max){ $w_ritu = $w_max / $img_w; $h_ritu = $h_max / $img_h; ($w_ritu < $h_ritu) ? $key = $w_ritu : $key = $h_ritu; $width = (int) $img_w * $key; $height = (int) $img_h * $key; echo ""; }else{ echo ""; } } echo "$comment2\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "[$host2] $agent2\n"; echo "
\n"; //返信記事の表示 if($hensin_order){ $max_data = count($message) - 1; for($j=$max_data; $j>=0; $j--){ list($code3,$ress3,$name3,$email3,$hp3,$subject3,$scolor3,$comment3,$fname3,$pass3,$now3,$host3,$agent3) = split(",", $message[$j]); if ($code2 == $ress3) { echo "
\n"; echo "
\n"; echo "\n"; echo "RE:$subject3\n"; if ($email3 != "") { echo " $name3\n"; }else{ echo " $name3\n"; } if($hp3 != ""){ echo " \n"; } echo " $now3\n"; echo "\n"; echo "削除キー:\n"; echo "
\n"; echo "\n"; echo "
\n"; if($fname3 && file_exists("$path$fname3")){ $size = getimagesize("$path$fname3"); $img_w=$size[0]; $img_h=$size[1]; if($img_w > $w_max || $img_h > $h_max){ $w_ritu = $w_max / $img_w; $h_ritu = $h_max / $img_h; ($w_ritu < $h_ritu) ? $key = $w_ritu : $key = $h_ritu; $width = (int) $img_w * $key; $height = (int) $img_h * $key; echo ""; }else{ echo ""; } } echo "$comment3\n"; echo "
\n"; echo "[$host3] $agent3
\n"; echo "
\n"; } } }else{ for($j=0; $j\n"; echo "
\n"; echo "\n"; echo "RE:$subject3\n"; if ($email3 != "") { echo " $name3\n"; }else{ echo " $name3\n"; } if($hp3 != ""){ echo " \n"; } echo " $now3\n"; echo "\n"; echo "削除キー:\n"; echo "
\n"; echo "\n"; echo "
\n"; if($fname3 && file_exists("$path$fname3")){ $size = getimagesize("$path$fname3"); $img_w=$size[0]; $img_h=$size[1]; if($img_w > $w_max || $img_h > $h_max){ $w_ritu = $w_max / $img_w; $h_ritu = $h_max / $img_h; ($w_ritu < $h_ritu) ? $key = $w_ritu : $key = $h_ritu; $width = (int) $img_w * $key; $height = (int) $img_h * $key; echo ""; }else{ echo ""; } } echo "$comment3\n"; echo "
\n"; echo "[$host3] $agent3
\n"; echo "
\n"; } } } echo "

\n"; } unset($message); ?>

= $page_view){ $page_count = floor($page_end / $page_view); $prev_line = ($page_count - 1) * $page_view; echo "
\n"; echo "\n"; echo "\n"; echo "
\n"; }else{ echo " \n"; } ?>

\n"; echo "\n"; echo "\n"; echo "\n"; }else{ echo " \n"; } ?>

Powered by KOMONET