最新情報


"4.1.0"){ //スーパーグローバル変数対応なら $path = dirname($_SERVER["PATH_TRANSLATED"]).$up_dir; $PHP_SELF = $_SERVER["PHP_SELF"]; //フォームデータの取得 $action = $_POST['action']; $code = $_POST['code']; $subject = $_POST['subject']; $msg = $_POST['msg']; $date = $_POST['date']; $button = $_POST['button']; $password = $_POST['password']; $e_code = $_POST['e_code']; $upfile = $_FILES['upfile']['tmp_name']; $upfile_name = $_FILES['upfile']['name']; $pline = $_POST['pline']; }else{ $path = dirname($PATH_TRANSLATED).$up_dir; } //===============インライン関数=================== function inline_link($link){ $link = ereg_replace("(https?|ftp|news)(://[[:alnum:]\+\$\;\?\.%,!#~*/:@&=_-]+)","\\1\\2",$link); return $link; } if($action == "regist"){ //処理の分岐 if($button == "修正/更新"){ //ここから書き込みデータの調整 $subject = htmlspecialchars($subject); if(!$tag_flag){ $msg = htmlspecialchars($msg); } //タグの調整 $msg = nl2br($msg); $msg = str_replace("\r", "", $msg); $msg = str_replace("\n", "", $msg); //ログファイルの区切文字(",")と区別するために文字コード(,)に書き換える。 $subject = str_replace(",", ",",$subject); $msg = str_replace(",", ",",$msg); //インラインリンクを実現(URLのみ) $msg = inline_link($msg); if($upfile){ $source = $upfile; $source_name = $upfile_name; $source_name = ereg_replace("^(.:.*\\\\)?(.*)", "\\2", $source_name); if(($source != "none")&&($source != "")){ $dest = $path.$source_name; $imagesize = getimagesize($source); if(($imagesize[0] > $w_limit) || ($imagesize[1] > $h_limit)){ $err_flag = 1; echo ""; exit; } if(copy($source,$dest)){ $imagesize = getimagesize($dest); switch($imagesize[2]){ case 0: unlink($dest); break; case 1: $out = $code.".gif"; rename($dest,$path.$out); break; case 2: $out = $code.".jpg"; rename($dest,$path.$out); break; case 3: $out = $code.".png"; rename($dest,$path.$out); break; } $fname = $out; //位置を変更 } } } $repdata = file($data_file); $fp = fopen($data_file, "w"); for($i=0; $i"; exit; }elseif($button == "削除"){ $deldata = file($data_file); $fp = fopen($data_file, "w"); for($i=0; $i $w_limit) || ($imagesize[1] > $h_limit)){ $err_flag = 1; }else{ if(copy($source,$dest)){ $imagesize = getimagesize($dest); switch($imagesize[2]){ case 0: unlink($dest); break; case 1: $out = $code.".gif"; rename($dest,$path.$out); break; case 2: $out = $code.".jpg"; rename($dest,$path.$out); break; case 3: $out = $code.".png"; rename($dest,$path.$out); break; } } } } $fname = $out; } //ログファイルの区切文字(",")と区別するために文字コード(,)に書き換える。 $fname = str_replace(",", ",",$fname); //配列要素を文字列により連結 $input_msg = implode(",", array($code,$subject,$msg,$fname,$date)); $message = file($data_file); $fp = fopen($data_file, "w"); rewind($fp); fputs($fp, "$input_msg\n"); //最大記録数の調整 if($data_max <= count($message)){ $msg_num = $data_max - 1; }else{ $msg_num = count($message); } for($i = 0; $i < $msg_num; $i++){ fputs($fp, $message[$i]); } fclose($fp); unset($message); } } }elseif(($action == "edit") && ($password == $passwd)){ $kanri_flag = 1; echo "
\n"; echo "

記事の並び:\n"; if($e_code < 1) { echo "\n"; echo "

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
日付:
題名:
コメント:
添付画像:
\n"; echo "
\n"; echo "書込の注意: ここで書き込みをする際には特殊文字や絵文字記号は使えません。ひらがなカタカナ及び第一水準の常用漢字と記号のみご使用ください。絵文字等を入力すると文字化けが発生します。\n"; }else{ $comdata = file($data_file); for($i=0; $i", "\n", $cmsg); $e_msg = strip_tags($e_msg); $e_date = $cdate; $e_fname = $cfname; break; } } unset($comdata); //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($err_flag){ echo $err_msg; echo "

<やり直す>\n"; exit; } $message = file($data_file); $msg_count = count($message); if($sort_flag){ $log_max = $msg_count - 1; for($i=$log_max; $i>=0; $i--){ $message2[] = $message[$i]; } } if($pline == ""){ $p_line = 0; }else{ $p_line = $pline; } $end_data = $msg_count - 1; $page_end = $p_line + ($page_view - 1); if($page_end >= $end_data) $page_end = $end_data; for($i = $p_line; $i <= $page_end; $i++){ if($sort_flag){ list($vcode,$vsubject,$vmsg,$vfname,$vdate) = split( ",", $message2[$i]); }else{ list($vcode,$vsubject,$vmsg,$vfname,$vdate) = split( ",", $message[$i]); } echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
$vsubject " . $vdate . "
\n"; if (($action == "edit") && ($password == $passwd)) { echo "\n"; } echo "
\n"; if($vfname && file_exists("$path$vfname")){ $size = getimagesize("$path$vfname"); $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 " $vmsg
"; } ?>
= $page_view){ $page_count = floor($page_end / $page_view); $prev_line = ($page_count - 1) * $page_view; echo "
\n"; if (($action == 'edit') && ($password == $passwd)){ echo "\n"; echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
\n"; }else{ echo " \n"; } ?>
\n"; if (($action == 'edit') && ($password == $passwd)){ echo "\n"; echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
\n"; }else{ echo " \n"; } ?>
  
 

伊達の野菜倶楽部 | 会社概要 | ご案内 | 商品案内 | 安心な加工技術 | お問い合わせ
 Copyright (C) 2010 伊達の野菜倶楽部  All Rights Reserved