| 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 find_user($db, $email) {
|
| 11 |
global $row, $query;
|
| 12 |
$sql = "SELECT * from applicant WHERE email='$email'";
|
| 13 |
if (! ($query = pg_exec($db, $sql))) {
|
| 14 |
echo "Problem with query", pg_ErrorMessage($db), "<BR>";
|
| 15 |
return FALSE;
|
| 16 |
}
|
| 17 |
$row = pg_Fetch_Array($query, 0);
|
| 18 |
return TRUE;
|
| 19 |
}
|
| 20 |
function print_textarea($title, $name, $value, $editable)
|
| 21 |
{
|
| 22 |
if ($editable) {
|
| 23 |
echo "<TR><TD width=\"200\">$title</TD><TD><textarea name=\"$name\" rows=\"10\" cols=\"60\">$value</TEXTAREA></TD></TR>\n";
|
| 24 |
} else {
|
| 25 |
echo "<TR><TD width=\"200\">$title</TD><TD>$value</TD></TR>\n";
|
| 26 |
}
|
| 27 |
}
|
| 28 |
?>
|
| 29 |
#use wml::nmpage title="Debian New Maintainer - Applicant Status"
|
| 30 |
<?
|
| 31 |
|
| 32 |
if (!session_is_registered("s_username") || !session_is_registered("s_isam")) {
|
| 33 |
?>
|
| 34 |
<STRONG>
|
| 35 |
You should not be here!</STRONG>
|
| 36 |
<? } else {
|
| 37 |
session_register("s_username");
|
| 38 |
session_register("s_isfd");
|
| 39 |
session_register("s_isdam");
|
| 40 |
|
| 41 |
|
| 42 |
if ( (($db = open_db())) && (find_user($db, $_REQUEST['user']))) {
|
| 43 |
?>
|
| 44 |
<H1>New Maintainer Applicant: <? echo $row["email"] ?></H1>
|
| 45 |
<SMALL><B>Note:</B>The database will accept dates in the following formats:
|
| 46 |
4 May 1999 4/5/1999 1999/5/4. Do not use mm/dd/yyyy! If you want to enter
|
| 47 |
today's date, you can type "today" (without the quotes).</SMALL>
|
| 48 |
<FORM method=post action="amupdate.php?<?=SID?>">
|
| 49 |
<INPUT name="emailkey" type="hidden" value="<? echo $row["email"] ?>">
|
| 50 |
<TABLE valign="t">
|
| 51 |
<?
|
| 52 |
if ($_SESSION['s_isdam'] == 't' || $_SESSION['s_isfd'] == 't') { $fd_only = TRUE; }
|
| 53 |
if ($_SESSION['s_isdam'] == 't' ) { $dam_only = TRUE; }
|
| 54 |
if ($_SESSION['s_username'] == trim($row["manager"]) || $_SESSION['s_isfd'] == 't' || $_SESSION['s_isdam'] == 't')
|
| 55 |
{ $am_only = TRUE; }
|
| 56 |
# Fill in some default values
|
| 57 |
if ($_SESSION['s_isfd'] == 't' && $row["fd_member"] == '') {
|
| 58 |
$row["fd_member"] = $_SESSION['s_username'];
|
| 59 |
}
|
| 60 |
if ($_SESSION['s_isdam']== 't' && $row["da_member"] == '') {
|
| 61 |
$row["da_member"] = $_SESSION['s_username'];
|
| 62 |
}
|
| 63 |
# Print values
|
| 64 |
#echo "Comparing '", $s_username, "' with '", trim($row["manager"], "'.";
|
| 65 |
print_text("Email Address", "email", $row["email"], $fd_only);
|
| 66 |
print_text("First Name", "forename", $row["forename"], $fd_only);
|
| 67 |
print_text("Last Name", "surname", $row["surname"], $fd_only);
|
| 68 |
print_text("Date of Application", "apply_date", $row["apply_date"], $fd_only);
|
| 69 |
print_text("Advocate login", "advocate", $row["advocate"], $fd_only);
|
| 70 |
print_text("Advocate Date", "advocate_date", $row["advocate_date"], $fd_only);
|
| 71 |
print_bool("Advocate Check OK", "advocate_ok", $row["advocate_ok"], $fd_only);
|
| 72 |
print_text("Advocate Check Date", "advocate_checked", $row["advocate_checked"], $fd_only);
|
| 73 |
print_text("Application Manager", "manager", $row["manager"], $fd_only);
|
| 74 |
print_text("Date AM Assigned", "manager_date", $row["manager_date"], $fd_only);
|
| 75 |
print_bool("AM Confirms Assignment", "am_confirm", $row["am_confirm"], $am_only);
|
| 76 |
print_text("Date AM Confirms Assignment", "am_confirm_date", $row["am_confirm_date"], $am_only);
|
| 77 |
print_text("Date AM Contacts Applicant", "am_contact", $row["am_contact"], $am_only);
|
| 78 |
print_bool("ID OK", "id_ok", $row["id_ok"], $am_only);
|
| 79 |
print_text("Checked on", "id_checked", $row["id_checked"], $am_only);
|
| 80 |
print_bool("Philosophy and Procedures Check Passed", "pnp_ok", $row["pnp_ok"], $am_only);
|
| 81 |
print_text("Checked on", "pnp_checked", $row["pnp_checked"], $am_only);
|
| 82 |
print_bool("Tasks and Skills Check Passed", "tns_ok", $row["tns_ok"], $am_only);
|
| 83 |
print_text("Checked on", "tns_checked", $row["tns_checked"], $am_only);
|
| 84 |
print_bool("AM approves and submits report", "approved", $row["approved"], $am_only | $dam_only);
|
| 85 |
print_text("Date:", "decision", $row["decision"], $am_only | $dam_only);
|
| 86 |
print_bool("FD says documentation complete", "application_ok", $row["application_ok"], $fd_only);
|
| 87 |
print_text("FD checked on", "application_ok_date", $row["application_ok_date"], $fd_only);
|
| 88 |
print_text("FD member", "fd_member", $row["fd_member"], $fd_only);
|
| 89 |
print_bool("DAM Phonecall Required", "da_phone_required", $row["da_phone_required"], $dam_only);
|
| 90 |
print_text("DAM Phones applicant", "da_phone", $row["da_phone"], $dam_only);
|
| 91 |
print_bool("DAM Approves maintainership", "da_approved", $row["da_approved"], $dam_only);
|
| 92 |
print_text("Checked on", "da_approved_date", $row["da_approved_date"], $dam_only);
|
| 93 |
print_text("DAM member", "da_member", $row["da_member"], $dam_only);
|
| 94 |
print_text("Date Account created", "newmaint", $row["newmaint"], $dam_only);
|
| 95 |
print_textarea("Application Manager Comments", "man_comment", $row["man_comment"], $am_only);
|
| 96 |
print_textarea("Debian Account Manager and Front Desk Comments", "da_comment", $row["da_comment"], $fd_only | $dam_only);
|
| 97 |
?>
|
| 98 |
<? if ($am_only || $fd_only || $dam_only) { ?>
|
| 99 |
<TR><TD align="m" colspan="2"><INPUT type="submit" value="Update Application"></TD></TR>
|
| 100 |
<? } #am or fd or dam ?>
|
| 101 |
</TABLE>
|
| 102 |
</FORM>
|
| 103 |
<? if ($fd_only) { ?>
|
| 104 |
<H3>Delete Applicant</H3>
|
| 105 |
<P>The button below will delete an applicant permanently from the database!
|
| 106 |
<STRONG>Use with care</STRONG>
|
| 107 |
<FORM method=post action="deletenm.php?<?=SID?>">
|
| 108 |
<INPUT name="email" type="hidden" value="<? echo $row["email"] ?>">
|
| 109 |
<INPUT value="Delete" name="delete" type="submit">
|
| 110 |
</FORM>
|
| 111 |
<? } #fd to delete applicant ?>
|
| 112 |
<? } else { ?>
|
| 113 |
<STRONG>Sorry there is a problem with connecting to the new maintainers database, please try again later.
|
| 114 |
</STRONG>
|
| 115 |
<? } } ?>
|