win32 to unix line delimiters changed
[mailer.git] / 0.2.1 / inc / modules / member / what-support.php
index dfaa41dec703c20e35a4a444dedff2d16e7bc0a3..5a6dd3f375f4d2a1ae2378869f337d8941ea4d27 100644 (file)
@@ -1,99 +1,99 @@
-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1                                    Start: 02/29/2004 *\r
- * ================                             Last change: 04/23/2004 *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * File              : what-support.php                                 *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Contact support                                  *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung  : Support 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']))\r
-{\r
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
-       require($INC);\r
-}\r
- elseif (!IS_LOGGED_IN())\r
-{\r
-       LOAD_URL(URL."/modules.php?module=index");\r
-}\r
- elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN()))\r
-{\r
-       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "support");\r
-       return;\r
-}\r
-\r
-// Add description as navigation point\r
-ADD_DESCR("member", basename(__FILE__));\r
-\r
-if ((!isset($_POST['ok'])) || (empty($_POST['qsummary'])))\r
-{\r
-       // Output form\r
-       LOAD_TEMPLATE("member_support_form");\r
-}\r
- else\r
-{\r
-       // Load mail template based on your member's decision\r
-       if (GET_EXT_VERSION("admins") >= "0.4.1")\r
-       {\r
-               $a_tpl = "admin_support-".$_POST['qsummary'];\r
-       }\r
-        else\r
-       {\r
-               $msg_a = LOAD_EMAIL_TEMPLATE("admin_support-".$_POST['qsummary'], $_POST['qdetails'], $GLOBALS['userid']);\r
-       }\r
-       $msg_m = LOAD_EMAIL_TEMPLATE("member_support-".$_POST['qsummary'], $_POST['qdetails'], $GLOBALS['userid']);\r
-\r
-       // Select right subject\r
-       switch ($_POST['qsummary'])\r
-       {\r
-               case "ordr"       : $subj_a = SUPPORT_SUBJ_ADMIN_ORDER;       $subj_m = SUPPORT_SUBJ_MEMBER_ORDER;       break;\r
-               case "reflink"    : $subj_a = SUPPORT_SUBJ_ADMIN_REFLINK;     $subj_m = SUPPORT_SUBJ_MEMBER_REFLINK;     break;\r
-               case "unconfirmed": $subj_a = SUPPORT_SUBJ_ADMIN_UNCONFIRMED; $subj_m = SUPPORT_SUBJ_MEMBER_UNCONFIRMED; break;\r
-       }\r
-\r
-       // Send mails away\r
-       if (GET_EXT_VERSION("admins") >= "0.4.1")\r
-       {\r
-               SEND_ADMIN_EMAILS_PRO($subj_a, $a_tpl, $_POST['qdetails'], $GLOBALS['userid']);\r
-       }\r
-        else\r
-       {\r
-               SEND_ADMIN_EMAILS($subj_a, $msg_a);\r
-       }\r
-\r
-       SEND_EMAIL($GLOBALS['userid'], $subj_m, $msg_m);\r
-\r
-       // Drop a message in the admin's area\r
-       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'SUPPORT_MEMBER', '%s', '%s', UNIX_TIMESTAMP())",\r
-        array($GLOBALS['userid'], addslashes($subj_a), addslashes($_POST['qsummary'].":".$_POST['qdetails'])), __FILE__, __LINE__);\r
-\r
-       // Form sent\r
-       LOAD_TEMPLATE("member_support_contcted");\r
-}\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 02/29/2004 *
+ * ================                             Last change: 04/23/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-support.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Contact support                                  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Support 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']))
+{
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+ elseif (!IS_LOGGED_IN())
+{
+       LOAD_URL(URL."/modules.php?module=index");
+}
+ elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN()))
+{
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "support");
+       return;
+}
+
+// Add description as navigation point
+ADD_DESCR("member", basename(__FILE__));
+
+if ((!isset($_POST['ok'])) || (empty($_POST['qsummary'])))
+{
+       // Output form
+       LOAD_TEMPLATE("member_support_form");
+}
+ else
+{
+       // Load mail template based on your member's decision
+       if (GET_EXT_VERSION("admins") >= "0.4.1")
+       {
+               $a_tpl = "admin_support-".$_POST['qsummary'];
+       }
+        else
+       {
+               $msg_a = LOAD_EMAIL_TEMPLATE("admin_support-".$_POST['qsummary'], $_POST['qdetails'], $GLOBALS['userid']);
+       }
+       $msg_m = LOAD_EMAIL_TEMPLATE("member_support-".$_POST['qsummary'], $_POST['qdetails'], $GLOBALS['userid']);
+
+       // Select right subject
+       switch ($_POST['qsummary'])
+       {
+               case "ordr"       : $subj_a = SUPPORT_SUBJ_ADMIN_ORDER;       $subj_m = SUPPORT_SUBJ_MEMBER_ORDER;       break;
+               case "reflink"    : $subj_a = SUPPORT_SUBJ_ADMIN_REFLINK;     $subj_m = SUPPORT_SUBJ_MEMBER_REFLINK;     break;
+               case "unconfirmed": $subj_a = SUPPORT_SUBJ_ADMIN_UNCONFIRMED; $subj_m = SUPPORT_SUBJ_MEMBER_UNCONFIRMED; break;
+       }
+
+       // Send mails away
+       if (GET_EXT_VERSION("admins") >= "0.4.1")
+       {
+               SEND_ADMIN_EMAILS_PRO($subj_a, $a_tpl, $_POST['qdetails'], $GLOBALS['userid']);
+       }
+        else
+       {
+               SEND_ADMIN_EMAILS($subj_a, $msg_a);
+       }
+
+       SEND_EMAIL($GLOBALS['userid'], $subj_m, $msg_m);
+
+       // Drop a message in the admin's area
+       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'SUPPORT_MEMBER', '%s', '%s', UNIX_TIMESTAMP())",
+        array($GLOBALS['userid'], addslashes($subj_a), addslashes($_POST['qsummary'].":".$_POST['qdetails'])), __FILE__, __LINE__);
+
+       // Form sent
+       LOAD_TEMPLATE("member_support_contcted");
+}
+//
+?>