approveproject_form.php3 2.62 KB
Newer Older
1 2 3
<?php
include("defs.php3");

4 5 6 7 8
#
# Standard Testbed Header
#
PAGEHEADER("New Project Approval");

9 10 11 12 13 14 15 16
#
# Only known and logged in users can do this.
#
LOGGEDINORDIE($uid);

#
# Of course verify that this uid has admin privs!
#
17 18
$isadmin = ISADMIN($uid);
if (! $isadmin) {
19 20 21
    USERERROR("You do not have admin privledges to approve projects!", 1);
}

22 23
echo "<center><h1>Approve a Project</h1></center>\n";

24
#
25
# Check to make sure thats this is a valid PID.
26 27
#
$query_result = mysql_db_query($TBDBNAME,
28
	"SELECT * FROM projects WHERE pid=\"$pid\"");
29
if (mysql_num_rows($query_result) == 0) {
30
  USERERROR("The project $pid is not a valid project.", 1);
31 32
}

33
echo "<center><h3>You have the following choices:</h3></center>
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
      <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>

53 54 55 56 57 58
        <tr>
            <td>More Info</td>
            <td>-</td>
            <td>Ask for more info</td>
        </tr>

59 60 61 62 63 64 65 66
        <tr>
            <td>Postpone</td>
            <td>-</td>
            <td>Twiddle your thumbs some more</td>
        </tr>
      </table>\n";

#
67 68 69
# This will spit out the info.
#
include("showproject_dump.php3");
70

71
#
72
# Now put up the menu choice along with a text box for an email message.
73
#
74 75 76 77 78
echo "<center>
      <h3>What would you like to do?</h3>
      </center>
      <table align=center border=1>
      <form action='approveproject.php3?uid=$uid&pid=$pid' method='post'>\n";
79 80

echo "<tr>
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
          <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>
          <td>Use the text box to add a message to the email notification.</td>
      </tr>\n";

97
echo "<tr>
98 99 100 101 102 103 104
         <td align=center class=left>
             <textarea name=message rows=5 cols=60></textarea>
         </td>
      </tr>\n";

echo "<tr>
          <td align=center colspan=2>
105 106 107 108
              <b><input type='submit' value='Submit' name='OK'></td>
      </tr>
      </form>
      </table>\n";
109 110 111 112 113

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