approveproject_form.php3 2.83 KB
Newer Older
1
<?php
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2 3 4 5 6
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
7 8
include("defs.php3");

9 10 11 12 13
#
# Standard Testbed Header
#
PAGEHEADER("New Project Approval");

14 15 16
#
# Only known and logged in users can do this.
#
17
$uid = GETLOGIN();
18 19 20 21 22
LOGGEDINORDIE($uid);

#
# Of course verify that this uid has admin privs!
#
23 24
$isadmin = ISADMIN($uid);
if (! $isadmin) {
25 26 27
    USERERROR("You do not have admin privledges to approve projects!", 1);
}

28 29 30 31 32 33 34 35
#
# Verify arguments.
# 
if (!isset($pid) ||
    strcmp($pid, "") == 0) {
    USERERROR("You must provide a project ID.", 1);
}

36
#
37
# Check to make sure thats this is a valid PID.
38
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
39 40
$query_result =
    DBQueryFatal("SELECT * FROM projects WHERE pid='$pid'");
41
if (mysql_num_rows($query_result) == 0) {
42
  USERERROR("The project $pid is not a valid project.", 1);
43 44
}

45
echo "<center><h3>You have the following choices:</h3></center>
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
      <table align=center border=0>
        <tr>
            <td>Deny</td>
            <td>-</td>
            <td>Deny project application (kills project records)</td>
        </tr>

        <tr>
            <td>Destroy</td>
            <td>-</td>
            <td>Deny project application, and kill the user account</td>
        </tr>

        <tr>
            <td>Approve</td>
            <td>-</td>
            <td>Approve the project</td>
        </tr>

65 66 67 68 69 70
        <tr>
            <td>More Info</td>
            <td>-</td>
            <td>Ask for more info</td>
        </tr>

71 72 73 74 75 76 77 78
        <tr>
            <td>Postpone</td>
            <td>-</td>
            <td>Twiddle your thumbs some more</td>
        </tr>
      </table>\n";

#
79 80 81
# This will spit out the info.
#
include("showproject_dump.php3");
82

83
#
84
# Now put up the menu choice along with a text box for an email message.
85
#
86 87 88 89
echo "<center>
      <h3>What would you like to do?</h3>
      </center>
      <table align=center border=1>
90
      <form action='approveproject.php3?pid=$pid' method='post'>\n";
91 92

echo "<tr>
93 94 95 96 97 98 99 100 101 102 103 104 105
          <td align=center>
              <select name=approval>
                      <option value='postpone'>Postpone</option>
                      <option value='approve'>Approve</option>
                      <option value='moreinfo'>More Info</option>
                      <option value='deny'>Deny</option>
                      <option value='destroy'>Destroy</option>
              </select>
          </td>
       </tr>\n";


echo "<tr>
106 107
          <td>Use the text box (70 columns wide) to add a message to the
              email notification. </td>
108 109
      </tr>\n";

110
echo "<tr>
111
         <td align=center class=left>
112
             <textarea name=message rows=15 cols=70></textarea>
113 114 115 116 117
         </td>
      </tr>\n";

echo "<tr>
          <td align=center colspan=2>
118 119 120 121
              <b><input type='submit' value='Submit' name='OK'></td>
      </tr>
      </form>
      </table>\n";
122 123 124 125 126

#
# Standard Testbed Footer
# 
PAGEFOOTER();
127
?>