@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $criteria->add(new \Criteria('gperm_itemid', (int)$gperm_itemid)); |
23 | 23 | } |
24 | 24 | } |
25 | - $sql = 'DELETE FROM ' . $db->prefix('group_permission') . ' ' . $criteria->renderWhere(); |
|
25 | + $sql = 'DELETE FROM '.$db->prefix('group_permission').' '.$criteria->renderWhere(); |
|
26 | 26 | if (!$result = $db->query($sql)) { |
27 | 27 | return false; |
28 | 28 | } |
@@ -34,16 +34,16 @@ discard block |
||
34 | 34 | $modid = isset($_POST['modid']) ? (int)$_POST['modid'] : 1; |
35 | 35 | // we dont want system module permissions to be changed here ( 1 -> 0 GIJ) |
36 | 36 | if ($modid <= 0 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) { |
37 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
37 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
38 | 38 | } |
39 | 39 | /** @var XoopsModuleHandler $moduleHandler */ |
40 | 40 | $moduleHandler = xoops_getHandler('module'); |
41 | 41 | $module = $moduleHandler->get($modid); |
42 | 42 | if (!is_object($module) || !$module->getVar('isactive')) { |
43 | - redirect_header(XOOPS_URL . '/admin.php', 1, _MODULENOEXIST); |
|
43 | + redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST); |
|
44 | 44 | } |
45 | 45 | $memberHandler = xoops_getHandler('member'); |
46 | -$group_list =& $memberHandler->getGroupList(); |
|
46 | +$group_list = & $memberHandler->getGroupList(); |
|
47 | 47 | if (is_array($_POST['perms']) && !empty($_POST['perms'])) { |
48 | 48 | $gpermHandler = xoops_getHandler('groupperm'); |
49 | 49 | foreach ($_POST['perms'] as $perm_name => $perm_data) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | foreach ($parent_ids as $pid) { |
67 | 67 | if (0 != $pid && !in_array($pid, array_keys($item_ids))) { |
68 | 68 | // one of the parent items were not selected, so skip this item |
69 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>') . ' (' . _MD_AM_PERMADDNGP . ')'; |
|
69 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_AM_PERMADDNGP.')'; |
|
70 | 70 | continue 2; |
71 | 71 | } |
72 | 72 | } |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $gperm->setVar('gperm_modid', $modid); |
78 | 78 | $gperm->setVar('gperm_itemid', $item_id); |
79 | 79 | if (!$gpermHandler->insert($gperm)) { |
80 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
80 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
81 | 81 | } else { |
82 | - $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
82 | + $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
83 | 83 | } |
84 | 84 | unset($gperm); |
85 | 85 | } |
@@ -174,22 +174,22 @@ discard block |
||
174 | 174 | </td> |
175 | 175 | <td class='$class' align='center' nowrap='nowrap'> |
176 | 176 | <input type='radio' name='side[$bid]' value='" |
177 | - . Constants::XOOPS_SIDEBLOCK_LEFT |
|
178 | - . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
179 | - . Constants::XOOPS_CENTERBLOCK_LEFT |
|
180 | - . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
181 | - . Constants::XOOPS_CENTERBLOCK_CENTER |
|
182 | - . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
183 | - . Constants::XOOPS_CENTERBLOCK_RIGHT |
|
184 | - . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
185 | - . Constants::XOOPS_SIDEBLOCK_RIGHT |
|
186 | - . "'$ssel1> |
|
177 | + . Constants::XOOPS_SIDEBLOCK_LEFT |
|
178 | + . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
179 | + . Constants::XOOPS_CENTERBLOCK_LEFT |
|
180 | + . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
181 | + . Constants::XOOPS_CENTERBLOCK_CENTER |
|
182 | + . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
183 | + . Constants::XOOPS_CENTERBLOCK_RIGHT |
|
184 | + . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
185 | + . Constants::XOOPS_SIDEBLOCK_RIGHT |
|
186 | + . "'$ssel1> |
|
187 | 187 | <br> |
188 | 188 | <br> |
189 | 189 | <input type='radio' name='side[$bid]' value='-1'$sseln> |
190 | 190 | " |
191 | - . _NONE |
|
192 | - . " |
|
191 | + . _NONE |
|
192 | + . " |
|
193 | 193 | </td> |
194 | 194 | <td class='$class' align='center'> |
195 | 195 | <input type='text' name=weight[$bid] value='$weight' size='5' maxlength='5' style='text-align:right;'> |
@@ -206,8 +206,8 @@ discard block |
||
206 | 206 | </td> |
207 | 207 | <td class='$class' align='center'> |
208 | 208 | <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>" |
209 | - . _EDIT |
|
210 | - . "</a> |
|
209 | + . _EDIT |
|
210 | + . "</a> |
|
211 | 211 | <input type='hidden' name='bid[$bid]' value='$bid'> |
212 | 212 | </td> |
213 | 213 | </tr>\n"; |
@@ -240,14 +240,14 @@ discard block |
||
240 | 240 | } |
241 | 241 | |
242 | 242 | $form = new GroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src=" |
243 | - . XOOPS_URL |
|
244 | - . '/modules/' |
|
245 | - . $xoopsModule->dirname() |
|
246 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
247 | - . _AM_SF_GROUPS |
|
248 | - . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
249 | - . _AM_SF_GROUPSINFO |
|
250 | - . '</span>'); |
|
243 | + . XOOPS_URL |
|
244 | + . '/modules/' |
|
245 | + . $xoopsModule->dirname() |
|
246 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
247 | + . _AM_SF_GROUPS |
|
248 | + . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
249 | + . _AM_SF_GROUPSINFO |
|
250 | + . '</span>'); |
|
251 | 251 | $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
252 | 252 | $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
253 | 253 | foreach ($item_list as $item_id => $item_name) { |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | use XoopsModules\Smartfaq; |
16 | 16 | use XoopsModules\Smartfaq\Constants; |
17 | 17 | |
18 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
19 | -require_once __DIR__ . '/mygrouppermform.php'; |
|
20 | -require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
18 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
19 | +require_once __DIR__.'/mygrouppermform.php'; |
|
20 | +require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
21 | 21 | //require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/include/functions.php'; |
22 | 22 | |
23 | -$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system'; |
|
23 | +$xoops_system_path = XOOPS_ROOT_PATH.'/modules/system'; |
|
24 | 24 | |
25 | 25 | // language files |
26 | 26 | $language = $xoopsConfig['language']; |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | |
31 | 31 | // to prevent from notice that constants already defined |
32 | 32 | $error_reporting_level = error_reporting(0); |
33 | -require_once __DIR__ . '/../../system/constants.php'; |
|
34 | -require_once __DIR__ . "/../../language/$language/admin.php"; |
|
35 | -require_once __DIR__ . "/../../language/$language/admin/blocksadmin.php"; |
|
33 | +require_once __DIR__.'/../../system/constants.php'; |
|
34 | +require_once __DIR__."/../../language/$language/admin.php"; |
|
35 | +require_once __DIR__."/../../language/$language/admin/blocksadmin.php"; |
|
36 | 36 | //require_once __DIR__ . '/../include/functions.php'; |
37 | 37 | error_reporting($error_reporting_level); |
38 | 38 | |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | |
46 | 46 | // check $xoopsModule |
47 | 47 | if (!is_object($xoopsModule)) { |
48 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
48 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | // check access right (needs system_admin of BLOCK) |
52 | 52 | $syspermHandler = xoops_getHandler('groupperm'); |
53 | 53 | if (!$syspermHandler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) { |
54 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
54 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // get blocks owned by the module |
@@ -78,20 +78,20 @@ discard block |
||
78 | 78 | |
79 | 79 | // displaying TH |
80 | 80 | Smartfaq\Utility::collapsableBar('toptable', 'toptableicon'); |
81 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_BLOCKS . '</h3>'; |
|
81 | + echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_BLOCKS.'</h3>'; |
|
82 | 82 | echo "<div id='toptable'>"; |
83 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_BLOCKSTXT . '</span>'; |
|
83 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_BLOCKSTXT.'</span>'; |
|
84 | 84 | |
85 | 85 | echo " |
86 | 86 | <form action='admin.php' name='blockadmin' method='post'> |
87 | 87 | <table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
88 | 88 | <tr valign='middle'> |
89 | - <th>" . _AM_TITLE . "</th> |
|
90 | - <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION . "</th> |
|
91 | - <th align='center'>" . _AM_WEIGHT . "</th> |
|
92 | - <th align='center'>" . _AM_VISIBLEIN . "</th> |
|
93 | - <th align='center'>" . _AM_BCACHETIME . "</th> |
|
94 | - <th align='center'>" . _AM_ACTION . "</th> |
|
89 | + <th>" . _AM_TITLE."</th> |
|
90 | + <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION."</th> |
|
91 | + <th align='center'>" . _AM_WEIGHT."</th> |
|
92 | + <th align='center'>" . _AM_VISIBLEIN."</th> |
|
93 | + <th align='center'>" . _AM_BCACHETIME."</th> |
|
94 | + <th align='center'>" . _AM_ACTION."</th> |
|
95 | 95 | </tr>\n"; |
96 | 96 | |
97 | 97 | // blocks displaying loop |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | // target modules |
143 | 143 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
144 | - $result = $db->query('SELECT module_id FROM ' . $db->prefix('block_module_link') . " WHERE block_id='$bid'"); |
|
144 | + $result = $db->query('SELECT module_id FROM '.$db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
145 | 145 | $selected_mids = []; |
146 | 146 | while (list($selected_mid) = $db->fetchRow($result)) { |
147 | 147 | $selected_mids[] = (int)$selected_mid; |
@@ -158,9 +158,9 @@ discard block |
||
158 | 158 | $myts = \MyTextSanitizer::getInstance(); |
159 | 159 | foreach ($module_list as $mid => $mname) { |
160 | 160 | if (in_array($mid, $selected_mids)) { |
161 | - $module_options .= "<option value='$mid' selected>" . $myts->displayTarea($mname) . "</option>\n"; |
|
161 | + $module_options .= "<option value='$mid' selected>".$myts->displayTarea($mname)."</option>\n"; |
|
162 | 162 | } else { |
163 | - $module_options .= "<option value='$mid'>" . $myts->displayTarea($mname) . "</option>\n"; |
|
163 | + $module_options .= "<option value='$mid'>".$myts->displayTarea($mname)."</option>\n"; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | <td class='foot' align='center' colspan='6'> |
221 | 221 | <input type='hidden' name='fct' value='blocksadmin'> |
222 | 222 | <input type='hidden' name='op' value='order'> |
223 | - <input type='submit' name='submit' value='" . _SUBMIT . "'> |
|
223 | + <input type='submit' name='submit' value='" . _SUBMIT."'> |
|
224 | 224 | </td> |
225 | 225 | </tr> |
226 | 226 | </table> |
@@ -248,8 +248,8 @@ discard block |
||
248 | 248 | . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
249 | 249 | . _AM_SF_GROUPSINFO |
250 | 250 | . '</span>'); |
251 | - $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
|
252 | - $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
|
251 | + $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
252 | + $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
253 | 253 | foreach ($item_list as $item_id => $item_name) { |
254 | 254 | $form->addItem($item_id, $myts->displayTarea($item_name)); |
255 | 255 | } |
@@ -258,14 +258,14 @@ discard block |
||
258 | 258 | } |
259 | 259 | |
260 | 260 | if (!empty($_POST['submit'])) { |
261 | - include __DIR__ . '/mygroupperm.php'; |
|
261 | + include __DIR__.'/mygroupperm.php'; |
|
262 | 262 | require_once "$xoops_system_path/language/$language/admin.php"; |
263 | - redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
263 | + redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | xoops_cp_header(); |
267 | 267 | if (file_exists('./mymenu.php')) { |
268 | - include __DIR__ . '/mymenu.php'; |
|
268 | + include __DIR__.'/mymenu.php'; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | list_blocks(); |
@@ -6,16 +6,16 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
9 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
10 | 10 | |
11 | -$op = 'go';//'start'; |
|
11 | +$op = 'go'; //'start'; |
|
12 | 12 | |
13 | 13 | if (isset($_POST['op']) && ('go' === $_POST['op'])) { |
14 | 14 | $op = $_POST['op']; |
15 | 15 | } |
16 | 16 | |
17 | 17 | if ('start' === $op) { |
18 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
18 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
19 | 19 | |
20 | 20 | xoops_cp_header(); |
21 | 21 | |
@@ -44,41 +44,41 @@ discard block |
||
44 | 44 | |
45 | 45 | echo " <title>{module title}</title>\r\n"; |
46 | 46 | |
47 | - $resultC = $xoopsDB->queryF('SELECT * FROM ' . $xoopsDB->prefix('smartfaq_categories')); |
|
47 | + $resultC = $xoopsDB->queryF('SELECT * FROM '.$xoopsDB->prefix('smartfaq_categories')); |
|
48 | 48 | while ($arrC = $xoopsDB->fetchArray($resultC)) { |
49 | 49 | extract($arrC, EXTR_PREFIX_ALL, 'c'); |
50 | 50 | |
51 | 51 | echo " <qandadiv ID=\"c$c_categoryid\" Revision=\"$c_created\">\r\n"; |
52 | - echo ' <title>' . encodeText($c_name) . "</title>\r\n"; |
|
53 | - echo ' <para>' . encodeText($c_description) . "</para>\r\n"; |
|
52 | + echo ' <title>'.encodeText($c_name)."</title>\r\n"; |
|
53 | + echo ' <para>'.encodeText($c_description)."</para>\r\n"; |
|
54 | 54 | |
55 | - $resultQ = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('smartfaq_faq') . " where categoryid=$c_categoryid"); |
|
55 | + $resultQ = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('smartfaq_faq')." where categoryid=$c_categoryid"); |
|
56 | 56 | while ($arrQ = $xoopsDB->fetchArray($resultQ)) { |
57 | 57 | extract($arrQ, EXTR_PREFIX_ALL, 'q'); |
58 | 58 | |
59 | - echo " <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"" . getUserFullName($q_uid) . "\">\r\n"; |
|
59 | + echo " <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"".getUserFullName($q_uid)."\">\r\n"; |
|
60 | 60 | echo " <question>\r\n"; |
61 | - echo ' <para>' . encodeText($q_question) . "</para>\r\n"; |
|
61 | + echo ' <para>'.encodeText($q_question)."</para>\r\n"; |
|
62 | 62 | if (!empty($q_howdoi)) { |
63 | 63 | echo " <note Conformance=\"howdoi\">\r\n"; |
64 | 64 | echo " <title>{'How do I' from language file}</title>\r\n"; |
65 | - echo ' <para>' . encodeText($q_howdoi) . "</para>\r\n"; |
|
65 | + echo ' <para>'.encodeText($q_howdoi)."</para>\r\n"; |
|
66 | 66 | echo " </note>\r\n"; |
67 | 67 | } |
68 | 68 | if (!empty($q_diduno)) { |
69 | 69 | echo " <note Conformance=\"diduno\">\r\n"; |
70 | 70 | echo " <title>{'Did you know' from language file}</title>\r\n"; |
71 | - echo ' <para>' . encodeText($q_diduno) . "</para>\r\n"; |
|
71 | + echo ' <para>'.encodeText($q_diduno)."</para>\r\n"; |
|
72 | 72 | echo " </note>\r\n"; |
73 | 73 | } |
74 | 74 | echo " </question>\r\n"; |
75 | 75 | |
76 | - $resultA = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('smartfaq_answers') . " where answerid=$q_answerid"); |
|
76 | + $resultA = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('smartfaq_answers')." where answerid=$q_answerid"); |
|
77 | 77 | while ($arrA = $xoopsDB->fetchArray($resultA)) { |
78 | 78 | extract($arrA, EXTR_PREFIX_ALL, 'a'); |
79 | 79 | |
80 | - echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"" . getUserFullName($a_uid) . "\">\r\n"; |
|
81 | - echo ' <para>' . encodeText($a_answer) . "</para>\r\n"; |
|
80 | + echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName($a_uid)."\">\r\n"; |
|
81 | + echo ' <para>'.encodeText($a_answer)."</para>\r\n"; |
|
82 | 82 | echo " </answer>\r\n"; |
83 | 83 | } |
84 | 84 | $xoopsDB->freeRecordSet($resultA); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | break; |
72 | 72 | |
73 | 73 | case 'inside': |
74 | - return XOOPS_URL . '/modules/smartfaq/doc/'; |
|
74 | + return XOOPS_URL.'/modules/smartfaq/doc/'; |
|
75 | 75 | break; |
76 | 76 | |
77 | 77 | case 'custom': |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | { |
89 | 89 | $ret = ''; |
90 | 90 | foreach ($errors as $key => $value) { |
91 | - $ret .= '<br> - ' . $value; |
|
91 | + $ret .= '<br> - '.$value; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return $ret; |
@@ -112,13 +112,13 @@ discard block |
||
112 | 112 | $spaces .= '--'; |
113 | 113 | } |
114 | 114 | |
115 | - $ret .= "<option value='" . $categoryObj->categoryid() . "'"; |
|
115 | + $ret .= "<option value='".$categoryObj->categoryid()."'"; |
|
116 | 116 | if ($selectedid == $categoryObj->categoryid()) { |
117 | 117 | $ret .= ' selected'; |
118 | 118 | } |
119 | - $ret .= '>' . $spaces . $categoryObj->name() . "</option>\n"; |
|
119 | + $ret .= '>'.$spaces.$categoryObj->name()."</option>\n"; |
|
120 | 120 | |
121 | - $subCategoriesObj =& $categoryHandler->getCategories(0, 0, $categoryObj->categoryid()); |
|
121 | + $subCategoriesObj = & $categoryHandler->getCategories(0, 0, $categoryObj->categoryid()); |
|
122 | 122 | if (count($subCategoriesObj) > 0) { |
123 | 123 | ++$level; |
124 | 124 | foreach ($subCategoriesObj as $catID => $subCategoryObj) { |
@@ -137,10 +137,10 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public static function createCategorySelect($selectedid = 0, $parentcategory = 0, $allCatOption = true) |
139 | 139 | { |
140 | - $ret = '' . _MB_SF_SELECTCAT . " <select name='options[]'>"; |
|
140 | + $ret = ''._MB_SF_SELECTCAT." <select name='options[]'>"; |
|
141 | 141 | if ($allCatOption) { |
142 | 142 | $ret .= "<option value='0'"; |
143 | - $ret .= '>' . _MB_SF_ALLCAT . "</option>\n"; |
|
143 | + $ret .= '>'._MB_SF_ALLCAT."</option>\n"; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | // Creating the category handler object |
@@ -209,9 +209,9 @@ discard block |
||
209 | 209 | { |
210 | 210 | $smartModule = self::getModuleInfo(); |
211 | 211 | |
212 | - $modfootertxt = 'Module ' . $smartModule->getInfo('name') . ' - Version ' . $smartModule->getInfo('version') . ''; |
|
212 | + $modfootertxt = 'Module '.$smartModule->getInfo('name').' - Version '.$smartModule->getInfo('version').''; |
|
213 | 213 | |
214 | - $modfooter = "<a href='" . $smartModule->getInfo('support_site_url') . "' target='_blank'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/sfcssbutton.gif' title='" . $modfootertxt . "' alt='" . $modfootertxt . "'></a>"; |
|
214 | + $modfooter = "<a href='".$smartModule->getInfo('support_site_url')."' target='_blank'><img src='".XOOPS_URL."/modules/smartfaq/assets/images/sfcssbutton.gif' title='".$modfootertxt."' alt='".$modfootertxt."'></a>"; |
|
215 | 215 | |
216 | 216 | return $modfooter; |
217 | 217 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $module_id = $smartModule->getVar('mid'); |
234 | 234 | |
235 | 235 | if (!empty($xoopsUser)) { |
236 | - $groups =& $xoopsUser->getGroups(); |
|
236 | + $groups = & $xoopsUser->getGroups(); |
|
237 | 237 | $result = in_array(XOOPS_GROUP_ADMIN, $groups) || $xoopsUser->isAdmin($module_id); |
238 | 238 | } |
239 | 239 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | |
308 | 308 | $gpermHandler = xoops_getHandler('groupperm'); |
309 | 309 | |
310 | - $sql = 'SELECT faqid FROM ' . $xoopsDB->prefix('smartfaq_faq') . " WHERE categoryid = '$categoryid' "; |
|
310 | + $sql = 'SELECT faqid FROM '.$xoopsDB->prefix('smartfaq_faq')." WHERE categoryid = '$categoryid' "; |
|
311 | 311 | $result = $xoopsDB->queryF($sql); |
312 | 312 | |
313 | 313 | if ($GLOBALS['xoopsDB']->getRowsNum($result) > 0) { |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | $ret = []; |
423 | 423 | global $xoopsDB; |
424 | 424 | |
425 | - $result = $xoopsDB->queryF('SELECT * FROM ' . $xoopsDB->prefix('smartfaq_faq') . " WHERE faqid = '$faqid'"); |
|
425 | + $result = $xoopsDB->queryF('SELECT * FROM '.$xoopsDB->prefix('smartfaq_faq')." WHERE faqid = '$faqid'"); |
|
426 | 426 | $ret = $xoopsDB->fetchArray($result); |
427 | 427 | |
428 | 428 | return $ret; |
@@ -441,26 +441,26 @@ discard block |
||
441 | 441 | { |
442 | 442 | global $xoopsUser, $xoopsModule, $xoopsModuleConfig, $xoopsConfig; |
443 | 443 | $adminLinks = ''; |
444 | - $modulePath = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/'; |
|
444 | + $modulePath = XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/'; |
|
445 | 445 | $page = $open ? 'question.php' : 'faq.php'; |
446 | 446 | if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { |
447 | 447 | // Edit button |
448 | - $adminLinks .= "<a href='" . $modulePath . "admin/$page?op=mod&faqid=" . $faqid . "'><img src='" . $modulePath . "assets/images/links/edit.gif'" . " title='" . _MD_SF_EDIT . "' alt='" . _MD_SF_EDIT . "'></a>"; |
|
448 | + $adminLinks .= "<a href='".$modulePath."admin/$page?op=mod&faqid=".$faqid."'><img src='".$modulePath."assets/images/links/edit.gif'"." title='"._MD_SF_EDIT."' alt='"._MD_SF_EDIT."'></a>"; |
|
449 | 449 | $adminLinks .= ' '; |
450 | 450 | // Delete button |
451 | - $adminLinks .= "<a href='" . $modulePath . "admin/$page?op=del&faqid=" . $faqid . "'><img src='" . $modulePath . "assets/images/links/delete.gif'" . " title='" . _MD_SF_DELETE . "' alt='" . _MD_SF_DELETE . "'></a>"; |
|
451 | + $adminLinks .= "<a href='".$modulePath."admin/$page?op=del&faqid=".$faqid."'><img src='".$modulePath."assets/images/links/delete.gif'"." title='"._MD_SF_DELETE."' alt='"._MD_SF_DELETE."'></a>"; |
|
452 | 452 | $adminLinks .= ' '; |
453 | 453 | } |
454 | 454 | // Print button |
455 | - $adminLinks .= "<a href='" . $modulePath . 'print.php?faqid=' . $faqid . "'><img src='" . $modulePath . "assets/images/links/print.gif' title='" . _MD_SF_PRINT . "' alt='" . _MD_SF_PRINT . "'></a>"; |
|
455 | + $adminLinks .= "<a href='".$modulePath.'print.php?faqid='.$faqid."'><img src='".$modulePath."assets/images/links/print.gif' title='"._MD_SF_PRINT."' alt='"._MD_SF_PRINT."'></a>"; |
|
456 | 456 | $adminLinks .= ' '; |
457 | 457 | // Email button |
458 | - $maillink = 'mailto:?subject=' . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) . ': ' . $modulePath . 'faq.php?faqid=' . $faqid; |
|
459 | - $adminLinks .= '<a href="' . $maillink . "\"><img src='" . $modulePath . "assets/images/links/friend.gif' title='" . _MD_SF_MAIL . "' alt='" . _MD_SF_MAIL . "'></a>"; |
|
458 | + $maillink = 'mailto:?subject='.sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']).'&body='.sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']).': '.$modulePath.'faq.php?faqid='.$faqid; |
|
459 | + $adminLinks .= '<a href="'.$maillink."\"><img src='".$modulePath."assets/images/links/friend.gif' title='"._MD_SF_MAIL."' alt='"._MD_SF_MAIL."'></a>"; |
|
460 | 460 | $adminLinks .= ' '; |
461 | 461 | // Submit New Answer button |
462 | 462 | if ($xoopsModuleConfig['allownewanswer'] && (is_object($xoopsUser) || $xoopsModuleConfig['anonpost'])) { |
463 | - $adminLinks .= "<a href='" . $modulePath . 'answer.php?faqid=' . $faqid . "'><img src='" . $modulePath . "assets/images/links/newanswer.gif' title='" . _MD_SF_SUBMITANSWER . "' alt='" . _MD_SF_SUBMITANSWER . "'></a>"; |
|
463 | + $adminLinks .= "<a href='".$modulePath.'answer.php?faqid='.$faqid."'><img src='".$modulePath."assets/images/links/newanswer.gif' title='"._MD_SF_SUBMITANSWER."' alt='"._MD_SF_SUBMITANSWER."'></a>"; |
|
464 | 464 | $adminLinks .= ' '; |
465 | 465 | } |
466 | 466 | |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | if (!isset($users[$userid])) { |
492 | 492 | return $GLOBALS['xoopsConfig']['anonymous']; |
493 | 493 | } |
494 | - $user =& $users[$userid]; |
|
494 | + $user = & $users[$userid]; |
|
495 | 495 | } |
496 | 496 | |
497 | 497 | if (is_object($user)) { |
@@ -505,9 +505,9 @@ discard block |
||
505 | 505 | $fullname = $user->getVar('name'); |
506 | 506 | } |
507 | 507 | if (!empty($fullname)) { |
508 | - $linkeduser = "$fullname [<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . $ts->htmlSpecialChars($username) . '</a>]'; |
|
508 | + $linkeduser = "$fullname [<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".$ts->htmlSpecialChars($username).'</a>]'; |
|
509 | 509 | } else { |
510 | - $linkeduser = "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . ucwords($ts->htmlSpecialChars($username)) . '</a>'; |
|
510 | + $linkeduser = "<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".ucwords($ts->htmlSpecialChars($username)).'</a>'; |
|
511 | 511 | } |
512 | 512 | |
513 | 513 | return $linkeduser; |
@@ -589,6 +589,6 @@ discard block |
||
589 | 589 | //--> |
590 | 590 | </script> |
591 | 591 | <?php |
592 | - echo "<h3 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('" . $tablename . "'); toggleIcon('" . $iconname . "');\">"; |
|
592 | + echo "<h3 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('".$tablename."'); toggleIcon('".$iconname."');\">"; |
|
593 | 593 | } |
594 | 594 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $selectId = (int)$selectId; |
71 | 71 | $arr = []; |
72 | - $sql = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ' '; |
|
72 | + $sql = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.' '; |
|
73 | 73 | if ('' !== $order) { |
74 | 74 | $sql .= " ORDER BY $order"; |
75 | 75 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | $selectId = (int)$selectId; |
98 | 98 | $idarray = []; |
99 | - $result = $this->db->query('SELECT ' . $this->id . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ''); |
|
99 | + $result = $this->db->query('SELECT '.$this->id.' FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.''); |
|
100 | 100 | $count = $this->db->getRowsNum($result); |
101 | 101 | if (0 == $count) { |
102 | 102 | return $idarray; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | public function getAllChildId($selectId, $order = '', array $idarray = []) |
121 | 121 | { |
122 | 122 | $selectId = (int)$selectId; |
123 | - $sql = 'SELECT ' . $this->id . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ''; |
|
123 | + $sql = 'SELECT '.$this->id.' FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.''; |
|
124 | 124 | if ('' !== $order) { |
125 | 125 | $sql .= " ORDER BY $order"; |
126 | 126 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | public function getAllParentId($selectId, $order = '', array $idarray = []) |
150 | 150 | { |
151 | 151 | $selectId = (int)$selectId; |
152 | - $sql = 'SELECT ' . $this->pid . ' FROM ' . $this->table . ' WHERE ' . $this->id . '=' . $selectId . ''; |
|
152 | + $sql = 'SELECT '.$this->pid.' FROM '.$this->table.' WHERE '.$this->id.'='.$selectId.''; |
|
153 | 153 | if ('' !== $order) { |
154 | 154 | $sql .= " ORDER BY $order"; |
155 | 155 | } |
@@ -176,14 +176,14 @@ discard block |
||
176 | 176 | public function getPathFromId($selectId, $title, $path = '') |
177 | 177 | { |
178 | 178 | $selectId = (int)$selectId; |
179 | - $result = $this->db->query('SELECT ' . $this->pid . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$selectId"); |
|
179 | + $result = $this->db->query('SELECT '.$this->pid.', '.$title.' FROM '.$this->table.' WHERE '.$this->id."=$selectId"); |
|
180 | 180 | if (0 == $this->db->getRowsNum($result)) { |
181 | 181 | return $path; |
182 | 182 | } |
183 | 183 | list($parentid, $name) = $this->db->fetchRow($result); |
184 | 184 | $myts = \MyTextSanitizer::getInstance(); |
185 | 185 | $name = $myts->htmlspecialchars($name); |
186 | - $path = '/' . $name . $path . ''; |
|
186 | + $path = '/'.$name.$path.''; |
|
187 | 187 | if (0 == $parentid) { |
188 | 188 | return $path; |
189 | 189 | } |
@@ -209,12 +209,12 @@ discard block |
||
209 | 209 | $sel_name = $this->id; |
210 | 210 | } |
211 | 211 | $myts = \MyTextSanitizer::getInstance(); |
212 | - echo "<select name='" . $sel_name . "'"; |
|
212 | + echo "<select name='".$sel_name."'"; |
|
213 | 213 | if ('' !== $onchange) { |
214 | - echo " onchange='" . $onchange . "'"; |
|
214 | + echo " onchange='".$onchange."'"; |
|
215 | 215 | } |
216 | 216 | echo ">\n"; |
217 | - $sql = 'SELECT ' . $this->id . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=0'; |
|
217 | + $sql = 'SELECT '.$this->id.', '.$title.' FROM '.$this->table.' WHERE '.$this->pid.'=0'; |
|
218 | 218 | if ('' !== $order) { |
219 | 219 | $sql .= " ORDER BY $order"; |
220 | 220 | } |
@@ -232,11 +232,11 @@ discard block |
||
232 | 232 | $arr = $this->getChildTreeArray($catid, $order); |
233 | 233 | foreach ($arr as $option) { |
234 | 234 | $option['prefix'] = str_replace('.', '--', $option['prefix']); |
235 | - $catpath = $option['prefix'] . ' ' . $myts->htmlspecialchars($option[$title]); |
|
235 | + $catpath = $option['prefix'].' '.$myts->htmlspecialchars($option[$title]); |
|
236 | 236 | if ($option[$this->id] == $preset_id) { |
237 | 237 | $sel = " selected='selected'"; |
238 | 238 | } |
239 | - echo "<option value='" . $option[$this->id] . "'$sel>$catpath</option>\n"; |
|
239 | + echo "<option value='".$option[$this->id]."'$sel>$catpath</option>\n"; |
|
240 | 240 | $sel = ''; |
241 | 241 | } |
242 | 242 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | { |
258 | 258 | $path = !empty($path) ? $path : ''; |
259 | 259 | $selectId = (int)$selectId; |
260 | - $sql = 'SELECT ' . $this->pid . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$selectId"; |
|
260 | + $sql = 'SELECT '.$this->pid.', '.$title.' FROM '.$this->table.' WHERE '.$this->id."=$selectId"; |
|
261 | 261 | $result = $this->db->query($sql); |
262 | 262 | if (0 == $this->db->getRowsNum($result)) { |
263 | 263 | return $path; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | list($parentid, $name) = $this->db->fetchRow($result); |
266 | 266 | $myts = \MyTextSanitizer::getInstance(); |
267 | 267 | $name = $myts->htmlspecialchars($name); |
268 | - $path = "<li><a href='" . $funcURL . '&' . $this->id . '=' . $selectId . "'>" . $name . '</a></li>' . $path . ''; |
|
268 | + $path = "<li><a href='".$funcURL.'&'.$this->id.'='.$selectId."'>".$name.'</a></li>'.$path.''; |
|
269 | 269 | if (0 == $parentid) { |
270 | 270 | return $path; |
271 | 271 | } |
@@ -285,12 +285,12 @@ discard block |
||
285 | 285 | public function getIdPathFromId($selectId, $path = '') |
286 | 286 | { |
287 | 287 | $selectId = (int)$selectId; |
288 | - $result = $this->db->query('SELECT ' . $this->pid . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$selectId"); |
|
288 | + $result = $this->db->query('SELECT '.$this->pid.' FROM '.$this->table.' WHERE '.$this->id."=$selectId"); |
|
289 | 289 | if (0 == $this->db->getRowsNum($result)) { |
290 | 290 | return $path; |
291 | 291 | } |
292 | 292 | list($parentid) = $this->db->fetchRow($result); |
293 | - $path = '/' . $selectId . $path . ''; |
|
293 | + $path = '/'.$selectId.$path.''; |
|
294 | 294 | if (0 == $parentid) { |
295 | 295 | return $path; |
296 | 296 | } |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | public function getAllChild($selectId = 0, $order = '', array $parray = []) |
312 | 312 | { |
313 | 313 | $selectId = (int)$selectId; |
314 | - $sql = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ' '; |
|
314 | + $sql = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.' '; |
|
315 | 315 | if ('' !== $order) { |
316 | 316 | $sql .= " ORDER BY $order"; |
317 | 317 | } |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | public function getChildTreeArray($selectId = 0, $order = '', array $parray = [], $r_prefix = '') |
342 | 342 | { |
343 | 343 | $selectId = (int)$selectId; |
344 | - $sql = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ' '; |
|
344 | + $sql = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.' '; |
|
345 | 345 | if ('' !== $order) { |
346 | 346 | $sql .= " ORDER BY $order"; |
347 | 347 | } |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | return $parray; |
352 | 352 | } |
353 | 353 | while (false !== ($row = $this->db->fetchArray($result))) { |
354 | - $row['prefix'] = $r_prefix . '.'; |
|
354 | + $row['prefix'] = $r_prefix.'.'; |
|
355 | 355 | array_push($parray, $row); |
356 | 356 | $parray = $this->getChildTreeArray($row[$this->id], $order, $parray, $row['prefix']); |
357 | 357 | } |