X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_surfbar_actions.php;h=3633eb9d98a89a855293db4214c723224f99c5b1;hp=4e8a2835ab3bc2c0cf6ea8a8ad1533a3c4ced6cd;hb=61621983cc6d7195fcc7eab29b5f6080ff283b34;hpb=8a73ce89f88fb09523fce05eb2aff80665e65827 diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php index 4e8a2835ab..3633eb9d98 100644 --- a/inc/modules/admin/what-list_surfbar_actions.php +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -1,24 +1,23 @@ 0) { - // List all entries - $OUT = ""; $SW = 2; - while ($content = SQL_FETCHARRAY($result)) { - // "Translate" some data - $content['status'] = constant(sprintf("SURFBAR_URL_STATUS_%s", $content['status'])); - $content['action'] = constant(sprintf("MEMBER_SURFBAR_ACTION_%s_SUBMIT", $content['action'])); +addYouAreHereLink('admin', __FILE__); - // New status set? - if (!is_null($content['new_status'])) { - // Translate it - $content['new_status'] = constant(sprintf("SURFBAR_URL_STATUS_%s", $content['new_status'])); - } else { - // "Do nothing" status - $content['new_status'] = SURFBAR_URL_STATUS_NONE; - } +// By default show the list... +$show = TRUE; - // Add color - $content['sw'] = $SW; +// Edit or delete button hit? +if (isFormSent('edit')) { + // Show entries for editing + doGenericXmlTemplateCallback('admin_edit_show_surfbar_actions'); - // Load row template - $OUT .= LOAD_TEMPLATE("admin_list_surfbar_actions_row", true, $content); - - // Switch color - $SW = 3 - $SW; - } // END - while - - // Load main template - LOAD_TEMPLATE("admin_list_surfbar_actions", false, $OUT); -} else { - // No entries found, very bad! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_ACTIONS')); + // Do not show the list of URLs after this template + $show = FALSE; +} elseif (isFormSent('do_edit')) { + // Change data of entries + doGenericXmlTemplateCallback('admin_edit_do_surfbar_actions'); } -// Free result -SQL_FREERESULT($result); +// Show entries? +if ($show === FALSE) { + // No, a form has already been show + return FALSE; +} // END - if + +// List all URLs +doGenericXmlTemplateCallback('admin_list_surfbar_actions'); -// +// [EOF] ?>