Code Duplication    Length = 12-16 lines in 2 locations

admin/index.php 2 locations

@@ 120-131 (lines=12) @@
117
        echo '<br />';
118
        echo "<div style='text-align: center;'>\n";
119
        echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><th align='center'>" . _AM_STORYID . "</th><th align='center'>" . _AM_TITLE . "</th><th align='center'>" . _AM_TOPIC . "</th><th align='center'>" . _AM_POSTER . "</th><th align='center' class='nw'>" . _AM_PROGRAMMED . "</th><th align='center' class='nw'>" . _AM_EXPIRED . "</th><th align='center'>" . _AM_NEWS_ACTION . '</th></tr>';
120
        foreach ($storyarray as $autostory) {
121
            $topic  = $autostory->topic();
122
            $expire = ($autostory->expired() > 0) ? formatTimestamp($autostory->expired(), $dateformat) : '';
123
            $class  = ($class === 'even') ? 'odd' : 'even';
124
            echo "<tr class='" . $class . "'>";
125
            echo "<td align='center'><b>" . $autostory->storyid() . "</b>
126
                </td><td align='left'><a href='" . XOOPS_URL . '/modules/news/article.php?storyid=' . $autostory->storyid() . "'>" . $autostory->title() . "</a>
127
                </td><td align='center'>" . $topic->topic_title() . "
128
                </td><td align='center'><a href='" . XOOPS_URL . '/userinfo.php?uid=' . $autostory->uid() . "'>" . $autostory->uname() . "</a></td><td align='center' class='nw'>" . formatTimestamp($autostory->published(), $dateformat) . "</td><td align='center'>" . $expire . "</td><td align='center'><a href='" . XOOPS_URL . '/modules/news/submit.php?returnside=1&amp;op=edit&amp;storyid=' . $autostory->storyid() . "'><img src='" . $pathIcon16 . "/edit.png' title=" . _AM_EDIT . "> </a> <a href='" . XOOPS_URL . '/modules/news/admin/index.php?op=delete&amp;storyid=' . $autostory->storyid() . "'><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_DELETE . "'></a>";
129
130
            echo "</td></tr>\n";
131
        }
132
        echo '</table></div>';
133
        echo "<div align='right'>" . $pagenav->renderNav() . '</div><br />';
134
        echo '</div><br />';
@@ 225-240 (lines=16) @@
222
        echo '<br />';
223
        echo "<div style='text-align: center;'>";
224
        echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><th align='center'>" . _AM_STORYID . "</th><th align='center'>" . _AM_TITLE . "</th><th align='center'>" . _AM_TOPIC . "</th><th align='center'>" . _AM_POSTER . "</th><th align='center' class='nw'>" . _AM_CREATED . "</th><th align='center' class='nw'>" . _AM_EXPIRED . "</th><th align='center'>" . _AM_NEWS_ACTION . '</th></tr>';
225
        foreach ($storyarray as $eachstory) {
226
            $created = formatTimestamp($eachstory->created(), $dateformat);
227
            $expired = formatTimestamp($eachstory->expired(), $dateformat);
228
            $topic   = $eachstory->topic();
229
            // added exired value field to table
230
            $class = ($class === 'even') ? 'odd' : 'even';
231
            echo "<tr class='" . $class . "'>";
232
            echo "<td align='center'><b>" . $eachstory->storyid() . "</b>
233
                </td><td align='left'><a href='" . XOOPS_URL . '/modules/news/article.php?returnside=1&amp;storyid=' . $eachstory->storyid() . "'>" . $eachstory->title() . "</a>
234
                </td><td align='center'>" . $topic->topic_title() . "
235
                </td><td align='center'><a href='" . XOOPS_URL . '/userinfo.php?uid=' . $eachstory->uid() . "'>" . $eachstory->uname() . "</a></td><td align='center' class='nw'>" . $created . "</td><td align='center' class='nw'>" . $expired . "</td><td align='center'>
236
                <a href='" . XOOPS_URL . '/modules/news/submit.php?returnside=1&amp;op=edit&amp;storyid=' . $eachstory->storyid() . "'> <img src='" . $pathIcon16 . "/edit.png' title=" . _AM_EDIT . "></a>
237
                <a href='" . XOOPS_URL . '/modules/news/admin/index.php?op=delete&amp;storyid=' . $eachstory->storyid() . "'><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_DELETE . "'></a>";
238
239
            echo "</td></tr>\n";
240
        }
241
        echo '</table><br />';
242
        echo "<div align='right'>" . $pagenav->renderNav() . '</div><br />';
243
        echo "<form action='index.php' method='get'>