]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-reflist.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / modules / member / what-reflist.php
index 94339e44f0d1eaca5959d6efcc3a89bef6d84918..456c45fb0bc73c174721f94b22e91302b96f3648 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * For more information visit: http://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 *
@@ -37,7 +37,7 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       die();
+       exit();
 } elseif (!isMember()) {
        // User is not logged in
        redirectToIndexMemberOnlyModule();
@@ -46,9 +46,10 @@ if (!defined('__SECURITY')) {
 // Add description as navigation point
 addYouAreHereLink('member', __FILE__);
 
-// Load all referal levels
-$result = SQL_QUERY('SELECT
-       `level`,`percents`
+// Load all referral levels
+$result = sqlQuery('SELECT
+       `level`,
+       `percents`
 FROM
        `{?_MYSQL_PREFIX?}_refdepths`
 WHERE
@@ -57,21 +58,21 @@ ORDER BY
        `level` ASC', __FILE__, __LINE__);
 
 // Are there some entries? (Shall be!)
-if (!SQL_HASZERONUMS($result)) {
+if (!ifSqlHasZeroNums($result)) {
        // List all levels
        $OUT = '';
-       while ($content = SQL_FETCHARRAY($result)) {
+       while ($content = sqlFetchArray($result)) {
                // Init variables
                $rows = '';
                $counter = '0';
 
                // Check for users ref in this level
-               foreach (getUserReferalPoints(getMemberId(), $content['level']) as $refRow) {
+               foreach (getUserReferralPoints(getMemberId(), $content['level']) as $refRow) {
                        // Add/"translate" more content
-                       $refRow['click_rate']   = translateComma($refRow['click_rate'], true, 1);
+                       $refRow['click_rate'] = translateComma($refRow['click_rate'], TRUE, 1);
 
                        // Load row template
-                       $rows .= loadTemplate('member_ref_list_row', true, $refRow);
+                       $rows .= loadTemplate('member_list_referral_row', TRUE, $refRow);
 
                        // Count this ref and switch color
                        $counter++;
@@ -79,22 +80,22 @@ if (!SQL_HASZERONUMS($result)) {
 
                // Remember the content
                $content['counter']  = $counter;
-               $content['percents'] = translateComma($content['percents'], true, 1);
+               $content['percents'] = translateComma($content['percents'], TRUE, 1);
                $content['rows']     = $rows;
 
                // Load level template
-               $OUT .= loadTemplate('member_ref_list_level', true, $content);
+               $OUT .= loadTemplate('member_list_referral_level', TRUE, $content);
        } // END - while
 
        // Load main template
-       loadTemplate('member_ref_list', false, $OUT);
+       loadTemplate('member_list_referral', FALSE, $OUT);
 } else {
        // No entries
        displayMessage('{--MEMBER_REFBACK_NO_ENTRIES--}');
 }
 
 // Free result
-SQL_FREERESULT($result);
+sqlFreeResult($result);
 
 // [EOF]
 ?>