2002-08-07 18:56:55 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("util.inc");
|
|
|
|
require_once("team.inc");
|
2002-12-04 19:14:00 +00:00
|
|
|
|
|
|
|
$authenticator = init_session();
|
2002-08-07 18:56:55 +00:00
|
|
|
db_init();
|
2002-12-16 21:41:41 +00:00
|
|
|
$user = get_user_from_auth($authenticator);
|
2002-12-13 00:12:44 +00:00
|
|
|
$id = $HTTP_GET_VARS["id"];
|
2002-12-16 21:41:41 +00:00
|
|
|
|
2002-11-11 19:40:22 +00:00
|
|
|
$query = "select * from team where id = $id";
|
|
|
|
$result = mysql_query($query);
|
|
|
|
if ($result) {
|
|
|
|
$team = mysql_fetch_object($result);
|
|
|
|
mysql_free_result($result);
|
|
|
|
}
|
2002-12-16 21:41:41 +00:00
|
|
|
require_founder_login($user, $team);
|
|
|
|
$team_name = ereg_replace("\"", "'", $team->name);
|
2002-11-11 19:40:22 +00:00
|
|
|
$team_id = $team->id;
|
2002-12-16 21:41:41 +00:00
|
|
|
$team_name_html = ereg_replace("\"", "'", $team->name_html);
|
|
|
|
$team_url = ereg_replace("\"", "'", $team->url);
|
|
|
|
$team_description = ereg_replace("\"", "'", $team->description);
|
2002-11-11 19:40:22 +00:00
|
|
|
$team_type = $team->type;
|
|
|
|
page_head("Edit $team_name");
|
2002-12-13 00:12:44 +00:00
|
|
|
echo "<table width=780>
|
|
|
|
<tr><td>
|
|
|
|
<form method=post action=team_edit_action.php>
|
|
|
|
<input type=hidden name=id value=$team_id>
|
|
|
|
</td></tr></table>
|
|
|
|
<table><tr>
|
|
|
|
<td>Team name (plain-text version):<br><br> </td>
|
2002-12-16 21:41:41 +00:00
|
|
|
<td><input name=name size=50 value=\"$team_name\">
|
2002-12-13 00:12:44 +00:00
|
|
|
<br><font size=2>This name will be print as-is
|
|
|
|
<br>and is the name you should use when searching for your team.
|
|
|
|
</td></tr></tr>
|
|
|
|
<td>Team name (HTML version):<br><br> </td>
|
2002-12-16 21:41:41 +00:00
|
|
|
<td><input name=name_html size=50 value=\"$team_name_html\">
|
2002-12-13 00:12:44 +00:00
|
|
|
<br><font size=2>This name will be printed as HTML source, so you may include any HTML
|
|
|
|
<br>code that you want. This will only be displayed in your team's page.
|
|
|
|
<br>If you don't know HTML, just leave this box blank.
|
|
|
|
</td></tr><tr>
|
|
|
|
<td>URL of team web page, if any:<br><font size=2>(without "http://")</td>
|
|
|
|
<td><input name=url size=60 value=$team_url>
|
|
|
|
<br><font size=2>This page will be linked to from the project's team page.
|
|
|
|
</td></tr><tr>
|
|
|
|
<td valign=top>Description of team:</td>
|
|
|
|
<td><textarea name=description value=$team_description cols=60 rows=10>$team_description</textarea>
|
|
|
|
</td></tr><tr>
|
|
|
|
<td valign=top>Type of team:</td><td>";
|
2002-11-11 19:40:22 +00:00
|
|
|
printf("<input type=radio name=type value=4%s>Club<br>", ($team->type==4)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=1%s>Small Company (< 50 employees)<br>", ($team->type==1)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=2%s>Medium Company (50-1000 employees)<br>", ($team->type==2)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=3%s>Large Company (> 1000 employees)<br>", ($team->type==3)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=5%s>Primary School<br>", ($team->type==5)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=6%s>Secondary School<br>", ($team->type==6)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=8%s>Junior College<br>", ($team->type==8)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=7%s>University or Department<br>", ($team->type==7)?" checked":"");
|
|
|
|
printf("<input type=radio name=type value=9%s>Government Agency</td>", ($team->type==9)?" checked":"");
|
2002-12-13 00:12:44 +00:00
|
|
|
echo "</tr></table>
|
|
|
|
<input type=submit value=\"Edit Team\">
|
|
|
|
</form>
|
|
|
|
<p>";
|
2002-11-11 19:40:22 +00:00
|
|
|
page_tail();
|
2002-08-07 18:56:55 +00:00
|
|
|
?>
|