Passed
Push — master ( 469477...30df53 )
by Michael
03:35 queued 12s
created

hideButtons()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * ****************************************************************************
4
 * marquee - MODULE FOR XOOPS
5
 * Copyright (c) Hervé Thouzard (http://www.herve-thouzard.com)
6
 *
7
 * You may not change or alter any portion of this comment or credits
8
 * of supporting developers from this source code or any supporting source code
9
 * which is considered copyrighted (c) material of the original comment or credit authors.
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 *
14
 * @copyright         Hervé Thouzard (http://www.herve-thouzard.com)
15
 * @license           http://www.fsf.org/copyleft/gpl.html GNU public license
16
 * @package           marquee
17
 * @author            Hervé Thouzard (http://www.herve-thouzard.com)
18
 *
19
 * Version :
20
 * ****************************************************************************
21
 */
22
23
use Xmf\Module\Admin;
24
use Xmf\Request;
25
use Xmf\Yaml;
26
use XoopsModules\Marquee\{Common,
27
    Common\TestdataButtons,
28
    Helper,
29
    Utility
30
};
31
32
/** @var Admin $adminObject */
33
/** @var Helper $helper */
34
/** @var Utility $utility */
35
36
require_once __DIR__ . '/admin_header.php';
37
// Display Admin header
38
xoops_cp_header();
39
$adminObject->displayNavigation(basename(__FILE__));
40
//check for latest release
41
//$newRelease = $utility->checkVerModule($helper);
42
//if (!empty($newRelease)) {
43
//    $adminObject->addItemButton($newRelease[0], $newRelease[1], 'download', 'style="color : Red"');
44
//}
45
46
//------------- Test Data Buttons ----------------------------
47
if ($helper->getConfig('displaySampleButton')) {
48
    TestdataButtons::loadButtonConfig($adminObject);
49
    $adminObject->displayButton('left', '');
50
}
51
$op = Request::getString('op', 0, 'GET');
52
switch ($op) {
53
    case 'hide_buttons':
54
        TestdataButtons::hideButtons();
55
        break;
56
    case 'show_buttons':
57
        TestdataButtons::showButtons();
58
        break;
59
}
60
//------------- End Test Data Buttons ----------------------------
61
62
63
$adminObject->displayIndex();
64
echo $utility::getServerStats();
65
66
//codeDump(__FILE__);
67
require_once __DIR__ . '/admin_footer.php';
68
69