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

@@ 162-169 (lines=8) @@
159
160
    case 'post':
161
        $msgstop = '';
162
        if (1 == $option['opt_code']) {
163
            xoops_load('XoopsCaptcha');
164
            $xoopsCaptcha = XoopsCaptcha::getInstance();
165
            if (!$xoopsCaptcha->verify()) {
166
                $msgstop .= $xoopsCaptcha->getMessage() . '<br><br>';
167
            }
168
            include XOOPS_ROOT_PATH . '/header.php';
169
        }
170
        if ('' == $_POST['uman']) {
171
            redirect_header('index.php', 2, '');
172
        }