Code Duplication    Length = 7-7 lines in 2 locations

admin/main.php 2 locations

@@ 479-485 (lines=7) @@
476
        xoops_cp_header();
477
        echo '<h4>' . _AM_SECCONF . '</h4>';
478
        $myts = MyTextSanitizer::getInstance();
479
        if (!empty($_POST['artid'])) {
480
            $artid = (int)$_POST['artid'];
481
        } elseif (!empty($_GET['artid'])) {
482
            $artid = (int)$_GET['artid'];
483
        } else {
484
            $artid = 0;
485
        }
486
        $artid = (int)$artid;
487
        include dirname(__DIR__) . '/module_prefix.php';
488
        $result = $xoopsDB->query('SELECT title FROM ' . $xoopsDB->prefix($module_prefix . '_quiz') . " WHERE artid=$artid");
@@ 646-652 (lines=7) @@
643
        xoops_cp_header();
644
        echo '<h4>' . _AM_SECCONF . '</h4>';
645
        $myts = MyTextSanitizer::getInstance();
646
        if (!empty($_POST['res_id'])) {
647
            $res_id = (int)$_POST['res_id'];
648
        } elseif (!empty($_GET['res_id'])) {
649
            $res_id = (int)$_GET['res_id'];
650
        } else {
651
            $res_id = 0;
652
        }
653
        include dirname(__DIR__) . '/module_prefix.php';
654
        $result = $xoopsDB->query('SELECT quiz_id, uid, score, timestamp FROM ' . $xoopsDB->prefix($module_prefix . '_results') . " WHERE id=$res_id");
655
        list($quiz_id, $uid, $score, $timestamp) = $xoopsDB->fetchRow($result);