-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 06/19/2004 *\r
- * ================ Last change: 06/19/2004 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : what-admins_contct.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Contact an admin through mail or message *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Admin per Mail oder Nachricht kontaktieren *\r
- * -------------------------------------------------------------------- *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder *\r
- * For more information visit: http://www.mxchange.org *\r
- * *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or *\r
- * (at your option) any later version. *\r
- * *\r
- * This program is distributed in the hope that it will be useful, *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r
- * GNU General Public License for more details. *\r
- * *\r
- * You should have received a copy of the GNU General Public License *\r
- * along with this program; if not, write to the Free Software *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *\r
- * MA 02110-1301 USA *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))\r
-{\r
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";\r
- require($INC);\r
-}\r
-// Add description as navigation point\r
-ADD_DESCR("admin", basename(__FILE__));\r
-\r
-if ((isset($_POST['ok'])) && (!empty($_GET['admin'])))\r
-{\r
- // Send mail or message\r
- if ((EXT_IS_ACTIVE("msg")) && ($_POST['type'] == "msg"))\r
- {\r
- // Add message\r
- $msg = LOAD_EMAIL_TEMPLATE("admins_msg_contct_admin", $_POST['text'], "0");\r
- SEND_ADMIN_MESSAGE($_GET['admin'], ADMINS_MSG_FROM_ADMIN, $msg);\r
- }\r
- else\r
- {\r
- // Load admin's email address\r
- $result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE id=%d LIMIT 1",\r
- array(bigintval($_GET['admin'])), __FILE__, __LINE__);\r
- list($email) = SQL_FETCHROW($result);\r
- SQL_FREERESULT($result);\r
-\r
- // Load email template and send the mail to the admin\r
- $msg = LOAD_EMAIL_TEMPLATE("admins_mail_contct_admin", $_POST['text'], "0");\r
- SEND_EMAIL($email, ADMINS_MSG_FROM_ADMIN, $msg);\r
- }\r
- // Mail / message dropped\r
- LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_ADMIN_CONTACTED);\r
-}\r
- elseif (!empty($_GET['admin']))\r
-{\r
- // Load contact form template\r
- define('__ADMIN', $_GET['admin']);\r
- if (EXT_IS_ACTIVE("msg"))\r
- {\r
- // Add option to select between mail and message\r
- define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE("admin_admins_contct_select", true));\r
- }\r
- else\r
- {\r
- // Outout hidden input\r
- define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE("admin_admins_contct_default", true));\r
- }\r
- LOAD_TEMPLATE("admin_admins_contct_form");\r
-}\r
- else\r
-{\r
- // Please select an admin!\r
- LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_SELECT_ADMIN);\r
-}\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 06/19/2004 *
+ * ================ Last change: 06/19/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-admins_contct.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Contact an admin through mail or message *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Admin per Mail oder Nachricht kontaktieren *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.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 *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
+{
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+if ((isset($_POST['ok'])) && (!empty($_GET['admin'])))
+{
+ // Send mail or message
+ if ((EXT_IS_ACTIVE("msg")) && ($_POST['type'] == "msg"))
+ {
+ // Add message
+ $msg = LOAD_EMAIL_TEMPLATE("admins_msg_contct_admin", $_POST['text'], "0");
+ SEND_ADMIN_MESSAGE($_GET['admin'], ADMINS_MSG_FROM_ADMIN, $msg);
+ }
+ else
+ {
+ // Load admin's email address
+ $result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE id=%d LIMIT 1",
+ array(bigintval($_GET['admin'])), __FILE__, __LINE__);
+ list($email) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+
+ // Load email template and send the mail to the admin
+ $msg = LOAD_EMAIL_TEMPLATE("admins_mail_contct_admin", $_POST['text'], "0");
+ SEND_EMAIL($email, ADMINS_MSG_FROM_ADMIN, $msg);
+ }
+ // Mail / message dropped
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_ADMIN_CONTACTED);
+}
+ elseif (!empty($_GET['admin']))
+{
+ // Load contact form template
+ define('__ADMIN', $_GET['admin']);
+ if (EXT_IS_ACTIVE("msg"))
+ {
+ // Add option to select between mail and message
+ define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE("admin_admins_contct_select", true));
+ }
+ else
+ {
+ // Outout hidden input
+ define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE("admin_admins_contct_default", true));
+ }
+ LOAD_TEMPLATE("admin_admins_contct_form");
+}
+ else
+{
+ // Please select an admin!
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_SELECT_ADMIN);
+}
+//
+?>