@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -require_once __DIR__ . '/admin_header.php'; |
|
| 13 | +require_once __DIR__.'/admin_header.php'; |
|
| 14 | 14 | |
| 15 | 15 | $importFromModuleName = 'WF-FAQ'; |
| 16 | 16 | $scriptname = 'wffaq.php'; |
@@ -22,33 +22,33 @@ discard block |
||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | if ('start' === $op) { |
| 25 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 25 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 26 | 26 | xoops_cp_header(); |
| 27 | - $result = $xoopsDB->queryF('SELECT count(*) FROM ' . $xoopsDB->prefix('faqcategories')); |
|
| 27 | + $result = $xoopsDB->queryF('SELECT count(*) FROM '.$xoopsDB->prefix('faqcategories')); |
|
| 28 | 28 | list($totalCat) = $xoopsDB->fetchRow($result); |
| 29 | 29 | |
| 30 | 30 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 31 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName) . '</h3>'; |
|
| 31 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName).'</h3>'; |
|
| 32 | 32 | echo "<div id='bottomtable'>"; |
| 33 | 33 | |
| 34 | 34 | if (0 == $totalCat) { |
| 35 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_NO_CATEGORY . '</span>'; |
|
| 35 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_NO_CATEGORY.'</span>'; |
|
| 36 | 36 | } else { |
| 37 | - require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 37 | + require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 38 | 38 | |
| 39 | - $result = $xoopsDB->queryF('SELECT count(*) FROM ' . $xoopsDB->prefix('faqtopics')); |
|
| 39 | + $result = $xoopsDB->queryF('SELECT count(*) FROM '.$xoopsDB->prefix('faqtopics')); |
|
| 40 | 40 | list($totalFAQ) = $xoopsDB->fetchRow($result); |
| 41 | 41 | |
| 42 | 42 | if (0 == $totalFAQ) { |
| 43 | - 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>'; |
|
| 43 | + 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>'; |
|
| 44 | 44 | } else { |
| 45 | - 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>'; |
|
| 45 | + 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>'; |
|
| 46 | 46 | |
| 47 | - $form = new XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL . '/modules/smartfaq/admin/' . $scriptname); |
|
| 47 | + $form = new XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL.'/modules/smartfaq/admin/'.$scriptname); |
|
| 48 | 48 | |
| 49 | 49 | // Categories to be imported |
| 50 | 50 | $cat_cbox = new XoopsFormCheckBox(sprintf(_AM_SF_IMPORT_CATEGORIES, $importFromModuleName), 'import_category', -1); |
| 51 | - $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'); |
|
| 51 | + $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'); |
|
| 52 | 52 | while (list($cid, $cat_title, $count) = $xoopsDB->fetchRow($result)) { |
| 53 | 53 | $cat_cbox->addOption($cid, "$cat_title ($count)<br\>"); |
| 54 | 54 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | ob_end_clean(); |
| 63 | 63 | |
| 64 | 64 | // Auto-Approve |
| 65 | - $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_AUTOAPPROVE, 'autoaprove', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '')); |
|
| 65 | + $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_AUTOAPPROVE, 'autoaprove', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'')); |
|
| 66 | 66 | |
| 67 | 67 | // Submitted and answered by |
| 68 | 68 | $memberHandler = xoops_getHandler('member'); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $form->addElement($user_select); |
| 76 | 76 | |
| 77 | 77 | // Q&As can be commented? |
| 78 | - $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '')); |
|
| 78 | + $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'')); |
|
| 79 | 79 | $group_list = $memberHandler->getGroupList(); |
| 80 | 80 | $groups_selected = []; |
| 81 | 81 | $groups_checkbox = new XoopsFormCheckBox(_AM_SF_IMPORT_PERMISSIONS, 'groups_read'); |
@@ -104,13 +104,13 @@ discard block |
||
| 104 | 104 | redirect_header($scriptname, 2, _AM_SF_NOCATSELECTED); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - require_once __DIR__ . '/admin_header.php'; |
|
| 107 | + require_once __DIR__.'/admin_header.php'; |
|
| 108 | 108 | xoops_cp_header(); |
| 109 | 109 | |
| 110 | 110 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 111 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName) . '</h3>'; |
|
| 111 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName).'</h3>'; |
|
| 112 | 112 | echo "<div id='bottomtable'>"; |
| 113 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_RESULT . '</span>'; |
|
| 113 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_RESULT.'</span>'; |
|
| 114 | 114 | |
| 115 | 115 | $cnt_imported_cat = 0; |
| 116 | 116 | $cnt_imported_faq = 0; |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | echo "Can Comment: $cancomment<br>"; |
| 139 | 139 | echo "Auto aprove: $autoaprove<br>";*/ |
| 140 | 140 | |
| 141 | - $resultCat = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('faqcategories') . " where catID in ($import_category_list) order by weight"); |
|
| 141 | + $resultCat = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('faqcategories')." where catID in ($import_category_list) order by weight"); |
|
| 142 | 142 | |
| 143 | 143 | while ($arrCat = $xoopsDB->fetchArray($resultCat)) { |
| 144 | 144 | extract($arrCat, EXTR_PREFIX_ALL, 'wfc'); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $categoryObj->setVar('description', $wfc_description); |
| 154 | 154 | |
| 155 | 155 | if (!$categoryObj->store(false)) { |
| 156 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name) . '<br>'; |
|
| 156 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name).'<br>'; |
|
| 157 | 157 | continue; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -161,9 +161,9 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | ++$cnt_imported_cat; |
| 163 | 163 | |
| 164 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name) . "<br\>"; |
|
| 164 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name)."<br\>"; |
|
| 165 | 165 | |
| 166 | - $resultFAQ = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('faqtopics') . " where catID=$wfc_catID order by weight"); |
|
| 166 | + $resultFAQ = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('faqtopics')." where catID=$wfc_catID order by weight"); |
|
| 167 | 167 | while ($arrFAQ = $xoopsDB->fetchArray($resultFAQ)) { |
| 168 | 168 | extract($arrFAQ, EXTR_PREFIX_ALL, 'wft'); |
| 169 | 169 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $faqObj->setVar('exacturl', 0); |
| 196 | 196 | |
| 197 | 197 | if (!$faqObj->store(false)) { |
| 198 | - echo sprintf(' ' . _AM_SF_IMPORT_FAQ_ERROR, $wft_question) . '<br>'; |
|
| 198 | + echo sprintf(' '._AM_SF_IMPORT_FAQ_ERROR, $wft_question).'<br>'; |
|
| 199 | 199 | continue; |
| 200 | 200 | } else { |
| 201 | 201 | $answerObj->setVar('faqid', $faqObj->faqid()); |
@@ -204,10 +204,10 @@ discard block |
||
| 204 | 204 | $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); |
| 205 | 205 | |
| 206 | 206 | if (!$answerObj->store()) { |
| 207 | - echo sprintf(' ' . _AM_SF_IMPORT_FAQ_ERROR) . '<br>'; |
|
| 207 | + echo sprintf(' '._AM_SF_IMPORT_FAQ_ERROR).'<br>'; |
|
| 208 | 208 | continue; |
| 209 | 209 | } else { |
| 210 | - echo ' ' . sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)) . '<br>'; |
|
| 210 | + echo ' '.sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)).'<br>'; |
|
| 211 | 211 | ++$cnt_imported_faq; |
| 212 | 212 | } |
| 213 | 213 | } |
@@ -217,8 +217,8 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | echo 'Done.<br>'; |
| 220 | - echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br>'; |
|
| 221 | - echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq) . '<br>'; |
|
| 220 | + echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat).'<br>'; |
|
| 221 | + echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq).'<br>'; |
|
| 222 | 222 | |
| 223 | 223 | exit(); |
| 224 | 224 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -require_once __DIR__ . '/admin_header.php'; |
|
| 14 | +require_once __DIR__.'/admin_header.php'; |
|
| 15 | 15 | |
| 16 | 16 | $importFromModuleName = 'XoopsFAQ'; |
| 17 | 17 | $scriptname = 'xoopsfaq.php'; |
@@ -24,33 +24,33 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | if ('start' === $op) { |
| 26 | 26 | xoops_cp_header(); |
| 27 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 27 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 28 | 28 | |
| 29 | - $result = $xoopsDB->queryF('SELECT count(*) FROM ' . $xoopsDB->prefix('xoopsfaq_categories')); |
|
| 29 | + $result = $xoopsDB->queryF('SELECT count(*) FROM '.$xoopsDB->prefix('xoopsfaq_categories')); |
|
| 30 | 30 | list($totalCat) = $xoopsDB->fetchRow($result); |
| 31 | 31 | |
| 32 | 32 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 33 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName) . '</h3>'; |
|
| 33 | + 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 | 34 | echo "<div id='bottomtable'>"; |
| 35 | 35 | |
| 36 | 36 | if (0 == $totalCat) { |
| 37 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_NO_CATEGORY . '</span>'; |
|
| 37 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_NO_CATEGORY.'</span>'; |
|
| 38 | 38 | } else { |
| 39 | - require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 39 | + require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 40 | 40 | |
| 41 | - $result = $xoopsDB->queryF('SELECT count(*) FROM ' . $xoopsDB->prefix('xoopsfaq_contents')); |
|
| 41 | + $result = $xoopsDB->queryF('SELECT count(*) FROM '.$xoopsDB->prefix('xoopsfaq_contents')); |
|
| 42 | 42 | list($totalFAQ) = $xoopsDB->fetchRow($result); |
| 43 | 43 | |
| 44 | 44 | if (0 == $totalFAQ) { |
| 45 | - 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>'; |
|
| 45 | + 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 | 46 | } else { |
| 47 | - 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>'; |
|
| 47 | + 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 | 48 | |
| 49 | - $form = new XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL . '/modules/smartfaq/admin/' . $scriptname); |
|
| 49 | + $form = new XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL.'/modules/smartfaq/admin/'.$scriptname); |
|
| 50 | 50 | |
| 51 | 51 | // Categories to be imported |
| 52 | 52 | $cat_cbox = new XoopsFormCheckBox(sprintf(_AM_SF_IMPORT_CATEGORIES, $importFromModuleName), 'import_category', -1); |
| 53 | - $result = $xoopsDB->queryF('SELECT c.category_id, c.category_title, count(q.contents_id) FROM ' . $xoopsDB->prefix('xoopsfaq_categories') . ' AS c, ' . $xoopsDB->prefix('xoopsfaq_contents') . ' AS q WHERE c.category_id=q.category_id GROUP BY c.category_id ORDER BY category_order'); |
|
| 53 | + $result = $xoopsDB->queryF('SELECT c.category_id, c.category_title, count(q.contents_id) FROM '.$xoopsDB->prefix('xoopsfaq_categories').' AS c, '.$xoopsDB->prefix('xoopsfaq_contents').' AS q WHERE c.category_id=q.category_id GROUP BY c.category_id ORDER BY category_order'); |
|
| 54 | 54 | |
| 55 | 55 | while (list($cid, $cat_title, $count) = $xoopsDB->fetchRow($result)) { |
| 56 | 56 | $cat_cbox->addOption($cid, "$cat_title ($count)<br\>"); |
@@ -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 | |
| 83 | 83 | $group_list = $memberHandler->getGroupList(); |
| 84 | 84 | $groups_selected = []; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | if ('go' === $op) { |
| 105 | - require_once __DIR__ . '/admin_header.php'; |
|
| 105 | + require_once __DIR__.'/admin_header.php'; |
|
| 106 | 106 | |
| 107 | 107 | $import_category = (isset($_POST['import_category']) ? $_POST['import_category'] : null); |
| 108 | 108 | if (!$import_category) { |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | xoops_cp_header(); |
| 113 | 113 | |
| 114 | 114 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 115 | - 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 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName).'</h3>'; |
|
| 116 | 116 | echo "<div id='bottomtable'>"; |
| 117 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_RESULT . '</span>'; |
|
| 117 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_RESULT.'</span>'; |
|
| 118 | 118 | |
| 119 | 119 | $cnt_imported_cat = 0; |
| 120 | 120 | $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('xoopsfaq_categories') . " where category_id in ($import_category_list) order by category_order"); |
|
| 145 | + $resultCat = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('xoopsfaq_categories')." where category_id in ($import_category_list) order by category_order"); |
|
| 146 | 146 | |
| 147 | 147 | while ($arrCat = $xoopsDB->fetchArray($resultCat)) { |
| 148 | 148 | extract($arrCat, EXTR_PREFIX_ALL, 'xcat'); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $categoryObj->setVar('name', $xcat_category_title); |
| 157 | 157 | |
| 158 | 158 | if (!$categoryObj->store(false)) { |
| 159 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name) . '<br>'; |
|
| 159 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name).'<br>'; |
|
| 160 | 160 | continue; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -164,9 +164,9 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | ++$cnt_imported_cat; |
| 166 | 166 | |
| 167 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $xcat_category_title) . "<br\>"; |
|
| 167 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $xcat_category_title)."<br\>"; |
|
| 168 | 168 | |
| 169 | - $resultFAQ = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('xoopsfaq_contents') . " where category_id=$xcat_category_id order by contents_order"); |
|
| 169 | + $resultFAQ = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('xoopsfaq_contents')." where category_id=$xcat_category_id order by contents_order"); |
|
| 170 | 170 | while ($arrFAQ = $xoopsDB->fetchArray($resultFAQ)) { |
| 171 | 171 | extract($arrFAQ, EXTR_PREFIX_ALL, 'xfaq'); |
| 172 | 172 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $faqObj->setVar('cancomment', $cancomment); |
| 195 | 195 | |
| 196 | 196 | if (!$faqObj->store(false)) { |
| 197 | - echo sprintf(' ' . _AM_SF_IMPORT_FAQ_ERROR, $xfaq_contents_title) . '<br>'; |
|
| 197 | + echo sprintf(' '._AM_SF_IMPORT_FAQ_ERROR, $xfaq_contents_title).'<br>'; |
|
| 198 | 198 | continue; |
| 199 | 199 | } else { |
| 200 | 200 | $answerObj->setVar('faqid', $faqObj->faqid()); |
@@ -203,10 +203,10 @@ discard block |
||
| 203 | 203 | $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); |
| 204 | 204 | |
| 205 | 205 | if (!$answerObj->store()) { |
| 206 | - echo sprintf(' ' . _AM_SF_IMPORT_FAQ_ERROR) . '<br>'; |
|
| 206 | + echo sprintf(' '._AM_SF_IMPORT_FAQ_ERROR).'<br>'; |
|
| 207 | 207 | continue; |
| 208 | 208 | } else { |
| 209 | - echo ' ' . sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)) . '<br>'; |
|
| 209 | + echo ' '.sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)).'<br>'; |
|
| 210 | 210 | ++$cnt_imported_faq; |
| 211 | 211 | } |
| 212 | 212 | } |
@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | echo 'Done.<br>'; |
| 219 | - echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br>'; |
|
| 220 | - echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq) . '<br>'; |
|
| 219 | + echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat).'<br>'; |
|
| 220 | + echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq).'<br>'; |
|
| 221 | 221 | |
| 222 | 222 | exit(); |
| 223 | 223 | } |
@@ -110,18 +110,18 @@ |
||
| 110 | 110 | foreach ($proposed_answers as $proposed_answer) { |
| 111 | 111 | if (_SF_STATUS_NEW_ANSWER == $faqObj->status()) { |
| 112 | 112 | $merge = "<a href='faq.php?op=merge&faqid=" |
| 113 | - . $faqObj->faqid() |
|
| 114 | - . '&answerid=' |
|
| 115 | - . $proposed_answer->answerid() |
|
| 116 | - . "'><img src='" |
|
| 117 | - . XOOPS_URL |
|
| 118 | - . '/modules/' |
|
| 119 | - . $xoopsModule->dirname() |
|
| 120 | - . "/assets/images/icon/merge.gif' title='" |
|
| 121 | - . _AM_SF_FAQ_MERGE |
|
| 122 | - . "' alt='" |
|
| 123 | - . _AM_SF_FAQ_MERGE |
|
| 124 | - . "'></a> "; |
|
| 113 | + . $faqObj->faqid() |
|
| 114 | + . '&answerid=' |
|
| 115 | + . $proposed_answer->answerid() |
|
| 116 | + . "'><img src='" |
|
| 117 | + . XOOPS_URL |
|
| 118 | + . '/modules/' |
|
| 119 | + . $xoopsModule->dirname() |
|
| 120 | + . "/assets/images/icon/merge.gif' title='" |
|
| 121 | + . _AM_SF_FAQ_MERGE |
|
| 122 | + . "' alt='" |
|
| 123 | + . _AM_SF_FAQ_MERGE |
|
| 124 | + . "'></a> "; |
|
| 125 | 125 | $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/on.png' . "' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "'></a>"; |
| 126 | 126 | } |
| 127 | 127 | $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "'></a> "; |
@@ -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 | |
| 11 | 11 | $op = ''; |
| 12 | 12 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | global $answerHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts, $pathIcon16, $smartModuleConfig; |
| 30 | 30 | |
| 31 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 31 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 32 | 32 | |
| 33 | 33 | // Creating the FAQ object |
| 34 | 34 | $faqObj = new sfFaq($faqid); |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | $official_answer = $faqObj->answer(); |
| 66 | 66 | |
| 67 | 67 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 68 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_SUBMITTED_ANSWER . '</h3>'; |
|
| 68 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_SUBMITTED_ANSWER.'</h3>'; |
|
| 69 | 69 | echo "<div id='bottomtable'>"; |
| 70 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_SUBMITTED_ANSWER_INFO . '</span>'; |
|
| 70 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_SUBMITTED_ANSWER_INFO.'</span>'; |
|
| 71 | 71 | |
| 72 | 72 | $proposed_answers = $answerHandler->getAllAnswers($faqid, _SF_AN_STATUS_PROPOSED); |
| 73 | 73 | |
@@ -77,31 +77,31 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer> |
| 79 | 79 | <tr> |
| 80 | - <td class='head' width='100px'>" . _AM_SF_CATEGORY . "</td> |
|
| 81 | - <td class='even'>" . $categoryObj->name() . "</td> |
|
| 80 | + <td class='head' width='100px'>" . _AM_SF_CATEGORY."</td> |
|
| 81 | + <td class='even'>" . $categoryObj->name()."</td> |
|
| 82 | 82 | </tr> |
| 83 | 83 | <tr> |
| 84 | - <td class='head' width='100px'>" . _AM_SF_QUESTION . "</td> |
|
| 85 | - <td class='even'>" . $faqObj->question() . '</td> |
|
| 84 | + <td class='head' width='100px'>" . _AM_SF_QUESTION."</td> |
|
| 85 | + <td class='even'>" . $faqObj->question().'</td> |
|
| 86 | 86 | </tr>'; |
| 87 | 87 | if ($official_answer) { |
| 88 | 88 | echo " |
| 89 | 89 | <tr> |
| 90 | - <td class='head' width='100px'>" . _AM_SF_ANSWER_OFFICIAL . "</td> |
|
| 91 | - <td class='even'>" . $official_answer->answer() . '</td> |
|
| 90 | + <td class='head' width='100px'>" . _AM_SF_ANSWER_OFFICIAL."</td> |
|
| 91 | + <td class='even'>" . $official_answer->answer().'</td> |
|
| 92 | 92 | </tr>'; |
| 93 | 93 | } |
| 94 | 94 | echo "</table><br>\n"; |
| 95 | 95 | |
| 96 | 96 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 97 | 97 | echo '<tr>'; |
| 98 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>'; |
|
| 99 | - echo "<th class='bg3' class='bg3' align='center'><b>" . _AM_SF_ANSWER . '</b></td>'; |
|
| 98 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>'; |
|
| 99 | + echo "<th class='bg3' class='bg3' align='center'><b>"._AM_SF_ANSWER.'</b></td>'; |
|
| 100 | 100 | |
| 101 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
| 101 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
| 102 | 102 | |
| 103 | - echo "<th width='180' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
| 104 | - echo "<th width='120' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 103 | + echo "<th width='180' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
| 104 | + echo "<th width='120' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
| 105 | 105 | echo '</tr>'; |
| 106 | 106 | |
| 107 | 107 | $merge = ''; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $approve = ''; |
| 110 | 110 | foreach ($proposed_answers as $proposed_answer) { |
| 111 | 111 | if (_SF_STATUS_NEW_ANSWER == $faqObj->status()) { |
| 112 | - $merge = "<a href='faq.php?op=merge&faqid=" |
|
| 112 | + $merge = "<a href='faq.php?op=merge&faqid=" |
|
| 113 | 113 | . $faqObj->faqid() |
| 114 | 114 | . '&answerid=' |
| 115 | 115 | . $proposed_answer->answerid() |
@@ -122,19 +122,19 @@ discard block |
||
| 122 | 122 | . "' alt='" |
| 123 | 123 | . _AM_SF_FAQ_MERGE |
| 124 | 124 | . "'></a> "; |
| 125 | - $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/on.png' . "' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "'></a>"; |
|
| 125 | + $approve = "<a href='answer.php?op=selectanswer&faqid=".$faqid.'&answerid='.$proposed_answer->answerid()."'><img src='".$pathIcon16.'/on.png'."' title='"._AM_SF_FAQ_APPROVE_NEW_ANSWER."' alt='"._AM_SF_APPROVESUB."'></a>"; |
|
| 126 | 126 | } |
| 127 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "'></a> "; |
|
| 128 | - $delete = "<a href='answer.php?op=del&faqid=" . $faqObj->faqid() . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETESUBM . "' alt='" . _AM_SF_DELETESUBM . "'></a>"; |
|
| 127 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqObj->faqid().'&answerid='.$proposed_answer->answerid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_FAQ_REVIEW."' alt='"._AM_SF_FAQ_REVIEW."'></a> "; |
|
| 128 | + $delete = "<a href='answer.php?op=del&faqid=".$faqObj->faqid().'&answerid='.$proposed_answer->answerid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETESUBM."' alt='"._AM_SF_DELETESUBM."'></a>"; |
|
| 129 | 129 | echo '<tr>'; |
| 130 | - echo "<td class='head' align='center'>" . $proposed_answer->answerid() . '</td>'; |
|
| 131 | - echo "<td class='even' align='left'>" . $proposed_answer->answer() . '</td>'; |
|
| 130 | + echo "<td class='head' align='center'>".$proposed_answer->answerid().'</td>'; |
|
| 131 | + echo "<td class='even' align='left'>".$proposed_answer->answer().'</td>'; |
|
| 132 | 132 | |
| 133 | 133 | //show name of the answer submitter |
| 134 | 134 | $submitter = sf_getLinkedUnameFromId($proposed_answer->uid(), $smartModuleConfig['userealname']); |
| 135 | - echo "<td class='even' align='center'>" . $submitter . '</td>'; |
|
| 135 | + echo "<td class='even' align='center'>".$submitter.'</td>'; |
|
| 136 | 136 | |
| 137 | - echo "<td class='even' align='center'>" . $proposed_answer->datesub() . '</td>'; |
|
| 137 | + echo "<td class='even' align='center'>".$proposed_answer->datesub().'</td>'; |
|
| 138 | 138 | echo "<td class='even' align='center'> $merge $modify $approve $delete </td>"; |
| 139 | 139 | echo '</tr>'; |
| 140 | 140 | } |
@@ -146,17 +146,17 @@ discard block |
||
| 146 | 146 | switch ($op) { |
| 147 | 147 | case 'mod': |
| 148 | 148 | xoops_cp_header(); |
| 149 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 149 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 150 | 150 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts; |
| 151 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
| 151 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
| 152 | 152 | editfaq($faqid); |
| 153 | 153 | break; |
| 154 | 154 | |
| 155 | 155 | case 'selectanswer': |
| 156 | 156 | global $xoopsUser, $_GET, $xoopsModuleConfig; |
| 157 | 157 | |
| 158 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
| 159 | - $answerid = isset($_GET['answerid']) ? (int)$_GET['answerid'] : 0; |
|
| 158 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
| 159 | + $answerid = isset($_GET['answerid']) ? (int) $_GET['answerid'] : 0; |
|
| 160 | 160 | |
| 161 | 161 | // Creating the FAQ object |
| 162 | 162 | $faqObj = new sfFaq($faqid); |
@@ -230,11 +230,11 @@ discard block |
||
| 230 | 230 | case 'del': |
| 231 | 231 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB; |
| 232 | 232 | |
| 233 | - $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : 0; |
|
| 234 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : $faqid; |
|
| 235 | - $answerid = isset($_POST['answerid']) ? (int)$_POST['answerid'] : 0; |
|
| 236 | - $answerid = isset($_GET['answerid']) ? (int)$_GET['answerid'] : $answerid; |
|
| 237 | - $confirm = isset($_POST['confirm']) ? (int)$_POST['confirm'] : 0; |
|
| 233 | + $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : 0; |
|
| 234 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : $faqid; |
|
| 235 | + $answerid = isset($_POST['answerid']) ? (int) $_POST['answerid'] : 0; |
|
| 236 | + $answerid = isset($_GET['answerid']) ? (int) $_GET['answerid'] : $answerid; |
|
| 237 | + $confirm = isset($_POST['confirm']) ? (int) $_POST['confirm'] : 0; |
|
| 238 | 238 | $faqObj = new sfFaq($faqid); |
| 239 | 239 | $answerObj = new sfAnswer($answerid); |
| 240 | 240 | if ($confirm) { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $proposed_answers = $answerHandler->getAllAnswers($faqid, _SF_AN_STATUS_PROPOSED); |
| 254 | 254 | if (count($proposed_answers) > 0) { |
| 255 | 255 | // This question has other proposed answer |
| 256 | - $redirect_page = 'answer.php?op=mod&faqid=' . $faqid; |
|
| 256 | + $redirect_page = 'answer.php?op=mod&faqid='.$faqid; |
|
| 257 | 257 | $redirect_msg = _AM_SF_ANSWER_REJECTED; |
| 258 | 258 | } else { |
| 259 | 259 | // The question has no other proposed answer |
@@ -277,11 +277,11 @@ discard block |
||
| 277 | 277 | default: |
| 278 | 278 | xoops_cp_header(); |
| 279 | 279 | |
| 280 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 280 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 281 | 281 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule; |
| 282 | 282 | |
| 283 | 283 | editfaq(); |
| 284 | 284 | break; |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 287 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -227,149 +227,149 @@ |
||
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | switch ($op) { |
| 230 | - case 'mod': |
|
| 231 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 232 | - $destList = isset($_POST['destList']) ? $_POST['destList'] : ''; |
|
| 233 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 234 | - xoops_cp_header(); |
|
| 235 | - |
|
| 236 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
| 237 | - editcat(true, $categoryid); |
|
| 238 | - break; |
|
| 230 | + case 'mod': |
|
| 231 | + $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 232 | + $destList = isset($_POST['destList']) ? $_POST['destList'] : ''; |
|
| 233 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 234 | + xoops_cp_header(); |
|
| 239 | 235 | |
| 240 | - case 'addcategory': |
|
| 241 | - global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
|
| 236 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
| 237 | + editcat(true, $categoryid); |
|
| 238 | + break; |
|
| 242 | 239 | |
| 243 | - $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 240 | + case 'addcategory': |
|
| 241 | + global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
|
| 244 | 242 | |
| 245 | - if (0 != $categoryid) { |
|
| 246 | - $categoryObj = new sfCategory($categoryid); |
|
| 247 | - } else { |
|
| 248 | - $categoryObj = $categoryHandler->create(); |
|
| 249 | - } |
|
| 243 | + $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 250 | 244 | |
| 251 | - //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
|
| 252 | - //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
|
| 245 | + if (0 != $categoryid) { |
|
| 246 | + $categoryObj = new sfCategory($categoryid); |
|
| 247 | + } else { |
|
| 248 | + $categoryObj = $categoryHandler->create(); |
|
| 249 | + } |
|
| 253 | 250 | |
| 254 | - $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0); |
|
| 255 | - $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0; |
|
| 256 | - $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1); |
|
| 251 | + //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
|
| 252 | + //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
|
| 257 | 253 | |
| 258 | - // Groups and permissions |
|
| 259 | - if (isset($_POST['groups_read'])) { |
|
| 260 | - $categoryObj->setGroups_read($_POST['groups_read']); |
|
| 261 | - } else { |
|
| 262 | - $categoryObj->setGroups_read(); |
|
| 263 | - } |
|
| 264 | - // $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array(); |
|
| 265 | - // $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array(); |
|
| 266 | - |
|
| 267 | - $categoryObj->setVar('name', $_POST['name']); |
|
| 268 | - |
|
| 269 | - $categoryObj->setVar('description', $_POST['description']); |
|
| 270 | - if ($categoryObj->isNew()) { |
|
| 271 | - $redirect_msg = _AM_SF_CATCREATED; |
|
| 272 | - $redirect_to = 'category.php?op=mod'; |
|
| 273 | - } else { |
|
| 274 | - $redirect_msg = _AM_SF_COLMODIFIED; |
|
| 275 | - $redirect_to = 'category.php'; |
|
| 276 | - } |
|
| 254 | + $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0); |
|
| 255 | + $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0; |
|
| 256 | + $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1); |
|
| 277 | 257 | |
| 278 | - if (!$categoryObj->store()) { |
|
| 279 | - redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
| 280 | - } |
|
| 281 | - // TODO : put this function in the category class |
|
| 282 | - sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
|
| 283 | - //sf_saveCategory_Permissions($groups_admin, $categoriesObj->categoryid(), 'category_admin'); |
|
| 258 | + // Groups and permissions |
|
| 259 | + if (isset($_POST['groups_read'])) { |
|
| 260 | + $categoryObj->setGroups_read($_POST['groups_read']); |
|
| 261 | + } else { |
|
| 262 | + $categoryObj->setGroups_read(); |
|
| 263 | + } |
|
| 264 | + // $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array(); |
|
| 265 | + // $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array(); |
|
| 266 | + |
|
| 267 | + $categoryObj->setVar('name', $_POST['name']); |
|
| 268 | + |
|
| 269 | + $categoryObj->setVar('description', $_POST['description']); |
|
| 270 | + if ($categoryObj->isNew()) { |
|
| 271 | + $redirect_msg = _AM_SF_CATCREATED; |
|
| 272 | + $redirect_to = 'category.php?op=mod'; |
|
| 273 | + } else { |
|
| 274 | + $redirect_msg = _AM_SF_COLMODIFIED; |
|
| 275 | + $redirect_to = 'category.php'; |
|
| 276 | + } |
|
| 284 | 277 | |
| 285 | - if ($applyall) { |
|
| 278 | + if (!$categoryObj->store()) { |
|
| 279 | + redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
| 280 | + } |
|
| 286 | 281 | // TODO : put this function in the category class |
| 287 | - sf_overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid()); |
|
| 288 | - } |
|
| 282 | + sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
|
| 283 | + //sf_saveCategory_Permissions($groups_admin, $categoriesObj->categoryid(), 'category_admin'); |
|
| 289 | 284 | |
| 290 | - redirect_header($redirect_to, 2, $redirect_msg); |
|
| 291 | - break; |
|
| 285 | + if ($applyall) { |
|
| 286 | + // TODO : put this function in the category class |
|
| 287 | + sf_overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid()); |
|
| 288 | + } |
|
| 292 | 289 | |
| 293 | - case 'del': |
|
| 294 | - global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET; |
|
| 290 | + redirect_header($redirect_to, 2, $redirect_msg); |
|
| 291 | + break; |
|
| 295 | 292 | |
| 296 | - $module_id = $xoopsModule->getVar('mid'); |
|
| 297 | - $gpermHandler = xoops_getHandler('groupperm'); |
|
| 293 | + case 'del': |
|
| 294 | + global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET; |
|
| 298 | 295 | |
| 299 | - $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 300 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid; |
|
| 296 | + $module_id = $xoopsModule->getVar('mid'); |
|
| 297 | + $gpermHandler = xoops_getHandler('groupperm'); |
|
| 301 | 298 | |
| 302 | - $categoryObj = new sfCategory($categoryid); |
|
| 299 | + $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 300 | + $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid; |
|
| 303 | 301 | |
| 304 | - $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; |
|
| 305 | - $name = isset($_POST['name']) ? $_POST['name'] : ''; |
|
| 302 | + $categoryObj = new sfCategory($categoryid); |
|
| 306 | 303 | |
| 307 | - if ($confirm) { |
|
| 308 | - if (!$categoryHandler->delete($categoryObj)) { |
|
| 309 | - redirect_header('category.php', 1, _AM_SF_DELETE_CAT_ERROR); |
|
| 304 | + $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; |
|
| 305 | + $name = isset($_POST['name']) ? $_POST['name'] : ''; |
|
| 306 | + |
|
| 307 | + if ($confirm) { |
|
| 308 | + if (!$categoryHandler->delete($categoryObj)) { |
|
| 309 | + redirect_header('category.php', 1, _AM_SF_DELETE_CAT_ERROR); |
|
| 310 | + } |
|
| 311 | + redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name)); |
|
| 312 | + } else { |
|
| 313 | + // no confirm: show deletion condition |
|
| 314 | + $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 315 | + xoops_cp_header(); |
|
| 316 | + xoops_confirm([ |
|
| 317 | + 'op' => 'del', |
|
| 318 | + 'categoryid' => $categoryObj->categoryid(), |
|
| 319 | + 'confirm' => 1, |
|
| 320 | + 'name' => $categoryObj->name() |
|
| 321 | + ], 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 322 | + xoops_cp_footer(); |
|
| 310 | 323 | } |
| 311 | - redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name)); |
|
| 312 | - } else { |
|
| 313 | - // no confirm: show deletion condition |
|
| 314 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 324 | + exit(); |
|
| 325 | + break; |
|
| 326 | + |
|
| 327 | + case 'cancel': |
|
| 328 | + redirect_header('category.php', 1, sprintf(_AM_SF_BACK2IDX, '')); |
|
| 329 | + break; |
|
| 330 | + case 'default': |
|
| 331 | + default: |
|
| 332 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 315 | 333 | xoops_cp_header(); |
| 316 | - xoops_confirm([ |
|
| 317 | - 'op' => 'del', |
|
| 318 | - 'categoryid' => $categoryObj->categoryid(), |
|
| 319 | - 'confirm' => 1, |
|
| 320 | - 'name' => $categoryObj->name() |
|
| 321 | - ], 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 322 | - xoops_cp_footer(); |
|
| 323 | - } |
|
| 324 | - exit(); |
|
| 325 | - break; |
|
| 326 | - |
|
| 327 | - case 'cancel': |
|
| 328 | - redirect_header('category.php', 1, sprintf(_AM_SF_BACK2IDX, '')); |
|
| 329 | - break; |
|
| 330 | - case 'default': |
|
| 331 | - default: |
|
| 332 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 333 | - xoops_cp_header(); |
|
| 334 | - |
|
| 335 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
| 336 | - echo "<br>\n"; |
|
| 337 | 334 | |
| 338 | - // Creating the objects for top categories |
|
| 339 | - $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
|
| 340 | - |
|
| 341 | - sf_collapsableBar('toptable', 'toptableicon'); |
|
| 342 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CATEGORIES_TITLE . '</h3>'; |
|
| 343 | - echo "<div id='toptable'>"; |
|
| 344 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>'; |
|
| 345 | - |
|
| 346 | - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
|
| 347 | - echo '<tr>'; |
|
| 348 | - echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 349 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>'; |
|
| 350 | - echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>'; |
|
| 351 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 352 | - echo '</tr>'; |
|
| 353 | - $totalCategories = $categoryHandler->getCategoriesCount(0); |
|
| 354 | - if (count($categoriesObj) > 0) { |
|
| 355 | - foreach ($categoriesObj as $key => $thiscat) { |
|
| 356 | - displayCategory($thiscat); |
|
| 357 | - } |
|
| 358 | - } else { |
|
| 335 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
| 336 | + echo "<br>\n"; |
|
| 337 | + |
|
| 338 | + // Creating the objects for top categories |
|
| 339 | + $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
|
| 340 | + |
|
| 341 | + sf_collapsableBar('toptable', 'toptableicon'); |
|
| 342 | + echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CATEGORIES_TITLE . '</h3>'; |
|
| 343 | + echo "<div id='toptable'>"; |
|
| 344 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>'; |
|
| 345 | + |
|
| 346 | + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
|
| 359 | 347 | echo '<tr>'; |
| 360 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>'; |
|
| 348 | + echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 349 | + echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>'; |
|
| 350 | + echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>'; |
|
| 351 | + echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 361 | 352 | echo '</tr>'; |
| 362 | - $categoryid = '0'; |
|
| 363 | - } |
|
| 364 | - echo "</table>\n"; |
|
| 365 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 366 | - $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
|
| 367 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 368 | - echo '</div>'; |
|
| 353 | + $totalCategories = $categoryHandler->getCategoriesCount(0); |
|
| 354 | + if (count($categoriesObj) > 0) { |
|
| 355 | + foreach ($categoriesObj as $key => $thiscat) { |
|
| 356 | + displayCategory($thiscat); |
|
| 357 | + } |
|
| 358 | + } else { |
|
| 359 | + echo '<tr>'; |
|
| 360 | + echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>'; |
|
| 361 | + echo '</tr>'; |
|
| 362 | + $categoryid = '0'; |
|
| 363 | + } |
|
| 364 | + echo "</table>\n"; |
|
| 365 | + require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 366 | + $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
|
| 367 | + echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 368 | + echo '</div>'; |
|
| 369 | 369 | |
| 370 | - editcat(false); |
|
| 370 | + editcat(false); |
|
| 371 | 371 | |
| 372 | - break; |
|
| 372 | + break; |
|
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | 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 | |
| 11 | 11 | // Creating the category handler object |
| 12 | 12 | $categoryHandler = sf_gethandler('category'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | // Where do we start? |
| 24 | -$startcategory = isset($_GET['startcategory']) ? (int)$_GET['startcategory'] : 0; |
|
| 24 | +$startcategory = isset($_GET['startcategory']) ? (int) $_GET['startcategory'] : 0; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * @param XoopsObject $categoryObj |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | $description = $categoryObj->description(); |
| 34 | 34 | if (!XOOPS_USE_MULTIBYTES) { |
| 35 | 35 | if (strlen($description) >= 100) { |
| 36 | - $description = substr($description, 0, 100 - 1) . '...'; |
|
| 36 | + $description = substr($description, 0, 100-1).'...'; |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | - $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_EDITCOL . "' alt='" . _AM_SF_EDITCOL . "'></a>"; |
|
| 40 | - $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETECOL . "' alt='" . _AM_SF_DELETECOL . "'></a>"; |
|
| 39 | + $modify = "<a href='category.php?op=mod&categoryid=".$categoryObj->categoryid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITCOL."' alt='"._AM_SF_EDITCOL."'></a>"; |
|
| 40 | + $delete = "<a href='category.php?op=del&categoryid=".$categoryObj->categoryid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETECOL."' alt='"._AM_SF_DELETECOL."'></a>"; |
|
| 41 | 41 | |
| 42 | 42 | $spaces = ''; |
| 43 | 43 | for ($j = 0; $j < $level; ++$j) { |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | . "/modules/smartfaq/assets/images/icon/subcat.gif' alt=''> " |
| 59 | 59 | . $categoryObj->name() |
| 60 | 60 | . '</a></td>'; |
| 61 | - echo "<td class='even' align='left'>" . $description . '</td>'; |
|
| 62 | - echo "<td class='even' align='center'>" . $categoryObj->weight() . '</td>'; |
|
| 61 | + echo "<td class='even' align='left'>".$description.'</td>'; |
|
| 62 | + echo "<td class='even' align='center'>".$categoryObj->weight().'</td>'; |
|
| 63 | 63 | echo "<td class='even' align='center'> $modify $delete </td>"; |
| 64 | 64 | echo '</tr>'; |
| 65 | 65 | $subCategoriesObj = $categoryHandler->getCategories(0, 0, $categoryObj->categoryid()); |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | //$moderators = array(); // just to define the variable |
| 82 | 82 | //$allmods = array(); |
| 83 | - $startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0; |
|
| 83 | + $startfaq = isset($_GET['startfaq']) ? (int) $_GET['startfaq'] : 0; |
|
| 84 | 84 | global $categoryHandler, $xoopsUser, $xoopsUser, $myts, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $_GET; |
| 85 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 85 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 86 | 86 | |
| 87 | 87 | // Creating the faq handler object |
| 88 | 88 | $faqHandler = sf_gethandler('faq'); |
@@ -104,13 +104,13 @@ discard block |
||
| 104 | 104 | redirect_header('category.php', 1, _AM_SF_NOCOLTOEDIT); |
| 105 | 105 | } |
| 106 | 106 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 107 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_EDITCOL . '</h3>'; |
|
| 107 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_EDITCOL.'</h3>'; |
|
| 108 | 108 | echo "<div id='bottomtable'>"; |
| 109 | 109 | } else { |
| 110 | 110 | $categoryObj = $categoryHandler->create(); |
| 111 | 111 | echo "<br>\n"; |
| 112 | 112 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 113 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CATEGORY_CREATE . '</h3>'; |
|
| 113 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_CATEGORY_CREATE.'</h3>'; |
|
| 114 | 114 | echo "<div id='bottomtable'>"; |
| 115 | 115 | } |
| 116 | 116 | // Start category form |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | } |
| 156 | 156 | $sform->addElement($groups_read_checkbox); |
| 157 | 157 | // Apply permissions on all faqs |
| 158 | - $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 158 | + $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 159 | 159 | $sform->addElement($addapplyall_radio); |
| 160 | 160 | // MODERATORS |
| 161 | 161 | //$moderators_tray = new XoopsFormElementTray(_AM_SF_MODERATORS_DEF, ''); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | echo '</div>'; |
| 221 | 221 | |
| 222 | 222 | if ($categoryid) { |
| 223 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/displayfaqs.php'; |
|
| 223 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/displayfaqs.php'; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | unset($hidden); |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | |
| 229 | 229 | switch ($op) { |
| 230 | 230 | case 'mod': |
| 231 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 231 | + $categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0; |
|
| 232 | 232 | $destList = isset($_POST['destList']) ? $_POST['destList'] : ''; |
| 233 | 233 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 234 | 234 | xoops_cp_header(); |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | case 'addcategory': |
| 241 | 241 | global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
| 242 | 242 | |
| 243 | - $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 243 | + $categoryid = isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0; |
|
| 244 | 244 | |
| 245 | 245 | if (0 != $categoryid) { |
| 246 | 246 | $categoryObj = new sfCategory($categoryid); |
@@ -251,9 +251,9 @@ discard block |
||
| 251 | 251 | //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
| 252 | 252 | //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
| 253 | 253 | |
| 254 | - $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0); |
|
| 255 | - $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0; |
|
| 256 | - $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1); |
|
| 254 | + $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int) $_POST['parentid'] : 0); |
|
| 255 | + $applyall = isset($_POST['applyall']) ? (int) $_POST['applyall'] : 0; |
|
| 256 | + $categoryObj->setVar('weight', isset($_POST['weight']) ? (int) $_POST['weight'] : 1); |
|
| 257 | 257 | |
| 258 | 258 | // Groups and permissions |
| 259 | 259 | if (isset($_POST['groups_read'])) { |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | if (!$categoryObj->store()) { |
| 279 | - redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
| 279 | + redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR.sf_formatErrors($categoryObj->getErrors())); |
|
| 280 | 280 | } |
| 281 | 281 | // TODO : put this function in the category class |
| 282 | 282 | sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
@@ -296,8 +296,8 @@ discard block |
||
| 296 | 296 | $module_id = $xoopsModule->getVar('mid'); |
| 297 | 297 | $gpermHandler = xoops_getHandler('groupperm'); |
| 298 | 298 | |
| 299 | - $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 300 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid; |
|
| 299 | + $categoryid = isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0; |
|
| 300 | + $categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : $categoryid; |
|
| 301 | 301 | |
| 302 | 302 | $categoryObj = new sfCategory($categoryid); |
| 303 | 303 | |
@@ -311,14 +311,14 @@ discard block |
||
| 311 | 311 | redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name)); |
| 312 | 312 | } else { |
| 313 | 313 | // no confirm: show deletion condition |
| 314 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 314 | + $categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0; |
|
| 315 | 315 | xoops_cp_header(); |
| 316 | 316 | xoops_confirm([ |
| 317 | 317 | 'op' => 'del', |
| 318 | 318 | 'categoryid' => $categoryObj->categoryid(), |
| 319 | 319 | 'confirm' => 1, |
| 320 | 320 | 'name' => $categoryObj->name() |
| 321 | - ], 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 321 | + ], 'category.php', _AM_SF_DELETECOL." '".$categoryObj->name()."'. <br> <br>"._AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 322 | 322 | xoops_cp_footer(); |
| 323 | 323 | } |
| 324 | 324 | exit(); |
@@ -339,16 +339,16 @@ discard block |
||
| 339 | 339 | $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
| 340 | 340 | |
| 341 | 341 | sf_collapsableBar('toptable', 'toptableicon'); |
| 342 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CATEGORIES_TITLE . '</h3>'; |
|
| 342 | + echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_CATEGORIES_TITLE.'</h3>'; |
|
| 343 | 343 | echo "<div id='toptable'>"; |
| 344 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>'; |
|
| 344 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_CATEGORIES_DSC.'</span>'; |
|
| 345 | 345 | |
| 346 | 346 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 347 | 347 | echo '<tr>'; |
| 348 | - echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 349 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>'; |
|
| 350 | - echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>'; |
|
| 351 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 348 | + echo "<th width='35%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>'; |
|
| 349 | + echo "<th class='bg3' align='left'><b>"._AM_SF_DESCRIP.'</b></td>'; |
|
| 350 | + echo "<th class='bg3' width='65' align='center'><b>"._AM_SF_WEIGHT.'</b></td>'; |
|
| 351 | + echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
| 352 | 352 | echo '</tr>'; |
| 353 | 353 | $totalCategories = $categoryHandler->getCategoriesCount(0); |
| 354 | 354 | if (count($categoriesObj) > 0) { |
@@ -357,14 +357,14 @@ discard block |
||
| 357 | 357 | } |
| 358 | 358 | } else { |
| 359 | 359 | echo '<tr>'; |
| 360 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>'; |
|
| 360 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOCAT.'</td>'; |
|
| 361 | 361 | echo '</tr>'; |
| 362 | 362 | $categoryid = '0'; |
| 363 | 363 | } |
| 364 | 364 | echo "</table>\n"; |
| 365 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 365 | + require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 366 | 366 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
| 367 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 367 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
| 368 | 368 | echo '</div>'; |
| 369 | 369 | |
| 370 | 370 | editcat(false); |
@@ -372,4 +372,4 @@ discard block |
||
| 372 | 372 | break; |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 375 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -28,46 +28,46 @@ discard block |
||
| 28 | 28 | if (empty($fct)) { |
| 29 | 29 | $fct = 'preferences'; |
| 30 | 30 | } |
| 31 | -include __DIR__ . '/../../../mainfile.php'; |
|
| 32 | -include XOOPS_ROOT_PATH . '/include/cp_functions.php'; |
|
| 31 | +include __DIR__.'/../../../mainfile.php'; |
|
| 32 | +include XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
| 33 | 33 | |
| 34 | -require_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
| 34 | +require_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
| 35 | 35 | |
| 36 | 36 | $admintest = 0; |
| 37 | 37 | |
| 38 | 38 | if (is_object($xoopsUser)) { |
| 39 | 39 | $xoopsModule = XoopsModule::getByDirname('system'); |
| 40 | 40 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
| 41 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
| 41 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
| 42 | 42 | } |
| 43 | 43 | $admintest = 1; |
| 44 | 44 | } else { |
| 45 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
| 45 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // include system category definitions |
| 49 | -require_once XOOPS_ROOT_PATH . '/modules/system/constants.php'; |
|
| 49 | +require_once XOOPS_ROOT_PATH.'/modules/system/constants.php'; |
|
| 50 | 50 | $error = false; |
| 51 | 51 | if (0 != $admintest) { |
| 52 | 52 | if (isset($fct) && '' != $fct) { |
| 53 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) { |
|
| 54 | - require_once XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin.php'; |
|
| 53 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php')) { |
|
| 54 | + require_once XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin.php'; |
|
| 55 | 55 | |
| 56 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php')) { |
|
| 57 | - include XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php'; |
|
| 58 | - } elseif (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php')) { |
|
| 59 | - include XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php'; |
|
| 56 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php')) { |
|
| 57 | + include XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php'; |
|
| 58 | + } elseif (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php')) { |
|
| 59 | + include XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php'; |
|
| 60 | 60 | } |
| 61 | - include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php'; |
|
| 61 | + include XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php'; |
|
| 62 | 62 | $syspermHandler = xoops_getHandler('groupperm'); |
| 63 | - $category = !empty($modversion['category']) ? (int)$modversion['category'] : 0; |
|
| 63 | + $category = !empty($modversion['category']) ? (int) $modversion['category'] : 0; |
|
| 64 | 64 | unset($modversion); |
| 65 | 65 | if ($category > 0) { |
| 66 | - $groups =& $xoopsUser->getGroups(); |
|
| 66 | + $groups = & $xoopsUser->getGroups(); |
|
| 67 | 67 | if (in_array(XOOPS_GROUP_ADMIN, $groups) |
| 68 | 68 | || false !== $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { |
| 69 | 69 | if (file_exists("../include/{$fct}.inc.php")) { |
| 70 | - require_once __DIR__ . "/../include/{$fct}.inc.php"; |
|
| 70 | + require_once __DIR__."/../include/{$fct}.inc.php"; |
|
| 71 | 71 | } else { |
| 72 | 72 | $error = true; |
| 73 | 73 | } |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | $error = true; |
| 76 | 76 | } |
| 77 | 77 | } elseif ('version' === $fct) { |
| 78 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) { |
|
| 79 | - require_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php'; |
|
| 78 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php')) { |
|
| 79 | + require_once XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php'; |
|
| 80 | 80 | } else { |
| 81 | 81 | $error = true; |
| 82 | 82 | } |
@@ -100,22 +100,22 @@ discard block |
||
| 100 | 100 | $all_ok = false; |
| 101 | 101 | if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { |
| 102 | 102 | $syspermHandler = xoops_getHandler('groupperm'); |
| 103 | - $ok_syscats =& $syspermHandler->getItemIds('system_admin', $groups); |
|
| 103 | + $ok_syscats = & $syspermHandler->getItemIds('system_admin', $groups); |
|
| 104 | 104 | } else { |
| 105 | 105 | $all_ok = true; |
| 106 | 106 | } |
| 107 | - $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; |
|
| 107 | + $admin_dir = XOOPS_ROOT_PATH.'/modules/system/admin'; |
|
| 108 | 108 | $handle = opendir($admin_dir); |
| 109 | 109 | $counter = 0; |
| 110 | 110 | $class = 'even'; |
| 111 | 111 | while ($file = readdir($handle)) { |
| 112 | - if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) { |
|
| 113 | - include $admin_dir . '/' . $file . '/xoops_version.php'; |
|
| 112 | + if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir.'/'.$file)) { |
|
| 113 | + include $admin_dir.'/'.$file.'/xoops_version.php'; |
|
| 114 | 114 | if ($modversion['hasAdmin']) { |
| 115 | - $category = isset($modversion['category']) ? (int)$modversion['category'] : 0; |
|
| 115 | + $category = isset($modversion['category']) ? (int) $modversion['category'] : 0; |
|
| 116 | 116 | if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) { |
| 117 | 117 | echo "<td class='$class' align='center' valign='bottom' width='19%'>"; |
| 118 | - echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n"; |
|
| 118 | + echo "<a href='".XOOPS_URL.'/modules/system/admin.php?fct='.$file."'><b>".trim($modversion['name'])."</b></a>\n"; |
|
| 119 | 119 | echo '</td>'; |
| 120 | 120 | ++$counter; |
| 121 | 121 | $class = ('even' === $class) ? 'odd' : 'even'; |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | while ($counter < 5) { |
| 133 | - echo '<td class="' . $class . '"> </td>'; |
|
| 133 | + echo '<td class="'.$class.'"> </td>'; |
|
| 134 | 134 | $class = ('even' === $class) ? 'odd' : 'even'; |
| 135 | 135 | ++$counter; |
| 136 | 136 | } |
@@ -21,47 +21,47 @@ |
||
| 21 | 21 | $adminmenu[] = [ |
| 22 | 22 | 'title' => _AM_MODULEADMIN_HOME, |
| 23 | 23 | 'link' => 'admin/index.php', |
| 24 | - 'icon' => $pathIcon32 . '/home.png', |
|
| 24 | + 'icon' => $pathIcon32.'/home.png', |
|
| 25 | 25 | ]; |
| 26 | 26 | |
| 27 | 27 | $adminmenu[] = [ |
| 28 | 28 | 'title' => _MI_SF_ADMENU1, |
| 29 | 29 | 'link' => 'admin/main.php', |
| 30 | - 'icon' => $pathIcon32 . '/manage.png', |
|
| 30 | + 'icon' => $pathIcon32.'/manage.png', |
|
| 31 | 31 | ]; |
| 32 | 32 | |
| 33 | 33 | $adminmenu[] = [ |
| 34 | 34 | 'title' => _MI_SF_ADMENU2, |
| 35 | 35 | 'link' => 'admin/category.php', |
| 36 | - 'icon' => $pathIcon32 . '/category.png', |
|
| 36 | + 'icon' => $pathIcon32.'/category.png', |
|
| 37 | 37 | ]; |
| 38 | 38 | |
| 39 | 39 | $adminmenu[] = [ |
| 40 | 40 | 'title' => _MI_SF_ADMENU3, |
| 41 | 41 | 'link' => 'admin/faq.php', |
| 42 | - 'icon' => $pathIcon32 . '/search.png', |
|
| 42 | + 'icon' => $pathIcon32.'/search.png', |
|
| 43 | 43 | ]; |
| 44 | 44 | |
| 45 | 45 | $adminmenu[] = [ |
| 46 | 46 | 'title' => _MI_SF_ADMENU4, |
| 47 | 47 | 'link' => 'admin/question.php', |
| 48 | - 'icon' => $pathIcon32 . '/faq.png', |
|
| 48 | + 'icon' => $pathIcon32.'/faq.png', |
|
| 49 | 49 | ]; |
| 50 | 50 | |
| 51 | 51 | $adminmenu[] = [ |
| 52 | 52 | 'title' => _MI_SF_ADMENU5, |
| 53 | 53 | 'link' => 'admin/permissions.php', |
| 54 | - 'icon' => $pathIcon32 . '/permissions.png', |
|
| 54 | + 'icon' => $pathIcon32.'/permissions.png', |
|
| 55 | 55 | ]; |
| 56 | 56 | |
| 57 | 57 | $adminmenu[] = [ |
| 58 | 58 | 'title' => _MI_SF_ADMENU8, |
| 59 | 59 | 'link' => 'admin/import.php', |
| 60 | - 'icon' => $pathIcon32 . '/download.png', |
|
| 60 | + 'icon' => $pathIcon32.'/download.png', |
|
| 61 | 61 | ]; |
| 62 | 62 | |
| 63 | 63 | $adminmenu[] = [ |
| 64 | 64 | 'title' => _AM_MODULEADMIN_ABOUT, |
| 65 | 65 | 'link' => 'admin/about.php', |
| 66 | - 'icon' => $pathIcon32 . '/about.png', |
|
| 66 | + 'icon' => $pathIcon32.'/about.png', |
|
| 67 | 67 | ]; |
@@ -6,16 +6,16 @@ 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 | -$faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : 0; |
|
| 12 | +$faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : 0; |
|
| 13 | 13 | |
| 14 | 14 | //$pick = isset($_GET['pick'])? (int)($_GET['pick']) : 0; |
| 15 | 15 | //$pick = isset($_POST['pick'])? (int)($_POST['pick']) : $_GET['pick']; |
| 16 | 16 | |
| 17 | -$statussel = isset($_GET['statussel']) ? (int)$_GET['statussel'] : _SF_STATUS_ALL; |
|
| 18 | -$statussel = isset($_POST['statussel']) ? (int)$_POST['statussel'] : $statussel; |
|
| 17 | +$statussel = isset($_GET['statussel']) ? (int) $_GET['statussel'] : _SF_STATUS_ALL; |
|
| 18 | +$statussel = isset($_POST['statussel']) ? (int) $_POST['statussel'] : $statussel; |
|
| 19 | 19 | |
| 20 | 20 | $sortsel = isset($_GET['sortsel']) ? $_GET['sortsel'] : 'faqid'; |
| 21 | 21 | $sortsel = isset($_POST['sortsel']) ? $_POST['sortsel'] : $sortsel; |
@@ -32,23 +32,23 @@ discard block |
||
| 32 | 32 | global $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
| 33 | 33 | echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>"; |
| 34 | 34 | echo '<tr>'; |
| 35 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_FAQID . '</b></td>'; |
|
| 36 | - echo "<th width='20%' class='bg3' align='center'><b>" . _AM_SF_FAQCAT . '</b></td>'; |
|
| 37 | - echo "<th class='bg3' align='center'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
| 35 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_FAQID.'</b></td>'; |
|
| 36 | + echo "<th width='20%' class='bg3' align='center'><b>"._AM_SF_FAQCAT.'</b></td>'; |
|
| 37 | + echo "<th class='bg3' align='center'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
| 38 | 38 | |
| 39 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
| 40 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
| 39 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
| 40 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
| 41 | 41 | |
| 42 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
| 43 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_STATUS . '</b></td>'; |
|
| 42 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
| 43 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_STATUS.'</b></td>'; |
|
| 44 | 44 | //echo "<td width='30' class='bg3' align='center'><b>" . _AM_SF_ANSWERS . "</b></td>"; |
| 45 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 45 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
| 46 | 46 | echo '</tr>'; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | // Code for the page |
| 50 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
| 51 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 50 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
| 51 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 52 | 52 | |
| 53 | 53 | // Creating the category handler object |
| 54 | 54 | $categoryHandler = sf_gethandler('category'); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | // Creating the FAQ handler object |
| 57 | 57 | $faqHandler = sf_gethandler('faq'); |
| 58 | 58 | |
| 59 | -$startentry = isset($_GET['startentry']) ? (int)$_GET['startentry'] : 0; |
|
| 59 | +$startentry = isset($_GET['startentry']) ? (int) $_GET['startentry'] : 0; |
|
| 60 | 60 | |
| 61 | 61 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 62 | 62 | xoops_cp_header(); |
@@ -129,9 +129,9 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | // Construction of lower table |
| 131 | 131 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 132 | -echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_ALLFAQS . '</h3>'; |
|
| 132 | +echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_ALLFAQS.'</h3>'; |
|
| 133 | 133 | echo "<div id='bottomtable'>"; |
| 134 | -echo '<span style="color: #567; margin: 3px 0 18px 0; font-size: small; display: block; ">' . _AM_SF_ALLFAQSMSG . '</span>'; |
|
| 134 | +echo '<span style="color: #567; margin: 3px 0 18px 0; font-size: small; display: block; ">'._AM_SF_ALLFAQSMSG.'</span>'; |
|
| 135 | 135 | |
| 136 | 136 | $showingtxt = ''; |
| 137 | 137 | $selectedtxt = ''; |
@@ -200,98 +200,98 @@ discard block |
||
| 200 | 200 | case _SF_STATUS_ASKED: |
| 201 | 201 | $selectedtxt1 = 'selected'; |
| 202 | 202 | $caption = _AM_SF_ASKED; |
| 203 | - $cond = ' WHERE status = ' . _SF_STATUS_ASKED . ' '; |
|
| 203 | + $cond = ' WHERE status = '._SF_STATUS_ASKED.' '; |
|
| 204 | 204 | $status_explaination = _AM_SF_ASKED_EXP; |
| 205 | 205 | break; |
| 206 | 206 | |
| 207 | 207 | case _SF_STATUS_OPENED: |
| 208 | 208 | $selectedtxt2 = 'selected'; |
| 209 | 209 | $caption = _AM_SF_OPENED; |
| 210 | - $cond = ' WHERE status = ' . _SF_STATUS_OPENED . ' '; |
|
| 210 | + $cond = ' WHERE status = '._SF_STATUS_OPENED.' '; |
|
| 211 | 211 | $status_explaination = _AM_SF_OPENED_EXP; |
| 212 | 212 | break; |
| 213 | 213 | |
| 214 | 214 | case _SF_STATUS_ANSWERED: |
| 215 | 215 | $selectedtxt3 = 'selected'; |
| 216 | 216 | $caption = _AM_SF_ANSWERED; |
| 217 | - $cond = ' WHERE status = ' . _SF_STATUS_ANSWERED . ' '; |
|
| 217 | + $cond = ' WHERE status = '._SF_STATUS_ANSWERED.' '; |
|
| 218 | 218 | $status_explaination = _AM_SF_ANSWERED_EXP; |
| 219 | 219 | break; |
| 220 | 220 | |
| 221 | 221 | case _SF_STATUS_SUBMITTED: |
| 222 | 222 | $selectedtxt4 = 'selected'; |
| 223 | 223 | $caption = _AM_SF_SUBMITTED; |
| 224 | - $cond = ' WHERE status = ' . _SF_STATUS_SUBMITTED . ' '; |
|
| 224 | + $cond = ' WHERE status = '._SF_STATUS_SUBMITTED.' '; |
|
| 225 | 225 | $status_explaination = _AM_SF_SUBMITTED_EXP; |
| 226 | 226 | break; |
| 227 | 227 | |
| 228 | 228 | case _SF_STATUS_PUBLISHED: |
| 229 | 229 | $selectedtxt5 = 'selected'; |
| 230 | 230 | $caption = _AM_SF_PUBLISHED; |
| 231 | - $cond = ' WHERE status = ' . _SF_STATUS_PUBLISHED . ' '; |
|
| 231 | + $cond = ' WHERE status = '._SF_STATUS_PUBLISHED.' '; |
|
| 232 | 232 | $status_explaination = _AM_SF_PUBLISHED_EXP; |
| 233 | 233 | break; |
| 234 | 234 | |
| 235 | 235 | case _SF_STATUS_NEW_ANSWER: |
| 236 | 236 | $selectedtxt6 = 'selected'; |
| 237 | 237 | $caption = _AM_SF_NEW_ANSWER; |
| 238 | - $cond = ' WHERE status = ' . _SF_STATUS_NEW_ANSWER . ' '; |
|
| 238 | + $cond = ' WHERE status = '._SF_STATUS_NEW_ANSWER.' '; |
|
| 239 | 239 | $status_explaination = _AM_SF_NEW_ANSWER_EXP; |
| 240 | 240 | break; |
| 241 | 241 | |
| 242 | 242 | case _SF_STATUS_OFFLINE: |
| 243 | 243 | $selectedtxt7 = 'selected'; |
| 244 | 244 | $caption = _AM_SF_OFFLINE; |
| 245 | - $cond = ' WHERE status = ' . _SF_STATUS_OFFLINE . ' '; |
|
| 245 | + $cond = ' WHERE status = '._SF_STATUS_OFFLINE.' '; |
|
| 246 | 246 | $status_explaination = _AM_SF_OFFLINE_EXP; |
| 247 | 247 | break; |
| 248 | 248 | |
| 249 | 249 | case _SF_STATUS_REJECTED_QUESTION: |
| 250 | 250 | $selectedtxt8 = 'selected'; |
| 251 | 251 | $caption = _AM_SF_REJECTED_QUESTION; |
| 252 | - $cond = ' WHERE status = ' . _SF_STATUS_REJECTED_QUESTION . ' '; |
|
| 252 | + $cond = ' WHERE status = '._SF_STATUS_REJECTED_QUESTION.' '; |
|
| 253 | 253 | $status_explaination = _AM_SF_REJECTED_QUESTION_EXP; |
| 254 | 254 | break; |
| 255 | 255 | |
| 256 | 256 | case _SF_STATUS_REJECTED_SMARTFAQ: |
| 257 | 257 | $selectedtxt9 = 'selected'; |
| 258 | 258 | $caption = _AM_SF_REJECTED_SMARTFAQ; |
| 259 | - $cond = ' WHERE status = ' . _SF_STATUS_REJECTED_SMARTFAQ . ' '; |
|
| 259 | + $cond = ' WHERE status = '._SF_STATUS_REJECTED_SMARTFAQ.' '; |
|
| 260 | 260 | $status_explaination = _AM_SF_REJECTED_SMARTFAQ_EXP; |
| 261 | 261 | break; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | /* -- Code to show selected terms -- */ |
| 265 | -echo "<form name='pick' id='pick' action='" . $_SERVER['PHP_SELF'] . "' method='POST' style='margin: 0;'>"; |
|
| 265 | +echo "<form name='pick' id='pick' action='".$_SERVER['PHP_SELF']."' method='POST' style='margin: 0;'>"; |
|
| 266 | 266 | |
| 267 | 267 | echo " |
| 268 | 268 | <table width='100%' cellspacing='1' cellpadding='2' border='0' style='border-left: 1px solid silver; border-top: 1px solid silver; border-right: 1px solid silver;'> |
| 269 | 269 | <tr> |
| 270 | - <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING . ' ' . $caption . "</span></td> |
|
| 271 | - <td align='right'>" . _AM_SF_SELECT_SORT . " |
|
| 270 | + <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING.' '.$caption."</span></td> |
|
| 271 | + <td align='right'>" . _AM_SF_SELECT_SORT." |
|
| 272 | 272 | <select name='sortsel' onchange='submit()'> |
| 273 | - <option value='faq.faqid' $sorttxtfaqid>" . _AM_SF_ID . "</option> |
|
| 274 | - <option value='category.name' $sorttxtcategory>" . _AM_SF_CATEGORY . "</option> |
|
| 275 | - <option value='faq.question' $sorttxtquestion>" . _AM_SF_QUESTION . "</option> |
|
| 276 | - <option value='faq.datesub' $sorttxtcreated>" . _AM_SF_CREATED . "</option> |
|
| 277 | - <option value='faq.weight' $sorttxtweight>" . _AM_SF_WEIGHT . "</option> |
|
| 273 | + <option value='faq.faqid' $sorttxtfaqid>"._AM_SF_ID."</option> |
|
| 274 | + <option value='category.name' $sorttxtcategory>"._AM_SF_CATEGORY."</option> |
|
| 275 | + <option value='faq.question' $sorttxtquestion>"._AM_SF_QUESTION."</option> |
|
| 276 | + <option value='faq.datesub' $sorttxtcreated>"._AM_SF_CREATED."</option> |
|
| 277 | + <option value='faq.weight' $sorttxtweight>"._AM_SF_WEIGHT."</option> |
|
| 278 | 278 | </select> |
| 279 | 279 | <select name='ordersel' onchange='submit()'> |
| 280 | - <option value='ASC' $ordertxtasc>" . _AM_SF_ASC . "</option> |
|
| 281 | - <option value='DESC' $ordertxtdesc>" . _AM_SF_DESC . '</option> |
|
| 280 | + <option value='ASC' $ordertxtasc>"._AM_SF_ASC."</option> |
|
| 281 | + <option value='DESC' $ordertxtdesc>"._AM_SF_DESC.'</option> |
|
| 282 | 282 | </select> |
| 283 | - ' . _AM_SF_SELECT_STATUS . " : |
|
| 283 | + ' . _AM_SF_SELECT_STATUS." : |
|
| 284 | 284 | <select name='statussel' onchange='submit()'> |
| 285 | - <option value='0' $selectedtxt0>" . _AM_SF_ALL . " [$totalfaqs]</option> |
|
| 286 | - <option value='1' $selectedtxt1>" . _AM_SF_ASKED . " [$totalasked]</option> |
|
| 287 | - <option value='2' $selectedtxt2>" . _AM_SF_OPENED . " [$totalopened]</option> |
|
| 288 | - <option value='3' $selectedtxt3>" . _AM_SF_ANSWERED . " [$totalanswered]</option> |
|
| 289 | - <option value='4' $selectedtxt4>" . _AM_SF_SUBMITTED . " [$totalsubmitted]</option> |
|
| 290 | - <option value='5' $selectedtxt5>" . _AM_SF_PUBLISHED . " [$totalpublished]</option> |
|
| 291 | - <option value='6' $selectedtxt6>" . _AM_SF_NEWANSWER . " [$totalnewanswers]</option> |
|
| 292 | - <option value='7' $selectedtxt7>" . _AM_SF_OFFLINE . " [$totaloffline]</option> |
|
| 293 | - <option value='8' $selectedtxt8>" . _AM_SF_REJECTED_QUESTION . " [$totalrejectedquestion]</option> |
|
| 294 | - <option value='9' $selectedtxt9>" . _AM_SF_REJECTED_SMARTFAQ . " [$totalrejectedsmartfaq]</option> |
|
| 285 | + <option value='0' $selectedtxt0>"._AM_SF_ALL." [$totalfaqs]</option> |
|
| 286 | + <option value='1' $selectedtxt1>"._AM_SF_ASKED." [$totalasked]</option> |
|
| 287 | + <option value='2' $selectedtxt2>"._AM_SF_OPENED." [$totalopened]</option> |
|
| 288 | + <option value='3' $selectedtxt3>"._AM_SF_ANSWERED." [$totalanswered]</option> |
|
| 289 | + <option value='4' $selectedtxt4>"._AM_SF_SUBMITTED." [$totalsubmitted]</option> |
|
| 290 | + <option value='5' $selectedtxt5>"._AM_SF_PUBLISHED." [$totalpublished]</option> |
|
| 291 | + <option value='6' $selectedtxt6>"._AM_SF_NEWANSWER." [$totalnewanswers]</option> |
|
| 292 | + <option value='7' $selectedtxt7>"._AM_SF_OFFLINE." [$totaloffline]</option> |
|
| 293 | + <option value='8' $selectedtxt8>"._AM_SF_REJECTED_QUESTION." [$totalrejectedquestion]</option> |
|
| 294 | + <option value='9' $selectedtxt9>"._AM_SF_REJECTED_SMARTFAQ." [$totalrejectedsmartfaq]</option> |
|
| 295 | 295 | </select> |
| 296 | 296 | </td> |
| 297 | 297 | </tr> |
@@ -329,65 +329,65 @@ discard block |
||
| 329 | 329 | switch ($faqsObj[$i]->status()) { |
| 330 | 330 | case _SF_STATUS_ASKED: |
| 331 | 331 | $statustxt = _AM_SF_ASKED; |
| 332 | - $approve = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/on.png' . "' title='" . _AM_SF_QUESTION_MODERATE . "' alt='" . _AM_SF_QUESTION_MODERATE . "'></a> "; |
|
| 332 | + $approve = "<a href='question.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/on.png'."' title='"._AM_SF_QUESTION_MODERATE."' alt='"._AM_SF_QUESTION_MODERATE."'></a> "; |
|
| 333 | 333 | $modify = ''; |
| 334 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
| 334 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
| 335 | 335 | break; |
| 336 | 336 | |
| 337 | 337 | case _SF_STATUS_OPENED: |
| 338 | 338 | $statustxt = _AM_SF_OPENED; |
| 339 | 339 | $approve = ''; |
| 340 | - $modify = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_QUESTION_EDIT . "' alt='" . _AM_SF_QUESTION_EDIT . "'></a> "; |
|
| 341 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
| 340 | + $modify = "<a href='question.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_QUESTION_EDIT."' alt='"._AM_SF_QUESTION_EDIT."'></a> "; |
|
| 341 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
| 342 | 342 | break; |
| 343 | 343 | |
| 344 | 344 | case _SF_STATUS_ANSWERED: |
| 345 | 345 | $statustxt = _AM_SF_ANSWERED; |
| 346 | - $approve = "<a href='answer.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/approve.gif' title='" . _AM_SF_ANSWERED_MODERATE . "' alt='" . _AM_SF_ANSWERED_MODERATE . "'></a> "; |
|
| 346 | + $approve = "<a href='answer.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/approve.gif' title='"._AM_SF_ANSWERED_MODERATE."' alt='"._AM_SF_ANSWERED_MODERATE."'></a> "; |
|
| 347 | 347 | $modify = ''; |
| 348 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/delete.gif' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
| 348 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/delete.gif' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
| 349 | 349 | break; |
| 350 | 350 | |
| 351 | 351 | case _SF_STATUS_SUBMITTED: |
| 352 | 352 | $statustxt = _AM_SF_SUBMITTED; |
| 353 | - $approve = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/approve.gif' title='" . _AM_SF_SUBMISSION_MODERATE . "' alt='" . _AM_SF_SUBMISSION_MODERATE . "'></a> "; |
|
| 354 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
| 353 | + $approve = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/approve.gif' title='"._AM_SF_SUBMISSION_MODERATE."' alt='"._AM_SF_SUBMISSION_MODERATE."'></a> "; |
|
| 354 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/delete.gif' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
| 355 | 355 | $modify = ''; |
| 356 | 356 | break; |
| 357 | 357 | |
| 358 | 358 | case _SF_STATUS_PUBLISHED: |
| 359 | 359 | $statustxt = _AM_SF_PUBLISHED; |
| 360 | 360 | $approve = ''; |
| 361 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "'></a> "; |
|
| 362 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
| 361 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_FAQ_EDIT."' alt='"._AM_SF_FAQ_EDIT."'></a> "; |
|
| 362 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
| 363 | 363 | break; |
| 364 | 364 | |
| 365 | 365 | case _SF_STATUS_NEW_ANSWER: |
| 366 | 366 | $statustxt = _AM_SF_NEWANSWER; |
| 367 | - $approve = "<a href='answer.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/approve.gif' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "'></a> "; |
|
| 368 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
| 367 | + $approve = "<a href='answer.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/approve.gif' title='"._AM_SF_FAQ_EDIT."' alt='"._AM_SF_FAQ_EDIT."'></a> "; |
|
| 368 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/delete.gif' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
| 369 | 369 | $modify = ''; |
| 370 | 370 | break; |
| 371 | 371 | |
| 372 | 372 | case _SF_STATUS_OFFLINE: |
| 373 | 373 | $statustxt = _AM_SF_OFFLINE; |
| 374 | 374 | $approve = ''; |
| 375 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "'></a> "; |
|
| 376 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
| 375 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_FAQ_EDIT."' alt='"._AM_SF_FAQ_EDIT."'></a> "; |
|
| 376 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
| 377 | 377 | break; |
| 378 | 378 | |
| 379 | 379 | case _SF_STATUS_REJECTED_QUESTION: |
| 380 | 380 | $statustxt = _AM_SF_REJECTED_QUESTION; |
| 381 | 381 | $approve = ''; |
| 382 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_REJECTED_EDIT . "' alt='" . _AM_SF_REJECTED_EDIT . "'></a> "; |
|
| 383 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
| 382 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_REJECTED_EDIT."' alt='"._AM_SF_REJECTED_EDIT."'></a> "; |
|
| 383 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
| 384 | 384 | break; |
| 385 | 385 | |
| 386 | 386 | case _SF_STATUS_REJECTED_SMARTFAQ: |
| 387 | 387 | $statustxt = _AM_SF_REJECTED_SMARTFAQ; |
| 388 | 388 | $approve = ''; |
| 389 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_REJECTED_EDIT . "' alt='" . _AM_SF_REJECTED_EDIT . "'></a> "; |
|
| 390 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
| 389 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_REJECTED_EDIT."' alt='"._AM_SF_REJECTED_EDIT."'></a> "; |
|
| 390 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
| 391 | 391 | break; |
| 392 | 392 | |
| 393 | 393 | case 'default': |
@@ -401,14 +401,14 @@ discard block |
||
| 401 | 401 | //$modify = "<a href='faq.php?op=mod&faqid=" . $faqid . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/edit.gif' alt='" . _AM_SF_EDITART . "'></a> "; |
| 402 | 402 | |
| 403 | 403 | echo '<tr>'; |
| 404 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>'; |
|
| 405 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
| 406 | - echo "<td class='even' align='left'>" . $faqsObj[$i]->question(100) . '</td>'; |
|
| 404 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid().'</td>'; |
|
| 405 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
| 406 | + echo "<td class='even' align='left'>".$faqsObj[$i]->question(100).'</td>'; |
|
| 407 | 407 | |
| 408 | 408 | //mb--------------------------------------- |
| 409 | 409 | //adding name of the Question Submitter |
| 410 | 410 | $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
| 411 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
| 411 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
| 412 | 412 | |
| 413 | 413 | //adding name of the Answer Submitter |
| 414 | 414 | |
@@ -431,20 +431,20 @@ discard block |
||
| 431 | 431 | } else { |
| 432 | 432 | $answerSubmitter = '--------'; |
| 433 | 433 | } |
| 434 | - echo "<td class='even' align='center'>" . $answerSubmitter . '</td>'; |
|
| 434 | + echo "<td class='even' align='center'>".$answerSubmitter.'</td>'; |
|
| 435 | 435 | |
| 436 | 436 | //mb--------------------------------------- |
| 437 | 437 | |
| 438 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . '</td>'; |
|
| 439 | - echo "<td class='even' align='center'>" . $statustxt . '</td>'; |
|
| 438 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s').'</td>'; |
|
| 439 | + echo "<td class='even' align='center'>".$statustxt.'</td>'; |
|
| 440 | 440 | //echo "<td class='even' align='center'>" . $answers . "</td>"; |
| 441 | - echo "<td class='even' align='center'> " . $approve . $modify . $delete . '</td>'; |
|
| 441 | + echo "<td class='even' align='center'> ".$approve.$modify.$delete.'</td>'; |
|
| 442 | 442 | echo '</tr>'; |
| 443 | 443 | } |
| 444 | 444 | } else { |
| 445 | 445 | // that is, $numrows = 0, there's no entries yet |
| 446 | 446 | echo '<tr>'; |
| 447 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQSSEL . '</td>'; |
|
| 447 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQSSEL.'</td>'; |
|
| 448 | 448 | echo '</tr>'; |
| 449 | 449 | } |
| 450 | 450 | echo "</table>\n"; |
@@ -452,9 +452,9 @@ discard block |
||
| 452 | 452 | $pagenav = new XoopsPageNav($numrows, $xoopsModuleConfig['perpage'], $startentry, 'startentry', "statussel=$statussel&sortsel=$sortsel&ordersel=$ordersel"); |
| 453 | 453 | |
| 454 | 454 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
| 455 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderImageNav() . '</div>'; |
|
| 455 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderImageNav().'</div>'; |
|
| 456 | 456 | } else { |
| 457 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderNav() . '</div>'; |
|
| 457 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderNav().'</div>'; |
|
| 458 | 458 | } |
| 459 | 459 | // ENDs code to show active entries |
| 460 | 460 | echo '</div>'; |
@@ -462,4 +462,4 @@ discard block |
||
| 462 | 462 | echo '</div>'; |
| 463 | 463 | echo '</div>'; |
| 464 | 464 | |
| 465 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 465 | +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 = sf_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'; |
|
@@ -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 | |
| 11 | 11 | // Creating the faq handler object |
| 12 | 12 | $faqHandler = sf_gethandler('faq'); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | // Where shall we start? |
| 29 | -$startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0; |
|
| 29 | +$startfaq = isset($_GET['startfaq']) ? (int) $_GET['startfaq'] : 0; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @param bool $showmenu |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | global $answerHandler, $faqHandler, $categoryHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
| 40 | 40 | |
| 41 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 41 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 42 | 42 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
| 43 | 43 | if ($faqid != -1) { |
| 44 | 44 | // Creating the FAQ object |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | echo "<br>\n"; |
| 142 | 142 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 143 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . $collapsableBar_title . '</h3>'; |
|
| 143 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".$collapsableBar_title.'</h3>'; |
|
| 144 | 144 | echo "<div id='bottomtable'>"; |
| 145 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>'; |
|
| 145 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>'; |
|
| 146 | 146 | } else { |
| 147 | 147 | // there's no parameter, so we're adding a faq |
| 148 | 148 | $faqObj = $faqHandler->create(); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $button_caption = _AM_SF_CREATE; |
| 157 | 157 | |
| 158 | 158 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 159 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CREATESMARTFAQ . '</h3>'; |
|
| 159 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_CREATESMARTFAQ.'</h3>'; |
|
| 160 | 160 | echo "<div id='bottomtable'>"; |
| 161 | 161 | } |
| 162 | 162 | $sform = new XoopsThemeForm(_AM_SF_SMARTFAQ, 'op', xoops_getenv('PHP_SELF'), 'post', true); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | // ANSWER |
| 189 | 189 | if ($merge) { |
| 190 | - $theanswer = $originalAnswerObj->answer('e') . "\n\n" . sprintf(_AM_SF_NEW_CONTRIBUTION, sf_getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e')); |
|
| 190 | + $theanswer = $originalAnswerObj->answer('e')."\n\n".sprintf(_AM_SF_NEW_CONTRIBUTION, sf_getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e')); |
|
| 191 | 191 | } else { |
| 192 | 192 | $theanswer = $answerObj->answer('e'); |
| 193 | 193 | } |
@@ -236,14 +236,14 @@ discard block |
||
| 236 | 236 | $sform->addElement(new XoopsFormText(_AM_SF_SPECIFIC_URL, 'contextpage', 50, 60, $faqObj->contextpage()), false); |
| 237 | 237 | |
| 238 | 238 | // EXACT URL? |
| 239 | - $excaturl_radio = new XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 239 | + $excaturl_radio = new XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 240 | 240 | $sform->addElement($excaturl_radio); |
| 241 | 241 | // WEIGHT |
| 242 | 242 | $sform->addElement(new XoopsFormText(_AM_SF_WEIGHT, 'weight', 5, 5, $faqObj->weight()), true); |
| 243 | 243 | |
| 244 | 244 | // COMMENTS |
| 245 | 245 | // Code to allow comments |
| 246 | - $addcomments_radio = new XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 246 | + $addcomments_radio = new XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 247 | 247 | $sform->addElement($addcomments_radio); |
| 248 | 248 | |
| 249 | 249 | // PER ITEM PERMISSIONS |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | } |
| 258 | 258 | $sform->addElement($groups_checkbox); |
| 259 | 259 | |
| 260 | - $partial_view = new XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 260 | + $partial_view = new XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 261 | 261 | $sform->addElement($partial_view); |
| 262 | 262 | |
| 263 | 263 | // VARIOUS OPTIONS |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | // OFFLINE |
| 281 | 281 | if (_SF_STATUS_OFFLINE == $faqObj->status()) { |
| 282 | 282 | // Back OnLine |
| 283 | - $offline_radio = new XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
| 283 | + $offline_radio = new XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
| 284 | 284 | $sform->addElement($offline_radio); |
| 285 | 285 | } |
| 286 | 286 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | xoops_cp_header(); |
| 357 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 357 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 358 | 358 | |
| 359 | 359 | editfaq(true, $faqid, $answerid, true); |
| 360 | 360 | break; |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | xoops_cp_header(); |
| 376 | 376 | |
| 377 | 377 | $adminObject->displayNavigation(basename(__FILE__)); |
| 378 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 378 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 379 | 379 | |
| 380 | 380 | editfaq(true, $faqid, $answerid); |
| 381 | 381 | break; |
@@ -383,9 +383,9 @@ discard block |
||
| 383 | 383 | case 'addfaq': |
| 384 | 384 | global $xoopsUser; |
| 385 | 385 | |
| 386 | - $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : -1; |
|
| 387 | - $requester_uid = isset($_POST['requester_uid']) ? (int)$_POST['requester_uid'] : 0; |
|
| 388 | - $answerer_uid = isset($_POST['answerer_uid']) ? (int)$_POST['answerer_uid'] : 0; |
|
| 386 | + $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : -1; |
|
| 387 | + $requester_uid = isset($_POST['requester_uid']) ? (int) $_POST['requester_uid'] : 0; |
|
| 388 | + $answerer_uid = isset($_POST['answerer_uid']) ? (int) $_POST['answerer_uid'] : 0; |
|
| 389 | 389 | |
| 390 | 390 | // Creating the FAQ and answer objects |
| 391 | 391 | if ($faqid != -1) { |
@@ -406,23 +406,23 @@ discard block |
||
| 406 | 406 | } else { |
| 407 | 407 | $faqObj->setGroups_read(); |
| 408 | 408 | } |
| 409 | - $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0); |
|
| 409 | + $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0); |
|
| 410 | 410 | $faqObj->setVar('question', $_POST['question']); |
| 411 | 411 | $faqObj->setVar('howdoi', $_POST['howdoi']); |
| 412 | 412 | $faqObj->setVar('diduno', $_POST['diduno']); |
| 413 | 413 | |
| 414 | - $faqObj->setVar('status', isset($_POST['status']) ? (int)$_POST['status'] : _SF_STATUS_ASKED); |
|
| 414 | + $faqObj->setVar('status', isset($_POST['status']) ? (int) $_POST['status'] : _SF_STATUS_ASKED); |
|
| 415 | 415 | |
| 416 | 416 | // If this SmartFAQ is offline and the user set this option to No |
| 417 | 417 | $offline = isset($_POST['offline']) ? $_POST['offline'] : 1; |
| 418 | 418 | if ((0 == $offline) && (_SF_STATUS_OFFLINE == $faqObj->status())) { |
| 419 | 419 | $faqObj->setVar('status', _SF_STATUS_PUBLISHED); |
| 420 | 420 | } |
| 421 | - $faqObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : $faqObj->weight()); |
|
| 422 | - $faqObj->setVar('html', isset($_POST['html']) ? (int)$_POST['html'] : 0); |
|
| 423 | - $faqObj->setVar('smiley', isset($_POST['smiley']) ? (int)$_POST['smiley'] : 0); |
|
| 424 | - $faqObj->setVar('xcodes', isset($_POST['xcodes']) ? (int)$_POST['xcodes'] : 0); |
|
| 425 | - $faqObj->setVar('cancomment', isset($_POST['cancomment']) ? (int)$_POST['cancomment'] : 0); |
|
| 421 | + $faqObj->setVar('weight', isset($_POST['weight']) ? (int) $_POST['weight'] : $faqObj->weight()); |
|
| 422 | + $faqObj->setVar('html', isset($_POST['html']) ? (int) $_POST['html'] : 0); |
|
| 423 | + $faqObj->setVar('smiley', isset($_POST['smiley']) ? (int) $_POST['smiley'] : 0); |
|
| 424 | + $faqObj->setVar('xcodes', isset($_POST['xcodes']) ? (int) $_POST['xcodes'] : 0); |
|
| 425 | + $faqObj->setVar('cancomment', isset($_POST['cancomment']) ? (int) $_POST['cancomment'] : 0); |
|
| 426 | 426 | $faqObj->setVar('modulelink', $_POST['modulelink']); |
| 427 | 427 | $faqObj->setVar('contextpage', $_POST['contextpage']); |
| 428 | 428 | $faqObj->setVar('exacturl', $_POST['exacturl']); |
@@ -506,13 +506,13 @@ discard block |
||
| 506 | 506 | |
| 507 | 507 | // Storing the FAQ |
| 508 | 508 | if (!$faqObj->store()) { |
| 509 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . sf_formatErrors($faqObj->getErrors())); |
|
| 509 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.sf_formatErrors($faqObj->getErrors())); |
|
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | // Storing the answer |
| 513 | 513 | $answerObj->setVar('faqid', $faqObj->faqid()); |
| 514 | 514 | if (!$answerObj->store()) { |
| 515 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . sf_formatErrors($answerObj->getErrors())); |
|
| 515 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.sf_formatErrors($answerObj->getErrors())); |
|
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | // Send notifications |
@@ -529,8 +529,8 @@ discard block |
||
| 529 | 529 | $module_id = $xoopsModule->getVar('mid'); |
| 530 | 530 | $gpermHandler = xoops_getHandler('groupperm'); |
| 531 | 531 | |
| 532 | - $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : 0; |
|
| 533 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : $faqid; |
|
| 532 | + $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : 0; |
|
| 533 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : $faqid; |
|
| 534 | 534 | |
| 535 | 535 | $faqObj = new sfFaq($faqid); |
| 536 | 536 | |
@@ -539,20 +539,20 @@ discard block |
||
| 539 | 539 | |
| 540 | 540 | if ($confirm) { |
| 541 | 541 | if (!$faqHandler->delete($faqObj)) { |
| 542 | - redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
| 542 | + redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR.sf_formatErrors($faqObj->getErrors())); |
|
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | redirect_header('faq.php', 2, sprintf(_AM_SF_ARTISDELETED, $faqObj->question())); |
| 546 | 546 | } else { |
| 547 | 547 | // no confirm: show deletion condition |
| 548 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
| 548 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
| 549 | 549 | xoops_cp_header(); |
| 550 | 550 | xoops_confirm([ |
| 551 | 551 | 'op' => 'del', |
| 552 | 552 | 'faqid' => $faqObj->faqid(), |
| 553 | 553 | 'confirm' => 1, |
| 554 | 554 | 'name' => $faqObj->question() |
| 555 | - ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 555 | + ], 'faq.php', _AM_SF_DELETETHISARTICLE." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE); |
|
| 556 | 556 | xoops_cp_footer(); |
| 557 | 557 | } |
| 558 | 558 | |
@@ -566,10 +566,10 @@ discard block |
||
| 566 | 566 | |
| 567 | 567 | $adminObject->displayNavigation(basename(__FILE__)); |
| 568 | 568 | |
| 569 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 570 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 569 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 570 | + require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 571 | 571 | |
| 572 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/displayfaqs.php'; |
|
| 572 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/displayfaqs.php'; |
|
| 573 | 573 | |
| 574 | 574 | $totalcategories = $categoryHandler->getCategoriesCount(-1); |
| 575 | 575 | if ($totalcategories > 0) { |
@@ -579,4 +579,4 @@ discard block |
||
| 579 | 579 | break; |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 582 | +require_once __DIR__.'/admin_footer.php'; |
|