@@ -182,13 +182,13 @@ |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | switch ($ordersel) { |
185 | - case 'ASC': |
|
186 | - $ordertxtasc = "selected='selected'"; |
|
187 | - break; |
|
185 | + case 'ASC': |
|
186 | + $ordertxtasc = "selected='selected'"; |
|
187 | + break; |
|
188 | 188 | |
189 | - default : |
|
190 | - $ordertxtdesc = "selected='selected'"; |
|
191 | - break; |
|
189 | + default : |
|
190 | + $ordertxtdesc = "selected='selected'"; |
|
191 | + break; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | switch ($statussel) { |
@@ -7,56 +7,56 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | 11 | $myts = &MyTextSanitizer::getInstance(); |
12 | 12 | |
13 | -$faqid = isset($_POST['faqid'])? intval($_POST['faqid']) : 0; |
|
13 | +$faqid = isset($_POST['faqid']) ? intval($_POST['faqid']) : 0; |
|
14 | 14 | |
15 | 15 | //$pick = isset($_GET['pick'])? intval($_GET['pick']) : 0; |
16 | 16 | //$pick = isset($_POST['pick'])? intval($_POST['pick']) : $_GET['pick']; |
17 | 17 | |
18 | -$statussel = isset($_GET['statussel'])? intval($_GET['statussel']) : _SF_STATUS_ALL; |
|
19 | -$statussel = isset($_POST['statussel'])? intval($_POST['statussel']) : $statussel; |
|
18 | +$statussel = isset($_GET['statussel']) ? intval($_GET['statussel']) : _SF_STATUS_ALL; |
|
19 | +$statussel = isset($_POST['statussel']) ? intval($_POST['statussel']) : $statussel; |
|
20 | 20 | |
21 | -$sortsel = isset($_GET['sortsel'])? $_GET['sortsel'] : 'faqid'; |
|
22 | -$sortsel = isset($_POST['sortsel'])? $_POST['sortsel'] : $sortsel; |
|
21 | +$sortsel = isset($_GET['sortsel']) ? $_GET['sortsel'] : 'faqid'; |
|
22 | +$sortsel = isset($_POST['sortsel']) ? $_POST['sortsel'] : $sortsel; |
|
23 | 23 | |
24 | -$ordersel = isset($_GET['ordersel'])? $_GET['ordersel'] : 'DESC'; |
|
25 | -$ordersel = isset($_POST['ordersel'])? $_POST['ordersel'] :$ordersel; |
|
24 | +$ordersel = isset($_GET['ordersel']) ? $_GET['ordersel'] : 'DESC'; |
|
25 | +$ordersel = isset($_POST['ordersel']) ? $_POST['ordersel'] : $ordersel; |
|
26 | 26 | |
27 | 27 | $module_id = $xoopsModule->getVar('mid'); |
28 | 28 | $gperm_handler = &xoops_gethandler('groupperm'); |
29 | -$groups = ($xoopsUser)? ($xoopsUser->getGroups()) : XOOPS_GROUP_ANONYMOUS; |
|
29 | +$groups = ($xoopsUser) ? ($xoopsUser->getGroups()) : XOOPS_GROUP_ANONYMOUS; |
|
30 | 30 | |
31 | 31 | function buildTable() |
32 | 32 | { |
33 | 33 | global $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
34 | 34 | echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>"; |
35 | 35 | echo "<tr>"; |
36 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_FAQID . "</b></td>"; |
|
37 | - echo "<th width='20%' class='bg3' align='center'><b>" . _AM_SF_FAQCAT . "</b></td>"; |
|
38 | - echo "<th class='bg3' align='center'><b>" . _AM_SF_QUESTION . "</b></td>"; |
|
36 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_FAQID."</b></td>"; |
|
37 | + echo "<th width='20%' class='bg3' align='center'><b>"._AM_SF_FAQCAT."</b></td>"; |
|
38 | + echo "<th class='bg3' align='center'><b>"._AM_SF_QUESTION."</b></td>"; |
|
39 | 39 | |
40 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . "</b></td>"; |
|
41 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . "</b></td>"; |
|
40 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED."</b></td>"; |
|
41 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED."</b></td>"; |
|
42 | 42 | |
43 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . "</b></td>"; |
|
44 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_STATUS . "</b></td>"; |
|
43 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED."</b></td>"; |
|
44 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_STATUS."</b></td>"; |
|
45 | 45 | //echo "<td width='30' class='bg3' align='center'><b>" . _AM_SF_ANSWERS . "</b></td>"; |
46 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; |
|
46 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ACTION."</b></td>"; |
|
47 | 47 | echo "</tr>"; |
48 | 48 | } |
49 | 49 | // Code for the page |
50 | -include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; |
|
51 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
50 | +include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; |
|
51 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
52 | 52 | |
53 | 53 | // Creating the category handler object |
54 | -$category_handler =& sf_gethandler('category'); |
|
54 | +$category_handler = & sf_gethandler('category'); |
|
55 | 55 | |
56 | 56 | // Creating the FAQ handler object |
57 | -$faq_handler =& sf_gethandler('faq'); |
|
57 | +$faq_handler = & sf_gethandler('faq'); |
|
58 | 58 | |
59 | -$startentry = isset($_GET['startentry'])? intval($_GET['startentry']) : 0; |
|
59 | +$startentry = isset($_GET['startentry']) ? intval($_GET['startentry']) : 0; |
|
60 | 60 | |
61 | 61 | $indexAdmin = new ModuleAdmin(); |
62 | 62 | xoops_cp_header(); |
@@ -75,31 +75,31 @@ discard block |
||
75 | 75 | $totalfaqbystatus = $faq_handler->getFaqsCountByStatus(); |
76 | 76 | |
77 | 77 | // Total asked FAQs |
78 | -$totalasked = isset($totalfaqbystatus[_SF_STATUS_ASKED])? $totalfaqbystatus[_SF_STATUS_ASKED] : 0; |
|
78 | +$totalasked = isset($totalfaqbystatus[_SF_STATUS_ASKED]) ? $totalfaqbystatus[_SF_STATUS_ASKED] : 0; |
|
79 | 79 | |
80 | 80 | // Total opened FAQs |
81 | -$totalopened = isset($totalfaqbystatus[_SF_STATUS_OPENED])? $totalfaqbystatus[_SF_STATUS_OPENED] : 0; |
|
81 | +$totalopened = isset($totalfaqbystatus[_SF_STATUS_OPENED]) ? $totalfaqbystatus[_SF_STATUS_OPENED] : 0; |
|
82 | 82 | |
83 | 83 | // Total answered FAQs |
84 | -$totalanswered = isset($totalfaqbystatus[_SF_STATUS_ANSWERED])? $totalfaqbystatus[_SF_STATUS_ANSWERED] : 0; |
|
84 | +$totalanswered = isset($totalfaqbystatus[_SF_STATUS_ANSWERED]) ? $totalfaqbystatus[_SF_STATUS_ANSWERED] : 0; |
|
85 | 85 | |
86 | 86 | // Total submitted FAQs |
87 | -$totalsubmitted = isset($totalfaqbystatus[_SF_STATUS_SUBMITTED])? $totalfaqbystatus[_SF_STATUS_SUBMITTED] : 0; |
|
87 | +$totalsubmitted = isset($totalfaqbystatus[_SF_STATUS_SUBMITTED]) ? $totalfaqbystatus[_SF_STATUS_SUBMITTED] : 0; |
|
88 | 88 | |
89 | 89 | // Total published FAQs |
90 | -$totalpublished = isset($totalfaqbystatus[_SF_STATUS_PUBLISHED])? $totalfaqbystatus[_SF_STATUS_PUBLISHED] : 0; |
|
90 | +$totalpublished = isset($totalfaqbystatus[_SF_STATUS_PUBLISHED]) ? $totalfaqbystatus[_SF_STATUS_PUBLISHED] : 0; |
|
91 | 91 | |
92 | 92 | // Total offline FAQs |
93 | -$totaloffline = isset($totalfaqbystatus[_SF_STATUS_OFFLINE])? $totalfaqbystatus[_SF_STATUS_OFFLINE] : 0; |
|
93 | +$totaloffline = isset($totalfaqbystatus[_SF_STATUS_OFFLINE]) ? $totalfaqbystatus[_SF_STATUS_OFFLINE] : 0; |
|
94 | 94 | |
95 | 95 | // Total rejected question |
96 | -$totalrejectedquestion = isset($totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION])? $totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION] : 0; |
|
96 | +$totalrejectedquestion = isset($totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION]) ? $totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION] : 0; |
|
97 | 97 | |
98 | 98 | // Total rejected smartfaq |
99 | -$totalrejectedsmartfaq = isset($totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ])? $totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ] : 0; |
|
99 | +$totalrejectedsmartfaq = isset($totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ]) ? $totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ] : 0; |
|
100 | 100 | |
101 | 101 | // Total Q&A with new answers |
102 | -$totalnewanswers = isset($totalfaqbystatus[_SF_STATUS_NEW_ANSWER])? $totalfaqbystatus[_SF_STATUS_NEW_ANSWER] : 0; |
|
102 | +$totalnewanswers = isset($totalfaqbystatus[_SF_STATUS_NEW_ANSWER]) ? $totalfaqbystatus[_SF_STATUS_NEW_ANSWER] : 0; |
|
103 | 103 | |
104 | 104 | // -- // |
105 | 105 | //sf_collapsableBar('toptable', 'toptableicon'); |
@@ -117,9 +117,9 @@ discard block |
||
117 | 117 | //echo "<br />"; |
118 | 118 | |
119 | 119 | //$indexAdmin = new ModuleAdmin(); |
120 | -$indexAdmin->addItemButton(_AM_SF_CATEGORY_CREATE, 'category.php?op=mod', 'add' , ''); |
|
121 | -$indexAdmin->addItemButton(_AM_SF_CREATEART, 'faq.php?op=mod', 'add' , ''); |
|
122 | -$indexAdmin->addItemButton(_AM_SF_CREATEQUESTION, 'question.php?op=mod', 'add' , ''); |
|
120 | +$indexAdmin->addItemButton(_AM_SF_CATEGORY_CREATE, 'category.php?op=mod', 'add', ''); |
|
121 | +$indexAdmin->addItemButton(_AM_SF_CREATEART, 'faq.php?op=mod', 'add', ''); |
|
122 | +$indexAdmin->addItemButton(_AM_SF_CREATEQUESTION, 'question.php?op=mod', 'add', ''); |
|
123 | 123 | echo $indexAdmin->renderButton('left', ''); |
124 | 124 | |
125 | 125 | //echo "<form><div style=\"margin-bottom: 24px;\">"; |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | |
132 | 132 | // Construction of lower table |
133 | 133 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
134 | -echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_ALLFAQS . "</h3>"; |
|
134 | +echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_ALLFAQS."</h3>"; |
|
135 | 135 | echo "<div id='bottomtable'>"; |
136 | -echo "<span style=\"color: #567; margin: 3px 0 18px 0; font-size: small; display: block; \">" . _AM_SF_ALLFAQSMSG . "</span>"; |
|
136 | +echo "<span style=\"color: #567; margin: 3px 0 18px 0; font-size: small; display: block; \">"._AM_SF_ALLFAQSMSG."</span>"; |
|
137 | 137 | |
138 | 138 | $showingtxt = ''; |
139 | 139 | $selectedtxt = ''; |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | $sorttxtweight = ""; |
157 | 157 | $sorttxtfaqid = ""; |
158 | 158 | |
159 | -$ordertxtasc=''; |
|
160 | -$ordertxtdesc=''; |
|
159 | +$ordertxtasc = ''; |
|
160 | +$ordertxtdesc = ''; |
|
161 | 161 | |
162 | 162 | switch ($sortsel) { |
163 | 163 | case 'faq.question': |
@@ -202,98 +202,98 @@ discard block |
||
202 | 202 | case _SF_STATUS_ASKED : |
203 | 203 | $selectedtxt1 = "selected='selected'"; |
204 | 204 | $caption = _AM_SF_ASKED; |
205 | - $cond = " WHERE status = " . _SF_STATUS_ASKED . " "; |
|
205 | + $cond = " WHERE status = "._SF_STATUS_ASKED." "; |
|
206 | 206 | $status_explaination = _AM_SF_ASKED_EXP; |
207 | 207 | break; |
208 | 208 | |
209 | 209 | case _SF_STATUS_OPENED : |
210 | 210 | $selectedtxt2 = "selected='selected'"; |
211 | 211 | $caption = _AM_SF_OPENED; |
212 | - $cond = " WHERE status = " . _SF_STATUS_OPENED . " "; |
|
212 | + $cond = " WHERE status = "._SF_STATUS_OPENED." "; |
|
213 | 213 | $status_explaination = _AM_SF_OPENED_EXP; |
214 | 214 | break; |
215 | 215 | |
216 | 216 | case _SF_STATUS_ANSWERED : |
217 | 217 | $selectedtxt3 = "selected='selected'"; |
218 | 218 | $caption = _AM_SF_ANSWERED; |
219 | - $cond = " WHERE status = " . _SF_STATUS_ANSWERED . " "; |
|
219 | + $cond = " WHERE status = "._SF_STATUS_ANSWERED." "; |
|
220 | 220 | $status_explaination = _AM_SF_ANSWERED_EXP; |
221 | 221 | break; |
222 | 222 | |
223 | 223 | case _SF_STATUS_SUBMITTED : |
224 | 224 | $selectedtxt4 = "selected='selected'"; |
225 | 225 | $caption = _AM_SF_SUBMITTED; |
226 | - $cond = " WHERE status = " . _SF_STATUS_SUBMITTED . " "; |
|
226 | + $cond = " WHERE status = "._SF_STATUS_SUBMITTED." "; |
|
227 | 227 | $status_explaination = _AM_SF_SUBMITTED_EXP; |
228 | 228 | break; |
229 | 229 | |
230 | 230 | case _SF_STATUS_PUBLISHED : |
231 | 231 | $selectedtxt5 = "selected='selected'"; |
232 | 232 | $caption = _AM_SF_PUBLISHED; |
233 | - $cond = " WHERE status = " . _SF_STATUS_PUBLISHED . " "; |
|
233 | + $cond = " WHERE status = "._SF_STATUS_PUBLISHED." "; |
|
234 | 234 | $status_explaination = _AM_SF_PUBLISHED_EXP; |
235 | 235 | break; |
236 | 236 | |
237 | 237 | case _SF_STATUS_NEW_ANSWER : |
238 | 238 | $selectedtxt6 = "selected='selected'"; |
239 | 239 | $caption = _AM_SF_NEW_ANSWER; |
240 | - $cond = " WHERE status = " . _SF_STATUS_NEW_ANSWER . " "; |
|
240 | + $cond = " WHERE status = "._SF_STATUS_NEW_ANSWER." "; |
|
241 | 241 | $status_explaination = _AM_SF_NEW_ANSWER_EXP; |
242 | 242 | break; |
243 | 243 | |
244 | 244 | case _SF_STATUS_OFFLINE : |
245 | 245 | $selectedtxt7 = "selected='selected'"; |
246 | 246 | $caption = _AM_SF_OFFLINE; |
247 | - $cond = " WHERE status = " . _SF_STATUS_OFFLINE . " "; |
|
247 | + $cond = " WHERE status = "._SF_STATUS_OFFLINE." "; |
|
248 | 248 | $status_explaination = _AM_SF_OFFLINE_EXP; |
249 | 249 | break; |
250 | 250 | |
251 | 251 | case _SF_STATUS_REJECTED_QUESTION : |
252 | 252 | $selectedtxt8 = "selected='selected'"; |
253 | 253 | $caption = _AM_SF_REJECTED_QUESTION; |
254 | - $cond = " WHERE status = " . _SF_STATUS_REJECTED_QUESTION . " "; |
|
254 | + $cond = " WHERE status = "._SF_STATUS_REJECTED_QUESTION." "; |
|
255 | 255 | $status_explaination = _AM_SF_REJECTED_QUESTION_EXP; |
256 | 256 | break; |
257 | 257 | |
258 | 258 | case _SF_STATUS_REJECTED_SMARTFAQ : |
259 | 259 | $selectedtxt9 = "selected='selected'"; |
260 | 260 | $caption = _AM_SF_REJECTED_SMARTFAQ; |
261 | - $cond = " WHERE status = " . _SF_STATUS_REJECTED_SMARTFAQ . " "; |
|
261 | + $cond = " WHERE status = "._SF_STATUS_REJECTED_SMARTFAQ." "; |
|
262 | 262 | $status_explaination = _AM_SF_REJECTED_SMARTFAQ_EXP; |
263 | 263 | break; |
264 | 264 | } |
265 | 265 | |
266 | 266 | /* -- Code to show selected terms -- */ |
267 | -echo "<form name='pick' id='pick' action='" . $_SERVER['PHP_SELF'] . "' method='POST' style='margin: 0;'>"; |
|
267 | +echo "<form name='pick' id='pick' action='".$_SERVER['PHP_SELF']."' method='POST' style='margin: 0;'>"; |
|
268 | 268 | |
269 | 269 | echo " |
270 | 270 | <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;'> |
271 | 271 | <tr> |
272 | - <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING . " " . $caption . "</span></td> |
|
273 | - <td align='right'>" . _AM_SF_SELECT_SORT . " |
|
272 | + <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING." ".$caption."</span></td> |
|
273 | + <td align='right'>" . _AM_SF_SELECT_SORT." |
|
274 | 274 | <select name='sortsel' onchange='submit()'> |
275 | - <option value='faq.faqid' $sorttxtfaqid>" . _AM_SF_ID . "</option> |
|
276 | - <option value='category.name' $sorttxtcategory>" . _AM_SF_CATEGORY . "</option> |
|
277 | - <option value='faq.question' $sorttxtquestion>" . _AM_SF_QUESTION . "</option> |
|
278 | - <option value='faq.datesub' $sorttxtcreated>" . _AM_SF_CREATED . "</option> |
|
279 | - <option value='faq.weight' $sorttxtweight>" . _AM_SF_WEIGHT . "</option> |
|
275 | + <option value='faq.faqid' $sorttxtfaqid>"._AM_SF_ID."</option> |
|
276 | + <option value='category.name' $sorttxtcategory>"._AM_SF_CATEGORY."</option> |
|
277 | + <option value='faq.question' $sorttxtquestion>"._AM_SF_QUESTION."</option> |
|
278 | + <option value='faq.datesub' $sorttxtcreated>"._AM_SF_CREATED."</option> |
|
279 | + <option value='faq.weight' $sorttxtweight>"._AM_SF_WEIGHT."</option> |
|
280 | 280 | </select> |
281 | 281 | <select name='ordersel' onchange='submit()'> |
282 | - <option value='ASC' $ordertxtasc>" . _AM_SF_ASC . "</option> |
|
283 | - <option value='DESC' $ordertxtdesc>" . _AM_SF_DESC . "</option> |
|
282 | + <option value='ASC' $ordertxtasc>"._AM_SF_ASC."</option> |
|
283 | + <option value='DESC' $ordertxtdesc>"._AM_SF_DESC."</option> |
|
284 | 284 | </select> |
285 | - " . _AM_SF_SELECT_STATUS . " : |
|
285 | + " . _AM_SF_SELECT_STATUS." : |
|
286 | 286 | <select name='statussel' onchange='submit()'> |
287 | - <option value='0' $selectedtxt0>" . _AM_SF_ALL . " [$totalfaqs]</option> |
|
288 | - <option value='1' $selectedtxt1>" . _AM_SF_ASKED . " [$totalasked]</option> |
|
289 | - <option value='2' $selectedtxt2>" . _AM_SF_OPENED . " [$totalopened]</option> |
|
290 | - <option value='3' $selectedtxt3>" . _AM_SF_ANSWERED . " [$totalanswered]</option> |
|
291 | - <option value='4' $selectedtxt4>" . _AM_SF_SUBMITTED . " [$totalsubmitted]</option> |
|
292 | - <option value='5' $selectedtxt5>" . _AM_SF_PUBLISHED . " [$totalpublished]</option> |
|
293 | - <option value='6' $selectedtxt6>" . _AM_SF_NEWANSWER . " [$totalnewanswers]</option> |
|
294 | - <option value='7' $selectedtxt7>" . _AM_SF_OFFLINE . " [$totaloffline]</option> |
|
295 | - <option value='8' $selectedtxt8>" . _AM_SF_REJECTED_QUESTION . " [$totalrejectedquestion]</option> |
|
296 | - <option value='9' $selectedtxt9>" . _AM_SF_REJECTED_SMARTFAQ . " [$totalrejectedsmartfaq]</option> |
|
287 | + <option value='0' $selectedtxt0>"._AM_SF_ALL." [$totalfaqs]</option> |
|
288 | + <option value='1' $selectedtxt1>"._AM_SF_ASKED." [$totalasked]</option> |
|
289 | + <option value='2' $selectedtxt2>"._AM_SF_OPENED." [$totalopened]</option> |
|
290 | + <option value='3' $selectedtxt3>"._AM_SF_ANSWERED." [$totalanswered]</option> |
|
291 | + <option value='4' $selectedtxt4>"._AM_SF_SUBMITTED." [$totalsubmitted]</option> |
|
292 | + <option value='5' $selectedtxt5>"._AM_SF_PUBLISHED." [$totalpublished]</option> |
|
293 | + <option value='6' $selectedtxt6>"._AM_SF_NEWANSWER." [$totalnewanswers]</option> |
|
294 | + <option value='7' $selectedtxt7>"._AM_SF_OFFLINE." [$totaloffline]</option> |
|
295 | + <option value='8' $selectedtxt8>"._AM_SF_REJECTED_QUESTION." [$totalrejectedquestion]</option> |
|
296 | + <option value='9' $selectedtxt9>"._AM_SF_REJECTED_SMARTFAQ." [$totalrejectedsmartfaq]</option> |
|
297 | 297 | </select> |
298 | 298 | </td> |
299 | 299 | </tr> |
@@ -301,8 +301,8 @@ discard block |
||
301 | 301 | </form>"; |
302 | 302 | |
303 | 303 | // Get number of entries in the selected state |
304 | -$numrows = ($statussel == 0)? $totalfaqs : $totalfaqbystatus[$statussel]; |
|
305 | -$statusSelected = ($statussel == 0)? _SF_STATUS_ALL : $statussel; |
|
304 | +$numrows = ($statussel == 0) ? $totalfaqs : $totalfaqbystatus[$statussel]; |
|
305 | +$statusSelected = ($statussel == 0) ? _SF_STATUS_ALL : $statussel; |
|
306 | 306 | |
307 | 307 | // creating the Q&As objects |
308 | 308 | $faqsObj = $faq_handler->getFaqsAdminSide($xoopsModuleConfig['perpage'], $startentry, $statusSelected, -1, $sortsel, $ordersel); |
@@ -319,9 +319,9 @@ discard block |
||
319 | 319 | //$answer_handler =& sf_gethandler('answer'); |
320 | 320 | //$answer_arr = $answer_handler->getCountByFAQ($answer_criteria); |
321 | 321 | |
322 | - foreach ( array_keys($faqsObj) as $i ) { |
|
322 | + foreach (array_keys($faqsObj) as $i) { |
|
323 | 323 | // Creating the category object to which this faq is linked |
324 | - $categoryObj =& $allcats[$faqsObj[$i]->categoryid()]; |
|
324 | + $categoryObj = & $allcats[$faqsObj[$i]->categoryid()]; |
|
325 | 325 | global $pathIcon16, $smartModuleConfig; |
326 | 326 | |
327 | 327 | //$answers = $answer_arr[$i]; |
@@ -331,65 +331,65 @@ discard block |
||
331 | 331 | switch ($faqsObj[$i]->status()) { |
332 | 332 | case _SF_STATUS_ASKED : |
333 | 333 | $statustxt = _AM_SF_ASKED; |
334 | - $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> "; |
|
334 | + $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> "; |
|
335 | 335 | $modify = ""; |
336 | - $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>"; |
|
336 | + $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>"; |
|
337 | 337 | break; |
338 | 338 | |
339 | 339 | case _SF_STATUS_OPENED : |
340 | 340 | $statustxt = _AM_SF_OPENED; |
341 | 341 | $approve = ""; |
342 | - $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> "; |
|
343 | - $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 | + $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> "; |
|
343 | + $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>"; |
|
344 | 344 | break; |
345 | 345 | |
346 | 346 | case _SF_STATUS_ANSWERED : |
347 | 347 | $statustxt = _AM_SF_ANSWERED; |
348 | - $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> "; |
|
348 | + $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> "; |
|
349 | 349 | $modify = ""; |
350 | - $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>"; |
|
350 | + $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>"; |
|
351 | 351 | break; |
352 | 352 | |
353 | 353 | case _SF_STATUS_SUBMITTED : |
354 | 354 | $statustxt = _AM_SF_SUBMITTED; |
355 | - $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> "; |
|
356 | - $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 | + $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> "; |
|
356 | + $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>"; |
|
357 | 357 | $modify = ""; |
358 | 358 | break; |
359 | 359 | |
360 | 360 | case _SF_STATUS_PUBLISHED : |
361 | 361 | $statustxt = _AM_SF_PUBLISHED; |
362 | 362 | $approve = ""; |
363 | - $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> "; |
|
364 | - $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 | + $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> "; |
|
364 | + $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>"; |
|
365 | 365 | break; |
366 | 366 | |
367 | 367 | case _SF_STATUS_NEW_ANSWER : |
368 | 368 | $statustxt = _AM_SF_NEWANSWER; |
369 | - $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> "; |
|
370 | - $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 | + $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> "; |
|
370 | + $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>"; |
|
371 | 371 | $modify = ""; |
372 | 372 | break; |
373 | 373 | |
374 | 374 | case _SF_STATUS_OFFLINE : |
375 | 375 | $statustxt = _AM_SF_OFFLINE; |
376 | 376 | $approve = ""; |
377 | - $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> "; |
|
378 | - $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 | + $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> "; |
|
378 | + $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>"; |
|
379 | 379 | break; |
380 | 380 | |
381 | 381 | case _SF_STATUS_REJECTED_QUESTION : |
382 | 382 | $statustxt = _AM_SF_REJECTED_QUESTION; |
383 | 383 | $approve = ""; |
384 | - $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> "; |
|
385 | - $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 | + $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> "; |
|
385 | + $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>"; |
|
386 | 386 | break; |
387 | 387 | |
388 | 388 | case _SF_STATUS_REJECTED_SMARTFAQ : |
389 | 389 | $statustxt = _AM_SF_REJECTED_SMARTFAQ; |
390 | 390 | $approve = ""; |
391 | - $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> "; |
|
392 | - $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 | + $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> "; |
|
392 | + $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>"; |
|
393 | 393 | break; |
394 | 394 | |
395 | 395 | case "default" : |
@@ -403,18 +403,18 @@ discard block |
||
403 | 403 | //$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> "; |
404 | 404 | |
405 | 405 | echo "<tr>"; |
406 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . "</td>"; |
|
407 | - echo "<td class='even' align='left'>" . $categoryObj->name() . "</td>"; |
|
408 | - echo "<td class='even' align='left'>" . $faqsObj[$i]->question(100) . "</td>"; |
|
406 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid()."</td>"; |
|
407 | + echo "<td class='even' align='left'>".$categoryObj->name()."</td>"; |
|
408 | + echo "<td class='even' align='left'>".$faqsObj[$i]->question(100)."</td>"; |
|
409 | 409 | |
410 | 410 | //mb--------------------------------------- |
411 | 411 | //adding name of the Question Submitter |
412 | 412 | $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
413 | - echo "<td class='even' align='center'>" . $requester . "</td>"; |
|
413 | + echo "<td class='even' align='center'>".$requester."</td>"; |
|
414 | 414 | |
415 | 415 | //adding name of the Answer Submitter |
416 | 416 | |
417 | - $answer_handler =& sf_gethandler('answer'); |
|
417 | + $answer_handler = & sf_gethandler('answer'); |
|
418 | 418 | |
419 | 419 | $criteria = new CriteriaCompo(); |
420 | 420 | $criteria->add(new Criteria('faqid', $faqsObj[$i]->faqid())); |
@@ -434,20 +434,20 @@ discard block |
||
434 | 434 | } else { |
435 | 435 | $answerSubmitter = '--------'; |
436 | 436 | } |
437 | - echo "<td class='even' align='center'>" . $answerSubmitter . "</td>"; |
|
437 | + echo "<td class='even' align='center'>".$answerSubmitter."</td>"; |
|
438 | 438 | |
439 | 439 | //mb--------------------------------------- |
440 | 440 | |
441 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . "</td>"; |
|
442 | - echo "<td class='even' align='center'>" . $statustxt . "</td>"; |
|
441 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s')."</td>"; |
|
442 | + echo "<td class='even' align='center'>".$statustxt."</td>"; |
|
443 | 443 | //echo "<td class='even' align='center'>" . $answers . "</td>"; |
444 | - echo "<td class='even' align='center'> ". $approve . $modify . $delete . "</td>"; |
|
444 | + echo "<td class='even' align='center'> ".$approve.$modify.$delete."</td>"; |
|
445 | 445 | echo "</tr>"; |
446 | 446 | } |
447 | 447 | } else { |
448 | 448 | // that is, $numrows = 0, there's no entries yet |
449 | 449 | echo "<tr>"; |
450 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQSSEL . "</td>"; |
|
450 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQSSEL."</td>"; |
|
451 | 451 | echo "</tr>"; |
452 | 452 | } |
453 | 453 | echo "</table>\n"; |
@@ -455,9 +455,9 @@ discard block |
||
455 | 455 | $pagenav = new XoopsPageNav($numrows, $xoopsModuleConfig['perpage'], $startentry, 'startentry', "statussel=$statussel&sortsel=$sortsel&ordersel=$ordersel"); |
456 | 456 | |
457 | 457 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
458 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderImageNav() . '</div>'; |
|
458 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderImageNav().'</div>'; |
|
459 | 459 | } else { |
460 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderNav() . '</div>'; |
|
460 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderNav().'</div>'; |
|
461 | 461 | } |
462 | 462 | // ENDs code to show active entries |
463 | 463 | echo "</div>"; |
@@ -465,4 +465,4 @@ discard block |
||
465 | 465 | echo "</div>"; |
466 | 466 | echo "</div>"; |
467 | 467 | |
468 | -include_once __DIR__ . '/admin_footer.php'; |
|
468 | +include_once __DIR__.'/admin_footer.php'; |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | if (isset($HTTP_GET_VARS['fct'])) { |
37 | 37 | $fct = trim($HTTP_GET_VARS['fct']); |
38 | 38 | } |
39 | -if (empty($fct)) $fct = 'preferences' ; |
|
40 | -include dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
39 | +if (empty($fct)) $fct = 'preferences'; |
|
40 | +include dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
41 | 41 | include XOOPS_ROOT_PATH."/include/cp_functions.php"; |
42 | 42 | |
43 | 43 | include_once XOOPS_ROOT_PATH."/kernel/module.php"; |
@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | $admintest = 0; |
46 | 46 | |
47 | 47 | if (is_object($xoopsUser)) { |
48 | - $xoopsModule =& XoopsModule::getByDirname("system"); |
|
49 | - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { |
|
50 | - redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); |
|
48 | + $xoopsModule = & XoopsModule::getByDirname("system"); |
|
49 | + if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
|
50 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
51 | 51 | exit(); |
52 | 52 | } |
53 | - $admintest=1; |
|
53 | + $admintest = 1; |
|
54 | 54 | } else { |
55 | - redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); |
|
55 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
56 | 56 | exit(); |
57 | 57 | } |
58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | if (isset($fct) && $fct != '') { |
64 | 64 | if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { |
65 | 65 | |
66 | - include_once( XOOPS_ROOT_PATH."/modules/system/language/" . $xoopsConfig['language'] . "/admin.php" ) ; |
|
66 | + include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php"); |
|
67 | 67 | |
68 | 68 | if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { |
69 | 69 | include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; |
72 | 72 | } |
73 | 73 | include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; |
74 | - $sysperm_handler =& xoops_gethandler('groupperm'); |
|
75 | - $category = !empty($modversion['category'])? intval($modversion['category']) : 0; |
|
74 | + $sysperm_handler = & xoops_gethandler('groupperm'); |
|
75 | + $category = !empty($modversion['category']) ? intval($modversion['category']) : 0; |
|
76 | 76 | unset($modversion); |
77 | 77 | if ($category > 0) { |
78 | - $groups =& $xoopsUser->getGroups(); |
|
78 | + $groups = & $xoopsUser->getGroups(); |
|
79 | 79 | if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { |
80 | 80 | if (file_exists("../include/{$fct}.inc.php")) { |
81 | - include_once "../include/{$fct}.inc.php" ; |
|
81 | + include_once "../include/{$fct}.inc.php"; |
|
82 | 82 | } else { |
83 | 83 | $error = true; |
84 | 84 | } |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | $groups = $xoopsUser->getGroups(); |
111 | 111 | $all_ok = false; |
112 | 112 | if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { |
113 | - $sysperm_handler =& xoops_gethandler('groupperm'); |
|
114 | - $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups); |
|
113 | + $sysperm_handler = & xoops_gethandler('groupperm'); |
|
114 | + $ok_syscats = & $sysperm_handler->getItemIds('system_admin', $groups); |
|
115 | 115 | } else { |
116 | 116 | $all_ok = true; |
117 | 117 | } |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { |
124 | 124 | include $admin_dir.'/'.$file.'/xoops_version.php'; |
125 | 125 | if ($modversion['hasAdmin']) { |
126 | - $category = isset($modversion['category'])? intval($modversion['category']) : 0; |
|
126 | + $category = isset($modversion['category']) ? intval($modversion['category']) : 0; |
|
127 | 127 | if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { |
128 | 128 | echo "<td class='$class' align='center' valign='bottom' width='19%'>"; |
129 | - echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; |
|
129 | + echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>".trim($modversion['name'])."</b></a>\n"; |
|
130 | 130 | echo "</td>"; |
131 | 131 | ++$counter; |
132 | - $class = ($class == 'even')? 'odd' : 'even'; |
|
132 | + $class = ($class == 'even') ? 'odd' : 'even'; |
|
133 | 133 | } |
134 | 134 | if ($counter > 4) { |
135 | 135 | $counter = 0; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | while ($counter < 5) { |
144 | 144 | echo '<td class="'.$class.'"> </td>'; |
145 | - $class = ($class == 'even')? 'odd' : 'even'; |
|
145 | + $class = ($class == 'even') ? 'odd' : 'even'; |
|
146 | 146 | ++$counter; |
147 | 147 | } |
148 | 148 | echo '</tr></table>'; |
@@ -36,7 +36,9 @@ |
||
36 | 36 | if (isset($HTTP_GET_VARS['fct'])) { |
37 | 37 | $fct = trim($HTTP_GET_VARS['fct']); |
38 | 38 | } |
39 | -if (empty($fct)) $fct = 'preferences' ; |
|
39 | +if (empty($fct)) { |
|
40 | + $fct = 'preferences' ; |
|
41 | +} |
|
40 | 42 | include dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
41 | 43 | include XOOPS_ROOT_PATH."/include/cp_functions.php"; |
42 | 44 |
@@ -26,39 +26,39 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | switch ($op) { |
29 | - case "default": |
|
30 | - default: |
|
31 | - global $xoopsDB, $xoopsModule; |
|
29 | + case "default": |
|
30 | + default: |
|
31 | + global $xoopsDB, $xoopsModule; |
|
32 | 32 | |
33 | - $indexAdmin = new ModuleAdmin(); |
|
34 | - xoops_cp_header(); |
|
35 | - echo $indexAdmin->addNavigation('permissions.php'); |
|
36 | - //sf_adminMenu(4, _AM_SF_PERMISSIONS); |
|
37 | - // View Categories permissions |
|
38 | - $item_list_view = array(); |
|
39 | - $block_view = array(); |
|
40 | - // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
|
41 | - sf_collapsableBar('toptable', 'toptableicon'); |
|
33 | + $indexAdmin = new ModuleAdmin(); |
|
34 | + xoops_cp_header(); |
|
35 | + echo $indexAdmin->addNavigation('permissions.php'); |
|
36 | + //sf_adminMenu(4, _AM_SF_PERMISSIONS); |
|
37 | + // View Categories permissions |
|
38 | + $item_list_view = array(); |
|
39 | + $block_view = array(); |
|
40 | + // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
|
41 | + sf_collapsableBar('toptable', 'toptableicon'); |
|
42 | 42 | |
43 | - $result_view = $xoopsDB->query("SELECT categoryid, name FROM " . $xoopsDB->prefix("smartfaq_categories") . " "); |
|
44 | - if ($xoopsDB->getRowsNum($result_view)) { |
|
45 | - while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
|
46 | - $item_list_view['cid'] = $myrow_view['categoryid']; |
|
47 | - $item_list_view['title'] = $myrow_view['name']; |
|
48 | - $form_view = new XoopsGroupPermForm("", $xoopsModule->getVar('mid'), "category_read", "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_VIEW_CATS . "</span>",'admin/permissions.php'); |
|
49 | - $block_view[] = $item_list_view; |
|
50 | - foreach ($block_view as $itemlists) { |
|
51 | - $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
|
43 | + $result_view = $xoopsDB->query("SELECT categoryid, name FROM " . $xoopsDB->prefix("smartfaq_categories") . " "); |
|
44 | + if ($xoopsDB->getRowsNum($result_view)) { |
|
45 | + while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
|
46 | + $item_list_view['cid'] = $myrow_view['categoryid']; |
|
47 | + $item_list_view['title'] = $myrow_view['name']; |
|
48 | + $form_view = new XoopsGroupPermForm("", $xoopsModule->getVar('mid'), "category_read", "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_VIEW_CATS . "</span>",'admin/permissions.php'); |
|
49 | + $block_view[] = $item_list_view; |
|
50 | + foreach ($block_view as $itemlists) { |
|
51 | + $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
|
52 | + } |
|
52 | 53 | } |
53 | - } |
|
54 | - echo $form_view->render(); |
|
55 | - } else { |
|
56 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_NOPERMSSET . "</span>"; |
|
54 | + echo $form_view->render(); |
|
55 | + } else { |
|
56 | + echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_NOPERMSSET . "</span>"; |
|
57 | 57 | |
58 | - } |
|
59 | - echo "</div>"; |
|
58 | + } |
|
59 | + echo "</div>"; |
|
60 | 60 | |
61 | - echo "<br />\n"; |
|
61 | + echo "<br />\n"; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | include_once __DIR__ . '/admin_footer.php'; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
11 | -include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | +include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; |
|
12 | 12 | |
13 | 13 | if (!sf_userIsAdmin()) { |
14 | 14 | redirect_header("javascript:history.go(-1)", 1, _NOPERM); |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
41 | 41 | sf_collapsableBar('toptable', 'toptableicon'); |
42 | 42 | |
43 | - $result_view = $xoopsDB->query("SELECT categoryid, name FROM " . $xoopsDB->prefix("smartfaq_categories") . " "); |
|
43 | + $result_view = $xoopsDB->query("SELECT categoryid, name FROM ".$xoopsDB->prefix("smartfaq_categories")." "); |
|
44 | 44 | if ($xoopsDB->getRowsNum($result_view)) { |
45 | 45 | while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
46 | 46 | $item_list_view['cid'] = $myrow_view['categoryid']; |
47 | 47 | $item_list_view['title'] = $myrow_view['name']; |
48 | - $form_view = new XoopsGroupPermForm("", $xoopsModule->getVar('mid'), "category_read", "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_VIEW_CATS . "</span>",'admin/permissions.php'); |
|
48 | + $form_view = new XoopsGroupPermForm("", $xoopsModule->getVar('mid'), "category_read", "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_PERMISSIONSVIEWMAN."</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"._AM_SF_VIEW_CATS."</span>", 'admin/permissions.php'); |
|
49 | 49 | $block_view[] = $item_list_view; |
50 | 50 | foreach ($block_view as $itemlists) { |
51 | 51 | $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | echo $form_view->render(); |
55 | 55 | } else { |
56 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_NOPERMSSET . "</span>"; |
|
56 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_PERMISSIONSVIEWMAN."</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"._AM_SF_NOPERMSSET."</span>"; |
|
57 | 57 | |
58 | 58 | } |
59 | 59 | echo "</div>"; |
@@ -61,4 +61,4 @@ discard block |
||
61 | 61 | echo "<br />\n"; |
62 | 62 | } |
63 | 63 | |
64 | -include_once __DIR__ . '/admin_footer.php'; |
|
64 | +include_once __DIR__.'/admin_footer.php'; |
@@ -201,7 +201,7 @@ |
||
201 | 201 | exit(); |
202 | 202 | } |
203 | 203 | } else { |
204 | - $uid = $xoopsUser->uid(); |
|
204 | + $uid = $xoopsUser->uid(); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | $faqid = (isset($_POST['faqid']))? intval($_POST['faqid']) : -1; |
@@ -7,26 +7,26 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | 11 | |
12 | 12 | // Creating the faq handler object |
13 | -$faq_handler =& sf_gethandler('faq'); |
|
13 | +$faq_handler = & sf_gethandler('faq'); |
|
14 | 14 | |
15 | 15 | // Creating the category handler object |
16 | -$category_handler =& sf_gethandler('category'); |
|
16 | +$category_handler = & sf_gethandler('category'); |
|
17 | 17 | |
18 | 18 | $op = ''; |
19 | 19 | if (isset($_GET['op'])) $op = $_GET['op']; |
20 | 20 | if (isset($_POST['op'])) $op = $_POST['op']; |
21 | 21 | |
22 | 22 | // Where shall we start? |
23 | -$startfaq = isset($_GET['startfaq'])? intval($_GET['startfaq']) : 0; |
|
23 | +$startfaq = isset($_GET['startfaq']) ? intval($_GET['startfaq']) : 0; |
|
24 | 24 | |
25 | 25 | function editfaq($showmenu = false, $faqid = -1) |
26 | 26 | { |
27 | 27 | global $faq_handler, $category_handler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
28 | 28 | |
29 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
29 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
30 | 30 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
31 | 31 | if ($faqid != -1) { |
32 | 32 | // Creating the FAQ object |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | switch ($faqObj->status()) { |
40 | 40 | |
41 | 41 | case _SF_STATUS_ASKED : |
42 | - $breadcrumb_action = _AM_SF_APPROVING; |
|
42 | + $breadcrumb_action = _AM_SF_APPROVING; |
|
43 | 43 | $collapsableBar_title = _AM_SF_QUESTION_APPROVING; |
44 | 44 | $collapsableBar_info = _AM_SF_QUESTION_APPROVING_INFO; |
45 | 45 | $button_caption = _AM_SF_QUEUE; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | case "default" : |
49 | 49 | default : |
50 | - $breadcrumb_action = _AM_SF_EDITING; |
|
50 | + $breadcrumb_action = _AM_SF_EDITING; |
|
51 | 51 | $collapsableBar_title = _AM_SF_EDITQUES; |
52 | 52 | $collapsableBar_info = _AM_SF_EDITING_INFO; |
53 | 53 | $button_caption = _AM_SF_MODIFY; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | // Creating the category of this FAQ |
58 | - $categoryObj =& $category_handler->get($faqObj->categoryid()); |
|
58 | + $categoryObj = & $category_handler->get($faqObj->categoryid()); |
|
59 | 59 | |
60 | 60 | if ($showmenu) { |
61 | 61 | //sf_adminMenu(3, _AM_SF_OPEN_QUESTIONS . " > " . $breadcrumb_action); |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | |
64 | 64 | echo "<br />\n"; |
65 | 65 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
66 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . $collapsableBar_title . "</h3>"; |
|
66 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> ".$collapsableBar_title."</h3>"; |
|
67 | 67 | echo "<div id='bottomtable'>"; |
68 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . $collapsableBar_info . "</span>"; |
|
68 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".$collapsableBar_info."</span>"; |
|
69 | 69 | } else { |
70 | 70 | // there's no parameter, so we're adding a faq |
71 | - $faqObj =& $faq_handler->create(); |
|
71 | + $faqObj = & $faq_handler->create(); |
|
72 | 72 | $faqObj->setVar('uid', $xoopsUser->getVar('uid')); |
73 | - $categoryObj =& $category_handler->create(); |
|
73 | + $categoryObj = & $category_handler->create(); |
|
74 | 74 | |
75 | 75 | $breadcrumb_action = _AM_SF_CREATINGNEW; |
76 | 76 | $button_caption = _AM_SF_CREATE; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | //sf_adminMenu(3, _AM_SF_OPEN_QUESTIONS . " > " . $breadcrumb_action); |
79 | 79 | } |
80 | 80 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
81 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CREATEQUESTION . "</h3>"; |
|
81 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_CREATEQUESTION."</h3>"; |
|
82 | 82 | echo "<div id='bottomtable'>"; |
83 | 83 | } |
84 | 84 | $sform = new XoopsThemeForm(_AM_SF_OPEN_QUESTION, "op", xoops_getenv('PHP_SELF')); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * Last one is not set as we do not have sub menus in Smartfaq |
96 | 96 | */ |
97 | 97 | |
98 | - $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid" , "parentid"); |
|
98 | + $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid", "parentid"); |
|
99 | 99 | ob_start(); |
100 | 100 | $mytree->makeMySelBox("name", "weight", $categoryObj->categoryid()); |
101 | 101 | $sform->addElement(new XoopsFormLabel(_AM_SF_CATEGORY_QUESTION, ob_get_contents())); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $button_tray->addElement($butt_create); |
153 | 153 | |
154 | 154 | $butt_edit = new XoopsFormButton('', '', _AM_SF_OPEN_QUESTION_EDIT, 'button'); |
155 | - $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&faqid=" . $faqid . "'\""); |
|
155 | + $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&faqid=".$faqid."'\""); |
|
156 | 156 | $button_tray->addElement($butt_edit); |
157 | 157 | |
158 | 158 | $butt_cancel = new XoopsFormButton('', '', _AM_SF_CANCEL, 'button'); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | case "mod": |
172 | 172 | |
173 | 173 | Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts; |
174 | - $faqid = (isset($_GET['faqid']))? $_GET['faqid'] : -1; |
|
174 | + $faqid = (isset($_GET['faqid'])) ? $_GET['faqid'] : -1; |
|
175 | 175 | |
176 | 176 | if ($faqid == -1) { |
177 | 177 | $totalcategories = $category_handler->getCategoriesCount(-1); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | xoops_cp_header(); |
186 | 186 | |
187 | 187 | echo $indexAdmin->addNavigation('question.php'); |
188 | - include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; |
|
188 | + include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; |
|
189 | 189 | |
190 | 190 | editfaq(true, $faqid); |
191 | 191 | break; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $uid = $xoopsUser->uid(); |
205 | 205 | } |
206 | 206 | |
207 | - $faqid = (isset($_POST['faqid']))? intval($_POST['faqid']) : -1; |
|
207 | + $faqid = (isset($_POST['faqid'])) ? intval($_POST['faqid']) : -1; |
|
208 | 208 | |
209 | 209 | // Creating the FAQ |
210 | 210 | if ($faqid != -1) { |
@@ -214,10 +214,10 @@ discard block |
||
214 | 214 | } |
215 | 215 | |
216 | 216 | // Putting the values in the FAQ object |
217 | - $faqObj->setGroups_read(isset($_POST['groups'])? $_POST['groups'] : array()); |
|
218 | - $faqObj->setVar('categoryid', (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0); |
|
217 | + $faqObj->setGroups_read(isset($_POST['groups']) ? $_POST['groups'] : array()); |
|
218 | + $faqObj->setVar('categoryid', (isset($_POST['categoryid'])) ? intval($_POST['categoryid']) : 0); |
|
219 | 219 | $faqObj->setVar('question', $_POST['question']); |
220 | - $faqObj->setVar('status', (isset($_POST['status']))? intval($_POST['status']) : _SF_STATUS_ASKED); |
|
220 | + $faqObj->setVar('status', (isset($_POST['status'])) ? intval($_POST['status']) : _SF_STATUS_ASKED); |
|
221 | 221 | |
222 | 222 | $notifToDo = null; |
223 | 223 | |
@@ -248,8 +248,8 @@ discard block |
||
248 | 248 | $faqObj->setVar('status', $status); |
249 | 249 | |
250 | 250 | // Storing the FAQ |
251 | - if ( !$faqObj->store() ) { |
|
252 | - redirect_header("javascript:history.go(-1)", 3, _AM_SF_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
251 | + if (!$faqObj->store()) { |
|
252 | + redirect_header("javascript:history.go(-1)", 3, _AM_SF_ERROR.sf_formatErrors($faqObj->getErrors())); |
|
253 | 253 | exit; |
254 | 254 | } |
255 | 255 | |
@@ -269,16 +269,16 @@ discard block |
||
269 | 269 | $module_id = $xoopsModule->getVar('mid'); |
270 | 270 | $gperm_handler = &xoops_gethandler('groupperm'); |
271 | 271 | |
272 | - $faqid = (isset($_POST['faqid']))? intval($_POST['faqid']) : 0; |
|
273 | - $faqid = (isset($_GET['faqid']))? intval($_GET['faqid']) : $faqid; |
|
272 | + $faqid = (isset($_POST['faqid'])) ? intval($_POST['faqid']) : 0; |
|
273 | + $faqid = (isset($_GET['faqid'])) ? intval($_GET['faqid']) : $faqid; |
|
274 | 274 | |
275 | 275 | $faqObj = new sfFaq($faqid); |
276 | 276 | |
277 | - $confirm = (isset($_POST['confirm']))? $_POST['confirm'] : 0; |
|
278 | - $question = (isset($_POST['question']))? $_POST['question'] : ''; |
|
277 | + $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0; |
|
278 | + $question = (isset($_POST['question'])) ? $_POST['question'] : ''; |
|
279 | 279 | |
280 | 280 | if ($confirm) { |
281 | - if ( !$faq_handler->delete($faqObj)) { |
|
281 | + if (!$faq_handler->delete($faqObj)) { |
|
282 | 282 | redirect_header("question.php", 2, _AM_SF_FAQ_DELETE_ERROR); |
283 | 283 | exit; |
284 | 284 | } |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | exit(); |
288 | 288 | } else { |
289 | 289 | // no confirm: show deletion condition |
290 | - $faqid = (isset($_GET['faqid']))? intval($_GET['faqid']) : 0; |
|
290 | + $faqid = (isset($_GET['faqid'])) ? intval($_GET['faqid']) : 0; |
|
291 | 291 | xoops_cp_header(); |
292 | - xoops_confirm(array('op' => 'del', 'faqid' => $faqObj->faqid(), 'confirm' => 1, 'name' => $faqObj->question()), 'question.php', _AM_SF_DELETETHISQUESTION . " <br />'" . $faqObj->question() . "'. <br /> <br />", _AM_SF_DELETE); |
|
292 | + xoops_confirm(array('op' => 'del', 'faqid' => $faqObj->faqid(), 'confirm' => 1, 'name' => $faqObj->question()), 'question.php', _AM_SF_DELETETHISQUESTION." <br />'".$faqObj->question()."'. <br /> <br />", _AM_SF_DELETE); |
|
293 | 293 | xoops_cp_footer(); |
294 | 294 | } |
295 | 295 | |
@@ -304,8 +304,8 @@ discard block |
||
304 | 304 | |
305 | 305 | //sf_adminMenu(3, _AM_SF_OPEN_QUESTIONS); |
306 | 306 | |
307 | - include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; |
|
308 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
307 | + include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; |
|
308 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
309 | 309 | |
310 | 310 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $smartModuleConfig; |
311 | 311 | |
@@ -313,9 +313,9 @@ discard block |
||
313 | 313 | |
314 | 314 | sf_collapsableBar('toptable', 'toptableicon'); |
315 | 315 | |
316 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_OPENED_TITLE . "</h3>"; |
|
316 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_OPENED_TITLE."</h3>"; |
|
317 | 317 | echo "<div id='toptable'>"; |
318 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_OPENED_DSC . "</span>"; |
|
318 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_OPENED_DSC."</span>"; |
|
319 | 319 | |
320 | 320 | // Get the total number of published FAQs |
321 | 321 | $totalfaqs = $faq_handler->getFaqsCount(-1, array(_SF_STATUS_OPENED)); |
@@ -325,48 +325,48 @@ discard block |
||
325 | 325 | $allcats = $category_handler->getObjects(null, true); |
326 | 326 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
327 | 327 | echo "<tr>"; |
328 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . "</b></td>"; |
|
329 | - echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . "</b></td>"; |
|
330 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . "</b></td>"; |
|
328 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID."</b></td>"; |
|
329 | + echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME."</b></td>"; |
|
330 | + echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION."</b></td>"; |
|
331 | 331 | |
332 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . "</b></td>"; |
|
332 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED."</b></td>"; |
|
333 | 333 | |
334 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . "</b></td>"; |
|
335 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; |
|
334 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED."</b></td>"; |
|
335 | + echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION."</b></td>"; |
|
336 | 336 | echo "</tr>"; |
337 | 337 | //var_dump( $faqsObj); |
338 | 338 | if ($totalfaqs > 0) { |
339 | 339 | global $pathIcon16; |
340 | - foreach ( array_keys($faqsObj) as $i) { |
|
341 | - $categoryObj =& $allcats[$faqsObj[$i]->categoryid()]; |
|
340 | + foreach (array_keys($faqsObj) as $i) { |
|
341 | + $categoryObj = & $allcats[$faqsObj[$i]->categoryid()]; |
|
342 | 342 | |
343 | - $modify = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_EDITART . "'></a>"; |
|
344 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
343 | + $modify = "<a href='question.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_EDITART."'></a>"; |
|
344 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
345 | 345 | |
346 | - $requester= sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
|
346 | + $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
|
347 | 347 | |
348 | 348 | echo "<tr>"; |
349 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . "</td>"; |
|
350 | - echo "<td class='even' align='left'>" . $categoryObj->name() . "</td>"; |
|
351 | - echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/answer.php?faqid=" . $faqsObj[$i]->faqid() . "'>" . $faqsObj[$i]->question(100) . "</a></td>"; |
|
349 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid()."</td>"; |
|
350 | + echo "<td class='even' align='left'>".$categoryObj->name()."</td>"; |
|
351 | + echo "<td class='even' align='left'><a href='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/answer.php?faqid=".$faqsObj[$i]->faqid()."'>".$faqsObj[$i]->question(100)."</a></td>"; |
|
352 | 352 | |
353 | - echo "<td class='even' align='center'>" . $requester . "</td>"; |
|
353 | + echo "<td class='even' align='center'>".$requester."</td>"; |
|
354 | 354 | |
355 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . "</td>"; |
|
355 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s')."</td>"; |
|
356 | 356 | echo "<td class='even' align='center'> $modify $delete </td>"; |
357 | 357 | echo "</tr>"; |
358 | 358 | } |
359 | 359 | } else { |
360 | 360 | $faqid = -1; |
361 | 361 | echo "<tr>"; |
362 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOQUEUED . "</td>"; |
|
362 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOQUEUED."</td>"; |
|
363 | 363 | echo "</tr>"; |
364 | 364 | } |
365 | 365 | echo "</table>\n"; |
366 | 366 | echo "<br />\n"; |
367 | 367 | |
368 | 368 | $pagenav = new XoopsPageNav($totalfaqs, $xoopsModuleConfig['perpage'], $startfaq, 'startfaq'); |
369 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
369 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
370 | 370 | echo "</div>"; |
371 | 371 | |
372 | 372 | $totalcategories = $category_handler->getCategoriesCount(-1); |
@@ -377,4 +377,4 @@ discard block |
||
377 | 377 | break; |
378 | 378 | } |
379 | 379 | |
380 | -include_once __DIR__ . '/admin_footer.php'; |
|
380 | +include_once __DIR__.'/admin_footer.php'; |
@@ -16,8 +16,12 @@ |
||
16 | 16 | $category_handler =& sf_gethandler('category'); |
17 | 17 | |
18 | 18 | $op = ''; |
19 | -if (isset($_GET['op'])) $op = $_GET['op']; |
|
20 | -if (isset($_POST['op'])) $op = $_POST['op']; |
|
19 | +if (isset($_GET['op'])) { |
|
20 | + $op = $_GET['op']; |
|
21 | +} |
|
22 | +if (isset($_POST['op'])) { |
|
23 | + $op = $_POST['op']; |
|
24 | +} |
|
21 | 25 | |
22 | 26 | // Where shall we start? |
23 | 27 | $startfaq = isset($_GET['startfaq'])? intval($_GET['startfaq']) : 0; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * |
12 | 12 | */ |
13 | 13 | |
14 | -include_once __DIR__ . '/admin_header.php'; |
|
14 | +include_once __DIR__.'/admin_header.php'; |
|
15 | 15 | |
16 | 16 | $importFromModuleName = 'WF-FAQ'; |
17 | 17 | $scriptname = 'wffaq.php'; |
@@ -26,61 +26,61 @@ discard block |
||
26 | 26 | include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
27 | 27 | xoops_cp_header(); |
28 | 28 | //sf_adminMenu(-1, _AM_SF_IMPORT); |
29 | - $result = $xoopsDB->query ("select count(*) from ".$xoopsDB->prefix("faqcategories")); |
|
30 | - list ($totalCat) = $xoopsDB->fetchRow ($result); |
|
29 | + $result = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("faqcategories")); |
|
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 ($totalCat == 0) { |
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 | - include_once XOOPS_ROOT_PATH . "/class/xoopstree.php"; |
|
39 | + include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; |
|
40 | 40 | |
41 | - $result = $xoopsDB->query ("select count(*) from ".$xoopsDB->prefix("faqtopics")); |
|
42 | - list ($totalFAQ) = $xoopsDB->fetchRow ($result); |
|
41 | + $result = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("faqtopics")); |
|
42 | + list ($totalFAQ) = $xoopsDB->fetchRow($result); |
|
43 | 43 | |
44 | 44 | if ($totalFAQ == 0) { |
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 | 47 | |
48 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ) . "</span>"; |
|
48 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ)."</span>"; |
|
49 | 49 | |
50 | - $form = new XoopsThemeForm (_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL. "/modules/smartfaq/admin/" . $scriptname); |
|
50 | + $form = new XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL."/modules/smartfaq/admin/".$scriptname); |
|
51 | 51 | |
52 | 52 | // Categories to be imported |
53 | - $cat_cbox = new XoopsFormCheckBox (sprintf(_AM_SF_IMPORT_CATEGORIES, $importFromModuleName), 'import_category', -1); |
|
54 | - $result = $xoopsDB->query ("select c.catID, c.name, count(t.topicID) from ".$xoopsDB->prefix("faqcategories")." as c, ".$xoopsDB->prefix("faqtopics")." as t where c.catID=t.catID group by t.catID order by c.weight"); |
|
55 | - while (list ($cid, $cat_title, $count) = $xoopsDB->fetchRow ($result)) { |
|
56 | - $cat_cbox->addOption ($cid, "$cat_title ($count)<br\>"); |
|
53 | + $cat_cbox = new XoopsFormCheckBox(sprintf(_AM_SF_IMPORT_CATEGORIES, $importFromModuleName), 'import_category', -1); |
|
54 | + $result = $xoopsDB->query("select c.catID, c.name, count(t.topicID) from ".$xoopsDB->prefix("faqcategories")." as c, ".$xoopsDB->prefix("faqtopics")." as t where c.catID=t.catID group by t.catID order by c.weight"); |
|
55 | + while (list ($cid, $cat_title, $count) = $xoopsDB->fetchRow($result)) { |
|
56 | + $cat_cbox->addOption($cid, "$cat_title ($count)<br\>"); |
|
57 | 57 | } |
58 | - $form->addElement ($cat_cbox); |
|
58 | + $form->addElement($cat_cbox); |
|
59 | 59 | |
60 | 60 | // SmartFAQ parent category |
61 | 61 | $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid", "parentid"); |
62 | 62 | ob_start(); |
63 | - $mytree->makeMySelBox("name", "weight", $preset_id=0, $none=1, $sel_name="parent_category"); |
|
63 | + $mytree->makeMySelBox("name", "weight", $preset_id = 0, $none = 1, $sel_name = "parent_category"); |
|
64 | 64 | $form->addElement(new XoopsFormLabel(_AM_SF_IMPORT_PARENT_CATEGORY, ob_get_contents())); |
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 | - $member_handler =& xoops_gethandler ('member'); |
|
72 | - $user_select = new XoopsFormSelect (_AM_SF_IMPORTED_USER, 'uid', 0); |
|
73 | - $user_select->addOption (0, '----'); |
|
71 | + $member_handler = & xoops_gethandler('member'); |
|
72 | + $user_select = new XoopsFormSelect(_AM_SF_IMPORTED_USER, 'uid', 0); |
|
73 | + $user_select->addOption(0, '----'); |
|
74 | 74 | //$criteria = new CriteriaCompo (); |
75 | 75 | //$criteria->setSort ('uname'); |
76 | 76 | //$criteria->setOrder ('ASC'); |
77 | - $user_select->addOptionArray ($member_handler->getUserList()); |
|
78 | - $form->addElement ($user_select); |
|
77 | + $user_select->addOptionArray($member_handler->getUserList()); |
|
78 | + $form->addElement($user_select); |
|
79 | 79 | |
80 | 80 | // Q&As can be commented? |
81 | - $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '')); |
|
81 | + $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'')); |
|
82 | 82 | $group_list = &$member_handler->getGroupList(); |
83 | - $groups_selected = array (); |
|
83 | + $groups_selected = array(); |
|
84 | 84 | $groups_checkbox = new XoopsFormCheckBox(_AM_SF_IMPORT_PERMISSIONS, 'groups_read'); |
85 | 85 | foreach ($group_list as $group_id => $group_name) { |
86 | 86 | if ($group_id != XOOPS_GROUP_ADMIN) { |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | $groups_checkbox->addOption($group_id, $group_name); |
89 | 89 | } |
90 | 90 | } |
91 | - $groups_checkbox->setValue ($groups_selected); |
|
91 | + $groups_checkbox->setValue($groups_selected); |
|
92 | 92 | $form->addElement($groups_checkbox); |
93 | 93 | |
94 | - $form->addElement (new XoopsFormHidden('op', 'go')); |
|
95 | - $form->addElement (new XoopsFormButton ('', 'import', _AM_SF_IMPORT, 'submit')); |
|
94 | + $form->addElement(new XoopsFormHidden('op', 'go')); |
|
95 | + $form->addElement(new XoopsFormButton('', 'import', _AM_SF_IMPORT, 'submit')); |
|
96 | 96 | |
97 | 97 | $form->display(); |
98 | 98 | } |
@@ -102,39 +102,39 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | if ($op == 'go') { |
105 | - $import_category = (isset($_POST['import_category'])? ($_POST['import_category']) : null); |
|
105 | + $import_category = (isset($_POST['import_category']) ? ($_POST['import_category']) : null); |
|
106 | 106 | if (!$import_category) { |
107 | 107 | redirect_header($scriptname, 2, _AM_SF_NOCATSELECTED); |
108 | 108 | exit; |
109 | 109 | } |
110 | 110 | |
111 | - include_once __DIR__ . '/admin_header.php'; |
|
111 | + include_once __DIR__.'/admin_header.php'; |
|
112 | 112 | xoops_cp_header(); |
113 | 113 | //sf_adminMenu(-1, _AM_SF_IMPORT); |
114 | 114 | |
115 | 115 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
116 | - 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 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName)."</h3>"; |
|
117 | 117 | echo "<div id='bottomtable'>"; |
118 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_IMPORT_RESULT . "</span>"; |
|
118 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_IMPORT_RESULT."</span>"; |
|
119 | 119 | |
120 | 120 | $cnt_imported_cat = 0; |
121 | 121 | $cnt_imported_faq = 0; |
122 | 122 | |
123 | 123 | $parentId = $_POST['parent_category']; |
124 | - $groups_read = isset($_POST['groups_read'])? $_POST['groups_read'] : array(); |
|
125 | - $uid = !empty($_POST['uid'])? $_POST['uid'] : 0; |
|
124 | + $groups_read = isset($_POST['groups_read']) ? $_POST['groups_read'] : array(); |
|
125 | + $uid = !empty($_POST['uid']) ? $_POST['uid'] : 0; |
|
126 | 126 | $cancomment = $_POST['cancomment']; |
127 | 127 | $autoaprove = $_POST['autoaprove']; |
128 | 128 | |
129 | - if (is_array ($_POST['import_category'])) { |
|
130 | - $import_category_list = implode (',', $_POST['import_category']); |
|
129 | + if (is_array($_POST['import_category'])) { |
|
130 | + $import_category_list = implode(',', $_POST['import_category']); |
|
131 | 131 | } else { |
132 | 132 | $import_category_list = $_POST['import_category']; |
133 | 133 | } |
134 | 134 | |
135 | - $category_handler =& sf_gethandler('category'); |
|
136 | - $faq_handler =& sf_gethandler('faq'); |
|
137 | - $answer_handler =& sf_gethandler('answer'); |
|
135 | + $category_handler = & sf_gethandler('category'); |
|
136 | + $faq_handler = & sf_gethandler('faq'); |
|
137 | + $answer_handler = & sf_gethandler('answer'); |
|
138 | 138 | |
139 | 139 | /*echo "Parent Category ID: $parentId<br/>"; |
140 | 140 | echo "Groups Read: " . implode (",", $groups_read) . "<br/>"; |
@@ -143,22 +143,22 @@ discard block |
||
143 | 143 | echo "Can Comment: $cancomment<br/>"; |
144 | 144 | echo "Auto aprove: $autoaprove<br/>";*/ |
145 | 145 | |
146 | - $resultCat = $xoopsDB->query ("select * from ".$xoopsDB->prefix("faqcategories")." where catID in ($import_category_list) order by weight"); |
|
146 | + $resultCat = $xoopsDB->query("select * from ".$xoopsDB->prefix("faqcategories")." where catID in ($import_category_list) order by weight"); |
|
147 | 147 | |
148 | - while ($arrCat = $xoopsDB->fetchArray ($resultCat)) { |
|
149 | - extract ($arrCat, EXTR_PREFIX_ALL, 'wfc'); |
|
148 | + while ($arrCat = $xoopsDB->fetchArray($resultCat)) { |
|
149 | + extract($arrCat, EXTR_PREFIX_ALL, 'wfc'); |
|
150 | 150 | |
151 | 151 | // insert category into SmartFAQ |
152 | 152 | $categoryObj = $category_handler->create(); |
153 | 153 | |
154 | - $categoryObj->setVar ('parentid', $parentId); |
|
155 | - $categoryObj->setVar ('weight', $wfc_weight); |
|
156 | - $categoryObj->setGroups_read (explode (" ", trim ($wfc_groupid))); |
|
157 | - $categoryObj->setVar ('name', $wfc_name); |
|
158 | - $categoryObj->setVar ('description', $wfc_description); |
|
154 | + $categoryObj->setVar('parentid', $parentId); |
|
155 | + $categoryObj->setVar('weight', $wfc_weight); |
|
156 | + $categoryObj->setGroups_read(explode(" ", trim($wfc_groupid))); |
|
157 | + $categoryObj->setVar('name', $wfc_name); |
|
158 | + $categoryObj->setVar('description', $wfc_description); |
|
159 | 159 | |
160 | 160 | if (!$categoryObj->store(false)) { |
161 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name) . "<br/>"; |
|
161 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name)."<br/>"; |
|
162 | 162 | continue; |
163 | 163 | } |
164 | 164 | |
@@ -166,11 +166,11 @@ discard block |
||
166 | 166 | |
167 | 167 | ++$cnt_imported_cat; |
168 | 168 | |
169 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name) . "<br\>"; |
|
169 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name)."<br\>"; |
|
170 | 170 | |
171 | - $resultFAQ = $xoopsDB->query ("select * from ".$xoopsDB->prefix("faqtopics")." where catID=$wfc_catID order by weight"); |
|
172 | - while ($arrFAQ = $xoopsDB->fetchArray ($resultFAQ)) { |
|
173 | - extract ($arrFAQ, EXTR_PREFIX_ALL, 'wft'); |
|
171 | + $resultFAQ = $xoopsDB->query("select * from ".$xoopsDB->prefix("faqtopics")." where catID=$wfc_catID order by weight"); |
|
172 | + while ($arrFAQ = $xoopsDB->fetchArray($resultFAQ)) { |
|
173 | + extract($arrFAQ, EXTR_PREFIX_ALL, 'wft'); |
|
174 | 174 | |
175 | 175 | if ($autoaprove) { |
176 | 176 | if ($wft_submit) { |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | // insert question into SmartFAQ |
186 | - $faqObj =& $faq_handler->create(); |
|
187 | - $answerObj =& $answer_handler->create(); |
|
186 | + $faqObj = & $faq_handler->create(); |
|
187 | + $answerObj = & $answer_handler->create(); |
|
188 | 188 | |
189 | - $faqObj->setGroups_read (explode (" ", trim ($wft_groupid))); |
|
189 | + $faqObj->setGroups_read(explode(" ", trim($wft_groupid))); |
|
190 | 190 | $faqObj->setVar('categoryid', $categoryObj->categoryid()); |
191 | 191 | $faqObj->setVar('question', $wft_question); |
192 | 192 | $faqObj->setVar('uid', $wft_uid); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $faqObj->setVar('exacturl', 0); |
201 | 201 | |
202 | 202 | if (!$faqObj->store(false)) { |
203 | - echo sprintf(" " . _AM_SF_IMPORT_FAQ_ERROR, $wft_question) . "<br/>"; |
|
203 | + echo sprintf(" "._AM_SF_IMPORT_FAQ_ERROR, $wft_question)."<br/>"; |
|
204 | 204 | continue; |
205 | 205 | } else { |
206 | 206 | $answerObj->setVar('faqid', $faqObj->faqid()); |
@@ -209,10 +209,10 @@ discard block |
||
209 | 209 | $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); |
210 | 210 | |
211 | 211 | if (!$answerObj->store()) { |
212 | - echo sprintf(" " . _AM_SF_IMPORT_FAQ_ERROR) . "<br/>"; |
|
212 | + echo sprintf(" "._AM_SF_IMPORT_FAQ_ERROR)."<br/>"; |
|
213 | 213 | continue; |
214 | 214 | } else { |
215 | - echo " " . sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)) . "<br />"; |
|
215 | + echo " ".sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50))."<br />"; |
|
216 | 216 | ++$cnt_imported_faq; |
217 | 217 | } |
218 | 218 | } |
@@ -222,8 +222,8 @@ discard block |
||
222 | 222 | } |
223 | 223 | |
224 | 224 | echo "Done.<br/>"; |
225 | - echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat) . "<br/>"; |
|
226 | - echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq) . "<br/>"; |
|
225 | + echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat)."<br/>"; |
|
226 | + echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq)."<br/>"; |
|
227 | 227 | |
228 | 228 | exit (); |
229 | 229 | } |
@@ -211,155 +211,155 @@ |
||
211 | 211 | } |
212 | 212 | |
213 | 213 | switch ($op) { |
214 | - case "mod": |
|
215 | - $categoryid = isset($_GET['categoryid'])? intval($_GET['categoryid']) : 0 ; |
|
216 | - $destList = isset($_POST['destList'])? $_POST['destList'] : ''; |
|
217 | - $indexAdmin = new ModuleAdmin(); |
|
218 | - xoops_cp_header(); |
|
214 | + case "mod": |
|
215 | + $categoryid = isset($_GET['categoryid'])? intval($_GET['categoryid']) : 0 ; |
|
216 | + $destList = isset($_POST['destList'])? $_POST['destList'] : ''; |
|
217 | + $indexAdmin = new ModuleAdmin(); |
|
218 | + xoops_cp_header(); |
|
219 | 219 | |
220 | - echo $indexAdmin->addNavigation('category.php'); |
|
221 | - editcat(true, $categoryid); |
|
222 | - break; |
|
220 | + echo $indexAdmin->addNavigation('category.php'); |
|
221 | + editcat(true, $categoryid); |
|
222 | + break; |
|
223 | 223 | |
224 | - case "addcategory": |
|
225 | - global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
|
224 | + case "addcategory": |
|
225 | + global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
|
226 | 226 | |
227 | - $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
227 | + $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
228 | 228 | |
229 | - if ($categoryid != 0) { |
|
230 | - $categoryObj = new sfCategory($categoryid); |
|
231 | - } else { |
|
232 | - $categoryObj = $category_handler->create(); |
|
233 | - } |
|
229 | + if ($categoryid != 0) { |
|
230 | + $categoryObj = new sfCategory($categoryid); |
|
231 | + } else { |
|
232 | + $categoryObj = $category_handler->create(); |
|
233 | + } |
|
234 | 234 | |
235 | - //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
|
236 | - //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
|
235 | + //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
|
236 | + //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
|
237 | 237 | |
238 | - $categoryObj->setVar('parentid', (isset($_POST['parentid']))? intval($_POST['parentid']) : 0); |
|
239 | - $applyall = (isset($_POST['applyall']))? intval($_POST['applyall']) : 0; |
|
240 | - $categoryObj->setVar('weight', (isset($_POST['weight']))? intval($_POST['weight']) : 1); |
|
238 | + $categoryObj->setVar('parentid', (isset($_POST['parentid']))? intval($_POST['parentid']) : 0); |
|
239 | + $applyall = (isset($_POST['applyall']))? intval($_POST['applyall']) : 0; |
|
240 | + $categoryObj->setVar('weight', (isset($_POST['weight']))? intval($_POST['weight']) : 1); |
|
241 | 241 | |
242 | - // Groups and permissions |
|
243 | - if (isset($_POST['groups_read'])) { |
|
244 | - $categoryObj->setGroups_read($_POST['groups_read']); |
|
245 | - } else { |
|
246 | - $categoryObj->setGroups_read(); |
|
247 | - } |
|
248 | - // $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array(); |
|
249 | - // $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array(); |
|
250 | - |
|
251 | - $categoryObj->setVar('name', $_POST['name']); |
|
242 | + // Groups and permissions |
|
243 | + if (isset($_POST['groups_read'])) { |
|
244 | + $categoryObj->setGroups_read($_POST['groups_read']); |
|
245 | + } else { |
|
246 | + $categoryObj->setGroups_read(); |
|
247 | + } |
|
248 | + // $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array(); |
|
249 | + // $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array(); |
|
250 | + |
|
251 | + $categoryObj->setVar('name', $_POST['name']); |
|
252 | + |
|
253 | + $categoryObj->setVar('description', $_POST['description']); |
|
254 | + if ($categoryObj->isNew()) { |
|
255 | + $redirect_msg = _AM_SF_CATCREATED; |
|
256 | + $redirect_to = 'category.php?op=mod'; |
|
257 | + } else { |
|
258 | + $redirect_msg = _AM_SF_COLMODIFIED; |
|
259 | + $redirect_to = 'category.php'; |
|
260 | + } |
|
252 | 261 | |
253 | - $categoryObj->setVar('description', $_POST['description']); |
|
254 | - if ($categoryObj->isNew()) { |
|
255 | - $redirect_msg = _AM_SF_CATCREATED; |
|
256 | - $redirect_to = 'category.php?op=mod'; |
|
257 | - } else { |
|
258 | - $redirect_msg = _AM_SF_COLMODIFIED; |
|
259 | - $redirect_to = 'category.php'; |
|
260 | - } |
|
262 | + if ( !$categoryObj->store() ) { |
|
263 | + redirect_header("javascript:history.go(-1)", 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
264 | + exit; |
|
265 | + } |
|
266 | + // TODO : put this function in the category class |
|
267 | + sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
|
268 | + //sf_saveCategory_Permissions($groups_admin, $categoriesObj->categoryid(), 'category_admin'); |
|
261 | 269 | |
262 | - if ( !$categoryObj->store() ) { |
|
263 | - redirect_header("javascript:history.go(-1)", 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
264 | - exit; |
|
265 | - } |
|
266 | - // TODO : put this function in the category class |
|
267 | - sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
|
268 | - //sf_saveCategory_Permissions($groups_admin, $categoriesObj->categoryid(), 'category_admin'); |
|
270 | + if ($applyall) { |
|
271 | + // TODO : put this function in the category class |
|
272 | + sf_overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid()); |
|
273 | + } |
|
269 | 274 | |
270 | - if ($applyall) { |
|
271 | - // TODO : put this function in the category class |
|
272 | - sf_overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid()); |
|
273 | - } |
|
275 | + redirect_header($redirect_to, 2, $redirect_msg); |
|
274 | 276 | |
275 | - redirect_header($redirect_to, 2, $redirect_msg); |
|
277 | + exit(); |
|
278 | + break; |
|
276 | 279 | |
277 | - exit(); |
|
278 | - break; |
|
280 | + case "del": |
|
281 | + global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET; |
|
279 | 282 | |
280 | - case "del": |
|
281 | - global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET; |
|
283 | + $module_id = $xoopsModule->getVar('mid'); |
|
284 | + $gperm_handler = &xoops_gethandler('groupperm'); |
|
282 | 285 | |
283 | - $module_id = $xoopsModule->getVar('mid'); |
|
284 | - $gperm_handler = &xoops_gethandler('groupperm'); |
|
286 | + $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
287 | + $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : $categoryid; |
|
285 | 288 | |
286 | - $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
287 | - $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : $categoryid; |
|
289 | + $categoryObj = new sfCategory($categoryid); |
|
288 | 290 | |
289 | - $categoryObj = new sfCategory($categoryid); |
|
291 | + $confirm = (isset($_POST['confirm']))? $_POST['confirm'] : 0; |
|
292 | + $name = (isset($_POST['name']))? $_POST['name'] : ''; |
|
290 | 293 | |
291 | - $confirm = (isset($_POST['confirm']))? $_POST['confirm'] : 0; |
|
292 | - $name = (isset($_POST['name']))? $_POST['name'] : ''; |
|
294 | + if ($confirm) { |
|
295 | + if ( !$category_handler->delete($categoryObj)) { |
|
296 | + redirect_header("category.php", 1, _AM_SF_DELETE_CAT_ERROR); |
|
297 | + exit; |
|
298 | + } |
|
293 | 299 | |
294 | - if ($confirm) { |
|
295 | - if ( !$category_handler->delete($categoryObj)) { |
|
296 | - redirect_header("category.php", 1, _AM_SF_DELETE_CAT_ERROR); |
|
297 | - exit; |
|
300 | + redirect_header("category.php", 1, sprintf(_AM_SF_COLISDELETED, $name)); |
|
301 | + exit(); |
|
302 | + } else { |
|
303 | + // no confirm: show deletion condition |
|
304 | + $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : 0; |
|
305 | + xoops_cp_header(); |
|
306 | + xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
307 | + xoops_cp_footer(); |
|
298 | 308 | } |
299 | - |
|
300 | - redirect_header("category.php", 1, sprintf(_AM_SF_COLISDELETED, $name)); |
|
301 | 309 | exit(); |
302 | - } else { |
|
303 | - // no confirm: show deletion condition |
|
304 | - $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : 0; |
|
305 | - xoops_cp_header(); |
|
306 | - xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
307 | - xoops_cp_footer(); |
|
308 | - } |
|
309 | - exit(); |
|
310 | - break; |
|
311 | - |
|
312 | - case "cancel": |
|
313 | - redirect_header("category.php", 1, sprintf(_AM_SF_BACK2IDX, '')); |
|
314 | - exit(); |
|
310 | + break; |
|
315 | 311 | |
316 | - case "default": |
|
317 | - default: |
|
312 | + case "cancel": |
|
313 | + redirect_header("category.php", 1, sprintf(_AM_SF_BACK2IDX, '')); |
|
314 | + exit(); |
|
318 | 315 | |
319 | - $indexAdmin = new ModuleAdmin(); |
|
320 | - xoops_cp_header(); |
|
316 | + case "default": |
|
317 | + default: |
|
321 | 318 | |
322 | - echo $indexAdmin->addNavigation('category.php'); |
|
323 | - //sf_adminMenu(1, _AM_SF_CATEGORIES); |
|
319 | + $indexAdmin = new ModuleAdmin(); |
|
320 | + xoops_cp_header(); |
|
324 | 321 | |
325 | - echo "<br />\n"; |
|
322 | + echo $indexAdmin->addNavigation('category.php'); |
|
323 | + //sf_adminMenu(1, _AM_SF_CATEGORIES); |
|
326 | 324 | |
327 | - // Creating the objects for top categories |
|
328 | - $categoriesObj = $category_handler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
|
325 | + echo "<br />\n"; |
|
329 | 326 | |
330 | - sf_collapsableBar('toptable', 'toptableicon'); |
|
331 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CATEGORIES_TITLE . "</h3>"; |
|
332 | - echo "<div id='toptable'>"; |
|
333 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_CATEGORIES_DSC . "</span>"; |
|
327 | + // Creating the objects for top categories |
|
328 | + $categoriesObj = $category_handler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
|
334 | 329 | |
335 | - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
|
336 | - echo "<tr>"; |
|
337 | - echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . "</b></td>"; |
|
338 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . "</b></td>"; |
|
339 | - echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . "</b></td>"; |
|
340 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; |
|
341 | - echo "</tr>"; |
|
342 | - $totalCategories = $category_handler->getCategoriesCount(0); |
|
343 | - if (count($categoriesObj) > 0) { |
|
344 | - foreach ($categoriesObj as $key => $thiscat) { |
|
345 | - displayCategory($thiscat); |
|
330 | + sf_collapsableBar('toptable', 'toptableicon'); |
|
331 | + echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CATEGORIES_TITLE . "</h3>"; |
|
332 | + echo "<div id='toptable'>"; |
|
333 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_CATEGORIES_DSC . "</span>"; |
|
346 | 334 | |
347 | - } |
|
348 | - } else { |
|
335 | + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
|
349 | 336 | echo "<tr>"; |
350 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . "</td>"; |
|
337 | + echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . "</b></td>"; |
|
338 | + echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . "</b></td>"; |
|
339 | + echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . "</b></td>"; |
|
340 | + echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; |
|
351 | 341 | echo "</tr>"; |
352 | - $categoryid = '0'; |
|
353 | - } |
|
354 | - echo "</table>\n"; |
|
355 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
356 | - $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
|
357 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
358 | - echo "</div>"; |
|
342 | + $totalCategories = $category_handler->getCategoriesCount(0); |
|
343 | + if (count($categoriesObj) > 0) { |
|
344 | + foreach ($categoriesObj as $key => $thiscat) { |
|
345 | + displayCategory($thiscat); |
|
346 | + |
|
347 | + } |
|
348 | + } else { |
|
349 | + echo "<tr>"; |
|
350 | + echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . "</td>"; |
|
351 | + echo "</tr>"; |
|
352 | + $categoryid = '0'; |
|
353 | + } |
|
354 | + echo "</table>\n"; |
|
355 | + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
356 | + $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
|
357 | + echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
358 | + echo "</div>"; |
|
359 | 359 | |
360 | - editcat(false); |
|
360 | + editcat(false); |
|
361 | 361 | |
362 | - break; |
|
362 | + break; |
|
363 | 363 | } |
364 | 364 | |
365 | 365 | include_once __DIR__ . '/admin_footer.php'; |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | 11 | |
12 | 12 | // Creating the category handler object |
13 | -$category_handler =& sf_gethandler('category'); |
|
13 | +$category_handler = & sf_gethandler('category'); |
|
14 | 14 | |
15 | 15 | $op = ''; |
16 | 16 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | if (isset($_POST['op'])) $op = $_POST['op']; |
19 | 19 | |
20 | 20 | // Where do we start? |
21 | -$startcategory = isset($_GET['startcategory'])? intval($_GET['startcategory']) : 0; |
|
21 | +$startcategory = isset($_GET['startcategory']) ? intval($_GET['startcategory']) : 0; |
|
22 | 22 | |
23 | 23 | function displayCategory($categoryObj, $level = 0) |
24 | 24 | { |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | $description = $categoryObj->description(); |
27 | 27 | if (!XOOPS_USE_MULTIBYTES) { |
28 | 28 | if (strlen($description) >= 100) { |
29 | - $description = substr($description, 0, (100 -1)) . "..."; |
|
29 | + $description = substr($description, 0, (100-1))."..."; |
|
30 | 30 | } |
31 | 31 | } |
32 | - $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_EDITCOL . "' alt='" . _AM_SF_EDITCOL . "' /></a>"; |
|
33 | - $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETECOL . "' alt='" . _AM_SF_DELETECOL . "' /></a>"; |
|
32 | + $modify = "<a href='category.php?op=mod&categoryid=".$categoryObj->categoryid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITCOL."' alt='"._AM_SF_EDITCOL."' /></a>"; |
|
33 | + $delete = "<a href='category.php?op=del&categoryid=".$categoryObj->categoryid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETECOL."' alt='"._AM_SF_DELETECOL."' /></a>"; |
|
34 | 34 | |
35 | 35 | $spaces = ''; |
36 | 36 | for ($j = 0; $j < $level; ++$j) { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | echo "<tr>"; |
41 | - echo "<td class='even' align='lefet'>" . $spaces . "<a href='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/category.php?categoryid=" . $categoryObj->categoryid() . "'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/icon/subcat.gif' alt='' /> " . $categoryObj->name() . "</a></td>"; |
|
42 | - echo "<td class='even' align='left'>" . $description . "</td>"; |
|
43 | - echo "<td class='even' align='center'>" . $categoryObj->weight() . "</td>"; |
|
41 | + echo "<td class='even' align='lefet'>".$spaces."<a href='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/category.php?categoryid=".$categoryObj->categoryid()."'><img src='".XOOPS_URL."/modules/smartfaq/assets/images/icon/subcat.gif' alt='' /> ".$categoryObj->name()."</a></td>"; |
|
42 | + echo "<td class='even' align='left'>".$description."</td>"; |
|
43 | + echo "<td class='even' align='center'>".$categoryObj->weight()."</td>"; |
|
44 | 44 | echo "<td class='even' align='center'> $modify $delete </td>"; |
45 | 45 | echo "</tr>"; |
46 | 46 | $subCategoriesObj = $category_handler->getCategories(0, 0, $categoryObj->categoryid()); |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | { |
58 | 58 | //$moderators = array(); // just to define the variable |
59 | 59 | //$allmods = array(); |
60 | - $startfaq = isset($_GET['startfaq'])? intval($_GET['startfaq']) : 0; |
|
60 | + $startfaq = isset($_GET['startfaq']) ? intval($_GET['startfaq']) : 0; |
|
61 | 61 | Global $category_handler, $xoopsUser, $xoopsUser, $myts, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $_GET; |
62 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
62 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
63 | 63 | |
64 | 64 | // Creating the faq handler object |
65 | - $faq_handler =& sf_gethandler('faq'); |
|
65 | + $faq_handler = & sf_gethandler('faq'); |
|
66 | 66 | |
67 | 67 | echo "<script type=\"text/javascript\" src=\"funcs.js\"></script>"; |
68 | 68 | echo "<style>"; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | exit(); |
86 | 86 | } |
87 | 87 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
88 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_EDITCOL . "</h3>"; |
|
88 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_EDITCOL."</h3>"; |
|
89 | 89 | echo "<div id='bottomtable'>"; |
90 | 90 | } else { |
91 | 91 | $categoryObj = $category_handler->create(); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | echo "<br />\n"; |
96 | 96 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
97 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CATEGORY_CREATE . "</h3>"; |
|
97 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_CATEGORY_CREATE."</h3>"; |
|
98 | 98 | echo "<div id='bottomtable'>"; |
99 | 99 | } |
100 | 100 | // Start category form |
@@ -105,12 +105,12 @@ discard block |
||
105 | 105 | $sform->addElement(new XoopsFormText(_AM_SF_CATEGORY, 'name', 50, 255, $categoryObj->name('e')), true); |
106 | 106 | |
107 | 107 | // Parent Category |
108 | - $mytree = new XoopsTree( $xoopsDB -> prefix( "smartfaq_categories" ), "categoryid", "parentid" ); |
|
108 | + $mytree = new XoopsTree($xoopsDB -> prefix("smartfaq_categories"), "categoryid", "parentid"); |
|
109 | 109 | ob_start(); |
110 | - $mytree -> makeMySelBox( "name", "weight", $categoryObj->parentid(), 1, 'parentid' ); |
|
110 | + $mytree -> makeMySelBox("name", "weight", $categoryObj->parentid(), 1, 'parentid'); |
|
111 | 111 | |
112 | 112 | //makeMySelBox($title,$order="",$preset_id=0, $none=0, $sel_name="", $onchange="") |
113 | - $sform -> addElement( new XoopsFormLabel( _AM_SF_PARENT_CATEGORY_EXP, ob_get_contents() ) ); |
|
113 | + $sform -> addElement(new XoopsFormLabel(_AM_SF_PARENT_CATEGORY_EXP, ob_get_contents())); |
|
114 | 114 | ob_end_clean(); |
115 | 115 | |
116 | 116 | /* $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid" , "parentid"); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | $sform->addElement($groups_read_checkbox); |
141 | 141 | // Apply permissions on all faqs |
142 | - $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
142 | + $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
143 | 143 | $sform->addElement($addapplyall_radio); |
144 | 144 | // MODERATORS |
145 | 145 | //$moderators_tray = new XoopsFormElementTray(_AM_SF_MODERATORS_DEF, ''); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $sform->addElement($moderators_tray); |
164 | 164 | */ |
165 | - $sform -> addElement( new XoopsFormHidden( 'categoryid', $categoryid ) ); |
|
165 | + $sform -> addElement(new XoopsFormHidden('categoryid', $categoryid)); |
|
166 | 166 | |
167 | 167 | // Action buttons tray |
168 | 168 | $button_tray = new XoopsFormElementTray('', ''); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | echo "</div>"; |
205 | 205 | |
206 | 206 | if ($categoryid) { |
207 | - include_once XOOPS_ROOT_PATH . "/modules/smartfaq/include/displayfaqs.php"; |
|
207 | + include_once XOOPS_ROOT_PATH."/modules/smartfaq/include/displayfaqs.php"; |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | unset($hidden); |
@@ -212,8 +212,8 @@ discard block |
||
212 | 212 | |
213 | 213 | switch ($op) { |
214 | 214 | case "mod": |
215 | - $categoryid = isset($_GET['categoryid'])? intval($_GET['categoryid']) : 0 ; |
|
216 | - $destList = isset($_POST['destList'])? $_POST['destList'] : ''; |
|
215 | + $categoryid = isset($_GET['categoryid']) ? intval($_GET['categoryid']) : 0; |
|
216 | + $destList = isset($_POST['destList']) ? $_POST['destList'] : ''; |
|
217 | 217 | $indexAdmin = new ModuleAdmin(); |
218 | 218 | xoops_cp_header(); |
219 | 219 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | case "addcategory": |
225 | 225 | global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
226 | 226 | |
227 | - $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
227 | + $categoryid = (isset($_POST['categoryid'])) ? intval($_POST['categoryid']) : 0; |
|
228 | 228 | |
229 | 229 | if ($categoryid != 0) { |
230 | 230 | $categoryObj = new sfCategory($categoryid); |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
236 | 236 | //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
237 | 237 | |
238 | - $categoryObj->setVar('parentid', (isset($_POST['parentid']))? intval($_POST['parentid']) : 0); |
|
239 | - $applyall = (isset($_POST['applyall']))? intval($_POST['applyall']) : 0; |
|
240 | - $categoryObj->setVar('weight', (isset($_POST['weight']))? intval($_POST['weight']) : 1); |
|
238 | + $categoryObj->setVar('parentid', (isset($_POST['parentid'])) ? intval($_POST['parentid']) : 0); |
|
239 | + $applyall = (isset($_POST['applyall'])) ? intval($_POST['applyall']) : 0; |
|
240 | + $categoryObj->setVar('weight', (isset($_POST['weight'])) ? intval($_POST['weight']) : 1); |
|
241 | 241 | |
242 | 242 | // Groups and permissions |
243 | 243 | if (isset($_POST['groups_read'])) { |
@@ -259,8 +259,8 @@ discard block |
||
259 | 259 | $redirect_to = 'category.php'; |
260 | 260 | } |
261 | 261 | |
262 | - if ( !$categoryObj->store() ) { |
|
263 | - redirect_header("javascript:history.go(-1)", 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
262 | + if (!$categoryObj->store()) { |
|
263 | + redirect_header("javascript:history.go(-1)", 3, _AM_SF_CATEGORY_SAVE_ERROR.sf_formatErrors($categoryObj->getErrors())); |
|
264 | 264 | exit; |
265 | 265 | } |
266 | 266 | // TODO : put this function in the category class |
@@ -283,16 +283,16 @@ discard block |
||
283 | 283 | $module_id = $xoopsModule->getVar('mid'); |
284 | 284 | $gperm_handler = &xoops_gethandler('groupperm'); |
285 | 285 | |
286 | - $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
287 | - $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : $categoryid; |
|
286 | + $categoryid = (isset($_POST['categoryid'])) ? intval($_POST['categoryid']) : 0; |
|
287 | + $categoryid = (isset($_GET['categoryid'])) ? intval($_GET['categoryid']) : $categoryid; |
|
288 | 288 | |
289 | 289 | $categoryObj = new sfCategory($categoryid); |
290 | 290 | |
291 | - $confirm = (isset($_POST['confirm']))? $_POST['confirm'] : 0; |
|
292 | - $name = (isset($_POST['name']))? $_POST['name'] : ''; |
|
291 | + $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0; |
|
292 | + $name = (isset($_POST['name'])) ? $_POST['name'] : ''; |
|
293 | 293 | |
294 | 294 | if ($confirm) { |
295 | - if ( !$category_handler->delete($categoryObj)) { |
|
295 | + if (!$category_handler->delete($categoryObj)) { |
|
296 | 296 | redirect_header("category.php", 1, _AM_SF_DELETE_CAT_ERROR); |
297 | 297 | exit; |
298 | 298 | } |
@@ -301,9 +301,9 @@ discard block |
||
301 | 301 | exit(); |
302 | 302 | } else { |
303 | 303 | // no confirm: show deletion condition |
304 | - $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : 0; |
|
304 | + $categoryid = (isset($_GET['categoryid'])) ? intval($_GET['categoryid']) : 0; |
|
305 | 305 | xoops_cp_header(); |
306 | - xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
306 | + xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_SF_DELETECOL." '".$categoryObj->name()."'. <br /> <br />"._AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
307 | 307 | xoops_cp_footer(); |
308 | 308 | } |
309 | 309 | exit(); |
@@ -328,16 +328,16 @@ discard block |
||
328 | 328 | $categoriesObj = $category_handler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
329 | 329 | |
330 | 330 | sf_collapsableBar('toptable', 'toptableicon'); |
331 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CATEGORIES_TITLE . "</h3>"; |
|
331 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_CATEGORIES_TITLE."</h3>"; |
|
332 | 332 | echo "<div id='toptable'>"; |
333 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_CATEGORIES_DSC . "</span>"; |
|
333 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_CATEGORIES_DSC."</span>"; |
|
334 | 334 | |
335 | 335 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
336 | 336 | echo "<tr>"; |
337 | - echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . "</b></td>"; |
|
338 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . "</b></td>"; |
|
339 | - echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . "</b></td>"; |
|
340 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; |
|
337 | + echo "<th width='35%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME."</b></td>"; |
|
338 | + echo "<th class='bg3' align='left'><b>"._AM_SF_DESCRIP."</b></td>"; |
|
339 | + echo "<th class='bg3' width='65' align='center'><b>"._AM_SF_WEIGHT."</b></td>"; |
|
340 | + echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION."</b></td>"; |
|
341 | 341 | echo "</tr>"; |
342 | 342 | $totalCategories = $category_handler->getCategoriesCount(0); |
343 | 343 | if (count($categoriesObj) > 0) { |
@@ -347,14 +347,14 @@ discard block |
||
347 | 347 | } |
348 | 348 | } else { |
349 | 349 | echo "<tr>"; |
350 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . "</td>"; |
|
350 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOCAT."</td>"; |
|
351 | 351 | echo "</tr>"; |
352 | 352 | $categoryid = '0'; |
353 | 353 | } |
354 | 354 | echo "</table>\n"; |
355 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
355 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
356 | 356 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
357 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
357 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
358 | 358 | echo "</div>"; |
359 | 359 | |
360 | 360 | editcat(false); |
@@ -362,4 +362,4 @@ discard block |
||
362 | 362 | break; |
363 | 363 | } |
364 | 364 | |
365 | -include_once __DIR__ . '/admin_footer.php'; |
|
365 | +include_once __DIR__.'/admin_footer.php'; |
@@ -14,8 +14,12 @@ |
||
14 | 14 | |
15 | 15 | $op = ''; |
16 | 16 | |
17 | -if (isset($_GET['op'])) $op = $_GET['op']; |
|
18 | -if (isset($_POST['op'])) $op = $_POST['op']; |
|
17 | +if (isset($_GET['op'])) { |
|
18 | + $op = $_GET['op']; |
|
19 | +} |
|
20 | +if (isset($_POST['op'])) { |
|
21 | + $op = $_POST['op']; |
|
22 | +} |
|
19 | 23 | |
20 | 24 | // Where do we start? |
21 | 25 | $startcategory = isset($_GET['startcategory'])? intval($_GET['startcategory']) : 0; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | ." <div style='text-align: center;'>\n" |
23 | 23 | ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
24 | 24 | ." </div>\n" |
25 | - ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
25 | + ." "._AM_MODULEADMIN_ADMIN_FOOTER."\n" |
|
26 | 26 | ."</div>"; |
27 | 27 | |
28 | 28 | xoops_cp_footer(); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // GIJOE <http://www.peak.ne.jp/> // |
14 | 14 | // ------------------------------------------------------------------------- // |
15 | 15 | |
16 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
16 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
17 | 17 | include_once 'mygrouppermform.php'; |
18 | 18 | include_once(XOOPS_ROOT_PATH."/class/xoopsblock.php"); |
19 | 19 | include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/include/functions.php"; |
@@ -21,44 +21,44 @@ discard block |
||
21 | 21 | $xoops_system_path = XOOPS_ROOT_PATH."/modules/system"; |
22 | 22 | |
23 | 23 | // language files |
24 | -$language = $xoopsConfig['language'] ; |
|
24 | +$language = $xoopsConfig['language']; |
|
25 | 25 | if (!file_exists("$xoops_system_path/language/$language/admin/blocksadmin.php")) $language = 'english'; |
26 | 26 | |
27 | 27 | // to prevent from notice that constants already defined |
28 | 28 | $error_reporting_level = error_reporting(0); |
29 | -include_once( "$xoops_system_path/constants.php" ) ; |
|
30 | -include_once( "$xoops_system_path/language/$language/admin.php" ) ; |
|
31 | -include_once( "$xoops_system_path/language/$language/admin/blocksadmin.php" ) ; |
|
32 | -include_once XOOPS_ROOT_PATH . "/modules/smartfaq/include/functions.php"; |
|
33 | -error_reporting( $error_reporting_level ) ; |
|
29 | +include_once("$xoops_system_path/constants.php"); |
|
30 | +include_once("$xoops_system_path/language/$language/admin.php"); |
|
31 | +include_once("$xoops_system_path/language/$language/admin/blocksadmin.php"); |
|
32 | +include_once XOOPS_ROOT_PATH."/modules/smartfaq/include/functions.php"; |
|
33 | +error_reporting($error_reporting_level); |
|
34 | 34 | |
35 | -$group_defs = file( "$xoops_system_path/language/$language/admin/groups.php" ) ; |
|
35 | +$group_defs = file("$xoops_system_path/language/$language/admin/groups.php"); |
|
36 | 36 | foreach ($group_defs as $def) { |
37 | - if ( strstr( $def , '_AM_ACCESSRIGHTS' ) || strstr( $def , '_AM_ACTIVERIGHTS' ) ) eval( $def ) ; |
|
37 | + if (strstr($def, '_AM_ACCESSRIGHTS') || strstr($def, '_AM_ACTIVERIGHTS')) eval($def); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | // check $xoopsModule |
41 | -if ( ! is_object( $xoopsModule ) ) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
41 | +if (!is_object($xoopsModule)) redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
42 | 42 | |
43 | 43 | // check access right (needs system_admin of BLOCK) |
44 | -$sysperm_handler =& xoops_gethandler('groupperm'); |
|
45 | -if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
44 | +$sysperm_handler = & xoops_gethandler('groupperm'); |
|
45 | +if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
46 | 46 | |
47 | 47 | // get blocks owned by the module |
48 | -$block_arr =& XoopsBlock::getByModule( $xoopsModule->mid() ) ; |
|
48 | +$block_arr = & XoopsBlock::getByModule($xoopsModule->mid()); |
|
49 | 49 | |
50 | 50 | function list_blocks() |
51 | 51 | { |
52 | - global $block_arr, $xoopsModule ; |
|
52 | + global $block_arr, $xoopsModule; |
|
53 | 53 | |
54 | 54 | // cachetime options |
55 | 55 | $cachetimes = array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH); |
56 | 56 | |
57 | 57 | // displaying TH |
58 | 58 | sf_collapsableBar('toptable', 'toptableicon'); |
59 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_BLOCKS . "</h3>"; |
|
59 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_BLOCKS."</h3>"; |
|
60 | 60 | echo "<div id='toptable'>"; |
61 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_BLOCKSTXT . "</span>"; |
|
61 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_BLOCKSTXT."</span>"; |
|
62 | 62 | |
63 | 63 | echo " |
64 | 64 | <form action='admin.php' name='blockadmin' method='post'> |
@@ -73,69 +73,69 @@ discard block |
||
73 | 73 | </tr>\n" ; |
74 | 74 | |
75 | 75 | // blocks displaying loop |
76 | - $class = 'even' ; |
|
77 | - foreach ( array_keys( $block_arr ) as $i ) { |
|
76 | + $class = 'even'; |
|
77 | + foreach (array_keys($block_arr) as $i) { |
|
78 | 78 | $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = ""; |
79 | 79 | |
80 | - $weight = $block_arr[$i]->getVar("weight") ; |
|
81 | - $title = $block_arr[$i]->getVar("title") ; |
|
82 | - $name = $block_arr[$i]->getVar("name") ; |
|
83 | - $bcachetime = $block_arr[$i]->getVar("bcachetime") ; |
|
84 | - $bid = $block_arr[$i]->getVar("bid") ; |
|
80 | + $weight = $block_arr[$i]->getVar("weight"); |
|
81 | + $title = $block_arr[$i]->getVar("title"); |
|
82 | + $name = $block_arr[$i]->getVar("name"); |
|
83 | + $bcachetime = $block_arr[$i]->getVar("bcachetime"); |
|
84 | + $bid = $block_arr[$i]->getVar("bid"); |
|
85 | 85 | |
86 | 86 | // visible and side |
87 | - if ( $block_arr[$i]->getVar("visible") != 1 ) { |
|
87 | + if ($block_arr[$i]->getVar("visible") != 1) { |
|
88 | 88 | $sseln = " checked='checked' style='background-color:#FF0000;'"; |
89 | - } else switch ( $block_arr[$i]->getVar("side") ) { |
|
89 | + } else switch ($block_arr[$i]->getVar("side")) { |
|
90 | 90 | default : |
91 | 91 | case XOOPS_SIDEBLOCK_LEFT : |
92 | 92 | $ssel0 = " checked='checked' style='background-color:#00FF00;'"; |
93 | - break ; |
|
93 | + break; |
|
94 | 94 | case XOOPS_SIDEBLOCK_RIGHT : |
95 | 95 | $ssel1 = " checked='checked' style='background-color:#00FF00;'"; |
96 | - break ; |
|
96 | + break; |
|
97 | 97 | case XOOPS_CENTERBLOCK_LEFT : |
98 | 98 | $ssel2 = " checked='checked' style='background-color:#00FF00;'"; |
99 | - break ; |
|
99 | + break; |
|
100 | 100 | case XOOPS_CENTERBLOCK_RIGHT : |
101 | 101 | $ssel4 = " checked='checked' style='background-color:#00FF00;'"; |
102 | - break ; |
|
102 | + break; |
|
103 | 103 | case XOOPS_CENTERBLOCK_CENTER : |
104 | 104 | $ssel3 = " checked='checked' style='background-color:#00FF00;'"; |
105 | - break ; |
|
105 | + break; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | // bcachetime |
109 | - $cachetime_options = '' ; |
|
109 | + $cachetime_options = ''; |
|
110 | 110 | foreach ($cachetimes as $cachetime => $cachetime_name) { |
111 | 111 | if ($bcachetime == $cachetime) { |
112 | - $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n" ; |
|
112 | + $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n"; |
|
113 | 113 | } else { |
114 | - $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n" ; |
|
114 | + $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n"; |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | 118 | // target modules |
119 | - $db =& XoopsDatabaseFactory::getDatabaseConnection(); |
|
120 | - $result = $db->query( "SELECT module_id FROM ".$db->prefix('block_module_link')." WHERE block_id='$bid'" ) ; |
|
119 | + $db = & XoopsDatabaseFactory::getDatabaseConnection(); |
|
120 | + $result = $db->query("SELECT module_id FROM ".$db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
121 | 121 | $selected_mids = array(); |
122 | - while ( list( $selected_mid ) = $db->fetchRow( $result ) ) { |
|
123 | - $selected_mids[] = intval( $selected_mid ) ; |
|
122 | + while (list($selected_mid) = $db->fetchRow($result)) { |
|
123 | + $selected_mids[] = intval($selected_mid); |
|
124 | 124 | } |
125 | - $module_handler =& xoops_gethandler('module'); |
|
125 | + $module_handler = & xoops_gethandler('module'); |
|
126 | 126 | $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); |
127 | 127 | $criteria->add(new Criteria('isactive', 1)); |
128 | - $module_list =& $module_handler->getList($criteria); |
|
128 | + $module_list = & $module_handler->getList($criteria); |
|
129 | 129 | $module_list[-1] = _AM_TOPPAGE; |
130 | 130 | $module_list[0] = _AM_ALLPAGES; |
131 | 131 | ksort($module_list); |
132 | - $module_options = '' ; |
|
132 | + $module_options = ''; |
|
133 | 133 | $myts = &MyTextSanitizer::getInstance(); |
134 | 134 | foreach ($module_list as $mid => $mname) { |
135 | - if ( in_array( $mid , $selected_mids ) ) { |
|
136 | - $module_options .= "<option value='$mid' selected='selected'>" . $myts->displayTarea($mname) . "</option>\n" ; |
|
135 | + if (in_array($mid, $selected_mids)) { |
|
136 | + $module_options .= "<option value='$mid' selected='selected'>".$myts->displayTarea($mname)."</option>\n"; |
|
137 | 137 | } else { |
138 | - $module_options .= "<option value='$mid'>" . $myts->displayTarea($mname) . "</option>\n" ; |
|
138 | + $module_options .= "<option value='$mid'>".$myts->displayTarea($mname)."</option>\n"; |
|
139 | 139 | } |
140 | 140 | } |
141 | 141 | |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>"._EDIT."</a> |
172 | 172 | <input type='hidden' name='bid[$bid]' value='$bid' /> |
173 | 173 | </td> |
174 | - </tr>\n" ; |
|
174 | + </tr>\n"; |
|
175 | 175 | |
176 | - $class = ( $class == 'even' )? 'odd' : 'even' ; |
|
176 | + $class = ($class == 'even') ? 'odd' : 'even'; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | echo " |
@@ -191,35 +191,35 @@ discard block |
||
191 | 191 | |
192 | 192 | function list_groups() |
193 | 193 | { |
194 | - global $xoopsModule , $block_arr ; |
|
194 | + global $xoopsModule, $block_arr; |
|
195 | 195 | $myts = &MyTextSanitizer::getInstance(); |
196 | 196 | |
197 | 197 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
198 | 198 | |
199 | - foreach ( array_keys( $block_arr ) as $i ) { |
|
200 | - $item_list[ $block_arr[$i]->getVar("bid") ] = $block_arr[$i]->getVar("title") ; |
|
199 | + foreach (array_keys($block_arr) as $i) { |
|
200 | + $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title"); |
|
201 | 201 | } |
202 | 202 | |
203 | - $form = new MyXoopsGroupPermForm('' , 1 , 'block_read' , "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_GROUPS . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_GROUPSINFO . "</span>") ; |
|
204 | - $form->addAppendix('module_admin',$xoopsModule->mid(),$xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
205 | - $form->addAppendix('module_read',$xoopsModule->mid(),$xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
203 | + $form = new MyXoopsGroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_GROUPS."</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"._AM_SF_GROUPSINFO."</span>"); |
|
204 | + $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
205 | + $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
206 | 206 | foreach ($item_list as $item_id => $item_name) { |
207 | - $form->addItem( $item_id , $myts->displayTarea($item_name) ) ; |
|
207 | + $form->addItem($item_id, $myts->displayTarea($item_name)); |
|
208 | 208 | } |
209 | - echo $form->render() ; |
|
209 | + echo $form->render(); |
|
210 | 210 | echo "</div>"; |
211 | 211 | } |
212 | 212 | |
213 | 213 | if (!empty($_POST['submit'])) { |
214 | - include __DIR__ . '/mygroupperm.php' ; |
|
215 | - include_once( "$xoops_system_path/language/$language/admin.php" ) ; |
|
216 | - redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/myblocksadmin.php" , 1 , _AM_DBUPDATED ); |
|
214 | + include __DIR__.'/mygroupperm.php'; |
|
215 | + include_once("$xoops_system_path/language/$language/admin.php"); |
|
216 | + redirect_header(XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/myblocksadmin.php", 1, _AM_DBUPDATED); |
|
217 | 217 | } |
218 | 218 | |
219 | -xoops_cp_header() ; |
|
219 | +xoops_cp_header(); |
|
220 | 220 | if (file_exists('./mymenu.php')) include('./mymenu.php'); |
221 | 221 | //sf_adminMenu(5, _AM_SF_BLOCKSANDGROUPS); |
222 | 222 | |
223 | -list_blocks() ; |
|
224 | -list_groups() ; |
|
225 | -xoops_cp_footer() ; |
|
223 | +list_blocks(); |
|
224 | +list_groups(); |
|
225 | +xoops_cp_footer(); |
@@ -22,7 +22,9 @@ discard block |
||
22 | 22 | |
23 | 23 | // language files |
24 | 24 | $language = $xoopsConfig['language'] ; |
25 | -if (!file_exists("$xoops_system_path/language/$language/admin/blocksadmin.php")) $language = 'english'; |
|
25 | +if (!file_exists("$xoops_system_path/language/$language/admin/blocksadmin.php")) { |
|
26 | + $language = 'english'; |
|
27 | +} |
|
26 | 28 | |
27 | 29 | // to prevent from notice that constants already defined |
28 | 30 | $error_reporting_level = error_reporting(0); |
@@ -34,15 +36,21 @@ discard block |
||
34 | 36 | |
35 | 37 | $group_defs = file( "$xoops_system_path/language/$language/admin/groups.php" ) ; |
36 | 38 | foreach ($group_defs as $def) { |
37 | - if ( strstr( $def , '_AM_ACCESSRIGHTS' ) || strstr( $def , '_AM_ACTIVERIGHTS' ) ) eval( $def ) ; |
|
38 | -} |
|
39 | + if ( strstr( $def , '_AM_ACCESSRIGHTS' ) || strstr( $def , '_AM_ACTIVERIGHTS' ) ) { |
|
40 | + eval( $def ) ; |
|
41 | + } |
|
42 | + } |
|
39 | 43 | |
40 | 44 | // check $xoopsModule |
41 | -if ( ! is_object( $xoopsModule ) ) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
45 | +if ( ! is_object( $xoopsModule ) ) { |
|
46 | + redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
47 | +} |
|
42 | 48 | |
43 | 49 | // check access right (needs system_admin of BLOCK) |
44 | 50 | $sysperm_handler =& xoops_gethandler('groupperm'); |
45 | -if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
51 | +if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) { |
|
52 | + redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
53 | +} |
|
46 | 54 | |
47 | 55 | // get blocks owned by the module |
48 | 56 | $block_arr =& XoopsBlock::getByModule( $xoopsModule->mid() ) ; |
@@ -86,10 +94,12 @@ discard block |
||
86 | 94 | // visible and side |
87 | 95 | if ( $block_arr[$i]->getVar("visible") != 1 ) { |
88 | 96 | $sseln = " checked='checked' style='background-color:#FF0000;'"; |
89 | - } else switch ( $block_arr[$i]->getVar("side") ) { |
|
97 | + } else { |
|
98 | + switch ( $block_arr[$i]->getVar("side") ) { |
|
90 | 99 | default : |
91 | 100 | case XOOPS_SIDEBLOCK_LEFT : |
92 | 101 | $ssel0 = " checked='checked' style='background-color:#00FF00;'"; |
102 | + } |
|
93 | 103 | break ; |
94 | 104 | case XOOPS_SIDEBLOCK_RIGHT : |
95 | 105 | $ssel1 = " checked='checked' style='background-color:#00FF00;'"; |
@@ -217,7 +227,9 @@ discard block |
||
217 | 227 | } |
218 | 228 | |
219 | 229 | xoops_cp_header() ; |
220 | -if (file_exists('./mymenu.php')) include('./mymenu.php'); |
|
230 | +if (file_exists('./mymenu.php')) { |
|
231 | + include('./mymenu.php'); |
|
232 | +} |
|
221 | 233 | //sf_adminMenu(5, _AM_SF_BLOCKSANDGROUPS); |
222 | 234 | |
223 | 235 | list_blocks() ; |
@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
10 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
11 | 11 | |
12 | -$op = 'go';//'start'; |
|
12 | +$op = 'go'; //'start'; |
|
13 | 13 | |
14 | 14 | if (isset($HTTP_POST_VARS['op']) && ($HTTP_POST_VARS['op'] == 'go')) { |
15 | 15 | $op = $HTTP_POST_VARS['op']; |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | if ($op == 'start') { |
19 | 19 | include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
20 | 20 | |
21 | - xoops_cp_header (); |
|
21 | + xoops_cp_header(); |
|
22 | 22 | |
23 | - xoops_cp_footer (); |
|
23 | + xoops_cp_footer(); |
|
24 | 24 | exit (); |
25 | 25 | } |
26 | 26 | |
@@ -45,48 +45,48 @@ discard block |
||
45 | 45 | |
46 | 46 | echo " <title>{module title}</title>\r\n"; |
47 | 47 | |
48 | - $resultC = $xoopsDB->query ("select * from ".$xoopsDB->prefix("smartfaq_categories")); |
|
49 | - while ($arrC = $xoopsDB->fetchArray ($resultC)) { |
|
50 | - extract ($arrC, EXTR_PREFIX_ALL, 'c'); |
|
48 | + $resultC = $xoopsDB->query("select * from ".$xoopsDB->prefix("smartfaq_categories")); |
|
49 | + while ($arrC = $xoopsDB->fetchArray($resultC)) { |
|
50 | + extract($arrC, EXTR_PREFIX_ALL, 'c'); |
|
51 | 51 | |
52 | 52 | echo " <qandadiv ID=\"c$c_categoryid\" Revision=\"$c_created\">\r\n"; |
53 | - echo " <title>".encodeText ($c_name)."</title>\r\n"; |
|
54 | - echo " <para>".encodeText ($c_description)."</para>\r\n"; |
|
53 | + echo " <title>".encodeText($c_name)."</title>\r\n"; |
|
54 | + echo " <para>".encodeText($c_description)."</para>\r\n"; |
|
55 | 55 | |
56 | - $resultQ = $xoopsDB->query ("select * from ".$xoopsDB->prefix("smartfaq_faq")." where categoryid=$c_categoryid"); |
|
57 | - while ($arrQ = $xoopsDB->fetchArray ($resultQ)) { |
|
58 | - extract ($arrQ, EXTR_PREFIX_ALL, 'q'); |
|
56 | + $resultQ = $xoopsDB->query("select * from ".$xoopsDB->prefix("smartfaq_faq")." where categoryid=$c_categoryid"); |
|
57 | + while ($arrQ = $xoopsDB->fetchArray($resultQ)) { |
|
58 | + extract($arrQ, EXTR_PREFIX_ALL, 'q'); |
|
59 | 59 | |
60 | - 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 | + 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"; |
|
61 | 61 | echo " <question>\r\n"; |
62 | - echo " <para>".encodeText ($q_question)."</para>\r\n"; |
|
62 | + echo " <para>".encodeText($q_question)."</para>\r\n"; |
|
63 | 63 | if (!empty ($q_howdoi)) { |
64 | 64 | echo " <note Conformance=\"howdoi\">\r\n"; |
65 | 65 | echo " <title>{'How do I' from language file}</title>\r\n"; |
66 | - echo " <para>".encodeText ($q_howdoi)."</para>\r\n"; |
|
66 | + echo " <para>".encodeText($q_howdoi)."</para>\r\n"; |
|
67 | 67 | echo " </note>\r\n"; |
68 | 68 | } |
69 | 69 | if (!empty ($q_diduno)) { |
70 | 70 | echo " <note Conformance=\"diduno\">\r\n"; |
71 | 71 | echo " <title>{'Did you know' from language file}</title>\r\n"; |
72 | - echo " <para>".encodeText ($q_diduno)."</para>\r\n"; |
|
72 | + echo " <para>".encodeText($q_diduno)."</para>\r\n"; |
|
73 | 73 | echo " </note>\r\n"; |
74 | 74 | } |
75 | 75 | echo " </question>\r\n"; |
76 | 76 | |
77 | - $resultA = $xoopsDB->query ("select * from ".$xoopsDB->prefix("smartfaq_answers")." where answerid=$q_answerid"); |
|
78 | - while ($arrA = $xoopsDB->fetchArray ($resultA)) { |
|
79 | - extract ($arrA, EXTR_PREFIX_ALL, 'a'); |
|
77 | + $resultA = $xoopsDB->query("select * from ".$xoopsDB->prefix("smartfaq_answers")." where answerid=$q_answerid"); |
|
78 | + while ($arrA = $xoopsDB->fetchArray($resultA)) { |
|
79 | + extract($arrA, EXTR_PREFIX_ALL, 'a'); |
|
80 | 80 | |
81 | - echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName ($a_uid)."\">\r\n"; |
|
82 | - echo " <para>".encodeText ($a_answer)."</para>\r\n"; |
|
81 | + echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName($a_uid)."\">\r\n"; |
|
82 | + echo " <para>".encodeText($a_answer)."</para>\r\n"; |
|
83 | 83 | echo " </answer>\r\n"; |
84 | 84 | } |
85 | - mysql_free_result ($resultA); |
|
85 | + mysql_free_result($resultA); |
|
86 | 86 | |
87 | 87 | echo " </qandaentry>\r\n"; |
88 | 88 | } |
89 | - mysql_free_result ($resultQ); |
|
89 | + mysql_free_result($resultQ); |
|
90 | 90 | |
91 | 91 | echo " </qandadiv>\r\n"; |
92 | 92 | } |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | exit(); |
97 | 97 | } |
98 | 98 | |
99 | -function encodeText ( $text ) |
|
99 | +function encodeText($text) |
|
100 | 100 | { |
101 | - return utf8_encode (htmlspecialchars ($text)); |
|
101 | + return utf8_encode(htmlspecialchars($text)); |
|
102 | 102 | } |
103 | 103 | |
104 | -function getUserFullName ( $uid ) |
|
104 | +function getUserFullName($uid) |
|
105 | 105 | { |
106 | 106 | global $xoopsDB; |
107 | 107 |