// ----------------------------------------------------------------------- // 初期設定読込み // ----------------------------------------------------------------------- @require_once("my_init.php"); // ----------------------------------------------------------------------- // お客様用/メールの返信フォーム // ----------------------------------------------------------------------- if(preg_match("/^.+UB.+$/",$_REQUEST["id"])){ // 最初のメールIDを取得 $DBARY = array(); $DBARY['table'] = TABLE; $DBARY['get_f'] = "Old_mail_id"; $DBARY['check_f'] = "Num"; $DBARY['check_d'] = @Pass_remake($_REQUEST["id"]); $DBARY['limit'] = "0,1"; $dbo = ""; $dbo = @DB_data_select(); if(@preg_match("/^[\d]+_[\d]+$/",$dbo)){ $_SESSION = array(); $_SESSION["now_id"] = @Pass_remake($_REQUEST["id"]); $_SESSION["fast_mail_id"] = $dbo; @header("Location: usr_form1.php"); exit; } } // ----------------------------------------------------------------------- // フォーム取得 // ----------------------------------------------------------------------- if(f("fc")){ $dfAry = array(); $dfAry = explode(",",strtolower(@DB_field(TABLE))); if(count($dfAry)){ foreach($dfAry as $k => $v){ $v = preg_replace("/^usr_/","",$v); if($v == "num"){ $_SESSION[$v] = @MT_NUM(); }else if($v == "zip"){ $_SESSION["zip1"] = preg_replace("/[^\d]/","",mb_convert_kana(f("zip1"),"n","utf-8")); $_SESSION["zip2"] = preg_replace("/[^\d]/","",mb_convert_kana(f("zip2"),"n","utf-8")); }else if($v == "tel"){ $_SESSION["tel1"] = preg_replace("/[^\d]/","",mb_convert_kana(f("tel1"),"n","utf-8")); $_SESSION["tel2"] = preg_replace("/[^\d]/","",mb_convert_kana(f("tel2"),"n","utf-8")); $_SESSION["tel3"] = preg_replace("/[^\d]/","",mb_convert_kana(f("tel3"),"n","utf-8")); }else if($v == "fax"){ $_SESSION["fax1"] = preg_replace("/[^\d]/","",mb_convert_kana(f("fax1"),"n","utf-8")); $_SESSION["fax2"] = preg_replace("/[^\d]/","",mb_convert_kana(f("fax2"),"n","utf-8")); $_SESSION["fax3"] = preg_replace("/[^\d]/","",mb_convert_kana(f("fax3"),"n","utf-8")); }else if($v == "mail"){ $_SESSION[$v] = preg_replace("/[^0-9a-zA-Z-_\.@]/","",mb_convert_kana(f($v),"rn","utf-8")); $_SESSION[$v."_check"] = preg_replace("/[^0-9a-zA-Z-_\.@]/","",mb_convert_kana(f($v."_check"),"rn","utf-8")); }else if($v == "site"){ $site = f($v); list(,$site_check) = explode("//",$site); if($site_check){ $_SESSION[$v] = $site; }else{ $_SESSION[$v] = ""; } }else if($v == "inside"){ $_SESSION[$v] = $com_num; }else if($v == "question_select"){ $_SESSION[$v."1"] = f($v."1"); $_SESSION[$v."2"] = f($v."2"); $_SESSION[$v."_eny"] = f($v."_eny"); }else{ $_SESSION[$v] = f($v); } } // アンケート値取得(DBフィールド無し/メール文内に保存) $_SESSION["an_question"] = f("an_question"); $_SESSION["an"] = f("an"); $_SESSION["an_eny"] = f("an_eny"); // 必須チェック $flag = 0; if(!$_SESSION["name"]){ $name_e = eMess("必須項目です!","p");$flag++;} if(!$_SESSION["kana"]){ $kana_e = eMess("必須項目です!","p");$flag++;} if(!$_SESSION["zip1"] || !$_SESSION["zip2"]){ $zip_e = eMess("必須項目です!","p");$flag++;} if(!strlen($_SESSION["pref"])){ $pref_e = eMess("必須項目です!ご選択ください。","p");$flag++;} if(!$_SESSION["city"]){ $city_e = eMess("必須項目です!","p");$flag++;} $check_mail = 0; if(!$_SESSION["mail"]){ $mail_e = eMess("必須項目です!","p");$flag++;$check_mail++;} if(!$_SESSION["mail_check"]){ $mail_check_e = eMess("必須項目です!","p");$flag++;$check_mail++;} if(!$check_mail){ if(!$_SESSION["mail_check"]){ $mail_check_e = eMess("必須項目です!","p");$flag++; }else{ if(!@mailcheck($_SESSION["mail"])){ $mail_e = eMess("メールアドレスをご確認ください!","p");$flag++; }else{ if($_SESSION["mail"] != $_SESSION["mail_check"]){ $mail_check_e = eMess("メールアドレスをご確認ください!","p");$flag++; } } } } if(!$_SESSION["tel1"] || !$_SESSION["tel2"] || !$_SESSION["tel3"]){ $tel_e = eMess("必須項目です!","p");$flag++;} if(!strlen($_SESSION["main_question"])){ $main_question_e = eMess("必須項目です!ご選択ください。","p");$flag++;} if(!$_SESSION["comment"]){ $comment_e = eMess("必須項目です!","p");$flag++;} } if(!$flag){ @header("Location: check.php"); exit; } } // ホームページ初期値 if(!$_SESSION["site"]){ $_SESSION["site"] = "http://";} ?>
@Meta();?>