#!/usr/local/bin/php-cgi-5.0.4
お名前を入力してください。
";
$flag = 1;
}
if ($c1 == "") {
$err1 = "ふりがなを入力してください。
";
$flag = 1;
}
if ($c2 == "") {
$err2 = "ご住所を入力してください。
";
$flag = 1;
}
if(!eregi("^([a-z0-9]+)([a-z0-9_-]+)@([a-z0-9]+)\.([a-z0-9\.]+)([a-z0-9]+)",$c3)) {
$err3 = "emailが誤っています。再入力をお願いします。
";
$flag = 1;
}
if ($c3 == "") {
$err3 = "emailを入力してください。
";
$flag = 1;
}
if ($c4 == "") {
$err4 = "電話番号を入力してください。
";
$flag = 1;
}
if ($c5 == "" and $c5[1] == "" and $c5[2] == "" and $c5[3] == "" and $c5[4] == "" and $c5[5] == "") {
$err5 = "ご希望の間取りを選択してください。
";
$flag = 1;
}
if ($c10 == "") {
$err10 = "ご希望の沿線/駅を入力してください。
";
$flag = 1;
}
if ($flag == 1) {
$err = "
赤字部分をご確認の上、再度確認ボタンを押してください。
"; $act = ""; } else { $act = "con_go"; } } /*登録画面表示*/ if ($act == "") { $html = file_get_contents("request.htm"); $html= str_replace("###c0###",$c0,$html); $html= str_replace("###c1###",$c1,$html); $html= str_replace("###c2###",$c2,$html); $html= str_replace("###c3###",$c3,$html); $html= str_replace("###c4###",$c4,$html); $html= str_replace("###c6###",$c6,$html); $html= str_replace("###c7###",$c7,$html); $html= str_replace("###c10###",$c10,$html); for ($i=0; $i <= 5; $i++) { $html= str_replace("###c5_".substr($c5[$i],0,1)."###"," checked",$html); } for ($i=0; $i <= 5; $i++) { $html= str_replace("###c5_".$i."###","",$html); } for ($i=0; $i <= 9; $i++) { if (substr($c8,0,1) == $i) { $html= str_replace("###c8_".$i."###"," selected",$html); } else { $html= str_replace("###c8_".$i."###","",$html); } } for ($i=0; $i <= 9; $i++) { if (substr($c9,0,1) == $i) { $html= str_replace("###c9_".$i."###"," selected",$html); } else { $html= str_replace("###c9_".$i."###","",$html); } } $html= str_replace("###err###",$err,$html); $html= str_replace("###err0###",$err0,$html); $html= str_replace("###err1###",$err1,$html); $html= str_replace("###err2###",$err2,$html); $html= str_replace("###err3###",$err3,$html); $html= str_replace("###err4###",$err4,$html); $html= str_replace("###err5###",$err5,$html); $html= str_replace("###err6###",$err6,$html); $html= str_replace("###err7###",$err7,$html); $html= str_replace("###err8###",$err8,$html); $html= str_replace("###err9###",$err9,$html); $html= str_replace("###err10###",$err10,$html); echo $html; exit; } /*確認画面表示*/ if ($act == "con_go") { $html = file_get_contents("request_con.htm"); $c8 = substr($c8,2); $c9 = substr($c9,2); $html= str_replace("###c0###",$c0,$html); $html= str_replace("###c1###",$c1,$html); $html= str_replace("###c2###",$c2,$html); $html= str_replace("###c3###",$c3,$html); $html= str_replace("###c4###",$c4,$html); $html= str_replace("###c6###",$c6,$html); $html= str_replace("###c7###",$c7,$html); $html= str_replace("###c8###",$c8,$html); $html= str_replace("###c9###",$c9,$html); $html= str_replace("###c10###",$c10,$html); for ($i=0; $i <= 5; $i++) { if ($c5[$i] != "") { if ($c5_str != "") { $c5_str = $c5_str." ".substr($c5[$i],2); } else { $c5_str = substr($c5[$i],2); } } } $html= str_replace("###c5###",$c5_str,$html); echo $html; } /*送信完了画面表示*/ if ($act == "mail") { /*自社向け*/ $subject = "■WEBサイトより物件リクエストがありました"; $header = "from:info@realestate.ne.jp"; $to = "info@realestate.ne.jp"; $message = "WEBサイトより物件リクエストがありました ■リクエスト内容 お名前:".$c0."(".$c1.") ご住所:".$c2." email:".$c3." 電話番号:".$c4." FAX番号:".$c6." 条件:家賃→".$c8."〜".$c9." 間取り→".$c5." 沿線/駅→".$c10." 詳細: ".$c7; $subject = mb_convert_encoding($subject,"SJIS","EUC-JP"); $message = mb_convert_encoding($message,"SJIS","EUC-JP"); mb_language("Japanese"); mb_internal_encoding("SJIS"); mb_send_mail($to,$subject,$message,$header); /*転送*/ header("Location: request_thanks.htm"); } ?>