]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_grade_data.php
Updated copyright year.
[mailer.git] / inc / modules / admin / what-list_grade_data.php
index d6eb5bf20f05f1d2c5cd18f35862a033e1912edc..41ea24acb6c4868862c9f0858617043ba136c610 100644 (file)
@@ -8,7 +8,7 @@
  * -------------------------------------------------------------------- *
  * Short description : List all grades                                  *
  * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Listet alle Abstufungen auf                      *
+ * Kurzbeschreibung  : Listet alle Accountstufen auf                    *
  * -------------------------------------------------------------------- *
  * $Revision::                                                        $ *
  * $Date::                                                            $ *
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__);
 $show = TRUE;
 
 // Check for '???_id' element
-if ((countRequestPost() > 0) && (!ifPostContainsSelections('grade_id'))) {
+if ((countRequestPost() > 0) && (!isFormSent('add_grade')) && (!ifPostContainsSelections('grade_id'))) {
        // Not found so output message
        displayMessage('{--ADMIN_GRADE_DATA_NO_SELECTIONS--}');
 
@@ -56,24 +56,30 @@ if ((countRequestPost() > 0) && (!ifPostContainsSelections('grade_id'))) {
 } // END - if
 
 // Edit or delete button hit?
-if (isFormSent('edit')) {
+if (isFormSent('add_grade')) {
+       // Add grade
+       doGenericXmlTemplateCallback('admin_add_do_grade_data');
+
+       // Do not show the list of URLs after this template
+       $show = FALSE;
+} elseif (isFormSent('edit')) {
        // Show entries for editing
-       showEntriesByXmlCallback('admin_edit_show_grade_data');
+       doGenericXmlTemplateCallback('admin_edit_show_grade_data');
 
        // Do not show the list of URLs after this template
        $show = FALSE;
 } elseif (isFormSent('do_edit')) {
        // Change data of entries
-       showEntriesByXmlCallback('admin_edit_do_grade_data');
+       doGenericXmlTemplateCallback('admin_edit_do_grade_data');
 } elseif (isFormSent('delete')) {
        // Show entries for deletion
-       showEntriesByXmlCallback('admin_delete_show_grade_data');
+       doGenericXmlTemplateCallback('admin_delete_show_grade_data');
 
        // Do not show the list of URLs after this template
        $show = FALSE;
 } elseif (isFormSent('do_delete')) {
        // Remove entries from database
-       showEntriesByXmlCallback('admin_delete_do_grade_data');
+       doGenericXmlTemplateCallback('admin_delete_do_grade_data');
 }
 
 // Show entries?
@@ -83,7 +89,7 @@ if ($show === FALSE) {
 } // END - if
 
 // List all URLs
-showEntriesByXmlCallback('admin_list_grade_data');
+doGenericXmlTemplateCallback('admin_list_grade_data');
 
 // Add form for adding new entry
 loadTemplate('admin_add_grade_data');