2002-08-07 18:56:55 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("util.inc");
|
|
|
|
require_once("team.inc");
|
|
|
|
require_once("db.inc");
|
|
|
|
|
|
|
|
db_init();
|
2003-03-19 21:01:32 +00:00
|
|
|
$user = get_logged_in_user();
|
2002-08-07 18:56:55 +00:00
|
|
|
|
|
|
|
$query = sprintf(
|
|
|
|
"select * from team where id = %d",
|
2003-03-21 04:38:55 +00:00
|
|
|
$_POST["id"]
|
2002-08-07 18:56:55 +00:00
|
|
|
);
|
|
|
|
$result = mysql_query($query);
|
2002-12-16 21:41:41 +00:00
|
|
|
if ($result) {
|
|
|
|
$team = mysql_fetch_object($result);
|
|
|
|
mysql_free_result($result);
|
|
|
|
}
|
|
|
|
require_founder_login($user, $team);
|
|
|
|
|
2003-03-19 21:01:32 +00:00
|
|
|
$query_team_table = sprintf(
|
|
|
|
"delete from team where id = %d",
|
|
|
|
$team->id
|
|
|
|
);
|
|
|
|
if ($team->nusers == 0) {
|
|
|
|
$result_team_table = mysql_query($query_team_table);
|
|
|
|
}
|
|
|
|
if ($result_team_table) {
|
|
|
|
$team_name = $team->name;
|
|
|
|
page_head("$team_name disbanded");
|
|
|
|
echo "<h2>Disband Complete</h2>";
|
|
|
|
echo "You have disbanded $team_name.";
|
|
|
|
} else {
|
|
|
|
page_head("Error");
|
|
|
|
echo "Couldn't disband team - please try later.\n";
|
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2003-03-19 21:01:32 +00:00
|
|
|
page_tail();
|
2002-08-07 18:56:55 +00:00
|
|
|
|
|
|
|
?>
|