]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-admins_contct.php
Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / admin / what-admins_contct.php
index 9203b250af3f22caa9ca8410c1d94e2a3b4c86e7..bce5b23e2e0bfc2db0edec4dfafd0ffe885c9949 100644 (file)
  * $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                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2015 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 *
@@ -43,42 +41,28 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+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'), getMessage('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, getMessage('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
-       loadTemplate('admin_settings_saved', false, '{--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);
+       loadTemplate('admin_admins_contct_form', FALSE, $content);
 } else {
        // Please select an admin!
-       loadTemplate('admin_settings_saved', false, '{--ADMINS_SELECT_ADMIN--}');
+       addAdminSelectionBox();
 }
 
 // [EOF]