]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-sponsor_infos.php
Naming convention applied (database columns, keys), Code cosmetics applied:
[mailer.git] / inc / modules / guest / what-sponsor_infos.php
index ae57f8345b8b6c9c21db7416d3a17d891cb814c9..d2060c535716094f6ba30ca52fd7aca5d5486c79 100644 (file)
@@ -55,25 +55,28 @@ $result_act = false;
 $result_pay = false;
 
 // Load all sponsor actions
-$result_act = SQL_QUERY("SELECT m.title, c.conv_rate, c.conv_name
-FROM `{?_MYSQL_PREFIX?}_sponsor_menu` AS m
-LEFT JOIN `{?_MYSQL_PREFIX?}_sponsor_action_convert` AS c ON m.what=c.ext_name
-LEFT JOIN `{?_MYSQL_PREFIX?}_sponsor_registry` AS r ON m.what=r.ext_name
-WHERE m.`action`='actions' AND r.is_active='Y'
-ORDER BY m.sort ASC", __FILE__, __LINE__);
+$result_act = SQL_QUERY("SELECT
+       m.title AS `conv_title`, c.conv_rate, c.conv_name
+FROM
+       `{?_MYSQL_PREFIX?}_sponsor_menu` AS m
+LEFT JOIN
+       `{?_MYSQL_PREFIX?}_sponsor_action_convert` AS c
+ON
+       m.what=c.ext_name
+LEFT JOIN
+       `{?_MYSQL_PREFIX?}_sponsor_registry` AS r
+ON
+       m.what=r.ext_name
+WHERE
+       m.`action`='actions' AND
+       r.is_active='Y'
+ORDER BY
+       m.sort ASC", __FILE__, __LINE__);
 
 if (!SQL_HASZERONUMS($result_act)) {
        // Load all actions
        $OUT_ACT = '';
        while ($content = SQL_FETCHARRAY($result_act)) {
-               // Prepare data for the row template
-               // @TODO Rewritings: conv->conv_rate,name->conv_name in template
-               $content = array(
-                       'title' => $content['title'],
-                       'conv'  => round($content['conv_rate']),
-                       'name'  => $content['conv_name'],
-               );
-
                // Load row template and switch color
                $OUT_ACT .= loadTemplate('guest_sponsor_act_row', true, $content);
        } // END - while