| 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 |
include("config.inc");
|
| 7 |
include("common.inc");
|
| 8 |
|
| 9 |
function email_user($db, $forename, $surname, $email,$adate) {
|
| 10 |
$body = "Hello $forename $surname,\n";
|
| 11 |
$body .= "\n";
|
| 12 |
$body .= "Thank you for your interest in becoming a Debian Developer. Your name\n";
|
| 13 |
$body .= "and email address has been entered into the new maintainer database\n";
|
| 14 |
$body .= "at http://nm.debian.org/\n";
|
| 15 |
$body .= "\n";
|
| 16 |
$body .= "This email address was entered into the Debian New Maintainer web site\n";
|
| 17 |
$body .= "from the IP address ". getenv(REMOTE_ADDR) . ". If you did not apply on that web site\n";
|
| 18 |
$body .= "then email new-maintainer@debian.org asking to be removed.\n";
|
| 19 |
$body .= "\n";
|
| 20 |
$body .= "Please ask your advocate to verify your application. When they\n";
|
| 21 |
$body .= "have done that, an Application Manager (AM) will be assigned to you. It\n";
|
| 22 |
$body .= "may take a while until your AM contacts you regarding your application,\n";
|
| 23 |
$body .= "as there are many applicants in the database.\n\n";
|
| 24 |
|
| 25 |
$body .= "In the meanwhile, please review the membership information on \n";
|
| 26 |
$body .= "http://www.debian.org/devel/join/\n";
|
| 27 |
$body .= "and\n";
|
| 28 |
$body .= "http://www.debian.org/devel/join/newmaint\n";
|
| 29 |
$body .= "You do not need to send any additional information at this time.\n";
|
| 30 |
$body .= "\n";
|
| 31 |
$body .= "Please be patient, we are working the list of applicants as quickly as\n";
|
| 32 |
$body .= "we can.\n";
|
| 33 |
|
| 34 |
$headers = "From: NM Front Desk <new-maintainer@debian.org>\n";
|
| 35 |
$headers .= "Reply-To: new-maintainer@debian.org\n";
|
| 36 |
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
|
| 37 |
$headers .= "X-Mailer: PHP/" . phpversion();
|
| 38 |
mail($email, "New Debian Maintainer: $email", $body, $headers);
|
| 39 |
return TRUE;
|
| 40 |
}
|
| 41 |
|
| 42 |
function check_user($db, $myuser) {
|
| 43 |
$sql = "SELECT * FROM applicant WHERE email='$myuser'";
|
| 44 |
if (! ($query = pg_exec($db, $sql))) {
|
| 45 |
echo "Problem with interrogating database: ", pg_ErrorMessage($db), "<BR>\n";
|
| 46 |
return FALSE;
|
| 47 |
}
|
| 48 |
if (pg_NumRows($query) == 1) {
|
| 49 |
echo "This email address already exists<BR>\n";
|
| 50 |
return FALSE;
|
| 51 |
}
|
| 52 |
return TRUE;
|
| 53 |
}
|
| 54 |
function register_user($db, $forename, $surname, $email, $adate)
|
| 55 |
{
|
| 56 |
$sql = "INSERT INTO applicant (forename, surname, email, apply_date) VALUES ('$forename', '$surname', '$email', '$adate')";
|
| 57 |
|
| 58 |
if (! ($result = pg_exec($db, $sql))) {
|
| 59 |
echo "Problem with interrogating database: ", pg_ErrorMessage($db), "<BR>\n";
|
| 60 |
return FALSE;
|
| 61 |
}
|
| 62 |
if (($tuples = pg_CmdTuples($result)) != 1) {
|
| 63 |
echo "Only one row should be effected but $tuples rows were<BR>\n";
|
| 64 |
return FALSE;
|
| 65 |
}
|
| 66 |
return TRUE;
|
| 67 |
}
|
| 68 |
?>
|
| 69 |
#use wml::nmpage title="Debian New Maintainer Application"
|
| 70 |
<H1>New Maintainer Application</H1>
|
| 71 |
<?
|
| 72 |
if ($_REQUEST['what'] == "new") {
|
| 73 |
if ( ($db = open_db())) {
|
| 74 |
|
| 75 |
$forename = trim(strip_tags($_REQUEST['forename']));
|
| 76 |
$surname = trim(strip_tags($_REQUEST['surname']));
|
| 77 |
$email = trim(strip_tags($_REQUEST['email']));
|
| 78 |
$adate = strftime('%Y-%m-%d');
|
| 79 |
|
| 80 |
$errors = "";
|
| 81 |
if ( ! $_REQUEST['dfsgcheck'] ) {
|
| 82 |
$errors .= "<LI>You have not checked the box saying you have read and agreed to the Debian Social Contract and the DFSG.\n";
|
| 83 |
}
|
| 84 |
if ( ! $_REQUEST['idcheck'] ) {
|
| 85 |
$errors .= "<LI>You have not checked the box saying you either have a signed GPG or a scanned and signed photo ID.\n";
|
| 86 |
}
|
| 87 |
if ( ! $_REQUEST['tnscheck'] ) {
|
| 88 |
$errors .= "<LI>You have not checked the box saying you have either a package built or some other proof of experience in other Debian activites.\n";
|
| 89 |
}
|
| 90 |
if ( ! $_REQUEST['doccheck'] ) {
|
| 91 |
$errors .= "<LI>You have not checked the box saying you have read the Debian developers documentation.\n";
|
| 92 |
}
|
| 93 |
if ($forename == "") { $errors .= "<LI>You did not supply a first name.\n"; }
|
| 94 |
if ($surname == "") { $errors .= "<LI>You did not supply a surname.\n"; }
|
| 95 |
if ($email == "") { $errors .= "<LI>You did not supply an email address.\n"; }
|
| 96 |
# This is not an error but a warning.
|
| 97 |
if ( ! $_REQUEST['advcheck'] && ! $errors ) {
|
| 98 |
echo "<P>You have not checked the box saying you have a Debian Developer advocate.\n";
|
| 99 |
echo "If an adovcate does not verify your application within two weeks, it will\n";
|
| 100 |
echo " be deleted.<BR>\n";
|
| 101 |
|
| 102 |
}
|
| 103 |
if ($errors != "") {
|
| 104 |
echo "<P>There were problems with your application:<UL>$errors</UL><BR>\n";
|
| 105 |
} else { # fields are there
|
| 106 |
if (!check_user($db, $email)) {
|
| 107 |
?>
|
| 108 |
<P>There is something wrong with the database, or this email address is already
|
| 109 |
registered. Registration failed.
|
| 110 |
<?
|
| 111 |
} else { #user is ok
|
| 112 |
if (!register_user($db, $forename, $surname, $email,$adate)) {
|
| 113 |
?>
|
| 114 |
<P>Problem with registering you into the database for some reason, try again
|
| 115 |
later.
|
| 116 |
<?
|
| 117 |
} else { #register ok
|
| 118 |
echo "<P>Your registration was successful! Your application date is $adate. Please ask your advocate to visit ";
|
| 119 |
echo "<A HREF = \"nmadvocate.php?email=";
|
| 120 |
echo urlencode($email);
|
| 121 |
echo "\">this web page</A> and verify your application.\n";
|
| 122 |
email_user($db, $forename, $surname, $email,$adate);
|
| 123 |
logger($db, "", "", "APPLY", ($forename . " " . $surname), $email);
|
| 124 |
} #register ok
|
| 125 |
} #user ok
|
| 126 |
} # fields ok
|
| 127 |
} # db open
|
| 128 |
} else { #not called yet
|
| 129 |
?>
|
| 130 |
<P>Thank you for your interest in Debian, if you would like to be put into
|
| 131 |
the new maintainer list then enter in the information below. Before you
|
| 132 |
apply, you should have a look at the <A href="http://www.debian.org/devel/join/nm-checklist">Applicant's Checklist</A>
|
| 133 |
to see what the Application Manager is looking for. It is a great help if
|
| 134 |
you can be ready with the information that the checklist asks for
|
| 135 |
<STRONG>before</STRONG> you apply.
|
| 136 |
<P>There is a large backlog of applicants which means it may take some time
|
| 137 |
to get you through the system. To assist applicants coming behind you,
|
| 138 |
please try to be prompt in replying to your application manager. If, at the
|
| 139 |
moment, outside life is busy and you cannot reply in a timely fashion, then
|
| 140 |
perhaps you should hold off applying until the workload abates.
|
| 141 |
<P>Finally remember all Application Managers, Front Desk members and
|
| 142 |
Developer Accounts Managers are all Debian volunteers with things outside
|
| 143 |
of new maintainer processing to take up their time. We are trying to
|
| 144 |
be quick, but it helps if you are patient.
|
| 145 |
<P> <B>-- Debian New Maintainer Committee</B>
|
| 146 |
<HR>
|
| 147 |
<FORM method="post" action="newnm.php">
|
| 148 |
<INPUT type="hidden" name="what" value="new">
|
| 149 |
<TABLE width="90%">
|
| 150 |
<TR><TD colspan="3" ><P>
|
| 151 |
Have you read the Social Contract and DFSG and agree to abide by them
|
| 152 |
in your Debian-related work? (You can read them
|
| 153 |
<a href="http://www.debian.org/social_contract">here</a>.)</TD>
|
| 154 |
<TD><INPUT name="dfsgcheck" type="checkbox"></TD></TR>
|
| 155 |
<TR><TD colspan="3" ><P>
|
| 156 |
Do you yet have a GPG key signed by a current developer or some
|
| 157 |
other photo ID scanned in and signed with your GPG key? (Click
|
| 158 |
<a href=" http://www.debian.org/devel/join/nm-step2">here</a>
|
| 159 |
for more information on this.) </TD>
|
| 160 |
<TD><INPUT name="idcheck" type="checkbox"></TD></TR>
|
| 161 |
<TR><TD colspan="3" ><P>
|
| 162 |
If you intend to package software, do you have a Debian package in the
|
| 163 |
archive through a sponsor? And if you intend to
|
| 164 |
do other things (e.g. port Debian to other architectures, help with
|
| 165 |
documentation, Quality Assurance or Security), do you have experience
|
| 166 |
in those things and have already participated in such activities for
|
| 167 |
Debian?</TD>
|
| 168 |
<TD><INPUT name="tnscheck" type="checkbox"></TD></TR>
|
| 169 |
<TR><TD colspan="3" ><P>
|
| 170 |
Have you read the relevant documentation (Debian Policy,
|
| 171 |
Developers' Reference, New Maintainers' Guide, etc)
|
| 172 |
found <a href="http://www.debian.org/devel/">here</a>?</TD>
|
| 173 |
<TD><INPUT name="doccheck" type="checkbox"></TD></TR>
|
| 174 |
<TR><TD colspan="3"> <P>
|
| 175 |
Has an existing Debian developer agreed to be an advocate and verify your
|
| 176 |
application? (Click
|
| 177 |
<a href=" http://www.debian.org/devel/join/nm-step1">here</a>
|
| 178 |
for more information on this.)
|
| 179 |
</TD><TD><INPUT name="advcheck" type="checkbox"></TD></TR>
|
| 180 |
<TR><TD colspan="4">
|
| 181 |
<P>
|
| 182 |
<B>PLEASE NOTE:</B> <EM>If you are unable to answer "yes" to all of the questions
|
| 183 |
asked, you are not yet ready to apply to the New Maintainer process.
|
| 184 |
If you answer "yes" anyway, your AM may choose to reject your application
|
| 185 |
and tell you to apply again when you are ready.</EM>
|
| 186 |
</TD></TR>
|
| 187 |
</TABLE><HR><TABLE width="90%">
|
| 188 |
<TR><TD>First Name:</TD><TD><INPUT name="forename" type=text></TD></TR>
|
| 189 |
<TR><TD>Last Name:</TD> <TD><INPUT name="surname" type=text></TD></TR>
|
| 190 |
<TR><TD>Email Address:</TD> <TD><INPUT name="email" type=text></TD></TR>
|
| 191 |
<TR><TD> </TD><TD><INPUT type="submit" value="Apply!"></TD></TR>
|
| 192 |
</TABLE>
|
| 193 |
</FORM>
|
| 194 |
<? } # not called yet ?>
|