2002-05-29 23:25:21 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include_once("db.inc");
|
|
|
|
include_once("util.inc");
|
|
|
|
include_once("login.inc");
|
|
|
|
include_once("prefs.inc");
|
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
|
|
|
$user = get_user_from_cookie();
|
2002-08-05 23:20:57 +00:00
|
|
|
page_head("Edit project preferences");
|
2002-05-29 23:25:21 +00:00
|
|
|
if ($user == NULL) {
|
|
|
|
print_login_form();
|
|
|
|
} else {
|
|
|
|
$prefs = prefs_parse($user->prefs);
|
|
|
|
parse_str(getenv("QUERY_STRING"));
|
|
|
|
$i = project_index($prefs, $master_url);
|
|
|
|
array_splice($prefs->projects, i, 1);
|
|
|
|
prefs_update($user, $prefs);
|
2002-08-05 23:20:57 +00:00
|
|
|
echo "Project $master_url deleted";
|
2002-05-29 23:25:21 +00:00
|
|
|
prefs_form_projects($prefs);
|
2002-08-05 23:20:57 +00:00
|
|
|
echo "<br>";
|
|
|
|
echo "<a href=prefs.php>Preferences</a>\n";
|
2002-05-29 23:25:21 +00:00
|
|
|
}
|
2002-08-05 23:20:57 +00:00
|
|
|
echo "<p>\n";
|
|
|
|
page_tail();
|
2002-05-29 23:25:21 +00:00
|
|
|
|
|
|
|
?>
|