| 1 |
<?
|
| 2 |
session_start();
|
| 3 |
include("config.inc");
|
| 4 |
include("common.inc");
|
| 5 |
|
| 6 |
function delete_applicant($db, $email) {
|
| 7 |
global $row, $query;
|
| 8 |
$sql = "DELETE from applicant WHERE email='$email'";
|
| 9 |
if (! ($query = pg_exec($db, $sql))) {
|
| 10 |
echo "Problem with query", pg_ErrorMessage($db), "<BR>";
|
| 11 |
echo "SQL was: $sql<BR>\n";
|
| 12 |
return FALSE;
|
| 13 |
}
|
| 14 |
return TRUE;
|
| 15 |
}
|
| 16 |
?>
|
| 17 |
#use wml::nmpage title="Debian New Maintainer - Delete Applicant"
|
| 18 |
<?
|
| 19 |
if (!session_is_registered("s_username") || !session_is_registered("s_isam") || !session_is_registered("s_isfd")) {
|
| 20 |
?>
|
| 21 |
<STRONG>
|
| 22 |
You should not be here!!</STRONG>
|
| 23 |
<? } else {
|
| 24 |
session_register("s_username");
|
| 25 |
session_register("s_isfd");
|
| 26 |
session_register("s_isdam");
|
| 27 |
# Strip guff
|
| 28 |
$email = strip_tags($email);
|
| 29 |
|
| 30 |
if (! ($db = open_db())) {
|
| 31 |
echo "<P>Cannot open SQL database</P>";
|
| 32 |
return FALSE;
|
| 33 |
}
|
| 34 |
?>
|
| 35 |
<H1>Debian New Maintainer Status</H1><BR>
|
| 36 |
<? if ($s_isfd == 't' && $email != "") { ?>
|
| 37 |
<H3>Deleting Applicant</H3>
|
| 38 |
<?
|
| 39 |
if (! find_applicant($db, $email)) {
|
| 40 |
return FALSE;
|
| 41 |
}
|
| 42 |
if (delete_applicant($db, $email)) {
|
| 43 |
?>
|
| 44 |
<P>Successfully deleted <? echo $email; ?> from the list of applicants.
|
| 45 |
<?
|
| 46 |
logger($db, $s_username, $row["manager"], "REMOVE", ($row["forename"] . " " . $row["surname"]), $email);
|
| 47 |
} else { ?>
|
| 48 |
<P> Could not delete <? echo $email; ?> from list of applicants.
|
| 49 |
<? } # check database query ?>
|
| 50 |
<? } else { #you are not a fd, go away ?>
|
| 51 |
<P>What are you doing here huh? This place is for Front Desk people!!
|
| 52 |
<? } } ?>
|