X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-support.php;h=b6c9d742c6b53cb85abc84bf188e517538b5aabd;hb=16de7d9e8b98108627db01688bc095240b5ba8d2;hp=32a1213233d7851e09bdcde6ab77ad02e23c040e;hpb=e01fcf1ca8ddeb72af76465df3ef72301a1cdae7;p=mailer.git diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 32a1213233..b6c9d742c6 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -10,14 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Support kontaktieren * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * 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 * @@ -38,60 +38,61 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); -} elseif (!IS_MEMBER()){ - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "support"); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR("member", __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('support')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('support')); + return; +} // END - if -if ((!IS_FORM_SENT()) || (!REQUEST_ISSET_POST(('qsummary')))) { +if ((!isFormSent()) || (!isPostRequestElementSet(('qsummary')))) { // Output form - LOAD_TEMPLATE("member_support_form"); + loadTemplate('member_support_form', false, getUserDataArray()); } else { // Load mail template based on your member's decision - if (GET_EXT_VERSION("admins") >= "0.4.1") { - $a_tpl = "admin_support-".REQUEST_POST('qsummary'); + if (getExtensionVersion('admins') >= '0.4.1') { + $a_tpl = 'admin_support-' . postRequestElement('qsummary'); } else { - $msg_a = LOAD_EMAIL_TEMPLATE("admin_support-".REQUEST_POST('qsummary'), array('text' => REQUEST_POST('qdetails')), getUserId()); + $message_a = loadEmailTemplate('admin_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getUserId()); } - $msg_m = LOAD_EMAIL_TEMPLATE("member_support-".REQUEST_POST('qsummary'), array('text' => REQUEST_POST('qdetails')), getUserId()); + $message_m = loadEmailTemplate('member_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getUserId()); // Select right subject - switch (REQUEST_POST('qsummary')) { - case "ordr": + switch (postRequestElement('qsummary')) { + case 'ordr': $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_ORDER'); $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_ORDER'); break; - case "reflink": + case 'reflink': $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_REFLINK'); $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_REFLINK'); break; - case "unconfirmed": + case 'unconfirmed': $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_UNCONFIRMED'); $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_UNCONFIRMED'); break; } // END - switch // Send mail to admin - SEND_ADMIN_NOTIFICATION($subj_a, $a_tpl, array('text' => REQUEST_POST('qdetails')), getUserId()); + sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestElement('qdetails')), getUserId()); // Send mail to user - SEND_EMAIL(getUserId(), $subj_m, $msg_m); + sendEmail(getUserId(), $subj_m, $message_m); // Drop a message in the admin's area - 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(getUserId(), $subj_a, REQUEST_POST('qsummary').":".array('text' => REQUEST_POST('qdetails'))), __FILE__, __LINE__); + createNewTask($subj_a, postRequestElement('qsummary') . ' : ' . postRequestElement('qdetails'), 'SUPPORT_MEMBER', getUserId()); // Form sent - LOAD_TEMPLATE("member_support_contcted"); + loadTemplate('member_support_contcted'); } -// + +// [EOF] ?>