X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_forced_campaigns.php;h=50949df58064c9ee8751777f67ea860d956cbaf5;hp=fd4b45d7e309327a59f1d4147671176ead54fcc1;hb=596c8ab32594401ca84abfbfe35513ddfff31bec;hpb=59db3a67b3cf68aaad36a9a68196c5634066ab6d diff --git a/inc/modules/admin/what-list_forced_campaigns.php b/inc/modules/admin/what-list_forced_campaigns.php index fd4b45d7e3..50949df580 100644 --- a/inc/modules/admin/what-list_forced_campaigns.php +++ b/inc/modules/admin/what-list_forced_campaigns.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 - 2012 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_campaigns_id')) || (!is_array(postRequestElement('forced_campaigns_id'))) || (count(postRequestElement('forced_campaigns_id')) == 0))) { +if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_campaign_id'))) { // Not found so output message displayMessage('{--ADMIN_FORCED_CAMPAIGNS_NO_SELECTIONS--}'); @@ -64,7 +64,7 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_edit_show_forced_campaigns'); // 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_campaigns'); @@ -73,23 +73,46 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_delete_show_forced_campaigns'); // 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_campaigns'); +} elseif (isFormSent('lock')) { + // Un-/lock selected campaigns. This does not work for pending campaigns + showEntriesByXmlCallback('admin_lock_show_forced_campaigns'); + + // Do not show the list of URLs after this template + $show = FALSE; +} elseif (isFormSent('do_lock')) { + // Un-/lock selected campaigns. This does not work for pending campaigns + showEntriesByXmlCallback('admin_lock_do_forced_campaigns'); +} elseif (isFormSent('activate')) { + // List activation of selected campaigns. This does not work for locked campaigns + if (doForcedAdminActivateCampaigns()) { + // Has all worked + displayMessage('{--ADMIN_FORCED_CAMPAIGNS_ACTIVATED_DONE--}'); + } else { + // Something went wrong + displayMessage('{--ADMIN_FORCED_CAMPAIGNS_ACTIVATED_FAILED--}'); + } } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if -// List all URLs +// List all campaigns showEntriesByXmlCallback('admin_list_forced_campaigns'); +// Init array +$content = array( + 'reload' => createTimeSelections(0, 'forced_campaign_reload_lock', 'Dhms') +); + // Display form for adding a forced-ad -loadTemplate('admin_add_forced_campaign'); +loadTemplate('admin_add_forced_campaign', FALSE, $content); // [EOF] ?>