@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | // $moduleDirName = \basename(\dirname(__DIR__, 2)); |
49 | 49 | // $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
50 | 50 | |
51 | - $config = require \dirname(__DIR__, 2) . '/config/config.php'; |
|
51 | + $config = require \dirname(__DIR__, 2).'/config/config.php'; |
|
52 | 52 | |
53 | 53 | $this->name = $config->name; |
54 | 54 | $this->paths = $config->paths; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->moduleStats = $config->moduleStats; |
64 | 64 | $this->modCopyright = $config->modCopyright; |
65 | 65 | |
66 | - $this->icons = require \dirname(__DIR__, 2) . '/config/icons.php'; |
|
67 | - $this->paths = require \dirname(__DIR__, 2) . '/config/paths.php'; |
|
66 | + $this->icons = require \dirname(__DIR__, 2).'/config/icons.php'; |
|
67 | + $this->paths = require \dirname(__DIR__, 2).'/config/paths.php'; |
|
68 | 68 | } |
69 | 69 | } |
@@ -16,6 +16,6 @@ |
||
16 | 16 | */ |
17 | 17 | $pathIcon32 = Xmf\Module\Admin::iconUrl('', '32'); |
18 | 18 | |
19 | -echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>'; |
|
19 | +echo "<div class='adminfooter'>\n"." <div style='text-align: center;'>\n"." <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"." </div>\n".' '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>'; |
|
20 | 20 | |
21 | 21 | xoops_cp_footer(); |
@@ -23,11 +23,11 @@ |
||
23 | 23 | use Xmf\Module\Admin; |
24 | 24 | |
25 | 25 | /** @var Admin $adminObject */ |
26 | -require_once __DIR__ . '/admin_header.php'; |
|
26 | +require_once __DIR__.'/admin_header.php'; |
|
27 | 27 | xoops_cp_header(); |
28 | 28 | |
29 | 29 | $adminObject->displayNavigation(basename(__FILE__)); |
30 | 30 | $adminObject::setPaypal('[email protected]'); |
31 | 31 | $adminObject->displayAbout(false); |
32 | 32 | |
33 | -require_once __DIR__ . '/admin_footer.php'; |
|
33 | +require_once __DIR__.'/admin_footer.php'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** @var Admin $adminObject */ |
26 | 26 | |
27 | 27 | // Call header |
28 | -require_once __DIR__ . '/admin_header.php'; |
|
28 | +require_once __DIR__.'/admin_header.php'; |
|
29 | 29 | // Display Admin header |
30 | 30 | xoops_cp_header(); |
31 | 31 | // Define default value |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | case 'prune': |
47 | 47 | $timestamp = Request::getInt('prune_date', ''); |
48 | 48 | $onlyreply = Request::getInt('onlyreply', 0); |
49 | - $timestamp = strtotime((string)$timestamp); |
|
49 | + $timestamp = strtotime((string) $timestamp); |
|
50 | 50 | $count = $contactHandler->contactPruneCount($timestamp, $onlyreply); |
51 | 51 | $contactHandler->contactDeleteBeforeDate($timestamp, $onlyreply); |
52 | 52 | redirect_header('tools.php', 1, sprintf(_AM_CONTACT_MSG_PRUNE_DELETED, $count)); |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | |
58 | 58 | $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation(basename(__FILE__))); |
59 | 59 | // Call template file |
60 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_tools.tpl'); |
|
60 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_tools.tpl'); |
|
61 | 61 | // Call footer |
62 | -require_once __DIR__ . '/admin_footer.php'; |
|
62 | +require_once __DIR__.'/admin_footer.php'; |
@@ -89,30 +89,30 @@ discard block |
||
89 | 89 | echo $GLOBALS['xoopsSecurity']->getTokenHTML(); |
90 | 90 | echo "<table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
91 | 91 | <tr valign='middle'><th align='center'>" |
92 | - . _AM_SYSTEM_BLOCKS_TITLE |
|
93 | - . "</th><th align='center' nowrap='nowrap'>" |
|
94 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'SIDE') |
|
95 | - . '<br>' |
|
96 | - . _LEFT |
|
97 | - . '-' |
|
98 | - . _CENTER |
|
99 | - . '-' |
|
100 | - . _RIGHT |
|
101 | - . "</th><th align='center'>" |
|
102 | - . constant( |
|
103 | - 'CO_' . $moduleDirNameUpper . '_' . 'WEIGHT' |
|
104 | - ) |
|
105 | - . "</th><th align='center'>" |
|
106 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE') |
|
107 | - . "</th><th align='center'>" |
|
108 | - . _AM_SYSTEM_BLOCKS_VISIBLEIN |
|
109 | - . "</th><th align='center'>" |
|
110 | - . _AM_SYSTEM_ADGS |
|
111 | - . "</th><th align='center'>" |
|
112 | - . _AM_SYSTEM_BLOCKS_BCACHETIME |
|
113 | - . "</th><th align='center'>" |
|
114 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'ACTION') |
|
115 | - . '</th></tr> |
|
92 | + . _AM_SYSTEM_BLOCKS_TITLE |
|
93 | + . "</th><th align='center' nowrap='nowrap'>" |
|
94 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'SIDE') |
|
95 | + . '<br>' |
|
96 | + . _LEFT |
|
97 | + . '-' |
|
98 | + . _CENTER |
|
99 | + . '-' |
|
100 | + . _RIGHT |
|
101 | + . "</th><th align='center'>" |
|
102 | + . constant( |
|
103 | + 'CO_' . $moduleDirNameUpper . '_' . 'WEIGHT' |
|
104 | + ) |
|
105 | + . "</th><th align='center'>" |
|
106 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE') |
|
107 | + . "</th><th align='center'>" |
|
108 | + . _AM_SYSTEM_BLOCKS_VISIBLEIN |
|
109 | + . "</th><th align='center'>" |
|
110 | + . _AM_SYSTEM_ADGS |
|
111 | + . "</th><th align='center'>" |
|
112 | + . _AM_SYSTEM_BLOCKS_BCACHETIME |
|
113 | + . "</th><th align='center'>" |
|
114 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'ACTION') |
|
115 | + . '</th></tr> |
|
116 | 116 | '; |
117 | 117 | $blockArray = \XoopsBlock::getByModule($xoopsModule->mid()); |
118 | 118 | $blockCount = count($blockArray); |
@@ -178,69 +178,69 @@ discard block |
||
178 | 178 | } |
179 | 179 | $name = $i->getVar('name'); |
180 | 180 | echo "<tr valign='top'><td class='$class' align='center'><input type='text' name='title[" |
181 | - . $i->getVar('bid') |
|
182 | - . "]' value='" |
|
183 | - . $title |
|
184 | - . "'></td><td class='$class' align='center' nowrap='nowrap'> |
|
181 | + . $i->getVar('bid') |
|
182 | + . "]' value='" |
|
183 | + . $title |
|
184 | + . "'></td><td class='$class' align='center' nowrap='nowrap'> |
|
185 | 185 | <div align='center' > |
186 | 186 | <input type='radio' name='side[" |
187 | - . $i->getVar('bid') |
|
188 | - . "]' value='" |
|
189 | - . XOOPS_CENTERBLOCK_LEFT |
|
190 | - . "'$ssel2> |
|
187 | + . $i->getVar('bid') |
|
188 | + . "]' value='" |
|
189 | + . XOOPS_CENTERBLOCK_LEFT |
|
190 | + . "'$ssel2> |
|
191 | 191 | <input type='radio' name='side[" |
192 | - . $i->getVar('bid') |
|
193 | - . "]' value='" |
|
194 | - . XOOPS_CENTERBLOCK_CENTER |
|
195 | - . "'$ssel3> |
|
192 | + . $i->getVar('bid') |
|
193 | + . "]' value='" |
|
194 | + . XOOPS_CENTERBLOCK_CENTER |
|
195 | + . "'$ssel3> |
|
196 | 196 | <input type='radio' name='side[" |
197 | - . $i->getVar('bid') |
|
198 | - . "]' value='" |
|
199 | - . XOOPS_CENTERBLOCK_RIGHT |
|
200 | - . "'$ssel4> |
|
197 | + . $i->getVar('bid') |
|
198 | + . "]' value='" |
|
199 | + . XOOPS_CENTERBLOCK_RIGHT |
|
200 | + . "'$ssel4> |
|
201 | 201 | </div> |
202 | 202 | <div> |
203 | 203 | <span style='float:right;'><input type='radio' name='side[" |
204 | - . $i->getVar('bid') |
|
205 | - . "]' value='" |
|
206 | - . XOOPS_SIDEBLOCK_RIGHT |
|
207 | - . "'$ssel1></span> |
|
204 | + . $i->getVar('bid') |
|
205 | + . "]' value='" |
|
206 | + . XOOPS_SIDEBLOCK_RIGHT |
|
207 | + . "'$ssel1></span> |
|
208 | 208 | <div align='left'><input type='radio' name='side[" |
209 | - . $i->getVar('bid') |
|
210 | - . "]' value='" |
|
211 | - . XOOPS_SIDEBLOCK_LEFT |
|
212 | - . "'$ssel0></div> |
|
209 | + . $i->getVar('bid') |
|
210 | + . "]' value='" |
|
211 | + . XOOPS_SIDEBLOCK_LEFT |
|
212 | + . "'$ssel0></div> |
|
213 | 213 | </div> |
214 | 214 | <div align='center'> |
215 | 215 | <input type='radio' name='side[" |
216 | - . $i->getVar('bid') |
|
217 | - . "]' value='" |
|
218 | - . XOOPS_CENTERBLOCK_BOTTOMLEFT |
|
219 | - . "'$ssel5> |
|
216 | + . $i->getVar('bid') |
|
217 | + . "]' value='" |
|
218 | + . XOOPS_CENTERBLOCK_BOTTOMLEFT |
|
219 | + . "'$ssel5> |
|
220 | 220 | <input type='radio' name='side[" |
221 | - . $i->getVar('bid') |
|
222 | - . "]' value='" |
|
223 | - . XOOPS_CENTERBLOCK_BOTTOM |
|
224 | - . "'$ssel7> |
|
221 | + . $i->getVar('bid') |
|
222 | + . "]' value='" |
|
223 | + . XOOPS_CENTERBLOCK_BOTTOM |
|
224 | + . "'$ssel7> |
|
225 | 225 | <input type='radio' name='side[" |
226 | - . $i->getVar('bid') |
|
227 | - . "]' value='" |
|
228 | - . XOOPS_CENTERBLOCK_BOTTOMRIGHT |
|
229 | - . "'$ssel6> |
|
226 | + . $i->getVar('bid') |
|
227 | + . "]' value='" |
|
228 | + . XOOPS_CENTERBLOCK_BOTTOMRIGHT |
|
229 | + . "'$ssel6> |
|
230 | 230 | </div> |
231 | 231 | </td><td class='$class' align='center'><input type='text' name='weight[" |
232 | - . $i->getVar('bid') |
|
233 | - . "]' value='" |
|
234 | - . $i->getVar('weight') |
|
235 | - . "' size='5' maxlength='5'></td><td class='$class' align='center' nowrap><input type='radio' name='visible[" |
|
236 | - . $i->getVar('bid') |
|
237 | - . "]' value='1'$sel1>" |
|
238 | - . _YES |
|
239 | - . " <input type='radio' name='visible[" |
|
240 | - . $i->getVar('bid') |
|
241 | - . "]' value='0'$sel0>" |
|
242 | - . _NO |
|
243 | - . '</td>'; |
|
232 | + . $i->getVar('bid') |
|
233 | + . "]' value='" |
|
234 | + . $i->getVar('weight') |
|
235 | + . "' size='5' maxlength='5'></td><td class='$class' align='center' nowrap><input type='radio' name='visible[" |
|
236 | + . $i->getVar('bid') |
|
237 | + . "]' value='1'$sel1>" |
|
238 | + . _YES |
|
239 | + . " <input type='radio' name='visible[" |
|
240 | + . $i->getVar('bid') |
|
241 | + . "]' value='0'$sel0>" |
|
242 | + . _NO |
|
243 | + . '</td>'; |
|
244 | 244 | |
245 | 245 | echo "<td class='$class' align='center'><select size='5' name='bmodule[" . $i->getVar('bid') . "][]' id='bmodule[" . $i->getVar('bid') . "][]' multiple='multiple'>"; |
246 | 246 | foreach ($moduleList as $k => $v) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | /** @var Admin $adminObject */ |
23 | 23 | /** @var Helper $helper */ |
24 | -require_once __DIR__ . '/admin_header.php'; |
|
24 | +require_once __DIR__.'/admin_header.php'; |
|
25 | 25 | |
26 | 26 | $moduleDirName = \basename(\dirname(__DIR__)); |
27 | 27 | $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | |
32 | 32 | if (!is_object($GLOBALS['xoopsUser']) || !is_object($xoopsModule) |
33 | 33 | || !$GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) { |
34 | - exit(constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403')); |
|
34 | + exit(constant('CO_'.$moduleDirNameUpper.'_'.'ERROR403')); |
|
35 | 35 | } |
36 | 36 | if ($GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) { |
37 | - require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
37 | + require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
38 | 38 | $op = 'list'; |
39 | 39 | if (isset($_POST)) { |
40 | 40 | foreach ($_POST as $k => $v) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | function listBlocks(): void |
59 | 59 | { |
60 | 60 | global $xoopsModule, $pathIcon16; |
61 | - require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
61 | + require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
62 | 62 | $moduleDirName = \basename(\dirname(__DIR__)); |
63 | 63 | $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
64 | 64 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
@@ -84,14 +84,14 @@ discard block |
||
84 | 84 | $moduleList[0] = _AM_SYSTEM_BLOCKS_ALLPAGES; |
85 | 85 | ksort($moduleList); |
86 | 86 | echo " |
87 | - <h4 style='text-align:left;'>" . constant('CO_' . $moduleDirNameUpper . '_' . 'BADMIN') . '</h4>'; |
|
88 | - echo "<form action='" . $_SERVER['SCRIPT_NAME'] . "' name='blockadmin' method='post'>"; |
|
87 | + <h4 style='text-align:left;'>" . constant('CO_'.$moduleDirNameUpper.'_'.'BADMIN').'</h4>'; |
|
88 | + echo "<form action='".$_SERVER['SCRIPT_NAME']."' name='blockadmin' method='post'>"; |
|
89 | 89 | echo $GLOBALS['xoopsSecurity']->getTokenHTML(); |
90 | 90 | echo "<table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
91 | 91 | <tr valign='middle'><th align='center'>" |
92 | 92 | . _AM_SYSTEM_BLOCKS_TITLE |
93 | 93 | . "</th><th align='center' nowrap='nowrap'>" |
94 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'SIDE') |
|
94 | + . constant('CO_'.$moduleDirNameUpper.'_'.'SIDE') |
|
95 | 95 | . '<br>' |
96 | 96 | . _LEFT |
97 | 97 | . '-' |
@@ -100,10 +100,10 @@ discard block |
||
100 | 100 | . _RIGHT |
101 | 101 | . "</th><th align='center'>" |
102 | 102 | . constant( |
103 | - 'CO_' . $moduleDirNameUpper . '_' . 'WEIGHT' |
|
103 | + 'CO_'.$moduleDirNameUpper.'_'.'WEIGHT' |
|
104 | 104 | ) |
105 | 105 | . "</th><th align='center'>" |
106 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE') |
|
106 | + . constant('CO_'.$moduleDirNameUpper.'_'.'VISIBLE') |
|
107 | 107 | . "</th><th align='center'>" |
108 | 108 | . _AM_SYSTEM_BLOCKS_VISIBLEIN |
109 | 109 | . "</th><th align='center'>" |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | . "</th><th align='center'>" |
112 | 112 | . _AM_SYSTEM_BLOCKS_BCACHETIME |
113 | 113 | . "</th><th align='center'>" |
114 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'ACTION') |
|
114 | + . constant('CO_'.$moduleDirNameUpper.'_'.'ACTION') |
|
115 | 115 | . '</th></tr> |
116 | 116 | '; |
117 | 117 | $blockArray = \XoopsBlock::getByModule($xoopsModule->mid()); |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | ]; |
133 | 133 | foreach ($blockArray as $i) { |
134 | 134 | $groupsPerms = $grouppermHandler->getGroupIds('block_read', $i->getVar('bid')); |
135 | - $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . $i->getVar('bid'); |
|
135 | + $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.$i->getVar('bid'); |
|
136 | 136 | $result = $db->query($sql); |
137 | 137 | $modules = []; |
138 | 138 | while (false !== ($row = $db->fetchArray($result))) { |
139 | - $modules[] = (int)$row['module_id']; |
|
139 | + $modules[] = (int) $row['module_id']; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $cachetimeOptions = ''; |
@@ -242,47 +242,47 @@ discard block |
||
242 | 242 | . _NO |
243 | 243 | . '</td>'; |
244 | 244 | |
245 | - echo "<td class='$class' align='center'><select size='5' name='bmodule[" . $i->getVar('bid') . "][]' id='bmodule[" . $i->getVar('bid') . "][]' multiple='multiple'>"; |
|
245 | + echo "<td class='$class' align='center'><select size='5' name='bmodule[".$i->getVar('bid')."][]' id='bmodule[".$i->getVar('bid')."][]' multiple='multiple'>"; |
|
246 | 246 | foreach ($moduleList as $k => $v) { |
247 | - echo "<option value='$k'" . (in_array($k, $modules, true) ? 'selected' : '') . ">$v</option>"; |
|
247 | + echo "<option value='$k'".(in_array($k, $modules, true) ? 'selected' : '').">$v</option>"; |
|
248 | 248 | } |
249 | 249 | echo '</select></td>'; |
250 | 250 | |
251 | - echo "<td class='$class' align='center'><select size='5' name='groups[" . $i->getVar('bid') . "][]' id='groups[" . $i->getVar('bid') . "][]' multiple='multiple'>"; |
|
251 | + echo "<td class='$class' align='center'><select size='5' name='groups[".$i->getVar('bid')."][]' id='groups[".$i->getVar('bid')."][]' multiple='multiple'>"; |
|
252 | 252 | foreach ($groups as $grp) { |
253 | - echo "<option value='" . $grp->getVar('groupid') . "' " . (in_array($grp->getVar('groupid'), $groupsPerms, true) ? 'selected' : '') . '>' . $grp->getVar('name') . '</option>'; |
|
253 | + echo "<option value='".$grp->getVar('groupid')."' ".(in_array($grp->getVar('groupid'), $groupsPerms, true) ? 'selected' : '').'>'.$grp->getVar('name').'</option>'; |
|
254 | 254 | } |
255 | 255 | echo '</select></td>'; |
256 | 256 | |
257 | 257 | // Cache lifetime |
258 | - echo '<td class="' . $class . '" align="center"> <select name="bcachetime[' . $i->getVar('bid') . ']" size="1">' . $cachetimeOptions . '</select> |
|
258 | + echo '<td class="'.$class.'" align="center"> <select name="bcachetime['.$i->getVar('bid').']" size="1">'.$cachetimeOptions.'</select> |
|
259 | 259 | </td>'; |
260 | 260 | |
261 | 261 | // Actions |
262 | 262 | |
263 | 263 | echo "<td class='$class' align='center'> |
264 | - <a href='blocksadmin.php?op=edit&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/edit.png' . " alt='" . _EDIT . "' title='" . _EDIT . "'></a> |
|
265 | - <a href='blocksadmin.php?op=clone&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/editcopy.png' . " alt='" . _CLONE . "' title='" . _CLONE . "'></a>"; |
|
264 | + <a href='blocksadmin.php?op=edit&bid=".$i->getVar('bid')."'><img src=".$pathIcon16.'/edit.png'." alt='"._EDIT."' title='"._EDIT."'></a> |
|
265 | + <a href='blocksadmin.php?op=clone&bid=" . $i->getVar('bid')."'><img src=".$pathIcon16.'/editcopy.png'." alt='"._CLONE."' title='"._CLONE."'></a>"; |
|
266 | 266 | if (!\in_array($i->getVar('block_type'), ['S', 'M'], true)) { |
267 | - echo " <a href='" . XOOPS_URL . '/modules/system/admin.php?fct=blocksadmin&op=delete&bid=' . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/delete.png' . " alt='" . _DELETE . "' title='" . _DELETE . "'> |
|
267 | + echo " <a href='".XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=delete&bid='.$i->getVar('bid')."'><img src=".$pathIcon16.'/delete.png'." alt='"._DELETE."' title='"._DELETE."'> |
|
268 | 268 | </a>"; |
269 | 269 | } |
270 | 270 | echo " |
271 | - <input type='hidden' name='oldtitle[" . $i->getVar('bid') . "]' value='" . $i->getVar('title') . "'> |
|
272 | - <input type='hidden' name='oldside[" . $i->getVar('bid') . "]' value='" . $i->getVar('side') . "'> |
|
273 | - <input type='hidden' name='oldweight[" . $i->getVar('bid') . "]' value='" . $i->getVar('weight') . "'> |
|
274 | - <input type='hidden' name='oldvisible[" . $i->getVar('bid') . "]' value='" . $i->getVar('visible') . "'> |
|
275 | - <input type='hidden' name='oldgroups[" . $i->getVar('groups') . "]' value='" . $i->getVar('groups') . "'> |
|
276 | - <input type='hidden' name='oldbcachetime[" . $i->getVar('bid') . "]' value='" . $i->getVar('bcachetime') . "'> |
|
277 | - <input type='hidden' name='bid[" . $i->getVar('bid') . "]' value='" . $i->getVar('bid') . "'> |
|
271 | + <input type='hidden' name='oldtitle[" . $i->getVar('bid')."]' value='".$i->getVar('title')."'> |
|
272 | + <input type='hidden' name='oldside[" . $i->getVar('bid')."]' value='".$i->getVar('side')."'> |
|
273 | + <input type='hidden' name='oldweight[" . $i->getVar('bid')."]' value='".$i->getVar('weight')."'> |
|
274 | + <input type='hidden' name='oldvisible[" . $i->getVar('bid')."]' value='".$i->getVar('visible')."'> |
|
275 | + <input type='hidden' name='oldgroups[" . $i->getVar('groups')."]' value='".$i->getVar('groups')."'> |
|
276 | + <input type='hidden' name='oldbcachetime[" . $i->getVar('bid')."]' value='".$i->getVar('bcachetime')."'> |
|
277 | + <input type='hidden' name='bid[" . $i->getVar('bid')."]' value='".$i->getVar('bid')."'> |
|
278 | 278 | </td></tr> |
279 | 279 | "; |
280 | 280 | $class = ('even' === $class) ? 'odd' : 'even'; |
281 | 281 | } |
282 | 282 | echo "<tr><td class='foot' align='center' colspan='8'> |
283 | 283 | <input type='hidden' name='op' value='order'> |
284 | - " . $GLOBALS['xoopsSecurity']->getTokenHTML() . " |
|
285 | - <input type='submit' name='submit' value='" . _SUBMIT . "'> |
|
284 | + " . $GLOBALS['xoopsSecurity']->getTokenHTML()." |
|
285 | + <input type='submit' name='submit' value='" . _SUBMIT."'> |
|
286 | 286 | </td></tr></table> |
287 | 287 | </form> |
288 | 288 | <br><br>"; |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | */ |
294 | 294 | function cloneBlock($bid): void |
295 | 295 | { |
296 | - require_once __DIR__ . '/admin_header.php'; |
|
296 | + require_once __DIR__.'/admin_header.php'; |
|
297 | 297 | |
298 | 298 | xoops_cp_header(); |
299 | 299 | |
@@ -307,16 +307,16 @@ discard block |
||
307 | 307 | |
308 | 308 | $myblock = new \XoopsBlock($bid); |
309 | 309 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
310 | - $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . (int)$bid; |
|
310 | + $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.(int) $bid; |
|
311 | 311 | $result = $db->query($sql); |
312 | 312 | $modules = []; |
313 | 313 | while (false !== ($row = $db->fetchArray($result))) { |
314 | - $modules[] = (int)$row['module_id']; |
|
314 | + $modules[] = (int) $row['module_id']; |
|
315 | 315 | } |
316 | 316 | $isCustom = (\in_array($myblock->getVar('block_type'), ['C', 'E'], true)); |
317 | 317 | $block = [ |
318 | - 'title' => $myblock->getVar('title') . ' Clone', |
|
319 | - 'form_title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_CLONEBLOCK'), |
|
318 | + 'title' => $myblock->getVar('title').' Clone', |
|
319 | + 'form_title' => constant('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_CLONEBLOCK'), |
|
320 | 320 | 'name' => $myblock->getVar('name'), |
321 | 321 | 'side' => $myblock->getVar('side'), |
322 | 322 | 'weight' => $myblock->getVar('weight'), |
@@ -332,12 +332,12 @@ discard block |
||
332 | 332 | 'template' => $myblock->getVar('template'), |
333 | 333 | 'options' => $myblock->getVar('options'), |
334 | 334 | ]; |
335 | - echo '<a href="blocksadmin.php">' . constant('CO_' . $moduleDirNameUpper . '_' . 'BADMIN') . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_SYSTEM_BLOCKS_CLONEBLOCK . '<br><br>'; |
|
336 | - require_once __DIR__ . '/blockform.php'; |
|
335 | + echo '<a href="blocksadmin.php">'.constant('CO_'.$moduleDirNameUpper.'_'.'BADMIN').'</a> <span style="font-weight:bold;">»»</span> '._AM_SYSTEM_BLOCKS_CLONEBLOCK.'<br><br>'; |
|
336 | + require_once __DIR__.'/blockform.php'; |
|
337 | 337 | /** @var XoopsThemeForm $form */ |
338 | 338 | $form->display(); |
339 | 339 | // xoops_cp_footer(); |
340 | - require_once __DIR__ . '/admin_footer.php'; |
|
340 | + require_once __DIR__.'/admin_footer.php'; |
|
341 | 341 | exit(); |
342 | 342 | } |
343 | 343 | |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | if ('' !== $clone->getVar('template')) { |
391 | 391 | /** @var \XoopsTplfileHandler $tplfileHandler */ |
392 | 392 | $tplfileHandler = xoops_getHandler('tplfile'); |
393 | - $btemplate = $tplfileHandler->find($GLOBALS['xoopsConfig']['template_set'], 'block', (string)$bid); |
|
393 | + $btemplate = $tplfileHandler->find($GLOBALS['xoopsConfig']['template_set'], 'block', (string) $bid); |
|
394 | 394 | if (count($btemplate) > 0) { |
395 | 395 | $tplclone = $btemplate[0]->xoopsClone(); |
396 | 396 | $tplclone->setVar('tpl_id', 0); |
@@ -400,13 +400,13 @@ discard block |
||
400 | 400 | } |
401 | 401 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
402 | 402 | foreach ($bmodule as $bmid) { |
403 | - $sql = 'INSERT INTO ' . $db->prefix('block_module_link') . ' (block_id, module_id) VALUES (' . $newid . ', ' . $bmid . ')'; |
|
403 | + $sql = 'INSERT INTO '.$db->prefix('block_module_link').' (block_id, module_id) VALUES ('.$newid.', '.$bmid.')'; |
|
404 | 404 | $db->query($sql); |
405 | 405 | } |
406 | 406 | $groups = &$GLOBALS['xoopsUser']->getGroups(); |
407 | 407 | $count = count($groups); |
408 | 408 | for ($i = 0; $i < $count; ++$i) { |
409 | - $sql = 'INSERT INTO ' . $db->prefix('group_permission') . ' (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (' . $groups[$i] . ', ' . $newid . ", 1, 'block_read')"; |
|
409 | + $sql = 'INSERT INTO '.$db->prefix('group_permission').' (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES ('.$groups[$i].', '.$newid.", 1, 'block_read')"; |
|
410 | 410 | $db->query($sql); |
411 | 411 | } |
412 | 412 | redirect_header('blocksadmin.php?op=listar', 1, _AM_SYSTEM_BLOCKS_DBUPDATED); |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | */ |
442 | 442 | function editBlock($bid): void |
443 | 443 | { |
444 | - require_once __DIR__ . '/admin_header.php'; |
|
444 | + require_once __DIR__.'/admin_header.php'; |
|
445 | 445 | xoops_cp_header(); |
446 | 446 | $adminObject = Admin::getInstance(); |
447 | 447 | $adminObject->displayNavigation(basename(__FILE__)); |
@@ -453,16 +453,16 @@ discard block |
||
453 | 453 | // mpu_adm_menu(); |
454 | 454 | $myblock = new \XoopsBlock($bid); |
455 | 455 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
456 | - $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . (int)$bid; |
|
456 | + $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.(int) $bid; |
|
457 | 457 | $result = $db->query($sql); |
458 | 458 | $modules = []; |
459 | 459 | while (false !== ($row = $db->fetchArray($result))) { |
460 | - $modules[] = (int)$row['module_id']; |
|
460 | + $modules[] = (int) $row['module_id']; |
|
461 | 461 | } |
462 | 462 | $isCustom = (\in_array($myblock->getVar('block_type'), ['C', 'E'], true)); |
463 | 463 | $block = [ |
464 | 464 | 'title' => $myblock->getVar('title'), |
465 | - 'form_title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_EDITBLOCK'), |
|
465 | + 'form_title' => constant('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_EDITBLOCK'), |
|
466 | 466 | // 'name' => $myblock->getVar('name'), |
467 | 467 | 'side' => $myblock->getVar('side'), |
468 | 468 | 'weight' => $myblock->getVar('weight'), |
@@ -478,12 +478,12 @@ discard block |
||
478 | 478 | 'template' => $myblock->getVar('template'), |
479 | 479 | 'options' => $myblock->getVar('options'), |
480 | 480 | ]; |
481 | - echo '<a href="blocksadmin.php">' . constant('CO_' . $moduleDirNameUpper . '_' . 'BADMIN') . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_SYSTEM_BLOCKS_EDITBLOCK . '<br><br>'; |
|
482 | - require_once __DIR__ . '/blockform.php'; |
|
481 | + echo '<a href="blocksadmin.php">'.constant('CO_'.$moduleDirNameUpper.'_'.'BADMIN').'</a> <span style="font-weight:bold;">»»</span> '._AM_SYSTEM_BLOCKS_EDITBLOCK.'<br><br>'; |
|
482 | + require_once __DIR__.'/blockform.php'; |
|
483 | 483 | /** @var XoopsThemeForm $form */ |
484 | 484 | $form->display(); |
485 | 485 | // xoops_cp_footer(); |
486 | - require_once __DIR__ . '/admin_footer.php'; |
|
486 | + require_once __DIR__.'/admin_footer.php'; |
|
487 | 487 | exit(); |
488 | 488 | } |
489 | 489 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | $xoopsDB->query($sql); |
538 | 538 | } else { |
539 | 539 | foreach ($bmodule as $bmid) { |
540 | - $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid, (int)$bmid); |
|
540 | + $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid, (int) $bmid); |
|
541 | 541 | $xoopsDB->query($sql); |
542 | 542 | } |
543 | 543 | } |
@@ -550,14 +550,14 @@ discard block |
||
550 | 550 | $xoopsDB->query($sql); |
551 | 551 | } |
552 | 552 | } |
553 | - redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS')); |
|
553 | + redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_'.$moduleDirNameUpper.'_'.'UPDATE_SUCCESS')); |
|
554 | 554 | } |
555 | 555 | |
556 | 556 | if ('list' === $op) { |
557 | 557 | xoops_cp_header(); |
558 | 558 | // mpu_adm_menu(); |
559 | 559 | listBlocks(); |
560 | - require_once __DIR__ . '/admin_footer.php'; |
|
560 | + require_once __DIR__.'/admin_footer.php'; |
|
561 | 561 | exit(); |
562 | 562 | } |
563 | 563 | |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | $xoopsDB->query($sql); |
580 | 580 | } else { |
581 | 581 | foreach ($bmodule[$i] as $bmid) { |
582 | - $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid[$i], (int)$bmid); |
|
582 | + $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid[$i], (int) $bmid); |
|
583 | 583 | $xoopsDB->query($sql); |
584 | 584 | } |
585 | 585 | } |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | } |
594 | 594 | } |
595 | 595 | } |
596 | - redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS')); |
|
596 | + redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_'.$moduleDirNameUpper.'_'.'UPDATE_SUCCESS')); |
|
597 | 597 | } |
598 | 598 | if ('clone' === $op) { |
599 | 599 | cloneBlock($bid); |
@@ -611,5 +611,5 @@ discard block |
||
611 | 611 | isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options); |
612 | 612 | } |
613 | 613 | } else { |
614 | - echo constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403'); |
|
614 | + echo constant('CO_'.$moduleDirNameUpper.'_'.'ERROR403'); |
|
615 | 615 | } |
@@ -23,7 +23,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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'; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $helper->loadLanguage('feedback'); |
34 | 34 | |
35 | 35 | $pathIcon32 = Admin::menuIconPath(''); |
36 | -$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/'; |
|
36 | +$pathModIcon32 = XOOPS_URL.'/modules/'.$moduleDirName.'/assets/images/icons/32/'; |
|
37 | 37 | if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) { |
38 | 38 | $pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); |
39 | 39 | } |
@@ -41,41 +41,41 @@ discard block |
||
41 | 41 | $adminmenu[] = [ |
42 | 42 | 'title' => _MI_CONTACT_MENU_HOME, |
43 | 43 | 'desc' => _MI_CONTACT_MENU_HOME_DESC, |
44 | - 'icon' => $pathIcon32 . '/home.png', |
|
44 | + 'icon' => $pathIcon32.'/home.png', |
|
45 | 45 | 'link' => 'admin/index.php', |
46 | 46 | ]; |
47 | 47 | |
48 | 48 | $adminmenu[] = [ |
49 | 49 | 'title' => _MI_CONTACT_MENU_CONTACT, |
50 | 50 | 'desc' => _MI_CONTACT_MENU_CONTACT_DESC, |
51 | - 'icon' => $pathIcon32 . '/content.png', |
|
51 | + 'icon' => $pathIcon32.'/content.png', |
|
52 | 52 | 'link' => 'admin/main.php', |
53 | 53 | ]; |
54 | 54 | |
55 | 55 | $adminmenu[] = [ |
56 | 56 | 'title' => _MI_CONTACT_MENU_LOGS, |
57 | 57 | 'desc' => _MI_CONTACT_MENU_LOGS_DESC, |
58 | - 'icon' => $pathIcon32 . '/identity.png', |
|
58 | + 'icon' => $pathIcon32.'/identity.png', |
|
59 | 59 | 'link' => 'admin/log.php', |
60 | 60 | ]; |
61 | 61 | |
62 | 62 | $adminmenu[] = [ |
63 | 63 | 'title' => _MI_CONTACT_MENU_TOOLS, |
64 | 64 | 'desc' => _MI_CONTACT_MENU_TOOLS_DESC, |
65 | - 'icon' => $pathIcon32 . '/delete.png', |
|
65 | + 'icon' => $pathIcon32.'/delete.png', |
|
66 | 66 | 'link' => 'admin/tools.php', |
67 | 67 | ]; |
68 | 68 | |
69 | 69 | // Blocks Admin |
70 | 70 | $adminmenu[] = [ |
71 | - 'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS'), |
|
71 | + 'title' => constant('CO_'.$moduleDirNameUpper.'_'.'BLOCKS'), |
|
72 | 72 | 'link' => 'admin/blocksadmin.php', |
73 | - 'icon' => $pathIcon32 . '/block.png', |
|
73 | + 'icon' => $pathIcon32.'/block.png', |
|
74 | 74 | ]; |
75 | 75 | |
76 | 76 | $adminmenu[] = [ |
77 | 77 | 'title' => _MI_CONTACT_MENU_ABOUT, |
78 | 78 | 'desc' => _MI_CONTACT_MENU_ABOUT_DESC, |
79 | - 'icon' => $pathIcon32 . '/about.png', |
|
79 | + 'icon' => $pathIcon32.'/about.png', |
|
80 | 80 | 'link' => 'admin/about.php', |
81 | 81 | ]; |
@@ -27,11 +27,11 @@ |
||
27 | 27 | |
28 | 28 | /** @var Admin $adminObject */ |
29 | 29 | /** @var ContactHandler $contactHandler */ |
30 | -require \dirname(__DIR__, 3) . '/include/cp_header.php'; |
|
31 | -require \dirname(__DIR__) . '/preloads/autoloader.php'; |
|
30 | +require \dirname(__DIR__, 3).'/include/cp_header.php'; |
|
31 | +require \dirname(__DIR__).'/preloads/autoloader.php'; |
|
32 | 32 | |
33 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
34 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
33 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
34 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
35 | 35 | global $xoopsModule; |
36 | 36 | |
37 | 37 | $moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname'); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @author Trabis <[email protected]> |
19 | 19 | * @author Hossein Azizabadi (AKA Voltan) |
20 | 20 | */ |
21 | -require_once __DIR__ . '/header.php'; |
|
21 | +require_once __DIR__.'/header.php'; |
|
22 | 22 | /** @var ContactHandler $contactHandler */ |
23 | 23 | if (!empty($_POST)) { |
24 | 24 | // Info Processing |