X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_contct.php;h=dd56097715e5ea802f28c77eb0376724ce61eccf;hb=7e500b4e3a3c25881e5d7da8ff77d86344ae4cd7;hp=a52a0359d9585c37d48f719bb539bfbf8e6addbf;hpb=b8aa17b98b99c27eafbdca0fa090bae63527da9a;p=mailer.git diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index a52a0359d9..dd56097715 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -17,7 +17,7 @@ * 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 * @@ -37,48 +37,48 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!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', __FILE__); +addMenuDescription('admin', __FILE__); -if ((isFormSent()) && (REQUEST_ISSET_GET('admin'))) { +if ((isFormSent()) && (isGetRequestElementSet('admin'))) { // Send mail or message - if ((EXT_IS_ACTIVE("msg")) && (REQUEST_POST('type') == "msg")) { + if ((isExtensionActive('msg')) && (postRequestElement('type') == 'message')) { // Add message - $message = LOAD_EMAIL_TEMPLATE('admins_msg_contct_admin', REQUEST_POST('text'), '0'); - SEND_ADMIN_MESSAGE(REQUEST_GET('admin'), ADMINS_MSG_FROM_ADMIN, $message); + $message = loadEmailTemplate('admins_msg_contct_admin', postRequestElement('text'), 0); + SEND_ADMIN_MESSAGE(getRequestElement('admin'), ADMINS_MSG_FROM_ADMIN, $message); } else { // Load admin's email address - $email = getAdminEmail(bigintval(REQUEST_GET('admin'))); + $email = getAdminEmail(bigintval(getRequestElement('admin'))); // Load email template and send the mail to the admin - $message = LOAD_EMAIL_TEMPLATE('admins_mail_contct_admin', REQUEST_POST('text'), '0'); + $message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), 0); sendEmail($email, getMessage('ADMINS_MSG_FROM_ADMIN'), $message); } // Mail / message dropped - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_ADMIN_CONTACTED')); -} elseif (REQUEST_ISSET_GET('admin')) { + loadTemplate('admin_settings_saved', false, getMessage('ADMINS_ADMIN_CONTACTED')); +} elseif (isGetRequestElementSet('admin')) { // Load contact form template - define('__ADMIN', REQUEST_GET('admin')); - if (EXT_IS_ACTIVE('msg')) { + $content['admin'] = getRequestElement('admin'); + + if (isExtensionActive('msg')) { // Add option to select between mail and message - define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE('admin_admins_contct_select', true)); + $content['message_selection'] = loadTemplate('admin_admins_contct_select', true); } else { // Outout hidden input - define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE('admin_admins_contct_default', true)); + $content['message_selection'] = loadTemplate('admin_admins_contct_default', true); } // Load main form - LOAD_TEMPLATE('admin_admins_contct_form'); + loadTemplate('admin_admins_contct_form', false, $content); } else { // Please select an admin! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_SELECT_ADMIN')); + loadTemplate('admin_settings_saved', false, getMessage('ADMINS_SELECT_ADMIN')); } -// +// [EOF] ?>