Code Duplication    Length = 6-6 lines in 2 locations

catalog/includes/modules/content/footer/cm_footer_banner.php 1 location

@@ 136-141 (lines=6) @@
133
134
      $Qgroups = $OSCOM_Db->query('select distinct banners_group from :table_banners order by banners_group');
135
136
      while ($Qgroups->fetch()) {
137
        $groups[] = [
138
          'id' => $Qgroups->value('banners_group'),
139
          'text' => $Qgroups->value('banners_group')
140
        ];
141
      }
142
143
      return HTML::selectField($name, $groups, $value);
144
    }

catalog/admin/banner_manager.php 1 location

@@ 289-294 (lines=6) @@
286
287
      $Qgroups = $OSCOM_Db->get('banners', 'distinct banners_group', null, 'banners_group');
288
289
      while ($Qgroups->fetch()) {
290
        $groups_array[] = [
291
          'id' => $Qgroups->value('banners_group'),
292
          'text' => $Qgroups->value('banners_group')
293
        ];
294
      }
295
?>
296
297
<?= HTML::form('new_banner', OSCOM::link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&action=' . $form_action), 'post', 'enctype="multipart/form-data"') . (($form_action == 'update') ? HTML::hiddenField('banners_id', $bID) : ''); ?>