@@ -19,47 +19,47 @@ |
||
| 19 | 19 | $adminmenu[] = [ |
| 20 | 20 | 'title' => _MI_SF_HOME, |
| 21 | 21 | 'link' => 'admin/index.php', |
| 22 | - 'icon' => $pathIcon32 . '/home.png', |
|
| 22 | + 'icon' => $pathIcon32.'/home.png', |
|
| 23 | 23 | ]; |
| 24 | 24 | |
| 25 | 25 | $adminmenu[] = [ |
| 26 | 26 | 'title' => _MI_SF_ADMENU1, |
| 27 | 27 | 'link' => 'admin/main.php', |
| 28 | - 'icon' => $pathIcon32 . '/manage.png', |
|
| 28 | + 'icon' => $pathIcon32.'/manage.png', |
|
| 29 | 29 | ]; |
| 30 | 30 | |
| 31 | 31 | $adminmenu[] = [ |
| 32 | 32 | 'title' => _MI_SF_ADMENU2, |
| 33 | 33 | 'link' => 'admin/category.php', |
| 34 | - 'icon' => $pathIcon32 . '/category.png', |
|
| 34 | + 'icon' => $pathIcon32.'/category.png', |
|
| 35 | 35 | ]; |
| 36 | 36 | |
| 37 | 37 | $adminmenu[] = [ |
| 38 | 38 | 'title' => _MI_SF_ADMENU3, |
| 39 | 39 | 'link' => 'admin/faq.php', |
| 40 | - 'icon' => $pathIcon32 . '/search.png', |
|
| 40 | + 'icon' => $pathIcon32.'/search.png', |
|
| 41 | 41 | ]; |
| 42 | 42 | |
| 43 | 43 | $adminmenu[] = [ |
| 44 | 44 | 'title' => _MI_SF_ADMENU4, |
| 45 | 45 | 'link' => 'admin/question.php', |
| 46 | - 'icon' => $pathIcon32 . '/faq.png', |
|
| 46 | + 'icon' => $pathIcon32.'/faq.png', |
|
| 47 | 47 | ]; |
| 48 | 48 | |
| 49 | 49 | $adminmenu[] = [ |
| 50 | 50 | 'title' => _MI_SF_ADMENU5, |
| 51 | 51 | 'link' => 'admin/permissions.php', |
| 52 | - 'icon' => $pathIcon32 . '/permissions.png', |
|
| 52 | + 'icon' => $pathIcon32.'/permissions.png', |
|
| 53 | 53 | ]; |
| 54 | 54 | |
| 55 | 55 | $adminmenu[] = [ |
| 56 | 56 | 'title' => _MI_SF_ADMENU8, |
| 57 | 57 | 'link' => 'admin/import.php', |
| 58 | - 'icon' => $pathIcon32 . '/download.png', |
|
| 58 | + 'icon' => $pathIcon32.'/download.png', |
|
| 59 | 59 | ]; |
| 60 | 60 | |
| 61 | 61 | $adminmenu[] = [ |
| 62 | 62 | 'title' => _MI_SF_ABOUT, |
| 63 | 63 | 'link' => 'admin/about.php', |
| 64 | - 'icon' => $pathIcon32 . '/about.png', |
|
| 64 | + 'icon' => $pathIcon32.'/about.png', |
|
| 65 | 65 | ]; |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | use XoopsModules\Smartfaq; |
| 10 | 10 | |
| 11 | -require_once __DIR__ . '/admin_header.php'; |
|
| 11 | +require_once __DIR__.'/admin_header.php'; |
|
| 12 | 12 | |
| 13 | 13 | $op = 'none'; |
| 14 | 14 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | case 'importExecute': |
| 26 | 26 | |
| 27 | 27 | $importfile = isset($_POST['importfile']) ? $_POST['importfile'] : 'nonselected'; |
| 28 | - $importfile_path = XOOPS_ROOT_PATH . '/modules/smartfaq/admin/' . $importfile . '.php'; |
|
| 28 | + $importfile_path = XOOPS_ROOT_PATH.'/modules/smartfaq/admin/'.$importfile.'.php'; |
|
| 29 | 29 | if (!file_exists($importfile_path)) { |
| 30 | 30 | $errs[] = sprintf(_AM_SF_IMPORT_FILE_NOT_FOUND, $importfile_path); |
| 31 | 31 | $error = true; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | require_once $importfile_path; |
| 34 | 34 | } |
| 35 | 35 | foreach ($msgs as $m) { |
| 36 | - echo $m . '<br>'; |
|
| 36 | + echo $m.'<br>'; |
|
| 37 | 37 | } |
| 38 | 38 | echo '<br>'; |
| 39 | 39 | $endMsg = _AM_SF_IMPORT_SUCCESS; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | echo $endMsg; |
| 45 | 45 | echo '<br><br>'; |
| 46 | - echo "<a href='import.php'>" . _AM_SF_IMPORT_BACK . '</a>'; |
|
| 46 | + echo "<a href='import.php'>"._AM_SF_IMPORT_BACK.'</a>'; |
|
| 47 | 47 | echo '<br><br>'; |
| 48 | 48 | break; |
| 49 | 49 | |
@@ -55,13 +55,13 @@ discard block |
||
| 55 | 55 | xoops_cp_header(); |
| 56 | 56 | |
| 57 | 57 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
| 58 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_IMPORT_TITLE . '</h3>'; |
|
| 58 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_IMPORT_TITLE.'</h3>'; |
|
| 59 | 59 | echo "<div id='bottomtable'>"; |
| 60 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_INFO . '</span>'; |
|
| 60 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_INFO.'</span>'; |
|
| 61 | 61 | |
| 62 | 62 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
| 63 | 63 | |
| 64 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 64 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 65 | 65 | |
| 66 | 66 | /** @var XoopsModuleHandler $moduleHandler */ |
| 67 | 67 | $moduleHandler = xoops_getHandler('module'); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $sform->display(); |
| 102 | 102 | unset($hidden); |
| 103 | 103 | } else { |
| 104 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">' . _AM_SF_IMPORT_NO_MODULE . '</span>'; |
|
| 104 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">'._AM_SF_IMPORT_NO_MODULE.'</span>'; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | // End of collapsable bar |
@@ -110,4 +110,4 @@ discard block |
||
| 110 | 110 | break; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 113 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use XoopsModules\Smartfaq; |
| 14 | 14 | use XoopsModules\Smartfaq\Constants; |
| 15 | 15 | |
| 16 | -require_once __DIR__ . '/admin_header.php'; |
|
| 16 | +require_once __DIR__.'/admin_header.php'; |
|
| 17 | 17 | |
| 18 | 18 | $importFromModuleName = 'WF-FAQ'; |
| 19 | 19 | $scriptname = 'wffaq.php'; |
@@ -25,33 +25,33 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | if ('start' === $op) { |
| 28 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 28 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 29 | 29 | xoops_cp_header(); |
| 30 | - $result = $xoopsDB->queryF('SELECT count(*) FROM ' . $xoopsDB->prefix('faqcategories')); |
|
| 30 | + $result = $xoopsDB->queryF('SELECT count(*) FROM '.$xoopsDB->prefix('faqcategories')); |
|
| 31 | 31 | list($totalCat) = $xoopsDB->fetchRow($result); |
| 32 | 32 | |
| 33 | 33 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
| 34 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName) . '</h3>'; |
|
| 34 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName).'</h3>'; |
|
| 35 | 35 | echo "<div id='bottomtable'>"; |
| 36 | 36 | |
| 37 | 37 | if (0 == $totalCat) { |
| 38 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_NO_CATEGORY . '</span>'; |
|
| 38 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_NO_CATEGORY.'</span>'; |
|
| 39 | 39 | } else { |
| 40 | - require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 40 | + require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 41 | 41 | |
| 42 | - $result = $xoopsDB->queryF('SELECT count(*) FROM ' . $xoopsDB->prefix('faqtopics')); |
|
| 42 | + $result = $xoopsDB->queryF('SELECT count(*) FROM '.$xoopsDB->prefix('faqtopics')); |
|
| 43 | 43 | list($totalFAQ) = $xoopsDB->fetchRow($result); |
| 44 | 44 | |
| 45 | 45 | if (0 == $totalFAQ) { |
| 46 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_SF_IMPORT_MODULE_FOUND_NO_FAQ, $importFromModuleName, $totalCat) . '</span>'; |
|
| 46 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.sprintf(_AM_SF_IMPORT_MODULE_FOUND_NO_FAQ, $importFromModuleName, $totalCat).'</span>'; |
|
| 47 | 47 | } else { |
| 48 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ) . '</span>'; |
|
| 48 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ).'</span>'; |
|
| 49 | 49 | |
| 50 | - $form = new \XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL . '/modules/smartfaq/admin/' . $scriptname); |
|
| 50 | + $form = new \XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL.'/modules/smartfaq/admin/'.$scriptname); |
|
| 51 | 51 | |
| 52 | 52 | // Categories to be imported |
| 53 | 53 | $cat_cbox = new \XoopsFormCheckBox(sprintf(_AM_SF_IMPORT_CATEGORIES, $importFromModuleName), 'import_category', -1); |
| 54 | - $result = $xoopsDB->queryF('SELECT c.catID, c.name, count(t.topicID) FROM ' . $xoopsDB->prefix('faqcategories') . ' AS c, ' . $xoopsDB->prefix('faqtopics') . ' AS t WHERE c.catID=t.catID GROUP BY t.catID ORDER BY c.weight'); |
|
| 54 | + $result = $xoopsDB->queryF('SELECT c.catID, c.name, count(t.topicID) FROM '.$xoopsDB->prefix('faqcategories').' AS c, '.$xoopsDB->prefix('faqtopics').' AS t WHERE c.catID=t.catID GROUP BY t.catID ORDER BY c.weight'); |
|
| 55 | 55 | while (list($cid, $cat_title, $count) = $xoopsDB->fetchRow($result)) { |
| 56 | 56 | $cat_cbox->addOption($cid, "$cat_title ($count)<br\>"); |
| 57 | 57 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ob_end_clean(); |
| 66 | 66 | |
| 67 | 67 | // Auto-Approve |
| 68 | - $form->addElement(new \XoopsFormRadioYN(_AM_SF_IMPORT_AUTOAPPROVE, 'autoaprove', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '')); |
|
| 68 | + $form->addElement(new \XoopsFormRadioYN(_AM_SF_IMPORT_AUTOAPPROVE, 'autoaprove', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'')); |
|
| 69 | 69 | |
| 70 | 70 | // Submitted and answered by |
| 71 | 71 | $memberHandler = xoops_getHandler('member'); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $form->addElement($user_select); |
| 79 | 79 | |
| 80 | 80 | // Q&As can be commented? |
| 81 | - $form->addElement(new \XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '')); |
|
| 81 | + $form->addElement(new \XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'')); |
|
| 82 | 82 | $group_list = $memberHandler->getGroupList(); |
| 83 | 83 | $groups_selected = []; |
| 84 | 84 | $groups_checkbox = new \XoopsFormCheckBox(_AM_SF_IMPORT_PERMISSIONS, 'groups_read'); |
@@ -107,13 +107,13 @@ discard block |
||
| 107 | 107 | redirect_header($scriptname, 2, _AM_SF_NOCATSELECTED); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - require_once __DIR__ . '/admin_header.php'; |
|
| 110 | + require_once __DIR__.'/admin_header.php'; |
|
| 111 | 111 | xoops_cp_header(); |
| 112 | 112 | |
| 113 | 113 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
| 114 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName) . '</h3>'; |
|
| 114 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName).'</h3>'; |
|
| 115 | 115 | echo "<div id='bottomtable'>"; |
| 116 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_RESULT . '</span>'; |
|
| 116 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_RESULT.'</span>'; |
|
| 117 | 117 | |
| 118 | 118 | $cnt_imported_cat = 0; |
| 119 | 119 | $cnt_imported_faq = 0; |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | echo "Can Comment: $cancomment<br>"; |
| 143 | 143 | echo "Auto aprove: $autoaprove<br>";*/ |
| 144 | 144 | |
| 145 | - $resultCat = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('faqcategories') . " where catID in ($import_category_list) order by weight"); |
|
| 145 | + $resultCat = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('faqcategories')." where catID in ($import_category_list) order by weight"); |
|
| 146 | 146 | |
| 147 | 147 | while ($arrCat = $xoopsDB->fetchArray($resultCat)) { |
| 148 | 148 | extract($arrCat, EXTR_PREFIX_ALL, 'wfc'); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $categoryObj->setVar('description', $wfc_description); |
| 158 | 158 | |
| 159 | 159 | if (!$categoryObj->store(false)) { |
| 160 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name) . '<br>'; |
|
| 160 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name).'<br>'; |
|
| 161 | 161 | continue; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | ++$cnt_imported_cat; |
| 167 | 167 | |
| 168 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name) . "<br\>"; |
|
| 168 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name)."<br\>"; |
|
| 169 | 169 | |
| 170 | - $resultFAQ = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('faqtopics') . " where catID=$wfc_catID order by weight"); |
|
| 170 | + $resultFAQ = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('faqtopics')." where catID=$wfc_catID order by weight"); |
|
| 171 | 171 | while ($arrFAQ = $xoopsDB->fetchArray($resultFAQ)) { |
| 172 | 172 | extract($arrFAQ, EXTR_PREFIX_ALL, 'wft'); |
| 173 | 173 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $faqObj->setVar('exacturl', 0); |
| 200 | 200 | |
| 201 | 201 | if (!$faqObj->store(false)) { |
| 202 | - echo sprintf(' ' . _AM_SF_IMPORT_FAQ_ERROR, $wft_question) . '<br>'; |
|
| 202 | + echo sprintf(' '._AM_SF_IMPORT_FAQ_ERROR, $wft_question).'<br>'; |
|
| 203 | 203 | continue; |
| 204 | 204 | } else { |
| 205 | 205 | $answerObj->setVar('faqid', $faqObj->faqid()); |
@@ -208,10 +208,10 @@ discard block |
||
| 208 | 208 | $answerObj->setVar('status', Constants::SF_AN_STATUS_APPROVED); |
| 209 | 209 | |
| 210 | 210 | if (!$answerObj->store()) { |
| 211 | - echo sprintf(' ' . _AM_SF_IMPORT_FAQ_ERROR) . '<br>'; |
|
| 211 | + echo sprintf(' '._AM_SF_IMPORT_FAQ_ERROR).'<br>'; |
|
| 212 | 212 | continue; |
| 213 | 213 | } else { |
| 214 | - echo ' ' . sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)) . '<br>'; |
|
| 214 | + echo ' '.sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)).'<br>'; |
|
| 215 | 215 | ++$cnt_imported_faq; |
| 216 | 216 | } |
| 217 | 217 | } |
@@ -221,8 +221,8 @@ discard block |
||
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | echo 'Done.<br>'; |
| 224 | - echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br>'; |
|
| 225 | - echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq) . '<br>'; |
|
| 224 | + echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat).'<br>'; |
|
| 225 | + echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq).'<br>'; |
|
| 226 | 226 | |
| 227 | 227 | exit(); |
| 228 | 228 | } |
@@ -6,13 +6,13 @@ |
||
| 6 | 6 | * Licence: GNU |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -require_once __DIR__ . '/../../../mainfile.php'; |
|
| 10 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 11 | -require_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
| 12 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 13 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
| 14 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 15 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 9 | +require_once __DIR__.'/../../../mainfile.php'; |
|
| 10 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 11 | +require_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
| 12 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 13 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
| 14 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 15 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 16 | 16 | |
| 17 | 17 | //require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
| 18 | 18 | //require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php'; |
@@ -173,22 +173,22 @@ discard block |
||
| 173 | 173 | </td> |
| 174 | 174 | <td class='$class' align='center' nowrap='nowrap'> |
| 175 | 175 | <input type='radio' name='side[$bid]' value='" |
| 176 | - . XOOPS_SIDEBLOCK_LEFT |
|
| 177 | - . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
| 178 | - . XOOPS_CENTERBLOCK_LEFT |
|
| 179 | - . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
| 180 | - . XOOPS_CENTERBLOCK_CENTER |
|
| 181 | - . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
| 182 | - . XOOPS_CENTERBLOCK_RIGHT |
|
| 183 | - . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
| 184 | - . XOOPS_SIDEBLOCK_RIGHT |
|
| 185 | - . "'$ssel1> |
|
| 176 | + . XOOPS_SIDEBLOCK_LEFT |
|
| 177 | + . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
| 178 | + . XOOPS_CENTERBLOCK_LEFT |
|
| 179 | + . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
| 180 | + . XOOPS_CENTERBLOCK_CENTER |
|
| 181 | + . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
| 182 | + . XOOPS_CENTERBLOCK_RIGHT |
|
| 183 | + . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
| 184 | + . XOOPS_SIDEBLOCK_RIGHT |
|
| 185 | + . "'$ssel1> |
|
| 186 | 186 | <br> |
| 187 | 187 | <br> |
| 188 | 188 | <input type='radio' name='side[$bid]' value='-1'$sseln> |
| 189 | 189 | " |
| 190 | - . _NONE |
|
| 191 | - . " |
|
| 190 | + . _NONE |
|
| 191 | + . " |
|
| 192 | 192 | </td> |
| 193 | 193 | <td class='$class' align='center'> |
| 194 | 194 | <input type='text' name=weight[$bid] value='$weight' size='5' maxlength='5' style='text-align:right;'> |
@@ -205,8 +205,8 @@ discard block |
||
| 205 | 205 | </td> |
| 206 | 206 | <td class='$class' align='center'> |
| 207 | 207 | <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>" |
| 208 | - . _EDIT |
|
| 209 | - . "</a> |
|
| 208 | + . _EDIT |
|
| 209 | + . "</a> |
|
| 210 | 210 | <input type='hidden' name='bid[$bid]' value='$bid'> |
| 211 | 211 | </td> |
| 212 | 212 | </tr>\n"; |
@@ -239,14 +239,14 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | $form = new GroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src=" |
| 242 | - . XOOPS_URL |
|
| 243 | - . '/modules/' |
|
| 244 | - . $xoopsModule->dirname() |
|
| 245 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 246 | - . _AM_SF_GROUPS |
|
| 247 | - . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 248 | - . _AM_SF_GROUPSINFO |
|
| 249 | - . '</span>'); |
|
| 242 | + . XOOPS_URL |
|
| 243 | + . '/modules/' |
|
| 244 | + . $xoopsModule->dirname() |
|
| 245 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 246 | + . _AM_SF_GROUPS |
|
| 247 | + . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 248 | + . _AM_SF_GROUPSINFO |
|
| 249 | + . '</span>'); |
|
| 250 | 250 | $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
| 251 | 251 | $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
| 252 | 252 | foreach ($item_list as $item_id => $item_name) { |
@@ -14,12 +14,12 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | use XoopsModules\Smartfaq; |
| 16 | 16 | |
| 17 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 18 | -require_once __DIR__ . '/mygrouppermform.php'; |
|
| 19 | -require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
| 17 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 18 | +require_once __DIR__.'/mygrouppermform.php'; |
|
| 19 | +require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
| 20 | 20 | //require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/include/functions.php'; |
| 21 | 21 | |
| 22 | -$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system'; |
|
| 22 | +$xoops_system_path = XOOPS_ROOT_PATH.'/modules/system'; |
|
| 23 | 23 | |
| 24 | 24 | // language files |
| 25 | 25 | $language = $xoopsConfig['language']; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // to prevent from notice that constants already defined |
| 31 | 31 | $error_reporting_level = error_reporting(0); |
| 32 | -require_once __DIR__ . '/../../system/constants.php'; |
|
| 33 | -require_once __DIR__ . "/../../language/$language/admin.php"; |
|
| 34 | -require_once __DIR__ . "/../../language/$language/admin/blocksadmin.php"; |
|
| 32 | +require_once __DIR__.'/../../system/constants.php'; |
|
| 33 | +require_once __DIR__."/../../language/$language/admin.php"; |
|
| 34 | +require_once __DIR__."/../../language/$language/admin/blocksadmin.php"; |
|
| 35 | 35 | //require_once __DIR__ . '/../include/functions.php'; |
| 36 | 36 | error_reporting($error_reporting_level); |
| 37 | 37 | |
@@ -44,13 +44,13 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | // check $xoopsModule |
| 46 | 46 | if (!is_object($xoopsModule)) { |
| 47 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
| 47 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | // check access right (needs system_admin of BLOCK) |
| 51 | 51 | $syspermHandler = xoops_getHandler('groupperm'); |
| 52 | 52 | if (!$syspermHandler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) { |
| 53 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
| 53 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | // get blocks owned by the module |
@@ -77,20 +77,20 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | // displaying TH |
| 79 | 79 | Smartfaq\Utility::collapsableBar('toptable', 'toptableicon'); |
| 80 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_BLOCKS . '</h3>'; |
|
| 80 | + echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_BLOCKS.'</h3>'; |
|
| 81 | 81 | echo "<div id='toptable'>"; |
| 82 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_BLOCKSTXT . '</span>'; |
|
| 82 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_BLOCKSTXT.'</span>'; |
|
| 83 | 83 | |
| 84 | 84 | echo " |
| 85 | 85 | <form action='admin.php' name='blockadmin' method='post'> |
| 86 | 86 | <table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
| 87 | 87 | <tr valign='middle'> |
| 88 | - <th>" . _AM_TITLE . "</th> |
|
| 89 | - <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION . "</th> |
|
| 90 | - <th align='center'>" . _AM_WEIGHT . "</th> |
|
| 91 | - <th align='center'>" . _AM_VISIBLEIN . "</th> |
|
| 92 | - <th align='center'>" . _AM_BCACHETIME . "</th> |
|
| 93 | - <th align='center'>" . _AM_ACTION . "</th> |
|
| 88 | + <th>" . _AM_TITLE."</th> |
|
| 89 | + <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION."</th> |
|
| 90 | + <th align='center'>" . _AM_WEIGHT."</th> |
|
| 91 | + <th align='center'>" . _AM_VISIBLEIN."</th> |
|
| 92 | + <th align='center'>" . _AM_BCACHETIME."</th> |
|
| 93 | + <th align='center'>" . _AM_ACTION."</th> |
|
| 94 | 94 | </tr>\n"; |
| 95 | 95 | |
| 96 | 96 | // blocks displaying loop |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | // target modules |
| 142 | 142 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
| 143 | - $result = $db->query('SELECT module_id FROM ' . $db->prefix('block_module_link') . " WHERE block_id='$bid'"); |
|
| 143 | + $result = $db->query('SELECT module_id FROM '.$db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
| 144 | 144 | $selected_mids = []; |
| 145 | 145 | while (list($selected_mid) = $db->fetchRow($result)) { |
| 146 | 146 | $selected_mids[] = (int)$selected_mid; |
@@ -157,9 +157,9 @@ discard block |
||
| 157 | 157 | $myts = \MyTextSanitizer::getInstance(); |
| 158 | 158 | foreach ($module_list as $mid => $mname) { |
| 159 | 159 | if (in_array($mid, $selected_mids)) { |
| 160 | - $module_options .= "<option value='$mid' selected>" . $myts->displayTarea($mname) . "</option>\n"; |
|
| 160 | + $module_options .= "<option value='$mid' selected>".$myts->displayTarea($mname)."</option>\n"; |
|
| 161 | 161 | } else { |
| 162 | - $module_options .= "<option value='$mid'>" . $myts->displayTarea($mname) . "</option>\n"; |
|
| 162 | + $module_options .= "<option value='$mid'>".$myts->displayTarea($mname)."</option>\n"; |
|
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | <td class='foot' align='center' colspan='6'> |
| 220 | 220 | <input type='hidden' name='fct' value='blocksadmin'> |
| 221 | 221 | <input type='hidden' name='op' value='order'> |
| 222 | - <input type='submit' name='submit' value='" . _SUBMIT . "'> |
|
| 222 | + <input type='submit' name='submit' value='" . _SUBMIT."'> |
|
| 223 | 223 | </td> |
| 224 | 224 | </tr> |
| 225 | 225 | </table> |
@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
| 248 | 248 | . _AM_SF_GROUPSINFO |
| 249 | 249 | . '</span>'); |
| 250 | - $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
|
| 251 | - $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
|
| 250 | + $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
| 251 | + $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
| 252 | 252 | foreach ($item_list as $item_id => $item_name) { |
| 253 | 253 | $form->addItem($item_id, $myts->displayTarea($item_name)); |
| 254 | 254 | } |
@@ -257,14 +257,14 @@ discard block |
||
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | if (!empty($_POST['submit'])) { |
| 260 | - include __DIR__ . '/mygroupperm.php'; |
|
| 260 | + include __DIR__.'/mygroupperm.php'; |
|
| 261 | 261 | require_once "$xoops_system_path/language/$language/admin.php"; |
| 262 | - redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
| 262 | + redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | xoops_cp_header(); |
| 266 | 266 | if (file_exists('./mymenu.php')) { |
| 267 | - include __DIR__ . '/mymenu.php'; |
|
| 267 | + include __DIR__.'/mymenu.php'; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | list_blocks(); |
@@ -562,11 +562,11 @@ |
||
| 562 | 562 | $faqid = Request::getInt('faqid', 0, 'POST'); |
| 563 | 563 | xoops_cp_header(); |
| 564 | 564 | xoops_confirm([ |
| 565 | - 'op' => 'del', |
|
| 566 | - 'faqid' => $faqObj->faqid(), |
|
| 567 | - 'confirm' => 1, |
|
| 568 | - 'name' => $faqObj->question() |
|
| 569 | - ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 565 | + 'op' => 'del', |
|
| 566 | + 'faqid' => $faqObj->faqid(), |
|
| 567 | + 'confirm' => 1, |
|
| 568 | + 'name' => $faqObj->question() |
|
| 569 | + ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 570 | 570 | xoops_cp_footer(); |
| 571 | 571 | } |
| 572 | 572 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | use XoopsModules\Smartfaq; |
| 11 | 11 | use XoopsModules\Smartfaq\Constants; |
| 12 | 12 | |
| 13 | -require_once __DIR__ . '/admin_header.php'; |
|
| 13 | +require_once __DIR__.'/admin_header.php'; |
|
| 14 | 14 | |
| 15 | 15 | // Creating the faq handler object |
| 16 | 16 | /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */ |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | global $answerHandler, $faqHandler, $categoryHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
| 47 | 47 | |
| 48 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 48 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 49 | 49 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
| 50 | 50 | if (-1 != $faqid) { |
| 51 | 51 | // Creating the FAQ object |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | echo "<br>\n"; |
| 149 | 149 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
| 150 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . $collapsableBar_title . '</h3>'; |
|
| 150 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".$collapsableBar_title.'</h3>'; |
|
| 151 | 151 | echo "<div id='bottomtable'>"; |
| 152 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>'; |
|
| 152 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>'; |
|
| 153 | 153 | } else { |
| 154 | 154 | // there's no parameter, so we're adding a faq |
| 155 | 155 | $faqObj = $faqHandler->create(); |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $button_caption = _AM_SF_CREATE; |
| 164 | 164 | |
| 165 | 165 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
| 166 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CREATESMARTFAQ . '</h3>'; |
|
| 166 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_CREATESMARTFAQ.'</h3>'; |
|
| 167 | 167 | echo "<div id='bottomtable'>"; |
| 168 | 168 | } |
| 169 | 169 | $sform = new \XoopsThemeForm(_AM_SF_SMARTFAQ, 'op', xoops_getenv('PHP_SELF'), 'post', true); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | // ANSWER |
| 196 | 196 | if ($merge) { |
| 197 | - $theanswer = $originalAnswerObj->answer('e') . "\n\n" . sprintf(_AM_SF_NEW_CONTRIBUTION, Smartfaq\Utility::getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e')); |
|
| 197 | + $theanswer = $originalAnswerObj->answer('e')."\n\n".sprintf(_AM_SF_NEW_CONTRIBUTION, Smartfaq\Utility::getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e')); |
|
| 198 | 198 | } else { |
| 199 | 199 | $theanswer = $answerObj->answer('e'); |
| 200 | 200 | } |
@@ -243,14 +243,14 @@ discard block |
||
| 243 | 243 | $sform->addElement(new \XoopsFormText(_AM_SF_SPECIFIC_URL, 'contextpage', 50, 60, $faqObj->contextpage()), false); |
| 244 | 244 | |
| 245 | 245 | // EXACT URL? |
| 246 | - $excaturl_radio = new \XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 246 | + $excaturl_radio = new \XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 247 | 247 | $sform->addElement($excaturl_radio); |
| 248 | 248 | // WEIGHT |
| 249 | 249 | $sform->addElement(new \XoopsFormText(_AM_SF_WEIGHT, 'weight', 5, 5, $faqObj->weight()), true); |
| 250 | 250 | |
| 251 | 251 | // COMMENTS |
| 252 | 252 | // Code to allow comments |
| 253 | - $addcomments_radio = new \XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 253 | + $addcomments_radio = new \XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 254 | 254 | $sform->addElement($addcomments_radio); |
| 255 | 255 | |
| 256 | 256 | // PER ITEM PERMISSIONS |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | } |
| 265 | 265 | $sform->addElement($groups_checkbox); |
| 266 | 266 | |
| 267 | - $partial_view = new \XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 267 | + $partial_view = new \XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 268 | 268 | $sform->addElement($partial_view); |
| 269 | 269 | |
| 270 | 270 | // VARIOUS OPTIONS |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | // OFFLINE |
| 288 | 288 | if (Constants::SF_STATUS_OFFLINE == $faqObj->status()) { |
| 289 | 289 | // Back OnLine |
| 290 | - $offline_radio = new \XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 290 | + $offline_radio = new \XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 291 | 291 | $sform->addElement($offline_radio); |
| 292 | 292 | } |
| 293 | 293 | |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | xoops_cp_header(); |
| 364 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 364 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 365 | 365 | |
| 366 | 366 | editfaq(true, $faqid, $answerid, true); |
| 367 | 367 | break; |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | xoops_cp_header(); |
| 383 | 383 | |
| 384 | 384 | $adminObject->displayNavigation(basename(__FILE__)); |
| 385 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 385 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 386 | 386 | |
| 387 | 387 | editfaq(true, $faqid, $answerid); |
| 388 | 388 | break; |
@@ -520,13 +520,13 @@ discard block |
||
| 520 | 520 | |
| 521 | 521 | // Storing the FAQ |
| 522 | 522 | if (!$faqObj->store()) { |
| 523 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
| 523 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | // Storing the answer |
| 527 | 527 | $answerObj->setVar('faqid', $faqObj->faqid()); |
| 528 | 528 | if (!$answerObj->store()) { |
| 529 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . Smartfaq\Utility::formatErrors($answerObj->getErrors())); |
|
| 529 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.Smartfaq\Utility::formatErrors($answerObj->getErrors())); |
|
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | // Send notifications |
@@ -553,20 +553,20 @@ discard block |
||
| 553 | 553 | |
| 554 | 554 | if ($confirm) { |
| 555 | 555 | if (!$faqHandler->delete($faqObj)) { |
| 556 | - redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR . Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
| 556 | + redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR.Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | redirect_header('faq.php', 2, sprintf(_AM_SF_ARTISDELETED, $faqObj->question())); |
| 560 | 560 | } else { |
| 561 | 561 | // no confirm: show deletion condition |
| 562 | - $faqid = Request::getInt('faqid', 0, 'POST'); |
|
| 562 | + $faqid = Request::getInt('faqid', 0, 'POST'); |
|
| 563 | 563 | xoops_cp_header(); |
| 564 | 564 | xoops_confirm([ |
| 565 | 565 | 'op' => 'del', |
| 566 | 566 | 'faqid' => $faqObj->faqid(), |
| 567 | 567 | 'confirm' => 1, |
| 568 | 568 | 'name' => $faqObj->question() |
| 569 | - ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 569 | + ], 'faq.php', _AM_SF_DELETETHISARTICLE." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE); |
|
| 570 | 570 | xoops_cp_footer(); |
| 571 | 571 | } |
| 572 | 572 | |
@@ -580,10 +580,10 @@ discard block |
||
| 580 | 580 | |
| 581 | 581 | $adminObject->displayNavigation(basename(__FILE__)); |
| 582 | 582 | |
| 583 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 584 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 583 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 584 | + require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 585 | 585 | |
| 586 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/displayfaqs.php'; |
|
| 586 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/displayfaqs.php'; |
|
| 587 | 587 | |
| 588 | 588 | $totalcategories = $categoryHandler->getCategoriesCount(-1); |
| 589 | 589 | if ($totalcategories > 0) { |
@@ -593,4 +593,4 @@ discard block |
||
| 593 | 593 | break; |
| 594 | 594 | } |
| 595 | 595 | |
| 596 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 596 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Smartfaq\Constants; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 23 | -require_once __DIR__ . '/admin_header.php'; |
|
| 22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 23 | +require_once __DIR__.'/admin_header.php'; |
|
| 24 | 24 | |
| 25 | 25 | xoops_cp_header(); |
| 26 | 26 | |
@@ -76,34 +76,34 @@ discard block |
||
| 76 | 76 | $adminObject->addInfoBox(_AM_SF_INVENTORY); |
| 77 | 77 | |
| 78 | 78 | if ($totalcategories > 0) { |
| 79 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALCAT . '</a><b>' . '</infolabel>', $totalcategories), '', 'Green'); |
|
| 79 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALCAT.'</a><b>'.'</infolabel>', $totalcategories), '', 'Green'); |
|
| 80 | 80 | } else { |
| 81 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALCAT . '</infolabel>', $totalcategories), '', 'Green'); |
|
| 81 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALCAT.'</infolabel>', $totalcategories), '', 'Green'); |
|
| 82 | 82 | } |
| 83 | 83 | if ($totalasked > 0) { |
| 84 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALASKED . '</a><b>' . '</infolabel>', $totalasked), '', 'Green'); |
|
| 84 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALASKED.'</a><b>'.'</infolabel>', $totalasked), '', 'Green'); |
|
| 85 | 85 | } else { |
| 86 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALASKED . '</infolabel>', $totalasked), '', 'Green'); |
|
| 86 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALASKED.'</infolabel>', $totalasked), '', 'Green'); |
|
| 87 | 87 | } |
| 88 | 88 | if ($totalopened > 0) { |
| 89 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="question.php">' . _AM_SF_TOTALOPENED . '</a><b>' . '</infolabel>', $totalopened), '', 'Red'); |
|
| 89 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="question.php">'._AM_SF_TOTALOPENED.'</a><b>'.'</infolabel>', $totalopened), '', 'Red'); |
|
| 90 | 90 | } else { |
| 91 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALOPENED . '</infolabel>', $totalopened), '', 'Green'); |
|
| 91 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALOPENED.'</infolabel>', $totalopened), '', 'Green'); |
|
| 92 | 92 | } |
| 93 | 93 | if ($totalsubmitted > 0) { |
| 94 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALSUBMITTED . '</a><b>' . '</infolabel>', $totalsubmitted), '', 'Green'); |
|
| 94 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALSUBMITTED.'</a><b>'.'</infolabel>', $totalsubmitted), '', 'Green'); |
|
| 95 | 95 | } else { |
| 96 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALSUBMITTED . '</infolabel>', $totalsubmitted), '', 'Green'); |
|
| 96 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALSUBMITTED.'</infolabel>', $totalsubmitted), '', 'Green'); |
|
| 97 | 97 | } |
| 98 | 98 | if ($totalpublished > 0) { |
| 99 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="faq.php">' . _AM_SF_TOTALPUBLISHED . '</a><b>' . '</infolabel>', $totalpublished), '', 'Green'); |
|
| 99 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="faq.php">'._AM_SF_TOTALPUBLISHED.'</a><b>'.'</infolabel>', $totalpublished), '', 'Green'); |
|
| 100 | 100 | } else { |
| 101 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALPUBLISHED . '</infolabel>', $totalpublished), '', 'Green'); |
|
| 101 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALPUBLISHED.'</infolabel>', $totalpublished), '', 'Green'); |
|
| 102 | 102 | } |
| 103 | 103 | if ($totalnewanswers > 0) { |
| 104 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALNEWANSWERS . '</a><b>' . '</infolabel>', $totalnewanswers), '', 'Red'); |
|
| 104 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALNEWANSWERS.'</a><b>'.'</infolabel>', $totalnewanswers), '', 'Red'); |
|
| 105 | 105 | } else { |
| 106 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALNEWANSWERS . '</infolabel>', $totalnewanswers), '', 'Green'); |
|
| 106 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALNEWANSWERS.'</infolabel>', $totalnewanswers), '', 'Green'); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | //---------------------- |
@@ -111,4 +111,4 @@ discard block |
||
| 111 | 111 | $adminObject->displayNavigation(basename(__FILE__)); |
| 112 | 112 | $adminObject->displayIndex(); |
| 113 | 113 | |
| 114 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 114 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -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 | } |