Code Duplication    Length = 7-8 lines in 3 locations

xfcreate.php 1 location

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

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_XFGB_FROMUSER . " $name_user " . _MD_XFGB_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_XFGB_FROMUSER . " $name_user " . _MD_XFGB_YOURMSG . ' ' . $xoopsConfig['sitename'] . ' :<br>';