Passed
Pull Request — master (#8)
by Michael
11:33
created
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 
12 12
 use Xmf\Module\Admin;
13 13
 
14
-require_once __DIR__ . '/admin_header.php';
14
+require_once __DIR__.'/admin_header.php';
15 15
 xoops_cp_header();
16 16
 $adminObject = Admin::getInstance();
17 17
 $adminObject->displayNavigation(basename(__FILE__));
18 18
 Admin::setPaypal('[email protected]');
19 19
 $adminObject->displayAbout(false);
20 20
 
21
-require_once __DIR__ . '/admin_footer.php';
21
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/blocksadmin.php 2 patches
Indentation   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 use Xmf\Module\Admin;
17 17
 use Xmf\Request;
18 18
 use XoopsModules\Myiframe\{
19
-    Common\Blocksadmin,
20
-    Helper
19
+	Common\Blocksadmin,
20
+	Helper
21 21
 };
22 22
 
23 23
 /** @var Admin $adminObject */
@@ -36,112 +36,112 @@  discard block
 block discarded – undo
36 36
 $xoopsModule = XoopsModule::getByDirname($moduleDirName);
37 37
 
38 38
 if (!is_object($GLOBALS['xoopsUser']) || !is_object($xoopsModule)
39
-    || !$GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) {
40
-    exit(constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403'));
39
+	|| !$GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) {
40
+	exit(constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403'));
41 41
 }
42 42
 if ($GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) {
43
-    require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
44
-
45
-    $op = Request::getCmd('op', 'list');
46
-    if (!empty($_POST)) {
47
-        $ok             = Request::getInt('ok', 0, 'POST');
48
-        $confirm_submit = Request::getCmd('confirm_submit', '', 'POST');
49
-        $submit         = Request::getString('submit', '', 'POST');
50
-        $bside          = Request::getString('bside', '0', 'POST');
51
-        $bweight        = Request::getString('bweight', '0', 'POST');
52
-        $bvisible       = Request::getString('bvisible', '0', 'POST');
53
-        $bmodule        = Request::getArray('bmodule', [], 'POST');
54
-        $btitle         = Request::getString('btitle', '', 'POST');
55
-        $bcachetime     = Request::getString('bcachetime', '0', 'POST');
56
-        $groups         = Request::getArray('groups', [], 'POST');
57
-        $options        = Request::getArray('options', [], 'POST');
58
-        $submitblock    = Request::getString('submitblock', '', 'POST');
59
-        $fct            = Request::getString('fct', '', 'POST');
60
-        $title          = Request::getString('title', '', 'POST');
61
-        $side           = Request::getString('side', '0', 'POST');
62
-        $weight         = Request::getString('weight', '0', 'POST');
63
-        $visible        = Request::getString('visible', '0', 'POST');
64
-    }
65
-
66
-    if ('list' === $op) {
67
-        //        xoops_cp_header();
68
-        $blocksadmin->listBlocks();
69
-        require_once __DIR__ . '/admin_footer.php';
70
-        exit();
71
-    }
72
-
73
-    if (\in_array($op, ['edit', 'edit_ok', 'delete', 'delete_ok', 'clone', 'clone_ok'])) {
74
-        $bid = Request::getInt('bid', 0);
75
-        $ok  = Request::getInt('ok', 0);
76
-
77
-        if ('clone' === $op) {
78
-            $blocksadmin->cloneBlock($bid);
79
-        }
80
-
81
-        if ('delete' === $op) {
82
-            if (1 === $ok) {
83
-                //            if (!$GLOBALS['xoopsSecurity']->check()) {
84
-                //                redirect_header($helper->url('admin/blocksadmin.php'), 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
85
-                //            }
86
-                $blocksadmin->deleteBlock($bid);
87
-            } else {
88
-                //            xoops_cp_header();
89
-                xoops_confirm(['ok' => 1, 'op' => 'delete', 'bid' => $bid], 'blocksadmin.php', constant('CO_' . $moduleDirNameUpper . '_' . 'DELETE_BLOCK_CONFIRM'), constant('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM'), true);
90
-                xoops_cp_footer();
91
-            }
92
-        }
93
-
94
-        if ('edit' === $op) {
95
-            $blocksadmin->editBlock($bid);
96
-        }
97
-
98
-        if ('edit_ok' === $op) {
99
-            $blocksadmin->updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups);
100
-        }
101
-
102
-        if ('clone_ok' === $op) {
103
-            $blocksadmin->isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups);
104
-        }
105
-    }
106
-
107
-    if ('order' === $op) {
108
-        $bid = Request::getArray('bid', []);
109
-
110
-        $title      = Request::getArray('title', [], 'POST');
111
-        $side       = Request::getArray('side', [], 'POST');
112
-        $weight     = Request::getArray('weight', [], 'POST');
113
-        $visible    = Request::getArray('visible', [], 'POST');
114
-        $bcachetime = Request::getArray('bcachetime', [], 'POST');
115
-        $bmodule    = Request::getArray('bmodule', [], 'POST');//mb
116
-
117
-        $oldtitle      = Request::getArray('oldtitle', [], 'POST');
118
-        $oldside       = Request::getArray('oldside', [], 'POST');
119
-        $oldweight     = Request::getArray('oldweight', [], 'POST');
120
-        $oldvisible    = Request::getArray('oldvisible', [], 'POST');
121
-        $oldgroups     = Request::getArray('oldgroups', [], 'POST');
122
-        $oldbcachetime = Request::getArray('oldcachetime', [], 'POST');
123
-        $oldbmodule    = Request::getArray('oldbmodule', [], 'POST');//mb
124
-
125
-        $blocksadmin->orderBlock(
126
-            $bid,
127
-            $oldtitle,
128
-            $oldside,
129
-            $oldweight,
130
-            $oldvisible,
131
-            $oldgroups,
132
-            $oldbcachetime,
133
-            $oldbmodule,
134
-            $title,
135
-            $weight,
136
-            $visible,
137
-            $side,
138
-            $bcachetime,
139
-            $groups,
140
-            $bmodule
141
-        );
142
-    }
43
+	require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
44
+
45
+	$op = Request::getCmd('op', 'list');
46
+	if (!empty($_POST)) {
47
+		$ok             = Request::getInt('ok', 0, 'POST');
48
+		$confirm_submit = Request::getCmd('confirm_submit', '', 'POST');
49
+		$submit         = Request::getString('submit', '', 'POST');
50
+		$bside          = Request::getString('bside', '0', 'POST');
51
+		$bweight        = Request::getString('bweight', '0', 'POST');
52
+		$bvisible       = Request::getString('bvisible', '0', 'POST');
53
+		$bmodule        = Request::getArray('bmodule', [], 'POST');
54
+		$btitle         = Request::getString('btitle', '', 'POST');
55
+		$bcachetime     = Request::getString('bcachetime', '0', 'POST');
56
+		$groups         = Request::getArray('groups', [], 'POST');
57
+		$options        = Request::getArray('options', [], 'POST');
58
+		$submitblock    = Request::getString('submitblock', '', 'POST');
59
+		$fct            = Request::getString('fct', '', 'POST');
60
+		$title          = Request::getString('title', '', 'POST');
61
+		$side           = Request::getString('side', '0', 'POST');
62
+		$weight         = Request::getString('weight', '0', 'POST');
63
+		$visible        = Request::getString('visible', '0', 'POST');
64
+	}
65
+
66
+	if ('list' === $op) {
67
+		//        xoops_cp_header();
68
+		$blocksadmin->listBlocks();
69
+		require_once __DIR__ . '/admin_footer.php';
70
+		exit();
71
+	}
72
+
73
+	if (\in_array($op, ['edit', 'edit_ok', 'delete', 'delete_ok', 'clone', 'clone_ok'])) {
74
+		$bid = Request::getInt('bid', 0);
75
+		$ok  = Request::getInt('ok', 0);
76
+
77
+		if ('clone' === $op) {
78
+			$blocksadmin->cloneBlock($bid);
79
+		}
80
+
81
+		if ('delete' === $op) {
82
+			if (1 === $ok) {
83
+				//            if (!$GLOBALS['xoopsSecurity']->check()) {
84
+				//                redirect_header($helper->url('admin/blocksadmin.php'), 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
85
+				//            }
86
+				$blocksadmin->deleteBlock($bid);
87
+			} else {
88
+				//            xoops_cp_header();
89
+				xoops_confirm(['ok' => 1, 'op' => 'delete', 'bid' => $bid], 'blocksadmin.php', constant('CO_' . $moduleDirNameUpper . '_' . 'DELETE_BLOCK_CONFIRM'), constant('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM'), true);
90
+				xoops_cp_footer();
91
+			}
92
+		}
93
+
94
+		if ('edit' === $op) {
95
+			$blocksadmin->editBlock($bid);
96
+		}
97
+
98
+		if ('edit_ok' === $op) {
99
+			$blocksadmin->updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups);
100
+		}
101
+
102
+		if ('clone_ok' === $op) {
103
+			$blocksadmin->isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups);
104
+		}
105
+	}
106
+
107
+	if ('order' === $op) {
108
+		$bid = Request::getArray('bid', []);
109
+
110
+		$title      = Request::getArray('title', [], 'POST');
111
+		$side       = Request::getArray('side', [], 'POST');
112
+		$weight     = Request::getArray('weight', [], 'POST');
113
+		$visible    = Request::getArray('visible', [], 'POST');
114
+		$bcachetime = Request::getArray('bcachetime', [], 'POST');
115
+		$bmodule    = Request::getArray('bmodule', [], 'POST');//mb
116
+
117
+		$oldtitle      = Request::getArray('oldtitle', [], 'POST');
118
+		$oldside       = Request::getArray('oldside', [], 'POST');
119
+		$oldweight     = Request::getArray('oldweight', [], 'POST');
120
+		$oldvisible    = Request::getArray('oldvisible', [], 'POST');
121
+		$oldgroups     = Request::getArray('oldgroups', [], 'POST');
122
+		$oldbcachetime = Request::getArray('oldcachetime', [], 'POST');
123
+		$oldbmodule    = Request::getArray('oldbmodule', [], 'POST');//mb
124
+
125
+		$blocksadmin->orderBlock(
126
+			$bid,
127
+			$oldtitle,
128
+			$oldside,
129
+			$oldweight,
130
+			$oldvisible,
131
+			$oldgroups,
132
+			$oldbcachetime,
133
+			$oldbmodule,
134
+			$title,
135
+			$weight,
136
+			$visible,
137
+			$side,
138
+			$bcachetime,
139
+			$groups,
140
+			$bmodule
141
+		);
142
+	}
143 143
 } else {
144
-    echo constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403');
144
+	echo constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403');
145 145
 }
146 146
 
147 147
 require __DIR__ . '/admin_footer.php';
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 /** @var Admin $adminObject */
24 24
 /** @var Helper $helper */
25 25
 
26
-require __DIR__ . '/admin_header.php';
26
+require __DIR__.'/admin_header.php';
27 27
 xoops_cp_header();
28 28
 
29 29
 $moduleDirName      = $helper->getDirname();
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
 
38 38
 if (!is_object($GLOBALS['xoopsUser']) || !is_object($xoopsModule)
39 39
     || !$GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) {
40
-    exit(constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403'));
40
+    exit(constant('CO_'.$moduleDirNameUpper.'_'.'ERROR403'));
41 41
 }
42 42
 if ($GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) {
43
-    require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
43
+    require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
44 44
 
45 45
     $op = Request::getCmd('op', 'list');
46 46
     if (!empty($_POST)) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     if ('list' === $op) {
67 67
         //        xoops_cp_header();
68 68
         $blocksadmin->listBlocks();
69
-        require_once __DIR__ . '/admin_footer.php';
69
+        require_once __DIR__.'/admin_footer.php';
70 70
         exit();
71 71
     }
72 72
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 $blocksadmin->deleteBlock($bid);
87 87
             } else {
88 88
                 //            xoops_cp_header();
89
-                xoops_confirm(['ok' => 1, 'op' => 'delete', 'bid' => $bid], 'blocksadmin.php', constant('CO_' . $moduleDirNameUpper . '_' . 'DELETE_BLOCK_CONFIRM'), constant('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM'), true);
89
+                xoops_confirm(['ok' => 1, 'op' => 'delete', 'bid' => $bid], 'blocksadmin.php', constant('CO_'.$moduleDirNameUpper.'_'.'DELETE_BLOCK_CONFIRM'), constant('CO_'.$moduleDirNameUpper.'_'.'CONFIRM'), true);
90 90
                 xoops_cp_footer();
91 91
             }
92 92
         }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $weight     = Request::getArray('weight', [], 'POST');
113 113
         $visible    = Request::getArray('visible', [], 'POST');
114 114
         $bcachetime = Request::getArray('bcachetime', [], 'POST');
115
-        $bmodule    = Request::getArray('bmodule', [], 'POST');//mb
115
+        $bmodule    = Request::getArray('bmodule', [], 'POST'); //mb
116 116
 
117 117
         $oldtitle      = Request::getArray('oldtitle', [], 'POST');
118 118
         $oldside       = Request::getArray('oldside', [], 'POST');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $oldvisible    = Request::getArray('oldvisible', [], 'POST');
121 121
         $oldgroups     = Request::getArray('oldgroups', [], 'POST');
122 122
         $oldbcachetime = Request::getArray('oldcachetime', [], 'POST');
123
-        $oldbmodule    = Request::getArray('oldbmodule', [], 'POST');//mb
123
+        $oldbmodule    = Request::getArray('oldbmodule', [], 'POST'); //mb
124 124
 
125 125
         $blocksadmin->orderBlock(
126 126
             $bid,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         );
142 142
     }
143 143
 } else {
144
-    echo constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403');
144
+    echo constant('CO_'.$moduleDirNameUpper.'_'.'ERROR403');
145 145
 }
146 146
 
147
-require __DIR__ . '/admin_footer.php';
147
+require __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/index.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 use Xmf\Module\Admin;
19 19
 use Xmf\Request;
20 20
 use XoopsModules\Myiframe\{
21
-    Common,
22
-    Common\TestdataButtons,
23
-    Helper,
24
-    Utility
21
+	Common,
22
+	Common\TestdataButtons,
23
+	Helper,
24
+	Utility
25 25
 };
26 26
 
27 27
 require_once __DIR__ . '/admin_header.php';
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
 $adminObject->displayNavigation(basename(__FILE__));
33 33
 //------------- Test Data Buttons ----------------------------
34 34
 if ($helper->getConfig('displaySampleButton')) {
35
-    TestdataButtons::loadButtonConfig($adminObject);
36
-    $adminObject->displayButton('left', '');
35
+	TestdataButtons::loadButtonConfig($adminObject);
36
+	$adminObject->displayButton('left', '');
37 37
 }
38 38
 $op = Request::getString('op', 0, 'GET');
39 39
 switch ($op) {
40
-    case 'hide_buttons':
41
-        TestdataButtons::hideButtons();
42
-        break;
43
-    case 'show_buttons':
44
-        TestdataButtons::showButtons();
45
-        break;
40
+	case 'hide_buttons':
41
+		TestdataButtons::hideButtons();
42
+		break;
43
+	case 'show_buttons':
44
+		TestdataButtons::showButtons();
45
+		break;
46 46
 }
47 47
 //------------- End Test Data Buttons ----------------------------
48 48
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     Utility
25 25
 };
26 26
 
27
-require_once __DIR__ . '/admin_header.php';
27
+require_once __DIR__.'/admin_header.php';
28 28
 // Display Admin header
29 29
 xoops_cp_header();
30 30
 
@@ -50,4 +50,4 @@  discard block
 block discarded – undo
50 50
 echo $utility::getServerStats();
51 51
 
52 52
 //codeDump(__FILE__);
53
-require __DIR__ . '/admin_footer.php';
53
+require __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_header.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
 use Xmf\Module\Admin;
22 22
 use XoopsModules\Myiframe\{
23
-    Helper
23
+	Helper
24 24
 };
25 25
 /** @var Admin $adminObject */
26 26
 /** @var Helper $helper */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
 /** @var Admin $adminObject */
26 26
 /** @var Helper $helper */
27 27
 
28
-require dirname(__DIR__) . '/preloads/autoloader.php';
28
+require dirname(__DIR__).'/preloads/autoloader.php';
29 29
 
30
-require dirname(__DIR__, 3) . '/include/cp_header.php';
30
+require dirname(__DIR__, 3).'/include/cp_header.php';
31 31
 //require dirname(__DIR__, 3) . '/class/xoopsformloader.php';
32
-require  dirname(__DIR__) . '/include/common.php';
32
+require  dirname(__DIR__).'/include/common.php';
33 33
 
34 34
 $moduleDirName = \basename(\dirname(__DIR__));
35 35
 $moduleDirNameUpper = mb_strtoupper($moduleDirName);
Please login to merge, or discard this patch.
admin/manage.php 2 patches
Indentation   +234 added lines, -234 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@  discard block
 block discarded – undo
15 15
 
16 16
 // Verify if the table is up to date
17 17
 if (!myiframe_FieldExists('frame_frameid', $GLOBALS['xoopsDB']->prefix('myiframe'))) {
18
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
19
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
20
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
21
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
22
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
23
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
24
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
25
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
26
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
27
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
28
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
29
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
30
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
31
-    header('Location : ' . XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
18
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
19
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
20
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
21
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
22
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
23
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
24
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
25
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
26
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
27
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
28
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
29
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
30
+	$result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
31
+	header('Location : ' . XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
32 32
 }
33 33
 
34 34
 $module_id = $xoopsModule->getVar('mid');
@@ -53,48 +53,48 @@  discard block
 block discarded – undo
53 53
  */
54 54
 function addEditForm($frameid, $Action, $FormTitle, $longdesc, $width, $height, $align, $frameborder, $marginwidth, $marginheight, $scrolling, $url, $LabelSubmitButton): void
55 55
 {
56
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
57
-    global $xoopsModule;
56
+	require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
57
+	global $xoopsModule;
58 58
 
59
-    $sform = new \XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php');
60
-    $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_DESC, 'longdesc', 50, 255, $longdesc), false);
61
-    $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_WIDTH, 'width', 10, 15, $width), false);
62
-    $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_HEIGHT, 'height', 10, 15, $height), false);
59
+	$sform = new \XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php');
60
+	$sform->addElement(new \XoopsFormText(_AM_MYIFRAME_DESC, 'longdesc', 50, 255, $longdesc), false);
61
+	$sform->addElement(new \XoopsFormText(_AM_MYIFRAME_WIDTH, 'width', 10, 15, $width), false);
62
+	$sform->addElement(new \XoopsFormText(_AM_MYIFRAME_HEIGHT, 'height', 10, 15, $height), false);
63 63
 
64
-    $selalign = new \XoopsFormSelect(_AM_MYIFRAME_ALIGN, 'align', $align);
65
-    $selalign->addOption(1, _AM_MYIFRAME_ALIGN_TOP);
66
-    $selalign->addOption(2, _AM_MYIFRAME_ALIGN_MIDDLE);
67
-    $selalign->addOption(3, _AM_MYIFRAME_ALIGN_BOTTOM);
68
-    $selalign->addOption(4, _AM_MYIFRAME_ALIGN_LEFT);
69
-    $selalign->addOption(5, _AM_MYIFRAME_ALIGN_RIGHT);
70
-    $selalign->setValue($align);
71
-    $sform->addElement($selalign);
64
+	$selalign = new \XoopsFormSelect(_AM_MYIFRAME_ALIGN, 'align', $align);
65
+	$selalign->addOption(1, _AM_MYIFRAME_ALIGN_TOP);
66
+	$selalign->addOption(2, _AM_MYIFRAME_ALIGN_MIDDLE);
67
+	$selalign->addOption(3, _AM_MYIFRAME_ALIGN_BOTTOM);
68
+	$selalign->addOption(4, _AM_MYIFRAME_ALIGN_LEFT);
69
+	$selalign->addOption(5, _AM_MYIFRAME_ALIGN_RIGHT);
70
+	$selalign->setValue($align);
71
+	$sform->addElement($selalign);
72 72
 
73
-    $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_FRAMEBORDER, 'frameborder', 3, 3, $frameborder), false);
74
-    $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_MARGINWIDTH, 'marginwidth', 3, 3, $marginwidth), false);
75
-    $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_MARGINHEIGHT, 'marginheight', 3, 3, $marginheight), false);
73
+	$sform->addElement(new \XoopsFormText(_AM_MYIFRAME_FRAMEBORDER, 'frameborder', 3, 3, $frameborder), false);
74
+	$sform->addElement(new \XoopsFormText(_AM_MYIFRAME_MARGINWIDTH, 'marginwidth', 3, 3, $marginwidth), false);
75
+	$sform->addElement(new \XoopsFormText(_AM_MYIFRAME_MARGINHEIGHT, 'marginheight', 3, 3, $marginheight), false);
76 76
 
77
-    $selscroll = new \XoopsFormSelect(_AM_MYIFRAME_SCROLLING, 'scrolling', $scrolling);
78
-    $selscroll->addOption(1, _YES);
79
-    $selscroll->addOption(2, _NO);
80
-    $selscroll->addOption(3, _AM_MYIFRAME_AUTO);
81
-    $selscroll->setValue($scrolling);
82
-    $sform->addElement($selscroll);
77
+	$selscroll = new \XoopsFormSelect(_AM_MYIFRAME_SCROLLING, 'scrolling', $scrolling);
78
+	$selscroll->addOption(1, _YES);
79
+	$selscroll->addOption(2, _NO);
80
+	$selscroll->addOption(3, _AM_MYIFRAME_AUTO);
81
+	$selscroll->setValue($scrolling);
82
+	$sform->addElement($selscroll);
83 83
 
84
-    $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_URL, 'url', 50, 255, $url), true);
85
-    $sform->addElement(new \XoopsFormHidden('op', $Action), false);
86
-    if (!empty($frameid)) {
87
-        $sform->addElement(new \XoopsFormHidden('frameid', $frameid), false);
88
-    }
84
+	$sform->addElement(new \XoopsFormText(_AM_MYIFRAME_URL, 'url', 50, 255, $url), true);
85
+	$sform->addElement(new \XoopsFormHidden('op', $Action), false);
86
+	if (!empty($frameid)) {
87
+		$sform->addElement(new \XoopsFormHidden('frameid', $frameid), false);
88
+	}
89 89
 
90
-    $buttonTray = new \XoopsFormElementTray('', '');
91
-    $submit_btn = new \XoopsFormButton('', 'submit', $LabelSubmitButton, 'submit');
92
-    $buttonTray->addElement($submit_btn);
93
-    $cancel_btn = new \XoopsFormButton('', 'reset', _AM_MYIFRAME_RESETBUTTON, 'reset');
94
-    $buttonTray->addElement($cancel_btn);
95
-    $sform->addElement($buttonTray);
96
-    $sform->display();
97
-    require_once __DIR__ . '/admin_footer.php';
90
+	$buttonTray = new \XoopsFormElementTray('', '');
91
+	$submit_btn = new \XoopsFormButton('', 'submit', $LabelSubmitButton, 'submit');
92
+	$buttonTray->addElement($submit_btn);
93
+	$cancel_btn = new \XoopsFormButton('', 'reset', _AM_MYIFRAME_RESETBUTTON, 'reset');
94
+	$buttonTray->addElement($cancel_btn);
95
+	$sform->addElement($buttonTray);
96
+	$sform->display();
97
+	require_once __DIR__ . '/admin_footer.php';
98 98
 }
99 99
 
100 100
 // ******************************************************************************************************************************************
@@ -104,191 +104,191 @@  discard block
 block discarded – undo
104 104
 $op = Request::getCmd('op', '');
105 105
 
106 106
 switch ($op) {
107
-    case 'verifybeforeedit':
108
-        if (Request::hasVar('submit', 'POST') && '' !== $_POST['submit']) {
109
-            if ('' === $_POST['longdesc']) {
110
-                xoops_cp_header();
111
-                $adminObject = Admin::getInstance();
112
-                $adminObject->displayNavigation(basename(__FILE__));
113
-                echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
114
-                echo '<tr><td class="odd">';
115
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
116
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX . ' 1';
117
-                echo '</td></tr></table>';
118
-                require_once __DIR__ . '/admin_footer.php';
119
-                xoops_cp_footer();
120
-                exit();
121
-            }
107
+	case 'verifybeforeedit':
108
+		if (Request::hasVar('submit', 'POST') && '' !== $_POST['submit']) {
109
+			if ('' === $_POST['longdesc']) {
110
+				xoops_cp_header();
111
+				$adminObject = Admin::getInstance();
112
+				$adminObject->displayNavigation(basename(__FILE__));
113
+				echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
114
+				echo '<tr><td class="odd">';
115
+				echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
116
+				echo _AM_MYIFRAME_ERROR_ADD_INDEX . ' 1';
117
+				echo '</td></tr></table>';
118
+				require_once __DIR__ . '/admin_footer.php';
119
+				xoops_cp_footer();
120
+				exit();
121
+			}
122 122
 
123
-            $frameid = $_POST['frameid'];
124
-            $frame   = $iframeHandler->get($frameid);
125
-            $frame->unsetNew();
126
-            $frame->setVar('frame_description', $_POST['longdesc']);
127
-            $frame->setVar('frame_width', $_POST['width']);
128
-            $frame->setVar('frame_height', $_POST['height']);
129
-            $frame->setVar('frame_align', $_POST['align']);
130
-            $frame->setVar('frame_frameborder', $_POST['frameborder']);
131
-            $frame->setVar('frame_marginwidth', $_POST['marginwidth']);
132
-            $frame->setVar('frame_marginheight', $_POST['marginheight']);
133
-            $frame->setVar('frame_scrolling', $_POST['scrolling']);
134
-            $frame->setVar('frame_url', $_POST['url']);
135
-            $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
136
-            $res = $iframeHandler->insert($frame);
137
-            if (!$res) {
138
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_MODIFY_DB);
139
-            }
140
-            redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
141
-        }
142
-        break;
143
-    case 'edit':
144
-        xoops_cp_header();
145
-        $adminObject = Admin::getInstance();
146
-        $adminObject->displayNavigation(basename(__FILE__));
147
-        if (Request::hasVar('frameid', 'GET')) {
148
-            $frameid = Request::getInt('frameid', 0, 'GET');
149
-            $frame   = $iframeHandler->get($frameid);
150
-            addEditForm(
151
-                $frameid,
152
-                'verifybeforeedit',
153
-                _AM_MYIFRAME_CONFIG,
154
-                $frame->getVar('frame_description', 'e'),
155
-                $frame->getVar('frame_width', 'e'),
156
-                $frame->getVar('frame_height', 'e'),
157
-                $frame->getVar('frame_align', 'e'),
158
-                $frame->getVar('frame_frameborder', 'e'),
159
-                $frame->getVar('frame_marginwidth', 'e'),
160
-                $frame->getVar('frame_marginheight', 'e'),
161
-                $frame->getVar('frame_scrolling', 'e'),
162
-                $frame->getVar('frame_url', 'e'),
163
-                _AM_MYIFRAME_UPDATE
164
-            );
165
-        } else {
166
-            xoops_cp_header();
167
-            $adminObject = Admin::getInstance();
168
-            $adminObject->displayNavigation(basename(__FILE__));
169
-            echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
170
-            echo '<tr><td class="odd">';
171
-            echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
172
-            echo _AM_MYIFRAME_ERROR_ADD_INDEX. ' 2';
173
-            echo "</td></tr></table>\n";
174
-            require_once __DIR__ . '/admin_footer.php';
175
-            xoops_cp_footer();
176
-            exit();
177
-        }
178
-        break;
179
-    case 'delete':
180
-        if (!isset($_POST['ok'])) {
181
-            xoops_cp_header();
182
-            $adminObject = Admin::getInstance();
183
-            $adminObject->displayNavigation(basename(__FILE__));
184
-            echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
185
-            xoops_confirm(
186
-                [
187
-                    'op'      => 'delete',
188
-                    'frameid' => Request::getInt('frameid', 0, 'GET'),
189
-                    'ok'      => 1,
190
-                ],
191
-                'manage.php',
192
-                _AM_MYIFRAME_RUSUREDEL
193
-            );
194
-            require_once __DIR__ . '/admin_footer.php';
195
-        } else {
196
-            if (empty($_POST['frameid'])) {
197
-                redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX. ' 3');
198
-            }
199
-            $frameid = Request::getInt('frameid', 0, 'POST');
200
-            $critere = new \Criteria('frame_frameid', $frameid, '=');
201
-            $iframeHandler->deleteAll($critere);
202
-            redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
203
-        }
204
-        break;
205
-    case 'verifytoadd':
206
-        if (Request::hasVar('submit', 'POST') && '' !== $_POST['submit']) {
207
-            if ('' === $_POST['url']) {
208
-                xoops_cp_header();
209
-                $adminObject = Admin::getInstance();
210
-                $adminObject->displayNavigation(basename(__FILE__));
211
-                echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
212
-                echo '<tr><td class="odd">';
213
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
214
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX. ' 4';
215
-                echo "</td></tr></table>\n";
216
-                require_once __DIR__ . '/admin_footer.php';
217
-                xoops_cp_footer();
218
-                $adminObject = Admin::getInstance();
219
-                $adminObject->displayNavigation(basename(__FILE__));
220
-                exit();
221
-            }
222
-            $frame = $iframeHandler->create(true);
223
-            $frame->setVar('frame_description', $_POST['longdesc']);
224
-            $frame->setVar('frame_width', $_POST['width']);
225
-            $frame->setVar('frame_height', $_POST['height']);
226
-            $frame->setVar('frame_align', $_POST['align']);
227
-            $frame->setVar('frame_frameborder', $_POST['frameborder']);
228
-            $frame->setVar('frame_marginwidth', $_POST['marginwidth']);
229
-            $frame->setVar('frame_marginheight', $_POST['marginheight']);
230
-            $frame->setVar('frame_scrolling', $_POST['scrolling']);
231
-            $frame->setVar('frame_url', $_POST['url']);
232
-            $frame->setVar('frame_created', time());
233
-            $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
234
-            $res = $iframeHandler->insert($frame);
235
-            if (!$res) {
236
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX. ' 5');
237
-            }
238
-            redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
239
-        }
240
-        break;
241
-    case 'addframe':
242
-        xoops_cp_header();
243
-        $adminObject = Admin::getInstance();
244
-        $adminObject->displayNavigation(basename(__FILE__));
245
-        addEditForm(0, 'verifytoadd', _AM_MYIFRAME_CONFIG, '', '100%', '', '', '0', '0', '0', 1, '', _AM_MYIFRAME_ADDBUTTON);
246
-        break;
247
-    case 'default':
248
-    default:
249
-        xoops_cp_header();
250
-        $adminObject = Admin::getInstance();
251
-        $adminObject->displayNavigation(basename(__FILE__));
252
-        echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br>\n";
253
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
254
-        echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>" . _AM_MYIFRAME_ACTION . "</th></tr>\n";
255
-        $critere = new \Criteria('1', '1', '=');
256
-        $critere->setSort('frame_description');
257
-        $frarray = $iframeHandler->getObjects($critere);
258
-        $class   = 'even';
259
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
260
-        if (count($frarray) > 0) {
261
-            /** @var Myiframe $frame */
262
-            foreach ($frarray as $frame) {
263
-                $action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
264
-                $action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
265
-                if ('' === xoops_trim($frame->getVar('frame_description'))) {
266
-                    $liendesc = $frame->getVar('frame_url');
267
-                } else {
268
-                    $liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
269
-                }
270
-                echo "<tr class='"
271
-                     . $class
272
-                     . "'><td align='center'>"
273
-                     . $frame->getVar('frame_frameid')
274
-                     . "</td><td align='center'>"
275
-                     . $liendesc
276
-                     . "</td><td align='center'>"
277
-                     . formatTimestamp($frame->getVar('frame_created'))
278
-                     . "</td><td align='center'>"
279
-                     . $frame->getVar('frame_hits')
280
-                     . "</td><td align='center'>"
281
-                     . $action_edit
282
-                     . '&nbsp;-&nbsp;'
283
-                     . $action_delete
284
-                     . "</td></tr>\n";
285
-                $class = ('even' === $class) ? 'odd' : 'even';
286
-            }
287
-        }
288
-        echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD . "'></td></tr>";
289
-        echo '</table>';
290
-        require_once __DIR__ . '/admin_footer.php';
291
-        break;
123
+			$frameid = $_POST['frameid'];
124
+			$frame   = $iframeHandler->get($frameid);
125
+			$frame->unsetNew();
126
+			$frame->setVar('frame_description', $_POST['longdesc']);
127
+			$frame->setVar('frame_width', $_POST['width']);
128
+			$frame->setVar('frame_height', $_POST['height']);
129
+			$frame->setVar('frame_align', $_POST['align']);
130
+			$frame->setVar('frame_frameborder', $_POST['frameborder']);
131
+			$frame->setVar('frame_marginwidth', $_POST['marginwidth']);
132
+			$frame->setVar('frame_marginheight', $_POST['marginheight']);
133
+			$frame->setVar('frame_scrolling', $_POST['scrolling']);
134
+			$frame->setVar('frame_url', $_POST['url']);
135
+			$frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
136
+			$res = $iframeHandler->insert($frame);
137
+			if (!$res) {
138
+				redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_MODIFY_DB);
139
+			}
140
+			redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
141
+		}
142
+		break;
143
+	case 'edit':
144
+		xoops_cp_header();
145
+		$adminObject = Admin::getInstance();
146
+		$adminObject->displayNavigation(basename(__FILE__));
147
+		if (Request::hasVar('frameid', 'GET')) {
148
+			$frameid = Request::getInt('frameid', 0, 'GET');
149
+			$frame   = $iframeHandler->get($frameid);
150
+			addEditForm(
151
+				$frameid,
152
+				'verifybeforeedit',
153
+				_AM_MYIFRAME_CONFIG,
154
+				$frame->getVar('frame_description', 'e'),
155
+				$frame->getVar('frame_width', 'e'),
156
+				$frame->getVar('frame_height', 'e'),
157
+				$frame->getVar('frame_align', 'e'),
158
+				$frame->getVar('frame_frameborder', 'e'),
159
+				$frame->getVar('frame_marginwidth', 'e'),
160
+				$frame->getVar('frame_marginheight', 'e'),
161
+				$frame->getVar('frame_scrolling', 'e'),
162
+				$frame->getVar('frame_url', 'e'),
163
+				_AM_MYIFRAME_UPDATE
164
+			);
165
+		} else {
166
+			xoops_cp_header();
167
+			$adminObject = Admin::getInstance();
168
+			$adminObject->displayNavigation(basename(__FILE__));
169
+			echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
170
+			echo '<tr><td class="odd">';
171
+			echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
172
+			echo _AM_MYIFRAME_ERROR_ADD_INDEX. ' 2';
173
+			echo "</td></tr></table>\n";
174
+			require_once __DIR__ . '/admin_footer.php';
175
+			xoops_cp_footer();
176
+			exit();
177
+		}
178
+		break;
179
+	case 'delete':
180
+		if (!isset($_POST['ok'])) {
181
+			xoops_cp_header();
182
+			$adminObject = Admin::getInstance();
183
+			$adminObject->displayNavigation(basename(__FILE__));
184
+			echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
185
+			xoops_confirm(
186
+				[
187
+					'op'      => 'delete',
188
+					'frameid' => Request::getInt('frameid', 0, 'GET'),
189
+					'ok'      => 1,
190
+				],
191
+				'manage.php',
192
+				_AM_MYIFRAME_RUSUREDEL
193
+			);
194
+			require_once __DIR__ . '/admin_footer.php';
195
+		} else {
196
+			if (empty($_POST['frameid'])) {
197
+				redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX. ' 3');
198
+			}
199
+			$frameid = Request::getInt('frameid', 0, 'POST');
200
+			$critere = new \Criteria('frame_frameid', $frameid, '=');
201
+			$iframeHandler->deleteAll($critere);
202
+			redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
203
+		}
204
+		break;
205
+	case 'verifytoadd':
206
+		if (Request::hasVar('submit', 'POST') && '' !== $_POST['submit']) {
207
+			if ('' === $_POST['url']) {
208
+				xoops_cp_header();
209
+				$adminObject = Admin::getInstance();
210
+				$adminObject->displayNavigation(basename(__FILE__));
211
+				echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
212
+				echo '<tr><td class="odd">';
213
+				echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
214
+				echo _AM_MYIFRAME_ERROR_ADD_INDEX. ' 4';
215
+				echo "</td></tr></table>\n";
216
+				require_once __DIR__ . '/admin_footer.php';
217
+				xoops_cp_footer();
218
+				$adminObject = Admin::getInstance();
219
+				$adminObject->displayNavigation(basename(__FILE__));
220
+				exit();
221
+			}
222
+			$frame = $iframeHandler->create(true);
223
+			$frame->setVar('frame_description', $_POST['longdesc']);
224
+			$frame->setVar('frame_width', $_POST['width']);
225
+			$frame->setVar('frame_height', $_POST['height']);
226
+			$frame->setVar('frame_align', $_POST['align']);
227
+			$frame->setVar('frame_frameborder', $_POST['frameborder']);
228
+			$frame->setVar('frame_marginwidth', $_POST['marginwidth']);
229
+			$frame->setVar('frame_marginheight', $_POST['marginheight']);
230
+			$frame->setVar('frame_scrolling', $_POST['scrolling']);
231
+			$frame->setVar('frame_url', $_POST['url']);
232
+			$frame->setVar('frame_created', time());
233
+			$frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
234
+			$res = $iframeHandler->insert($frame);
235
+			if (!$res) {
236
+				redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX. ' 5');
237
+			}
238
+			redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
239
+		}
240
+		break;
241
+	case 'addframe':
242
+		xoops_cp_header();
243
+		$adminObject = Admin::getInstance();
244
+		$adminObject->displayNavigation(basename(__FILE__));
245
+		addEditForm(0, 'verifytoadd', _AM_MYIFRAME_CONFIG, '', '100%', '', '', '0', '0', '0', 1, '', _AM_MYIFRAME_ADDBUTTON);
246
+		break;
247
+	case 'default':
248
+	default:
249
+		xoops_cp_header();
250
+		$adminObject = Admin::getInstance();
251
+		$adminObject->displayNavigation(basename(__FILE__));
252
+		echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br>\n";
253
+		echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
254
+		echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>" . _AM_MYIFRAME_ACTION . "</th></tr>\n";
255
+		$critere = new \Criteria('1', '1', '=');
256
+		$critere->setSort('frame_description');
257
+		$frarray = $iframeHandler->getObjects($critere);
258
+		$class   = 'even';
259
+		$baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
260
+		if (count($frarray) > 0) {
261
+			/** @var Myiframe $frame */
262
+			foreach ($frarray as $frame) {
263
+				$action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
264
+				$action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
265
+				if ('' === xoops_trim($frame->getVar('frame_description'))) {
266
+					$liendesc = $frame->getVar('frame_url');
267
+				} else {
268
+					$liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
269
+				}
270
+				echo "<tr class='"
271
+					 . $class
272
+					 . "'><td align='center'>"
273
+					 . $frame->getVar('frame_frameid')
274
+					 . "</td><td align='center'>"
275
+					 . $liendesc
276
+					 . "</td><td align='center'>"
277
+					 . formatTimestamp($frame->getVar('frame_created'))
278
+					 . "</td><td align='center'>"
279
+					 . $frame->getVar('frame_hits')
280
+					 . "</td><td align='center'>"
281
+					 . $action_edit
282
+					 . '&nbsp;-&nbsp;'
283
+					 . $action_delete
284
+					 . "</td></tr>\n";
285
+				$class = ('even' === $class) ? 'odd' : 'even';
286
+			}
287
+		}
288
+		echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD . "'></td></tr>";
289
+		echo '</table>';
290
+		require_once __DIR__ . '/admin_footer.php';
291
+		break;
292 292
 }
293 293
 
294 294
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -10,25 +10,25 @@  discard block
 block discarded – undo
10 10
 use Xmf\Module\Admin;
11 11
 use Xmf\Request;
12 12
 
13
-require_once __DIR__ . '/admin_header.php';
14
-require_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
13
+require_once __DIR__.'/admin_header.php';
14
+require_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
15 15
 
16 16
 // Verify if the table is up to date
17 17
 if (!myiframe_FieldExists('frame_frameid', $GLOBALS['xoopsDB']->prefix('myiframe'))) {
18
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
19
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
20
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
21
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
22
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
23
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
24
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
25
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
26
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
27
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
28
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
29
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
30
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
31
-    header('Location : ' . XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
18
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
19
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
20
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
21
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
22
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
23
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
24
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
25
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
26
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
27
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
28
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
29
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
30
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
31
+    header('Location : '.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
32 32
 }
33 33
 
34 34
 $module_id = $xoopsModule->getVar('mid');
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
  */
54 54
 function addEditForm($frameid, $Action, $FormTitle, $longdesc, $width, $height, $align, $frameborder, $marginwidth, $marginheight, $scrolling, $url, $LabelSubmitButton): void
55 55
 {
56
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
56
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
57 57
     global $xoopsModule;
58 58
 
59
-    $sform = new \XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php');
59
+    $sform = new \XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/admin/manage.php');
60 60
     $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_DESC, 'longdesc', 50, 255, $longdesc), false);
61 61
     $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_WIDTH, 'width', 10, 15, $width), false);
62 62
     $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_HEIGHT, 'height', 10, 15, $height), false);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     $buttonTray->addElement($cancel_btn);
95 95
     $sform->addElement($buttonTray);
96 96
     $sform->display();
97
-    require_once __DIR__ . '/admin_footer.php';
97
+    require_once __DIR__.'/admin_footer.php';
98 98
 }
99 99
 
100 100
 // ******************************************************************************************************************************************
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
                 $adminObject->displayNavigation(basename(__FILE__));
113 113
                 echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
114 114
                 echo '<tr><td class="odd">';
115
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
116
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX . ' 1';
115
+                echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
116
+                echo _AM_MYIFRAME_ERROR_ADD_INDEX.' 1';
117 117
                 echo '</td></tr></table>';
118
-                require_once __DIR__ . '/admin_footer.php';
118
+                require_once __DIR__.'/admin_footer.php';
119 119
                 xoops_cp_footer();
120 120
                 exit();
121 121
             }
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
             $adminObject->displayNavigation(basename(__FILE__));
169 169
             echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
170 170
             echo '<tr><td class="odd">';
171
-            echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
172
-            echo _AM_MYIFRAME_ERROR_ADD_INDEX. ' 2';
171
+            echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
172
+            echo _AM_MYIFRAME_ERROR_ADD_INDEX.' 2';
173 173
             echo "</td></tr></table>\n";
174
-            require_once __DIR__ . '/admin_footer.php';
174
+            require_once __DIR__.'/admin_footer.php';
175 175
             xoops_cp_footer();
176 176
             exit();
177 177
         }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             xoops_cp_header();
182 182
             $adminObject = Admin::getInstance();
183 183
             $adminObject->displayNavigation(basename(__FILE__));
184
-            echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
184
+            echo '<h4>'._AM_MYIFRAME_CONFIG.'</h4>';
185 185
             xoops_confirm(
186 186
                 [
187 187
                     'op'      => 'delete',
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
                 'manage.php',
192 192
                 _AM_MYIFRAME_RUSUREDEL
193 193
             );
194
-            require_once __DIR__ . '/admin_footer.php';
194
+            require_once __DIR__.'/admin_footer.php';
195 195
         } else {
196 196
             if (empty($_POST['frameid'])) {
197
-                redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX. ' 3');
197
+                redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX.' 3');
198 198
             }
199 199
             $frameid = Request::getInt('frameid', 0, 'POST');
200 200
             $critere = new \Criteria('frame_frameid', $frameid, '=');
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
                 $adminObject->displayNavigation(basename(__FILE__));
211 211
                 echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
212 212
                 echo '<tr><td class="odd">';
213
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
214
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX. ' 4';
213
+                echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
214
+                echo _AM_MYIFRAME_ERROR_ADD_INDEX.' 4';
215 215
                 echo "</td></tr></table>\n";
216
-                require_once __DIR__ . '/admin_footer.php';
216
+                require_once __DIR__.'/admin_footer.php';
217 217
                 xoops_cp_footer();
218 218
                 $adminObject = Admin::getInstance();
219 219
                 $adminObject->displayNavigation(basename(__FILE__));
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
234 234
             $res = $iframeHandler->insert($frame);
235 235
             if (!$res) {
236
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX. ' 5');
236
+                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX.' 5');
237 237
             }
238 238
             redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
239 239
         }
@@ -249,23 +249,23 @@  discard block
 block discarded – undo
249 249
         xoops_cp_header();
250 250
         $adminObject = Admin::getInstance();
251 251
         $adminObject->displayNavigation(basename(__FILE__));
252
-        echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br>\n";
252
+        echo '<h4>'._AM_MYIFRAME_CONFIG."</h4><br>\n";
253 253
         echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
254
-        echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>" . _AM_MYIFRAME_ACTION . "</th></tr>\n";
254
+        echo "<tr><th align='center'>"._AM_MYIFRAME_ID."</th><th align='center'>"._AM_MYIFRAME_DESC."</th><th align='center'>"._AM_MYIFRAME_CREATED."</th><th align='center'>"._AM_MYIFRAME_HITS."</th><th align='center'>"._AM_MYIFRAME_ACTION."</th></tr>\n";
255 255
         $critere = new \Criteria('1', '1', '=');
256 256
         $critere->setSort('frame_description');
257 257
         $frarray = $iframeHandler->getObjects($critere);
258 258
         $class   = 'even';
259
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
259
+        $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/admin/manage.php';
260 260
         if (count($frarray) > 0) {
261 261
             /** @var Myiframe $frame */
262 262
             foreach ($frarray as $frame) {
263
-                $action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
264
-                $action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
263
+                $action_edit   = "<a href='".$baseurl.'?op=edit&frameid='.$frame->getVar('frame_frameid')."'><img src='../assets/images/edit.png' alt='"._AM_MYIFRAME_EDIT."'></a>";
264
+                $action_delete = "<a href='".$baseurl.'?op=delete&frameid='.$frame->getVar('frame_frameid')."'><img src='../assets/images/delete.png' alt='"._AM_MYIFRAME_DELETE."'></a>";
265 265
                 if ('' === xoops_trim($frame->getVar('frame_description'))) {
266 266
                     $liendesc = $frame->getVar('frame_url');
267 267
                 } else {
268
-                    $liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
268
+                    $liendesc = "<a href='".XOOPS_URL.'/modules/myiframe/index.php?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description').'</a>';
269 269
                 }
270 270
                 echo "<tr class='"
271 271
                      . $class
@@ -285,9 +285,9 @@  discard block
 block discarded – undo
285 285
                 $class = ('even' === $class) ? 'odd' : 'even';
286 286
             }
287 287
         }
288
-        echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD . "'></td></tr>";
288
+        echo "<tr class='".$class."'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='"._AM_MYIFRAME_ADD."'></td></tr>";
289 289
         echo '</table>';
290
-        require_once __DIR__ . '/admin_footer.php';
290
+        require_once __DIR__.'/admin_footer.php';
291 291
         break;
292 292
 }
293 293
 
Please login to merge, or discard this patch.
admin/admin_footer.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
 $pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
19 19
 
20 20
 echo "<div class='adminfooter'>\n"
21
-     . "  <div style='text-align: center;'>\n"
22
-     . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
23
-     . "  </div>\n"
24
-     . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
25
-     . '</div>';
21
+	 . "  <div style='text-align: center;'>\n"
22
+	 . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
23
+	 . "  </div>\n"
24
+	 . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
25
+	 . '</div>';
26 26
 
27 27
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      . "  <div style='text-align: center;'>\n"
22 22
      . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
23 23
      . "  </div>\n"
24
-     . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
24
+     . '  '._AM_MODULEADMIN_ADMIN_FOOTER."\n"
25 25
      . '</div>';
26 26
 
27 27
 xoops_cp_footer();
Please login to merge, or discard this patch.
admin/menu.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -21,45 +21,45 @@
 block discarded – undo
21 21
 $pathIcon32    = Admin::menuIconPath('');
22 22
 $pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/';
23 23
 if (is_object($helper->getModule())
24
-    && false !== $helper->getModule()
25
-                        ->getInfo('modicons32')) {
26
-    $pathModIcon32 = $helper->url(
27
-        $helper->getModule()
28
-               ->getInfo('modicons32')
29
-    );
24
+	&& false !== $helper->getModule()
25
+						->getInfo('modicons32')) {
26
+	$pathModIcon32 = $helper->url(
27
+		$helper->getModule()
28
+			   ->getInfo('modicons32')
29
+	);
30 30
 }
31 31
 
32 32
 $adminmenu[] = [
33
-    'title' => _MI_MYIFRAME_NAME,
34
-    'link'  => 'admin/index.php',
35
-    'icon'  => $pathIcon32 . '/home.png',
33
+	'title' => _MI_MYIFRAME_NAME,
34
+	'link'  => 'admin/index.php',
35
+	'icon'  => $pathIcon32 . '/home.png',
36 36
 ];
37 37
 
38 38
 $adminmenu[] = [
39
-    'title' => _MI_MYIFRAME_ADMENU1,
40
-    'link'  => 'admin/manage.php',
41
-    'icon'  => $pathIcon32 . '/manage.png',
39
+	'title' => _MI_MYIFRAME_ADMENU1,
40
+	'link'  => 'admin/manage.php',
41
+	'icon'  => $pathIcon32 . '/manage.png',
42 42
 ];
43 43
 
44 44
 // Blocks Admin
45 45
 $adminmenu[] = [
46
-    'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS'),
47
-    'link'  => 'admin/blocksadmin.php',
48
-    'icon'  => $pathIcon32 . '/block.png',
46
+	'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS'),
47
+	'link'  => 'admin/blocksadmin.php',
48
+	'icon'  => $pathIcon32 . '/block.png',
49 49
 ];
50 50
 
51 51
 if (is_object($helper->getModule()) && $helper->getConfig('displayDeveloperTools')) {
52
-    $adminmenu[] = [
53
-        'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE'),
54
-        'link'  => 'admin/migrate.php',
55
-        'icon'  => $pathIcon32 . '/database_go.png',
56
-    ];
52
+	$adminmenu[] = [
53
+		'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE'),
54
+		'link'  => 'admin/migrate.php',
55
+		'icon'  => $pathIcon32 . '/database_go.png',
56
+	];
57 57
 }
58 58
 
59 59
 // Category
60 60
 $adminmenu[] = [
61
-    'title' => _MI_MYIFRAME_ADMENU2,
62
-    'link'  => 'admin/about.php',
63
-    'icon'  => $pathIcon32 . '/about.png',
61
+	'title' => _MI_MYIFRAME_ADMENU2,
62
+	'link'  => 'admin/about.php',
63
+	'icon'  => $pathIcon32 . '/about.png',
64 64
 
65 65
 ];
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $helper->loadLanguage('feedback');
20 20
 
21 21
 $pathIcon32    = Admin::menuIconPath('');
22
-$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/';
22
+$pathModIcon32 = XOOPS_URL.'/modules/'.$moduleDirName.'/assets/images/icons/32/';
23 23
 if (is_object($helper->getModule())
24 24
     && false !== $helper->getModule()
25 25
                         ->getInfo('modicons32')) {
@@ -32,27 +32,27 @@  discard block
 block discarded – undo
32 32
 $adminmenu[] = [
33 33
     'title' => _MI_MYIFRAME_NAME,
34 34
     'link'  => 'admin/index.php',
35
-    'icon'  => $pathIcon32 . '/home.png',
35
+    'icon'  => $pathIcon32.'/home.png',
36 36
 ];
37 37
 
38 38
 $adminmenu[] = [
39 39
     'title' => _MI_MYIFRAME_ADMENU1,
40 40
     'link'  => 'admin/manage.php',
41
-    'icon'  => $pathIcon32 . '/manage.png',
41
+    'icon'  => $pathIcon32.'/manage.png',
42 42
 ];
43 43
 
44 44
 // Blocks Admin
45 45
 $adminmenu[] = [
46
-    'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS'),
46
+    'title' => constant('CO_'.$moduleDirNameUpper.'_'.'BLOCKS'),
47 47
     'link'  => 'admin/blocksadmin.php',
48
-    'icon'  => $pathIcon32 . '/block.png',
48
+    'icon'  => $pathIcon32.'/block.png',
49 49
 ];
50 50
 
51 51
 if (is_object($helper->getModule()) && $helper->getConfig('displayDeveloperTools')) {
52 52
     $adminmenu[] = [
53
-        'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE'),
53
+        'title' => constant('CO_'.$moduleDirNameUpper.'_'.'ADMENU_MIGRATE'),
54 54
         'link'  => 'admin/migrate.php',
55
-        'icon'  => $pathIcon32 . '/database_go.png',
55
+        'icon'  => $pathIcon32.'/database_go.png',
56 56
     ];
57 57
 }
58 58
 
@@ -60,6 +60,6 @@  discard block
 block discarded – undo
60 60
 $adminmenu[] = [
61 61
     'title' => _MI_MYIFRAME_ADMENU2,
62 62
     'link'  => 'admin/about.php',
63
-    'icon'  => $pathIcon32 . '/about.png',
63
+    'icon'  => $pathIcon32.'/about.png',
64 64
 
65 65
 ];
Please login to merge, or discard this patch.
language/english/common.php 1 patch
Spacing   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -16,138 +16,138 @@  discard block
 block discarded – undo
16 16
 $moduleDirName      = \basename(\dirname(__DIR__, 2));
17 17
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
18 18
 
19
-\define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
20
-\define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: ');
21
-\define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
22
-\define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
23
-\define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status');
24
-\define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
25
-\define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
26
-\define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
27
-\define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
28
-\define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>");
29
-\define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>");
30
-\define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: ');
31
-\define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: ');
32
-\define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
33
-\define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
34
-
35
-\define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>");
36
-\define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
37
-
38
-\define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
39
-\define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields");
40
-\define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
41
-\define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s');
42
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
43
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
44
-\define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
45
-
46
-\define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
19
+\define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: ');
20
+\define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: ');
21
+\define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
22
+\define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
23
+\define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status');
24
+\define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
25
+\define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
26
+\define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
27
+\define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
28
+\define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>");
29
+\define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>");
30
+\define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: ');
31
+\define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: ');
32
+\define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
33
+\define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
34
+
35
+\define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>");
36
+\define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
37
+
38
+\define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
39
+\define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields");
40
+\define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
41
+\define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s');
42
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
43
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
44
+\define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
45
+
46
+\define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
47 47
 
48 48
 // Error Msgs
49
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
50
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s');
51
-\define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin');
49
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
50
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s');
51
+\define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin');
52 52
 
53 53
 //Help
54
-\define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__, 2)));
55
-\define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
56
-\define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of ');
57
-\define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview');
54
+\define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__, 2)));
55
+\define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
56
+\define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of ');
57
+\define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview');
58 58
 
59 59
 //\define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__);
60 60
 
61 61
 //help multi-page
62
-\define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer');
63
-\define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License');
64
-\define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support');
62
+\define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer');
63
+\define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License');
64
+\define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support');
65 65
 
66 66
 //Sample Data
67
-\define('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
68
-\define('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_CONFIRM', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
69
-\define('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_SUCCESS', 'Sample Date imported  successfully');
70
-\define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA', 'Export Tables to YAML');
71
-\define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA_SUCCESS', 'Export Tables to YAML successfully');
72
-\define('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA', 'Clear Sample Data');
73
-\define('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA_OK', 'The Sample Data has been cleared');
74
-\define('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA_CONFIRM', 'Are you sure to Clear Sample Data? (It will delete ALL current data)');
75
-\define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA', 'Export DB Schema to YAML');
76
-\define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
77
-\define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
78
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
79
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
80
-\define('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)');
81
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)');
82
-
83
-\define('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM', 'Confirm');
67
+\define('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
68
+\define('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA_CONFIRM', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
69
+\define('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA_SUCCESS', 'Sample Date imported  successfully');
70
+\define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA', 'Export Tables to YAML');
71
+\define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA_SUCCESS', 'Export Tables to YAML successfully');
72
+\define('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA', 'Clear Sample Data');
73
+\define('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA_OK', 'The Sample Data has been cleared');
74
+\define('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA_CONFIRM', 'Are you sure to Clear Sample Data? (It will delete ALL current data)');
75
+\define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA', 'Export DB Schema to YAML');
76
+\define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
77
+\define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
78
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
79
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
80
+\define('CO_'.$moduleDirNameUpper.'_'.'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)');
81
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)');
82
+
83
+\define('CO_'.$moduleDirNameUpper.'_'.'CONFIRM', 'Confirm');
84 84
 
85 85
 //letter choice
86
-\define('CO_' . $moduleDirNameUpper . '_' . 'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
87
-\define('CO_' . $moduleDirNameUpper . '_' . 'OTHER', 'Other');
88
-\define('CO_' . $moduleDirNameUpper . '_' . 'ALL', 'All');
86
+\define('CO_'.$moduleDirNameUpper.'_'.'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
87
+\define('CO_'.$moduleDirNameUpper.'_'.'OTHER', 'Other');
88
+\define('CO_'.$moduleDirNameUpper.'_'.'ALL', 'All');
89 89
 
90 90
 // block defines
91
-\define('CO_' . $moduleDirNameUpper . '_' . 'ACCESSRIGHTS', 'Access Rights');
92
-\define('CO_' . $moduleDirNameUpper . '_' . 'ACTION', 'Action');
93
-\define('CO_' . $moduleDirNameUpper . '_' . 'ACTIVERIGHTS', 'Active Rights');
94
-\define('CO_' . $moduleDirNameUpper . '_' . 'BADMIN', 'Block Administration');
95
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLKDESC', 'Description');
96
-\define('CO_' . $moduleDirNameUpper . '_' . 'CBCENTER', 'Center Middle');
97
-\define('CO_' . $moduleDirNameUpper . '_' . 'CBLEFT', 'Center Left');
98
-\define('CO_' . $moduleDirNameUpper . '_' . 'CBRIGHT', 'Center Right');
99
-\define('CO_' . $moduleDirNameUpper . '_' . 'SBLEFT', 'Left');
100
-\define('CO_' . $moduleDirNameUpper . '_' . 'SBRIGHT', 'Right');
101
-\define('CO_' . $moduleDirNameUpper . '_' . 'SIDE', 'Alignment');
102
-\define('CO_' . $moduleDirNameUpper . '_' . 'TITLE', 'Title');
103
-\define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE', 'Visible');
104
-\define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN', 'Visible In');
105
-\define('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT', 'Weight');
106
-
107
-\define('CO_' . $moduleDirNameUpper . '_' . 'PERMISSIONS', 'Permissions');
108
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS', 'Blocks Admin');
109
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_DESC', 'Blocks/Group Admin');
110
-
111
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_MANAGMENT', 'Manage');
112
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADDBLOCK', 'Add a new block');
113
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_EDITBLOCK', 'Edit a block');
114
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_CLONEBLOCK', 'Clone a block');
91
+\define('CO_'.$moduleDirNameUpper.'_'.'ACCESSRIGHTS', 'Access Rights');
92
+\define('CO_'.$moduleDirNameUpper.'_'.'ACTION', 'Action');
93
+\define('CO_'.$moduleDirNameUpper.'_'.'ACTIVERIGHTS', 'Active Rights');
94
+\define('CO_'.$moduleDirNameUpper.'_'.'BADMIN', 'Block Administration');
95
+\define('CO_'.$moduleDirNameUpper.'_'.'BLKDESC', 'Description');
96
+\define('CO_'.$moduleDirNameUpper.'_'.'CBCENTER', 'Center Middle');
97
+\define('CO_'.$moduleDirNameUpper.'_'.'CBLEFT', 'Center Left');
98
+\define('CO_'.$moduleDirNameUpper.'_'.'CBRIGHT', 'Center Right');
99
+\define('CO_'.$moduleDirNameUpper.'_'.'SBLEFT', 'Left');
100
+\define('CO_'.$moduleDirNameUpper.'_'.'SBRIGHT', 'Right');
101
+\define('CO_'.$moduleDirNameUpper.'_'.'SIDE', 'Alignment');
102
+\define('CO_'.$moduleDirNameUpper.'_'.'TITLE', 'Title');
103
+\define('CO_'.$moduleDirNameUpper.'_'.'VISIBLE', 'Visible');
104
+\define('CO_'.$moduleDirNameUpper.'_'.'VISIBLEIN', 'Visible In');
105
+\define('CO_'.$moduleDirNameUpper.'_'.'WEIGHT', 'Weight');
106
+
107
+\define('CO_'.$moduleDirNameUpper.'_'.'PERMISSIONS', 'Permissions');
108
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS', 'Blocks Admin');
109
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_DESC', 'Blocks/Group Admin');
110
+
111
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_MANAGMENT', 'Manage');
112
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADDBLOCK', 'Add a new block');
113
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_EDITBLOCK', 'Edit a block');
114
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_CLONEBLOCK', 'Clone a block');
115 115
 
116 116
 //myblocksadmin
117
-\define('CO_' . $moduleDirNameUpper . '_' . 'AGDS', 'Admin Groups');
118
-\define('CO_' . $moduleDirNameUpper . '_' . 'BCACHETIME', 'Cache Time');
119
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADMIN', 'Blocks Admin');
120
-\define('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS', 'Update successful');
117
+\define('CO_'.$moduleDirNameUpper.'_'.'AGDS', 'Admin Groups');
118
+\define('CO_'.$moduleDirNameUpper.'_'.'BCACHETIME', 'Cache Time');
119
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADMIN', 'Blocks Admin');
120
+\define('CO_'.$moduleDirNameUpper.'_'.'UPDATE_SUCCESS', 'Update successful');
121 121
 
122 122
 //Template Admin
123
-\define('CO_' . $moduleDirNameUpper . '_' . 'TPLSETS', 'Template Management');
124
-\define('CO_' . $moduleDirNameUpper . '_' . 'GENERATE', 'Generate');
125
-\define('CO_' . $moduleDirNameUpper . '_' . 'FILENAME', 'File Name');
123
+\define('CO_'.$moduleDirNameUpper.'_'.'TPLSETS', 'Template Management');
124
+\define('CO_'.$moduleDirNameUpper.'_'.'GENERATE', 'Generate');
125
+\define('CO_'.$moduleDirNameUpper.'_'.'FILENAME', 'File Name');
126 126
 
127 127
 //Menu
128
-\define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE', 'Migrate');
129
-\define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_YES', 'Folder "%s" exist');
130
-\define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
131
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
132
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
133
-\define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_FEEDBACK', 'Feedback');
134
-\define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_OK', 'Database migrated to current schema.');
135
-\define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_WARNING', 'Warning! This is intended for developers only. Confirm write schema file from current database.');
136
-\define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_SCHEMA_OK', 'Current schema file written');
128
+\define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_MIGRATE', 'Migrate');
129
+\define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_YES', 'Folder "%s" exist');
130
+\define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
131
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
132
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
133
+\define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_FEEDBACK', 'Feedback');
134
+\define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_OK', 'Database migrated to current schema.');
135
+\define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_WARNING', 'Warning! This is intended for developers only. Confirm write schema file from current database.');
136
+\define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_SCHEMA_OK', 'Current schema file written');
137 137
 
138 138
 //Latest Version Check
139
-\define('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION', 'New Version: ');
139
+\define('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION', 'New Version: ');
140 140
 
141 141
 //DirectoryChecker
142
-\define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
143
-\define('CO_' . $moduleDirNameUpper . '_' . 'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
144
-\define('CO_' . $moduleDirNameUpper . '_' . 'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
145
-\define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEDIR', 'Create it');
146
-\define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
147
-\define('CO_' . $moduleDirNameUpper . '_' . 'DIRCREATED', 'The directory has been created');
148
-\define('CO_' . $moduleDirNameUpper . '_' . 'DIRNOTCREATED', 'The directory cannot be created');
149
-\define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set');
150
-\define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set');
142
+\define('CO_'.$moduleDirNameUpper.'_'.'AVAILABLE', "<span style='color: green;'>Available</span>");
143
+\define('CO_'.$moduleDirNameUpper.'_'.'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
144
+\define('CO_'.$moduleDirNameUpper.'_'.'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
145
+\define('CO_'.$moduleDirNameUpper.'_'.'CREATETHEDIR', 'Create it');
146
+\define('CO_'.$moduleDirNameUpper.'_'.'SETMPERM', 'Set the permission');
147
+\define('CO_'.$moduleDirNameUpper.'_'.'DIRCREATED', 'The directory has been created');
148
+\define('CO_'.$moduleDirNameUpper.'_'.'DIRNOTCREATED', 'The directory cannot be created');
149
+\define('CO_'.$moduleDirNameUpper.'_'.'PERMSET', 'The permission has been set');
150
+\define('CO_'.$moduleDirNameUpper.'_'.'PERMNOTSET', 'The permission cannot be set');
151 151
 
152 152
 //FileChecker
153 153
 //\define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
@@ -157,32 +157,32 @@  discard block
 block discarded – undo
157 157
 //\define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEFILE', 'Create it');
158 158
 //\define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
159 159
 
160
-\define('CO_' . $moduleDirNameUpper . '_' . 'FILECOPIED', 'The file has been copied');
161
-\define('CO_' . $moduleDirNameUpper . '_' . 'FILENOTCOPIED', 'The file cannot be copied');
160
+\define('CO_'.$moduleDirNameUpper.'_'.'FILECOPIED', 'The file has been copied');
161
+\define('CO_'.$moduleDirNameUpper.'_'.'FILENOTCOPIED', 'The file cannot be copied');
162 162
 
163
-\define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
164
-\define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
163
+\define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
164
+\define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
165 165
 
166 166
 //image config
167
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', 'Image Display Width');
168
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC', 'Display width for image');
169
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', 'Image Display Height');
170
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC', 'Display height for image');
171
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
172
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC', '');
173
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', 'Image Upload path');
174
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
175
-
176
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE', 'Image File Size (in Bytes)');
177
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE_DSC', 'The maximum file size of the image file (in Bytes)');
167
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH', 'Image Display Width');
168
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH_DSC', 'Display width for image');
169
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT', 'Image Display Height');
170
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT_DSC', 'Display height for image');
171
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
172
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG_DSC', '');
173
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH', 'Image Upload path');
174
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
175
+
176
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_FILE_SIZE', 'Image File Size (in Bytes)');
177
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_FILE_SIZE_DSC', 'The maximum file size of the image file (in Bytes)');
178 178
 
179 179
 //Module Stats
180
-\define('CO_' . $moduleDirNameUpper . '_' . 'STATS_SUMMARY', 'Module Statistics');
181
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_CATEGORIES', 'Categories:');
182
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_ITEMS', 'Items');
183
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_OFFLINE', 'Offline');
184
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_PUBLISHED', 'Published');
185
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_REJECTED', 'Rejected');
186
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_SUBMITTED', 'Submitted');
187
-
188
-\define('CO_' . $moduleDirNameUpper . '_' . 'ERROR403', 'You are not allowed to view this page!');
180
+\define('CO_'.$moduleDirNameUpper.'_'.'STATS_SUMMARY', 'Module Statistics');
181
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_CATEGORIES', 'Categories:');
182
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_ITEMS', 'Items');
183
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_OFFLINE', 'Offline');
184
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_PUBLISHED', 'Published');
185
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_REJECTED', 'Rejected');
186
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_SUBMITTED', 'Submitted');
187
+
188
+\define('CO_'.$moduleDirNameUpper.'_'.'ERROR403', 'You are not allowed to view this page!');
Please login to merge, or discard this patch.
language/english/modinfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
 //Help
28 28
 define('_MI_MYIFRAME_DIRNAME', basename(dirname(__DIR__, 2)));
29
-define('_MI_MYIFRAME_HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
29
+define('_MI_MYIFRAME_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
30 30
 define('_MI_MYIFRAME_BACK_2_ADMIN', 'Back to Administration of ');
31 31
 define('_MI_MYIFRAME_OVERVIEW', 'Overview');
32 32
 
Please login to merge, or discard this patch.