ini_set("display_errors",0); session_start(); define( "ADMIN_FROM" , "info@kgpj.jp" ); define( "ADMIN_MAIL" , "makita@kgpj.jp" ); define( "URL_HOME" , "http://chk.iri-galu.jp/" ); $prefe_arr = array ( '1' => '北海道', '2' => '青森県', '3' => '岩手県', '4' => '宮城県', '5' => '秋田県', '6' => '山形県', '7' => '福島県', '8' => '茨城県', '9' => '栃木県', '10' => '群馬県', '11' => '埼玉県', '12' => '千葉県', '13' => '東京都', '14' => '神奈川県', '15' => '新潟県', '16' => '富山県', '17' => '石川県', '18' => '福井県', '19' => '山梨県', '20' => '長野県', '21' => '岐阜県', '22' => '静岡県', '23' => '愛知県', '24' => '三重県', '25' => '滋賀県', '26' => '京都府', '27' => '大阪府', '28' => '兵庫県', '29' => '奈良県', '30' => '和歌山県', '31' => '鳥取県', '32' => '島根県', '33' => '岡山県', '34' => '広島県', '35' => '山口県', '36' => '徳島県', '37' => '香川県', '38' => '愛媛県', '39' => '高知県', '40' => '福岡県', '41' => '佐賀県', '42' => '長崎県', '43' => '熊本県', '44' => '大分県', '45' => '宮崎県', '46' => '鹿児島県', '47' => '沖縄県' ); function getBirthYear(){ $num = -80; $now = date("Y"); while( true ){ $y = date( "Y年" , mktime( 0,0,0,date("m"),date("d"),date("Y")+$num)); $year[$y] = $y; $num++; if( $now == $y ){ break; } } arsort( $year ); return $year; } function getMonthArr(){ return array( "01"=>"01月", "02"=>"02月", "03"=>"03月", "04"=>"04月", "05"=>"05月", "06"=>"06月", "07"=>"07月", "08"=>"08月", "09"=>"09月", "10"=>"10月", "11"=>"11月", "12"=>"12月" ); } function getDayArr(){ return array( "01"=>"01日", "02"=>"02日", "03"=>"03日", "04"=>"04日", "05"=>"05日", "06"=>"06日", "07"=>"07日", "08"=>"08日", "09"=>"09日", "10"=>"10日", "11"=>"11日", "12"=>"12日", "13"=>"13日", "14"=>"14日", "15"=>"15日", "16"=>"16日", "17"=>"17日", "18"=>"18日", "19"=>"19日", "20"=>"20日", "21"=>"21日", "22"=>"22日", "23"=>"23日", "24"=>"24日", "25"=>"25日", "26"=>"26日", "27"=>"27日", "28"=>"28日", "29"=>"29日", "30"=>"30日", "31"=>"31日" ); } function checkEmail($email) { //ブランクチェック if(!$email){ return false; } if (preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._\/-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", $email)) { return $email; } else { return false; } return true; } function MailSend($MailTo, $Subject, $Message,$MailFrom){ // Subject部分を変換 $xSubject = mb_convert_encoding($Subject, "JIS", "utf-8"); $xSubject = base64_encode($xSubject); $xSubject = "=?iso-2022-jp?B?".$xSubject."?="; // Message部分を変換 $xMessage = htmlspecialchars($Message); $xMessage = str_replace("&", "&", $xMessage); if (get_magic_quotes_gpc()) $xMessage = stripslashes($xMessage); $xMessage = str_replace("\r\n", "\r", $xMessage); $xMessage = str_replace("\r", "\n", $xMessage); $xMessage = mb_convert_encoding($xMessage, "JIS", "utf-8"); // Header部分を生成 $GMT = date("Z"); $GMT_ABS = abs($GMT); $GMT_HOUR = floor($GMT_ABS / 3600); $GMT_MIN = floor(($GMT_ABS - $GMT_HOUR * 3600) / 60); if ($GMT >= 0) $GMT_FLG = "+"; else $GMT_FLG = "-"; $GMT_RFC = date("D, d M Y H:i:s ").sprintf($GMT_FLG."%02d%02d", $GMT_HOUR, $GMT_MIN); $Headers = "Date: ".$GMT_RFC."\n"; $Headers .= "From: ".$MailFrom."\n"; $Headers .= "Subject: ".$xSubject."\n"; $Headers .= "MIME-Version: 1.0\n"; $Headers .= "X-Mailer: PHP/".phpversion()."\n"; $Headers .= "Content-type: text/plain; charset=ISO-2022-JP\n"; $Headers .= "Content-Transfer-Encoding: 7bit"; // メール送信実行 if(mail($MailTo, $xSubject, $xMessage, $Headers)) return true; return false; } ?>