]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_sponsor_pay.php
Fix for rewritting code
[mailer.git] / inc / modules / admin / what-list_sponsor_pay.php
index ad8ff06b09af15e50387dbf9c7245cf2aaf0f47d..66474e60a8e2e469219f4fcbe3d98bc5cc0a4979 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * M-XChange v0.2.1                                   Start: 06/10/2005 *
- * ================                             Last change: 05/19/2008 *
+ * Mailer v0.2.1-FINAL                                Start: 06/10/2005 *
+ * ===================                          Last change: 05/19/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-list_sponsor_pay.php                        *
@@ -49,11 +49,11 @@ $message = '';
 if (isPostRequestElementSet('add')) {
        // Check input variables
        if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add');
-       if ((round(postRequestElement('pay_rate')) == 0) || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add');
+       if ((round(postRequestElement('pay_rate')) == '0') || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add');
 
        setRequestPostElement('pay_min_count', bigintval(postRequestElement('pay_min_count')));
 
-       if ((postRequestElement('pay_min_count') == 0) || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add');
+       if ((postRequestElement('pay_min_count') == '0') || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add');
        if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add');
 
 } elseif ((isPostRequestElementSet('edit')) || (isPostRequestElementSet('del')) || (isPostRequestElementSet('change')) || (isPostRequestElementSet('remove'))) {
@@ -67,7 +67,7 @@ if (isPostRequestElementSet('add')) {
        } elseif (isPostRequestElementSet('change')) {
                // Change entries here...
                foreach (postRequestElement('id') as $id => $sel) {
-                       // Secure ID
+                       // Secure id
                        $id = bigintval($id);
 
                        // Save entry
@@ -114,7 +114,7 @@ if (isPostRequestElementSet('add')) {
        // Check if entry with same name does exists
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1",
                array(postRequestElement('pay_name')), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // No entry found so add this line
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')",
                        array(