2 /************************************************************************
3 * MXChange v0.2.1 Start: 02/29/2004 *
4 * ================ Last change: 04/23/2004 *
6 * -------------------------------------------------------------------- *
7 * File : what-support.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Contact support *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Support kontaktieren *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2009 by Roland Haeder *
21 * For more information visit: http://www.mxchange.org *
23 * This program is free software; you can redistribute it and/or modify *
24 * it under the terms of the GNU General Public License as published by *
25 * the Free Software Foundation; either version 2 of the License, or *
26 * (at your option) any later version. *
28 * This program is distributed in the hope that it will be useful, *
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
31 * GNU General Public License for more details. *
33 * You should have received a copy of the GNU General Public License *
34 * along with this program; if not, write to the Free Software *
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
37 ************************************************************************/
39 // Some security stuff...
40 if (!defined('__SECURITY')) {
42 } elseif (!isMember()) {
43 redirectToIndexMemberOnlyModule();
46 // Add description as navigation point
47 addMenuDescription('member', __FILE__);
49 if ((!isExtensionActive('support')) && (!isAdmin())) {
50 loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('support'));
54 if ((!isFormSent()) || (!isPostRequestElementSet(('qsummary')))) {
56 loadTemplate('member_support_form', false, getUserDataArray());
58 // Load mail template based on your member's decision
59 if (getExtensionVersion('admins') >= '0.4.1') {
60 $a_tpl = 'admin_support-' . postRequestElement('qsummary');
62 $message_a = loadEmailTemplate('admin_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getUserId());
64 $message_m = loadEmailTemplate('member_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getUserId());
66 // Select right subject
67 switch (postRequestElement('qsummary')) {
69 $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_ORDER');
70 $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_ORDER');
74 $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_REFLINK');
75 $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_REFLINK');
79 $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_UNCONFIRMED');
80 $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_UNCONFIRMED');
85 sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestElement('qdetails')), getUserId());
88 sendEmail(getUserId(), $subj_m, $message_m);
90 // Drop a message in the admin's area
91 createNewTask($subj_a, postRequestElement('qsummary') . ' : ' . postRequestElement('qdetails'), 'SUPPORT_MEMBER', getUserId());
94 loadTemplate('member_support_contcted');