]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-sponsor_infos.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / modules / guest / what-sponsor_infos.php
index dd757d9e3c3ccec1a973b72c26667b6c231580a5..8129d6b9c82044b4e13db2e81fd1194e4b5c4f8a 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * 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 *
@@ -52,45 +52,49 @@ if ((!isExtensionActive('sponsor'))) {
 $result_act = FALSE;
 $result_pay = FALSE;
 
+// ... and output variables
+$OUT_ACT = '';
+$OUT_PAY = '';
+
 // Load all sponsor actions
-$result_act = SQL_QUERY("SELECT
-       m.title AS `conv_title`, c.conv_rate, c.conv_name
+$result_act = sqlQuery("SELECT
+       `m`.`title` AS `conv_title`,
+       `c`.`conv_rate`,
+       `c`.`conv_name`
 FROM
-       `{?_MYSQL_PREFIX?}_sponsor_menu` AS m
+       `{?_MYSQL_PREFIX?}_sponsor_menu` AS `m`
 LEFT JOIN
-       `{?_MYSQL_PREFIX?}_sponsor_action_convert` AS c
+       `{?_MYSQL_PREFIX?}_sponsor_action_convert` AS `c`
 ON
-       m.what=c.ext_name
+       `m`.`what`=`c`.`ext_name`
 LEFT JOIN
-       `{?_MYSQL_PREFIX?}_sponsor_registry` AS r
+       `{?_MYSQL_PREFIX?}_sponsor_registry` AS `r`
 ON
-       m.what=r.ext_name
+       `m`.`what`=`r`.`ext_name`
 WHERE
-       m.`action`='actions' AND
-       r.is_active='Y'
+       `m`.`action`='actions' AND
+       `r`.`is_active`='Y'
 ORDER BY
-       m.sort ASC", __FILE__, __LINE__);
+       `m`.`sort` ASC", __FILE__, __LINE__);
 
-if (!SQL_HASZERONUMS($result_act)) {
+if (!ifSqlHasZeroNums($result_act)) {
        // Load all actions
-       $OUT_ACT = '';
-       while ($content = SQL_FETCHARRAY($result_act)) {
+       while ($content = sqlFetchArray($result_act)) {
                // Load row template and switch color
                $OUT_ACT .= loadTemplate('guest_sponsor_act_row', TRUE, $content);
        } // END - while
 
        // Check for pay types
-       $result_pay = SQL_QUERY('SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY `pay_name` ASC', __FILE__, __LINE__);
-       if (!SQL_HASZERONUMS($result_pay)) {
+       $result_pay = sqlQuery('SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY `pay_name` ASC', __FILE__, __LINE__);
+       if (!ifSqlHasZeroNums($result_pay)) {
                // Load all pay types
-               $OUT_PAY = '';
-               while ($content = SQL_FETCHARRAY($result_pay)) {
+               while ($content = sqlFetchArray($result_pay)) {
                        // Load row template and switch color
                        $OUT_PAY .= loadTemplate('guest_sponsor_pay_row', TRUE, $content);
                } // END - while
        } else {
                // No pay types setuped so far!
-               $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', FALSE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
+               $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
        }
 } else {
        // No actions activated so far!
@@ -99,8 +103,8 @@ if (!SQL_HASZERONUMS($result_act)) {
 }
 
 // Free memory
-SQL_FREERESULT($result_act);
-SQL_FREERESULT($result_pay);
+sqlFreeResult($result_act);
+sqlFreeResult($result_pay);
 
 // Transfer rows to an array
 $content = array(