X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_point_accounts.php;h=ab31e813f048be28447549325f21e97b70c0d867;hb=4f7df133f736da124e6f7bd02008b9093f736451;hp=8549996049e4b8dabf012c9e0abe0b819e8b384e;hpb=20741b93fd58620af677a7f1039ffd16ea6ec689;p=mailer.git diff --git a/inc/modules/admin/what-list_point_accounts.php b/inc/modules/admin/what-list_point_accounts.php index 8549996049..ab31e813f0 100644 --- a/inc/modules/admin/what-list_point_accounts.php +++ b/inc/modules/admin/what-list_point_accounts.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * 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 * @@ -43,5 +43,59 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); +// By default show the list... +$show = TRUE; + +// Check for 'url_id' element +if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('id'))) { + // Not found so output message + displayMessage('{--ADMIN_POINT_ACCOUNTS_NO_SELECTIONS--}'); + + // Abort here + return; +} // END - if + +// Edit or delete button hit? +if (isFormSent('add')) { + // Add new forced ad + if (doAdminAddPointsAccountByType(postRequestArray(), 'CUSTOM')) { + // Did work + displayMessage('{--ADMIN_POINT_ACCOUNT_ADDED--}'); + } else { + // Doesn't work + displayMessage('{--ADMIN_POINT_ACCOUNT_NOT_ADDED--}'); + } +} elseif (isFormSent('edit')) { + // Show only custom entries for editing + doGenericXmlTemplateCallback('admin_edit_show_point_accounts'); + + // Do not show the list of URLs after this template + $show = FALSE; +} elseif (isFormSent('do_edit')) { + // Change data of only custom entries + doGenericXmlTemplateCallback('admin_edit_do_point_accounts'); +} elseif ((isFormSent('delete')) && (ifPointsAccountTypeMatchesPost('CUSTOM'))) { + // Show only custom entries for deleting + doGenericXmlTemplateCallback('admin_delete_show_point_accounts'); + + // Do not show the list of URLs after this template + $show = FALSE; +} elseif ((isFormSent('do_delete')) && (ifPointsAccountTypeMatchesPost('CUSTOM'))) { + // Remove only custom entries + doGenericXmlTemplateCallback('admin_delete_do_point_accounts'); +} + +// Show entries? +if ($show === FALSE) { + // No, a form has already been show + return FALSE; +} // END - if + +// List all campaigns +doGenericXmlTemplateCallback('admin_list_point_accounts'); + +// Display form for adding a forced-ad +loadTemplate('admin_add_point_accounts'); + // [EOF] ?>