]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-support.php
Security line in all includes changed
[mailer.git] / inc / modules / member / what-support.php
index d98a7808eef7b1c5ace5dbe6a0ae178e21620649..2e00bc37a19bfbd9d5d03c2b3c158c6073a14e9d 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-}
- elseif (!IS_LOGGED_IN())
-{
+}  elseif (!IS_MEMBER()){
        LOAD_URL("modules.php?module=index");
-}
- elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN()))
-{
+} elseif (!EXT_IS_ACTIVE("support")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "support");
        return;
 }
@@ -58,12 +53,9 @@ if ((!isset($_POST['ok'])) || (empty($_POST['qsummary'])))
  else
 {
        // Load mail template based on your member's decision
-       if (GET_EXT_VERSION("admins") >= "0.4.1")
-       {
+       if (GET_EXT_VERSION("admins") >= "0.4.1") {
                $a_tpl = "admin_support-".$_POST['qsummary'];
-       }
-        else
-       {
+       } 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']);