@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | use Xmf\Request; |
10 | 10 | |
11 | -require_once __DIR__ . '/header.php'; |
|
11 | +require_once __DIR__.'/header.php'; |
|
12 | 12 | |
13 | 13 | global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
14 | 14 | |
@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | |
130 | 130 | // Storing the FAQ object in the database |
131 | 131 | if (!$faqObj->store()) { |
132 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
132 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($faqObj->getErrors())); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | // Storing the answer object in the database |
136 | 136 | if (!$newAnswerObj->store()) { |
137 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($newAnswerObj->getErrors())); |
|
137 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($newAnswerObj->getErrors())); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $notificationHandler = xoops_getHandler('notification'); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | case 2: |
151 | 151 | // Answer for an open question submitted, auto-approved; became Q&A, need approbation |
152 | 152 | if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) { |
153 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
153 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
154 | 154 | $notificationHandler->subscribe('faq', $faqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
155 | 155 | } |
156 | 156 | // Send notifications |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | case 3: |
161 | 161 | // Answer submitted, needs approbation |
162 | 162 | if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) { |
163 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
163 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
164 | 164 | $notificationHandler->subscribe('question', $newAnswerObj->answerid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
165 | 165 | } |
166 | 166 | // Send notifications |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | // New answer submitted for a published Q&A, need approbation |
176 | 176 | // Send notifications |
177 | 177 | if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) { |
178 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
178 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
179 | 179 | $notificationHandler->subscribe('faq', $newAnswerObj->answerid(), 'answer_approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
180 | 180 | } |
181 | 181 | |
@@ -212,20 +212,20 @@ discard block |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
215 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
216 | - require_once __DIR__ . '/footer.php'; |
|
215 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
216 | + require_once __DIR__.'/footer.php'; |
|
217 | 217 | |
218 | 218 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
219 | 219 | |
220 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
220 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
221 | 221 | $xoopsTpl->assign('whereInSection', $moduleName); |
222 | 222 | $xoopsTpl->assign('lang_submit', _MD_SF_SUBMITANSWER); |
223 | 223 | |
224 | 224 | $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUBMITANSWERTO, ucwords($xoopsModule->name()))); |
225 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUBMITANSWER_INTRO); |
|
225 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUBMITANSWER_INTRO); |
|
226 | 226 | |
227 | - require_once __DIR__ . '/include/answer.inc.php'; |
|
227 | + require_once __DIR__.'/include/answer.inc.php'; |
|
228 | 228 | |
229 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
229 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
230 | 230 | break; |
231 | 231 | } |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | -$categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
11 | +$categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0; |
|
12 | 12 | |
13 | 13 | // Creating the category handler object |
14 | 14 | $categoryHandler = sf_gethandler('category'); |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | } |
33 | 33 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl'; |
34 | 34 | |
35 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
36 | -require_once __DIR__ . '/footer.php'; |
|
35 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
36 | +require_once __DIR__.'/footer.php'; |
|
37 | 37 | |
38 | 38 | // At which record shall we start |
39 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
39 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
40 | 40 | |
41 | 41 | // Creating the faq handler object |
42 | 42 | $faqHandler = sf_gethandler('faq'); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // Get the last smartfaq |
71 | 71 | $last_qnaObj = $faqHandler->getLastPublishedByCat(); |
72 | 72 | } |
73 | -$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize']; |
|
73 | +$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize']; |
|
74 | 74 | // Creating the sub-categories objects that belong to the selected category |
75 | 75 | $subcatsObj = $categoryHandler->getCategories(0, 0, $categoryid); |
76 | 76 | $total_subcats = count($subcatsObj); |
@@ -82,18 +82,18 @@ discard block |
||
82 | 82 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
83 | 83 | if (isset($last_qnaObj[$subcat_id])) { |
84 | 84 | $subcatsObj[$i]->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
85 | - $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
85 | + $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | $subcatsObj[$i]->setVar('faqcount', $totalQnas[$subcat_id]); |
89 | 89 | $subcats[$subcat_id] = $subcatsObj[$i]->toArray(); |
90 | - $total_faqs += $totalQnas[$subcat_id]; |
|
90 | + $total_faqs += $totalQnas[$subcat_id]; |
|
91 | 91 | //}replacé ligne 92 |
92 | 92 | } |
93 | 93 | $xoopsTpl->assign('subcats', $subcats); |
94 | 94 | } |
95 | 95 | $thiscategory_faqcount = isset($totalQnas[$categoryid]) ? $totalQnas[$categoryid] : 0; |
96 | -$category['total'] = $thiscategory_faqcount + $total_faqs; |
|
96 | +$category['total'] = $thiscategory_faqcount+$total_faqs; |
|
97 | 97 | |
98 | 98 | if (count($faqsObj) > 0) { |
99 | 99 | $userids = []; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | $memberHandler = xoops_getHandler('member'); |
112 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
112 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
113 | 113 | // Adding the Q&As of the selected category |
114 | 114 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
115 | 115 | $faq = $faqsObj[$i]->toArray(null, $categoryObj); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if (isset($last_qnaObj) && $last_qnaObj) { |
137 | 137 | $category['last_faqid'] = $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid'); |
138 | - $category['last_question_link'] = "<a href='faq.php?faqid=" . $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid') . "'>" . $last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize) . '</a>'; |
|
138 | + $category['last_question_link'] = "<a href='faq.php?faqid=".$last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid')."'>".$last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize).'</a>'; |
|
139 | 139 | } |
140 | 140 | } |
141 | 141 | |
@@ -160,26 +160,26 @@ discard block |
||
160 | 160 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
161 | 161 | |
162 | 162 | // The Navigation Bar |
163 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
164 | -$pagenav = new XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid')); |
|
163 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
164 | +$pagenav = new XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid')); |
|
165 | 165 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
166 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
166 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
167 | 167 | } else { |
168 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
168 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | $xoopsTpl->assign('category', $category); |
172 | 172 | |
173 | 173 | // Page Title Hack by marcan |
174 | 174 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
175 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']); |
|
175 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']); |
|
176 | 176 | // End Page Title Hack by marcan |
177 | 177 | |
178 | 178 | //code to include smartie |
179 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) { |
|
180 | - require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php'; |
|
179 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) { |
|
180 | + require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php'; |
|
181 | 181 | $xoopsTpl->assign('smarttie', 1); |
182 | 182 | } |
183 | 183 | //end code for smarttie |
184 | 184 | |
185 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
185 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -5,13 +5,13 @@ discard block |
||
5 | 5 | * Author: The SmartFactory <www.smartfactory.ca> |
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | -require_once __DIR__ . '/header.php'; |
|
8 | +require_once __DIR__.'/header.php'; |
|
9 | 9 | |
10 | 10 | // At which record shall we start for the Categories |
11 | -$catstart = isset($_GET['catstart']) ? (int)$_GET['catstart'] : 0; |
|
11 | +$catstart = isset($_GET['catstart']) ? (int) $_GET['catstart'] : 0; |
|
12 | 12 | |
13 | 13 | // At which record shall we start for the FAQ |
14 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
14 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
15 | 15 | |
16 | 16 | // Creating the category handler object |
17 | 17 | $categoryHandler = sf_gethandler('category'); |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | |
37 | 37 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_index.tpl'; |
38 | 38 | |
39 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
40 | -require_once __DIR__ . '/footer.php'; |
|
39 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
40 | +require_once __DIR__.'/footer.php'; |
|
41 | 41 | |
42 | 42 | // Creating the categories objects |
43 | 43 | $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // Get the last smartfaq in each category |
61 | 61 | $last_qnaObj = $faqHandler->getLastPublishedByCat(); |
62 | 62 | } |
63 | -$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize']; |
|
63 | +$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize']; |
|
64 | 64 | $categories = []; |
65 | 65 | foreach ($categoriesObj as $cat_id => $category) { |
66 | 66 | $total = 0; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
71 | 71 | if (isset($last_qnaObj[$subcat_id])) { |
72 | 72 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
73 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
73 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
74 | 74 | } |
75 | 75 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
76 | 76 | if ($xoopsModuleConfig['displaysubcatonindex']) { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | if ($total > 0) { |
89 | 89 | if (isset($last_qnaObj[$cat_id])) { |
90 | 90 | $category->setVar('last_faqid', $last_qnaObj[$cat_id]->getVar('faqid')); |
91 | - $category->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$cat_id]->getVar('faqid') . "'>" . $last_qnaObj[$cat_id]->question($lastfaqsize) . '</a>'); |
|
91 | + $category->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$cat_id]->getVar('faqid')."'>".$last_qnaObj[$cat_id]->question($lastfaqsize).'</a>'); |
|
92 | 92 | } |
93 | 93 | $category->setVar('faqcount', $total); |
94 | 94 | if (!isset($categories[$cat_id])) { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | $memberHandler = xoops_getHandler('member'); |
129 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
129 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
130 | 130 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
131 | 131 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
132 | 132 | |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | // Language constants |
155 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
155 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
156 | 156 | $xoopsTpl->assign('whereInSection', $moduleName); |
157 | 157 | $xoopsTpl->assign('displaysubcatonindex', $xoopsModuleConfig['displaysubcatonindex']); |
158 | 158 | $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']); |
159 | 159 | $xoopsTpl->assign('display_categoryname', true); |
160 | 160 | $xoopsTpl->assign('displayFull', 'full' === $xoopsModuleConfig['displaytype']); |
161 | 161 | |
162 | -$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD . ' ' . $moduleName); |
|
162 | +$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD.' '.$moduleName); |
|
163 | 163 | $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1)); |
164 | 164 | $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_SMARTFAQS); |
165 | 165 | $xoopsTpl->assign('lang_home', _MD_SF_HOME); |
@@ -178,20 +178,20 @@ discard block |
||
178 | 178 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
179 | 179 | |
180 | 180 | // Category Navigation Bar |
181 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
181 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
182 | 182 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', ''); |
183 | 183 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
184 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
184 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
185 | 185 | } else { |
186 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
186 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | // FAQ Navigation Bar |
190 | 190 | $pagenav = new XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', ''); |
191 | 191 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
192 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
192 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
193 | 193 | } else { |
194 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
194 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | // Page Title Hack by marcan |
@@ -199,4 +199,4 @@ discard block |
||
199 | 199 | $xoopsTpl->assign('xoops_pagetitle', $module_name); |
200 | 200 | // End Page Title Hack by marcan |
201 | 201 | |
202 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
202 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | -$faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
11 | +$faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
12 | 12 | |
13 | 13 | if (0 == $faqid) { |
14 | 14 | redirect_header('javascript:history.go(-1)', 1, _MD_SF_NOFAQSELECTED); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $faqObj->updateCounter(); |
45 | 45 | } |
46 | 46 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_faq.tpl'; |
47 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
48 | -require_once __DIR__ . '/footer.php'; |
|
47 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
48 | +require_once __DIR__.'/footer.php'; |
|
49 | 49 | |
50 | 50 | $faq = $faqObj->toArray(null, $categoryObj, false); |
51 | 51 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $xoopsTpl->assign('display_categoryname', false); |
81 | 81 | |
82 | 82 | $xoopsTpl->assign('xcodes', $faqObj->getVar('xcodes')); |
83 | -$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) . ': ' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $faqObj->getVar('faqid')); |
|
83 | +$xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']).'&body='.sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$faqObj->getVar('faqid')); |
|
84 | 84 | $xoopsTpl->assign('lang_printerpage', _MD_SF_PRINTERFRIENDLY); |
85 | 85 | $xoopsTpl->assign('lang_sendstory', _MD_SF_SENDSTORY); |
86 | 86 | $xoopsTpl->assign('faqid', $faqObj->getVar('faqid')); |
@@ -96,19 +96,19 @@ discard block |
||
96 | 96 | |
97 | 97 | // Page Title Hack by marcan |
98 | 98 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
99 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $categoryObj->name() . ' - ' . $faq['question']); |
|
99 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$categoryObj->name().' - '.$faq['question']); |
|
100 | 100 | // End Page Title Hack by marcan |
101 | 101 | |
102 | 102 | // Include the comments if the selected FAQ supports comments |
103 | 103 | if (1 == $faqObj->cancomment()) { |
104 | - require_once XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
104 | + require_once XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | //code to include smartie |
108 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) { |
|
109 | - require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php'; |
|
108 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) { |
|
109 | + require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php'; |
|
110 | 110 | $xoopsTpl->assign('smarttie', 1); |
111 | 111 | } |
112 | 112 | //end code for smarttie |
113 | 113 | |
114 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
114 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -15,14 +15,14 @@ discard block |
||
15 | 15 | |
16 | 16 | function myDeleteByModule(XoopsDatabase $db, $gperm_modid, $gperm_name = null, $gperm_itemid = null) |
17 | 17 | { |
18 | - $criteria = new CriteriaCompo(new Criteria('gperm_modid', (int)$gperm_modid)); |
|
18 | + $criteria = new CriteriaCompo(new Criteria('gperm_modid', (int) $gperm_modid)); |
|
19 | 19 | if (null !== $gperm_name) { |
20 | 20 | $criteria->add(new Criteria('gperm_name', $gperm_name)); |
21 | 21 | if (null !== $gperm_itemid) { |
22 | - $criteria->add(new Criteria('gperm_itemid', (int)$gperm_itemid)); |
|
22 | + $criteria->add(new Criteria('gperm_itemid', (int) $gperm_itemid)); |
|
23 | 23 | } |
24 | 24 | } |
25 | - $sql = 'DELETE FROM ' . $db->prefix('group_permission') . ' ' . $criteria->renderWhere(); |
|
25 | + $sql = 'DELETE FROM '.$db->prefix('group_permission').' '.$criteria->renderWhere(); |
|
26 | 26 | if (!$result = $db->query($sql)) { |
27 | 27 | return false; |
28 | 28 | } |
@@ -31,19 +31,19 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | // require_once __DIR__ . '/../../../include/cp_header.php'; GIJ |
34 | -$modid = isset($HTTP_POST_VARS['modid']) ? (int)$HTTP_POST_VARS['modid'] : 1; |
|
34 | +$modid = isset($HTTP_POST_VARS['modid']) ? (int) $HTTP_POST_VARS['modid'] : 1; |
|
35 | 35 | // we dont want system module permissions to be changed here ( 1 -> 0 GIJ) |
36 | 36 | if ($modid <= 0 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) { |
37 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
37 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
38 | 38 | } |
39 | 39 | /** @var XoopsModuleHandler $moduleHandler */ |
40 | 40 | $moduleHandler = xoops_getHandler('module'); |
41 | 41 | $module = $moduleHandler->get($modid); |
42 | 42 | if (!is_object($module) || !$module->getVar('isactive')) { |
43 | - redirect_header(XOOPS_URL . '/admin.php', 1, _MODULENOEXIST); |
|
43 | + redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST); |
|
44 | 44 | } |
45 | 45 | $memberHandler = xoops_getHandler('member'); |
46 | -$group_list =& $memberHandler->getGroupList(); |
|
46 | +$group_list = & $memberHandler->getGroupList(); |
|
47 | 47 | if (is_array($HTTP_POST_VARS['perms']) && !empty($HTTP_POST_VARS['perms'])) { |
48 | 48 | $gpermHandler = xoops_getHandler('groupperm'); |
49 | 49 | foreach ($HTTP_POST_VARS['perms'] as $perm_name => $perm_data) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | foreach ($parent_ids as $pid) { |
67 | 67 | if (0 != $pid && !in_array($pid, array_keys($item_ids))) { |
68 | 68 | // one of the parent items were not selected, so skip this item |
69 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>') . ' (' . _MD_AM_PERMADDNGP . ')'; |
|
69 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_AM_PERMADDNGP.')'; |
|
70 | 70 | continue 2; |
71 | 71 | } |
72 | 72 | } |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $gperm->setVar('gperm_modid', $modid); |
78 | 78 | $gperm->setVar('gperm_itemid', $item_id); |
79 | 79 | if (!$gpermHandler->insert($gperm)) { |
80 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
80 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
81 | 81 | } else { |
82 | - $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
82 | + $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
83 | 83 | } |
84 | 84 | unset($gperm); |
85 | 85 | } |
@@ -6,16 +6,16 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
9 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
10 | 10 | |
11 | -$op = 'go';//'start'; |
|
11 | +$op = 'go'; //'start'; |
|
12 | 12 | |
13 | 13 | if (isset($HTTP_POST_VARS['op']) && ('go' === $HTTP_POST_VARS['op'])) { |
14 | 14 | $op = $HTTP_POST_VARS['op']; |
15 | 15 | } |
16 | 16 | |
17 | 17 | if ('start' === $op) { |
18 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
18 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
19 | 19 | |
20 | 20 | xoops_cp_header(); |
21 | 21 | |
@@ -44,41 +44,41 @@ discard block |
||
44 | 44 | |
45 | 45 | echo " <title>{module title}</title>\r\n"; |
46 | 46 | |
47 | - $resultC = $xoopsDB->queryF('SELECT * FROM ' . $xoopsDB->prefix('smartfaq_categories')); |
|
47 | + $resultC = $xoopsDB->queryF('SELECT * FROM '.$xoopsDB->prefix('smartfaq_categories')); |
|
48 | 48 | while ($arrC = $xoopsDB->fetchArray($resultC)) { |
49 | 49 | extract($arrC, EXTR_PREFIX_ALL, 'c'); |
50 | 50 | |
51 | 51 | echo " <qandadiv ID=\"c$c_categoryid\" Revision=\"$c_created\">\r\n"; |
52 | - echo ' <title>' . encodeText($c_name) . "</title>\r\n"; |
|
53 | - echo ' <para>' . encodeText($c_description) . "</para>\r\n"; |
|
52 | + echo ' <title>'.encodeText($c_name)."</title>\r\n"; |
|
53 | + echo ' <para>'.encodeText($c_description)."</para>\r\n"; |
|
54 | 54 | |
55 | - $resultQ = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('smartfaq_faq') . " where categoryid=$c_categoryid"); |
|
55 | + $resultQ = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('smartfaq_faq')." where categoryid=$c_categoryid"); |
|
56 | 56 | while ($arrQ = $xoopsDB->fetchArray($resultQ)) { |
57 | 57 | extract($arrQ, EXTR_PREFIX_ALL, 'q'); |
58 | 58 | |
59 | - echo " <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"" . getUserFullName($q_uid) . "\">\r\n"; |
|
59 | + echo " <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"".getUserFullName($q_uid)."\">\r\n"; |
|
60 | 60 | echo " <question>\r\n"; |
61 | - echo ' <para>' . encodeText($q_question) . "</para>\r\n"; |
|
61 | + echo ' <para>'.encodeText($q_question)."</para>\r\n"; |
|
62 | 62 | if (!empty($q_howdoi)) { |
63 | 63 | echo " <note Conformance=\"howdoi\">\r\n"; |
64 | 64 | echo " <title>{'How do I' from language file}</title>\r\n"; |
65 | - echo ' <para>' . encodeText($q_howdoi) . "</para>\r\n"; |
|
65 | + echo ' <para>'.encodeText($q_howdoi)."</para>\r\n"; |
|
66 | 66 | echo " </note>\r\n"; |
67 | 67 | } |
68 | 68 | if (!empty($q_diduno)) { |
69 | 69 | echo " <note Conformance=\"diduno\">\r\n"; |
70 | 70 | echo " <title>{'Did you know' from language file}</title>\r\n"; |
71 | - echo ' <para>' . encodeText($q_diduno) . "</para>\r\n"; |
|
71 | + echo ' <para>'.encodeText($q_diduno)."</para>\r\n"; |
|
72 | 72 | echo " </note>\r\n"; |
73 | 73 | } |
74 | 74 | echo " </question>\r\n"; |
75 | 75 | |
76 | - $resultA = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('smartfaq_answers') . " where answerid=$q_answerid"); |
|
76 | + $resultA = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('smartfaq_answers')." where answerid=$q_answerid"); |
|
77 | 77 | while ($arrA = $xoopsDB->fetchArray($resultA)) { |
78 | 78 | extract($arrA, EXTR_PREFIX_ALL, 'a'); |
79 | 79 | |
80 | - echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"" . getUserFullName($a_uid) . "\">\r\n"; |
|
81 | - echo ' <para>' . encodeText($a_answer) . "</para>\r\n"; |
|
80 | + echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName($a_uid)."\">\r\n"; |
|
81 | + echo ' <para>'.encodeText($a_answer)."</para>\r\n"; |
|
82 | 82 | echo " </answer>\r\n"; |
83 | 83 | } |
84 | 84 | $xoopsDB->freeRecordSet($resultA); |
@@ -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'; |