]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_payouts.php
Email details and bonus mails in admin swapped out to template
[mailer.git] / inc / modules / admin / what-config_payouts.php
index ef2ee324cd8112c382c029509a6c5c22ae4184c5..39e03d9c91b293b526ececfd8a50ef1ed678f070 100644 (file)
@@ -87,7 +87,7 @@ if ((isset($_POST['edit'])) && (SELECTION_COUNT($_POST['sel']) > 0))
        if ((isset($_GET['ok'])) && ($_GET['ok'] == "ok"))
        {
                // Edit entries
-               foreach ($_POST['sel'] as $id=>$sel)
+               foreach ($_POST['sel'] as $id => $sel)
                {
                        // Secure ID
                        $id = bigintval($id);
@@ -98,8 +98,8 @@ if ((isset($_POST['edit'])) && (SELECTION_COUNT($_POST['sel']) > 0))
                                // Update entry
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_payout_types SET
 type='%s',
-rate=%d,
-min_points=%d,
+rate=%s,
+min_points=%s,
 allow_url='%s'
 WHERE id='".$id."' LIMIT 1",
  array(
@@ -116,10 +116,10 @@ WHERE id='".$id."' LIMIT 1",
        {
                $display = false; //Suppress any other outputs
                $SW = 2; $OUT = "";
-               foreach ($_POST['sel'] as $id=>$sel)
+               foreach ($_POST['sel'] as $id => $sel)
                {
                        // Load data
-                       $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM "._MYSQL_PREFIX."_payout_types WHERE id=%d LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
                         array(bigintval($id)), __FILE__, __LINE__);
                        list($title, $rate, $mpoi, $allow) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
@@ -150,9 +150,9 @@ WHERE id='".$id."' LIMIT 1",
        if ($_GET['ok'] == "ok")
        {
                // Delete entries
-               foreach ($_POST['sel'] as $id=>$sel)
+               foreach ($_POST['sel'] as $id => $sel)
                {
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payout_types WHERE id=%d LIMIT 1",
+                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
                         array(bigintval($id)), __FILE__, __LINE__);
                }
                $msg = ADMIN_PAYOUT_ENTRIES_DELETED;
@@ -161,13 +161,13 @@ WHERE id='".$id."' LIMIT 1",
        {
                $display = false; //Suppress any other outputs
                $SW = 2; $OUT = "";
-               foreach ($_POST['sel'] as $id=>$sel)
+               foreach ($_POST['sel'] as $id => $sel)
                {
                        // Secure ID number
                        $id = bigintval($id);
 
                        // Load data
-                       $result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM "._MYSQL_PREFIX."_payout_types WHERE id=%d LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
                         array($id), __FILE__, __LINE__);
                        list($title, $rate, $mpoi) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
@@ -235,12 +235,12 @@ if ((SQL_NUMROWS($result_mem) > 0) && ($display))
 {
        // Members has requested payouts
        SQL_FREERESULT($result_mem);
-       OUTPUT_HTML ("<P><A href=\"".URL."/modules.php?module=admin&amp;what=list_payouts\">".ADMIN_PAYOUT_LIST_REQUESTS."</A></P>");
+       OUTPUT_HTML("<P><A href=\"".URL."/modules.php?module=admin&amp;what=list_payouts\">".ADMIN_PAYOUT_LIST_REQUESTS."</A></P>");
 }
  elseif ($display)
 {
        // No member requests so far
-       OUTPUT_HTML ("<P><STRONG>".ADMIN_PAYOUT_NO_MEMBER_REQUESTS."</STRONG></P>");
+       OUTPUT_HTML("<P><STRONG>".ADMIN_PAYOUT_NO_MEMBER_REQUESTS."</STRONG></P>");
 }
 // Add new paypout type
 if ($display) LOAD_TEMPLATE("admin_payout_add_new");