]> git.mxchange.org Git - mailer.git/commitdiff
More fixes, thanks to Piter01
authorRoland Häder <roland@mxchange.org>
Wed, 3 Dec 2008 08:02:34 +0000 (08:02 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 3 Dec 2008 08:02:34 +0000 (08:02 +0000)
14 files changed:
inc/databases.php
inc/modules/admin/what-config_yoomedia.php
inc/modules/guest/what-top10.php
inc/modules/member/what-beg.php
inc/modules/member/what-beg2.php
inc/modules/member/what-bonus.php
inc/modules/member/what-holiday.php
inc/modules/member/what-nickname.php
inc/modules/member/what-payout.php
inc/modules/member/what-primera.php
inc/modules/member/what-transfer.php
inc/modules/member/what-wernis.php
inc/modules/order.php
inc/mysql-manager.php

index 1e6813f4a9361e833358c7372ee0dc3b497de7b9..3774c5042e1b93380be42fe6f2bc748e4593507d 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "587");
+define('CURR_SVN_REVISION', "588");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index bd7cb1088667e03472c06cf3ef7be24ef7abe74e..e93cc9bb4abcee156e5b75b8c07b445518db7054 100644 (file)
@@ -35,7 +35,7 @@
 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif (!EXT_IS_ACTIVE("yoomedia"))
+} elseif (!EXT_IS_ACTIVE("yoomedia")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia");
        return;
 }
index 7ae01f4d41dcffa5ffdc584f435e5a2e9f168224..8536854d676fb762afc3da15f528636253c34556 100644 (file)
@@ -35,7 +35,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif (!EXT_IS_ACTIVE("top10"))
+} elseif (!EXT_IS_ACTIVE("top10")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "top10");
        return;
 }
index 47c3a1710caee127888c5ddccb08c842f880c869..70af3d4e2c68ecdc7d599756865609386601dd02 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("beg"))
+} elseif (!EXT_IS_ACTIVE("beg")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
        return;
 }
index f8952e552b22fedb3e7a488a3de6f76a73a8e50c..1c9ecfdc6997c2650c394472b7138962e8f61c36 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
-} elseif (!EXT_IS_ACTIVE("beg"))
+} elseif (!EXT_IS_ACTIVE("beg")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
        return;
 }
index 1c20685a78f851da8d566469045efb3d6351b3f1..9d340d18e7a50bffe9ced1f003742e3fa6e82254 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
-} elseif (!EXT_IS_ACTIVE("bonus"))
+} elseif (!EXT_IS_ACTIVE("bonus")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus");
        return;
 }
index b17294aea1913af3f534c999da25cc31d7893fd1..4cbbc22cad8112144a31b3c9005126939cb141e8 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("holiday"))
+} elseif (!EXT_IS_ACTIVE("holiday")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "holiday");
        return;
 }
index 13995d1e409f057c8a54f1d337dd17987f391483..038010f0540e1a0dfecfc70d3fe92aa81db0f33f 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("nickname"))
+} elseif (!EXT_IS_ACTIVE("nickname")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "nickname");
        return;
 }
@@ -46,35 +46,28 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 $VALID = false;
 
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
        // Nickname was submitted so let's check if it is not already in use
-       if (!empty($_POST['nickname']))
-       {
+       if (!empty($_POST['nickname'])) {
                // Check if nickname is valid
                $PATTERN = "[".__NICKNAME_PATTERN."]{".__NICKNAME_LENGTH.",}";
-               if (ereg($PATTERN, $_POST['nickname'], $array))
-               {
+               if (ereg($PATTERN, $_POST['nickname'], $array)) {
                        // Entered nickname is valid?
                        if ($array[0] == $_POST['nickname']) $VALID = true;
-               }
-       }
-}
+               } // END - if
+       } // END - if
+} // END - if
 
-if ($VALID)
-{
+if ($VALID) {
        // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !
        $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' AND userid != '%s' LIMIT 1",
-        array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0)
-       {
+               array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
+       if (SQL_NUMROWS($result) == 0) {
                // Nickname not in use, so set it now
                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nickname='%s' WHERE userid=%s LIMIT 1",
-                array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
+                       array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
                $content = NICKNAME_SAVED;
-       }
-        else
-       {
+       } else {
                // Free result
                SQL_FREERESULT($result);
 
@@ -84,20 +77,18 @@ if ($VALID)
 
        // Load template
        LOAD_TEMPLATE("admin_settings_saved", false, $content);
-}
- else
-{
+} else {
        // Load current nickname
        define('__NICKNAME', NICKNAME_GET_NICK($GLOBALS['userid']));
 
        // Do we have already submit the form?
-       if (!empty($_POST['nickname']))
-       {
+       if (!empty($_POST['nickname'])) {
                OUTPUT_HTML("<STRONG class=\"member_failed\">".NICKNAME_IS_INVALID."</STRONG><P></P>");
-       }
+       } // END - if
 
        // Load Template
        LOAD_TEMPLATE("member_nickname_form");
 }
+
 //
 ?>
index dccd81ffb80efda2ba69cd8a0761c0d6b5f67790..d352d80cf79d48bde4892a970e5465bee5fc7fa5 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        // Not logged in
        LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("payout"))
+} elseif (!EXT_IS_ACTIVE("payout")) {
        // Extension "payout" is not active
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "payout");
        return;
index 7b3a4f13f011fc25522277f921d644995fdfe50c..746f59e376a8430ea72d39e3e22e3645b091a6cf 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("primera"))
+} elseif (!EXT_IS_ACTIVE("primera")) {
        // Extension "primera" is not activated
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "primera");
        return;
index 7af1122af8a3bd185fb0bfbb7c664c784cd9d413..6698a42deff7e35f979039a461f74173e766749e 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("transfer"))
+} elseif (!EXT_IS_ACTIVE("transfer")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "transfer");
        return;
 }
index 84ca9cd0353da9a9c092ca920ecb5ba6362de590..8578e52479abb22486b96892926c367c0358645f 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("wernis"))
+} elseif (!EXT_IS_ACTIVE("wernis")) {
        // Extension "wernis" is not activated
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
        return;
index c2b8ad87324d4f7007d8b48852a3478d3faf6848..a880995003bf04058c46b6676db1e0bb60cddb15 100644 (file)
@@ -36,7 +36,7 @@ $URL = "";
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif (!EXT_IS_ACTIVE("order"))
+} elseif (!EXT_IS_ACTIVE("order")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
        return;
 } elseif (!IS_MEMBER()) {
index 158977bd0f260c604c04d9b0e1aefca6bad34394..b90a230cf34bfc0082ca3f252c619de75c9f92c1 100644 (file)
@@ -2269,8 +2269,14 @@ ORDER BY ur.refid ASC",
                        // Get unconfirmed mails
                        $row['unconfirmed']  = GET_TOTAL_DATA($row['refid'], "user_links", "id", "userid", true);
 
-                       // Calculate clickrate
-                       $row['clickrate'] = ($row['mails_confirmed'] / $row['emails_received'] * 100);
+                       // Init clickrate with zero
+                       $row['clickrate'] = 0;
+
+                       // Is at least one mail received?
+                       if ($row['emails_received'] > 0) {
+                               // Calculate clickrate
+                               $row['clickrate'] = ($row['mails_confirmed'] / $row['emails_received'] * 100);
+                       } // END - if
 
                        // Activity is "active" by default because if autopurge is not installed
                        $row['activity'] = MEMBER_ACTIVITY_ACTIVE;