X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-list_forced_ads.php;h=b91e261f0843ceaaedbc1b8cc54843a9e8e18bb1;hb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;hp=e9330c14373786c7cc4c7ecdc689329d90ecbc54;hpb=0f3a135204757cc8750262871c8e62c42300acb4;p=mailer.git diff --git a/inc/modules/admin/what-list_forced_ads.php b/inc/modules/admin/what-list_forced_ads.php index e9330c1437..b91e261f08 100644 --- a/inc/modules/admin/what-list_forced_ads.php +++ b/inc/modules/admin/what-list_forced_ads.php @@ -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 - 2013 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) && ((!isPostRequestParameterSet('forced_ads_id')) || (!is_array(postRequestParameter('forced_ads_id'))) || (count(postRequestParameter('forced_ads_id')) == 0))) { +if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_ads_id'))) { // Not found so output message displayMessage('{--ADMIN_FORCED_ADS_NO_SELECTIONS--}'); @@ -58,44 +58,38 @@ if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('forced_ads_id')) | // Edit or delete button hit? if (isFormSent('add')) { // Add new forced ad - showEntriesByXmlCallback('admin_add_do_forced_ads'); + doGenericXmlTemplateCallback('admin_add_do_forced_ads'); } elseif (isFormSent('edit')) { // Show entries for editing - showEntriesByXmlCallback('admin_edit_show_forced_ads'); + doGenericXmlTemplateCallback('admin_edit_show_forced_ads'); // 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_ads'); + doGenericXmlTemplateCallback('admin_edit_do_forced_ads'); } elseif (isFormSent('delete')) { // Show entries for deletion - showEntriesByXmlCallback('admin_delete_show_forced_ads'); + doGenericXmlTemplateCallback('admin_delete_show_forced_ads'); // 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_ads'); + doGenericXmlTemplateCallback('admin_delete_do_forced_ads'); } // 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_ads'); - -// Prepare content for template -$content = array( - 'reload_lock' => createTimeSelections(0, 'forced_ads_reload_lock', 'WDhm'), - 'min_stay' => createTImeSelections(0, 'forced_ads_min_stay' , 'ms') -); +doGenericXmlTemplateCallback('admin_list_forced_ads'); // Display form for adding a forced-ad -loadTemplate('admin_add_forced_ad', false, $content); +loadTemplate('admin_add_forced_ad'); // [EOF] ?>