X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_contct.php;h=07393bc2012eef7c7cece53f8f1225d8f9732cbf;hb=7305f8a35f5174c6191c0bf7ed360e6ee43dc751;hp=b4783cadbf00ae1c3eee899955e13504af58fe71;hpb=db0c6702086eea2c44d0aae1702dc2e77a0afc4e;p=mailer.git diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index b4783cadbf..07393bc201 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -43,40 +43,26 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if ((isFormSent()) && (isGetRequestParameterSet('admin'))) { +if ((isFormSent()) && (isGetRequestElementSet('id'))) { // Send mail or message - if ((isExtensionActive('msg')) && (postRequestParameter('type') == 'message')) { - // Add message - $message = loadEmailTemplate('admins_msg_contct_admin', postRequestParameter('text'), 0); - sendAdminMessage(getRequestParameter('admin'), '{--ADMINS_MSG_FROM_ADMIN--}', $message); - } else { - // Load admin's email address - $email = getAdminEmail(bigintval(getRequestParameter('admin'))); + // Load admin's email address + $email = getAdminEmail(bigintval(getRequestElement('id'))); - // Load email template and send the mail to the admin - $message = loadEmailTemplate('admins_mail_contct_admin', postRequestParameter('text'), 0); - sendEmail($email, '{--ADMINS_MSG_FROM_ADMIN--}', $message); - } + // Load email template and send the mail to the admin + $message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), 0); + sendEmail($email, '{--ADMIN_ADMINS_MESSAGE_FROM_ADMIN--}', $message); // Mail / message dropped - displayMessage('{--ADMINS_ADMIN_CONTACTED--}'); -} elseif (isGetRequestParameterSet('admin')) { + displayMessage('{--ADMIN_ADMINS_ADMIN_CONTACTED--}'); +} elseif (isGetRequestElementSet('id')) { // Load contact form template - $content['admin'] = getRequestParameter('admin'); - - if (isExtensionActive('msg')) { - // Add option to select between mail and message - $content['message_selection'] = loadTemplate('admin_admins_contct_select', true); - } else { - // Outout hidden input - $content['message_selection'] = loadTemplate('admin_admins_contct_default', true); - } + $content['id'] = getRequestElement('id'); // Load main form loadTemplate('admin_admins_contct_form', false, $content); } else { // Please select an admin! - displayMessage('{--ADMINS_SELECT_ADMIN--}'); + addAdminSelectionBox(); } // [EOF]