approveproject_form.php3 2.65 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<html>
<head>
<title>New Project Approval</title>
<link rel='stylesheet' href='tbstyle.css' type='text/css'>
</head>
<body>
<?php
include("defs.php3");

#
# Only known and logged in users can do this.
#
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
echo "<center><h1>Approve a Project</h1></center>\n";

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

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

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

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

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

72
#
73
# Now put up the menu choice along with a text box for an email message.
74
#
75
76
77
78
79
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";
80
81

echo "<tr>
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
          <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";

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

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