', '>', $param); //$param = str_replace('"', '"', $param); //$param = str_replace("'", '', $param); //$param = str_replace("\\", "", $param); //return $param; } //-------------------------------------------------------- // Mredirect_to // サリト�レ。シ・ク、リ・�タ・、・�ッ・ネ、ケ、�」 //-------------------------------------------------------- function Mredirect_to($page){ header("Location: $page"); exit; } //-------------------------------------------------------- // Mhtmlspecialchars // ・ケ・鬣テ・キ・螂ッ・ェ。シ・ネ、�キ。「HTML・ソ・ー、ッ・ェ。シ・ネ、ケ、� // キ�フ。「・タ・ヨ・�ッ・ェ。シ・ネ、マ・ィ・ケ・ア。シ・ラ、オ、��ャ・キ・ー・�マサト、�ホ、ヌ // SQLテ擎ユ。」 //-------------------------------------------------------- function Mhtmlspecialchars($param){ // $strVal = stripslashes($param); $strVal = htmlspecialchars($param); return $strVal; } //-------------------------------------------------------- // Mget_between // 、「、�クサ昀ヒ、マ、オ、゙、�ソハクサ昀霹タ、ケ、� //-------------------------------------------------------- function Mget_between($strTarget, $strStart, $strEnd){ $posStart = strpos($strTarget, $strStart); if($posStart === false){ return ""; } $posStart = $posStart + strlen($strStart); $posEnd = strpos($strTarget, $strEnd, $posStart); if($posEnd === false){ return ""; } $strlength = $posEnd - $posStart; if($strlength <= 0){ return ""; } $strRet = substr($strTarget, $posStart, $strlength); return $strRet; } //-------------------------------------------------------- // Mchk_null_validation // ハクサ昀ホカ�ホマ・チ・ァ・テ・ッ、ヤ、ヲ //-------------------------------------------------------- function Mchk_null_validation($indata, $message){ if(Mis_empty($indata) == 1){ return $message; }else{ return ''; } } //-------------------------------------------------------- // Mchk_len_validation // ハクサ昀ホ・ヌ。シ・ソトケニ�ホマ・チ・ァ・テ・ッ、ヤ、ヲ //-------------------------------------------------------- function Mchk_len_validation($indata, $len, $message){ if(strlen($indata) > $len){ return $message; }else{ return ''; } } //-------------------------------------------------------- // MMake_HiddenTag // HIDDEN・ソ・ー、クタョ、ケ、� //-------------------------------------------------------- function MMake_HiddenTag($name, $value){ return ' '; } // -------------------------------------------------------- // Mis_array_member // $findarrayヌロホヒ。「$testee、ャエ゙、゙、��ミ1、ヨ、ケ // -------------------------------------------------------- function Mis_array_member($testee, $findarray) { if(!is_array($findarray)) { // ヌロホヌ、マ、ハ、、セ�遉マFALSE return 0; } foreach($findarray as $private_key) { if($private_key == $testee) { return 1; } } return 0; } // -------------------------------------------------------- // Mshow_array // ヌロホホニ簣ニ、ュスミ、ケ。ハ・ヌ・ミ・テ・ーヘム。ヒ // -------------------------------------------------------- function Mshow_array($params) { $strRet = ''; foreach($params as $key => $val) { $strRet .= ''; $strRet .= ''; } $strRet .= '
' . $key . '' . $val . '
'; return $strRet; } // -------------------------------------------------------- // Mis_slash_trailded // ハクサ昀ャ・ケ・鬣テ・キ・螟ヌスェホサ、キシ熙、、�ォ、ノ、ヲ、ォ、ステヌ // -------------------------------------------------------- function Mis_slash_trailed($dir) { if(ereg('\/$', $dir)) { return 1; }else{ return 0; } } // -------------------------------------------------------- // Mslash_trailing // ハクサ昀ャ・ケ・鬣テ・キ・螟ヌスェホサ、キ、ニ、、、ハ、、セ�遉マ・ケ・鬣テ・キ・螟ノイテ // -------------------------------------------------------- function Mslash_trailing($dir) { if(Mis_slash_trailed($dir)) { return $dir; }else{ return $dir.'/'; } } // -------------------------------------------------------- // MStrong_Error // ・ィ・鬘シノスオュ、ホ、ソ、皃ホHTMLチ� // -------------------------------------------------------- function MStrong_Error($string_data) { $string_data = '' . $string_data . ''; return $string_data; } // -------------------------------------------------------- // Mget_extentions // コヌスェ・ヤ・�ェ・ノ、ホク螟ホハクサ昀ヤ・�ェ・ノ、ト、ュ、ヌシ霹タ // -------------------------------------------------------- function Mget_extentions($filename){ $tmpstr = split("\.", $filename); if(count($tmpstr) <= 1) { return ""; }else{ return '.'.$tmpstr[count($tmpstr) - 1]; } } // -------------------------------------------------------- // MSend_Mail // ・癸シ・�ロソョ。ハケンイスエリソヒ // -------------------------------------------------------- function MSend_Mail($wa_to, $wa_from, $wa_subject, $message, $lzh, $lzhname){ $m = new MMail(); // ナコノユ・ユ・。・、・�ャフオ、、セ�遉マノャヘラ、ハ、キ。」 if(Mis_empty($lzhname) != 1){ $m->hasAttachment(); } $list = array( array($wa_to, '') ); // ヒワハクヘム、ホ・ヌ。シ・ソ $text = $message; $m->from($wa_from, ''); $m->subject($wa_subject); // ツィサ�・筍シ・ノ、ネー网、。「・�シ・ラ、ホウー、ヌ、篁ス、、、゙、サ、」 $m->body($text); if(Mis_empty($lzhname) != 1){ $m->addAttachment($lzh, $lzhname, "application/octet-stream"); } for( $i=0;$iresetHeader(); $m->to($list[$i][0], $list[$i][1]); // $m->addHeader("Return-Path", "guchil@hotmail.com"); // 、ウ、ウ、ヌシツコン、ヒ・ム・、・ラ、ャ・ェ。シ・ラ・オ、�ニスュケ�、゙、�゙、ケ。」 // 。ハ、筅キ、ッ、マ mail エリソヒナマ、オ、��ヒ $m->send(); } } // -------------------------------------------------------- // MSend_Mail // ・癸シ・�ロソョ。ハケンイスエリソヒ // -------------------------------------------------------- function System_Error($msg){ $to = 'shinichi@guchil.com'; $from = 'webapp-shopping'; $sub = 'ERROR shopping'; $in_msg = $msg; $msg = date('Y/m/d H:i:s') . "\n" . $msg; $msg = $msg . "\n\n _SERVER"; foreach ($_SERVER as $key => $val){ $msg .= $key . " => " . $val . "\n"; } if(isset($_POST)){ $msg = $msg . "\n\n _POST"; foreach ($_POST as $key => $val){ $msg .= $key . " => " . $val . "\n"; } } if(isset($_GET)){ $msg = $msg . "\n\n _GET"; foreach ($_GET as $key => $val){ $msg .= $key . " => " . $val . "\n"; } } if(isset($_COOKIE)){ $msg = $msg . "\n\n _COOKIE"; foreach ($_COOKIE as $key => $val){ $msg .= $key . " => " . $val . "\n"; } } if(isset($_SESSION)){ $msg = $msg . "\n\n _SESSION"; foreach ($_SESSION as $key => $val){ $msg .= $key . " => " . $val . "\n"; } } MSend_Mail($to, $from, $sub, $msg, "", ""); // $outfile = Mreadin_file_S(); $outfile = 'Error

[#--MSG--]'; $outfile = str_replace('[#--MSG--]', $in_msg, $outfile); $outfile = str_replace('[#--ADMIN--]', SP_SYSTEM_WEBMASTER, $outfile); echo $outfile; exit; } // -------------------------------------------------------- // MCreateUniqFile // 、゙、タヘム、オ、�ニ、、、ハ、、・ユ・。・、・�セ、スフケ、�」 // $target_dir: コ鋿ョ、ケ、�ヌ・」・�ッ・ネ・� // $suffix: ・ユ・。・、・�セ、ホクヌト�衞�ハクサ昀� // -------------------------------------------------------- function MCreateUniqFile($target_dir, $suffix) { // サ�ケ�+・ォ・ヲ・ネ $time_str = date('Ymd_His_'); $cnt_str = 1; // ・ケ・鬣テ・キ・蟠ノヘ� if(!ereg('\/$', $target_dir)) { $target_dir = $target_dir . '/'; } $basefilename = $time_str.$cnt_str.$suffix; $testee = $target_dir.$basefilename; while(file_exists($testee)) { $basefilename = $time_str.$cnt_str.$suffix; $testee = $target_dir.$basefilename; } $fp = fopen($testee, "w"); if(!$fp) { return ""; }else{ fclose($fp); } return $basefilename; } ?> 。ラキチシー、マサネ、ィ、゙、サ、」 useMTA() ・皈ス・テ・ノ、ニ、ヨ、ネ。「・ム・、・ラ、ヌ MTA 、ネヘム、ケ、�隍ヲ、ヒ、ハ、熙゙、ケ。」 サネヘム、ケ、� MTA 、マ。「/usr/sbin/sendmail 、ヌ、ケ。」MTA() ・皈ス・テ・ノ、ヌサリト熙ヌ、ュ、゙、ケ。」 MTA() ・皈ス・テ・ノ、ホー惞ホ __from__ 、マ from() ・皈ス・テ・ノ、ヌタ゚ト熙キ、ソテヘ、ヒ。「 __to__ 、マ to() ・皈ス・テ・ノ、ヌタ゚ト熙キ、ソテヘ、ヒテヨ、ュエケ、ィ、鬢�゙、ケ。」 ツィサ�ヌロソョ・筍シ・ノ、ヌ、マ mail エリソマサネヘム、ヌ、ュ、゙、サ、」 。ヲ ナオキソナェ、ハヌロソョシ�� 。ハセハホャイトヌス、ハシ�遉マ [ ... ] 、ヌーマ、゚、゙、ケ。」。ヒ { // トフセ�ロソョ・筍シ・ノ ------------------------------------------ ///// ・皈筵熙ホセテネャツソ、、(・ェ・ヨ・ク・ァ・ッ・ネニ筅ヒチエ、ニ、ホ ///// ・ヌ。シ・ソ、ッ、盪�、�)。」シ�遉マ・鬣ユ。」 $m = new matsMail(); // ス酲ヤニアカ雍ヨ 、マ、ク、� [ $m->mta("/usr/sbin/sendmail -f '__from__' -- '__to__'"); ] [ $m->useMTA(); ] [ $m->hasAttachment(); ] // ス酲ヤニアカ雍ヨ 、ェ、�� // ス酲ヤニアカ雍ヨ 、マ、ク、� $m->to("hoge@hoge.com", "、ロ、イ、ロ、イ"); $m->from("foo@foo.com", "、ユ。シ"); $m->subject("my subject ニ�ワク�� OK"); [ $m->addHeader("X-COUNT", "1025"); ] [ $m->addAttachment($data, "filename.txt", "filetype"); ] $m->body($text); // ス酲ヤニアカ雍ヨ 、ェ、�� $m->send(); } { // ツィサ�ヌロソョ・筍シ・ノ ------------------------------------------ ///// ・皈筵�テネフ、ャセッ、ハ、、、ャ。「シ�遉ャキ隍゙、テ、ニ、、、�」 ///// ・リ・テ・タ、マ・皈筵熙ヒホッ、盪�、爨ャ。「ヒワハク。「ナコノユ・ユ・。・、・�マホッ、盪�、゙、コ。「 ///// 、ス、ホ、゙、゙・ム・、・ラキミヘウ、ヌ MTA 、ヒスュスミ、ケ。」 ///// セハホャイトヌス、ハシ�遉マ [ ... ] 、ヌーマ、゚、゙、ケ。」 $m = new matsMail(); // ス酲ヤニアカ雍ヨ 、マ、ク、� $m->immediate(); [ $m->hasAttachment(); ] [ $m->mta("/usr/sbin/sendmail -f '__from__' -- '__to__'"); ] [ $m->useMTA(); ] // ス酲ヤニアカ雍ヨ 、ェ、�� // ス酲ヤニアカ雍ヨ 、マ、ク、� $m->to("hoge@hoge.com", "、ロ、イ、ロ、イ"); $m->from("foo@foo.com", "、ユ。シ"); $m->subject("my subject ニ�ワク�� OK"); [ $m->addHeader("X-COUNT", "1025"); ] // ス酲ヤニアカ雍ヨ 、ェ、�� // 、ウ、ホ・皈ス・テ・ノ、ヌ・ム・、・ラ、ャウォ、ォ、�「・リ・テ・タチエ、ニ、ャ・ム・、・ラ、ヒスュスミ、オ、�� $m->closeHeader(); // body(), addAttachment() 、ホス酳ヨクキシ鬘」 $m->body($text); [ $m->addAttachment($data, "filename.txt", "filetype"); ] $m->send(); } 。ヲ ハ」ソホニア、ク・癸シ・�ロソョ、ケ、��� 。� トフセ�筍シ・ノ、ホセ�� to() 、ネ send() 、タ、ア、�シ・ラニ筅ヒニ�、�゙、ケ。」 「ィ addHeader() 、ネ、、、ソ、、セ�遉マ。「・�シ・ラニ筅ヌ resetHeader() 、キ。「 チエ、ニ、ホトノイテ・リ・テ・タ、� addHeader() 、キ、ハ、ェ、オ、ハ、ア、�ミ、ハ、熙゙、サ、」 。� ツィサ�・筍シ・ノ、ホセ�� to() , subject(), from(), closeHeader(), body(), addAttachment(), send() 、�シ・ラニ筅ヒニ�、�゙、ケ。」 「ィ addHeader() 、ネ、、、ソ、、セ�遉マ。「・�シ・ラニ筅ヌ resetHeader() 、キ。「 チエ、ニ、ホトノイテ・リ・テ・タ、� addHeader() 、キ、ハ、ェ、オ、ハ、ア、�ミ、ハ、熙゙、サ、」 。ヲ ・皈ス・テ・ノー�� matsMail() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ ・ウ・ケ・ネ・鬣ッ・ソ。」ウニシ�、・ケ・ソ・ケハムソホス魘�ス、キ、゙、ケ。」 immediate() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ ツィサ�・筍シ・ノ、ヒ、ケ、�ハ・ヌ・ユ・ゥ・�ネ、マトフセ�筍シ・ノ。ヒ 、ウ、�ニ、ヨ、ネ。「mail エリソマサネ、ィ、ハ、ッ、ハ、�ホ、ヌ。「mta() 、ヌ ・癸シ・�ョ・ラ・愠ー・鬣爨ホサリト熙キ、ハ、ア、�ミ、ハ、熙゙、サ、」 hasAttachment() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ ナコノユ・ユ・。・、・�ャ、「、��遉マクニ、ヨノャヘラ、ャ、「、熙゙、ケ。」 useMTA() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ mail エリソネ、�ハ、、セ�遉マクニ、ヨノャヘラ、ャ、「、熙゙、ケ。」 to() ー惞ァ (1) ークタ隘「・ノ・�ケ (2) ークタ隍ホフセチー。ハ・ヌ・ユ・ゥ・�ネ、マカクサ昀ヒ ハヨテヘ。ァ、ハ、キ ークタ隘「・ノ・�ケ、ホタ゚ト遙」To ・ユ・」。シ・�ノ、マ。ヨークタ隍ホフセチー <ークタ隘「・ノ・�ケ>。ラ、ホキチ、ヒ、ハ、�」 ニ篷ヌ MIME ・ィ・ウ。シ・ヌ・」・ー、筅キ、ニ、、、�ホ、ヌ。「・譯シ・カ、マオ、、ヒ、ケ、�ャヘラ、マ、「、熙゙、サ、」 from() ー惞ァ (1) コケスミソヘ・「・ノ・�ケ (2) コケスミソヘ、ホフセチー。ハ・ヌ・ユ・ゥ・�ネ、マカクサ昀ヒ ハヨテヘ。ァ、ハ、キ コケスミソヘ・「・ノ・�ケ、ホタ゚ト遙」From ・ユ・」。シ・�ノ、マ。ヨコケスミソヘ、ホフセチー <コケスミソヘ・「・ノ・�ケ>。ラ、ホキチ、ヒ、ハ、�」 ニ篷ヌ MIME ・ィ・ウ。シ・ヌ・」・ー、筅キ、ニ、、、�ホ、ヌ。「・譯シ・カ、マオ、、ヒ、ケ、�ャヘラ、マ、「、熙゙、サ、」 subject() ー惞ァ (1) キ�セ ハヨテヘ。ァ、ハ、キ ニ篷ヌ MIME ・ィ・ウ。シ・ヌ・」・ー、筅キ、ニ、、、�ホ、ヌ。「・譯シ・カ、マオ、、ヒ、ケ、�ャヘラ、マ、「、熙゙、サ、」 mta() ー惞ァ (1) ・癸シ・�ョ、ヒサネ、ヲ・ラ・愠ー・鬣爨ホ・ウ・゙・ノ、ネ・ェ・ラ・キ・逾」 。ハ・ヌ・ユ・ゥ・�ネ、マ /usr/sbin/sendmail。ヒ ハヨテヘ。ァ、ハ、キ ・癸シ・�ョヘム、ホ・ラ・愠ー・鬣爨リト熙ケ、�」__from__ 、マ。「from() 、ヌサリト熙オ、�ソ・「・ノ・�ケ。「 __to__ 、マ。「to() 、ヌサリト熙オ、�ソ・「・ノ・�ケ、ヒテヨ、ュエケ、��」スュエケ、��ソ・、・゚・ー、マ ツィサ�・筍シ・ノ、ホサ�、マ closeHeader() 、ャクニ、ミ、�ソ、ネ、ュ。「トフセ�筍シ・ノ、ホセ�遉マ send() 、ャ クニ、ミ、�ソ、ネ、ュ、ヒ、ハ、熙゙、ケ。」、ス、�゙、ヌ、ヒ。「to() 、ネ from() 、�セ、ホテヘ、ヒ・サ・テ・ネ、キ、ニ、ェ、ォ、ハ 、ア、�ミ、ハ、熙゙、サ、」sendmail 、ホ -- ・ェ・ラ・キ・逾マ。「ーハケ゚、ホー惞エ、ニークタ隍ネ、キ、ニーキ、ヲ 、ソ、皃ホ、筅ホ、ヌ、ケ。」・マ・、・ユ・ヌサマ、゙、�「・ノ・�ケ、ャ、「、�ス、ヲ、ハ、ホ、ヌ。「トノイテ、キ、ニ、ェ、ュ、゙、キ、ソ。」 ホ罍ァ $m->mta("/usr/sbin/sendmail -f '__from__' -- '__to__'"); body($aBody) ー惞ァヒワハクハクサ昀� ハヨテヘ。ァ、ハ、キ ヒワハク、ホハクサ昀リト熙ケ、�」ニ篷ヌ JIS 、リ、ホハムエケ、荀テ、ニ、、、�ホ、ヌ。「 ・譯シ・カ、マオ、、ヒ、ケ、�ャヘラ、マ、「、熙゙、サ、」 closeHeader() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ ツィサ�・筍シ・ノ、ホセ�遉マ・リ・テ・タ、ツコン、ヒ・ム・、・ラ、リスミホマ、キ、゙、ケ。」 トフセ�筍シ・ノ、ホ、ネ、ュ、マクニ、ヨノャヘラ、マ、「、熙゙、サ、ハテア、ヒ return 、キ、゙、ケ。ヒ。」 addAttachment() ー惞ァ (1) ナコノユ、キ、ソ、、・ヌ。シ・ソ、リ、ホ・�ユ・。・�ケ (2) ナコノユ・ユ・。・、・�セ。ハ・ヌ・ユ・ゥ・�ネ、マ uniqid("at") 。ヒ (3) ナコノユ・ユ・。・、・�ホ・ソ・、・ラ。ハ・ヌ・ユ・ゥ・�ネ、マ application/octet-stream 。ヒ ハヨテヘ。ァ、ハ、キ ナコノユ・ユ・。・、・�ノイテ、キ、ニ、、、ュ、゙、ケ。」ハ」ソホ・ユ・。・、・�コノユ、ケ、�ウ、ネ 、箚トヌス、ヌ、ケ。」、ス、ホセ�遉マ。「ハ」ソウ、ホ・皈ス・テ・ノ、ニ、モスミ、キ、ニ、ッ、タ、オ、、。」 、゙、ソ。「ツィサ�・筍シ・ノ、ヌ、マ body() 、ホク螟ヒクニ、モスミ、オ、ハ、ア、�ミ、ハ、鬢ハ、、 タゥフャ、「、熙゙、ケ。」 addHeader($aName, $aValue) ー惞ァ (1) ・リ・テ・タ・ユ・」。シ・�ノ、ホフセチー。ハ : 、ホコク。ヒ (2) ・リ・テ・タ、ホテヘ。ハ : 、ホアヲ 。ヒ ハヨテヘ。ァ、ハ、キ Subject, To, From ーハウー、ホ・癸シ・�リ・テ・タ。ハトノイテ・リ・テ・タ。ヒ、ユ、アツュ、ケ、ネ、ュ 、ヒサネヘム、キ、゙、ケ。」ー�ルノユ、アツュ、キ、ソトノイテ・リ・テ・タ、��ケ、�ヒ、マ。「resetHeader() 、ム、、、ニチエ、ニ、ホトノイテ・リ・テ・タ、��キ、ハ、ア、�ミ、ハ、熙゙、サ、」 send() ー惞ァ、ハ、キ ハヨテヘ。ァbool テヘ ・癸シ・�ョ、キ、゙、ケ。」ツィサ�・筍シ・ノ、ヌ、マ・ム・、・ラ、ホ・ッ・悅シ・コ、タ、ア、ヤ、テ、ニ、、、゙、ケ。」 トフセ�筍シ・ノ、ヌ、マ。「・癸シ・�リ・テ・タ、ホチネ、゚セ螟イ、ォ、鮹ョ、゙、ヌ、�、、ヒケヤ、、、゙、ケ。」 resetHeader() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ ノユ、アツュ、オ、�ニ、、、�ノイテ・リ・テ・タ、エ、ニコ��キ、゙、ケ。」 begin() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ ニ篷ヌサネ、テ、ニ、、、�皈ス・テ・ノ。」・癸シ・�ョヘム・ラ・愠ー・鬣爨リ、ホ・ム・、・ラ、ェ。シ・ラ・ケ、�」 checkPipe() ー惞ァ、ハ、キ ハヨテヘ。ァ、ハ、キ ニ篷ヌサネ、テ、ニ、、、�皈ス・テ・ノ。」・ム・、・ラ、ャウォ、ア、ニ、、、ハ、ア、�ミ。「exit 、キ、゙、ケ。」 。ヲ テ擎ユサ� 。� sendmail 、ハ、ノ、ホ MTA 、ャ・、・ケ・ネ。シ・�ヲタ゚ト熙オ、�ニ、、、ハ、ア、�ミ、ハ、熙゙、サ、」 。� RedHat Linux 7.2J/PHP-4.0.7+mbstring 、ヒ、ニニーコ釥ホウホヌァ、ヤ、、、゙、キ、ソ。」 ケンイスエリソ篷ヌサネ、テ、ニ、、、゙、ケ。」 。� 、ウ、ホ・ラ・愠ー・鬣爨ム、キ、ソ、ウ、ネ、ヒ、隍�ッタク、キ、ソフ萃熙ホタユヌ、、マノ鬢、、゙、サ、」 。� ・ラ・愠ー・鬣爨ホナセコワ、ハ、ノ、ヤ、����遉マ。「 ウーイメ ITBoost セセナ霎ヘハク 。ハ mats@itboost.co.jp 。ヒ 、゙、ヌ、エマ「ヘ惕ッ、タ、オ、、。」 。� RFC 、ヒス爨ク、ニ、、、�ウ、ネ、ホハンセレ、マテラ、キ、゙、サ、ハ^^;;;。ヒ。」 */ class MMail { var $iIsImmediate; var $iIsUseMailFunction; var $iHasAttachment; var $iMTA; var $iTo; var $iToName; var $iFrom; var $iFromName; var $iSubject; var $iBody; var $iAttachment; var $iAdditionalHeader; var $boundary; function MMail() { $this->iIsImmediate = false; $this->iIsUseMailFunction = true; $this->iHasAttachment = false; $this->iMTA = "/usr/sbin/sendmail"; $this->iAttachment = array(); $this->iTo = ""; $this->iFrom = ""; $this->iSubject = ""; $this->iBody = ""; $this->iAdditionalHeader = array(); $this->boundary = "-*-*-*-*-*-*-*-*-Boundary_" . uniqid("b"); } function immediate() { $this->iIsImmediate = true; $this->iIsUseMailFunction = false; } function hasAttachment() { $this->iHasAttachment = true; } function useMTA() { $this->iIsUseMailFunction = false; } function to($aTo, $aName = "") { $this->iTo = $aTo; if( $aName != "" ) { $this->iToName = mb_encode_mimeheader($aName); } } function from($aFrom, $aName) { $this->iFrom = $aFrom; if( $aName != "" ) { $this->iFromName = mb_encode_mimeheader($aName); } } function subject($aSubject) { $this->iSubject = mb_encode_mimeheader($aSubject); } function mta($aMTA) { $this->iMTA = $aMTA; } function begin() { $tmp = preg_replace("/__to__/i", $this->iTo, $this->iMTA) ; $tmp = preg_replace("/__from__/i", $this->iFrom, $tmp) ; $this->iMailPipe = popen($tmp, "w"); if( !$this->iMailPipe ) { print "Can't open pipe to " . $this->tmp . "\n"; exit; } } // ヒワハク、ホスュスミ、キ。」 function body($aBody) { if( $this->iIsImmediate ) { $this->checkPipe(); // ・癸シ・�ワハク、ホ・ム。シ・ネ、ホウォサマ。ハツィサ�・筍シ・ノ。ヒ if( $this->iHasAttachment ) { fputs($this->iMailPipe, "--".$this->boundary."\n"); fputs($this->iMailPipe, "Content-Type: text/plain; charset=\"ISO-2022-JP\"\n"); fputs($this->iMailPipe, "Content-Transfer-Encoding: 7bit\n"); } fputs( $this->iMailPipe, "\n"); fputs( $this->iMailPipe, mb_convert_encoding($aBody,"JIS") ); fputs( $this->iMailPipe, "\n"); } else { $this->iBody = mb_convert_encoding($aBody, "JIS"); } } function checkPipe() { if( !$this->iMailPipe ) { print("Pipe to MTA is not already opened. Abort.\n"); exit; } } function closeHeader() { if( $this->iIsImmediate ) { // begin 、ャクニ、ミ、�ニ、ハ、ォ、テ、ソ、鬘「ウォ、、、ニ、ェ、ッ。」 if( !$this->iMailPipe ) { $this->begin(); } $this->checkPipe(); // ツィサ�・筍シ・ノ、ホセ�遉ホ・リ・テ・タスミホマ fputs( $this->iMailPipe, "To: ".$this->iToName." <" . $this->iTo . ">\n"); fputs( $this->iMailPipe, "From: ".$this->iFromName." <" . $this->iFrom . ">\n"); fputs( $this->iMailPipe, "Subject: " . $this->iSubject . "\n"); // トノイテ・リ・テ・タスミホマ for( $i=0; $iiAdditionalHeader); $i++ ) { fputs( $this->iMailPipe, $this->iAdditionalHeader[$i]["name"] . ": ". $this->iAdditionalHeader[$i]["value"]. "\n" ); } // MIME ヘム、ホ Header スミホマ if( $this->iHasAttachment ) { fputs($this->iMailPipe, "MIME-Version: 1.0\n"); fputs($this->iMailPipe, "Content-Type: Multipart/Mixed; boundary=\"".$this->boundary."\"\n"); } // ・リ・テ・タ、ホスェホサ、ィ、ケカヤ fputs( $this->iMailPipe, "\n"); } else { // ツィサ�・筍シ・ノ、ク、网ハ、ォ、テ、ソ、魎ソ、筅キ、ハ、、。」 return; } } // ・ヌ。シ・ソ、マ・オ・、・コ、ャツ遉ュ、、イトヌスタュ、ャ、「、�ホ、ヌ。「サイセネ、ヌシアシ隍�」 // 、ソ、タ。「クニ、モスミ、キクオ、ヌー�ル・皈筵熙ヒシ隍��、ヌ、ェ、ッノャヘラ、マ、「、�ホ、ヌ。「 // ヒワナヒ・リ・モ。シ、ハ・ヌ。シ・ソ、ヒ、マサネ、ィ、ハ、、、ォ、筍「、ヌ、ケ。」 function addAttachment(&$aData, $aFilename = "", $aType = "application/octet-stream" ){ if( $aFilename == "" ) { $aFilename = uniqid("at"); } if( $this->iIsImmediate ) { $this->checkPipe(); // ナコノユ・ユ・。・、・�ホ・ム。シ・ネ、ホスュケ�、゚ fputs($this->iMailPipe, "--".$this->boundary."\n"); fputs($this->iMailPipe, "Content-Type: $aType"."; name=\"" . $aFilename . "\"\n"); fputs($this->iMailPipe, "Content-Transfer-Encoding: base64\n"); fputs($this->iMailPipe, "Content-Disposition: attachment; filename=\"".$aFilename."\"\n"); fputs( $this->iMailPipe, "\n"); fputs( $this->iMailPipe, chunk_split(base64_encode($aData))); fputs( $this->iMailPipe, "\n"); } else { // ツィサ�・筍シ・ノ、ク、网ハ、、、ネ、ュ、マ。「サイセネクオ、ホ・ヌ。シ・ソ、ウ・ヤ。シ、ケ、�」 $tmp = count($this->iAttachment); $this->iAttachment[$tmp]["data"] = $aData; $this->iAttachment[$tmp]["file"] = $aFilename; $this->iAttachment[$tmp]["type"] = $aType; } } // MIME ・ィ・ウ。シ・ノ、マ、キ、゙、サ、」 function addHeader($aName, $aValue) { $tmp = count($this->iAdditionalHeader); $this->iAdditionalHeader[$tmp]["name"] = $aName; $this->iAdditionalHeader[$tmp]["value"] = $aValue; } // トノイテ・リ・テ・タ、�サ・テ・ネ、ケ、�」 function resetHeader() { $this->iAdditionalHeader = array(); } // ・癸シ・�ホチョ・皈ス・テ・ノ。」 function send() { if( $this->iIsImmediate ) { $this->checkPipe(); // MIME 、ホスェホサ、ホ・ミ・ヲ・タ・熙、、ニ、ェ、ッ if( $this->iHasAttachment ) { fputs($this->iMailPipe, "--" .$this->boundary ."--\n"); } pclose($this->iMailPipe); unset($this->iMailPipe); return true; } else { // トノイテ・リ・テ・タタクタョ $additional = "From: ". $this->iFromName ." <" . $this->iFrom . ">\n"; for( $i=0; $iiAdditionalHeader); $i++ ) { $additional .= $this->iAdditionalHeader[$i]["name"] . ": ". $this->iAdditionalHeader[$i]["value"] ."\n"; } // MIME ヘム、ホ Header タクタョ if( $this->iHasAttachment ) { $additional .= "MIME-Version: 1.0\n"; $additional .= "Content-Type: Multipart/Mixed; boundary=\"".$this->boundary."\"\n"; } // チョハ�ヒ。、ヒスセ、テ、ソチョ if( $this->iIsUseMailFunction ) { // ・癸シ・�リソ� $body = ""; // ヒワハク、ホ・ム。シ・ネヘム if( $this->iHasAttachment ) { $body .= "--".$this->boundary."\n"; $body .= "Content-Type: text/plain; charset=\"ISO-2022-JP\"\n"; $body .= "Content-Transfer-Encoding: 7bit\n"; $body .= "\n"; } $body .= $this->iBody; $body .= "\n"; if( $this->iHasAttachment ) { for( $i=0; $iiAttachment); $i++ ) { $body .= "--" . $this->boundary."\n"; $body .= "Content-Type: ".$this->iAttachment[$i]["type"]."; name=\"". $this->iAttachment[$i]["file"]."\"\n"; $body .= "Content-Transfer-Encoding: base64\n"; $body .= "Content-Disposition: attachment; filename=\"".$this->iAttachment[$i]["file"]."\"\n"; $body .= "\n"; $body .= chunk_split(base64_encode($this->iAttachment[$i]["data"])); $body .= "\n"; } // ・゙・�チ・ム。シ・ネ、ハ・癸シ・�ホスェ、�� $body .= "--" .$this->boundary ."--\n"; } // mail エリソネ、ヲセ�遉マ。「。ヨ"hoge" 。ラキチシー、マサネ、�ハ、、。」 return mail( $this->iTo, $this->iSubject, $body, $additional ); } else { // ・ム・、・ラ、ォ、ッ $this->begin(); // ーハケ゚・ム・、・ラ、ヌ MTA 、ヒナマ、ケ。」 // ・リ・テ・タ、ホスミホマ fputs( $this->iMailPipe, "To: ".$this->iToName." <" . $this->iTo . ">\n"); fputs( $this->iMailPipe, "Subject: " . $this->iSubject . "\n"); fputs( $this->iMailPipe, $additional ); fputs( $this->iMailPipe, "\n" ); if( $this->iHasAttachment ) { // ヒワハク、ホ・ム。シ・ネヘム fputs($this->iMailPipe, "--".$this->boundary."\n"); fputs($this->iMailPipe, "Content-Type: text/plain; charset=\"ISO-2022-JP\"\n"); fputs($this->iMailPipe, "Content-Transfer-Encoding: 7bit\n"); fputs( $this->iMailPipe, "\n"); } fputs( $this->iMailPipe, $this->iBody); fputs( $this->iMailPipe, "\n"); if( $this->iHasAttachment ) { for( $i=0; $iiAttachment); $i++ ) { fputs($this->iMailPipe, "--".$this->boundary."\n"); fputs($this->iMailPipe, "Content-Type: ".$this->iAttachment[$i]["type"]."; name=\"". $this->iAttachment[$i]["file"]."\"\n"); fputs($this->iMailPipe, "Content-Transfer-Encoding: base64\n"); fputs($this->iMailPipe, "Content-Disposition: attachment; filename=\"".$this->iAttachment[$i]["file"]."\"\n"); fputs( $this->iMailPipe, "\n"); fputs( $this->iMailPipe, chunk_split(base64_encode($this->iAttachment[$i]["data"]))); fputs( $this->iMailPipe, "\n"); } fputs($this->iMailPipe, "--" .$this->boundary ."--\n"); } return true; } // end of MTA mode } // end of not immediate mode } // end of function send } // end of MMail ?>
Notice: Use of undefined constant FALES - assumed 'FALES' in /evar/www/vh/treasure-island.yumikon.net/htdocs/ssearch.php on line 45

Fatal error: Call to undefined function Mis_empty() in /evar/www/vh/treasure-island.yumikon.net/htdocs/ssearch.php on line 88