● プロ用フットケア用品〜お問い合わせフォーム ●

EOF; if(isset($_POST[i_confirm])) { foreach($_POST[idata] as $k => $v){ $idata_d_html[$k] = htmlspecialchars($v, ENT_QUOTES, 'EUC-JP'); $idata_d[$k] = mb_ereg_replace("\"", "”", addslashes($v)); } $err_str = $model->varidation_check_contact($idata_d); if($err_str != ""){ foreach($_POST[idata] as $k => $v){ $idata_d[$k] = pg_escape_string($v); } $checked_reason_1 = ""; $checked_reason_2 = ""; $checked_reason_3 = ""; $checked_reason_4 = ""; $checked_reason_5 = ""; $checked_reason_6 = ""; switch($idata_d[reason]) { case "ネットを検索中、偶然たどりついた。": $checked_reason_1 = "checked"; break; case "「商品名」をネットで検索した。": $checked_reason_2 = "checked"; break; case "知人から教えてもらった。": $checked_reason_3 = "checked"; break; case "別のサイトからのリンクでたどりついた。": $checked_reason_4 = "checked"; break; case "広告・展示会でサイトアドレスを知った。": $checked_reason_5 = "checked"; break; case "その他": $checked_reason_6 = "checked"; break; default: } for($i=1;$i<9;$i++) { $checked_item_str = "item_" . $i; if($idata_d[$checked_item_str] != "") { $checked_item[$i] = "checked"; } } $checked_iorc_1 = ""; $checked_iorc_2 = ""; $checked_iorc_3 = ""; $checked_iorc_4 = ""; $checked_iorc_5 = ""; $checked_iorc_6 = ""; $checked_iorc_7 = ""; $checked_iorc_8 = ""; switch($idata_d[iorc]) { case "【個人】医療関係": $checked_iorc_1 = "checked"; break; case "【個人】ネイルケア・フットケア事業者": $checked_iorc_2 = "checked"; break; case "【個人】一般ユーザー": $checked_iorc_3 = "checked"; break; case "【個人】その他": $checked_iorc_4 = "checked"; break; case "【法人】医療関係": $checked_iorc_5 = "checked"; break; case "【法人】販売店": $checked_iorc_6 = "checked"; break; case "【法人】ネイルケア・フットケア事業者": $checked_iorc_7 = "checked"; break; case "【法人】その他": $checked_iorc_8 = "checked"; break; default: } include_once("./toiawase_form.inc"); } else { if($idata_d_html[zip_a] != "" || $idata_d_html[zip_b] != "") { $idata_d_html[zip_no] = $idata_d_html[zip_a] . " - " . $idata_d_html[zip_b]; } else { $idata_d_html[zip_no] = ""; } if($idata_d_html[tel_a] != "" || $idata_d_html[tel_b] != "" || $idata_d_html[tel_c] != "") { $idata_d_html[tel_no] = $idata_d_html[tel_a] . " - " . $idata_d_html[tel_b] . " - " . $idata_d_html[tel_c]; } else { $idata_d_html[tel_no] = ""; } if($idata_d_html[fax_a] != "" || $idata_d_html[fax_b] != "" || $idata_d_html[fax_c] != "") { $idata_d_html[fax_no] = $idata_d_html[fax_a] . " - " . $idata_d_html[fax_b] . " - " . $idata_d_html[fax_c]; } else { $idata_d_html[fax_no] = ""; } if($idata_d_html[reason_other] != "") { $idata_d_html[reason_other] = "(その他の理由:" . $idata_d_html[reason_other] . ")"; } if($idata_d_html[item_other] != "") { $idata_d_html[item_other] = "(その他:" . $idata_d_html[item_other] . ")"; } if($idata_d_html[iorc_i_other] != "") { $idata_d_html[iorc_i_other] = "(【個人】その他:" . $idata_d_html[iorc_i_other] . ")"; } if($idata_d_html[iorc_c_other] != "") { $idata_d_html[iorc_c_other] = "(【法人】その他:" . $idata_d_html[iorc_c_other] . ")"; } for($i=1;$i<9;$i++) { $checked_item_str = "item_" . $i; if($idata_d[$checked_item_str] != "") { if($item_str != "") { $item_str .= "/"; } $item_str .= $idata_d[$checked_item_str]; } } include_once("./toiawase_confirm.inc"); } } else if(isset($_POST[i_send])) { /* リロード対策。一度発注処理が行われていたら別メッセージを出す */ if(isset($_SESSION[order_flg])) { foreach($_POST[idata] as $k => $v){ $idata_d_html[$k] = htmlspecialchars($v, ENT_QUOTES, 'EUC-JP'); $idata_d[$k] = mb_ereg_replace("\"", "”", addslashes($v)); } if($idata_d_html[zip_a] != "" || $idata_d_html[zip_b] != "") { $idata_d_html[zip_no] = $idata_d_html[zip_a] . " - " . $idata_d_html[zip_b]; } else { $idata_d_html[zip_no] = ""; } if($idata_d_html[tel_a] != "" || $idata_d_html[tel_b] != "" || $idata_d_html[tel_c] != "") { $idata_d_html[tel_no] = $idata_d_html[tel_a] . " - " . $idata_d_html[tel_b] . " - " . $idata_d_html[tel_c]; } else { $idata_d_html[tel_no] = ""; } if($idata_d_html[fax_a] != "" || $idata_d_html[fax_b] != "" || $idata_d_html[fax_c] != "") { $idata_d_html[fax_no] = $idata_d_html[fax_a] . " - " . $idata_d_html[fax_b] . " - " . $idata_d_html[fax_c]; } else { $idata_d_html[fax_no] = ""; } if($idata_d_html[reason_other] != "") { $idata_d_html[reason_other] = "(その他の理由:" . $idata_d_html[reason_other] . ")"; } if($idata_d_html[item_other] != "") { $idata_d_html[item_other] = "(その他:" . $idata_d_html[item_other] . ")"; } if($idata_d_html[iorc_i_other] != "") { $idata_d_html[iorc_i_other] = "(【個人】その他:" . $idata_d_html[iorc_i_other] . ")"; } if($idata_d_html[iorc_c_other] != "") { $idata_d_html[iorc_c_other] = "(【法人】その他:" . $idata_d_html[iorc_c_other] . ")"; } for($i=1;$i<9;$i++) { $checked_item_str = "item_" . $i; if($idata_d[$checked_item_str] != "") { if($item_str != "") { $item_str .= "/"; } $item_str .= $idata_d[$checked_item_str]; } } $idata_d[status] = "a"; //$idata_d[theme] = "old"; $contact_id = $model->add_contact_data($idata_d); //2022.8.18修正 $condition2[contact_id] = $contact_id; $idata2 = $model->get_contact_data($condition2); foreach($idata2[0] as $k => $v){ $idata_d2[$k] = mb_ereg_replace("\"", "”", addslashes($v)); } if($idata_d2[zip_a] != "" || $idata_d2[zip_b] != "") { $idata_d2[zip_no] = $idata_d2[zip_a] . " - " . $idata_d2[zip_b]; } else { $idata_d2[zip_no] = ""; } if($idata_d2[tel_a] != "" || $idata_d2[tel_b] != "" || $idata_d2[tel_c] != "") { $idata_d2[tel_no] = $idata_d2[tel_a] . " - " . $idata_d2[tel_b] . " - " . $idata_d2[tel_c]; } else { $idata_d2[tel_no] = ""; } if($idata_d2[fax_a] != "" || $idata_d2[fax_b] != "" || $idata_d2[fax_c] != "") { $idata_d2[fax_no] = $idata_d2[fax_a] . " - " . $idata_d2[fax_b] . " - " . $idata_d2[fax_c]; } else { $idata_d2[fax_no] = ""; } if($idata_d2[reason_other] != "") { $idata_d2[reason_other] = "(その他の理由:" . $idata_d2[reason_other] . ")"; } if($idata_d2[item_other] != "") { $idata_d2[item_other] = "(その他:" . $idata_d2[item_other] . ")"; } if($idata_d2[iorc_i_other] != "") { $idata_d2[iorc_i_other] = "(【個人】その他:" . $idata_d2[iorc_i_other] . ")"; } if($idata_d2[iorc_c_other] != "") { $idata_d2[iorc_c_other] = "(【法人】その他:" . $idata_d2[iorc_c_other] . ")"; } for($i=1;$i<9;$i++) { $checked_item_str = "item_" . $i; if($idata_d2[$checked_item_str] != "") { if($item_str_d2 != "") { $item_str_d2 .= "/"; } $item_str_d2 .= $idata_d2[$checked_item_str]; } } if(isset($_SESSION[order_flg])){ unset($_SESSION[order_flg]); } include_once("./toiawase_mail.inc"); include_once("./toiawase_thanks.inc"); } else { include_once("./toiawase_reload.inc"); } } else { $_SESSION[order_flg] = 1; if(isset($_POST["i_back"])) { foreach($_POST[idata] as $k => $v){ $idata_d[$k] = pg_escape_string($v); } } $checked_reason_1 = ""; $checked_reason_2 = ""; $checked_reason_3 = ""; $checked_reason_4 = ""; $checked_reason_5 = ""; $checked_reason_6 = ""; switch($idata_d[reason]) { case "ネットを検索中、偶然たどりついた。": $checked_reason_1 = "checked"; break; case "「商品名」をネットで検索した。": $checked_reason_2 = "checked"; break; case "知人から教えてもらった。": $checked_reason_3 = "checked"; break; case "別のサイトからのリンクでたどりついた。": $checked_reason_4 = "checked"; break; case "広告・展示会でサイトアドレスを知った。": $checked_reason_5 = "checked"; break; case "その他": $checked_reason_6 = "checked"; break; default: } for($i=1;$i<9;$i++) { $checked_item_str = "item_" . $i; if($idata_d[$checked_item_str] != "") { $checked_item[$i] = "checked"; } } $checked_iorc_1 = ""; $checked_iorc_2 = ""; $checked_iorc_3 = ""; $checked_iorc_4 = ""; $checked_iorc_5 = ""; $checked_iorc_6 = ""; $checked_iorc_7 = ""; $checked_iorc_8 = ""; switch($idata_d[iorc]) { case "【個人】医療関係": $checked_iorc_1 = "checked"; break; case "【個人】ネイルケア・フットケア事業者": $checked_iorc_2 = "checked"; break; case "【個人】一般ユーザー": $checked_iorc_3 = "checked"; break; case "【個人】その他": $checked_iorc_4 = "checked"; break; case "【法人】医療関係": $checked_iorc_5 = "checked"; break; case "【法人】販売店": $checked_iorc_6 = "checked"; break; case "【法人】ネイルケア・フットケア事業者": $checked_iorc_7 = "checked"; break; case "【法人】その他": $checked_iorc_8 = "checked"; break; default: } include_once("./toiawase_form.inc"); } print<<
EOF2; ?>