X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_mails.php;h=8afbb9aef92509d1ba40428cfd38ca77187bcfd8;hp=b8b0e4c51a7ff1cfbb4b2486442e548bc4eca8d0;hb=18e32f1a8971b18bace4f051094acf27800bd7d9;hpb=03f62d0b89aa9276ac37f4d616d940fae184d850 diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index b8b0e4c51a..8afbb9aef9 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -1,7 +1,7 @@ 0) { + if (countPostSelection() > 0) { // Add option for events - $GLOBALS['cache_array']['admins'] = generateOptionList('admins', 'id', 'login', '', 'email'); - $SW = 2; $rowNameS = ''; - foreach (REQUEST_POST('sel') as $template => $sel) { + $adminsList = generateOptionList('admins', 'id', 'login', '', 'email'); + $SW = 2; $rows = ''; + foreach (postRequestParameter('sel') as $template => $sel) { // First of all load data from DB - $result = SQL_QUERY_ESC("SELECT admin_id, id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY `id`", - array($template), __FILE__, __LINE__); - $OUT = ''; $aid2 = 0; + $result = SQL_QUERY_ESC("SELECT `admin_id`, `id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC", + array($template), __FILE__, __LINE__); + $OUT = ''; + $adminId2 = '0'; $id = '0'; while ($content = SQL_FETCHARRAY($result)) { // @TODO Can this be rewritten??? $OUT .= "