");
+
+define("TITLE_COLOR", " bgcolor=000000 ");
+define("TITLE_FONT", " ");
+define("BODY_COLOR", " bgcolor=ffffff ");
+define("NOLOGIN", "Not logged in. Click here to login.\n");
+define("BADPASS", "The password you entered is incorrect. Click the Back button on your browser to re-enter your password or try again later.");
+define("DIFFPASS", "You've typed two different passwords. Click the Back button on your browser to edit your information, making sure you type the same password in both password fields.");
+define("PROJECT", "Sample project");
+
+function get_user_from_cookie() {
+ $auth = "";
+ $c = getenv("HTTP_COOKIE");
+ $d = str_replace("; ", "&", $c);
+ parse_str($d);
+ if ($auth) return lookup_user_auth($auth);
+ return NULL;
+}
+
+function show_login($user) {
+ if ($user) {
+ printf("Logged in as %s.\n", $user->name);
+ printf(" Log in as someone else.\n");
+ } else {
+ echo NOLOGIN;
+ }
+}
+
+function page_head($title) {
+ echo "$title\n";
+ echo TABLE . "