Code Duplication    Length = 5-5 lines in 14 locations

add.php 1 location

@@ 40-44 (lines=5) @@
37
    $groups = XOOPS_GROUP_ANONYMOUS;
38
    }
39
    $gperm_handler =& xoops_gethandler('groupperm');
40
 if (isset($_POST['item_id'])) {
41
    $perm_itemid = intval($_POST['item_id']);
42
    } else {
43
    $perm_itemid = 0;
44
    }
45
   if (!$gperm_handler->checkRight("adslight_submit", $perm_itemid, $groups, $module_id)) {
46
    redirect_header(XOOPS_URL."/index.php", 3, _NOPERM);
47
    exit();

addlisting.php 1 location

@@ 38-42 (lines=5) @@
35
    $groups = XOOPS_GROUP_ANONYMOUS;
36
    }
37
    $gperm_handler =& xoops_gethandler('groupperm');
38
 if (isset($_POST['item_id'])) {
39
    $perm_itemid = intval($_POST['item_id']);
40
    } else {
41
    $perm_itemid = 0;
42
    }
43
   if (!$gperm_handler->checkRight("adslight_submit", $perm_itemid, $groups, $module_id)) {
44
    redirect_header(XOOPS_URL."/index.php", 3, _NOPERM);
45
    exit();

contact.php 2 locations

@@ 47-51 (lines=5) @@
44
45
    $gperm_handler =& xoops_gethandler('groupperm');
46
47
    if (isset($_POST['item_id'])) {
48
        $perm_itemid = intval($_POST['item_id']);
49
    } else {
50
        $perm_itemid = 0;
51
    }
52
//If no access
53
    if (!$gperm_handler->checkRight("adslight_view", $perm_itemid, $groups, $module_id)) {
54
        redirect_header(XOOPS_URL . "/index.php", 3, _NOPERM);
@@ 179-183 (lines=5) @@
176
        $groups = XOOPS_GROUP_ANONYMOUS;
177
    }
178
    $gperm_handler =& xoops_gethandler('groupperm');
179
    if (isset($_POST['item_id'])) {
180
        $perm_itemid = intval($_POST['item_id']);
181
    } else {
182
        $perm_itemid = 0;
183
    }
184
//If no access
185
    if (!$gperm_handler->checkRight("adslight_view", $perm_itemid, $groups, $module_id)) {
186
        redirect_header(XOOPS_URL . "/index.php", 3, _NOPERM);

maps.php 1 location

@@ 35-39 (lines=5) @@
32
    $groups = XOOPS_GROUP_ANONYMOUS;
33
}
34
$gperm_handler =& xoops_gethandler('groupperm');
35
if (isset($_POST['item_id'])) {
36
    $perm_itemid = intval($_POST['item_id']);
37
} else {
38
    $perm_itemid = 0;
39
}
40
//If no access
41
if (!$gperm_handler->checkRight("adslight_view", $perm_itemid, $groups, $module_id)) {
42
    redirect_header(XOOPS_URL."/index.php", 3, _NOPERM);

members.php 1 location

@@ 43-47 (lines=5) @@
40
    $groups = XOOPS_GROUP_ANONYMOUS;
41
}
42
$gperm_handler =& xoops_gethandler('groupperm');
43
if (isset($_POST['item_id'])) {
44
    $perm_itemid = intval($_POST['item_id']);
45
} else {
46
    $perm_itemid = 0;
47
}
48
//If no access
49
if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
50
    $permit = "0";

modify.php 3 locations

@@ 36-40 (lines=5) @@
33
    $groups = XOOPS_GROUP_ANONYMOUS;
34
}
35
$gperm_handler =& xoops_gethandler('groupperm');
36
if (isset($_POST['item_id'])) {
37
    $perm_itemid = intval($_POST['item_id']);
38
} else {
39
    $perm_itemid = 0;
40
}
41
//If no access
42
if (!$gperm_handler->checkRight("adslight_submit", $perm_itemid, $groups, $module_id)) {
43
    redirect_header(XOOPS_URL."/modules/adslight/index.php", 3, _NOPERM);
@@ 263-267 (lines=5) @@
260
        $groups = XOOPS_GROUP_ANONYMOUS;
261
    }
262
    $gperm_handler =& xoops_gethandler('groupperm');
263
    if (isset($_POST['item_id'])) {
264
        $perm_itemid = intval($_POST['item_id']);
265
    } else {
266
        $perm_itemid = 0;
267
    }
268
                //If no access
269
    if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
270
    echo "<tr>
@@ 328-332 (lines=5) @@
325
        $groups = XOOPS_GROUP_ANONYMOUS;
326
    }
327
    $gperm_handler =& xoops_gethandler('groupperm');
328
    if (isset($_POST['item_id'])) {
329
        $perm_itemid = intval($_POST['item_id']);
330
    } else {
331
        $perm_itemid = 0;
332
    }
333
                //If no access
334
    if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
335

replies.php 1 location

@@ 33-37 (lines=5) @@
30
    $groups = XOOPS_GROUP_ANONYMOUS;
31
}
32
$gperm_handler =& xoops_gethandler('groupperm');
33
if (isset($_POST['item_id'])) {
34
    $perm_itemid = intval($_POST['item_id']);
35
} else {
36
    $perm_itemid = 0;
37
}
38
//If no access
39
if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
40
    redirect_header(XOOPS_URL."/modules/adslight/index.php", 3, _NOPERM);

tips_writing_ad.php 1 location

@@ 35-39 (lines=5) @@
32
    $groups = XOOPS_GROUP_ANONYMOUS;
33
}
34
$gperm_handler =& xoops_gethandler('groupperm');
35
if (isset($_POST['item_id'])) {
36
    $perm_itemid = intval($_POST['item_id']);
37
} else {
38
    $perm_itemid = 0;
39
}
40
//If no access
41
if (!$gperm_handler->checkRight("adslight_view", $perm_itemid, $groups, $module_id)) {
42
    redirect_header(XOOPS_URL."/index.php", 3, _NOPERM);

view_photos.php 1 location

@@ 70-74 (lines=5) @@
67
68
$gperm_handler =& xoops_gethandler('groupperm');
69
70
if (isset($_POST['item_id'])) {
71
    $perm_itemid = intval($_POST['item_id']);
72
} else {
73
    $perm_itemid = 0;
74
}
75
76
                //If no access
77
if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {

viewads.php 1 location

@@ 35-39 (lines=5) @@
32
    $groups = XOOPS_GROUP_ANONYMOUS;
33
}
34
$gperm_handler =& xoops_gethandler('groupperm');
35
if (isset($_POST['item_id'])) {
36
    $perm_itemid = intval($_POST['item_id']);
37
} else {
38
    $perm_itemid = 0;
39
}
40
//If no access
41
if (!$gperm_handler->checkRight('adslight_view', $perm_itemid, $groups, $module_id)) {
42
    redirect_header(XOOPS_URL.'/index.php', 3, _NOPERM);

viewcats.php 1 location

@@ 35-39 (lines=5) @@
32
    $groups = XOOPS_GROUP_ANONYMOUS;
33
}
34
$gperm_handler =& xoops_gethandler('groupperm');
35
if (isset($_POST['item_id'])) {
36
    $perm_itemid = intval($_POST['item_id']);
37
} else {
38
    $perm_itemid = 0;
39
}
40
41
if (!$gperm_handler->checkRight('adslight_view', $perm_itemid, $groups, $module_id)) {
42
    redirect_header(XOOPS_URL.'/index.php', 3, _NOPERM);