X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fadmin%2Fwhat-del_user.php;h=00e7e343abccce83a1410c076863fec5d8a6acc3;hb=53312d69c8cb5b7ea0c85909cb45356ad4f3bb0b;hp=926d51313ae2760217e732ec69120ec564c72202;hpb=f577a47a8149d34039aa3c4921c35a38fcb2f2a3;p=mailer.git diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 926d51313a..00e7e343ab 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -1,7 +1,7 @@ ".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid')).""); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } -} elseif (REQUEST_ISSET_POST('no')) { +} elseif (isPostRequestElementSet('no')) { // Do not delete him... - redirectToUrl(ADMIN_CREATE_USERID_LINK(REQUEST_GET('uid'))); -} elseif (!REQUEST_ISSET_GET('uid')) { + redirectToUrl(adminCreateUserLink(getRequestElement('userid'))); +} elseif (!isGetRequestElementSet('userid')) { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } else { // Realy want to delete? - $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); - - // Found a row? - if (SQL_NUMROWS($result) == 1) { - // Load data - list ($email, $sname, $fname) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - + if (fetchUserData(getRequestElement('userid'))) { // Prepare content $content = array( - 'email' => generateMemberEmailLink($email, "user_data"), - 'surname' => $sname, - 'family' => $fname, - 'header' => sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), REQUEST_GET('uid')), - 'text' => sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), REQUEST_GET('uid')), - 'userid' => REQUEST_GET('uid') + 'email' => generateEmailLink(getUserData('email'), 'user_data'), + 'userid' => bigintval(getRequestElement('userid')) ); // Display form - LOAD_TEMPLATE("admin_del_user", false, $content); + loadTemplate('admin_delete_user', false, $content); } else { // Account does not exists! - LOAD_TEMPLATE('admin_settings_saved', false, "