* $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 *
// 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]
?>