/[webwml]/newmaint/deletenm.wml
ViewVC logotype

Contents of /newmaint/deletenm.wml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Sun Aug 14 19:16:26 2005 UTC (7 years, 9 months ago) by tbm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +4 -0 lines
add proper copyright headers.  This code is unser the GPL, version 2 or
higher.  Most of it has been written by Craig Small <csmall@debian.org> and
Martin Michlmayr <tbm@cyrius.com>, with some contributions from Peter
Palfrader <weasel@debian.org>, Ralf Treinen <treinen@debian.org> and
others.
1 # Copyright (C) 2001 Craig Small <csmall@debian.org>
2 # Copyright (C) 2001, 2002, 2003, 2004, 2005 Martin Michlmayr <tbm@cyrius.com>
3 # This file may be distributed under the GPL v2 or higher.
4
5 <?
6 session_start();
7 include("config.inc");
8 include("common.inc");
9
10 function delete_applicant($db, $email) {
11 global $row, $query;
12 $sql = "DELETE from applicant WHERE email='$email'";
13 if (! ($query = pg_exec($db, $sql))) {
14 echo "Problem with query", pg_ErrorMessage($db), "<BR>";
15 echo "SQL was: $sql<BR>\n";
16 return FALSE;
17 }
18 return TRUE;
19 }
20 ?>
21 #use wml::nmpage title="Debian New Maintainer - Delete Applicant"
22 <?
23 if (!session_is_registered("s_username") || !session_is_registered("s_isam") || !session_is_registered("s_isfd")) {
24 ?>
25 <STRONG>
26 You should not be here!</STRONG>
27 <? } else {
28 session_register("s_username");
29 session_register("s_isfd");
30 session_register("s_isdam");
31 # Strip guff
32 $email = strip_tags($_REQUEST['email']);
33
34 if (! ($db = open_db())) {
35 echo "<P>Cannot open SQL database</P>";
36 return FALSE;
37 }
38 ?>
39 <H1>Debian New Maintainer Status</H1><BR>
40 <? if ($_SESSION['s_isfd'] == 't' && $email != "") { ?>
41 <H3>Deleting Applicant</H3>
42 <?
43 if (! find_applicant($db, $email)) {
44 return FALSE;
45 }
46 if (delete_applicant($db, $email)) {
47 ?>
48 <P>Successfully deleted <? echo $email; ?> from the list of applicants.
49 <?
50 logger($db, $_SESSION['s_username'], $row["manager"], "REMOVE", ($row["forename"] . " " . $row["surname"]), $email);
51 } else { ?>
52 <P> Could not delete <? echo $email; ?> from list of applicants.
53 <? } # check database query ?>
54 <? } else { #you are not a fd, go away ?>
55 <P>What are you doing here huh? This place is for Front Desk people!
56 <? } } ?>

  ViewVC Help
Powered by ViewVC 1.1.5