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(); ?>
Index
\nCode
\nState
\nDelete
\n" . $i . "
\n"; echo " "; echo "