$value ) { $ar_request["$key"] = htmlspecialchars( $value, ENT_QUOTES, "EUC-JP" ); } // 初期値設定 //↓↓2024.09.03 新規追加 Nishite if ( !array_key_exists("sc_privacy_policy_agree_flag_err_label",$ar_request) || $ar_request["sc_privacy_policy_agree_flag_err_label"] == "") { $ar_request["sc_privacy_policy_agree_flag_err_label"] = ""; } if ( !array_key_exists("sc_privacy_policy_agree_flag",$ar_request) || $ar_request["sc_privacy_policy_agree_flag"] == "") { $ar_request["sc_privacy_policy_agree_flag"] = ""; } //↑↑2024.09.03 新規追加 Nishite /* --------------------------------------------------------------- */ /* 管理者代理入力モード判定&モード設定 */ /* --------------------------------------------------------------- */ if ( $ar_request["function"] == "1" ) { define("G_SITE_TYPE", "admin"); //管理者サイトであることを指定 } /* --------------------------------------------------------------- */ /* 寄付申込入力フェーズ設定 */ /* --------------------------------------------------------------- */ $_SESSION[G_SS_ENQUETE_STEP] = G_SS_ENQUETE_STEP_INPUT; /* --------------------------------------------------------------- */ /* HTML読込 & 出力 */ /* --------------------------------------------------------------- */ $s_tpl_filename = "w_mgzn01_tpl.html"; //ユーザ機能 /* --------------------------------------------------------------- */ /* HTML読込 & 出力 */ /* --------------------------------------------------------------- */ $n_count_tpldata = 2; if( pbbf_GetTplFile($s_tpl_filename, $ar_tpldata) == false) { print("テンプレートファイルのオープンに失敗しました。"); exit; } $i=0; While($i <= $n_count_tpldata) { //************************************************** // HTMLの編集ブロックをワーク変数に移送 //************************************************** $tmp = $ar_tpldata[$i] ; //************************************************** // HTMLブロックのインデックスによる処理の振り分け //************************************************** Switch ($i) { Case G_HTML_SPLIT_IDX_HEADER: // ヘッダ // pbbf_SetHtmlText(G_HTML_SPLIT_IDX_HEADER, $tmp, $s_htmltext); $s_htmltext = $tmp; $html_tmp .= $s_htmltext; break; Case G_HTML_SPLIT_IDX_MAIN_BODY: // メインボディ(Page固有部) //画面編集処理 pibf_mainbody_edit($ar_request, $tmp, $s_htmltext); $html_tmp .= $s_htmltext; break; Case G_HTML_SPLIT_IDX_FOOTER: // フッタ // pbbf_SetHtmlText(G_HTML_SPLIT_IDX_FOOTER, $tmp, $s_htmltext); $s_htmltext = $tmp; $html_tmp .= $s_htmltext; break; } $i++; } //* Content-LengthとHTML出力 */ //header("Content-Length: ". strlen($html_tmp) ); //if ( G_TERM_TYPE <> G_TERM_TYPE_PC ) { // $html_tmp = mb_convert_encoding($html_tmp, "SJIS", "EUC-JP"); //} //↓2020.09.01 IL 追加 Canonicalタグ設置 $ar_PARAM = array(); $ar_PARAM["URL_MAIN"] = G_FORM_URL_MAGAZINE; $ar_PARAM["URL_MOBILE"] = G_FORM_URL_MAGAZINE_MOBILE; $w_CanonicalTag = pbsf_GenHTML_CanonicalTag($ar_PARAM); $html_tmp = str_replace("", $w_CanonicalTag, $html_tmp); //↑2020.09.01 IL 追加 Canonicalタグ設置 print $html_tmp; exit; ###################################################################### # 内部関数 ###################################################################### #********************************************************************* #【機 能】画面編集 #--------------------------------------------------------------------- #【引 数】$par_request : POSTデータ(配列変数) # $ps_TplText : テンプレートのHTMLデータ # &$ps_OutText : テンプレートファイルのデータ格納先(配列) #【戻り値】True : 成功 false : 失敗 #【作成日】2014.06.25 #********************************************************************* function pibf_mainbody_edit($par_request, $ps_TplText, &$ps_OutText) { $tmp = $ps_TplText; $ps_OutText = $tmp; /*----------------------------------*/ /* SCJ紹介情報 */ /*----------------------------------*/ // -- 寄付申込情報取得 $ar_from_info = array(); if ( trim($par_request["accept_number"]) <> "" ) { $ar_from_info = pisf_get_accept_info(trim($par_request["accept_number"])); } // -- emailアドレス(From) $w_buf = ""; if ( trim($par_request["sc_introduce_mail_from"]) == "" ) { $w_buf = $ar_from_info["email"]; } else { $w_buf = trim($par_request["sc_introduce_mail_from"]); } $tmp = str_replace("-/v_introduce_mail_from/-", $w_buf, $tmp); // -- 氏名(From) // ------ 姓 $w_buf = ""; if ( trim($par_request["sc_introduce_name_last_from"]) == "" ) { $w_buf = $ar_from_info["name_last"]; } else { $w_buf = trim($par_request["sc_introduce_name_last_from"]); } $tmp = str_replace("-/v_introduce_name_last_from/-", $w_buf, $tmp); // ------ 名 $w_buf = ""; if ( trim($par_request["sc_introduce_name_first_from"]) == "" ) { $w_buf = $ar_from_info["name_first"]; } else { $w_buf = trim($par_request["sc_introduce_name_first_from"]); } $tmp = str_replace("-/v_introduce_name_first_from/-", $w_buf, $tmp); // -- エラーメッセージ $tmp = str_replace("-/v_introduce_mail_from_err_label/-" , trim($par_request["sc_introduce_mail_from_err_label"]) , $tmp); $tmp = str_replace("-/v_introduce_name_last_from_err_label/-" , trim($par_request["sc_introduce_name_last_from_err_label"]) , $tmp); $tmp = str_replace("-/v_introduce_name_first_from_err_label/-", trim($par_request["sc_introduce_name_first_from_err_label"]), $tmp); //↓↓2024.09.03 新規追加 Nishite /*----------------------------------*/ /* 応募規約同意確認 */ /*----------------------------------*/ if ( $par_request["sc_privacy_policy_agree_flag"] == 1 ) { $tmp = str_replace("-/v_privacy_policy_agree_flag/-", "CHECKED", $tmp); } else { $tmp = str_replace("-/v_privacy_policy_agree_flag/-", "", $tmp); } // -- エラーメッセージ $tmp = str_replace("-/v_privacy_policy_agree_flag_err_label/-" , trim($par_request["sc_privacy_policy_agree_flag_err_label"]) , $tmp); //↑↑2024.09.03 新規追加 Nishite /*----------------------------------*/ /* hidden項目 */ /*----------------------------------*/ // -- 寄付申込受付番号 $tmp = str_replace("-/v_accept_number/-", trim($par_request["accept_number"]), $tmp); // -- 遷移モード $tmp = str_replace("-/v_function/-", trim($par_request["function"]), $tmp); // -- 広告コード(申込経路) $tmp = str_replace("-/v_adcode/-", trim($par_request["adcode"]), $tmp); /*----------------------------------*/ /* 前画面URL */ /*----------------------------------*/ $tmp = str_replace("-/v_prePage/-", trim($_SESSION["prePage"]), $tmp); $ps_OutText = $tmp; return true; } #********************************************************************* #【機 能】寄付申込データから個人情報を取得 #--------------------------------------------------------------------- #【引 数】$ps_accept_number : 寄付申込データの受付番号 #【戻り値】取得した寄付申込者情報 #【作成日】2014.06.25 #********************************************************************* function pisf_get_accept_info($ps_accept_number) { // -- 戻り値クリヤ $ar_data = array(); // DB接続 $objdb = pbof_mysql_connect(); $sSQL = "SELECT email"; $sSQL .= " ,email_mobile"; $sSQL .= " ,name_last"; $sSQL .= " ,name_first"; $sSQL .= " FROM " . G_TBL_DAT_ACCEPT; $sSQL .= " WHERE accept_number ='" . trim($ps_accept_number) . "'"; $result =mysqli_query($objdb, $sSQL); if ( mysqli_num_rows($result) > 0 ) { //FETCH $rowdata = mysqli_fetch_array($result); if ( trim($rowdata["email"]) <> "" ) { $w_email = trim($rowdata["email"]); } else { $w_email = trim($rowdata["email_mobile"]); } $ar_data["email"] = $w_email; $ar_data["name_last"] = trim($rowdata["name_last"]); $ar_data["name_first"] = trim($rowdata["name_first"]); } //結果破棄 mysqli_free_result($result); // DB切断 mysqli_close($objdb); return $ar_data; } ?>