Example #1
0
function delete_account($user)
{
    $x = "deleted_" . time() . "_" . random_string();
    $retval = $user->update("email_addr='{$x}', authenticator='{$x}', name='', country='', postal_code='', has_profile=0");
    if (!$retval) {
        return false;
    }
    user_quit_team($user);
    forum_delete_user($user);
    pm_delete_user($user);
    anonymize_hosts($user);
    delete_profile($user);
    return true;
}
function delete_user($user)
{
    global $test;
    $age = (time() - $user->create_time) / 86400;
    echo "----------------\ndeleting user {$user->id} email {$user->email_addr} name {$user->name} age {$age} days\n";
    if ($test) {
        return;
    }
    delete_profile($user);
    forum_delete_user($user);
    BoincPrivateMessage::delete_aux("userid={$user->id} or senderid={$user->id}");
    BoincNotify::delete_aux("userid={$user->id}");
    $q = "delete from user where id={$user->id}";
    _mysql_query($q);
}
Example #3
0
                        $pro_users[] = $us["login"];
                    }
                    $query = "SELECT distinct(t1.id)FROM vuln_nessus_settings t1\n                              WHERE deleted = '0' and (name='Default' or owner='0' or owner in ('" . implode("', '", array_merge($entities_list, $pro_users)) . "')) ORDER BY t1.name";
                }
            }
            if ($query == "") {
                $query = "SELECT distinct(t1.id)FROM vuln_nessus_settings t1\n                                         WHERE deleted = '0' and (name='Default' or owner='0' or owner='{$username}') ORDER BY t1.name";
            }
            $result = $dbconn->Execute($query);
            while (!$result->EOF) {
                $profiles_allowed[] = $result->fields["id"];
                $result->MoveNext();
            }
            if (Session::am_i_admin() || in_array($sid, $profiles_allowed)) {
                if ($op == "delete") {
                    delete_profile($sid, $confirm);
                } else {
                    //edit_profile($sid);
                    edit_autoenable($sid);
                }
            } else {
                ?>
                <p style="text-align:center"><?php 
                echo _("You don't have permission to edit or delete this profile");
                ?>
</p>
                <?php 
                select_profile();
            }
        }
        break;
// 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/>.
require_once "../inc/boinc_db.inc";
require_once "../inc/util.inc";
require_once "../inc/profile.inc";
$user = get_logged_in_user();
$cmd = get_str("cmd", true);
if ($cmd == "delete") {
    $result = delete_profile($user);
    if (!$result) {
        error_page(tra("couldn't delete profile - please try again later"));
    }
    delete_user_pictures($user->id);
    page_head(tra("Delete Confirmation"));
    $user->update("has_profile=0");
    echo tra("Your profile has been deleted.") . "<br>";
    page_tail();
    exit;
}
page_head(tra("Profile delete confirmation"));
echo "\n    <h2>" . tra("Are you sure?") . "</h2><p>\n    " . tra("Deleted profiles are gone forever and cannot be recovered --\nyou will have to start from scratch\nif you want another profile in the future.") . "\n    <p>\n    " . tra("If you're sure, click 'Yes'\nto remove your profile from our database.") . "\n    <p>\n";
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"));
page_tail();
<?php

require_once './defineUtil.php';
require_once './scriptUtil.php';
require_once './dbaccesUtil.php';
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
      <title>削除結果画面</title>
</head>
<body>
    <?php 
$result = delete_profile($_GET['id']);
//エラーが発生しなければ表示を行う
if (!isset($result)) {
    ?>
    <h1>削除確認</h1>
    削除しました。<br>
    <?php 
} else {
    echo 'データの削除に失敗しました。次記のエラーにより処理を中断します:' . $result;
}
echo return_top();
?>
   </body> 
</html>
Example #6
0
require_once '../common/dbaccesUtil.php';
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
      <title>削除結果画面</title>
</head>
<body>
    <?php 
session_chk();
if (!isset($_POST['mode']) or !$_POST['mode'] == "RESULT") {
    //issetを用いて不正なアクセスの際Noticeが出ないようにした
    echo 'アクセスルートが不正です。もう一度トップページからやり直してください<br>';
} else {
    $result = delete_profile($_POST['id']);
    //エラーが発生しなければ表示を行う
    if (!isset($result)) {
        ?>
    	<h1>削除確認</h1>
    	削除しました。<br>
    	<?php 
    } else {
        echo 'データの削除に失敗しました。次記のエラーにより処理を中断します:' . $result;
    }
}
logout_s();
echo return_top();
?>
   </body> 
</body>
require_once '../common/defineUtil.php';
require_once '../common/scriptUtil.php';
require_once '../common/dbaccesUtil.php';
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
      <title>削除結果画面</title>
</head>
<body>
    <?php 
$id = isset($_GET['id']) ? htmlspecialchars($_GET['id']) : null;
$result = isset($_GET['id']) ? htmlspecialchars($_GET['id']) : null;
$result = delete_profile($id);
//エラーが発生しなければ表示を行う
if (!isset($result)) {
    ?>
    <h1>削除確認</h1>
    削除しました。<br>
    <?php 
} else {
    echo 'データの削除に失敗しました。次記のエラーにより処理を中断します:' . $result;
}
echo return_top();
?>
   </body>
</body>
</html>
Example #8
0
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/boinc_db.inc";
require_once "../inc/util.inc";
require_once "../inc/profile.inc";
function delete_profile($user)
{
    $result = BoincProfile::delete_aux("userid = {$user->id}");
    if (!$result) {
        error_page("couldn't delete profile - please try again later");
    }
    delete_user_pictures($user->id);
    page_head("Delete Confirmation");
    $user->update("has_profile=0");
    echo "Your profile has been deleted<br />";
    page_tail();
}
$user = get_logged_in_user();
if (isset($_POST['delete']) && $_POST['delete']) {
    delete_profile($user);
    exit;
}
page_head("Profile delete confirmation");
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
echo '
	<h2>Are you sure?</h2>
	<p>Deleted profiles are gone forever and cannot be recovered - you will have to start from scratch if you want another profile in the future.</p>
	<p>If you\'re sure, click "Delete" to remove your profile from our database.</p>
	<p><input type="submit" name="delete" value="Delete"></p>
	</form>
';
page_tail();