addgrp.php3 5.52 KB
Newer Older
1 2
<html>
<head>
3
<title>Start a New Project</title>
4
<link rel="stylesheet" href="tbstyle.css" type="text/css">
5 6
</head>
<body>
7
<?php
8 9
include("defs.php3");

10 11 12 13 14 15 16
$auth_usr = "";
if ( ereg("php3\?([[:alnum:]]+)",$REQUEST_URI,$Vals) ) {
  $auth_usr=$Vals[1];
  addslashes($auth_usr);
} else {
  unset($auth_usr);
}
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

$row = 0;
if (isset($auth_usr)) {
    $uid = addslashes($auth_usr);
    $query_result = mysql_db_query($TBDBNAME,
		"SELECT * FROM users WHERE uid=\"$uid\"");
    if (! $query_result) {
        $err = mysql_error();
	TBERROR("Database Error getting info for $uid: $err\n", 1);
    }
    $row = mysql_fetch_array($query_result);
}

$expiretime = date("m/d/Y", time() + (86400 * 90));

32 33
?>
<table align="center" border="1"> 
34
<tr>
35
    <td colspan="2">
36 37 38 39 40
        <h1 align="center">Apply to Use the Utah Network Testbed</h1>
    </td>
</tr>

<tr>
41
    <td align="center" colspan="2">
42 43 44 45 46 47
        Fields marked with * are required;
        those marked + are highly recommended.
    </td>
</tr>

<form action=grpadded.php3 method="post">
48 49
<tr></tr>
<tr></tr>
50
<?php
51

52 53 54 55 56 57 58 59 60 61 62 63 64
#
# User information.
#
echo "<tr>
          <td colspan=2>
              Project Head Information
          </td>
      </tr>\n";

#
# UserName:
#
echo "<tr>
65 66 67 68 69 70 71
          <td>*Username:</td>
          <td class=\"left\">
              <input name=\"grp_head_uid\"";
if ($row) {
    echo     "type=\"readonly\" value=\"$row[uid]\">";
}
else {
72
    echo     "type=\"text\" size=\"8\" maxlength=\"8\">";
73 74 75 76
}
echo "     </td>
      </tr>\n";

77
#
78
# Full Name
79
#
80 81 82 83 84 85
echo "<tr>
          <td>*Full Name:</td>
          <td class=\"left\">
              <input name=\"usr_name\"";
if ($row) {
    echo "           type=\"readonly\" value=\"$row[usr_name]\">";
86
} else {
87
    echo "           type=\"text\" size=\"30\">";
88
}
89 90 91
echo "     </td>
      </tr>\n";

92
#
93 94
# Title/Position:
# 
95
echo "<tr>
96
         <td>*Title/Position:</td>
97
         <td class=\"left\">
98
             <input name=\"usr_title\"";
99
if ($row) {
100
    echo "          type=\"readonly\" value=\"$row[usr_title]\">";
101
} else {
102
    echo "          type=\"text\" value=\"Professor Emeritus\" size=\"30\">";
103
}
104

105 106 107
echo "     </td>
      </tr>\n";

108
#
109
# Affiliation:
110
#
111
echo "<tr>
112 113 114
         <td>*Institutional<br>Affiliation:</td>
         <td class=\"left\">
             <input name=\"usr_affil\"";
115
if ($row) {
116
    echo "          type=\"readonly\" value=\"$row[usr_affil]\">";
117
} else {
118
    echo "          type=\"text\" value=\"UCB Networks Group\" size=\"40\">";
119
}
120

121 122 123
echo "     </td>
      </tr>\n";

124

125
#
126
# Email:
127
#
128
echo "<tr>
129
         <td>*Email<br>Address:</td>
130
         <td class=\"left\">
131
             <input name=\"email\"";
132
if ($row) {
133
    echo "          type=\"readonly\" value=\"$row[usr_email]\">";
134
} else {
135
    echo "          type=\"text\" size=\"30\">";
136
}
137

138 139 140
echo "    </td>
      </tr>\n";

141
#
142
# Postal Address
143
#
144
echo "<tr>
145 146 147 148 149 150
         <td>*Postal<br>Address:</td>
         <td class=\"left\">
              <input name=\"usr_addr\"";
if ($row) {
    echo "           type=\"readonly\" value=\"$row[usr_addr]\">";
} else {
151
    echo "           type=\"text\" size=\"40\">";
152 153 154 155
}
echo "    </td>
      </tr>\n";

156
#
157
# Phone
158
#
159 160 161 162 163 164
echo "    <td>*Phone #:</td>
          <td class=\"left\">
              <input name=\"usr_phones\"";
if ($row) {
    echo "           type=\"readonly\" value=\"$row[usr_phone]\">";
} else {
165
    echo "           type=\"text\" size=\"15\">";
166 167 168 169
}
echo "    </td>
      </tr>\n";

170 171 172 173 174
#
# Password
#
echo "<tr>
         <td>*Password:</td>
175
         <td><input type=\"password\" name=\"password1\" size=\"8\"></td>
176 177 178 179 180 181 182 183 184 185
      </tr>\n";

#
# If a new usr, then provide a second password confirmation field.
# Otherwise, a blank spot.
#
if (! $row) {
echo "<tr>
          <td>*Retype<br>New Password:</td>
          <td class=\"left\">
186
              <input type=\"password\" name=\"password2\" size=\"8\"></td>
187 188 189
      </tr>\n";
}

190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206

#
# Project information
#
echo "<tr><td colspan='2'><hr></td></tr>\n";

echo "<tr>
         <td colspan='2'>
             Project Information <em>(replace the example entries)</em>
         </td>
      </tr>\n";

#
#  Project Name:
#
echo "<tr>
          <td>*Name (no blanks):</td>
207 208
          <td><input type=\"text\" name=\"gid\" value=\"ucb-omcast\"
                     size=\"12\" MAXLENGTH=\"12\"></td>
209 210 211 212 213 214 215 216
      </tr>\n";

#
#  Long Name
#
echo "<tr>
          <td>*Long name:</td>
          <td><input type=\"text\" name=\"grp_name\"
217
                     value=\"UCB Overlay Multicast\" size=\"40\"></td>
218 219 220 221 222 223 224
      </tr>\n";

#
#  URL
#
echo "<tr>
         <td>+URL:</td>
225
         <td><input type=\"text\" name=\"grp_URL\" size=\"45\"
226 227 228 229 230 231 232 233
                    value=\"http://www.cs.berkeley.edu/netgrp/omcast/\"></td>
      </tr>\n";

#
# Nodes and PCs
# 
echo "<tr>
         <td>*Estimated #of PCs:</td>
234
         <td><input type=\"text\" name=\"grp_pcs\" size=\"4\"></td>
235 236 237 238
      </tr>\n";

echo "<tr>
         <td>*Estimated #of Sharks:</td>
239 240
         <td><input type=\"text\" name=\"grp_sharks\" size=\"4\"
                    value=\"0\"></td>
241 242 243 244 245 246 247 248 249 250 251 252
      </tr>\n";

#
#  Expires
#
echo "<tr>
          <td>When do you expect to be<br>done using the testbed</td>
          <td><input type=\"text\" name=\"grp_expires\"
                     value=\"$expiretime\"></td>
      </tr>\n";


253
?>
254

255
<tr>
256 257 258
    <td colspan="2">
        *Please describe how and why you'd like to use the testbed.<br>
         If the research is sponsored (funded), list the sponsors.</td>
259
</tr>
260

261
<tr>
262 263
    <td colspan="2" align="center" class="left">
        <textarea name="why" rows="10" cols="60"></textarea></td>
264 265 266
</tr>

<tr>
267
    <td colspan="2" align="center">
268 269
        <b><input type="submit" value="Submit"></b></td>
</tr>
270
</form>
271
</table>
272 273
</body>
</html>
274