.php?id=sample // ?> \n", $message); } ?> アンケート情報が指定されていません\n"; } $idfil = ereg_replace("/$bn", "/$id.txt", $myscript); if ((!$errmsg) && (!file_exists($idfil))) { $errmsg .= "
\n"); while (!feof($fd)) { $line = fgets($fd, $maxline); if (ereg("^END-OF-MESSAGE", $line)) { break; } print($line); } } elseif ($directive == "RADIO") { print("
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "radio"; $value = 0; ++$qno; printf("Q%d: %s", $qno, $msg); print("\n"); } elseif ($directive == "CHECK") { print("
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "checkbox"; $value = 0; ++$qno; printf("Q%d: %s", $qno, $msg); print("\n"); } elseif ($directive == "SUBTEXT") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); ++$value; printf("%s", $msg); printf("\n"); } elseif ($directive == "VALUE") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); ++$value; printf("%s", $msg); } else { printf("NAME=\"q%d\" ", $qno); printf("VALUE=\"%s\">%s", $value, $msg); } } elseif ($directive == "VALUE+") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); ++$value; printf("%s", $msg); } else { printf("NAME=\"q%d\" ", $qno); printf("VALUE=\"%s\" checked>%s", $value, $msg); } } elseif ($directive == "TEXTBOX") { print("
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "textarea"; $value = 0; ++$qno; printf("Q%d: %s", $qno, $msg); printf("\n"); print("\n"); } elseif ($directive == "SUBMIT1") { print("
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); printf("\n", chop($msg)); } elseif ($directive == "RESET1") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); printf("\n", chop($msg)); } } fclose($fd); ?> \n"); while (!feof($fd)) { $line = fgets($fd, $maxline); if (ereg("^END-OF-MESSAGE", $line)) { break; } print($line); } } elseif ($directive == "MESSAGE2") { print("
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "radio"; $value = 0; ++$qno; printf("Q%d: %s", $qno, $msg); print("\n"); $valname = sprintf("q%d", $qno); printf("\n", $_REQUEST[$valname]); } elseif ($directive == "CHECK") { print("
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "checkbox"; $value = 0; ++$qno; printf("Q%d: %s", $qno, $msg); print("\n"); } elseif ($directive == "SUBTEXT") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); ++$value; printf("%s: ", $msg); $valname = sprintf("q%dt%d", $qno, $value); print(htmlspecialchars($_REQUEST[$valname])); printf("\n", htmlspecialchars($_REQUEST[$valname])); } elseif (($directive == "VALUE") || ($directive == "VALUE+")) { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); ++$value; if ($type == "checkbox") { $valname = sprintf("q%dc%d", $qno, $value); printf("\n", $_REQUEST[$valname]); if ($_REQUEST[$valname]) { print("●"); } else { print("○"); } } else { if ($value == $_REQUEST[$valname]) { print("●"); } else { print("○"); } } print("$msg"); } elseif ($directive == "TEXTBOX") { print("
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "textarea"; $value = 0; ++$qno; printf("Q%d: %s", $qno, $msg); $valname = sprintf("q%d", $qno); print("
--\n"); print(htmlspecialchars($_REQUEST[$valname])); print("\n--
\n"); $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); printf("\n", chop($msg)); } elseif ($directive == "RESET2") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); printf("\n", chop($msg)); } } fclose($fd); ?> \n"); while (!feof($fd)) { $line = fgets($fd, $maxline); if (ereg("^END-OF-MESSAGE", $line)) { break; } print($line); } } elseif ($directive == "MESSAGE3") { print("
\n"); while (!feof($fd)) { $line = fgets($fd, $maxline); if (ereg("^END-OF-MESSAGE", $line)) { break; } print($line); } } elseif ($directive == "RADIO") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "radio"; $value = 0; ++$qno; $answer .= "\n"; $answer .= sprintf("Q%d: %s", $qno, strip_tags($msg)); $valname = sprintf("q%d", $qno); $answer .= sprintf(" %s:", $_REQUEST[$valname]); } elseif ($directive == "CHECK") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "checkbox"; $value = 0; ++$qno; $answer .= "\n"; $answer .= sprintf("Q%d: %s", $qno, strip_tags($msg)); } elseif ($directive == "SUBTEXT") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); ++$value; $valname = sprintf("q%dt%d", $qno, $value); $answer .= sprintf(" %s %s:", $valname, chop($msg)); $answer .= "「" . $_REQUEST[$valname] . "」" ; $answer .= "\n"; } elseif (($directive == "VALUE") || ($directive == "VALUE+")) { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); ++$value; if ($type == "checkbox") { $valname = sprintf("q%dc%d", $qno, $value); if ($_REQUEST[$valname]) { $answer .= sprintf(" %s:", $valname); $answer .= "●"; $answer .= strip_tags($msg); } } else { if ($value == $_REQUEST[$valname]) { $answer .= "●"; $answer .= strip_tags($msg); } } } elseif ($directive == "TEXTBOX") { $msg = ereg_replace("^[^\t\n ]+[\t\n ]+", "", $line); $type = "textarea"; $value = 0; ++$qno; $answer .= "\n"; $answer .= sprintf("Q%d: %s", $qno, strip_tags($msg)); $valname = sprintf("q%d", $qno); $answer .= $_REQUEST[$valname]; } } fclose($fd); print("
\n"); print(htmlspecialchars($answer)); print("\n