session_start(); session_name("GPG-Coord"); session_unregister("s_username"); include("gpgconfig.inc"); include("common.inc"); ?> #use wml::gpgpage title="GPG Signing Coordination - Register" if ($email) { if ($passwd != $passwd2) { echo "Passwords do not match, please try again"; } else { if (! ($db = open_db())) { return FALSE; } $sql = "SELECT id FROM people WHERE email = '$email'"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), ""; return FALSE; } if (pg_NumRows($result) > 0) { echo "That e-mail address is in the database already."; return FALSE; } if ($offer == "on") { $offer = "TRUE"; } else { $offer = "FALSE"; } $now = strftime('%Y-%m-%d'); $sql = "INSERT INTO people (forename, surname, email, passwd, offer, last_update) VALUES ('$forename', '$surname', '$email', '$passwd', $offer, '$now')"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), ""; return FALSE; } else { echo "OK, you have been registered."; $s_username = $email; session_register("s_username"); echo " Click =SID?> echo ">here to add new entries."; } } } else { echo "\n", "\n", "\n", "Forename", "Surname", "E-mail:", "", "Password: ", " (Note that password are stored and transmitted unencrypted.", "Password (again): ", "Offer to sign key", " (If you are a Debian developer, click here; if you are looking for a GPG signature, do not click here)", " ", "\n\n\n"; } ?>