user = u4user_open(); $template =& loadTemplate( $p ); // 性別 $sex = u4user_get_items($this->user, "mem_sex"); foreach($sex as $row) { if($p["sex"] == $row["key"]) { $template->setVariable('sex_key', $row["key"]); $template->setVariable('sex_val', $row["value"]); } } // 家族構成 for($i = FAMILY_MIN; $i <= FAMILY_MAX; $i++) { if($p["family"] == $i) { $template->setVariable('family_key', $i); $template->setVariable('family_val', $i); } } // 生年月日 $p["year"] = trim(mb_convert_kana($p["year"], "a")); $p["mon"] = trim(mb_convert_kana($p["mon"], "a")); $p["day"] = trim(mb_convert_kana($p["day"], "a")); $err_flg = false; if(is_numeric($p["year"]) == false || is_numeric($p["mon"]) == false || is_numeric($p["day"]) == false) { $err_flg = true; } else if(checkdate($p["mon"], $p["day"], $p["year"]) == false) { $err_flg = true; } else if($p["year"] < 1850 || $p["year"] >= date("Y")) { $err_flg = true; } if($err_flg == false) { $template->setVariable('year_val', htmlspecialchars(sprintf("%04d", $p["year"]))); $template->setVariable('mon_val', htmlspecialchars(sprintf("%02d", $p["mon"]))); $template->setVariable('day_val', htmlspecialchars(sprintf("%02d", $p["day"]))); $template->touchBlock("__message__"); } else { $template->setVariable('year_val', htmlspecialchars($p["year"])); $template->setVariable('mon_val', htmlspecialchars($p["mon"])); $template->setVariable('day_val', htmlspecialchars($p["day"])); $template->touchBlock("__birthday_err__"); $template->hideBlock("__message__"); $template->hideBlock("__regist__"); } // お住まい地域 $area = u4user_get_items($this->user, "mem_area"); foreach($area as $row) { if($p["area"] == $row["key"]) { $template->setVariable('area_key', $row["key"]); $template->setVariable('area_val', $row["value"]); } } // お好みお取寄せ商品 $favorite = u4user_get_items($this->user, "mem_favorite"); $count = 0; foreach($favorite as $row) { if($p["favorite_{$row["key"]}"] == 1) { $template->setCurrentBlock("__favorite__"); $template->setVariable('favorite_val', $row["value"]); $template->parse("__favorite__"); $template->setCurrentBlock("__favorite_reg__"); $template->setVariable('favorite_key', $row["key"]); $template->parse("__favorite_reg__"); $template->setCurrentBlock("__favorite_rtn__"); $template->setVariable('favorite_key', $row["key"]); $template->parse("__favorite_rtn__"); $count++; } } if($count == 0) { $template->touchBlock("__favorite_non__"); } // お米 $rice = u4user_get_items($this->user, "mem_rice"); foreach($rice as $row) { if($p["rice"] == $row["key"]) { $template->setVariable('rice_key', $row["key"]); $template->setVariable('rice_val', $row["value"]); } } // お水 $water = u4user_get_items($this->user, "mem_water"); foreach($water as $row) { if($p["water"] == $row["key"]) { $template->setVariable('water_key', $row["key"]); $template->setVariable('water_val', $row["value"]); } } $template->setVariable('mail_regist_url', MAIL_REGIST_INFO_URL); $template->setVariable('mail_input_info_url', MAIL_INPUT_INFO_URL); $template->setVariable('site_top_url', SITE_TOP_URL); //- 他コンテンツから誘導時の戻り先パラメータ $template->setVariable('sub_cont', $p['sub_cont']); $template->show(); u4user_close($this->user); } mail_check_info($p); ?>