]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_user_subid.php
Mailer project continued (heavy refactoring):
[mailer.git] / inc / modules / admin / what-list_user_subid.php
index 75dba7e9b911740ad9277b5af5dfe2546c9d5e7c..6da574df143aa1b06723be01fcb019a9f1122c63 100644 (file)
@@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 // By default show the list...
-$show = true;
+$show = TRUE;
 
 // Check for 'id' element
 if ((countRequestPost() > 0) && (!ifPostContainsSelections('id')) && (!ifPostContainsSelections('subid'))) {
@@ -58,25 +58,35 @@ if ((countRequestPost() > 0) && (!ifPostContainsSelections('id')) && (!ifPostCon
 // Edit or delete button hit?
 if (isFormSent('edit')) {
        // Show entries for editing
-       showEntriesByXmlCallback('admin_edit_show_user_subid');
+       doGenericXmlTemplateCallback('admin_edit_show_user_subid', array(
+               'userid' => bigintval(getRequestElement('userid'))
+       ));
 
        // 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_user_subid');
+       doGenericXmlTemplateCallback('admin_edit_do_user_subid', array(
+               'userid' => bigintval(getRequestElement('userid'))
+       ));
 } elseif (isFormSent('delete')) {
        // Show entries for deletion
-       showEntriesByXmlCallback('admin_delete_show_user_subid');
+       doGenericXmlTemplateCallback('admin_delete_show_user_subid', array(
+               'userid' => bigintval(getRequestElement('userid'))
+       ));
 
        // 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_user_subid');
+       doGenericXmlTemplateCallback('admin_delete_do_user_subid', array(
+               'userid' => bigintval(getRequestElement('userid'))
+       ));
 } elseif (isFormSent('do_delete_stats')) {
        // Remove entries from database
-       showEntriesByXmlCallback('admin_delete_do_user_subid_stats');
+       doGenericXmlTemplateCallback('admin_delete_do_user_subid_stats', array(
+               'userid' => bigintval(getRequestElement('userid'))
+       ));
 } elseif ((isGetRequestElementSet('do')) && (isGetRequestElementSet('id'))) {
        // Construct module name
        $incFile = sprintf("inc/modules/admin/subid-%s.php", SQL_ESCAPE(getRequestElement('do')));
@@ -90,7 +100,7 @@ if (isFormSent('edit')) {
                loadIncludeOnce($incFile);
 
                // Do not show the list of URLs after this template
-               $show = false;
+               $show = FALSE;
        } else {
                // Display error message
                reportBug(__FILE__, __LINE__, 'Invalid include file ' . basename($incFile) . ' detected.');
@@ -98,15 +108,15 @@ if (isFormSent('edit')) {
 }
 
 // Show entries?
-if ($show === false) {
+if ($show === FALSE) {
        // No, a form has already been show
-       return false;
+       return FALSE;
 } // END - if
 
 // Is a user id sent?
 if (isGetRequestElementSet('userid')) {
        // List all sub ids
-       showEntriesByXmlCallback('admin_list_user_subid', array(
+       doGenericXmlTemplateCallback('admin_list_user_subid', array(
                'userid' => bigintval(getRequestElement('userid'))
        ));
 } else {