Code Duplication    Length = 4-4 lines in 11 locations

add.php 1 location

@@ 45-48 (lines=4) @@
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();
48
    }
49
 if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
50
    $premium = 0;
51
    } else {

addlisting.php 1 location

@@ 43-46 (lines=4) @@
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();
46
    }
47
 if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
48
    $premium = 0;
49
    } else {

contact.php 2 locations

@@ 53-56 (lines=4) @@
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);
55
        exit();
56
    }
57
    global $xoopsConfig, $xoopsModuleConfig, $xoopsDB, $myts, $meta;
58
    require_once(XOOPS_ROOT_PATH . "/modules/adslight/include/gtickets.php");
59
@@ 185-188 (lines=4) @@
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);
187
        exit();
188
    }
189
190
    require_once(XOOPS_ROOT_PATH . "/modules/adslight/include/gtickets.php");
191
    include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";

index.php 1 location

@@ 35-38 (lines=4) @@
32
33
(isset($_POST['item_id'])) ? $perm_itemid = intval($_POST['item_id']) : $perm_itemid = 0;
34
35
if (!$gperm_handler->checkRight('adslight_view', $perm_itemid, $groups, $module_id)) {
36
    redirect_header(XOOPS_URL.'/index.php', 3, _NOPERM);
37
    exit();
38
    }
39
40
(!$gperm_handler->checkRight('adslight_premium', $perm_itemid, $groups, $module_id)) ? $prem_perm = '0' : $prem_perm = '1';
41

maps.php 1 location

@@ 41-44 (lines=4) @@
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);
43
    exit();
44
}
45
if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
46
    $prem_perm = "0";
47
} else {

modify.php 1 location

@@ 42-45 (lines=4) @@
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);
44
    exit();
45
}
46
47
/**
48
 * @param $lid

replies.php 1 location

@@ 39-42 (lines=4) @@
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);
41
    exit();
42
}
43
include_once XOOPS_ROOT_PATH."/modules/adslight/class/classifiedstree.php";
44
$mytree = new ClassifiedsTree($xoopsDB->prefix("adslight_categories"),"cid","pid");
45
$lid = isset($_GET['lid']) ? intval($_GET['lid']) : 0;

tips_writing_ad.php 1 location

@@ 41-44 (lines=4) @@
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);
43
    exit();
44
}
45
if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
46
    $prem_perm = "0";
47
} else {

viewads.php 1 location

@@ 41-44 (lines=4) @@
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);
43
    exit();
44
}
45
if (!$gperm_handler->checkRight("adslight_premium", $perm_itemid, $groups, $module_id)) {
46
    $prem_perm = '0';
47
} else {

viewcats.php 1 location

@@ 41-44 (lines=4) @@
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);
43
    exit();
44
}
45
if (!$gperm_handler->checkRight('adslight_premium', $perm_itemid, $groups, $module_id)) {
46
    $prem_perm = '0';
47
} else {