]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_surfbar_urls.php
XML parser introduced, ext-surfbar rewritten, more EL code:
[mailer.git] / inc / modules / admin / what-list_surfbar_urls.php
index ba8a6daa2fdf8ae59646e55cbd4b4671ae99f7c5..fe6a839e8b29e4e7f648be0678c148e671663e7d 100644 (file)
@@ -67,116 +67,31 @@ if (isFormSent('edit')) {
        showEntriesByXmlCallback('admin_edit_do_surfbar_urls');
 } elseif (isFormSent('delete')) {
        // Show entries for deletion
-       showEntriesByXmlCallback('admin_del_show_surfbar_urls');
+       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_del_do_surfbar_urls');
+       showEntriesByXmlCallback('admin_delete_do_surfbar_urls');
 } elseif (isFormSent('lock')) {
        // Un-/lock selected URLs. This does not work for pending URLs
-       adminLockEntriesConfirm(
-               postRequestParameter('url_id'),
-               'surfbar_urls',
-               array(
-                       'url_id',
-                       'url_userid',
-                       'url',
-                       'url_registered',
-                       'url_status'
-               ),
-               array(
-                       'bigintval',
-                       'generateUserProfileLink',
-                       'generateFrametesterUrl',
-                       '',
-                       'translateSurfbarUrlStatus'
-               ),
-               array(
-                       '',
-                       '',
-                       '',
-                       '',
-                       ''
-               ),
-               false,
-               'url_id',
-               'url_userid',
-               'url_userid'
-       );
+       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
-       adminLockEntriesConfirm(
-               postRequestParameter('url_id'),
-               'surfbar_urls',
-               array(),
-               array(),
-               array(),
-               array(
-                       'url_status' => array(
-                               'ACTIVE' => 'LOCKED',
-                               'LOCKED' => 'ACTIVE'
-                       )
-               ),
-               true,
-               'url_id',
-               'url_userid',
-               'url_userid'
-       );
+       showEntriesByXmlCallback('admin_lock_do_surfbar_urls');
 } elseif (isFormSent('undelete')) {
        // Undelete selected URLs. This does only work for deleted URLs... ;-)
-       adminUndeleteEntriesConfirm(
-               postRequestParameter('url_id'),
-               'surfbar_urls',
-               array(
-                       'url_id',
-                       'url_userid',
-                       'url',
-                       'url_registered',
-                       'url_status'
-               ),
-               array(
-                       'bigintval',
-                       'generateUserProfileLink',
-                       'generateFrametesterUrl',
-                       '',
-                       'translateSurfbarUrlStatus'
-               ),
-               array(
-                       '',
-                       '',
-                       '',
-                       '',
-                       ''
-               ),
-               false,
-               'url_id',
-               'url_userid',
-               'url_userid'
-       );
+       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... ;-)
-       adminUndeleteEntriesConfirm(
-               postRequestParameter('url_id'),
-               'surfbar_urls',
-               array(),
-               array(),
-               array(),
-               array(
-                       'url_status' => array(
-                               'DELETED' => 'ACTIVE'
-                       )
-               ),
-               true,
-               'url_id',
-               'url_userid',
-               'url_userid'
-       );
+       showEntriesByXmlCallback('admin_undelete_del_surfbar_urls');
 }
 
 // Show entries?
@@ -187,7 +102,11 @@ if ($show === false) {
 
 // List all URLs
 $result = SQL_QUERY("SELECT
-       `url_id`, `url_userid`, `url`, `url_views_total`, `url_status`,
+       `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`
@@ -201,9 +120,9 @@ if (!SQL_HASZERONUMS($result)) {
        // List all URLs
        $OUT = '';
        while ($content = SQL_FETCHARRAY($result)) {
-               // "Translate"/add content
-               $content['url_registered']  = generateDateTime($content['url_registered'], 2);
-               $content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2);
+               // "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);