input($mfclass, $mfdata); $mfdata["template"] = $model->getTemplate(); } elseif ($ac == "confirm") { $ac = $model->confirm($mfclass, $mfdata); $mfdata["template"] = $model->getTemplate(); } elseif ($ac == "complete") { $ac = $model->complete($mfclass, $mfdata); $mfdata["template"] = $model->getTemplate(); $mfdata["redirect"] = $model->getRedirectURL(); } elseif ($ac == "complete_rd") { $mfdata["template"] = $ac; } elseif (is_readable(TEMPLATEPATH ."/" . $ac . ".php")) { $mfdata["template"] = $ac; } else { $mfdata["template"] = "404"; } } if (!empty($mfdata["redirect"])) { header("HTTP/1.1 301 Moved Permanently"); header("Location: " . $mfdata["redirect"]); exit(); } elseif (!empty($mfdata["template"])) { // 各種情報をわかりやすい変数に入れとく $msg = $mfdata["msg"]; $tl = $mfdata["template"]; $mst = $mfdata["out"]["mst"]; $out = $mfdata["out"]; $cmn = $mfdata["cmn"]; $ses = $mfdata["ses"]; $cl = $mfclass; $template_file = TEMPLATEPATH . "/" . $bt_name . "_" . $mfdata["template"] . ".php"; $content_file = TEMPLATEPATH . "/content-" . $bt_name . "_" . $mfdata["template"] . ".php"; if (is_readable($template_file)) { include($template_file); } elseif (is_readable($content_file)) { include($content_file); } else { get_template_part('404'); } } ?>