@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | function b_faqs_random_how_show() |
11 | 11 | { |
12 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
12 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
13 | 13 | |
14 | 14 | $block = array(); |
15 | 15 |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | -$faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
11 | +$faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
12 | 12 | |
13 | 13 | if ($faqid == 0) { |
14 | 14 | redirect_header('javascript:history.go(-1)', 1, _MD_SF_NOFAQSELECTED); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $faqObj->updateCounter(); |
45 | 45 | } |
46 | 46 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_faq.tpl'; |
47 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
48 | -require_once __DIR__ . '/footer.php'; |
|
47 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
48 | +require_once __DIR__.'/footer.php'; |
|
49 | 49 | |
50 | 50 | $faq = $faqObj->toArray(null, $categoryObj, false); |
51 | 51 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $xoopsTpl->assign('display_categoryname', false); |
81 | 81 | |
82 | 82 | $xoopsTpl->assign('xcodes', $faqObj->getVar('xcodes')); |
83 | -$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) . ': ' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $faqObj->getVar('faqid')); |
|
83 | +$xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']).'&body='.sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$faqObj->getVar('faqid')); |
|
84 | 84 | $xoopsTpl->assign('lang_printerpage', _MD_SF_PRINTERFRIENDLY); |
85 | 85 | $xoopsTpl->assign('lang_sendstory', _MD_SF_SENDSTORY); |
86 | 86 | $xoopsTpl->assign('faqid', $faqObj->getVar('faqid')); |
@@ -96,19 +96,19 @@ discard block |
||
96 | 96 | |
97 | 97 | // Page Title Hack by marcan |
98 | 98 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
99 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $categoryObj->name() . ' - ' . $faq['question']); |
|
99 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$categoryObj->name().' - '.$faq['question']); |
|
100 | 100 | // End Page Title Hack by marcan |
101 | 101 | |
102 | 102 | // Include the comments if the selected FAQ supports comments |
103 | 103 | if ($faqObj->cancomment() == 1) { |
104 | - require_once XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
104 | + require_once XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | //code to include smartie |
108 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) { |
|
109 | - require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php'; |
|
108 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) { |
|
109 | + require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php'; |
|
110 | 110 | $xoopsTpl->assign('smarttie', 1); |
111 | 111 | } |
112 | 112 | //end code for smarttie |
113 | 113 | |
114 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
114 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -6,11 +6,11 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | 10 | |
11 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
12 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php'; |
|
13 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php'; |
|
14 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php'; |
|
11 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
12 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; |
|
14 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; |
|
15 | 15 | |
16 | 16 | $myts = MyTextSanitizer::getInstance(); |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -require_once XOOPS_ROOT_PATH . '/include/comment_edit.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/include/comment_edit.php'; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | use Xmf\Request; |
10 | 10 | |
11 | -require_once __DIR__ . '/header.php'; |
|
11 | +require_once __DIR__.'/header.php'; |
|
12 | 12 | |
13 | 13 | global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
14 | 14 | |
@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | |
130 | 130 | // Storing the FAQ object in the database |
131 | 131 | if (!$faqObj->store()) { |
132 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
132 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($faqObj->getErrors())); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | // Storing the answer object in the database |
136 | 136 | if (!$newAnswerObj->store()) { |
137 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($newAnswerObj->getErrors())); |
|
137 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($newAnswerObj->getErrors())); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $notificationHandler = xoops_getHandler('notification'); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | case 2: |
151 | 151 | // Answer for an open question submitted, auto-approved; became Q&A, need approbation |
152 | 152 | if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) { |
153 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
153 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
154 | 154 | $notificationHandler->subscribe('faq', $faqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
155 | 155 | } |
156 | 156 | // Send notifications |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | case 3: |
161 | 161 | // Answer submitted, needs approbation |
162 | 162 | if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) { |
163 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
163 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
164 | 164 | $notificationHandler->subscribe('question', $newAnswerObj->answerid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
165 | 165 | } |
166 | 166 | // Send notifications |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | // New answer submitted for a published Q&A, need approbation |
176 | 176 | // Send notifications |
177 | 177 | if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) { |
178 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
178 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
179 | 179 | $notificationHandler->subscribe('faq', $newAnswerObj->answerid(), 'answer_approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
180 | 180 | } |
181 | 181 | |
@@ -212,20 +212,20 @@ discard block |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
215 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
216 | - require_once __DIR__ . '/footer.php'; |
|
215 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
216 | + require_once __DIR__.'/footer.php'; |
|
217 | 217 | |
218 | 218 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
219 | 219 | |
220 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
220 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
221 | 221 | $xoopsTpl->assign('whereInSection', $moduleName); |
222 | 222 | $xoopsTpl->assign('lang_submit', _MD_SF_SUBMITANSWER); |
223 | 223 | |
224 | 224 | $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUBMITANSWERTO, ucwords($xoopsModule->name()))); |
225 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUBMITANSWER_INTRO); |
|
225 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUBMITANSWER_INTRO); |
|
226 | 226 | |
227 | - require_once __DIR__ . '/include/answer.inc.php'; |
|
227 | + require_once __DIR__.'/include/answer.inc.php'; |
|
228 | 228 | |
229 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
229 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
230 | 230 | break; |
231 | 231 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | //$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; |
27 | 27 | $modversion['modicons16'] = 'assets/images/icons/16'; |
28 | 28 | $modversion['modicons32'] = 'assets/images/icons/32'; |
29 | -$modversion['release_file'] = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt'; |
|
29 | +$modversion['release_file'] = XOOPS_URL.'/modules/'.$modversion['dirname'].'/docs/changelog.txt'; |
|
30 | 30 | $modversion['module_website_url'] = 'www.xoops.org'; |
31 | 31 | $modversion['module_website_name'] = 'XOOPS'; |
32 | 32 | $modversion['min_php'] = '5.5'; |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | |
97 | 97 | // Tables created by sql file (without prefix!) |
98 | 98 | $modversion['tables'] = [ |
99 | - $moduleDirName . '_' . 'categories', |
|
100 | - $moduleDirName . '_' . 'faq', |
|
101 | - $moduleDirName . '_' . 'answers' |
|
99 | + $moduleDirName.'_'.'categories', |
|
100 | + $moduleDirName.'_'.'faq', |
|
101 | + $moduleDirName.'_'.'answers' |
|
102 | 102 | ]; |
103 | 103 | |
104 | 104 | // Search |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $modversion['sub'][2]['url'] = 'request.php?op=add'; |
151 | 151 | } |
152 | 152 | |
153 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
153 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
154 | 154 | |
155 | 155 | // Creating the FAQ handler object |
156 | 156 | $faqHandler = sf_gethandler('faq'); |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | -$categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
11 | +$categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0; |
|
12 | 12 | |
13 | 13 | // Creating the category handler object |
14 | 14 | $categoryHandler = sf_gethandler('category'); |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | } |
33 | 33 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl'; |
34 | 34 | |
35 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
36 | -require_once __DIR__ . '/footer.php'; |
|
35 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
36 | +require_once __DIR__.'/footer.php'; |
|
37 | 37 | |
38 | 38 | // At which record shall we start |
39 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
39 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
40 | 40 | |
41 | 41 | // Creating the faq handler object |
42 | 42 | $faqHandler = sf_gethandler('faq'); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // Get the last smartfaq |
71 | 71 | $last_qnaObj = $faqHandler->getLastPublishedByCat(); |
72 | 72 | } |
73 | -$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize']; |
|
73 | +$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize']; |
|
74 | 74 | // Creating the sub-categories objects that belong to the selected category |
75 | 75 | $subcatsObj = $categoryHandler->getCategories(0, 0, $categoryid); |
76 | 76 | $total_subcats = count($subcatsObj); |
@@ -82,18 +82,18 @@ discard block |
||
82 | 82 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
83 | 83 | if (isset($last_qnaObj[$subcat_id])) { |
84 | 84 | $subcatsObj[$i]->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
85 | - $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
85 | + $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | $subcatsObj[$i]->setVar('faqcount', $totalQnas[$subcat_id]); |
89 | 89 | $subcats[$subcat_id] = $subcatsObj[$i]->toArray(); |
90 | - $total_faqs += $totalQnas[$subcat_id]; |
|
90 | + $total_faqs += $totalQnas[$subcat_id]; |
|
91 | 91 | //}replacé ligne 92 |
92 | 92 | } |
93 | 93 | $xoopsTpl->assign('subcats', $subcats); |
94 | 94 | } |
95 | 95 | $thiscategory_faqcount = isset($totalQnas[$categoryid]) ? $totalQnas[$categoryid] : 0; |
96 | -$category['total'] = $thiscategory_faqcount + $total_faqs; |
|
96 | +$category['total'] = $thiscategory_faqcount+$total_faqs; |
|
97 | 97 | |
98 | 98 | if (count($faqsObj) > 0) { |
99 | 99 | $userids = array(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | $memberHandler = xoops_getHandler('member'); |
112 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
112 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
113 | 113 | // Adding the Q&As of the selected category |
114 | 114 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
115 | 115 | $faq = $faqsObj[$i]->toArray(null, $categoryObj); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if (isset($last_qnaObj) && $last_qnaObj) { |
137 | 137 | $category['last_faqid'] = $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid'); |
138 | - $category['last_question_link'] = "<a href='faq.php?faqid=" . $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid') . "'>" . $last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize) . '</a>'; |
|
138 | + $category['last_question_link'] = "<a href='faq.php?faqid=".$last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid')."'>".$last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize).'</a>'; |
|
139 | 139 | } |
140 | 140 | } |
141 | 141 | |
@@ -160,26 +160,26 @@ discard block |
||
160 | 160 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
161 | 161 | |
162 | 162 | // The Navigation Bar |
163 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
164 | -$pagenav = new XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid')); |
|
163 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
164 | +$pagenav = new XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid')); |
|
165 | 165 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
166 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
166 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
167 | 167 | } else { |
168 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
168 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | $xoopsTpl->assign('category', $category); |
172 | 172 | |
173 | 173 | // Page Title Hack by marcan |
174 | 174 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
175 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']); |
|
175 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']); |
|
176 | 176 | // End Page Title Hack by marcan |
177 | 177 | |
178 | 178 | //code to include smartie |
179 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) { |
|
180 | - require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php'; |
|
179 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) { |
|
180 | + require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php'; |
|
181 | 181 | $xoopsTpl->assign('smarttie', 1); |
182 | 182 | } |
183 | 183 | //end code for smarttie |
184 | 184 | |
185 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
185 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
20 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
21 | 21 | //require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
22 | 22 | |
23 | 23 | //require_once __DIR__ . '/../class/utility.php'; |
@@ -26,16 +26,16 @@ discard block |
||
26 | 26 | $moduleDirName = basename(dirname(__DIR__)); |
27 | 27 | |
28 | 28 | $path = dirname(dirname(dirname(__DIR__))); |
29 | -require_once $path . '/kernel/module.php'; |
|
30 | -require_once $path . '/class/xoopstree.php'; |
|
31 | -require_once $path . '/class/xoopslists.php'; |
|
32 | -require_once $path . '/class/pagenav.php'; |
|
33 | -require_once $path . '/class/xoopsformloader.php'; |
|
34 | - |
|
35 | -require_once __DIR__ . '/../include/functions.php'; |
|
36 | -require_once __DIR__ . '/../class/category.php'; |
|
37 | -require_once __DIR__ . '/../class/faq.php'; |
|
38 | -require_once __DIR__ . '/../class/answer.php'; |
|
29 | +require_once $path.'/kernel/module.php'; |
|
30 | +require_once $path.'/class/xoopstree.php'; |
|
31 | +require_once $path.'/class/xoopslists.php'; |
|
32 | +require_once $path.'/class/pagenav.php'; |
|
33 | +require_once $path.'/class/xoopsformloader.php'; |
|
34 | + |
|
35 | +require_once __DIR__.'/../include/functions.php'; |
|
36 | +require_once __DIR__.'/../class/category.php'; |
|
37 | +require_once __DIR__.'/../class/faq.php'; |
|
38 | +require_once __DIR__.'/../class/answer.php'; |
|
39 | 39 | //require_once __DIR__ . '/../class/utility.php'; |
40 | 40 | //require_once __DIR__ . '/../include/common.php'; |
41 | 41 |
@@ -28,46 +28,46 @@ discard block |
||
28 | 28 | if (empty($fct)) { |
29 | 29 | $fct = 'preferences'; |
30 | 30 | } |
31 | -include __DIR__ . '/../../../mainfile.php'; |
|
32 | -include XOOPS_ROOT_PATH . '/include/cp_functions.php'; |
|
31 | +include __DIR__.'/../../../mainfile.php'; |
|
32 | +include XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
33 | 33 | |
34 | -require_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
34 | +require_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
35 | 35 | |
36 | 36 | $admintest = 0; |
37 | 37 | |
38 | 38 | if (is_object($xoopsUser)) { |
39 | 39 | $xoopsModule = XoopsModule::getByDirname('system'); |
40 | 40 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
41 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
41 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
42 | 42 | } |
43 | 43 | $admintest = 1; |
44 | 44 | } else { |
45 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
45 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // include system category definitions |
49 | -require_once XOOPS_ROOT_PATH . '/modules/system/constants.php'; |
|
49 | +require_once XOOPS_ROOT_PATH.'/modules/system/constants.php'; |
|
50 | 50 | $error = false; |
51 | 51 | if ($admintest != 0) { |
52 | 52 | if (isset($fct) && $fct != '') { |
53 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) { |
|
54 | - require_once XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin.php'; |
|
53 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php')) { |
|
54 | + require_once XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin.php'; |
|
55 | 55 | |
56 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php')) { |
|
57 | - include XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php'; |
|
58 | - } elseif (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php')) { |
|
59 | - include XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php'; |
|
56 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php')) { |
|
57 | + include XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php'; |
|
58 | + } elseif (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php')) { |
|
59 | + include XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php'; |
|
60 | 60 | } |
61 | - include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php'; |
|
61 | + include XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php'; |
|
62 | 62 | $syspermHandler = xoops_getHandler('groupperm'); |
63 | - $category = !empty($modversion['category']) ? (int)$modversion['category'] : 0; |
|
63 | + $category = !empty($modversion['category']) ? (int) $modversion['category'] : 0; |
|
64 | 64 | unset($modversion); |
65 | 65 | if ($category > 0) { |
66 | - $groups =& $xoopsUser->getGroups(); |
|
66 | + $groups = & $xoopsUser->getGroups(); |
|
67 | 67 | if (in_array(XOOPS_GROUP_ADMIN, $groups) |
68 | 68 | || false !== $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { |
69 | 69 | if (file_exists("../include/{$fct}.inc.php")) { |
70 | - require_once __DIR__ . "/../include/{$fct}.inc.php"; |
|
70 | + require_once __DIR__."/../include/{$fct}.inc.php"; |
|
71 | 71 | } else { |
72 | 72 | $error = true; |
73 | 73 | } |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | $error = true; |
76 | 76 | } |
77 | 77 | } elseif ($fct === 'version') { |
78 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) { |
|
79 | - require_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php'; |
|
78 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php')) { |
|
79 | + require_once XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php'; |
|
80 | 80 | } else { |
81 | 81 | $error = true; |
82 | 82 | } |
@@ -100,22 +100,22 @@ discard block |
||
100 | 100 | $all_ok = false; |
101 | 101 | if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { |
102 | 102 | $syspermHandler = xoops_getHandler('groupperm'); |
103 | - $ok_syscats =& $syspermHandler->getItemIds('system_admin', $groups); |
|
103 | + $ok_syscats = & $syspermHandler->getItemIds('system_admin', $groups); |
|
104 | 104 | } else { |
105 | 105 | $all_ok = true; |
106 | 106 | } |
107 | - $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; |
|
107 | + $admin_dir = XOOPS_ROOT_PATH.'/modules/system/admin'; |
|
108 | 108 | $handle = opendir($admin_dir); |
109 | 109 | $counter = 0; |
110 | 110 | $class = 'even'; |
111 | 111 | while ($file = readdir($handle)) { |
112 | - if (strtolower($file) !== 'cvs' && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) { |
|
113 | - include $admin_dir . '/' . $file . '/xoops_version.php'; |
|
112 | + if (strtolower($file) !== 'cvs' && !preg_match('/[.]/', $file) && is_dir($admin_dir.'/'.$file)) { |
|
113 | + include $admin_dir.'/'.$file.'/xoops_version.php'; |
|
114 | 114 | if ($modversion['hasAdmin']) { |
115 | - $category = isset($modversion['category']) ? (int)$modversion['category'] : 0; |
|
115 | + $category = isset($modversion['category']) ? (int) $modversion['category'] : 0; |
|
116 | 116 | if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) { |
117 | 117 | echo "<td class='$class' align='center' valign='bottom' width='19%'>"; |
118 | - echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n"; |
|
118 | + echo "<a href='".XOOPS_URL.'/modules/system/admin.php?fct='.$file."'><b>".trim($modversion['name'])."</b></a>\n"; |
|
119 | 119 | echo '</td>'; |
120 | 120 | ++$counter; |
121 | 121 | $class = ($class === 'even') ? 'odd' : 'even'; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | } |
132 | 132 | while ($counter < 5) { |
133 | - echo '<td class="' . $class . '"> </td>'; |
|
133 | + echo '<td class="'.$class.'"> </td>'; |
|
134 | 134 | $class = ($class === 'even') ? 'odd' : 'even'; |
135 | 135 | ++$counter; |
136 | 136 | } |