"アセットマネジメント業務", "2"=>"ホテルマネジメント業務", "3"=>"ターンアラウンドサポート業務", "4"=>"デューデリジェンス&開発業務", "5"=>"取材等パブリシティに関する内容", "6"=>"その他"); ?>
以下の内容で間違いがなければ、「送信する」ボタンを押してください。
'; } $body .= ''; } return $body; } // ------------------------------------------------------------ // 入力チェック // ------------------------------------------------------------ function validate($postData) { // 必須項目のチェック $inpNm = $GLOBALS["inpNm"]; $inpJp = $GLOBALS["inpJp"]; $eles = $GLOBALS["eles"]; $error = array(); for ($i = 0; $i < count($eles); $i++) { $index = $eles[$i]; $var = $postData[$inpNm[$index]]; if (is_array($var)) { $flag = false; for ($j = 0; $j < count($var); $j++) { if (!empty($var[$j])) { $flag = true; break; } } if (!$flag) { $error[count($error)] = $inpJp[$index] . 'を選択してください。'; } } else { if (empty($var)) { $error[count($error)] = $inpJp[$index] . 'を入力してください。'; } } } // メールアドレスのチェック $mail1 = $GLOBALS["mail1"]; $mail2 = $GLOBALS["mail2"]; if ($mail1 >= 0 && $mail2 >= 0) { if ($postData[$inpNm[$mail1]] != $postData[$inpNm[$mail2]]) { $error[count($error)] = 'メールアドレスが一致していません。'; } } return $error; } // ------------------------------------------------------------ // メール送信 // ------------------------------------------------------------ function sendMail($postData) { $inpNm = $GLOBALS["inpNm"]; $inpJp = $GLOBALS["inpJp"]; $mailItems = $GLOBALS["mailItems"]; $consulItems = $GLOBALS["consulItems"]; $sendData = ""; for ($i = 0; $i < count($mailItems); $i++) { $var = $postData[$inpNm[$mailItems[$i]]]; if (is_array($var)) { $tmp = ""; for ($j = 0; $j < count($var); $j++) { if ($j > 0) { $tmp .= "、"; } $tmp .= $consulItems[$var[$j]]; } $sendData .= $inpJp[$mailItems[$i]] . ":" . $tmp ."\n"; } else { $sendData .= $inpJp[$mailItems[$i]] . ":" . $var ."\n"; } } $to = $GLOBALS["to"]; $from = $postData[$inpNm[$GLOBALS["mail1"]]]; $internal_encoding = "UTF-8"; $output_encoding = "JIS"; $resignature = $GLOBALS["resignature"]; // 送信メール作成 $body = "「" . $GLOBALS["sbj"] . "」がありました。\n\n"; $body .= "-------------------------------------------------\n"; $body .= $sendData; $body .= "-------------------------------------------------\n\n"; $body .= "送信日時:".date( "Y/m/d (D) H:i:s", time() )."\n"; $body .= "ホスト名:".getHostByAddr(getenv('REMOTE_ADDR'))."\n"; $body = mb_convert_encoding($body, "JIS", $internal_encoding); $sbj = "=?iso-2022-jp?B?" . base64_encode(mb_convert_encoding($GLOBALS["sbj"], $output_encoding, $internal_encoding)) . "?="; $header = "From: " . $from . "\nReply-To: " . $from ."\nContent-Type: text/plain;charset=iso-2022-jp\nX-Mailer: PHP/" . phpversion(); mail($to, $sbj, $body, $header); // 返信メール作成 $rebody = $GLOBALS["rebody"]; $rebody .= "-------------------------------------------------\n"; $rebody .= $sendData; $rebody .= "-------------------------------------------------\n\n"; $rebody .= "送信日時:".date( "Y/m/d (D) H:i:s", time() )."\n"; $rebody .= $resignature; $rebody = mb_convert_encoding($rebody, $output_encoding, $internal_encoding); $resbj = "=?iso-2022-jp?B?" . base64_encode(mb_convert_encoding($GLOBALS["resbj"], $output_encoding, $internal_encoding)) . "?="; $reheader = "From: " . $to . "\nReply-To: " . $to . "\nContent-Type: text/plain;charset=iso-2022-jp\nX-Mailer: PHP/" . phpversion(); mail($from, $resbj, $rebody, $reheader); } function putString($str) { if (empty($str) || $str == "") { return " "; } return $str; } ?>