]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_country.php
More rewrites from double- to single-quote
[mailer.git] / inc / modules / admin / what-list_country.php
index 61d404a6b4ec0be2b7f97692d456b7237081b97a..5739f8d512d5d53ffedb05a38ffaf11ae9bd1dd9 100644 (file)
@@ -76,25 +76,25 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
        ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "countries", "is_active");
 
        // Show next link
-       LOAD_TEMPLATE("admin_next_link", false, array(
-               'url'   => "modules.php?module=admin&what=list_country",
+       LOAD_TEMPLATE('admin_next_link', false, array(
+               'url'   => 'modules.php?module=admin&what=list_country',
                'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK')
        ));
 } elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('delete'))) && (REQUEST_ISSET_POST(('id')))) {
        if (count(REQUEST_POST('id')) > 0) {
                if (REQUEST_ISSET_POST('edit')) {
                        // Edit template
-                       $row    = "admin_list_country_edit_row";
+                       $row    = 'admin_list_country_edit_row';
                        $post   = 'modify';
-                       $class  = "admin_submit";
+                       $class  = 'admin_submit';
                        $submit = getMessage('ADMIN_COUNTRY_EDIT_NOW');
                        $title  = getMessage('ADMIN_COUNTRY_EDIT_TITLE');
-                       $reset  = "<input type=\"reset\" class=\"admin_reset\" value=\"{!UNDO_SELECTIONS!}\" />&nbsp;*\n";
+                       $reset  = '<input type="reset" class="admin_reset" value="{!UNDO_SELECTIONS!}" />&nbsp;*';
                } else {
                        // Delete template
-                       $row    = "admin_list_country_del_row";
+                       $row    = 'admin_list_country_del_row';
                        $post   = 'remove';
-                       $class  = "admin_delete";
+                       $class  = 'admin_delete';
                        $submit = getMessage('ADMIN_COUNTRY_DELETE_NOW');
                        $title  = getMessage('ADMIN_COUNTRY_DELETE_TITLE');
                        $reset  = '';
@@ -121,7 +121,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
 
                                if ($post == 'modify') {
                                        // Generate default selection in edit-mode
-                                       $content['status'] = ADD_OPTION_LINES("/ARRAY/", array("Y","N"), array(YES, NO ), $status);
+                                       $content['status'] = ADD_OPTION_LINES('/ARRAY/', array('Y', 'N'), array(getMessage('YES'), getMessage('NO')), $status);
                                } else {
                                        // Only display status when in delete-mode
                                        $content['status'] = TRANSLATE_YESNO($status);
@@ -140,7 +140,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
                define('__COUNTRY_RESET' , $reset);
 
                // Load main template
-               LOAD_TEMPLATE("admin_list_country_form");
+               LOAD_TEMPLATE('admin_list_country_form');
        }
 } else {
        // Shall we modify / remove entries now?
@@ -148,15 +148,15 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
        if ((REQUEST_ISSET_POST(('modify'))) && (REQUEST_ISSET_POST(('id')))) {
                // Modify
                foreach (REQUEST_POST('id') as $id => $sel) {
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET code='".REQUEST_POST('code', $id)."', descr='".REQUEST_POST('descr', $id)."', is_active='".REQUEST_POST('is_active', $id)."' WHERE id='".$id."' LIMIT 1");
+                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET `code`='".REQUEST_POST('code', $id)."', `descr`='".REQUEST_POST('descr', $id)."', `is_active`='".REQUEST_POST('is_active', $id)."' WHERE `id`='".$id."' LIMIT 1");
                }
 
                // Create message
                $message = getMessage('ADMIN_COUNTRIES_MODIFIED');
        } elseif ((REQUEST_ISSET_POST('remove')) && (REQUEST_ISSET_POST(('id')))) {
                // Remove
-               $IDs = implode(",", array_keys(REQUEST_POST('id')));
-               ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE id IN (".$IDs.") LIMIT ".count(REQUEST_POST('id'))."");
+               $IDs = implode(',', array_keys(REQUEST_POST('id')));
+               ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(REQUEST_POST('id'))."");
 
                // Create message
                $message = getMessage('ADMIN_COUNTRIES_REMOVED');
@@ -171,7 +171,8 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
        }
 
        // Load currenty setup country codes to list
-       $result = SQL_QUERY("SELECT id, code, descr, is_active FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY code", __FILE__, __LINE__);
+       $result = SQL_QUERY('SELECT id, code, descr, is_active FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY code',
+               __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List all countries
                $OUT = ''; $SW = 2;
@@ -188,7 +189,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
                        );
 
                        // Load row template and switch colors
-                       $OUT .= LOAD_TEMPLATE("admin_list_country_row", true, $content);
+                       $OUT .= LOAD_TEMPLATE('admin_list_country_row', true, $content);
                        $SW = 3 - $SW;
                }
 
@@ -196,17 +197,17 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
                SQL_FREERESULT($result);
        } else {
                // No code setup so far (not possible by this software! 'DE' for 'Deutschland' is default
-               $OUT = LOAD_TEMPLATE("admin_list_country_no_row", true);
+               $OUT = LOAD_TEMPLATE('admin_list_country_no_row', true);
        }
 
        // Add list to constant for the template
        define('__COUNTRY_ROWS', $OUT);
 
        // Include add template
-       define('__ADD_COUNTRY_FORM', LOAD_TEMPLATE("admin_add_country", true));
+       define('__ADD_COUNTRY_FORM', LOAD_TEMPLATE('admin_add_country', true));
 
        // Load main template
-       LOAD_TEMPLATE("admin_list_country");
+       LOAD_TEMPLATE('admin_list_country');
 }
 
 //