@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * Licence: GNU |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -require_once __DIR__ . '/admin_header.php'; |
|
| 9 | +require_once __DIR__.'/admin_header.php'; |
|
| 10 | 10 | $myts = \MyTextSanitizer::getInstance(); |
| 11 | 11 | |
| 12 | 12 | global $xoopsModule; |
@@ -39,46 +39,46 @@ discard block |
||
| 39 | 39 | echo "</table>"; |
| 40 | 40 | */ |
| 41 | 41 | // Left headings... |
| 42 | -echo "<img src='" . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/' . $versioninfo->getInfo('image') . "' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'></a>"; |
|
| 43 | -echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . ' version ' . $versioninfo->getInfo('version') . ' (' . $versioninfo->getInfo('status_version') . ')</div>'; |
|
| 42 | +echo "<img src='".XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/'.$versioninfo->getInfo('image')."' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'></a>"; |
|
| 43 | +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>".$versioninfo->getInfo('name').' version '.$versioninfo->getInfo('version').' ('.$versioninfo->getInfo('status_version').')</div>'; |
|
| 44 | 44 | if ('' != $versioninfo->getInfo('author_realname')) { |
| 45 | - $author_name = $versioninfo->getInfo('author') . ' (' . $versioninfo->getInfo('author_realname') . ')'; |
|
| 45 | + $author_name = $versioninfo->getInfo('author').' ('.$versioninfo->getInfo('author_realname').')'; |
|
| 46 | 46 | } else { |
| 47 | 47 | $author_name = $versioninfo->getInfo('author'); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | -echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . ' ' . $author_name; |
|
| 50 | +echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>"._AM_SF_BY.' '.$author_name; |
|
| 51 | 51 | echo '</div>'; |
| 52 | -echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div>\n"; |
|
| 52 | +echo "<div style = 'line-height: 16px; display: block;'>".$versioninfo->getInfo('license')."</div>\n"; |
|
| 53 | 53 | |
| 54 | 54 | // Developers Information |
| 55 | 55 | echo "<br><table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 56 | 56 | echo '<tr>'; |
| 57 | -echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_AUTHOR_INFO . '</b></td>'; |
|
| 57 | +echo "<td colspan='2' class='bg3' align='left'><b>"._MI_SF_AUTHOR_INFO.'</b></td>'; |
|
| 58 | 58 | echo '</tr>'; |
| 59 | 59 | |
| 60 | 60 | if ('' != $versioninfo->getInfo('developer_lead')) { |
| 61 | 61 | echo '<tr>'; |
| 62 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . '</td>'; |
|
| 63 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . '</td>'; |
|
| 62 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_LEAD.'</td>'; |
|
| 63 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('developer_lead').'</td>'; |
|
| 64 | 64 | echo '</tr>'; |
| 65 | 65 | } |
| 66 | 66 | if ('' != $versioninfo->getInfo('developer_contributor')) { |
| 67 | 67 | echo '<tr>'; |
| 68 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . '</td>'; |
|
| 69 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . '</td>'; |
|
| 68 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_CONTRIBUTOR.'</td>'; |
|
| 69 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('developer_contributor').'</td>'; |
|
| 70 | 70 | echo '</tr>'; |
| 71 | 71 | } |
| 72 | 72 | if ('' != $versioninfo->getInfo('developer_website_url')) { |
| 73 | 73 | echo '<tr>'; |
| 74 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . '</td>'; |
|
| 75 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . '</a></td>'; |
|
| 74 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_WEBSITE.'</td>'; |
|
| 75 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('developer_website_url')."' target='blank'>".$versioninfo->getInfo('developer_website_name').'</a></td>'; |
|
| 76 | 76 | echo '</tr>'; |
| 77 | 77 | } |
| 78 | 78 | if ('' != $versioninfo->getInfo('developer_email')) { |
| 79 | 79 | echo '<tr>'; |
| 80 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . '</td>'; |
|
| 81 | - echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . '</a></td>'; |
|
| 80 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_EMAIL.'</td>'; |
|
| 81 | + echo "<td class='even' align='left'><a href='mailto:".$versioninfo->getInfo('developer_email')."'>".$versioninfo->getInfo('developer_email').'</a></td>'; |
|
| 82 | 82 | echo '</tr>'; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -87,47 +87,47 @@ discard block |
||
| 87 | 87 | // Module Developpment information |
| 88 | 88 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 89 | 89 | echo '<tr>'; |
| 90 | -echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_MODULE_INFO . '</b></td>'; |
|
| 90 | +echo "<td colspan='2' class='bg3' align='left'><b>"._MI_SF_MODULE_INFO.'</b></td>'; |
|
| 91 | 91 | echo '</tr>'; |
| 92 | 92 | |
| 93 | 93 | if ('' != $versioninfo->getInfo('date')) { |
| 94 | 94 | echo '<tr>'; |
| 95 | - echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . '</td>'; |
|
| 96 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . '</td>'; |
|
| 95 | + echo "<td class='head' width = '200' align='left'>"._MI_SF_MODULE_RELEASE_DATE.'</td>'; |
|
| 96 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('date').'</td>'; |
|
| 97 | 97 | echo '</tr>'; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | if ('' != $versioninfo->getInfo('status')) { |
| 101 | 101 | echo '<tr>'; |
| 102 | - echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . '</td>'; |
|
| 103 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . '</td>'; |
|
| 102 | + echo "<td class='head' width = '200' align='left'>"._MI_SF_MODULE_STATUS.'</td>'; |
|
| 103 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('status').'</td>'; |
|
| 104 | 104 | echo '</tr>'; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | if ('' != $versioninfo->getInfo('demo_site_url')) { |
| 108 | 108 | echo '<tr>'; |
| 109 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . '</td>'; |
|
| 110 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . '</a></td>'; |
|
| 109 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_DEMO.'</td>'; |
|
| 110 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('demo_site_url')."' target='blank'>".$versioninfo->getInfo('demo_site_name').'</a></td>'; |
|
| 111 | 111 | echo '</tr>'; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | if ('' != $versioninfo->getInfo('support_site_url')) { |
| 115 | 115 | echo '<tr>'; |
| 116 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . '</td>'; |
|
| 117 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . '</a></td>'; |
|
| 116 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_SUPPORT.'</td>'; |
|
| 117 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('support_site_url')."' target='blank'>".$versioninfo->getInfo('support_site_name').'</a></td>'; |
|
| 118 | 118 | echo '</tr>'; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | if ('' != $versioninfo->getInfo('submit_bug')) { |
| 122 | 122 | echo '<tr>'; |
| 123 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . '</td>'; |
|
| 124 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . 'Submit a Bug in SmartFAQ Bug Tracker' . '</a></td>'; |
|
| 123 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_BUG.'</td>'; |
|
| 124 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('submit_bug')."' target='blank'>".'Submit a Bug in SmartFAQ Bug Tracker'.'</a></td>'; |
|
| 125 | 125 | echo '</tr>'; |
| 126 | 126 | } |
| 127 | 127 | if ('' != $versioninfo->getInfo('submit_feature')) { |
| 128 | 128 | echo '<tr>'; |
| 129 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . '</td>'; |
|
| 130 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . 'Request a feature in the SmartFAQ Feature Tracker' . '</a></td>'; |
|
| 129 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_FEATURE.'</td>'; |
|
| 130 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('submit_feature')."' target='blank'>".'Request a feature in the SmartFAQ Feature Tracker'.'</a></td>'; |
|
| 131 | 131 | echo '</tr>'; |
| 132 | 132 | } |
| 133 | 133 | |
@@ -137,11 +137,11 @@ discard block |
||
| 137 | 137 | echo "<br>\n"; |
| 138 | 138 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 139 | 139 | echo '<tr>'; |
| 140 | - echo "<td class='bg3' align='left'><b>" . _MI_SF_MODULE_DISCLAIMER . '</b></td>'; |
|
| 140 | + echo "<td class='bg3' align='left'><b>"._MI_SF_MODULE_DISCLAIMER.'</b></td>'; |
|
| 141 | 141 | echo '</tr>'; |
| 142 | 142 | |
| 143 | 143 | echo '<tr>'; |
| 144 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('warning') . '</td>'; |
|
| 144 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('warning').'</td>'; |
|
| 145 | 145 | echo '</tr>'; |
| 146 | 146 | |
| 147 | 147 | echo '</table>'; |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | echo "<br>\n"; |
| 152 | 152 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 153 | 153 | echo '<tr>'; |
| 154 | - echo "<td class='bg3' align='left'><b>" . _MI_SF_AUTHOR_WORD . '</b></td>'; |
|
| 154 | + echo "<td class='bg3' align='left'><b>"._MI_SF_AUTHOR_WORD.'</b></td>'; |
|
| 155 | 155 | echo '</tr>'; |
| 156 | 156 | |
| 157 | 157 | echo '<tr>'; |
| 158 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('author_word') . '</td>'; |
|
| 158 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('author_word').'</td>'; |
|
| 159 | 159 | echo '</tr>'; |
| 160 | 160 | |
| 161 | 161 | echo '</table>'; |
@@ -166,11 +166,11 @@ discard block |
||
| 166 | 166 | echo "<br>\n"; |
| 167 | 167 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 168 | 168 | echo '<tr>'; |
| 169 | - echo "<td class='bg3' align='left'><b>" . _MI_SF_VERSION_HISTORY . '</b></td>'; |
|
| 169 | + echo "<td class='bg3' align='left'><b>"._MI_SF_VERSION_HISTORY.'</b></td>'; |
|
| 170 | 170 | echo '</tr>'; |
| 171 | 171 | |
| 172 | 172 | echo '<tr>'; |
| 173 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('version_history') . '</td>'; |
|
| 173 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('version_history').'</td>'; |
|
| 174 | 174 | echo '</tr>'; |
| 175 | 175 | |
| 176 | 176 | echo '</table>'; |
@@ -180,4 +180,4 @@ discard block |
||
| 180 | 180 | //$modfooter = Smartfaq\Utility::modFooter(); |
| 181 | 181 | //echo "<div align='center'>" . $modfooter . "</div>"; |
| 182 | 182 | //xoops_cp_footer(); |
| 183 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 183 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -379,20 +379,20 @@ |
||
| 379 | 379 | $tree .= ' checked'; |
| 380 | 380 | } |
| 381 | 381 | $tree .= '>' |
| 382 | - . $option['name'] |
|
| 383 | - . '<input type="hidden" name="' |
|
| 384 | - . $this->getName() |
|
| 385 | - . '[parents][' |
|
| 386 | - . $option['id'] |
|
| 387 | - . ']" value="' |
|
| 388 | - . implode(':', $parentIds) |
|
| 389 | - . '"><input type="hidden" name="' |
|
| 390 | - . $this->getName() |
|
| 391 | - . '[itemname][' |
|
| 392 | - . $option['id'] |
|
| 393 | - . ']" value="' |
|
| 394 | - . htmlspecialchars($option['name'], ENT_QUOTES) |
|
| 395 | - . "\"><br>\n"; |
|
| 382 | + . $option['name'] |
|
| 383 | + . '<input type="hidden" name="' |
|
| 384 | + . $this->getName() |
|
| 385 | + . '[parents][' |
|
| 386 | + . $option['id'] |
|
| 387 | + . ']" value="' |
|
| 388 | + . implode(':', $parentIds) |
|
| 389 | + . '"><input type="hidden" name="' |
|
| 390 | + . $this->getName() |
|
| 391 | + . '[itemname][' |
|
| 392 | + . $option['id'] |
|
| 393 | + . ']" value="' |
|
| 394 | + . htmlspecialchars($option['name'], ENT_QUOTES) |
|
| 395 | + . "\"><br>\n"; |
|
| 396 | 396 | if (isset($option['children'])) { |
| 397 | 397 | foreach ($option['children'] as $child) { |
| 398 | 398 | array_push($parentIds, $option['id']); |
@@ -24,12 +24,12 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 26 | 26 | |
| 27 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php'; |
|
| 28 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php'; |
|
| 29 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhiddentoken.php'; |
|
| 30 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php'; |
|
| 31 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php'; |
|
| 32 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php'; |
|
| 27 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php'; |
|
| 28 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php'; |
|
| 29 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhiddentoken.php'; |
|
| 30 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php'; |
|
| 31 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php'; |
|
| 32 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php'; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Renders a form for setting module specific group permissions |
@@ -159,11 +159,11 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | $gpermHandler = xoops_getHandler('groupperm'); |
| 161 | 161 | $memberHandler = xoops_getHandler('member'); |
| 162 | - $glist =& $memberHandler->getGroupList(); |
|
| 162 | + $glist = & $memberHandler->getGroupList(); |
|
| 163 | 163 | foreach (array_keys($glist) as $i) { |
| 164 | 164 | // get selected item id(s) for each group |
| 165 | 165 | $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid); |
| 166 | - $ele = new MyXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected); |
|
| 166 | + $ele = new MyXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected); |
|
| 167 | 167 | $ele->setOptionTree($this->_itemTree); |
| 168 | 168 | |
| 169 | 169 | foreach ($this->_appendix as $key => $append) { |
@@ -190,18 +190,18 @@ discard block |
||
| 190 | 190 | $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 191 | 191 | $this->addElement($tray); |
| 192 | 192 | |
| 193 | - $ret = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br>'; |
|
| 194 | - $ret .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
| 195 | - $elements =& $this->getElements(); |
|
| 193 | + $ret = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br>'; |
|
| 194 | + $ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
| 195 | + $elements = & $this->getElements(); |
|
| 196 | 196 | foreach (array_keys($elements) as $i) { |
| 197 | 197 | if (!is_object($elements[$i])) { |
| 198 | 198 | $ret .= $elements[$i]; |
| 199 | 199 | } elseif (!$elements[$i]->isHidden()) { |
| 200 | - $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption(); |
|
| 200 | + $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption(); |
|
| 201 | 201 | if ('' != $elements[$i]->getDescription()) { |
| 202 | - $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>'; |
|
| 202 | + $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>'; |
|
| 203 | 203 | } |
| 204 | - $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n"; |
|
| 204 | + $ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n"; |
|
| 205 | 205 | } else { |
| 206 | 206 | $ret .= $elements[$i]->render(); |
| 207 | 207 | } |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | */ |
| 288 | 288 | public function setOptionTree(&$optionTree) |
| 289 | 289 | { |
| 290 | - $this->_optionTree =& $optionTree; |
|
| 290 | + $this->_optionTree = & $optionTree; |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | /** |
@@ -312,34 +312,34 @@ discard block |
||
| 312 | 312 | $ret = ''; |
| 313 | 313 | |
| 314 | 314 | if (count($this->_appendix) > 0) { |
| 315 | - $ret .= '<table class="outer"><tr>'; |
|
| 315 | + $ret .= '<table class="outer"><tr>'; |
|
| 316 | 316 | $cols = 1; |
| 317 | 317 | foreach ($this->_appendix as $append) { |
| 318 | 318 | if ($cols > 4) { |
| 319 | - $ret .= '</tr><tr>'; |
|
| 319 | + $ret .= '</tr><tr>'; |
|
| 320 | 320 | $cols = 1; |
| 321 | 321 | } |
| 322 | 322 | $checked = $append['selected'] ? 'checked' : ''; |
| 323 | - $name = 'perms[' . $append['permname'] . ']'; |
|
| 323 | + $name = 'perms['.$append['permname'].']'; |
|
| 324 | 324 | $itemid = $append['itemid']; |
| 325 | 325 | $itemid = $append['itemid']; |
| 326 | - $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked>{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\"><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\"><br></td>"; |
|
| 326 | + $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked>{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\"><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\"><br></td>"; |
|
| 327 | 327 | ++$cols; |
| 328 | 328 | } |
| 329 | 329 | $ret .= '</tr></table>'; |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | - $ret .= '<table class="outer"><tr>'; |
|
| 332 | + $ret .= '<table class="outer"><tr>'; |
|
| 333 | 333 | $cols = 1; |
| 334 | 334 | foreach ($this->_optionTree[0]['children'] as $topitem) { |
| 335 | 335 | if ($cols > 4) { |
| 336 | - $ret .= '</tr><tr>'; |
|
| 336 | + $ret .= '</tr><tr>'; |
|
| 337 | 337 | $cols = 1; |
| 338 | 338 | } |
| 339 | 339 | $tree = '<td class="odd">'; |
| 340 | 340 | $prefix = ''; |
| 341 | 341 | $this->renderOptionTree($tree, $this->_optionTree[$topitem], $prefix); |
| 342 | - $ret .= $tree . '</td>'; |
|
| 342 | + $ret .= $tree.'</td>'; |
|
| 343 | 343 | ++$cols; |
| 344 | 344 | } |
| 345 | 345 | $ret .= '</tr></table>'; |
@@ -358,21 +358,21 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | private function renderOptionTree(&$tree, $option, $prefix, $parentIds = []) |
| 360 | 360 | { |
| 361 | - $tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="'; |
|
| 361 | + $tree .= $prefix.'<input type="checkbox" name="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" onclick="'; |
|
| 362 | 362 | // If there are parent elements, add javascript that will |
| 363 | 363 | // make them selecteded when this element is checked to make |
| 364 | 364 | // sure permissions to parent items are added as well. |
| 365 | 365 | foreach ($parentIds as $pid) { |
| 366 | - $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']'; |
|
| 367 | - $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 366 | + $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']'; |
|
| 367 | + $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 368 | 368 | } |
| 369 | 369 | // If there are child elements, add javascript that will |
| 370 | 370 | // make them unchecked when this element is unchecked to make |
| 371 | 371 | // sure permissions to child items are not added when there |
| 372 | 372 | // is no permission to this item. |
| 373 | 373 | foreach ($option['allchild'] as $cid) { |
| 374 | - $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']'; |
|
| 375 | - $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 374 | + $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']'; |
|
| 375 | + $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 376 | 376 | } |
| 377 | 377 | $tree .= '" value="1"'; |
| 378 | 378 | if (null !== $this->_value && in_array($option['id'], $this->_value)) { |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | if (isset($option['children'])) { |
| 397 | 397 | foreach ($option['children'] as $child) { |
| 398 | 398 | array_push($parentIds, $option['id']); |
| 399 | - $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix . ' -', $parentIds); |
|
| 399 | + $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix.' -', $parentIds); |
|
| 400 | 400 | } |
| 401 | 401 | } |
| 402 | 402 | } |
@@ -17,11 +17,11 @@ |
||
| 17 | 17 | * @author XOOPS Development Team |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -require_once __DIR__ . '/admin_header.php'; |
|
| 20 | +require_once __DIR__.'/admin_header.php'; |
|
| 21 | 21 | xoops_cp_header(); |
| 22 | 22 | |
| 23 | 23 | $adminObject->displayNavigation(basename(__FILE__)); |
| 24 | 24 | $adminObject::setPaypal('[email protected]'); |
| 25 | 25 | $adminObject->displayAbout(false); |
| 26 | 26 | |
| 27 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 27 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 12 | 12 | |
| 13 | -require_once __DIR__ . '/preloads/autoloader.php'; |
|
| 13 | +require_once __DIR__.'/preloads/autoloader.php'; |
|
| 14 | 14 | |
| 15 | 15 | $moduleDirName = basename(__DIR__); |
| 16 | 16 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | //$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; |
| 33 | 33 | $modversion['modicons16'] = 'assets/images/icons/16'; |
| 34 | 34 | $modversion['modicons32'] = 'assets/images/icons/32'; |
| 35 | -$modversion['release_file'] = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt'; |
|
| 35 | +$modversion['release_file'] = XOOPS_URL.'/modules/'.$modversion['dirname'].'/docs/changelog.txt'; |
|
| 36 | 36 | $modversion['module_website_url'] = 'www.xoops.org'; |
| 37 | 37 | $modversion['module_website_name'] = 'XOOPS'; |
| 38 | 38 | $modversion['min_php'] = '5.5'; |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // Tables created by sql file (without prefix!) |
| 104 | 104 | $modversion['tables'] = [ |
| 105 | - $moduleDirName . '_' . 'categories', |
|
| 106 | - $moduleDirName . '_' . 'faq', |
|
| 107 | - $moduleDirName . '_' . 'answers' |
|
| 105 | + $moduleDirName.'_'.'categories', |
|
| 106 | + $moduleDirName.'_'.'faq', |
|
| 107 | + $moduleDirName.'_'.'answers' |
|
| 108 | 108 | ]; |
| 109 | 109 | |
| 110 | 110 | // Search |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | |
| 28 | 28 | ob_start(); |
| 29 | 29 | |
| 30 | - echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>'; |
|
| 30 | + echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>'; |
|
| 31 | 31 | |
| 32 | 32 | // Adding partialview field |
| 33 | 33 | $table = new Smartfaq\SmartDbTable('smartfaq_faq'); |
@@ -30,16 +30,16 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | function xoops_module_pre_install_smartfaq(\XoopsModule $module) |
| 32 | 32 | { |
| 33 | - include __DIR__ . '/../preloads/autoloader.php'; |
|
| 33 | + include __DIR__.'/../preloads/autoloader.php'; |
|
| 34 | 34 | /** @var \XoopsModules\Smartfaq\Utility $utility */ |
| 35 | 35 | $utility = new \XoopsModules\Smartfaq\Utility(); |
| 36 | 36 | $xoopsSuccess = $utility::checkVerXoops($module); |
| 37 | 37 | $phpSuccess = $utility::checkVerPhp($module); |
| 38 | 38 | |
| 39 | - if (false !== $xoopsSuccess && false !== $phpSuccess) { |
|
| 40 | - $moduleTables =& $module->getInfo('tables'); |
|
| 39 | + if (false !== $xoopsSuccess && false !== $phpSuccess) { |
|
| 40 | + $moduleTables = & $module->getInfo('tables'); |
|
| 41 | 41 | foreach ($moduleTables as $table) { |
| 42 | - $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';'); |
|
| 42 | + $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';'); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | function xoops_module_install_smartfaq(\XoopsModule $module) |
| 57 | 57 | { |
| 58 | - require_once __DIR__ . '/../../../mainfile.php'; |
|
| 59 | - require_once __DIR__ . '/../include/config.php'; |
|
| 58 | + require_once __DIR__.'/../../../mainfile.php'; |
|
| 59 | + require_once __DIR__.'/../include/config.php'; |
|
| 60 | 60 | |
| 61 | 61 | $moduleDirName = basename(dirname(__DIR__)); |
| 62 | 62 | |
@@ -73,11 +73,11 @@ discard block |
||
| 73 | 73 | $moduleId2 = $helper->getModule()->mid(); |
| 74 | 74 | $gpermHandler = xoops_getHandler('groupperm'); |
| 75 | 75 | // access rights ------------------------------------------ |
| 76 | - $gpermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
| 77 | - $gpermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
| 78 | - $gpermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
| 79 | - $gpermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId); |
|
| 80 | - $gpermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
| 76 | + $gpermHandler->addRight($moduleDirName.'_approve', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
| 77 | + $gpermHandler->addRight($moduleDirName.'_submit', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
| 78 | + $gpermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
| 79 | + $gpermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_USERS, $moduleId); |
|
| 80 | + $gpermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
| 81 | 81 | |
| 82 | 82 | // --- CREATE FOLDERS --------------- |
| 83 | 83 | if (count($configurator->uploadFolders) > 0) { |
@@ -89,14 +89,14 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | // --- COPY blank.png FILES --------------- |
| 91 | 91 | if (count($configurator->copyBlankFiles) > 0) { |
| 92 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
| 92 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
| 93 | 93 | foreach (array_keys($configurator->copyBlankFiles) as $i) { |
| 94 | - $dest = $configurator->copyBlankFiles[$i] . '/blank.png'; |
|
| 94 | + $dest = $configurator->copyBlankFiles[$i].'/blank.png'; |
|
| 95 | 95 | $utilityClass::copyFile($file, $dest); |
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | //delete .html entries from the tpl table |
| 99 | - $sql = 'DELETE FROM ' . $xoopsDB->prefix('tplfile') . " WHERE `tpl_module` = '" . $xoopsModule->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'"; |
|
| 99 | + $sql = 'DELETE FROM '.$xoopsDB->prefix('tplfile')." WHERE `tpl_module` = '".$xoopsModule->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'"; |
|
| 100 | 100 | $xoopsDB->queryF($sql); |
| 101 | 101 | |
| 102 | 102 | return true; |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | global $_POST; |
| 14 | 14 | |
| 15 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 16 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
| 17 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 15 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 16 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
| 17 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 18 | 18 | |
| 19 | 19 | $form = new \XoopsThemeForm(_MD_SF_REQUEST, 'form', xoops_getenv('PHP_SELF'), 'post', true); |
| 20 | 20 | // CATEGORY |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | for ($i = 0, $iMax = count($faqsObj); $i < $iMax; ++$i) { |
| 28 | 28 | $ret[$i]['image'] = 'assets/images/smartfaq.gif'; |
| 29 | - $ret[$i]['link'] = 'faq.php?faqid=' . $faqsObj[$i]->faqid(); |
|
| 29 | + $ret[$i]['link'] = 'faq.php?faqid='.$faqsObj[$i]->faqid(); |
|
| 30 | 30 | $ret[$i]['title'] = $faqsObj[$i]->question(50); |
| 31 | 31 | $ret[$i]['time'] = $faqsObj[$i]->getVar('datesub'); |
| 32 | 32 | $ret[$i]['uid'] = $faqsObj[$i]->uid(); |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | global $_POST; |
| 15 | 15 | |
| 16 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 17 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
| 18 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 16 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 17 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
| 18 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 19 | 19 | //require_once __DIR__ . '/functions.php'; |
| 20 | 20 | |
| 21 | 21 | $mytree = new Smartfaq\Tree($xoopsDB->prefix('smartfaq_categories'), 'categoryid', 'parentid'); |