X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_edit.php;h=41e9536f346fa4d871cefbabb4900fae3eda8463;hb=0e269568bd666186509e98594e83bac199ac26da;hp=798fe3f48f17a805f956c9e32cd4a9d2f79af2c9;hpb=ab6e23979a94ee3f68efca58da90137e88a95236;p=mailer.git diff --git a/inc/modules/admin/what-admins_edit.php b/inc/modules/admin/what-admins_edit.php index 798fe3f48f..41e9536f34 100644 --- a/inc/modules/admin/what-admins_edit.php +++ b/inc/modules/admin/what-admins_edit.php @@ -10,9 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Admin-Account editieren * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,45 +37,44 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) -{ - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } -// Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); -// Instance for the cache extension -global $cacheInstance; +// Add description as navigation point +addMenuDescription('admin', __FILE__); // Set selection data to empty array when it is empty -if (empty($_POST['sel'])) $_POST['sel'] = array(); +if (!isPostRequestElementSet('sel')) setRequestPostElement('sel', array()); // Check if direct admin account was selected -if (!empty($_GET['admin'])) { - // Secure ID number - $aid = bigintval($_GET['admin']); - $_POST['edit'] = "1"; - $_POST['sel'][$aid] = array("1"); -} -if ((isset($_POST['edit'])) && (SELECTION_COUNT($_POST['sel']) > 0)) { +if (isGetRequestElementSet('admin')) { + // Secure id number + $adminId = bigintval(getRequestElement('admin')); + + // Set required fields + setRequestPostElement('edit', 1); + setRequestPostElement('sel', array($adminId => 1)); +} // END - if + +if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Edit account(s) - ADMINS_EDIT_ADMIN_ACCOUNTS($_POST); -} elseif ((isset($_POST['change'])) && (sizeof($_POST['login']) > 0)) { + adminsEditAdminAccount(postRequestArray()); +} elseif ((isPostRequestElementSet('change')) && (count(postRequestElement('login')) > 0)) { // Change admin accounts - ADMINS_CHANGE_ADMIN_ACCOUNT($_POST); -} elseif ((isset($_POST['del'])) && (SELECTION_COUNT($_POST['sel']) > 0)) { + adminsChangeAdminAccount(postRequestArray()); +} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { // Show admin accounts for deletetion - ADMINS_DELETE_ADMIN_ACCOUNTS($_POST); + adminsDeleteAdminAccount(postRequestArray()); } else { - if ((isset($_POST['remove'])) && (SELECTION_COUNT($_POST['sel']) > 0)) { + if ((isPostRequestElementSet('remove')) && (countPostSelection() > 0)) { // Remove accounts now - ADMINS_REMOVE_ADMIN_ACCOUNTS($_POST); - } + adminsRemoveAdminAccount(postRequestArray()); + } // END - if // List all admin accounts - ADMINS_LIST_ADMIN_ACCOUNTS(); + adminsListAdminAccounts(); } -// +// [EOF] ?>