approveproject_form.php3 2.74 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
#
# Only known and logged in users can do this.
#
12
$uid = GETLOGIN();
13
14
15
16
17
LOGGEDINORDIE($uid);

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

23
24
25
26
27
28
29
30
#
# Verify arguments.
# 
if (!isset($pid) ||
    strcmp($pid, "") == 0) {
    USERERROR("You must provide a project ID.", 1);
}

31
#
32
# Check to make sure thats this is a valid PID.
33
34
#
$query_result = mysql_db_query($TBDBNAME,
35
	"SELECT * FROM projects WHERE pid=\"$pid\"");
36
if (mysql_num_rows($query_result) == 0) {
37
  USERERROR("The project $pid is not a valid project.", 1);
38
39
}

40
echo "<center><h3>You have the following choices:</h3></center>
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
      <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>

60
61
62
63
64
65
        <tr>
            <td>More Info</td>
            <td>-</td>
            <td>Ask for more info</td>
        </tr>

66
67
68
69
70
71
72
73
        <tr>
            <td>Postpone</td>
            <td>-</td>
            <td>Twiddle your thumbs some more</td>
        </tr>
      </table>\n";

#
74
75
76
# This will spit out the info.
#
include("showproject_dump.php3");
77

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

echo "<tr>
88
89
90
91
92
93
94
95
96
97
98
99
100
          <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>
101
102
          <td>Use the text box (70 columns wide) to add a message to the
              email notification. </td>
103
104
      </tr>\n";

105
echo "<tr>
106
         <td align=center class=left>
107
             <textarea name=message rows=15 cols=70></textarea>
108
109
110
111
112
         </td>
      </tr>\n";

echo "<tr>
          <td align=center colspan=2>
113
114
115
116
              <b><input type='submit' value='Submit' name='OK'></td>
      </tr>
      </form>
      </table>\n";
117
118
119
120
121

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