]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_country.php
Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / modules / admin / what-list_country.php
index 069d2ea0b113fb5914ce04e419d6c214fcb8cc27..1a5e1ceddce6b52d261d4ee7f74134d232e0325f 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -79,11 +79,13 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl
                'title' => '{--ADMIN_COUNTRY_ACTIVATION_NEXT_LINK--}'
        ));
 } elseif (((isFormSent('edit')) || (isPostRequestElementSet('delete'))) && (isPostRequestElementSet('id'))) {
-       if (count(postRequestElement('id')) > 0) {
+       // Are there entries?
+       if (ifPostContainsSelections('id')) {
+               // Is the proper form sent?
                if (isFormSent('edit')) {
                        // Edit template
                        $row    = 'admin_edit_country_row';
-                       $post   = 'modify';
+                       $do     = 'modify';
                        $class  = 'form_submit';
                        $submit = '{--ADMIN_COUNTRY_EDIT_NOW--}';
                        $title  = '{--ADMIN_COUNTRY_EDIT_TITLE--}';
@@ -91,7 +93,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl
                } else {
                        // Delete template
                        $row    = 'admin_delete_country_row';
-                       $post   = 'remove';
+                       $do     = 'remove';
                        $class  = 'form_delete';
                        $submit = '{--ADMIN_COUNTRY_DELETE_NOW--}';
                        $title  = '{--ADMIN_COUNTRY_DELETE_TITLE--}';
@@ -122,7 +124,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl
                // Prepare content for template
                $content = array(
                        'rows'   => $OUT,
-                       'mode'   => $post,
+                       'do'     => $do,
                        'class'  => $class,
                        'title'  => $title,
                        'submit' => $submit,
@@ -155,7 +157,7 @@ LIMIT 1");
        } elseif ((isFormSent('do_delete')) && (isPostRequestElementSet('id'))) {
                // Remove
                $IDs = implode(',', array_keys(postRequestElement('id')));
-               addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestElement('id'))."");
+               addSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (' . $IDs . ') LIMIT ' . countPostSelection('id') . '');
 
                // Create message
                $message = '{--ADMIN_COUNTRIES_REMOVED--}';
@@ -173,7 +175,7 @@ LIMIT 1");
        $result = SQL_QUERY('SELECT `id`,`code`,`descr`,`is_active` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `code` ASC',
        __FILE__, __LINE__);
 
-       // Do we have entries?
+       // Are there entries?
        if (!SQL_HASZERONUMS($result)) {
                // List all countries
                $OUT = '';