Code Duplication    Length = 7-8 lines in 3 locations

contact.php 2 locations

@@ 59-65 (lines=7) @@
56
        $ts = MyTextSanitizer::getInstance();
57
        xoops_header();
58
59
        if ($option['opt_code'] == 1) {
60
            xoops_load('XoopsCaptcha');
61
            $xoopsCaptcha = XoopsCaptcha::getInstance();
62
            if (!$xoopsCaptcha->verify()) {
63
                redirect_header('index.php', 3, $xoopsCaptcha->getMessage());
64
            }
65
        }
66
        $fullmsg = MD_XFGUESTBOOK_FROMUSER . " $name_user " . MD_XFGUESTBOOK_YOURMSG . ' ' . $xoopsConfig['sitename'] . ' :<br><br>';
67
        $fullmsg .= $title . '<br>';
68
        $fullmsg .= '<hr><br>';
@@ 96-102 (lines=7) @@
93
        $ts = MyTextSanitizer::getInstance();
94
        xoops_header();
95
96
        if ($option['opt_code'] == 1) {
97
            xoops_load('XoopsCaptcha');
98
            $xoopsCaptcha = XoopsCaptcha::getInstance();
99
            if (!$xoopsCaptcha->verify()) {
100
                redirect_header('index.php', 3, $xoopsCaptcha->getMessage());
101
            }
102
        }
103
        $p_title = $title;
104
        $p_title = $ts->htmlSpecialChars($ts->stripSlashesGPC($p_title));
105
        $p_msg   = MD_XFGUESTBOOK_FROMUSER . " $name_user " . MD_XFGUESTBOOK_YOURMSG . ' ' . $xoopsConfig['sitename'] . ' :<br>';

xfcreate.php 1 location

@@ 146-153 (lines=8) @@
143
144
    case 'post':
145
        $msgstop = '';
146
        if (1 == $option['opt_code']) {
147
            xoops_load('XoopsCaptcha');
148
            $xoopsCaptcha = XoopsCaptcha::getInstance();
149
            if (!$xoopsCaptcha->verify()) {
150
                $msgstop .= $xoopsCaptcha->getMessage() . '<br><br>';
151
            }
152
            include XOOPS_ROOT_PATH . '/header.php';
153
        }
154
        if ('' == $_POST['uman']) {
155
            redirect_header('index.php', 2, '');
156
        }