X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-user_contct.php;h=df3716043c5a11282ef19d9de3552da734c85530;hb=4f7df133f736da124e6f7bd02008b9093f736451;hp=9e211f2dc95e60036767d67af3f7498046187886;hpb=57227d33e870ec5cd271209c4a978a52b45c2dd6;p=mailer.git diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 9e211f2dc9..df3716043c 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -14,11 +14,10 @@ * $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 - 2009 by Roland Haeder * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * 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 * @@ -42,34 +41,38 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { } // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Is a user id given? -if ((isGetRequestParameterSet('userid')) && (bigintval(getRequestParameter('userid')) > 0)) { +if ((isGetRequestElementSet('userid')) && (isValidId(getRequestElement('userid')))) { // Is a user account found? - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Load the data $content = getUserDataArray(); // Including user id - $content['userid'] = bigintval(getRequestParameter('userid')); + $content['userid'] = bigintval(getRequestElement('userid')); // Shall we send the email? if (isFormSent()) { // Insert text - $content['text'] = trim(secureString(postRequestParameter('text'))); + $content['text'] = postRequestElement('text'); + + // Load email template + $message = loadEmailTemplate('member_contct', $content, getRequestElement('userid')); // Send contact form out - $message = loadEmailTemplate('member_contct', $content); - sendEmail($content['email'], getMessage('ADMIN_CONTACT_USER_SUBJECT'), $message); - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_USER_CONTACTED')); + sendEmail($content['userid'], '{--ADMIN_CONTACT_USER_SUBJECT--}', $message); + + // Display message + displayMessage('{--ADMIN_USER_CONTACTED--}'); } else { // Load contact form template - loadTemplate('admin_contct_user_form', false, $content); + loadTemplate('admin_contct_user_form', FALSE, $content); } } else { // Not found? - loadTemplate('admin_settings_saved', false, getMaskedMessage('USER_ACCOUNT_404', bigintval(getRequestParameter('userid')))); + displayMessage('{%message,ADMIN_USER_ACCOUNT_404=' . bigintval(getRequestElement('userid')) . '%}'); } } else { // Display selection box