approveproject_form.php3 2.76 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
echo "<center><h1>Approve a Project</h1></center>\n";

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

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

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

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

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

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

echo "<tr>
90
91
92
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>
          <td>Use the text box to add a message to the email notification.</td>
      </tr>\n";

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

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

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