0) { $key = GenerateKey(); $duplicate = false; foreach($keyData as $entry) if ($entry[0] == $key) { $duplicate = true; break; } if ($duplicate) continue; array_push($keyData, array($key, KEYSTATE_UNISSUED)); $amount--; } WriteKeyFile($keyFile, $keyData); } else $keyData = ReadKeyFile($keyFile); } // if the page was refreshed by the user, just load the key file else $keyData = ReadKeyFile($keyFile); // generate a new submission id that is used within the form to prevent double posts $_SESSION["submissionId"] = rand(); ?> ESE Evaluation für Studenten
\n"; CreateSectionHeader("Key Overview"); CreateRowHeader(); echo "
\n

Index

\n
\n"; echo "
\n

Code

\n
\n"; echo "
\n

State

\n
\n"; echo "
\n

Delete

\n
\n"; echo "
"; for ($i = 0; $i < count($keyData); $i++) { CreateRowHeader(); echo "
\n"; echo "

" . $i . "

\n"; echo " "; echo "
\n"; echo "
\n"; echo " \n"; echo "
\n"; echo "
\n"; echo " "; echo "
\n"; echo "
\n"; echo " \n"; echo "
\n"; echo "\n"; } CreateRowHeader(); echo "
\n \n
\n"; echo "
\n"; echo "
\n \n
\n"; echo "\n"; // Hidden input with previously generated id - used for preventing double posts echo "\n"; echo "\n"; ?> \n"; CreateSectionHeader("Key File Manipulation"); CreateTextBox("Number of keys", "keyAmount", "10"); CreateTextBox("Key file name", "keyFile", $keyFile); CreateRowHeader(); echo "
\n \n
\n"; echo "
\n"; echo "
\n \n
\n"; echo "\n"; // Hidden input with previously generated id - used for preventing double posts echo "\n"; echo "\n"; ?>