2003-07-11 22:33:59 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2007-11-12 22:28:17 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/profile.inc");
|
2003-07-19 00:45:07 +00:00
|
|
|
|
2011-04-10 15:23:42 +00:00
|
|
|
$user = get_logged_in_user();
|
|
|
|
|
2011-08-25 22:12:48 +00:00
|
|
|
$cmd = get_str("cmd", true);
|
|
|
|
|
|
|
|
if ($cmd == "delete") {
|
2011-04-10 15:23:42 +00:00
|
|
|
$result = delete_profile($user);
|
2007-11-14 16:03:47 +00:00
|
|
|
if (!$result) {
|
2011-08-25 22:12:48 +00:00
|
|
|
error_page(tra("couldn't delete profile - please try again later"));
|
2007-11-14 16:03:47 +00:00
|
|
|
}
|
|
|
|
delete_user_pictures($user->id);
|
2011-08-25 22:12:48 +00:00
|
|
|
page_head(tra("Delete Confirmation"));
|
2007-11-14 16:03:47 +00:00
|
|
|
$user->update("has_profile=0");
|
2011-08-25 22:12:48 +00:00
|
|
|
echo tra("Your profile has been deleted.")."<br>";
|
2007-11-14 16:03:47 +00:00
|
|
|
page_tail();
|
2004-08-12 15:06:35 +00:00
|
|
|
exit();
|
2003-07-11 22:33:59 +00:00
|
|
|
}
|
|
|
|
|
2011-08-25 22:12:48 +00:00
|
|
|
page_head(tra("Profile delete confirmation"));
|
2003-07-11 22:33:59 +00:00
|
|
|
|
2006-02-17 22:01:22 +00:00
|
|
|
echo "
|
2011-08-25 22:12:48 +00:00
|
|
|
<h2>".tra("Are you sure?")."</h2><p>
|
|
|
|
".tra("Deleted profiles are gone forever and cannot be recovered --
|
|
|
|
you will have to start from scratch
|
|
|
|
if you want another profile in the future.")."
|
2006-02-17 22:01:22 +00:00
|
|
|
<p>
|
2011-08-29 17:50:00 +00:00
|
|
|
".tra("If you're sure, click 'Yes'
|
2011-08-25 22:12:48 +00:00
|
|
|
to remove your profile from our database.")."
|
2006-02-17 22:01:22 +00:00
|
|
|
<p>
|
|
|
|
";
|
2011-08-25 22:12:48 +00:00
|
|
|
show_button("delete_profile.php?cmd=delete", tra("Yes"), tra("Delete my profile"));
|
|
|
|
show_button("index.php", tra("No"), tra("Do not delete my profile"));
|
2003-07-11 22:33:59 +00:00
|
|
|
page_tail();
|
|
|
|
|
2003-07-15 22:29:39 +00:00
|
|
|
?>
|