} else { // ------------------------------------------------------- // 入力画面 or 入力エラー画面 // ------------------------------------------------------- // 確認画面 or 完了画面 $params = array(); $hiddens = array(); foreach ($_POST as $k => $v) { $pattern = '/' . EXCLUSION_ITEM . '/'; if (!preg_match($pattern, $k)) { if (is_array($v)) { $s = implode(', ', $v); } else { $s = $v; } $h = convert_input_hidden($k, $v); $tmpl->set("{$k}.key", h($k)); $tmpl->set("{$k}.value", h($s)); $tmpl->set("{$k}.value.nl2br", nl2br(h($s))); $tmpl->set("{$k}.hidden", $h); $params[] = array('key' => h($k), 'value' => h($s), 'value.nl2br' => nl2br(h($s)), 'hidden' => $h); $hiddens[] = $h; $db_value[] = h($s); } } // エラー情報をテンプレートにセット $check = $db_value[0]; $id = $_SESSION['id']; //if ($check == '会員'){ // $checked0 = 'checked'; //}
$tmpl->set("{$k}.key", h($k)); $tmpl->set("{$k}.value", h($s)); $tmpl->set("{$k}.value.nl2br", nl2br(h($s))); $tmpl->set("{$k}.hidden", $h); $params[] = array('key' => h($k), 'value' => h($s), 'value.nl2br' => nl2br(h($s)), 'hidden' => $h); $hiddens[] = $h; } } // $_FILES if (FILE) { $array = array(); foreach ($files as $k => $v) { if (isset($v['tmp_name'])) { // singleの場合 $h_tmp_name = convert_input_hidden('file[' . $k . '][tmp_name]', $v['tmp_name']); $h_name = convert_input_hidden('file[' . $k . '][name]', $v['name']); $tmpl->set("{$k}.key", h($k)); $tmpl->set("{$k}.tmp_name", h($v['tmp_name'])); $tmpl->set("{$k}.name", h($v['name'])); $tmpl->set("{$k}.hidden_tmp_name", $h_tmp_name); $tmpl->set("{$k}.hidden_name", $h_name); $array[] = array('key' => h($k), 'tmp_name' => h($v['tmp_name']), 'name' => h($v['name']), 'hidden_tmp_name' => $h_tmp_name, 'hidden_name' => $h_tmp_name); $hiddens[] = $h_tmp_name; $hiddens[] = $h_name; } } $tmpl->set('files', $array); } $tmpl->set('params', $params); $tmpl->set('hiddens', implode('', $hiddens)); $tmpl->set('_GET', h($_GET));