X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-user_contct.php;h=fe0b2bb582e71ecc97507a6811ddf258b6ab2f36;hb=841656d70d60cbd5f0768e12cf73a62aa643cf35;hp=002bccaa9f88a9310f545207fe384a91bc8ecb64;hpb=5071030af40e69ca4284642f44758964e18f5be8;p=mailer.git diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 002bccaa9f..fe0b2bb582 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_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,19 +37,18 @@ ************************************************************************/ // 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(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Is a user id given? -if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) { +if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')) > 0)) { // Load user data and display it - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Is a user account found? if (SQL_NUMROWS($result) == 1) { @@ -57,32 +56,32 @@ if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) { $content = SQL_FETCHARRAY($result); // Including user ID - $content['uid'] = bigintval(REQUEST_GET('uid')); + $content['userid'] = bigintval(getRequestElement('userid')); // Shall we send the email? - if (IS_FORM_SENT()) { + if (isFormSent()) { // Insert text - $content['text'] = trim(strip_tags(REQUEST_POST('text'))); + $content['text'] = trim(secureString(postRequestElement('text'))); // Send contact form out - $msg = LOAD_EMAIL_TEMPLATE("member_contct", $content); - sendEmail($content['email'], getMessage('ADMIN_CONTACT_USER_SUBJECT'), $msg); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_USER_CONTACTED')); + $message = loadEmailTemplate('member_contct', $content); + sendEmail($content['email'], getMessage('ADMIN_CONTACT_USER_SUBJECT'), $message); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_USER_CONTACTED')); } else { // Load contact form template - LOAD_TEMPLATE("admin_contct_user_form", false, $content); + loadTemplate('admin_contct_user_form', false, $content); } } else { // Not found? - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('USER_ACCOUNT_404'), bigintval(REQUEST_GET('uid')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('USER_ACCOUNT_404'), bigintval(getRequestElement('userid')))); } // Free result SQL_FREERESULT($result); } else { // Display selection box - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } -// +// [EOF] ?>