]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_forced_costs.php
Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / admin / what-list_forced_costs.php
index c7d63409fe8f1a8a017eed2ca60568c0dbe4c956..838e2928b333e6c1378bbd57c61ec35d4c621233 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -44,10 +44,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 // By default show the list...
-$show = true;
+$show = TRUE;
 
 // Check for 'url_id' element
-if ((countRequestPost() > 0) && ((!isPostRequestElementSet('forced_costs_id')) || (!is_array(postRequestElement('forced_costs_id'))) || (count(postRequestElement('forced_costs_id')) == 0))) {
+if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_costs_id'))) {
        // Not found so output message
        displayMessage('{--ADMIN_FORCED_COSTS_NO_SELECTIONS--}');
 
@@ -58,35 +58,35 @@ if ((countRequestPost() > 0) && ((!isPostRequestElementSet('forced_costs_id')) |
 // Edit or delete button hit?
 if (isFormSent('add')) {
        // Add new forced ad
-       showEntriesByXmlCallback('admin_add_do_forced_costs');
+       doGenericXmlTemplateCallback('admin_add_do_forced_costs');
 } elseif (isFormSent('edit')) {
        // Show entries for editing
-       showEntriesByXmlCallback('admin_edit_show_forced_costs');
+       doGenericXmlTemplateCallback('admin_edit_show_forced_costs');
 
        // Do not show the list of URLs after this template
-       $show = false;
+       $show = FALSE;
 } elseif (isFormSent('do_edit')) {
        // Change data of entries
-       showEntriesByXmlCallback('admin_edit_do_forced_costs');
+       doGenericXmlTemplateCallback('admin_edit_do_forced_costs');
 } elseif (isFormSent('delete')) {
        // Show entries for deletion
-       showEntriesByXmlCallback('admin_delete_show_forced_costs');
+       doGenericXmlTemplateCallback('admin_delete_show_forced_costs');
 
        // Do not show the list of URLs after this template
-       $show = false;
+       $show = FALSE;
 } elseif (isFormSent('do_delete')) {
        // Remove entries from database
-       showEntriesByXmlCallback('admin_delete_do_forced_costs');
+       doGenericXmlTemplateCallback('admin_delete_do_forced_costs');
 }
 
 // Show entries?
-if ($show === false) {
+if ($show === FALSE) {
        // No, a form has already been show
-       return false;
+       return FALSE;
 } // END - if
 
 // List all URLs
-showEntriesByXmlCallback('admin_list_forced_costs');
+doGenericXmlTemplateCallback('admin_list_forced_costs');
 
 // Display form for adding a forced-ad
 loadTemplate('admin_add_forced_costs');