<?php session_start(); if (!isset($_SESSION["logged"])) { header('Location: logout.php'); } include 'functions.php'; $db = connectToDb(); $postdata = file_get_contents("php://input"); if ($postdata) { $request = json_decode($postdata); $user = $_SESSION["username"]; $pass = $request->password; $result = deleteAccount($db, $user, $pass); if ($result) { header('Location: greeter_refactor.php'); } else { return http_response_code(401); } }
<br /> <h4> Delete Account </h4> <form action="profile" id="delete-account-form" class="form-horizontal" onsubmit="confirmDeleteAccount(); return false;" method="post"> <p class='text-danger'> Deleting your account will remove all your information from our system! It is an irreversible action. </p> <div class="form-group"> <div class="col-sm-4"> <input id="password-field-delete-account" type="password" class="form-control" name="current_password_del" placeholder="Current Password" required="required" /> <input id="submit-delete" type="submit" class="btn btn-block" value="Delete Account" /> </div> </div> </form> <p class="text-danger"> <?php if (isset($_POST["current_password_del"])) { $current_password = trim($_POST["current_password_del"]); $del = deleteAccount($user_id, $current_password); if ($del !== true) { $_SESSION["notice"] = $del; displayNotice('error'); } else { header("Location: logout"); } } ?> </p> </div> </div> <div class="my-footer"></div> <?php
function deleteAcc() { $id = intval($_POST['deleteAccount']); if ($id == 0) { die("error"); } if (canDeleteAccount($id)) { deleteAccount($id); } else { die("error"); } }
anwserRequest($bd, $touitos, $_POST['acceptRequest']); } else { if (isset($_GET['moreNewsTouite'])) { displayNews($bd, intval($_GET['offset'])); } else { if (isset($_GET['moreProfileTouite'])) { getMoreProfileTouite($bd, intval($_GET['offset']), $_GET['id']); } else { if (isset($_POST['deleteAccount'])) { $th = new touitosHandler($bd); $connectedUser = $th->getByAttr("pseudo", $_SESSION['user'], PDO::PARAM_STR); if ($connectedUser->getPWD() != md5($_POST['password'])) { echo '<div>Mot de Passe incorrect</div>'; } else { echo "OK"; deleteAccount($bd); } } else { if (isset($_GET['discussion'])) { getDiscussionMessage($bd, $_GET['destinataire']); } else { if (isset($_POST['sendDiscussion'])) { sendPrivateMessage($bd, $_POST['destinataire'], $_POST['message']); } else { if (isset($_GET['numberNewMessage'])) { echo getNumberOfNotRead($bd); } else { if (isset($_GET['loadPreviousDiscussion'])) { echo loadPreviousDiscussion($bd, $_GET['destinataire'], $_GET['offset']); } else { if (isset($_GET['getContact'])) {
<?php include '../init.php'; sleep(3); $auid = $_POST["uid"]; deleteAccount($auid); $return['error'] = false; $return['msg'] = "accountmgmt.php?acct=manageacct"; echo json_encode($return);
function signedIn() { redirectSignIn(); if ($_SESSION['signedIn'] == 1) { $profileData = mysql_query("SELECT * FROM user WHERE emailAddress = '" . $_SESSION['user'] . "' "); $row = mysql_fetch_array($profileData); if (isset($_POST["saveChanges"])) { updateDetails($row); } elseif (isset($_POST['reset'])) { resetEmail($row); } elseif (isset($_POST['delete'])) { deleteAccount(); } $refreshData = mysql_query("SELECT * FROM user WHERE emailAddress = '" . $_SESSION['user'] . "' "); $row = mysql_fetch_array($refreshData); return $row; } }
} } // set key=view if not set at all if (!isset($_GET["key"])) { $_GET["key"] = "view"; } switch ($_GET["key"]) { case "commitedit": $OUTPUT = writeAccount(); break; case "edit": $OUTPUT = editAccount(); break; case "delete": case "commitdelete": $OUTPUT = deleteAccount(); break; case "view": default: // check if an account was specified if (isset($_GET["aid"]) && $_GET["aid"] == 0) { $OUTPUT = listAccounts(TRUE); // aid=0, LIST ALL ACCOUNTS (admin only) } else { $OUTPUT = listAccounts(FALSE); } break; } $OUTPUT = "\n<div class='sub_container'>\n\t{$OUTPUT}\n</div>"; require "gw-tmpl.php"; // lists all the accounts, the parameter determines whether ALL accounts, or only accounts belonging to you should be shown
include "adminapi.php"; if (!isset($_GET["id"])) { return header("Location: index.php"); } $id = $_GET['id']; $form = findOrgAccountById($id); if (!isset($form)) { $form = findGroupAccountById($id); } if (isset($_POST['id'])) { // Return to the 'proper' place we were coming from $from = $_GET['from']; if (!isset($from)) { $from = ''; } $rs = deleteAccount($id); if ($from == 'user') { header("Location: edituser.php?id={$form['memberid']}"); return; } if ($from == 'org') { header("Location: editorg.php?id={$form['orgid']}"); return; } if ($from == 'group') { if (isset($form['groupName'])) { header("Location: editgroup.php?id={$form['groupid']}"); } else { header("Location: editgroup.php?id={$form['memberid']}"); } return;
function _moduleContent(&$smarty, $module_name) { include_once "libs/paloSantoGrid.class.php"; include_once "libs/paloSantoEmail.class.php"; include_once "libs/paloSantoConfig.class.php"; include_once "libs/paloSantoForm.class.php"; include_once "libs/cyradm.php"; include_once "configs/email.conf.php"; //include module files include_once "modules/{$module_name}/configs/default.conf.php"; //include file language agree to elastix configuration //if file language not exists, then include language by default (en) $lang = get_language(); $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); $lang_file = "modules/{$module_name}/lang/{$lang}.lang"; if (file_exists("{$base_dir}/{$lang_file}")) { include_once "{$lang_file}"; } else { include_once "modules/{$module_name}/lang/en.lang"; } //global variables global $arrConf; global $arrConfModule; global $arrLang; global $arrLangModule; $arrConf = array_merge($arrConf, $arrConfModule); $arrLang = array_merge($arrLang, $arrLangModule); //folder path for custom templates $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes'; $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme']; $pDB = new paloDB($arrConf['dsn_conn_database']); $error = ""; $errMsg = ""; $contenidoModulo = ""; $arrData = array(); $virtual_postfix = FALSE; // indica si se debe escribir el archivo /etc/postfix/virtual $bMostrarListado = TRUE; $content = ""; $accion = getAction(); switch ($accion) { case "new": $content = viewDetailAccount($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "save": $content = saveAccount($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "delete": $content = deleteAccount($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "edit": $content = viewDetailAccount($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "apply_changes": $content = saveAccount($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "view": $content = viewDetailAccount($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "export": $content = exportAccounts($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "viewFormEditQuota": $content = viewFormEditQuota($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "edit_quota": $content = edit_quota($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; case "reconstruir": $content = reconstruir_mailBox($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; default: $content = viewFormAccount($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang); break; } return $content; }
$timeStart = microtime(true); session_start(); ob_start(); require_once $_SESSION['File_Root'] . '/Kernel/Include.php'; require_once $_SESSION['File_Root'] . '/HTML/Header.php'; require_once 'Functions/SQL.php'; $accountPseudo = htmlspecialchars(addslashes($_POST['accountPseudo'])); $accountPassword = htmlspecialchars(addslashes($_POST['accountPassword'])); $account = findAccount($bdd, $accountPseudo); ?> <br> <div class=\"panel panel-danger\"> <div class=\"panel-heading\"></div> <div class=\"panel-body\"> <?php if (DeCryptMDP($accountPassword, $account['Account_Password'])) { $ID = findIdByPseudo($bdd, $accountPseudo); deleteAccount($bdd, $ID); exit(header("Location: {$linkRoot}/Modules/Main/index.php")); } else { echo $login5; } ?> </div> </div> <?php require_once $_SESSION['File_Root'] . '/HTML/Footer.php';
unsubscribe(); } else { if ($_GET["function"] == "change-email") { changeEmail(); } else { if ($_GET["function"] == "set-folder") { setFolder(); } else { if ($_GET["function"] == "like") { like(); } else { if ($_GET["function"] == "mark-as-read") { markAsRead(); } else { if ($_GET["function"] == "delete-account") { deleteAccount(); } else { if ($_GET["function"] == "count-unread") { countUnread(); } else { if ($_GET["function"] == "load-featured") { loadFeatured(); } else { if ($_GET["function"] == "load-feed") { loadFeed(); } else { if ($_GET["function"] == "load-sidebar") { loadSidebar(); } else { if ($_GET["function"] == "add-subscription") { addSubscription();