X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_sponsor.php;h=ba14bdff29967cd59c62d9688777359b2dabb2df;hb=dbe2f70fa53fe95dd0847960d2f79ba9d3999a43;hp=5ae058b814a95390103be26ceeef8793e670b164;hpb=29385a0483bbcbbe940a32a49d488b1d5add15c5;p=mailer.git diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index 5ae058b814..ba14bdff29 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__); // Check if admin has submitted form if (isFormSent()) { // Does he have selected at least one sponsor? - if (countSelection(postRequestParameter('id')) > 0) { + if (ifPostContainsSelections('id')) { // At least one entry selected foreach (postRequestParameter('id') as $id => $selected) { // Secure id number and init $content @@ -87,7 +87,7 @@ WHERE ORDER BY sp.pay_name ASC", array($content['id']), __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // Payment does exist while ($content2 = SQL_FETCHARRAY($result)) { // Merge both arrays @@ -196,13 +196,12 @@ WHERE ORDER BY `id`", __FILE__, __LINE__); -if (SQL_NUMROWS($result) > 0) { +if (!SQL_HASZERONUMS($result)) { // Entries found so let's list them! - $OUT = ''; $SW = 2; + $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Transfer data to array $content = array( - 'sw' => $SW, 'id' => $content['id'], 'gender' => $content['gender'], 'surname' => $content['surname'], @@ -214,7 +213,6 @@ if (SQL_NUMROWS($result) > 0) { // Load row template and switch colors $OUT .= loadTemplate('admin_unlock_sponsor_row', true, $content); - $SW = 3 - $SW; } // END - while // Load template