]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_surfbar_urls.php
Also these SQLs require support for NULL
[mailer.git] / inc / modules / admin / what-list_surfbar_urls.php
index 49d6eb6914e3b2c59ed3f5ff3727b4525c4a4de4..e8bed5d2294295f85ce25c9fd46aa436526321b5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 08/31/2008 *
- * ================                             Last change: 08/31/2008 *
+ * Mailer v0.2.1-FINAL                                Start: 08/31/2008 *
+ * ===================                          Last change: 08/31/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-list_surfbar_urls.php                       *
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Alle URLs in Surfbar auflisten und syncen        *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder          *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 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 *
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
-       require($INC);
-}
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+       die();
+} // END - if
 
 // Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+addYouAreHereLink('admin', __FILE__);
+
+// By default show the list...
+$show = true;
+
+// Check for 'url_id' element
+if ((countRequestPost() > 0) && ((!isPostRequestElementSet('url_id')) || (!is_array(postRequestElement('url_id'))) || (count(postRequestElement('url_id')) == 0))) {
+       // Not found so output message
+       displayMessage('{--ADMIN_SURFBAR_NO_SELECTIONS--}');
+
+       // Abort here
+       return;
+} // END - if
+
+// Edit or delete button hit?
+if (isFormSent('edit')) {
+       // Show entries for editing
+       showEntriesByXmlCallback('admin_edit_show_surfbar_urls');
+
+       // Do not show the list of URLs after this template
+       $show = false;
+} elseif (isFormSent('do_edit')) {
+       // Change data of entries
+       showEntriesByXmlCallback('admin_edit_do_surfbar_urls');
+} elseif (isFormSent('delete')) {
+       // Show entries for deletion
+       showEntriesByXmlCallback('admin_delete_show_surfbar_urls');
+
+       // Do not show the list of URLs after this template
+       $show = false;
+} elseif (isFormSent('do_delete')) {
+       // Remove entries from database
+       showEntriesByXmlCallback('admin_delete_do_surfbar_urls');
+} elseif (isFormSent('lock')) {
+       // Un-/lock selected URLs. This does not work for pending URLs
+       showEntriesByXmlCallback('admin_lock_show_surfbar_urls');
+
+       // Do not show the list of URLs after this template
+       $show = false;
+} elseif (isFormSent('do_lock')) {
+       // Un-/lock selected URLs. This does not work for pending URLs
+       showEntriesByXmlCallback('admin_lock_do_surfbar_urls');
+} elseif (isFormSent('undelete')) {
+       // Undelete selected URLs. This does only work for deleted URLs... ;-)
+       showEntriesByXmlCallback('admin_undelete_show_surfbar_urls');
+
+       // Do not show the list of URLs after this template
+       $show = false;
+} elseif (isFormSent('do_undelete')) {
+       // Undelete selected URLs. This does only work for deleted URLs... ;-)
+       showEntriesByXmlCallback('admin_undelete_do_surfbar_urls');
+}
+
+// Show entries?
+if ($show === false) {
+       // No, a form has already been show
+       return false;
+} // END - if
 
-// First list all booked URLs (no bonus!)
+// List all URLs
+showEntriesByXmlCallback('admin_list_surfbar_urls');
 
-//
+// [EOF]
 ?>