\n\n\n\n"; ?> #use wml::gpgpage title="GPG Signing Coordination - Your profile" You should not be here! Cannot open database.

"; return FALSE; } # user pressed submit if ($city || $country) { $sql = "SELECT id FROM people WHERE email = '$s_username'"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } if (pg_NumRows($result) != 1) { echo "That e-mail address is wicked."; return FALSE; } $row = pg_Fetch_Array($result, 0); $who = $row["id"]; $now = strftime('%Y-%m-%d'); $sql = "UPDATE people SET last_update = '$now' WHERE id = '$who'"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } if (! $id) { $sql = "INSERT INTO places (who, city, country) VALUES ($who, '$city', '$country')"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } $oid = pg_getlastoid($result); } else { $sql = "UPDATE places SET city = '$city', country = '$country' WHERE id = '$id'"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } $sql = "SELECT oid FROM places WHERE id = '$id'"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } if (pg_NumRows($result) == 1) { $row = pg_Fetch_Array($result, 0); $oid = $row["oid"]; } else { echo "Cannot find OID for ID."; return FALSE; } } if ($begin_year == "always") { $begin = ""; } else { $begin = sprintf("%4d-%02d-%02d", $begin_year, $begin_month, $begin_day); } if ($begin) { $sql = "UPDATE places SET begin = '$begin' WHERE oid = '$oid'"; } else { $sql = "UPDATE places SET begin = NULL WHERE oid = '$oid'"; } if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } if ($end_year == "always") { $end = ""; } else { $end = sprintf("%4d-%02d-%02d", $end_year, $end_month, $end_day); } if ($end) { $sql = "UPDATE places SET finish = '$end' WHERE oid = '$oid'"; } else { $sql = "UPDATE places SET finish = NULL WHERE oid = '$oid'"; } if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } echo "here to add new entries or view the current ones."; echo $html_end; return TRUE; } if ($remove && $id) { $sql = "DELETE FROM places WHERE id = '$id'"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } echo "here to add new entries or view the current ones."; echo $html_end; return TRUE; } # user wants to fill out the form # modify an entry (if $id exists), or add a new one) if ($id) { $sql = "SELECT begin, finish, city, country FROM places WHERE id = '$id'"; if (! ($result = pg_exec($db, $sql))) { echo "Problem with query", pg_ErrorMessage($db), "
"; return FALSE; } if (pg_NumRows($result) != 1) { echo "Not enough or too many results. That should not happen."; return FALSE; } $row = pg_Fetch_Array($result, 0); $begin = $row["begin"]; $finish = $row["finish"]; $city = $row["city"]; $country = $row["country"]; } else { $begin = $finish = ""; $city = $country = ""; } ?>
"; echo ""; echo ""; echo ""; echo "\n"; } ?> "; } ?> "; echo ""; echo "\n"; ?>
$title
City city and/or event (e.g. a computer conference)
Country