@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | use XoopsModules\Smartfaq; |
11 | 11 | use XoopsModules\Smartfaq\Constants; |
12 | 12 | |
13 | -require_once __DIR__ . '/admin_header.php'; |
|
13 | +require_once __DIR__.'/admin_header.php'; |
|
14 | 14 | |
15 | 15 | /** @var Smartfaq\Helper $helper */ |
16 | 16 | $helper = Smartfaq\Helper::getInstance(); |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | */ |
47 | 47 | function editfaq($showmenu = false, $faqid = -1, $answerid = -1, $merge = false) |
48 | 48 | { |
49 | - global $answerHandler, $faqHandler, $categoryHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModule, $XOOPS_URL, $myts; |
|
49 | + global $answerHandler, $faqHandler, $categoryHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModule, $XOOPS_URL, $myts; |
|
50 | 50 | /** @var Smartfaq\Helper $helper */ |
51 | 51 | $helper = Smartfaq\Helper::getInstance(); |
52 | 52 | |
53 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
53 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
54 | 54 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
55 | 55 | if (-1 != $faqid) { |
56 | 56 | // Creating the FAQ object |
@@ -152,9 +152,9 @@ discard block |
||
152 | 152 | |
153 | 153 | echo "<br>\n"; |
154 | 154 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
155 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . $collapsableBar_title . '</h3>'; |
|
155 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".$collapsableBar_title.'</h3>'; |
|
156 | 156 | echo "<div id='bottomtable'>"; |
157 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>'; |
|
157 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>'; |
|
158 | 158 | } else { |
159 | 159 | // there's no parameter, so we're adding a faq |
160 | 160 | $faqObj = $faqHandler->create(); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $button_caption = _AM_SF_CREATE; |
169 | 169 | |
170 | 170 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
171 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CREATESMARTFAQ . '</h3>'; |
|
171 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_CREATESMARTFAQ.'</h3>'; |
|
172 | 172 | echo "<div id='bottomtable'>"; |
173 | 173 | } |
174 | 174 | $sform = new \XoopsThemeForm(_AM_SF_SMARTFAQ, 'op', xoops_getenv('PHP_SELF'), 'post', true); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | // ANSWER |
201 | 201 | if ($merge) { |
202 | - $theanswer = $originalAnswerObj->answer('e') . "\n\n" . sprintf(_AM_SF_NEW_CONTRIBUTION, Smartfaq\Utility::getLinkedUnameFromId($answerObj->uid(), $helper->getConfig('userealname')), $answerObj->datesub(), $answerObj->answer('e')); |
|
202 | + $theanswer = $originalAnswerObj->answer('e')."\n\n".sprintf(_AM_SF_NEW_CONTRIBUTION, Smartfaq\Utility::getLinkedUnameFromId($answerObj->uid(), $helper->getConfig('userealname')), $answerObj->datesub(), $answerObj->answer('e')); |
|
203 | 203 | } else { |
204 | 204 | $theanswer = $answerObj->answer('e'); |
205 | 205 | } |
@@ -248,14 +248,14 @@ discard block |
||
248 | 248 | $sform->addElement(new \XoopsFormText(_AM_SF_SPECIFIC_URL, 'contextpage', 50, 60, $faqObj->contextpage()), false); |
249 | 249 | |
250 | 250 | // EXACT URL? |
251 | - $excaturl_radio = new \XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
251 | + $excaturl_radio = new \XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
252 | 252 | $sform->addElement($excaturl_radio); |
253 | 253 | // WEIGHT |
254 | 254 | $sform->addElement(new \XoopsFormText(_AM_SF_WEIGHT, 'weight', 5, 5, $faqObj->weight()), true); |
255 | 255 | |
256 | 256 | // COMMENTS |
257 | 257 | // Code to allow comments |
258 | - $addcomments_radio = new \XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
258 | + $addcomments_radio = new \XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
259 | 259 | $sform->addElement($addcomments_radio); |
260 | 260 | |
261 | 261 | // PER ITEM PERMISSIONS |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | $sform->addElement($groups_checkbox); |
271 | 271 | |
272 | - $partial_view = new \XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
272 | + $partial_view = new \XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
273 | 273 | $sform->addElement($partial_view); |
274 | 274 | |
275 | 275 | // VARIOUS OPTIONS |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | // OFFLINE |
293 | 293 | if (Constants::SF_STATUS_OFFLINE == $faqObj->status()) { |
294 | 294 | // Back OnLine |
295 | - $offline_radio = new \XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
295 | + $offline_radio = new \XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
296 | 296 | $sform->addElement($offline_radio); |
297 | 297 | } |
298 | 298 | |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | } |
367 | 367 | |
368 | 368 | xoops_cp_header(); |
369 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
369 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
370 | 370 | |
371 | 371 | editfaq(true, $faqid, $answerid, true); |
372 | 372 | break; |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | xoops_cp_header(); |
388 | 388 | |
389 | 389 | $adminObject->displayNavigation(basename(__FILE__)); |
390 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
390 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
391 | 391 | |
392 | 392 | editfaq(true, $faqid, $answerid); |
393 | 393 | break; |
@@ -525,13 +525,13 @@ discard block |
||
525 | 525 | |
526 | 526 | // Storing the FAQ |
527 | 527 | if (!$faqObj->store()) { |
528 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
528 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
529 | 529 | } |
530 | 530 | |
531 | 531 | // Storing the answer |
532 | 532 | $answerObj->setVar('faqid', $faqObj->faqid()); |
533 | 533 | if (!$answerObj->store()) { |
534 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . Smartfaq\Utility::formatErrors($answerObj->getErrors())); |
|
534 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.Smartfaq\Utility::formatErrors($answerObj->getErrors())); |
|
535 | 535 | } |
536 | 536 | |
537 | 537 | // Send notifications |
@@ -558,20 +558,20 @@ discard block |
||
558 | 558 | |
559 | 559 | if ($confirm) { |
560 | 560 | if (!$faqHandler->delete($faqObj)) { |
561 | - redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR . Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
561 | + redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR.Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
562 | 562 | } |
563 | 563 | |
564 | 564 | redirect_header('faq.php', 2, sprintf(_AM_SF_ARTISDELETED, $faqObj->question())); |
565 | 565 | } else { |
566 | 566 | // no confirm: show deletion condition |
567 | - $faqid = Request::getInt('faqid', 0, 'POST'); |
|
567 | + $faqid = Request::getInt('faqid', 0, 'POST'); |
|
568 | 568 | xoops_cp_header(); |
569 | 569 | xoops_confirm([ |
570 | 570 | 'op' => 'del', |
571 | 571 | 'faqid' => $faqObj->faqid(), |
572 | 572 | 'confirm' => 1, |
573 | 573 | 'name' => $faqObj->question() |
574 | - ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
574 | + ], 'faq.php', _AM_SF_DELETETHISARTICLE." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE); |
|
575 | 575 | xoops_cp_footer(); |
576 | 576 | } |
577 | 577 | |
@@ -585,10 +585,10 @@ discard block |
||
585 | 585 | |
586 | 586 | $adminObject->displayNavigation(basename(__FILE__)); |
587 | 587 | |
588 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
589 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
588 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
589 | + require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
590 | 590 | |
591 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/displayfaqs.php'; |
|
591 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/displayfaqs.php'; |
|
592 | 592 | |
593 | 593 | $totalcategories = $categoryHandler->getCategoriesCount(-1); |
594 | 594 | if ($totalcategories > 0) { |
@@ -598,4 +598,4 @@ discard block |
||
598 | 598 | break; |
599 | 599 | } |
600 | 600 | |
601 | -require_once __DIR__ . '/admin_footer.php'; |
|
601 | +require_once __DIR__.'/admin_footer.php'; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | /** @var Smartfaq\Helper $helper */ |
13 | 13 | $helper = Smartfaq\Helper::getInstance(); |
14 | 14 | |
15 | -require_once __DIR__ . '/admin_header.php'; |
|
15 | +require_once __DIR__.'/admin_header.php'; |
|
16 | 16 | |
17 | 17 | $op = ''; |
18 | 18 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** @var Smartfaq\Helper $helper */ |
38 | 38 | $helper = Smartfaq\Helper::getInstance(); |
39 | 39 | |
40 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
40 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
41 | 41 | |
42 | 42 | // Creating the FAQ object |
43 | 43 | $faqObj = new Smartfaq\Faq($faqid); |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $official_answer = $faqObj->answer(); |
75 | 75 | |
76 | 76 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
77 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_SUBMITTED_ANSWER . '</h3>'; |
|
77 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_SUBMITTED_ANSWER.'</h3>'; |
|
78 | 78 | echo "<div id='bottomtable'>"; |
79 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_SUBMITTED_ANSWER_INFO . '</span>'; |
|
79 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_SUBMITTED_ANSWER_INFO.'</span>'; |
|
80 | 80 | |
81 | 81 | $proposed_answers = $answerHandler->getAllAnswers($faqid, Constants::SF_AN_STATUS_PROPOSED); |
82 | 82 | |
@@ -86,31 +86,31 @@ discard block |
||
86 | 86 | |
87 | 87 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer> |
88 | 88 | <tr> |
89 | - <td class='head' width='100px'>" . _AM_SF_CATEGORY . "</td> |
|
90 | - <td class='even'>" . $categoryObj->name() . "</td> |
|
89 | + <td class='head' width='100px'>" . _AM_SF_CATEGORY."</td> |
|
90 | + <td class='even'>" . $categoryObj->name()."</td> |
|
91 | 91 | </tr> |
92 | 92 | <tr> |
93 | - <td class='head' width='100px'>" . _AM_SF_QUESTION . "</td> |
|
94 | - <td class='even'>" . $faqObj->question() . '</td> |
|
93 | + <td class='head' width='100px'>" . _AM_SF_QUESTION."</td> |
|
94 | + <td class='even'>" . $faqObj->question().'</td> |
|
95 | 95 | </tr>'; |
96 | 96 | if ($official_answer) { |
97 | 97 | echo " |
98 | 98 | <tr> |
99 | - <td class='head' width='100px'>" . _AM_SF_ANSWER_OFFICIAL . "</td> |
|
100 | - <td class='even'>" . $official_answer->answer() . '</td> |
|
99 | + <td class='head' width='100px'>" . _AM_SF_ANSWER_OFFICIAL."</td> |
|
100 | + <td class='even'>" . $official_answer->answer().'</td> |
|
101 | 101 | </tr>'; |
102 | 102 | } |
103 | 103 | echo "</table><br>\n"; |
104 | 104 | |
105 | 105 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
106 | 106 | echo '<tr>'; |
107 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>'; |
|
108 | - echo "<th class='bg3' class='bg3' align='center'><b>" . _AM_SF_ANSWER . '</b></td>'; |
|
107 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>'; |
|
108 | + echo "<th class='bg3' class='bg3' align='center'><b>"._AM_SF_ANSWER.'</b></td>'; |
|
109 | 109 | |
110 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
110 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
111 | 111 | |
112 | - echo "<th width='180' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
113 | - echo "<th width='120' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
112 | + echo "<th width='180' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
113 | + echo "<th width='120' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
114 | 114 | echo '</tr>'; |
115 | 115 | |
116 | 116 | $merge = ''; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $approve = ''; |
119 | 119 | foreach ($proposed_answers as $proposed_answer) { |
120 | 120 | if (Constants::SF_STATUS_NEW_ANSWER == $faqObj->status()) { |
121 | - $merge = "<a href='faq.php?op=merge&faqid=" |
|
121 | + $merge = "<a href='faq.php?op=merge&faqid=" |
|
122 | 122 | . $faqObj->faqid() |
123 | 123 | . '&answerid=' |
124 | 124 | . $proposed_answer->answerid() |
@@ -131,19 +131,19 @@ discard block |
||
131 | 131 | . "' alt='" |
132 | 132 | . _AM_SF_FAQ_MERGE |
133 | 133 | . "'></a> "; |
134 | - $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/on.png' . "' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "'></a>"; |
|
134 | + $approve = "<a href='answer.php?op=selectanswer&faqid=".$faqid.'&answerid='.$proposed_answer->answerid()."'><img src='".$pathIcon16.'/on.png'."' title='"._AM_SF_FAQ_APPROVE_NEW_ANSWER."' alt='"._AM_SF_APPROVESUB."'></a>"; |
|
135 | 135 | } |
136 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "'></a> "; |
|
137 | - $delete = "<a href='answer.php?op=del&faqid=" . $faqObj->faqid() . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETESUBM . "' alt='" . _AM_SF_DELETESUBM . "'></a>"; |
|
136 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqObj->faqid().'&answerid='.$proposed_answer->answerid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_FAQ_REVIEW."' alt='"._AM_SF_FAQ_REVIEW."'></a> "; |
|
137 | + $delete = "<a href='answer.php?op=del&faqid=".$faqObj->faqid().'&answerid='.$proposed_answer->answerid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETESUBM."' alt='"._AM_SF_DELETESUBM."'></a>"; |
|
138 | 138 | echo '<tr>'; |
139 | - echo "<td class='head' align='center'>" . $proposed_answer->answerid() . '</td>'; |
|
140 | - echo "<td class='even' align='left'>" . $proposed_answer->answer() . '</td>'; |
|
139 | + echo "<td class='head' align='center'>".$proposed_answer->answerid().'</td>'; |
|
140 | + echo "<td class='even' align='left'>".$proposed_answer->answer().'</td>'; |
|
141 | 141 | |
142 | 142 | //show name of the answer submitter |
143 | 143 | $submitter = Smartfaq\Utility::getLinkedUnameFromId($proposed_answer->uid(), $smartModuleConfig['userealname']); |
144 | - echo "<td class='even' align='center'>" . $submitter . '</td>'; |
|
144 | + echo "<td class='even' align='center'>".$submitter.'</td>'; |
|
145 | 145 | |
146 | - echo "<td class='even' align='center'>" . $proposed_answer->datesub() . '</td>'; |
|
146 | + echo "<td class='even' align='center'>".$proposed_answer->datesub().'</td>'; |
|
147 | 147 | echo "<td class='even' align='center'> $merge $modify $approve $delete </td>"; |
148 | 148 | echo '</tr>'; |
149 | 149 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | switch ($op) { |
156 | 156 | case 'mod': |
157 | 157 | xoops_cp_header(); |
158 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
158 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
159 | 159 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $modify, $myts; |
160 | 160 | $faqid = \Xmf\Request::getInt('faqid', 0, 'GET'); |
161 | 161 | editfaq($faqid); |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | $proposed_answers = $answerHandler->getAllAnswers($faqid, Constants::SF_AN_STATUS_PROPOSED); |
263 | 263 | if (count($proposed_answers) > 0) { |
264 | 264 | // This question has other proposed answer |
265 | - $redirect_page = 'answer.php?op=mod&faqid=' . $faqid; |
|
265 | + $redirect_page = 'answer.php?op=mod&faqid='.$faqid; |
|
266 | 266 | $redirect_msg = _AM_SF_ANSWER_REJECTED; |
267 | 267 | } else { |
268 | 268 | // The question has no other proposed answer |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | default: |
287 | 287 | xoops_cp_header(); |
288 | 288 | |
289 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
289 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
290 | 290 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule; |
291 | 291 | /** @var Smartfaq\Helper $helper */ |
292 | 292 | $helper = Smartfaq\Helper::getInstance(); |
@@ -295,4 +295,4 @@ discard block |
||
295 | 295 | break; |
296 | 296 | } |
297 | 297 | |
298 | -require_once __DIR__ . '/admin_footer.php'; |
|
298 | +require_once __DIR__.'/admin_footer.php'; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $criteria->add(new \Criteria('gperm_itemid', (int)$gperm_itemid)); |
23 | 23 | } |
24 | 24 | } |
25 | - $sql = 'DELETE FROM ' . $db->prefix('group_permission') . ' ' . $criteria->renderWhere(); |
|
25 | + $sql = 'DELETE FROM '.$db->prefix('group_permission').' '.$criteria->renderWhere(); |
|
26 | 26 | if (!$result = $db->query($sql)) { |
27 | 27 | return false; |
28 | 28 | } |
@@ -34,16 +34,16 @@ discard block |
||
34 | 34 | $modid = \Xmf\Request::getInt('modid', 1, 'POST'); |
35 | 35 | // we dont want system module permissions to be changed here ( 1 -> 0 GIJ) |
36 | 36 | if ($modid <= 0 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) { |
37 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
37 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
38 | 38 | } |
39 | 39 | /** @var XoopsModuleHandler $moduleHandler */ |
40 | 40 | $moduleHandler = xoops_getHandler('module'); |
41 | 41 | $module = $moduleHandler->get($modid); |
42 | 42 | if (!is_object($module) || !$module->getVar('isactive')) { |
43 | - redirect_header(XOOPS_URL . '/admin.php', 1, _MODULENOEXIST); |
|
43 | + redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST); |
|
44 | 44 | } |
45 | 45 | $memberHandler = xoops_getHandler('member'); |
46 | -$group_list =& $memberHandler->getGroupList(); |
|
46 | +$group_list = & $memberHandler->getGroupList(); |
|
47 | 47 | if (is_array($_POST['perms']) && !empty($_POST['perms'])) { |
48 | 48 | $gpermHandler = xoops_getHandler('groupperm'); |
49 | 49 | foreach ($_POST['perms'] as $perm_name => $perm_data) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | foreach ($parent_ids as $pid) { |
67 | 67 | if (0 != $pid && !in_array($pid, array_keys($item_ids))) { |
68 | 68 | // one of the parent items were not selected, so skip this item |
69 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>') . ' (' . _MD_AM_PERMADDNGP . ')'; |
|
69 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_AM_PERMADDNGP.')'; |
|
70 | 70 | continue 2; |
71 | 71 | } |
72 | 72 | } |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $gperm->setVar('gperm_modid', $modid); |
78 | 78 | $gperm->setVar('gperm_itemid', $item_id); |
79 | 79 | if (!$gpermHandler->insert($gperm)) { |
80 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
80 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
81 | 81 | } else { |
82 | - $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
82 | + $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
83 | 83 | } |
84 | 84 | unset($gperm); |
85 | 85 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /** @var Smartfaq\Helper $helper */ |
12 | 12 | $helper = Smartfaq\Helper::getInstance(); |
13 | 13 | |
14 | -require_once __DIR__ . '/admin_header.php'; |
|
14 | +require_once __DIR__.'/admin_header.php'; |
|
15 | 15 | $myts = \MyTextSanitizer::getInstance(); |
16 | 16 | |
17 | 17 | $faqid = \Xmf\Request::getInt('faqid', 0, 'POST'); |
@@ -34,29 +34,29 @@ discard block |
||
34 | 34 | |
35 | 35 | function buildTable() |
36 | 36 | { |
37 | - global $xoopsConfig, $xoopsModule; |
|
37 | + global $xoopsConfig, $xoopsModule; |
|
38 | 38 | /** @var Smartfaq\Helper $helper */ |
39 | 39 | $helper = Smartfaq\Helper::getInstance(); |
40 | 40 | |
41 | 41 | echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>"; |
42 | 42 | echo '<tr>'; |
43 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_FAQID . '</b></td>'; |
|
44 | - echo "<th width='20%' class='bg3' align='center'><b>" . _AM_SF_FAQCAT . '</b></td>'; |
|
45 | - echo "<th class='bg3' align='center'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
43 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_FAQID.'</b></td>'; |
|
44 | + echo "<th width='20%' class='bg3' align='center'><b>"._AM_SF_FAQCAT.'</b></td>'; |
|
45 | + echo "<th class='bg3' align='center'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
46 | 46 | |
47 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
48 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
47 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
48 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
49 | 49 | |
50 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
51 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_STATUS . '</b></td>'; |
|
50 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
51 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_STATUS.'</b></td>'; |
|
52 | 52 | //echo "<td width='30' class='bg3' align='center'><b>" . _AM_SF_ANSWERS . "</b></td>"; |
53 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
53 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
54 | 54 | echo '</tr>'; |
55 | 55 | } |
56 | 56 | |
57 | 57 | // Code for the page |
58 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
59 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
58 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
59 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
60 | 60 | |
61 | 61 | // Creating the category handler object |
62 | 62 | /** @var \XoopsModules\Smartfaq\CategoryHandler $categoryHandler */ |
@@ -139,9 +139,9 @@ discard block |
||
139 | 139 | |
140 | 140 | // Construction of lower table |
141 | 141 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
142 | -echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_ALLFAQS . '</h3>'; |
|
142 | +echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_ALLFAQS.'</h3>'; |
|
143 | 143 | echo "<div id='bottomtable'>"; |
144 | -echo '<span style="color: #567; margin: 3px 0 18px 0; font-size: small; display: block; ">' . _AM_SF_ALLFAQSMSG . '</span>'; |
|
144 | +echo '<span style="color: #567; margin: 3px 0 18px 0; font-size: small; display: block; ">'._AM_SF_ALLFAQSMSG.'</span>'; |
|
145 | 145 | |
146 | 146 | $showingtxt = ''; |
147 | 147 | $selectedtxt = ''; |
@@ -210,98 +210,98 @@ discard block |
||
210 | 210 | case Constants::SF_STATUS_ASKED: |
211 | 211 | $selectedtxt1 = 'selected'; |
212 | 212 | $caption = _AM_SF_ASKED; |
213 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_ASKED . ' '; |
|
213 | + $cond = ' WHERE status = '.Constants::SF_STATUS_ASKED.' '; |
|
214 | 214 | $status_explaination = _AM_SF_ASKED_EXP; |
215 | 215 | break; |
216 | 216 | |
217 | 217 | case Constants::SF_STATUS_OPENED: |
218 | 218 | $selectedtxt2 = 'selected'; |
219 | 219 | $caption = _AM_SF_OPENED; |
220 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_OPENED . ' '; |
|
220 | + $cond = ' WHERE status = '.Constants::SF_STATUS_OPENED.' '; |
|
221 | 221 | $status_explaination = _AM_SF_OPENED_EXP; |
222 | 222 | break; |
223 | 223 | |
224 | 224 | case Constants::SF_STATUS_ANSWERED: |
225 | 225 | $selectedtxt3 = 'selected'; |
226 | 226 | $caption = _AM_SF_ANSWERED; |
227 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_ANSWERED . ' '; |
|
227 | + $cond = ' WHERE status = '.Constants::SF_STATUS_ANSWERED.' '; |
|
228 | 228 | $status_explaination = _AM_SF_ANSWERED_EXP; |
229 | 229 | break; |
230 | 230 | |
231 | 231 | case Constants::SF_STATUS_SUBMITTED: |
232 | 232 | $selectedtxt4 = 'selected'; |
233 | 233 | $caption = _AM_SF_SUBMITTED; |
234 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_SUBMITTED . ' '; |
|
234 | + $cond = ' WHERE status = '.Constants::SF_STATUS_SUBMITTED.' '; |
|
235 | 235 | $status_explaination = _AM_SF_SUBMITTED_EXP; |
236 | 236 | break; |
237 | 237 | |
238 | 238 | case Constants::SF_STATUS_PUBLISHED: |
239 | 239 | $selectedtxt5 = 'selected'; |
240 | 240 | $caption = _AM_SF_PUBLISHED; |
241 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_PUBLISHED . ' '; |
|
241 | + $cond = ' WHERE status = '.Constants::SF_STATUS_PUBLISHED.' '; |
|
242 | 242 | $status_explaination = _AM_SF_PUBLISHED_EXP; |
243 | 243 | break; |
244 | 244 | |
245 | 245 | case Constants::SF_STATUS_NEW_ANSWER: |
246 | 246 | $selectedtxt6 = 'selected'; |
247 | 247 | $caption = _AM_SF_NEW_ANSWER; |
248 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_NEW_ANSWER . ' '; |
|
248 | + $cond = ' WHERE status = '.Constants::SF_STATUS_NEW_ANSWER.' '; |
|
249 | 249 | $status_explaination = _AM_SF_NEW_ANSWER_EXP; |
250 | 250 | break; |
251 | 251 | |
252 | 252 | case Constants::SF_STATUS_OFFLINE: |
253 | 253 | $selectedtxt7 = 'selected'; |
254 | 254 | $caption = _AM_SF_OFFLINE; |
255 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_OFFLINE . ' '; |
|
255 | + $cond = ' WHERE status = '.Constants::SF_STATUS_OFFLINE.' '; |
|
256 | 256 | $status_explaination = _AM_SF_OFFLINE_EXP; |
257 | 257 | break; |
258 | 258 | |
259 | 259 | case Constants::SF_STATUS_REJECTED_QUESTION: |
260 | 260 | $selectedtxt8 = 'selected'; |
261 | 261 | $caption = _AM_SF_REJECTED_QUESTION; |
262 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_REJECTED_QUESTION . ' '; |
|
262 | + $cond = ' WHERE status = '.Constants::SF_STATUS_REJECTED_QUESTION.' '; |
|
263 | 263 | $status_explaination = _AM_SF_REJECTED_QUESTION_EXP; |
264 | 264 | break; |
265 | 265 | |
266 | 266 | case Constants::SF_STATUS_REJECTED_SMARTFAQ: |
267 | 267 | $selectedtxt9 = 'selected'; |
268 | 268 | $caption = _AM_SF_REJECTED_SMARTFAQ; |
269 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_REJECTED_SMARTFAQ . ' '; |
|
269 | + $cond = ' WHERE status = '.Constants::SF_STATUS_REJECTED_SMARTFAQ.' '; |
|
270 | 270 | $status_explaination = _AM_SF_REJECTED_SMARTFAQ_EXP; |
271 | 271 | break; |
272 | 272 | } |
273 | 273 | |
274 | 274 | /* -- Code to show selected terms -- */ |
275 | -echo "<form name='pick' id='pick' action='" . $_SERVER['PHP_SELF'] . "' method='POST' style='margin: 0;'>"; |
|
275 | +echo "<form name='pick' id='pick' action='".$_SERVER['PHP_SELF']."' method='POST' style='margin: 0;'>"; |
|
276 | 276 | |
277 | 277 | echo " |
278 | 278 | <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;'> |
279 | 279 | <tr> |
280 | - <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING . ' ' . $caption . "</span></td> |
|
281 | - <td align='right'>" . _AM_SF_SELECT_SORT . " |
|
280 | + <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING.' '.$caption."</span></td> |
|
281 | + <td align='right'>" . _AM_SF_SELECT_SORT." |
|
282 | 282 | <select name='sortsel' onchange='submit()'> |
283 | - <option value='faq.faqid' $sorttxtfaqid>" . _AM_SF_ID . "</option> |
|
284 | - <option value='category.name' $sorttxtcategory>" . _AM_SF_CATEGORY . "</option> |
|
285 | - <option value='faq.question' $sorttxtquestion>" . _AM_SF_QUESTION . "</option> |
|
286 | - <option value='faq.datesub' $sorttxtcreated>" . _AM_SF_CREATED . "</option> |
|
287 | - <option value='faq.weight' $sorttxtweight>" . _AM_SF_WEIGHT . "</option> |
|
283 | + <option value='faq.faqid' $sorttxtfaqid>"._AM_SF_ID."</option> |
|
284 | + <option value='category.name' $sorttxtcategory>"._AM_SF_CATEGORY."</option> |
|
285 | + <option value='faq.question' $sorttxtquestion>"._AM_SF_QUESTION."</option> |
|
286 | + <option value='faq.datesub' $sorttxtcreated>"._AM_SF_CREATED."</option> |
|
287 | + <option value='faq.weight' $sorttxtweight>"._AM_SF_WEIGHT."</option> |
|
288 | 288 | </select> |
289 | 289 | <select name='ordersel' onchange='submit()'> |
290 | - <option value='ASC' $ordertxtasc>" . _AM_SF_ASC . "</option> |
|
291 | - <option value='DESC' $ordertxtdesc>" . _AM_SF_DESC . '</option> |
|
290 | + <option value='ASC' $ordertxtasc>"._AM_SF_ASC."</option> |
|
291 | + <option value='DESC' $ordertxtdesc>"._AM_SF_DESC.'</option> |
|
292 | 292 | </select> |
293 | - ' . _AM_SF_SELECT_STATUS . " : |
|
293 | + ' . _AM_SF_SELECT_STATUS." : |
|
294 | 294 | <select name='statussel' onchange='submit()'> |
295 | - <option value='0' $selectedtxt0>" . _AM_SF_ALL . " [$totalfaqs]</option> |
|
296 | - <option value='1' $selectedtxt1>" . _AM_SF_ASKED . " [$totalasked]</option> |
|
297 | - <option value='2' $selectedtxt2>" . _AM_SF_OPENED . " [$totalopened]</option> |
|
298 | - <option value='3' $selectedtxt3>" . _AM_SF_ANSWERED . " [$totalanswered]</option> |
|
299 | - <option value='4' $selectedtxt4>" . _AM_SF_SUBMITTED . " [$totalsubmitted]</option> |
|
300 | - <option value='5' $selectedtxt5>" . _AM_SF_PUBLISHED . " [$totalpublished]</option> |
|
301 | - <option value='6' $selectedtxt6>" . _AM_SF_NEWANSWER . " [$totalnewanswers]</option> |
|
302 | - <option value='7' $selectedtxt7>" . _AM_SF_OFFLINE . " [$totaloffline]</option> |
|
303 | - <option value='8' $selectedtxt8>" . _AM_SF_REJECTED_QUESTION . " [$totalrejectedquestion]</option> |
|
304 | - <option value='9' $selectedtxt9>" . _AM_SF_REJECTED_SMARTFAQ . " [$totalrejectedsmartfaq]</option> |
|
295 | + <option value='0' $selectedtxt0>"._AM_SF_ALL." [$totalfaqs]</option> |
|
296 | + <option value='1' $selectedtxt1>"._AM_SF_ASKED." [$totalasked]</option> |
|
297 | + <option value='2' $selectedtxt2>"._AM_SF_OPENED." [$totalopened]</option> |
|
298 | + <option value='3' $selectedtxt3>"._AM_SF_ANSWERED." [$totalanswered]</option> |
|
299 | + <option value='4' $selectedtxt4>"._AM_SF_SUBMITTED." [$totalsubmitted]</option> |
|
300 | + <option value='5' $selectedtxt5>"._AM_SF_PUBLISHED." [$totalpublished]</option> |
|
301 | + <option value='6' $selectedtxt6>"._AM_SF_NEWANSWER." [$totalnewanswers]</option> |
|
302 | + <option value='7' $selectedtxt7>"._AM_SF_OFFLINE." [$totaloffline]</option> |
|
303 | + <option value='8' $selectedtxt8>"._AM_SF_REJECTED_QUESTION." [$totalrejectedquestion]</option> |
|
304 | + <option value='9' $selectedtxt9>"._AM_SF_REJECTED_SMARTFAQ." [$totalrejectedsmartfaq]</option> |
|
305 | 305 | </select> |
306 | 306 | </td> |
307 | 307 | </tr> |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $faqsObj = $faqHandler->getFaqsAdminSide($helper->getConfig('perpage'), $startentry, $statusSelected, -1, $sortsel, $ordersel); |
317 | 317 | |
318 | 318 | // fetching all categories |
319 | -$allCats = $categoryHandler->getObjects(null, true); |
|
319 | +$allCats = $categoryHandler->getObjects(null, true); |
|
320 | 320 | //$totalItemsOnPage = count($faqsObj); |
321 | 321 | buildTable(); |
322 | 322 | |
@@ -339,65 +339,65 @@ discard block |
||
339 | 339 | switch ($faqsObj[$i]->status()) { |
340 | 340 | case Constants::SF_STATUS_ASKED: |
341 | 341 | $statustxt = _AM_SF_ASKED; |
342 | - $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> "; |
|
342 | + $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> "; |
|
343 | 343 | $modify = ''; |
344 | - $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 | + $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>"; |
|
345 | 345 | break; |
346 | 346 | |
347 | 347 | case Constants::SF_STATUS_OPENED: |
348 | 348 | $statustxt = _AM_SF_OPENED; |
349 | 349 | $approve = ''; |
350 | - $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> "; |
|
351 | - $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>"; |
|
350 | + $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> "; |
|
351 | + $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>"; |
|
352 | 352 | break; |
353 | 353 | |
354 | 354 | case Constants::SF_STATUS_ANSWERED: |
355 | 355 | $statustxt = _AM_SF_ANSWERED; |
356 | - $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> "; |
|
356 | + $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> "; |
|
357 | 357 | $modify = ''; |
358 | - $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>"; |
|
358 | + $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>"; |
|
359 | 359 | break; |
360 | 360 | |
361 | 361 | case Constants::SF_STATUS_SUBMITTED: |
362 | 362 | $statustxt = _AM_SF_SUBMITTED; |
363 | - $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> "; |
|
364 | - $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>"; |
|
363 | + $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> "; |
|
364 | + $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>"; |
|
365 | 365 | $modify = ''; |
366 | 366 | break; |
367 | 367 | |
368 | 368 | case Constants::SF_STATUS_PUBLISHED: |
369 | 369 | $statustxt = _AM_SF_PUBLISHED; |
370 | 370 | $approve = ''; |
371 | - $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> "; |
|
372 | - $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>"; |
|
371 | + $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> "; |
|
372 | + $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>"; |
|
373 | 373 | break; |
374 | 374 | |
375 | 375 | case Constants::SF_STATUS_NEW_ANSWER: |
376 | 376 | $statustxt = _AM_SF_NEWANSWER; |
377 | - $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> "; |
|
378 | - $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>"; |
|
377 | + $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> "; |
|
378 | + $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>"; |
|
379 | 379 | $modify = ''; |
380 | 380 | break; |
381 | 381 | |
382 | 382 | case Constants::SF_STATUS_OFFLINE: |
383 | 383 | $statustxt = _AM_SF_OFFLINE; |
384 | 384 | $approve = ''; |
385 | - $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> "; |
|
386 | - $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>"; |
|
385 | + $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> "; |
|
386 | + $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>"; |
|
387 | 387 | break; |
388 | 388 | |
389 | 389 | case Constants::SF_STATUS_REJECTED_QUESTION: |
390 | 390 | $statustxt = _AM_SF_REJECTED_QUESTION; |
391 | 391 | $approve = ''; |
392 | - $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> "; |
|
393 | - $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>"; |
|
392 | + $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> "; |
|
393 | + $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>"; |
|
394 | 394 | break; |
395 | 395 | |
396 | 396 | case Constants::SF_STATUS_REJECTED_SMARTFAQ: |
397 | 397 | $statustxt = _AM_SF_REJECTED_SMARTFAQ; |
398 | 398 | $approve = ''; |
399 | - $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> "; |
|
400 | - $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>"; |
|
399 | + $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> "; |
|
400 | + $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>"; |
|
401 | 401 | break; |
402 | 402 | |
403 | 403 | case 'default': |
@@ -411,14 +411,14 @@ discard block |
||
411 | 411 | //$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> "; |
412 | 412 | |
413 | 413 | echo '<tr>'; |
414 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>'; |
|
415 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
416 | - echo "<td class='even' align='left'>" . $faqsObj[$i]->question(100) . '</td>'; |
|
414 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid().'</td>'; |
|
415 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
416 | + echo "<td class='even' align='left'>".$faqsObj[$i]->question(100).'</td>'; |
|
417 | 417 | |
418 | 418 | //mb--------------------------------------- |
419 | 419 | //adding name of the Question Submitter |
420 | 420 | $requester = Smartfaq\Utility::getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
421 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
421 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
422 | 422 | |
423 | 423 | //adding name of the Answer Submitter |
424 | 424 | /** @var \XoopsModules\Smartfaq\AnswerHandler $answerHandler */ |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | $criteria->add(new \Criteria('faqid', $faqsObj[$i]->faqid())); |
429 | 429 | $criteria->add(new \Criteria('status', true)); |
430 | 430 | |
431 | - $answerObjects =& $answerHandler->getObjects($criteria, true); |
|
431 | + $answerObjects = & $answerHandler->getObjects($criteria, true); |
|
432 | 432 | |
433 | 433 | foreach (array_keys($answerObjects) as $j) { |
434 | 434 | $answerObj = $answerObjects[$j]; |
@@ -441,20 +441,20 @@ discard block |
||
441 | 441 | } else { |
442 | 442 | $answerSubmitter = '--------'; |
443 | 443 | } |
444 | - echo "<td class='even' align='center'>" . $answerSubmitter . '</td>'; |
|
444 | + echo "<td class='even' align='center'>".$answerSubmitter.'</td>'; |
|
445 | 445 | |
446 | 446 | //mb--------------------------------------- |
447 | 447 | |
448 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . '</td>'; |
|
449 | - echo "<td class='even' align='center'>" . $statustxt . '</td>'; |
|
448 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s').'</td>'; |
|
449 | + echo "<td class='even' align='center'>".$statustxt.'</td>'; |
|
450 | 450 | //echo "<td class='even' align='center'>" . $answers . "</td>"; |
451 | - echo "<td class='even' align='center'> " . $approve . $modify . $delete . '</td>'; |
|
451 | + echo "<td class='even' align='center'> ".$approve.$modify.$delete.'</td>'; |
|
452 | 452 | echo '</tr>'; |
453 | 453 | } |
454 | 454 | } else { |
455 | 455 | // that is, $numrows = 0, there's no entries yet |
456 | 456 | echo '<tr>'; |
457 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQSSEL . '</td>'; |
|
457 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQSSEL.'</td>'; |
|
458 | 458 | echo '</tr>'; |
459 | 459 | } |
460 | 460 | echo "</table>\n"; |
@@ -462,9 +462,9 @@ discard block |
||
462 | 462 | $pagenav = new \XoopsPageNav($numrows, $helper->getConfig('perpage'), $startentry, 'startentry', "statussel=$statussel&sortsel=$sortsel&ordersel=$ordersel"); |
463 | 463 | |
464 | 464 | if (1 == $helper->getConfig('useimagenavpage')) { |
465 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderImageNav() . '</div>'; |
|
465 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderImageNav().'</div>'; |
|
466 | 466 | } else { |
467 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderNav() . '</div>'; |
|
467 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderNav().'</div>'; |
|
468 | 468 | } |
469 | 469 | // ENDs code to show active entries |
470 | 470 | echo '</div>'; |
@@ -472,4 +472,4 @@ discard block |
||
472 | 472 | echo '</div>'; |
473 | 473 | echo '</div>'; |
474 | 474 | |
475 | -require_once __DIR__ . '/admin_footer.php'; |
|
475 | +require_once __DIR__.'/admin_footer.php'; |
@@ -293,11 +293,11 @@ |
||
293 | 293 | $faqid = \Xmf\Request::getInt('faqid', 0, 'GET'); |
294 | 294 | xoops_cp_header(); |
295 | 295 | xoops_confirm([ |
296 | - 'op' => 'del', |
|
297 | - 'faqid' => $faqObj->faqid(), |
|
298 | - 'confirm' => 1, |
|
299 | - 'name' => $faqObj->question() |
|
300 | - ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
296 | + 'op' => 'del', |
|
297 | + 'faqid' => $faqObj->faqid(), |
|
298 | + 'confirm' => 1, |
|
299 | + 'name' => $faqObj->question() |
|
300 | + ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
301 | 301 | xoops_cp_footer(); |
302 | 302 | } |
303 | 303 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /** @var Smartfaq\Helper $helper */ |
12 | 12 | $helper = Smartfaq\Helper::getInstance(); |
13 | 13 | |
14 | -require_once __DIR__ . '/admin_header.php'; |
|
14 | +require_once __DIR__.'/admin_header.php'; |
|
15 | 15 | |
16 | 16 | global $xoopsUser; |
17 | 17 | |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | */ |
41 | 41 | function editfaq($showmenu = false, $faqid = -1) |
42 | 42 | { |
43 | - global $faqHandler, $categoryHandler, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModule, $XOOPS_URL, $myts; |
|
43 | + global $faqHandler, $categoryHandler, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModule, $XOOPS_URL, $myts; |
|
44 | 44 | /** @var Smartfaq\Helper $helper */ |
45 | 45 | $helper = Smartfaq\Helper::getInstance(); |
46 | 46 | |
47 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
47 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
48 | 48 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
49 | 49 | if (-1 != $faqid) { |
50 | 50 | // Creating the FAQ object |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | |
77 | 77 | echo "<br>\n"; |
78 | 78 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
79 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . $collapsableBar_title . '</h3>'; |
|
79 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".$collapsableBar_title.'</h3>'; |
|
80 | 80 | echo "<div id='bottomtable'>"; |
81 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>'; |
|
81 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>'; |
|
82 | 82 | } else { |
83 | 83 | // there's no parameter, so we're adding a faq |
84 | 84 | $faqObj = $faqHandler->create(); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $button_caption = _AM_SF_CREATE; |
90 | 90 | |
91 | 91 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
92 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CREATEQUESTION . '</h3>'; |
|
92 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_CREATEQUESTION.'</h3>'; |
|
93 | 93 | echo "<div id='bottomtable'>"; |
94 | 94 | } |
95 | 95 | $sform = new \XoopsThemeForm(_AM_SF_OPEN_QUESTION, 'op', xoops_getenv('PHP_SELF'), 'post', true); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $button_tray->addElement($butt_create); |
164 | 164 | |
165 | 165 | $butt_edit = new \XoopsFormButton('', '', _AM_SF_OPEN_QUESTION_EDIT, 'button'); |
166 | - $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&faqid=" . $faqid . "'\""); |
|
166 | + $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&faqid=".$faqid."'\""); |
|
167 | 167 | $button_tray->addElement($butt_edit); |
168 | 168 | |
169 | 169 | $butt_cancel = new \XoopsFormButton('', '', _AM_SF_CANCEL, 'button'); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | xoops_cp_header(); |
196 | 196 | |
197 | 197 | $adminObject->displayNavigation(basename(__FILE__)); |
198 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
198 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
199 | 199 | |
200 | 200 | editfaq(true, $faqid); |
201 | 201 | break; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | |
257 | 257 | // Storing the FAQ |
258 | 258 | if (!$faqObj->store()) { |
259 | - redirect_header('javascript:history.go(-1)', 3, _AM_SF_ERROR . Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
259 | + redirect_header('javascript:history.go(-1)', 3, _AM_SF_ERROR.Smartfaq\Utility::formatErrors($faqObj->getErrors())); |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | // Send notifications |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | 'faqid' => $faqObj->faqid(), |
298 | 298 | 'confirm' => 1, |
299 | 299 | 'name' => $faqObj->question() |
300 | - ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
300 | + ], 'question.php', _AM_SF_DELETETHISQUESTION." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE); |
|
301 | 301 | xoops_cp_footer(); |
302 | 302 | } |
303 | 303 | |
@@ -310,18 +310,18 @@ discard block |
||
310 | 310 | xoops_cp_header(); |
311 | 311 | $adminObject->displayNavigation(basename(__FILE__)); |
312 | 312 | |
313 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
314 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
313 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
314 | + require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
315 | 315 | |
316 | - global $xoopsConfig, $xoopsDB, $xoopsModule, $smartModuleConfig; |
|
316 | + global $xoopsConfig, $xoopsDB, $xoopsModule, $smartModuleConfig; |
|
317 | 317 | |
318 | 318 | echo "<br>\n"; |
319 | 319 | |
320 | 320 | Smartfaq\Utility::collapsableBar('toptable', 'toptableicon'); |
321 | 321 | |
322 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_OPENED_TITLE . '</h3>'; |
|
322 | + echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_OPENED_TITLE.'</h3>'; |
|
323 | 323 | echo "<div id='toptable'>"; |
324 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_OPENED_DSC . '</span>'; |
|
324 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_OPENED_DSC.'</span>'; |
|
325 | 325 | |
326 | 326 | // Get the total number of published FAQs |
327 | 327 | $totalfaqs = $faqHandler->getFaqsCount(-1, [Constants::SF_STATUS_OPENED]); |
@@ -331,14 +331,14 @@ discard block |
||
331 | 331 | $allCats = $categoryHandler->getObjects(null, true); |
332 | 332 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
333 | 333 | echo '<tr>'; |
334 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>'; |
|
335 | - echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
336 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
334 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>'; |
|
335 | + echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>'; |
|
336 | + echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
337 | 337 | |
338 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
338 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
339 | 339 | |
340 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
341 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
340 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
341 | + echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
342 | 342 | echo '</tr>'; |
343 | 343 | //var_dump( $faqsObj); |
344 | 344 | if ($totalfaqs > 0) { |
@@ -346,33 +346,33 @@ discard block |
||
346 | 346 | foreach (array_keys($faqsObj) as $i) { |
347 | 347 | $categoryObj = $allCats[$faqsObj[$i]->categoryid()]; |
348 | 348 | |
349 | - $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>"; |
|
350 | - $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>"; |
|
349 | + $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>"; |
|
350 | + $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>"; |
|
351 | 351 | |
352 | 352 | $requester = Smartfaq\Utility::getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
353 | 353 | |
354 | 354 | echo '<tr>'; |
355 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>'; |
|
356 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
357 | - 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>'; |
|
355 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid().'</td>'; |
|
356 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
357 | + 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>'; |
|
358 | 358 | |
359 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
359 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
360 | 360 | |
361 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . '</td>'; |
|
361 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s').'</td>'; |
|
362 | 362 | echo "<td class='even' align='center'> $modify $delete </td>"; |
363 | 363 | echo '</tr>'; |
364 | 364 | } |
365 | 365 | } else { |
366 | 366 | $faqid = -1; |
367 | 367 | echo '<tr>'; |
368 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOQUEUED . '</td>'; |
|
368 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOQUEUED.'</td>'; |
|
369 | 369 | echo '</tr>'; |
370 | 370 | } |
371 | 371 | echo "</table>\n"; |
372 | 372 | echo "<br>\n"; |
373 | 373 | |
374 | 374 | $pagenav = new \XoopsPageNav($totalfaqs, $helper->getConfig('perpage'), $startfaq, 'startfaq'); |
375 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
375 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
376 | 376 | echo '</div>'; |
377 | 377 | |
378 | 378 | $totalcategories = $categoryHandler->getCategoriesCount(-1); |
@@ -383,4 +383,4 @@ discard block |
||
383 | 383 | break; |
384 | 384 | } |
385 | 385 | |
386 | -require_once __DIR__ . '/admin_footer.php'; |
|
386 | +require_once __DIR__.'/admin_footer.php'; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | |
11 | -require_once __DIR__ . '/header.php'; |
|
11 | +require_once __DIR__.'/header.php'; |
|
12 | 12 | |
13 | 13 | $faqid = \Xmf\Request::getInt('faqid', 0, 'GET'); |
14 | 14 | |
@@ -46,23 +46,23 @@ discard block |
||
46 | 46 | |
47 | 47 | echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n"; |
48 | 48 | echo "<html>\n<head>\n"; |
49 | -echo '<title>' . _MD_SF_FAQCOMEFROM . ' ' . $xoopsConfig['sitename'] . "</title>\n"; |
|
50 | -echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "'>\n"; |
|
51 | -echo "<meta name='AUTHOR' content='" . $xoopsConfig['sitename'] . "'>\n"; |
|
52 | -echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by " . $xoopsConfig['sitename'] . "'>\n"; |
|
53 | -echo "<meta name='DESCRIPTION' content='" . $xoopsConfig['slogan'] . "'>\n"; |
|
54 | -echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "'>\n\n\n"; |
|
49 | +echo '<title>'._MD_SF_FAQCOMEFROM.' '.$xoopsConfig['sitename']."</title>\n"; |
|
50 | +echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."'>\n"; |
|
51 | +echo "<meta name='AUTHOR' content='".$xoopsConfig['sitename']."'>\n"; |
|
52 | +echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by ".$xoopsConfig['sitename']."'>\n"; |
|
53 | +echo "<meta name='DESCRIPTION' content='".$xoopsConfig['slogan']."'>\n"; |
|
54 | +echo "<meta name='GENERATOR' content='".XOOPS_VERSION."'>\n\n\n"; |
|
55 | 55 | |
56 | 56 | echo "<body bgcolor='#ffffff' text='#000000' onload='window.print()'> |
57 | 57 | <div style='width: 650px; border: 1px solid #000; padding: 20px;'> |
58 | - <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/logo_module.png' border='0' alt=''><h2 style='margin: 0;'>" . $faqObj->question() . "</h2></div> |
|
59 | - <div align='center'>" . $who_where . "</div> |
|
58 | + <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL."/modules/smartfaq/assets/images/logo_module.png' border='0' alt=''><h2 style='margin: 0;'>".$faqObj->question()."</h2></div> |
|
59 | + <div align='center'>" . $who_where."</div> |
|
60 | 60 | <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div> |
61 | 61 | <div></div> |
62 | - <b><p>" . $faqObj->question() . '</p></b> |
|
63 | - <p>' . $answerObj->answer() . "</p> |
|
62 | + <b><p>" . $faqObj->question().'</p></b> |
|
63 | + <p>' . $answerObj->answer()."</p> |
|
64 | 64 | <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div> |
65 | - <p>" . $comeFrom . '</p> |
|
65 | + <p>" . $comeFrom.'</p> |
|
66 | 66 | </div> |
67 | 67 | <br>'; |
68 | 68 |
@@ -51,94 +51,94 @@ |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | switch ($op) { |
54 | - case 'post': |
|
54 | + case 'post': |
|
55 | 55 | |
56 | - global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsDB; |
|
56 | + global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsDB; |
|
57 | 57 | |
58 | - $newFaqObj = $faqHandler->create(); |
|
58 | + $newFaqObj = $faqHandler->create(); |
|
59 | 59 | |
60 | - if (!$xoopsUser) { |
|
61 | - if (1 == $helper->getConfig('anonpost')) { |
|
62 | - $uid = 0; |
|
60 | + if (!$xoopsUser) { |
|
61 | + if (1 == $helper->getConfig('anonpost')) { |
|
62 | + $uid = 0; |
|
63 | + } else { |
|
64 | + redirect_header('index.php', 3, _NOPERM); |
|
65 | + } |
|
63 | 66 | } else { |
64 | - redirect_header('index.php', 3, _NOPERM); |
|
67 | + $uid = $xoopsUser->uid(); |
|
65 | 68 | } |
66 | - } else { |
|
67 | - $uid = $xoopsUser->uid(); |
|
68 | - } |
|
69 | - |
|
70 | - // Putting the values about the FAQ in the FAQ object |
|
71 | - $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
72 | - $newFaqObj->setVar('uid', $uid); |
|
73 | - $newFaqObj->setVar('question', $_POST['question']); |
|
74 | - $notifypub = \Xmf\Request::getInt('notifypub', 0, POST); |
|
75 | - $newFaqObj->setVar('notifypub', $notifypub); |
|
76 | - |
|
77 | - // Setting the status of the FAQ |
|
78 | - if (1 == $helper->getConfig('autoapprove_request')) { |
|
79 | - $newFaqObj->setVar('status', Constants::SF_STATUS_OPENED); |
|
80 | - } else { |
|
81 | - $newFaqObj->setVar('status', Constants::SF_STATUS_ASKED); |
|
82 | - } |
|
83 | - |
|
84 | - // Storing the FAQ object in the database |
|
85 | - if (!$newFaqObj->store()) { |
|
86 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
87 | - } |
|
88 | - |
|
89 | - // Get the cateopry object related to that FAQ |
|
90 | - // If autoapprove_requested |
|
91 | - if (1 == $helper->getConfig('autoapprove_request')) { |
|
92 | - // We do not not subscribe user to notification on publish since we publish it right away |
|
93 | - |
|
94 | - // Send notifications |
|
95 | - $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_PUBLISHED]); |
|
96 | - |
|
97 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
98 | - } else { |
|
99 | - // Subscribe the user to On Published notification, if requested |
|
100 | - if (1 == $notifypub) { |
|
101 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
102 | - $notificationHandler = xoops_getHandler('notification'); |
|
103 | - $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
69 | + |
|
70 | + // Putting the values about the FAQ in the FAQ object |
|
71 | + $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
72 | + $newFaqObj->setVar('uid', $uid); |
|
73 | + $newFaqObj->setVar('question', $_POST['question']); |
|
74 | + $notifypub = \Xmf\Request::getInt('notifypub', 0, POST); |
|
75 | + $newFaqObj->setVar('notifypub', $notifypub); |
|
76 | + |
|
77 | + // Setting the status of the FAQ |
|
78 | + if (1 == $helper->getConfig('autoapprove_request')) { |
|
79 | + $newFaqObj->setVar('status', Constants::SF_STATUS_OPENED); |
|
80 | + } else { |
|
81 | + $newFaqObj->setVar('status', Constants::SF_STATUS_ASKED); |
|
82 | + } |
|
83 | + |
|
84 | + // Storing the FAQ object in the database |
|
85 | + if (!$newFaqObj->store()) { |
|
86 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
104 | 87 | } |
105 | - // Send notifications |
|
106 | - $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_SUBMITTED]); |
|
107 | 88 | |
108 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
109 | - } |
|
89 | + // Get the cateopry object related to that FAQ |
|
90 | + // If autoapprove_requested |
|
91 | + if (1 == $helper->getConfig('autoapprove_request')) { |
|
92 | + // We do not not subscribe user to notification on publish since we publish it right away |
|
93 | + |
|
94 | + // Send notifications |
|
95 | + $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_PUBLISHED]); |
|
96 | + |
|
97 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
98 | + } else { |
|
99 | + // Subscribe the user to On Published notification, if requested |
|
100 | + if (1 == $notifypub) { |
|
101 | + require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
102 | + $notificationHandler = xoops_getHandler('notification'); |
|
103 | + $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
104 | + } |
|
105 | + // Send notifications |
|
106 | + $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_SUBMITTED]); |
|
107 | + |
|
108 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
109 | + } |
|
110 | 110 | |
111 | - //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
112 | - redirect_header('index.php', 2, $redirect_msg); |
|
113 | - break; |
|
111 | + //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
112 | + redirect_header('index.php', 2, $redirect_msg); |
|
113 | + break; |
|
114 | 114 | |
115 | - case 'form': |
|
116 | - default: |
|
115 | + case 'form': |
|
116 | + default: |
|
117 | 117 | |
118 | - global $xoopsUser, $myts; |
|
118 | + global $xoopsUser, $myts; |
|
119 | 119 | |
120 | - $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
121 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
122 | - require_once __DIR__ . '/footer.php'; |
|
120 | + $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
121 | + require_once XOOPS_ROOT_PATH . '/header.php'; |
|
122 | + require_once __DIR__ . '/footer.php'; |
|
123 | 123 | |
124 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
124 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
125 | 125 | |
126 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
127 | - $xoopsTpl->assign('whereInSection', $moduleName); |
|
128 | - $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
126 | + $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
127 | + $xoopsTpl->assign('whereInSection', $moduleName); |
|
128 | + $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
129 | 129 | |
130 | - $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
131 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($helper->getConfig('requestintromsg'))); |
|
130 | + $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
131 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($helper->getConfig('requestintromsg'))); |
|
132 | 132 | |
133 | - require_once __DIR__ . '/include/request.inc.php'; |
|
133 | + require_once __DIR__ . '/include/request.inc.php'; |
|
134 | 134 | |
135 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
135 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
136 | 136 | |
137 | - $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
137 | + $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
138 | 138 | |
139 | - require_once __DIR__ . '/include/request.inc.php'; |
|
139 | + require_once __DIR__ . '/include/request.inc.php'; |
|
140 | 140 | |
141 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
141 | + require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
142 | 142 | |
143 | - break; |
|
143 | + break; |
|
144 | 144 | } |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | use XoopsModules\Smartfaq\Constants; |
11 | 11 | |
12 | -require_once __DIR__ . '/header.php'; |
|
13 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
12 | +require_once __DIR__.'/header.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
14 | 14 | |
15 | -global $xoopsUser, $xoopsConfig, $xoopsModule; |
|
15 | +global $xoopsUser, $xoopsConfig, $xoopsModule; |
|
16 | 16 | /** @var Smartfaq\Helper $helper */ |
17 | 17 | $helper = Smartfaq\Helper::getInstance(); |
18 | 18 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | if (!($isAdmin |
38 | 38 | || (null !== ($helper->getConfig('allowrequest')) |
39 | 39 | && 1 == $helper->getConfig('allowrequest') |
40 | - && (is_object($xoopsUser) || (null !== ($helper->getConfig('anonpost')) && 1 == $helper->getConfig('anonpost')))))) { |
|
40 | + && (is_object($xoopsUser) || (null !== ($helper->getConfig('anonpost')) && 1 == $helper->getConfig('anonpost')))))) { |
|
41 | 41 | redirect_header('index.php', 1, _NOPERM); |
42 | 42 | } |
43 | 43 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | // Storing the FAQ object in the database |
85 | 85 | if (!$newFaqObj->store()) { |
86 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
86 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR.Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | // Get the cateopry object related to that FAQ |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } else { |
99 | 99 | // Subscribe the user to On Published notification, if requested |
100 | 100 | if (1 == $notifypub) { |
101 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
101 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
102 | 102 | $notificationHandler = xoops_getHandler('notification'); |
103 | 103 | $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
104 | 104 | } |
@@ -118,27 +118,27 @@ discard block |
||
118 | 118 | global $xoopsUser, $myts; |
119 | 119 | |
120 | 120 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
121 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
122 | - require_once __DIR__ . '/footer.php'; |
|
121 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
122 | + require_once __DIR__.'/footer.php'; |
|
123 | 123 | |
124 | 124 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
125 | 125 | |
126 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
126 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
127 | 127 | $xoopsTpl->assign('whereInSection', $moduleName); |
128 | 128 | $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
129 | 129 | |
130 | 130 | $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
131 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($helper->getConfig('requestintromsg'))); |
|
131 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, ".$myts->displayTarea($helper->getConfig('requestintromsg'))); |
|
132 | 132 | |
133 | - require_once __DIR__ . '/include/request.inc.php'; |
|
133 | + require_once __DIR__.'/include/request.inc.php'; |
|
134 | 134 | |
135 | 135 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
136 | 136 | |
137 | 137 | $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
138 | 138 | |
139 | - require_once __DIR__ . '/include/request.inc.php'; |
|
139 | + require_once __DIR__.'/include/request.inc.php'; |
|
140 | 140 | |
141 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
141 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
142 | 142 | |
143 | 143 | break; |
144 | 144 | } |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | |
15 | 15 | global $_POST, $xoopsDB; |
16 | 16 | |
17 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
18 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
19 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
17 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
18 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
19 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
20 | 20 | |
21 | 21 | //require_once __DIR__ . '/functions.php'; |
22 | 22 | |
@@ -82,18 +82,18 @@ discard block |
||
82 | 82 | // $upload_tray->addElement(new \XoopsFormFile('', 'userfile', ($forum_obj->getVar('attach_maxkb') * 1024))); |
83 | 83 | $upload_tray->addElement(new \XoopsFormFile('', 'userfile', $helper->getConfig('max_image_size') * 1024)); |
84 | 84 | $upload_tray->addElement(new \XoopsFormButton('', 'contents_upload', _MD_SF_UPLOAD, 'submit')); |
85 | -$upload_tray->addElement(new \XoopsFormLabel('<br><br>' . _MD_SF_MAX_FILESIZE . ':', $helper->getConfig('max_image_size') . 'Kb; ')); |
|
85 | +$upload_tray->addElement(new \XoopsFormLabel('<br><br>'._MD_SF_MAX_FILESIZE.':', $helper->getConfig('max_image_size').'Kb; ')); |
|
86 | 86 | $extensions = trim(str_replace('|', ' ', $helper->getConfig('attach_ext'))); |
87 | 87 | $extensions = (empty($extensions) || '*' === $extensions) ? _ALL : $extensions; |
88 | -$upload_tray->addElement(new \XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS . ':', $extensions)); |
|
89 | -$upload_tray->addElement(new \XoopsFormLabel('<br>' . sprintf(_MD_SF_MAXPIC, $helper->getConfig('max_img_height'), $helper->getConfig('max_img_width')))); |
|
88 | +$upload_tray->addElement(new \XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS.':', $extensions)); |
|
89 | +$upload_tray->addElement(new \XoopsFormLabel('<br>'.sprintf(_MD_SF_MAXPIC, $helper->getConfig('max_img_height'), $helper->getConfig('max_img_width')))); |
|
90 | 90 | $form->addElement($upload_tray); |
91 | 91 | //} |
92 | 92 | |
93 | 93 | if (!empty($attachments) && is_array($attachments) && count($attachments)) { |
94 | 94 | $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_SF_ATTACHED_FILES, 'delete_attach[]'); |
95 | 95 | foreach ($attachments as $key => $attachment) { |
96 | - $attach = ' ' . _DELETE . ' <a href=' . XOOPS_URL . '/' . $helper->getConfig('dir_attachments') . '/' . $attachment['name_saved'] . ' rel="external">' . $attachment['name_display'] . '</a><br>'; |
|
96 | + $attach = ' '._DELETE.' <a href='.XOOPS_URL.'/'.$helper->getConfig('dir_attachments').'/'.$attachment['name_saved'].' rel="external">'.$attachment['name_display'].'</a><br>'; |
|
97 | 97 | $delete_attach_checkbox->addOption($key, $attach); |
98 | 98 | } |
99 | 99 | $form->addElement($delete_attach_checkbox); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_REMOVE, 'delete_tmp[]'); |
105 | 105 | $url_prefix = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, XOOPS_CACHE_PATH); |
106 | 106 | foreach ($attachments_tmp as $key => $attachment) { |
107 | - $attach = ' <a href="' . $url_prefix . '/' . $attachment[0] . '" rel="external">' . $attachment[1] . '</a><br>'; |
|
107 | + $attach = ' <a href="'.$url_prefix.'/'.$attachment[0].'" rel="external">'.$attachment[1].'</a><br>'; |
|
108 | 108 | $delete_attach_checkbox->addOption($key, $attach); |
109 | 109 | } |
110 | 110 | $form->addElement($delete_attach_checkbox); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
17 | 17 | |
18 | -defined('NEWBB_FUNCTIONS_INI') || include __DIR__ . '/functions.ini.php'; |
|
18 | +defined('NEWBB_FUNCTIONS_INI') || include __DIR__.'/functions.ini.php'; |
|
19 | 19 | define('NEWBB_FUNCTIONS_RENDER_LOADED', true); |
20 | 20 | |
21 | 21 | if (!defined('NEWBB_FUNCTIONS_RENDER')): |
@@ -60,16 +60,16 @@ discard block |
||
60 | 60 | // decode xcode |
61 | 61 | if (0 != $image) { |
62 | 62 | // image allowed |
63 | - $text =& $myts->xoopsCodeDecode($text); |
|
63 | + $text = & $myts->xoopsCodeDecode($text); |
|
64 | 64 | } else { |
65 | 65 | // image not allowed |
66 | - $text =& $myts->xoopsCodeDecode($text, 0); |
|
66 | + $text = & $myts->xoopsCodeDecode($text, 0); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | if (0 != $br) { |
70 | - $text =& $myts->nl2Br($text); |
|
70 | + $text = & $myts->nl2Br($text); |
|
71 | 71 | } |
72 | - $text = $myts->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) |
|
72 | + $text = $myts->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) |
|
73 | 73 | |
74 | 74 | return $text; |
75 | 75 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $button = "<input type='button' name='{$button}' {$extra} value='{$alt}' onclick='window.location.href={$link}'>"; |
101 | 101 | if (empty($asImage)) { |
102 | - $button = "<a href='{$link}' title='{$alt}' {$extra}>" . sf_displayImage($button, $alt, true) . '</a>'; |
|
102 | + $button = "<a href='{$link}' title='{$alt}' {$extra}>".sf_displayImage($button, $alt, true).'</a>'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | return $button; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $display = false; |
129 | 129 | } |
130 | 130 | // if set for each link => overwrite $display |
131 | - if (null !== ($helper->getConfig('display_text_each_link')[$image])) { |
|
131 | + if (null !== ($helper->getConfig('display_text_each_link')[$image])) { |
|
132 | 132 | $display = empty($helper->getConfig('display_text_each_link')[$image]); |
133 | 133 | } |
134 | 134 | } |