]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_surfbar_urls.php
Mailer project continued:
[mailer.git] / inc / modules / admin / what-list_surfbar_urls.php
index aed7a27ba68fc47687ab0e7e98ac5423ad3c8b85..d06b8285a749e9757b66759fae1e06b1cf607ce1 100644 (file)
@@ -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 *
@@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__);
 $show = true;
 
 // Check for 'url_id' element
-if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('url_id')) || (!is_array(postRequestParameter('url_id'))) || (count(postRequestParameter('url_id')) == 0))) {
+if ((countRequestPost() > 0) && (!ifPostContainsSelections('url_id'))) {
        // Not found so output message
        displayMessage('{--ADMIN_SURFBAR_NO_SELECTIONS--}');
 
@@ -101,42 +101,7 @@ if ($show === false) {
 } // END - if
 
 // List all URLs
-$result = SQL_QUERY("SELECT
-       `url_id`,
-       `url_userid`,
-       `url`,
-       `url_views_total`,
-       `url_status`,
-       UNIX_TIMESTAMP(`url_registered`) AS `url_registered`,
-       UNIX_TIMESTAMP(`url_last_locked`) AS `url_last_locked`,
-       `url_lock_reason`
-FROM
-       `{?_MYSQL_PREFIX?}_surfbar_urls`
-ORDER BY
-       `url_id` ASC", __FILE__, __LINE__);
-
-// Do we have some URLs left?
-if (!SQL_HASZERONUMS($result)) {
-       // List all URLs
-       $OUT = '';
-       while ($content = SQL_FETCHARRAY($result)) {
-               // "Translate" content
-               $content['url_registered']  = generateDateTime($content['url_registered'], '2');
-               $content['url_last_locked'] = generateDateTime($content['url_last_locked'], '2');
-
-               // Load row template
-               $OUT .= loadTemplate('admin_list_surfbar_urls_row', true, $content);
-       } // END - while
-
-       // Load main template
-       loadTemplate('admin_list_surfbar_urls', false, $OUT);
-} else {
-       // No URLs in surfbar
-       displayMessage('{--ADMIN_SURFBAR_NO_URLS_FOUND--}');
-}
-
-// Free result
-SQL_FREERESULT($result);
+showEntriesByXmlCallback('admin_list_surfbar_urls');
 
 // [EOF]
 ?>