X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_surfbar_actions.php;h=33cfca450945cffbc85700d41f93df943613f2c0;hp=ff95f1c49410c664abee80bcf0313f5fedb2b390;hb=0f3a135204757cc8750262871c8e62c42300acb4;hpb=9197694ce183b69384a385a6c4a5e16988c7fb09 diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php index ff95f1c494..33cfca4509 100644 --- a/inc/modules/admin/what-list_surfbar_actions.php +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -43,39 +43,29 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -// Load all actions -$result = SQL_QUERY("SELECT - `actions_id`, - `actions_status`, - `actions_action`, - `actions_new_status` -FROM - `{?_MYSQL_PREFIX?}_surfbar_actions` -ORDER BY - `actions_status` ASC, - `actions_action` ASC", __FILE__, __LINE__); +// By default show the list... +$show = true; -// Entries found? -if (!SQL_HASZERONUMS($result)) { - // List all entries - $OUT = ''; - while ($content = SQL_FETCHARRAY($result)) { - // "Translate" some data - $content['actions_action'] = '{--MEMBER_SURFBAR_ACTION_' . strtoupper($content['actions_action']) . '_SUBMIT--}', ; +// Edit or delete button hit? +if (isFormSent('edit')) { + // Show entries for editing + showEntriesByXmlCallback('admin_edit_show_surfbar_actions'); - // Load row template - $OUT .= loadTemplate('admin_list_surfbar_actions_row', true, $content); - } // END - while - - // Load main template - loadTemplate('admin_list_surfbar_actions', false, $OUT); -} else { - // No entries found, very bad! - displayMessage('{--ADMIN_SURFBAR_NO_ACTIONS--}'); + // 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_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 +showEntriesByXmlCallback('admin_list_surfbar_actions'); // [EOF] ?>