Code Duplication    Length = 12-16 lines in 2 locations

admin/index.php 2 locations

@@ 178-189 (lines=12) @@
175
             . "</th><th align='center'>"
176
             . _AM_NEWS_ACTION
177
             . '</th></tr>';
178
        foreach ($storyarray as $autostory) {
179
            $topic  = $autostory->topic();
180
            $expire = ($autostory->expired() > 0) ? formatTimestamp($autostory->expired(), $dateformat) : '';
181
            $class  = ($class === 'even') ? 'odd' : 'even';
182
            echo "<tr class='" . $class . "'>";
183
            echo "<td align='center'><b>"
184
                 . $autostory->storyid()
185
                 . "</b>
186
                </td><td align='left'><a href='"
187
                 . XOOPS_URL
188
                 . '/modules/news/article.php?storyid='
189
                 . $autostory->storyid()
190
                 . "'>"
191
                 . $autostory->title()
192
                 . "</a>
@@ 391-406 (lines=16) @@
388
             . "</th><th align='center'>"
389
             . _AM_NEWS_ACTION
390
             . '</th></tr>';
391
        foreach ($storyarray as $eachstory) {
392
            $created = formatTimestamp($eachstory->created(), $dateformat);
393
            $expired = formatTimestamp($eachstory->expired(), $dateformat);
394
            $topic   = $eachstory->topic();
395
            // added exired value field to table
396
            $class = ($class === 'even') ? 'odd' : 'even';
397
            echo "<tr class='" . $class . "'>";
398
            echo "<td align='center'><b>"
399
                 . $eachstory->storyid()
400
                 . "</b>
401
                </td><td align='left'><a href='"
402
                 . XOOPS_URL
403
                 . '/modules/news/article.php?returnside=1&amp;storyid='
404
                 . $eachstory->storyid()
405
                 . "'>"
406
                 . $eachstory->title()
407
                 . "</a>
408
                </td><td align='center'>"
409
                 . $topic->topic_title()