@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | /** @var Admin $adminObject */ |
22 | 22 | /** @var Helper $helper */ |
23 | 23 | |
24 | -require __DIR__ . '/admin_header.php'; |
|
24 | +require __DIR__.'/admin_header.php'; |
|
25 | 25 | |
26 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
26 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
27 | 27 | |
28 | 28 | $moduleDirName = basename(dirname(__DIR__)); |
29 | 29 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | ] |
49 | 49 | ); |
50 | 50 | $form->addElement($sideSelect); |
51 | -$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT'), 'bweight', 2, 5, $block['weight'])); |
|
52 | -$form->addElement(new \XoopsFormRadioYN(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE'), 'bvisible', $block['visible'])); |
|
53 | -$moduleSelect = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN'), 'bmodule', $block['modules'], 5, true); |
|
51 | +$form->addElement(new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'WEIGHT'), 'bweight', 2, 5, $block['weight'])); |
|
52 | +$form->addElement(new \XoopsFormRadioYN(constant('CO_'.$moduleDirNameUpper.'_'.'VISIBLE'), 'bvisible', $block['visible'])); |
|
53 | +$moduleSelect = new \XoopsFormSelect(constant('CO_'.$moduleDirNameUpper.'_'.'VISIBLEIN'), 'bmodule', $block['modules'], 5, true); |
|
54 | 54 | /** @var \XoopsModuleHandler $moduleHandler */ |
55 | 55 | $moduleHandler = xoops_getHandler('module'); |
56 | 56 | $criteria = new \CriteriaCompo(new \Criteria('hasmain', 1)); |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | ksort($moduleList); |
62 | 62 | $moduleSelect->addOptionArray($moduleList); |
63 | 63 | $form->addElement($moduleSelect); |
64 | -$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'TITLE'), 'btitle', 50, 255, $block['title']), false); |
|
64 | +$form->addElement(new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'TITLE'), 'btitle', 50, 255, $block['title']), false); |
|
65 | 65 | if ($block['is_custom']) { |
66 | 66 | $textarea = new \XoopsFormDhtmlTextArea(_AM_SYSTEM_BLOCKS_CONTENT, 'bcontent', $block['content'], 15, 70); |
67 | - $textarea->setDescription('<span style="font-size:x-small;font-weight:bold;">' . _AM_SYSTEM_BLOCKS_USEFULTAGS . '</span><br><span style="font-size:x-small;font-weight:normal;">' . sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL . '/') . '</span>'); |
|
67 | + $textarea->setDescription('<span style="font-size:x-small;font-weight:bold;">'._AM_SYSTEM_BLOCKS_USEFULTAGS.'</span><br><span style="font-size:x-small;font-weight:normal;">'.sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL.'/').'</span>'); |
|
68 | 68 | $form->addElement($textarea, true); |
69 | 69 | $ctypeSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'bctype', $block['ctype']); |
70 | 70 | $ctypeSelect->addOptionArray( |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | $tplfileHandler = xoops_getHandler('tplfile'); |
83 | 83 | $btemplate = $tplfileHandler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']); |
84 | 84 | if (count($btemplate) > 0) { |
85 | - $form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&op=edittpl&id=' . $btemplate[0]->getVar('tpl_id') . '">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>')); |
|
85 | + $form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate[0]->getVar('tpl_id').'">'._AM_SYSTEM_BLOCKS_EDITTPL.'</a>')); |
|
86 | 86 | } else { |
87 | 87 | $btemplate2 = $tplfileHandler->find('default', 'block', $block['bid']); |
88 | 88 | if (count($btemplate2) > 0) { |
89 | - $form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&op=edittpl&id=' . $btemplate2[0]->getVar('tpl_id') . '" target="_blank">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>')); |
|
89 | + $form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate2[0]->getVar('tpl_id').'" target="_blank">'._AM_SYSTEM_BLOCKS_EDITTPL.'</a>')); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
@@ -88,28 +88,28 @@ discard block |
||
88 | 88 | echo $GLOBALS['xoopsSecurity']->getTokenHTML(); |
89 | 89 | echo "<table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
90 | 90 | <tr valign='middle'><th align='center'>" |
91 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'TITLE') |
|
92 | - . "</th><th align='center' nowrap='nowrap'>" |
|
93 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'SIDE') |
|
94 | - . '<br>' |
|
95 | - . _LEFT |
|
96 | - . '-' |
|
97 | - . _CENTER |
|
98 | - . '-' |
|
99 | - . _RIGHT |
|
100 | - . "</th><th align='center'>" |
|
101 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT') |
|
102 | - . "</th><th align='center'>" |
|
103 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE') |
|
104 | - . "</th><th align='center'>" |
|
105 | - . _AM_SYSTEM_BLOCKS_VISIBLEIN |
|
106 | - . "</th><th align='center'>" |
|
107 | - . _AM_SYSTEM_ADGS |
|
108 | - . "</th><th align='center'>" |
|
109 | - . _AM_SYSTEM_BLOCKS_BCACHETIME |
|
110 | - . "</th><th align='center'>" |
|
111 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'ACTION') |
|
112 | - . '</th></tr> |
|
91 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'TITLE') |
|
92 | + . "</th><th align='center' nowrap='nowrap'>" |
|
93 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'SIDE') |
|
94 | + . '<br>' |
|
95 | + . _LEFT |
|
96 | + . '-' |
|
97 | + . _CENTER |
|
98 | + . '-' |
|
99 | + . _RIGHT |
|
100 | + . "</th><th align='center'>" |
|
101 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT') |
|
102 | + . "</th><th align='center'>" |
|
103 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE') |
|
104 | + . "</th><th align='center'>" |
|
105 | + . _AM_SYSTEM_BLOCKS_VISIBLEIN |
|
106 | + . "</th><th align='center'>" |
|
107 | + . _AM_SYSTEM_ADGS |
|
108 | + . "</th><th align='center'>" |
|
109 | + . _AM_SYSTEM_BLOCKS_BCACHETIME |
|
110 | + . "</th><th align='center'>" |
|
111 | + . constant('CO_' . $moduleDirNameUpper . '_' . 'ACTION') |
|
112 | + . '</th></tr> |
|
113 | 113 | '; |
114 | 114 | $blockArray = \XoopsBlock::getByModule($xoopsModule->mid()); |
115 | 115 | $blockCount = count($blockArray); |
@@ -175,69 +175,69 @@ discard block |
||
175 | 175 | } |
176 | 176 | $name = $i->getVar('name'); |
177 | 177 | echo "<tr valign='top'><td class='$class' align='center'><input type='text' name='title[" |
178 | - . $i->getVar('bid') |
|
179 | - . "]' value='" |
|
180 | - . $title |
|
181 | - . "'></td><td class='$class' align='center' nowrap='nowrap'> |
|
178 | + . $i->getVar('bid') |
|
179 | + . "]' value='" |
|
180 | + . $title |
|
181 | + . "'></td><td class='$class' align='center' nowrap='nowrap'> |
|
182 | 182 | <div align='center' > |
183 | 183 | <input type='radio' name='side[" |
184 | - . $i->getVar('bid') |
|
185 | - . "]' value='" |
|
186 | - . XOOPS_CENTERBLOCK_LEFT |
|
187 | - . "'$ssel2> |
|
184 | + . $i->getVar('bid') |
|
185 | + . "]' value='" |
|
186 | + . XOOPS_CENTERBLOCK_LEFT |
|
187 | + . "'$ssel2> |
|
188 | 188 | <input type='radio' name='side[" |
189 | - . $i->getVar('bid') |
|
190 | - . "]' value='" |
|
191 | - . XOOPS_CENTERBLOCK_CENTER |
|
192 | - . "'$ssel3> |
|
189 | + . $i->getVar('bid') |
|
190 | + . "]' value='" |
|
191 | + . XOOPS_CENTERBLOCK_CENTER |
|
192 | + . "'$ssel3> |
|
193 | 193 | <input type='radio' name='side[" |
194 | - . $i->getVar('bid') |
|
195 | - . "]' value='" |
|
196 | - . XOOPS_CENTERBLOCK_RIGHT |
|
197 | - . "'$ssel4> |
|
194 | + . $i->getVar('bid') |
|
195 | + . "]' value='" |
|
196 | + . XOOPS_CENTERBLOCK_RIGHT |
|
197 | + . "'$ssel4> |
|
198 | 198 | </div> |
199 | 199 | <div> |
200 | 200 | <span style='float:right;'><input type='radio' name='side[" |
201 | - . $i->getVar('bid') |
|
202 | - . "]' value='" |
|
203 | - . XOOPS_SIDEBLOCK_RIGHT |
|
204 | - . "'$ssel1></span> |
|
201 | + . $i->getVar('bid') |
|
202 | + . "]' value='" |
|
203 | + . XOOPS_SIDEBLOCK_RIGHT |
|
204 | + . "'$ssel1></span> |
|
205 | 205 | <div align='left'><input type='radio' name='side[" |
206 | - . $i->getVar('bid') |
|
207 | - . "]' value='" |
|
208 | - . XOOPS_SIDEBLOCK_LEFT |
|
209 | - . "'$ssel0></div> |
|
206 | + . $i->getVar('bid') |
|
207 | + . "]' value='" |
|
208 | + . XOOPS_SIDEBLOCK_LEFT |
|
209 | + . "'$ssel0></div> |
|
210 | 210 | </div> |
211 | 211 | <div align='center'> |
212 | 212 | <input type='radio' name='side[" |
213 | - . $i->getVar('bid') |
|
214 | - . "]' value='" |
|
215 | - . XOOPS_CENTERBLOCK_BOTTOMLEFT |
|
216 | - . "'$ssel5> |
|
213 | + . $i->getVar('bid') |
|
214 | + . "]' value='" |
|
215 | + . XOOPS_CENTERBLOCK_BOTTOMLEFT |
|
216 | + . "'$ssel5> |
|
217 | 217 | <input type='radio' name='side[" |
218 | - . $i->getVar('bid') |
|
219 | - . "]' value='" |
|
220 | - . XOOPS_CENTERBLOCK_BOTTOM |
|
221 | - . "'$ssel7> |
|
218 | + . $i->getVar('bid') |
|
219 | + . "]' value='" |
|
220 | + . XOOPS_CENTERBLOCK_BOTTOM |
|
221 | + . "'$ssel7> |
|
222 | 222 | <input type='radio' name='side[" |
223 | - . $i->getVar('bid') |
|
224 | - . "]' value='" |
|
225 | - . XOOPS_CENTERBLOCK_BOTTOMRIGHT |
|
226 | - . "'$ssel6> |
|
223 | + . $i->getVar('bid') |
|
224 | + . "]' value='" |
|
225 | + . XOOPS_CENTERBLOCK_BOTTOMRIGHT |
|
226 | + . "'$ssel6> |
|
227 | 227 | </div> |
228 | 228 | </td><td class='$class' align='center'><input type='text' name='weight[" |
229 | - . $i->getVar('bid') |
|
230 | - . "]' value='" |
|
231 | - . $i->getVar('weight') |
|
232 | - . "' size='5' maxlength='5'></td><td class='$class' align='center' nowrap><input type='radio' name='visible[" |
|
233 | - . $i->getVar('bid') |
|
234 | - . "]' value='1'$sel1>" |
|
235 | - . _YES |
|
236 | - . " <input type='radio' name='visible[" |
|
237 | - . $i->getVar('bid') |
|
238 | - . "]' value='0'$sel0>" |
|
239 | - . _NO |
|
240 | - . '</td>'; |
|
229 | + . $i->getVar('bid') |
|
230 | + . "]' value='" |
|
231 | + . $i->getVar('weight') |
|
232 | + . "' size='5' maxlength='5'></td><td class='$class' align='center' nowrap><input type='radio' name='visible[" |
|
233 | + . $i->getVar('bid') |
|
234 | + . "]' value='1'$sel1>" |
|
235 | + . _YES |
|
236 | + . " <input type='radio' name='visible[" |
|
237 | + . $i->getVar('bid') |
|
238 | + . "]' value='0'$sel0>" |
|
239 | + . _NO |
|
240 | + . '</td>'; |
|
241 | 241 | |
242 | 242 | echo "<td class='$class' align='center'><select size='5' name='bmodule[" . $i->getVar('bid') . "][]' id='bmodule[" . $i->getVar('bid') . "][]' multiple='multiple'>"; |
243 | 243 | foreach ($moduleList as $k => $v) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | /** @var Admin $adminObject */ |
22 | 22 | /** @var Helper $helper */ |
23 | 23 | |
24 | -require __DIR__ . '/admin_header.php'; |
|
24 | +require __DIR__.'/admin_header.php'; |
|
25 | 25 | |
26 | 26 | $moduleDirName = basename(dirname(__DIR__)); |
27 | 27 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | if (!is_object($GLOBALS['xoopsUser']) || !is_object($xoopsModule) |
32 | 32 | || !$GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) { |
33 | - exit(constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403')); |
|
33 | + exit(constant('CO_'.$moduleDirNameUpper.'_'.'ERROR403')); |
|
34 | 34 | } |
35 | 35 | if ($GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) { |
36 | - require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
36 | + require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
37 | 37 | $op = 'list'; |
38 | 38 | if (isset($_POST)) { |
39 | 39 | foreach ($_POST as $k => $v) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | function listBlocks() |
58 | 58 | { |
59 | 59 | global $xoopsModule, $pathIcon16; |
60 | - require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
60 | + require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
61 | 61 | $moduleDirName = basename(dirname(__DIR__)); |
62 | 62 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName |
63 | 63 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
@@ -83,14 +83,14 @@ discard block |
||
83 | 83 | $moduleList[0] = _AM_SYSTEM_BLOCKS_ALLPAGES; |
84 | 84 | ksort($moduleList); |
85 | 85 | echo " |
86 | - <h4 style='text-align:left;'>" . constant('CO_' . $moduleDirNameUpper . '_' . 'BADMIN') . '</h4>'; |
|
87 | - echo "<form action='" . $_SERVER['SCRIPT_NAME'] . "' name='blockadmin' method='post'>"; |
|
86 | + <h4 style='text-align:left;'>" . constant('CO_'.$moduleDirNameUpper.'_'.'BADMIN').'</h4>'; |
|
87 | + echo "<form action='".$_SERVER['SCRIPT_NAME']."' name='blockadmin' method='post'>"; |
|
88 | 88 | echo $GLOBALS['xoopsSecurity']->getTokenHTML(); |
89 | 89 | echo "<table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
90 | 90 | <tr valign='middle'><th align='center'>" |
91 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'TITLE') |
|
91 | + . constant('CO_'.$moduleDirNameUpper.'_'.'TITLE') |
|
92 | 92 | . "</th><th align='center' nowrap='nowrap'>" |
93 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'SIDE') |
|
93 | + . constant('CO_'.$moduleDirNameUpper.'_'.'SIDE') |
|
94 | 94 | . '<br>' |
95 | 95 | . _LEFT |
96 | 96 | . '-' |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | . '-' |
99 | 99 | . _RIGHT |
100 | 100 | . "</th><th align='center'>" |
101 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT') |
|
101 | + . constant('CO_'.$moduleDirNameUpper.'_'.'WEIGHT') |
|
102 | 102 | . "</th><th align='center'>" |
103 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE') |
|
103 | + . constant('CO_'.$moduleDirNameUpper.'_'.'VISIBLE') |
|
104 | 104 | . "</th><th align='center'>" |
105 | 105 | . _AM_SYSTEM_BLOCKS_VISIBLEIN |
106 | 106 | . "</th><th align='center'>" |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | . "</th><th align='center'>" |
109 | 109 | . _AM_SYSTEM_BLOCKS_BCACHETIME |
110 | 110 | . "</th><th align='center'>" |
111 | - . constant('CO_' . $moduleDirNameUpper . '_' . 'ACTION') |
|
111 | + . constant('CO_'.$moduleDirNameUpper.'_'.'ACTION') |
|
112 | 112 | . '</th></tr> |
113 | 113 | '; |
114 | 114 | $blockArray = \XoopsBlock::getByModule($xoopsModule->mid()); |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | ]; |
130 | 130 | foreach ($blockArray as $i) { |
131 | 131 | $groupsPerms = $grouppermHandler->getGroupIds('block_read', $i->getVar('bid')); |
132 | - $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . $i->getVar('bid'); |
|
132 | + $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.$i->getVar('bid'); |
|
133 | 133 | $result = $db->query($sql); |
134 | 134 | $modules = []; |
135 | 135 | while (false !== ($row = $db->fetchArray($result))) { |
136 | - $modules[] = (int)$row['module_id']; |
|
136 | + $modules[] = (int) $row['module_id']; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | $cachetimeOptions = ''; |
@@ -239,47 +239,47 @@ discard block |
||
239 | 239 | . _NO |
240 | 240 | . '</td>'; |
241 | 241 | |
242 | - echo "<td class='$class' align='center'><select size='5' name='bmodule[" . $i->getVar('bid') . "][]' id='bmodule[" . $i->getVar('bid') . "][]' multiple='multiple'>"; |
|
242 | + echo "<td class='$class' align='center'><select size='5' name='bmodule[".$i->getVar('bid')."][]' id='bmodule[".$i->getVar('bid')."][]' multiple='multiple'>"; |
|
243 | 243 | foreach ($moduleList as $k => $v) { |
244 | - echo "<option value='$k'" . (in_array($k, $modules) ? 'selected' : '') . ">$v</option>"; |
|
244 | + echo "<option value='$k'".(in_array($k, $modules) ? 'selected' : '').">$v</option>"; |
|
245 | 245 | } |
246 | 246 | echo '</select></td>'; |
247 | 247 | |
248 | - echo "<td class='$class' align='center'><select size='5' name='groups[" . $i->getVar('bid') . "][]' id='groups[" . $i->getVar('bid') . "][]' multiple='multiple'>"; |
|
248 | + echo "<td class='$class' align='center'><select size='5' name='groups[".$i->getVar('bid')."][]' id='groups[".$i->getVar('bid')."][]' multiple='multiple'>"; |
|
249 | 249 | foreach ($groups as $grp) { |
250 | - echo "<option value='" . $grp->getVar('groupid') . "' " . (in_array($grp->getVar('groupid'), $groupsPerms) ? 'selected' : '') . '>' . $grp->getVar('name') . '</option>'; |
|
250 | + echo "<option value='".$grp->getVar('groupid')."' ".(in_array($grp->getVar('groupid'), $groupsPerms) ? 'selected' : '').'>'.$grp->getVar('name').'</option>'; |
|
251 | 251 | } |
252 | 252 | echo '</select></td>'; |
253 | 253 | |
254 | 254 | // Cache lifetime |
255 | - echo '<td class="' . $class . '" align="center"> <select name="bcachetime[' . $i->getVar('bid') . ']" size="1">' . $cachetimeOptions . '</select> |
|
255 | + echo '<td class="'.$class.'" align="center"> <select name="bcachetime['.$i->getVar('bid').']" size="1">'.$cachetimeOptions.'</select> |
|
256 | 256 | </td>'; |
257 | 257 | |
258 | 258 | // Actions |
259 | 259 | |
260 | - echo "<td class='$class' align='center'><a href='blocksadmin.php?op=edit&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/edit.png' . " alt='" . _EDIT . "' title='" . _EDIT . "'> |
|
261 | - </a> <a href='blocksadmin.php?op=clone&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/editcopy.png' . " alt='" . _CLONE . "' title='" . _CLONE . "'> |
|
260 | + echo "<td class='$class' align='center'><a href='blocksadmin.php?op=edit&bid=".$i->getVar('bid')."'><img src=".$pathIcon16.'/edit.png'." alt='"._EDIT."' title='"._EDIT."'> |
|
261 | + </a> <a href='blocksadmin.php?op=clone&bid=" . $i->getVar('bid')."'><img src=".$pathIcon16.'/editcopy.png'." alt='"._CLONE."' title='"._CLONE."'> |
|
262 | 262 | </a>"; |
263 | 263 | if ('S' !== $i->getVar('block_type') && 'M' !== $i->getVar('block_type')) { |
264 | - 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 . "'> |
|
264 | + 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."'> |
|
265 | 265 | </a>"; |
266 | 266 | } |
267 | 267 | echo " |
268 | - <input type='hidden' name='oldtitle[" . $i->getVar('bid') . "]' value='" . $i->getVar('title') . "'> |
|
269 | - <input type='hidden' name='oldside[" . $i->getVar('bid') . "]' value='" . $i->getVar('side') . "'> |
|
270 | - <input type='hidden' name='oldweight[" . $i->getVar('bid') . "]' value='" . $i->getVar('weight') . "'> |
|
271 | - <input type='hidden' name='oldvisible[" . $i->getVar('bid') . "]' value='" . $i->getVar('visible') . "'> |
|
272 | - <input type='hidden' name='oldgroups[" . $i->getVar('groups') . "]' value='" . $i->getVar('groups') . "'> |
|
273 | - <input type='hidden' name='oldbcachetime[" . $i->getVar('bid') . "]' value='" . $i->getVar('bcachetime') . "'> |
|
274 | - <input type='hidden' name='bid[" . $i->getVar('bid') . "]' value='" . $i->getVar('bid') . "'> |
|
268 | + <input type='hidden' name='oldtitle[" . $i->getVar('bid')."]' value='".$i->getVar('title')."'> |
|
269 | + <input type='hidden' name='oldside[" . $i->getVar('bid')."]' value='".$i->getVar('side')."'> |
|
270 | + <input type='hidden' name='oldweight[" . $i->getVar('bid')."]' value='".$i->getVar('weight')."'> |
|
271 | + <input type='hidden' name='oldvisible[" . $i->getVar('bid')."]' value='".$i->getVar('visible')."'> |
|
272 | + <input type='hidden' name='oldgroups[" . $i->getVar('groups')."]' value='".$i->getVar('groups')."'> |
|
273 | + <input type='hidden' name='oldbcachetime[" . $i->getVar('bid')."]' value='".$i->getVar('bcachetime')."'> |
|
274 | + <input type='hidden' name='bid[" . $i->getVar('bid')."]' value='".$i->getVar('bid')."'> |
|
275 | 275 | </td></tr> |
276 | 276 | "; |
277 | 277 | $class = ('even' === $class) ? 'odd' : 'even'; |
278 | 278 | } |
279 | 279 | echo "<tr><td class='foot' align='center' colspan='8'> |
280 | 280 | <input type='hidden' name='op' value='order'> |
281 | - " . $GLOBALS['xoopsSecurity']->getTokenHTML() . " |
|
282 | - <input type='submit' name='submit' value='" . _SUBMIT . "'> |
|
281 | + " . $GLOBALS['xoopsSecurity']->getTokenHTML()." |
|
282 | + <input type='submit' name='submit' value='" . _SUBMIT."'> |
|
283 | 283 | </td></tr></table> |
284 | 284 | </form> |
285 | 285 | <br><br>"; |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | */ |
291 | 291 | function cloneBlock($bid) |
292 | 292 | { |
293 | - require_once __DIR__ . '/admin_header.php'; |
|
293 | + require_once __DIR__.'/admin_header.php'; |
|
294 | 294 | |
295 | 295 | xoops_cp_header(); |
296 | 296 | |
@@ -305,16 +305,16 @@ discard block |
||
305 | 305 | // mpu_adm_menu(); |
306 | 306 | $myblock = new \XoopsBlock($bid); |
307 | 307 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
308 | - $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . (int)$bid; |
|
308 | + $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.(int) $bid; |
|
309 | 309 | $result = $db->query($sql); |
310 | 310 | $modules = []; |
311 | 311 | while (false !== ($row = $db->fetchArray($result))) { |
312 | - $modules[] = (int)$row['module_id']; |
|
312 | + $modules[] = (int) $row['module_id']; |
|
313 | 313 | } |
314 | 314 | $isCustom = ('C' === $myblock->getVar('block_type') || 'E' === $myblock->getVar('block_type')); |
315 | 315 | $block = [ |
316 | - 'title' => $myblock->getVar('title') . ' Clone', |
|
317 | - 'form_title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_CLONEBLOCK'), |
|
316 | + 'title' => $myblock->getVar('title').' Clone', |
|
317 | + 'form_title' => constant('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_CLONEBLOCK'), |
|
318 | 318 | 'name' => $myblock->getVar('name'), |
319 | 319 | 'side' => $myblock->getVar('side'), |
320 | 320 | 'weight' => $myblock->getVar('weight'), |
@@ -330,12 +330,12 @@ discard block |
||
330 | 330 | 'template' => $myblock->getVar('template'), |
331 | 331 | 'options' => $myblock->getVar('options'), |
332 | 332 | ]; |
333 | - echo '<a href="blocksadmin.php">' . constant('CO_' . $moduleDirNameUpper . '_' . 'BADMIN') . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_SYSTEM_BLOCKS_CLONEBLOCK . '<br><br>'; |
|
334 | - require_once __DIR__ . '/blockform.php'; |
|
333 | + echo '<a href="blocksadmin.php">'.constant('CO_'.$moduleDirNameUpper.'_'.'BADMIN').'</a> <span style="font-weight:bold;">»»</span> '._AM_SYSTEM_BLOCKS_CLONEBLOCK.'<br><br>'; |
|
334 | + require_once __DIR__.'/blockform.php'; |
|
335 | 335 | /** @var XoopsThemeForm $form */ |
336 | 336 | $form->display(); |
337 | 337 | // xoops_cp_footer(); |
338 | - require_once __DIR__ . '/admin_footer.php'; |
|
338 | + require_once __DIR__.'/admin_footer.php'; |
|
339 | 339 | exit(); |
340 | 340 | } |
341 | 341 | |
@@ -398,12 +398,12 @@ discard block |
||
398 | 398 | } |
399 | 399 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
400 | 400 | foreach ($bmodule as $bmid) { |
401 | - $sql = 'INSERT INTO ' . $db->prefix('block_module_link') . ' (block_id, module_id) VALUES (' . $newid . ', ' . $bmid . ')'; |
|
401 | + $sql = 'INSERT INTO '.$db->prefix('block_module_link').' (block_id, module_id) VALUES ('.$newid.', '.$bmid.')'; |
|
402 | 402 | $db->query($sql); |
403 | 403 | } |
404 | 404 | $groups = &$GLOBALS['xoopsUser']->getGroups(); |
405 | 405 | foreach ($groups as $iValue) { |
406 | - $sql = 'INSERT INTO ' . $db->prefix('group_permission') . ' (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (' . $iValue . ', ' . $newid . ", 1, 'block_read')"; |
|
406 | + $sql = 'INSERT INTO '.$db->prefix('group_permission').' (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES ('.$iValue.', '.$newid.", 1, 'block_read')"; |
|
407 | 407 | $db->query($sql); |
408 | 408 | } |
409 | 409 | redirect_header('blocksadmin.php?op=listar', 1, _AM_DBUPDATED); |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | */ |
438 | 438 | function editBlock($bid) |
439 | 439 | { |
440 | - require_once __DIR__ . '/admin_header.php'; |
|
440 | + require_once __DIR__.'/admin_header.php'; |
|
441 | 441 | xoops_cp_header(); |
442 | 442 | $adminObject = Admin::getInstance(); |
443 | 443 | $adminObject->displayNavigation(basename(__FILE__)); |
@@ -449,16 +449,16 @@ discard block |
||
449 | 449 | // mpu_adm_menu(); |
450 | 450 | $myblock = new \XoopsBlock($bid); |
451 | 451 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
452 | - $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . (int)$bid; |
|
452 | + $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.(int) $bid; |
|
453 | 453 | $result = $db->query($sql); |
454 | 454 | $modules = []; |
455 | 455 | while (false !== ($row = $db->fetchArray($result))) { |
456 | - $modules[] = (int)$row['module_id']; |
|
456 | + $modules[] = (int) $row['module_id']; |
|
457 | 457 | } |
458 | 458 | $isCustom = ('C' === $myblock->getVar('block_type') || 'E' === $myblock->getVar('block_type')); |
459 | 459 | $block = [ |
460 | 460 | 'title' => $myblock->getVar('title'), |
461 | - 'form_title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_EDITBLOCK'), |
|
461 | + 'form_title' => constant('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_EDITBLOCK'), |
|
462 | 462 | // 'name' => $myblock->getVar('name'), |
463 | 463 | 'side' => $myblock->getVar('side'), |
464 | 464 | 'weight' => $myblock->getVar('weight'), |
@@ -474,12 +474,12 @@ discard block |
||
474 | 474 | 'template' => $myblock->getVar('template'), |
475 | 475 | 'options' => $myblock->getVar('options'), |
476 | 476 | ]; |
477 | - echo '<a href="blocksadmin.php">' . constant('CO_' . $moduleDirNameUpper . '_' . 'BADMIN') . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_SYSTEM_BLOCKS_EDITBLOCK . '<br><br>'; |
|
478 | - require_once __DIR__ . '/blockform.php'; |
|
477 | + echo '<a href="blocksadmin.php">'.constant('CO_'.$moduleDirNameUpper.'_'.'BADMIN').'</a> <span style="font-weight:bold;">»»</span> '._AM_SYSTEM_BLOCKS_EDITBLOCK.'<br><br>'; |
|
478 | + require_once __DIR__.'/blockform.php'; |
|
479 | 479 | /** @var XoopsThemeForm $form */ |
480 | 480 | $form->display(); |
481 | 481 | // xoops_cp_footer(); |
482 | - require_once __DIR__ . '/admin_footer.php'; |
|
482 | + require_once __DIR__.'/admin_footer.php'; |
|
483 | 483 | exit(); |
484 | 484 | } |
485 | 485 | |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | $xoopsDB->query($sql); |
536 | 536 | } else { |
537 | 537 | foreach ($bmodule as $bmid) { |
538 | - $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid, (int)$bmid); |
|
538 | + $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid, (int) $bmid); |
|
539 | 539 | $xoopsDB->query($sql); |
540 | 540 | } |
541 | 541 | } |
@@ -548,14 +548,14 @@ discard block |
||
548 | 548 | $xoopsDB->query($sql); |
549 | 549 | } |
550 | 550 | } |
551 | - redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS')); |
|
551 | + redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_'.$moduleDirNameUpper.'_'.'UPDATE_SUCCESS')); |
|
552 | 552 | } |
553 | 553 | |
554 | 554 | if ('list' === $op) { |
555 | 555 | xoops_cp_header(); |
556 | 556 | // mpu_adm_menu(); |
557 | 557 | listBlocks(); |
558 | - require_once __DIR__ . '/admin_footer.php'; |
|
558 | + require_once __DIR__.'/admin_footer.php'; |
|
559 | 559 | exit(); |
560 | 560 | } |
561 | 561 | |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | $xoopsDB->query($sql); |
578 | 578 | } else { |
579 | 579 | foreach ($bmodule[$i] as $bmid) { |
580 | - $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid[$i], (int)$bmid); |
|
580 | + $sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid[$i], (int) $bmid); |
|
581 | 581 | $xoopsDB->query($sql); |
582 | 582 | } |
583 | 583 | } |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | } |
592 | 592 | } |
593 | 593 | } |
594 | - redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS')); |
|
594 | + redirect_header($_SERVER['SCRIPT_NAME'], 1, constant('CO_'.$moduleDirNameUpper.'_'.'UPDATE_SUCCESS')); |
|
595 | 595 | } |
596 | 596 | if ('clone' === $op) { |
597 | 597 | cloneBlock($bid); |
@@ -609,5 +609,5 @@ discard block |
||
609 | 609 | isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options); |
610 | 610 | } |
611 | 611 | } else { |
612 | - echo constant('CO_' . $moduleDirNameUpper . '_' . 'ERROR403'); |
|
612 | + echo constant('CO_'.$moduleDirNameUpper.'_'.'ERROR403'); |
|
613 | 613 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $helper->loadLanguage('feedback'); |
33 | 33 | |
34 | 34 | $pathIcon32 = Admin::menuIconPath(''); |
35 | -$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/'; |
|
35 | +$pathModIcon32 = XOOPS_URL.'/modules/'.$moduleDirName.'/assets/images/icons/32/'; |
|
36 | 36 | if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) { |
37 | 37 | $pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); |
38 | 38 | } |
@@ -40,41 +40,41 @@ discard block |
||
40 | 40 | $adminmenu[] = [ |
41 | 41 | 'title' => _MI_CONTACT_MENU_HOME, |
42 | 42 | 'desc' => _MI_CONTACT_MENU_HOME_DESC, |
43 | - 'icon' => $pathIcon32 . '/home.png', |
|
43 | + 'icon' => $pathIcon32.'/home.png', |
|
44 | 44 | 'link' => 'admin/index.php', |
45 | 45 | ]; |
46 | 46 | |
47 | 47 | $adminmenu[] = [ |
48 | 48 | 'title' => _MI_CONTACT_MENU_CONTACT, |
49 | 49 | 'desc' => _MI_CONTACT_MENU_CONTACT_DESC, |
50 | - 'icon' => $pathIcon32 . '/content.png', |
|
50 | + 'icon' => $pathIcon32.'/content.png', |
|
51 | 51 | 'link' => 'admin/main.php', |
52 | 52 | ]; |
53 | 53 | |
54 | 54 | $adminmenu[] = [ |
55 | 55 | 'title' => _MI_CONTACT_MENU_LOGS, |
56 | 56 | 'desc' => _MI_CONTACT_MENU_LOGS_DESC, |
57 | - 'icon' => $pathIcon32 . '/identity.png', |
|
57 | + 'icon' => $pathIcon32.'/identity.png', |
|
58 | 58 | 'link' => 'admin/log.php', |
59 | 59 | ]; |
60 | 60 | |
61 | 61 | $adminmenu[] = [ |
62 | 62 | 'title' => _MI_CONTACT_MENU_TOOLS, |
63 | 63 | 'desc' => _MI_CONTACT_MENU_TOOLS_DESC, |
64 | - 'icon' => $pathIcon32 . '/delete.png', |
|
64 | + 'icon' => $pathIcon32.'/delete.png', |
|
65 | 65 | 'link' => 'admin/tools.php', |
66 | 66 | ]; |
67 | 67 | |
68 | 68 | // Blocks Admin |
69 | 69 | $adminmenu[] = [ |
70 | - 'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS'), |
|
70 | + 'title' => constant('CO_'.$moduleDirNameUpper.'_'.'BLOCKS'), |
|
71 | 71 | 'link' => 'admin/blocksadmin.php', |
72 | - 'icon' => $pathIcon32 . '/block.png', |
|
72 | + 'icon' => $pathIcon32.'/block.png', |
|
73 | 73 | ]; |
74 | 74 | |
75 | 75 | $adminmenu[] = [ |
76 | 76 | 'title' => _MI_CONTACT_MENU_ABOUT, |
77 | 77 | 'desc' => _MI_CONTACT_MENU_ABOUT_DESC, |
78 | - 'icon' => $pathIcon32 . '/about.png', |
|
78 | + 'icon' => $pathIcon32.'/about.png', |
|
79 | 79 | 'link' => 'admin/about.php', |
80 | 80 | ]; |