@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | use Xmf\Request; |
29 | 29 | use XoopsModules\Xoopspoll; |
30 | 30 | |
31 | -require_once __DIR__ . '/header.php'; |
|
31 | +require_once __DIR__.'/header.php'; |
|
32 | 32 | $poll_id = Request::getInt('poll_id', Request::getInt('poll_id', 0, 'POST'), 'GET'); |
33 | 33 | $topic_id = Request::getInt('topic_id', Request::getInt('topic_id', 0, 'POST'), 'GET'); |
34 | 34 | $forum = Request::getInt('forum', Request::getInt('forum', 0, 'POST'), 'GET'); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | if (!Request::getInt('option_id', 0, 'POST')) { |
44 | 44 | // irmtfan - add error message - simple url |
45 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_NOOPTION); |
|
45 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_NOOPTION); |
|
46 | 46 | } |
47 | 47 | // poll module |
48 | 48 | $pollModuleHandler = $moduleHandler->getByDirname($GLOBALS['xoopsModuleConfig']['poll_module']); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $pollObject = $xpPollHandler->get($poll_id); // will create poll if poll_id = 0 exist |
61 | 61 | // old xoopspoll or umfrage or any clone from them |
62 | 62 | } else { |
63 | - include $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/include/constants.php'); |
|
63 | + include $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModuleConfig']['poll_module'].'/include/constants.php'); |
|
64 | 64 | $classPoll = $topicObject->loadOldPoll(); |
65 | 65 | $pollObject = new $classPoll($poll_id); // will create poll if poll_id = 0 exist |
66 | 66 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $optionId = Request::getInt('option_id', 0, 'POST'); |
82 | 82 | } |
83 | 83 | if (!$pollObject->hasExpired()) { |
84 | - $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_MUSTLOGIN'); |
|
84 | + $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_MUSTLOGIN'); |
|
85 | 85 | //@todo:: add $url to all redirects |
86 | 86 | // $url = $GLOBALS['xoops']->buildUrl("index.php", array('poll_id' => $poll_id)); |
87 | 87 | if ($pollObject->isAllowedToVote()) { |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | echo $pollObject->getHtmlErrors(); |
96 | 96 | exit(); |
97 | 97 | } |
98 | - $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_THANKSFORVOTE'); |
|
98 | + $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_THANKSFORVOTE'); |
|
99 | 99 | } else { |
100 | 100 | /* there was a problem registering the vote */ |
101 | - redirect_header($GLOBALS['xoops']->buildUrl('index.php', ['poll_id' => $poll_id]), $classConstants::REDIRECT_DELAY_MEDIUM, constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_VOTE_ERROR')); |
|
101 | + redirect_header($GLOBALS['xoops']->buildUrl('index.php', ['poll_id' => $poll_id]), $classConstants::REDIRECT_DELAY_MEDIUM, constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_VOTE_ERROR')); |
|
102 | 102 | } |
103 | 103 | } else { |
104 | - $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_ALREADYVOTED'); |
|
104 | + $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_ALREADYVOTED'); |
|
105 | 105 | } |
106 | 106 | /* set anon user vote (and the time they voted) */ |
107 | 107 | if (!is_object($GLOBALS['xoopsUser'])) { |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | $classPollUtility::setVoteCookie($poll_id, $voteTime, 0); |
112 | 112 | } |
113 | 113 | } else { |
114 | - $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_CANNOTVOTE'); |
|
114 | + $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_CANNOTVOTE'); |
|
115 | 115 | } |
116 | 116 | } else { |
117 | 117 | /* poll has expired so just show the results */ |
118 | - $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . 'SORRYEXPIRED'); |
|
118 | + $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'SORRYEXPIRED'); |
|
119 | 119 | } |
120 | 120 | } else { |
121 | - $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_ERROR_INVALID_POLLID'); |
|
121 | + $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_ERROR_INVALID_POLLID'); |
|
122 | 122 | } |
123 | 123 | if (null !== $url) { |
124 | 124 | redirect_header($url, $classConstants::REDIRECT_DELAY_MEDIUM, $msg); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | // old xoopspoll or umfrage or any clone from them |
129 | 129 | } else { |
130 | - $classLog = $classPoll . 'Log'; |
|
130 | + $classLog = $classPoll.'Log'; |
|
131 | 131 | if (is_object($GLOBALS['xoopsUser'])) { |
132 | 132 | if ($classLog::hasVoted($poll_id, Request::getString('REMOTE_ADDR', '', 'SERVER'), $GLOBALS['xoopsUser']->getVar('uid'))) { |
133 | 133 | $msg = _PL_ALREADYVOTED; |
@@ -25,23 +25,23 @@ |
||
25 | 25 | require_once $GLOBALS['xoops']->path('modules/newbb/include/functions.render.php'); |
26 | 26 | $iconHandler = newbbGetIconHandler(); |
27 | 27 | // get css rel path from setted language |
28 | -$css_rel_path = $iconHandler->getPath('language/' . $GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'css'); |
|
28 | +$css_rel_path = $iconHandler->getPath('language/'.$GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'css'); |
|
29 | 29 | // add local stylesheet |
30 | 30 | /** @var xos_opal_Theme $xoTheme */ |
31 | -$xoTheme->addStylesheet($css_rel_path . '/style.css'); |
|
31 | +$xoTheme->addStylesheet($css_rel_path.'/style.css'); |
|
32 | 32 | |
33 | 33 | // get js rel path from setted language |
34 | -$js_rel_path = $iconHandler->getPath('language/' . $GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'js'); |
|
34 | +$js_rel_path = $iconHandler->getPath('language/'.$GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'js'); |
|
35 | 35 | // add all local js files inside js directory |
36 | 36 | xoops_load('XoopsLists'); |
37 | 37 | $allfiles = \XoopsLists::getFileListAsArray($GLOBALS['xoops']->path($js_rel_path)); |
38 | 38 | foreach ($allfiles as $jsfile) { |
39 | 39 | if ('js' === strtolower(pathinfo($jsfile, PATHINFO_EXTENSION))) { |
40 | - $xoTheme->addScript($js_rel_path . '/' . $jsfile); |
|
40 | + $xoTheme->addScript($js_rel_path.'/'.$jsfile); |
|
41 | 41 | } |
42 | 42 | } |
43 | -global $forumCookie; // for $forumCookie["prefix"] revert last change - use global instead of include_once |
|
43 | +global $forumCookie; // for $forumCookie["prefix"] revert last change - use global instead of include_once |
|
44 | 44 | // add toggle script |
45 | 45 | //$toggle_script = "var toggle_cookie=\"" . $forumCookie['prefix'] . 'G' . '\';'; |
46 | -$toggle_script = 'var toggle_cookie="' . $forumCookie['prefix'] . 'G";'; |
|
46 | +$toggle_script = 'var toggle_cookie="'.$forumCookie['prefix'].'G";'; |
|
47 | 47 | $xoTheme->addScript(null, ['type' => 'text/javascript'], $toggle_script); |
@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | use XoopsModules\Newbb; |
14 | 14 | |
15 | 15 | ob_start(); |
16 | -require_once __DIR__ . '/header.php'; |
|
16 | +require_once __DIR__.'/header.php'; |
|
17 | 17 | include $GLOBALS['xoops']->path('header.php'); |
18 | 18 | |
19 | 19 | $attach_id = Request::getInt('attachid', 0, 'GET'); |
20 | 20 | $post_id = Request::getInt('post_id', 0, 'GET'); |
21 | 21 | |
22 | 22 | if (!$post_id || !$attach_id) { |
23 | - exit(_MD_NEWBB_NO_SUCH_FILE . ': post_id:' . $post_id . '; attachid' . $attachid); |
|
23 | + exit(_MD_NEWBB_NO_SUCH_FILE.': post_id:'.$post_id.'; attachid'.$attachid); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | ///** @var Newbb\PostHandler $postHandler */ |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if (!$attach) { |
54 | 54 | exit(_MD_NEWBB_NO_SUCH_FILE); |
55 | 55 | } |
56 | -$file_saved = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/' . $attach['name_saved']); |
|
56 | +$file_saved = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'].'/'.$attach['name_saved']); |
|
57 | 57 | if (!file_exists($file_saved)) { |
58 | 58 | exit(_MD_NEWBB_NO_SUCH_FILE); |
59 | 59 | } |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | header('Cache-Control: post-check=0, pre-check=0', false); |
71 | 71 | header('Pragma: no-cache'); |
72 | 72 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
73 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
74 | - header('location: ' . XOOPS_URL . '/' . $GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/' . $attach['name_saved']); |
|
73 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
74 | + header('location: '.XOOPS_URL.'/'.$GLOBALS['xoopsModuleConfig']['dir_attachments'].'/'.$attach['name_saved']); |
|
75 | 75 | } else { |
76 | 76 | $file_display = $attach['nameDisplay']; |
77 | 77 | //$mimetype = $attach['mimetype']; |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | //header('Content-Type: '.$mimetype); |
88 | 88 | header('Content-Type: application/octet-stream'); |
89 | 89 | if (preg_match("/MSIE (\d\.\d{1,2})/", Request::getString('HTTP_USER_AGENT', '', 'SERVER'))) { |
90 | - header('Content-Disposition: attachment; filename="' . $file_display . '"'); |
|
90 | + header('Content-Disposition: attachment; filename="'.$file_display.'"'); |
|
91 | 91 | header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
92 | 92 | header('Pragma: public'); |
93 | 93 | } else { |
94 | - header('Content-Disposition: attachment; filename="' . $file_display . '"'); |
|
94 | + header('Content-Disposition: attachment; filename="'.$file_display.'"'); |
|
95 | 95 | header('Pragma: no-cache'); |
96 | 96 | } |
97 | 97 | header('Content-Type: application/force-download'); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use Xmf\Request; |
13 | 13 | |
14 | -require_once __DIR__ . '/header.php'; |
|
14 | +require_once __DIR__.'/header.php'; |
|
15 | 15 | |
16 | 16 | global $xoTheme, $xoopsTpl; |
17 | 17 | $GLOBALS['xoopsOption']['template_main'] = 'newbb_moderate.tpl'; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $forum_id = Request::getInt('forum', 0); |
22 | 22 | $isAdmin = newbbIsAdmin($forum_id); |
23 | 23 | if (!$isAdmin) { |
24 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
24 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
25 | 25 | } |
26 | 26 | $is_administrator = $GLOBALS['xoopsUserIsAdmin']; |
27 | 27 | ///** @var Newbb\ModerateHandler $moderateHandler */ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $ipWithMask = $ip->asReadable(); |
41 | 41 | $mask = empty($ipParts[1]) ? 0 : (int)$ipParts[1]; |
42 | 42 | $mask = ($mask > ((4 === $ip->ipVersion()) ? 32 : 128) || $mask < 8) ? '' : $mask; |
43 | - $ipWithMask .= empty($mask) ? '' : '/' . $mask; |
|
43 | + $ipWithMask .= empty($mask) ? '' : '/'.$mask; |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $url = 'moderate.php'; |
102 | 102 | if ($forum_id) { |
103 | - $url .= '?forum=' . $forum_id; |
|
103 | + $url .= '?forum='.$forum_id; |
|
104 | 104 | } |
105 | 105 | $xoopsTpl->assign('moderate_url', $url); |
106 | 106 | |
@@ -111,27 +111,27 @@ discard block |
||
111 | 111 | } |
112 | 112 | $users = newbbGetUnameFromIds(array_keys($_users), $GLOBALS['xoopsModuleConfig']['show_realname'], true); |
113 | 113 | |
114 | - $columnHeaders ['uid'] = [ |
|
115 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=uid', |
|
114 | + $columnHeaders ['uid'] = [ |
|
115 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=uid', |
|
116 | 116 | 'header' => _MD_NEWBB_SUSPEND_UID, |
117 | 117 | 'title' => _MD_NEWBB_SUSPEND_UID, |
118 | 118 | ]; |
119 | - $columnHeaders ['start'] = [ |
|
120 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=start', |
|
119 | + $columnHeaders ['start'] = [ |
|
120 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=start', |
|
121 | 121 | 'header' => _MD_NEWBB_SUSPEND_START, |
122 | 122 | 'title' => _MD_NEWBB_SUSPEND_START, |
123 | 123 | ]; |
124 | - $columnHeaders['expire'] = [ |
|
125 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=expire', |
|
124 | + $columnHeaders['expire'] = [ |
|
125 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=expire', |
|
126 | 126 | 'header' => _MD_NEWBB_SUSPEND_EXPIRE, |
127 | 127 | 'title' => _MD_NEWBB_SUSPEND_EXPIRE, |
128 | 128 | ]; |
129 | - $columnHeaders['forum'] = [ |
|
130 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=forum', |
|
129 | + $columnHeaders['forum'] = [ |
|
130 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=forum', |
|
131 | 131 | 'header' => _MD_NEWBB_SUSPEND_SCOPE, |
132 | 132 | 'title' => _MD_NEWBB_SUSPEND_SCOPE, |
133 | 133 | ]; |
134 | - $columnHeaders['desc'] = [ |
|
134 | + $columnHeaders['desc'] = [ |
|
135 | 135 | 'url' => false, |
136 | 136 | 'header' => _MD_NEWBB_SUSPEND_DESC, |
137 | 137 | 'title' => _MD_NEWBB_SUSPEND_DESC, |
@@ -156,14 +156,14 @@ discard block |
||
156 | 156 | $row['forum'] = ($moderateObjects[$id]->getVar('forum_id') ? $forum_list[$moderateObjects[$id]->getVar('forum_id')]['forum_name'] : _ALL); |
157 | 157 | $row['desc'] = ($moderateObjects[$id]->getVar('mod_desc') ?: _NONE); |
158 | 158 | $row['options'] = (($is_administrator |
159 | - || $moderateObjects[$id]->getVar('forum_id') == $forum_id) ? '<a href="moderate.php?forum=' . $forum_id . '&del=' . $moderateObjects[$id]->getVar('mod_id') . '">' . _DELETE . '</a>' : ''); |
|
159 | + || $moderateObjects[$id]->getVar('forum_id') == $forum_id) ? '<a href="moderate.php?forum='.$forum_id.'&del='.$moderateObjects[$id]->getVar('mod_id').'">'._DELETE.'</a>' : ''); |
|
160 | 160 | $columnRows[] = $row; |
161 | 161 | } |
162 | 162 | $xoopsTpl->assign('columnRows', $columnRows); |
163 | 163 | |
164 | 164 | if ($moderate_count > $GLOBALS['xoopsModuleConfig']['topics_per_page']) { |
165 | 165 | include $GLOBALS['xoops']->path('class/pagenav.php'); |
166 | - $nav = new \XoopsPageNav($moderate_count, $GLOBALS['xoopsModuleConfig']['topics_per_page'], $start, 'start', 'forum=' . $forum_id . '&sort=' . $sortname); |
|
166 | + $nav = new \XoopsPageNav($moderate_count, $GLOBALS['xoopsModuleConfig']['topics_per_page'], $start, 'start', 'forum='.$forum_id.'&sort='.$sortname); |
|
167 | 167 | //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
168 | 168 | // $nav->url = formatURL(Request::getString('SERVER_NAME', '', 'SERVER')) . ' /' . $nav->url; |
169 | 169 | //} |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_IP, 'ip', 50, 50)); |
178 | 178 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_DURATION, 'expire', 20, 25, '5'), true); |
179 | 179 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_DESC, 'desc', 50, 255)); |
180 | -require_once __DIR__ . '/include/functions.forum.php'; |
|
180 | +require_once __DIR__.'/include/functions.forum.php'; |
|
181 | 181 | if (newbbIsAdmin()) { |
182 | - $forumSel = '<select name="forum">';// if user doesn't select, default is "0" all forums |
|
182 | + $forumSel = '<select name="forum">'; // if user doesn't select, default is "0" all forums |
|
183 | 183 | $forumSel .= '<option value="0"'; |
184 | 184 | if (0 == $forum_id) { |
185 | 185 | $forumSel .= ' selected'; |
186 | 186 | } |
187 | - $forumSel .= '>' . _ALL . '</option>'; |
|
187 | + $forumSel .= '>'._ALL.'</option>'; |
|
188 | 188 | $forumSel .= newbbForumSelectBox($forum_id, 'access', false); //$accessForums, $permission = "access", $delimitorCategory = true |
189 | 189 | $forumSel .= '</select>'; |
190 | 190 | $forumEle = new \XoopsFormLabel(_MD_NEWBB_SELFORUM, $forumSel); |
@@ -196,5 +196,5 @@ discard block |
||
196 | 196 | $forum_form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
197 | 197 | $forum_form->assign($xoopsTpl); |
198 | 198 | |
199 | -require_once __DIR__ . '/footer.php'; |
|
199 | +require_once __DIR__.'/footer.php'; |
|
200 | 200 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | */ |
42 | 42 | |
43 | -require_once __DIR__ . '/header.php'; |
|
43 | +require_once __DIR__.'/header.php'; |
|
44 | 44 | |
45 | 45 | error_reporting(0); |
46 | 46 | $xoopsLogger->activated = false; |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | $topic_id = $post->getVar('topic_id'); |
66 | 66 | $post_data = $postHandler->getPostForPrint($post); |
67 | 67 | $isPost = 1; |
68 | - $post_data['url'] = XOOPS_URL . '/modules/newbb/viewtopic.php?post_id=' . $post_id; |
|
68 | + $post_data['url'] = XOOPS_URL.'/modules/newbb/viewtopic.php?post_id='.$post_id; |
|
69 | 69 | if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
70 | - $post_data['url'] = seo_urls('<a href="' . $post_data['url'] . '"></a>'); |
|
70 | + $post_data['url'] = seo_urls('<a href="'.$post_data['url'].'"></a>'); |
|
71 | 71 | $post_data['url'] = str_replace('<a href="', '', $post_data['url']); |
72 | 72 | $post_data['url'] = str_replace('"></a>', '', $post_data['url']); |
73 | 73 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | echo "</head><body style='background-color:#ffffff; color:#000000;' onload='window.print()'> |
114 | 114 | <div style='width: 750px; border: 1px solid #000; padding: 20px;'> |
115 | 115 | <div style='text-align: center; display: block; margin: 0 0 6px 0;'> |
116 | - <img src='" . XOOPS_URL . "/modules/newbb/assets/images/xoopsbb_slogo.png' border='0' alt='' /> |
|
116 | + <img src='" . XOOPS_URL."/modules/newbb/assets/images/xoopsbb_slogo.png' border='0' alt='' /> |
|
117 | 117 | <br><br> "; |
118 | 118 | |
119 | 119 | $postsArray = $topicHandler->getAllPosts($topicObject); |
@@ -122,25 +122,25 @@ discard block |
||
122 | 122 | continue; |
123 | 123 | } |
124 | 124 | $post_data = $postHandler->getPostForPrint($post); |
125 | - echo "<h2 style='margin: 0;'>" . $post_data['subject'] . "</h2> |
|
126 | - <div align='center'>" . _POSTEDBY . ' ' . $post_data['author'] . ' ' . _ON . ' ' . formatTimestamp($post_data['date']) . "</div> |
|
125 | + echo "<h2 style='margin: 0;'>".$post_data['subject']."</h2> |
|
126 | + <div align='center'>" . _POSTEDBY.' '.$post_data['author'].' '._ON.' '.formatTimestamp($post_data['date'])."</div> |
|
127 | 127 | <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div> |
128 | - <div>" . $post_data['text'] . "</div> |
|
128 | + <div>" . $post_data['text']."</div> |
|
129 | 129 | <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div><br>"; |
130 | 130 | } |
131 | - echo '<p>' . _MD_NEWBB_COMEFROM . ' ' . XOOPS_URL . '/newbb/viewtopic.php?forum=' . $forum_id . '&topic_id=' . $topic_id . '</p>'; |
|
131 | + echo '<p>'._MD_NEWBB_COMEFROM.' '.XOOPS_URL.'/newbb/viewtopic.php?forum='.$forum_id.'&topic_id='.$topic_id.'</p>'; |
|
132 | 132 | echo '</div></div>'; |
133 | 133 | echo '</body></html>'; |
134 | 134 | } else { |
135 | 135 | echo "</head><body style='background-color:#ffffff; color:#000000;' onload='window.print()'> |
136 | 136 | <div style='width: 750px; border: 1px solid #000; padding: 20px;'> |
137 | 137 | <div style='text-align: center; display: block; margin: 0 0 6px 0;'> |
138 | - <h2 style='margin: 0;'>" . $post_data['subject'] . "</h2></div> |
|
139 | - <div align='center'>" . _POSTEDBY . ' ' . $post_data['author'] . ' ' . _ON . ' ' . formatTimestamp($post_data['date']) . "</div> |
|
138 | + <h2 style='margin: 0;'>" . $post_data['subject']."</h2></div> |
|
139 | + <div align='center'>" . _POSTEDBY.' '.$post_data['author'].' '._ON.' '.formatTimestamp($post_data['date'])."</div> |
|
140 | 140 | <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div> |
141 | - <div>" . $post_data['text'] . "</div> |
|
141 | + <div>" . $post_data['text']."</div> |
|
142 | 142 | <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div> |
143 | - <p>" . _MD_NEWBB_COMEFROM . ' ' . $post_data['url'] . '</p> |
|
143 | + <p>" . _MD_NEWBB_COMEFROM.' '.$post_data['url'].'</p> |
|
144 | 144 | </div> |
145 | 145 | <br><br></body></html>'; |
146 | 146 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | use Xmf\Request; |
4 | 4 | |
5 | -require_once __DIR__ . '/header.php'; |
|
5 | +require_once __DIR__.'/header.php'; |
|
6 | 6 | /* |
7 | 7 | * |
8 | 8 | * Module: newbbss |
@@ -31,43 +31,43 @@ discard block |
||
31 | 31 | // per their requirements. |
32 | 32 | $ori_self = Request::getString('PHP_SELF', '', 'SERVER'); |
33 | 33 | $ori_self = explode('modules/newbb', $ori_self); |
34 | - $newUrl = $ori_self[0] . 'modules/newbb/' . $seoMap[$seoOp]; |
|
34 | + $newUrl = $ori_self[0].'modules/newbb/'.$seoMap[$seoOp]; |
|
35 | 35 | $_ENV['PHP_SELF'] = $newUrl; |
36 | 36 | $_SERVER['SCRIPT_NAME'] = $newUrl; |
37 | 37 | $_SERVER['PHP_SELF'] = $newUrl; |
38 | 38 | switch ($seoOp) { |
39 | 39 | case 'c': |
40 | - $_SERVER['REQUEST_URI'] = $newUrl . '?cat=' . $seoArg; |
|
40 | + $_SERVER['REQUEST_URI'] = $newUrl.'?cat='.$seoArg; |
|
41 | 41 | $_GET['cat'] = $seoArg; |
42 | 42 | break; |
43 | 43 | case 'f': |
44 | - $_SERVER['REQUEST_URI'] = $newUrl . '?forum=' . $seoArg; |
|
44 | + $_SERVER['REQUEST_URI'] = $newUrl.'?forum='.$seoArg; |
|
45 | 45 | $_GET['forum'] = $seoArg; |
46 | 46 | break; |
47 | 47 | case 'p': |
48 | - $_SERVER['REQUEST_URI'] = $newUrl . '?post_id=' . $seoArg; |
|
48 | + $_SERVER['REQUEST_URI'] = $newUrl.'?post_id='.$seoArg; |
|
49 | 49 | $_GET['post_id'] = $seoArg; |
50 | 50 | break; |
51 | 51 | case 'rc': |
52 | - $_SERVER['REQUEST_URI'] = $newUrl . '?c=' . $seoArg; |
|
52 | + $_SERVER['REQUEST_URI'] = $newUrl.'?c='.$seoArg; |
|
53 | 53 | $_GET['c'] = $seoArg; |
54 | 54 | break; |
55 | 55 | case 'rf': |
56 | - $_SERVER['REQUEST_URI'] = $newUrl . '?f=' . $seoArg; |
|
56 | + $_SERVER['REQUEST_URI'] = $newUrl.'?f='.$seoArg; |
|
57 | 57 | $_GET['f'] = $seoArg; |
58 | 58 | break; |
59 | 59 | default: |
60 | 60 | case 't': |
61 | 61 | case 'pr': |
62 | - $_SERVER['REQUEST_URI'] = $newUrl . '?topic_id=' . $seoArg; |
|
62 | + $_SERVER['REQUEST_URI'] = $newUrl.'?topic_id='.$seoArg; |
|
63 | 63 | $_GET['topic_id'] = $seoArg; |
64 | 64 | break; |
65 | 65 | } |
66 | 66 | include $seoMap[$seoOp]; |
67 | 67 | } else { |
68 | - $last = $seoOp . '/' . $seoArg; |
|
68 | + $last = $seoOp.'/'.$seoArg; |
|
69 | 69 | if ('' !== $seoOther) { |
70 | - $last .= '/' . $seoOther; |
|
70 | + $last .= '/'.$seoOther; |
|
71 | 71 | } |
72 | 72 | include $last; |
73 | 73 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | define('XOOPS_XMLRPC', 1); |
17 | 17 | } |
18 | 18 | ob_start(); |
19 | -require_once __DIR__ . '/header.php'; |
|
19 | +require_once __DIR__.'/header.php'; |
|
20 | 20 | if (0 == $GLOBALS['xoopsModuleConfig']['email_digest']) { |
21 | 21 | echo '<br>Not set'; |
22 | 22 | |
@@ -25,6 +25,6 @@ discard block |
||
25 | 25 | /** @var Newbb\DigestHandler $digestHandler */ |
26 | 26 | $digestHandler = Newbb\Helper::getInstance()->getHandler('Digest'); |
27 | 27 | $msg = $digestHandler->process(); |
28 | -$msg .= ob_get_contents(); |
|
28 | +$msg .= ob_get_contents(); |
|
29 | 29 | ob_end_clean(); |
30 | -echo '<br>' . $msg; |
|
30 | +echo '<br>'.$msg; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | use Xmf\Request; |
33 | 33 | |
34 | -require_once __DIR__ . '/admin_header.php'; |
|
34 | +require_once __DIR__.'/admin_header.php'; |
|
35 | 35 | |
36 | 36 | $op = $op = Request::getCmd('op', Request::getCmd('op', '', 'POST'), 'GET'); //!empty($_GET['op'])? $_GET['op'] : (!empty($_POST['op'])?$_POST['op']:""); |
37 | 37 | |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | case 'delvotes': |
40 | 40 | $rid = Request::getInt('rid', 0, 'GET'); |
41 | 41 | $topic_id = Request::getInt('topic_id', 0, 'GET'); |
42 | - $sql = $GLOBALS['xoopsDB']->queryF('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . " WHERE ratingid = $rid"); |
|
42 | + $sql = $GLOBALS['xoopsDB']->queryF('DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata')." WHERE ratingid = $rid"); |
|
43 | 43 | $GLOBALS['xoopsDB']->query($sql); |
44 | 44 | |
45 | - $query = 'SELECT rating FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' WHERE topic_id = ' . $topic_id . ' '; |
|
45 | + $query = 'SELECT rating FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' WHERE topic_id = '.$topic_id.' '; |
|
46 | 46 | $voteresult = $GLOBALS['xoopsDB']->query($query); |
47 | 47 | $votesDB = $GLOBALS['xoopsDB']->getRowsNum($voteresult); |
48 | 48 | $totalrating = 0; |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | $useravgrating = '0'; |
64 | 64 | $uservotes = '0'; |
65 | 65 | |
66 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' ORDER BY ratingtimestamp DESC'; |
|
66 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' ORDER BY ratingtimestamp DESC'; |
|
67 | 67 | $results = $GLOBALS['xoopsDB']->query($sql, 20, $start); |
68 | 68 | $votes = $GLOBALS['xoopsDB']->getRowsNum($results); |
69 | 69 | |
70 | - $sql = 'SELECT rating FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' '; |
|
70 | + $sql = 'SELECT rating FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' '; |
|
71 | 71 | $result2 = $GLOBALS['xoopsDB']->query($sql, 20, $start); |
72 | 72 | $uservotes = $GLOBALS['xoopsDB']->getRowsNum($result2); |
73 | 73 | $useravgrating = 0; |
@@ -86,28 +86,28 @@ discard block |
||
86 | 86 | $adminObject->displayNavigation(basename(__FILE__)); |
87 | 87 | |
88 | 88 | echo "<div style='padding: 8px;'>\n |
89 | - <div><strong>" . _AM_NEWBB_VOTE_USERAVG . ": </strong>$useravgrating</div>\n |
|
90 | - <div><strong>" . _AM_NEWBB_VOTE_TOTALRATE . ": </strong>$uservotes</div>\n |
|
89 | + <div><strong>" . _AM_NEWBB_VOTE_USERAVG.": </strong>$useravgrating</div>\n |
|
90 | + <div><strong>"._AM_NEWBB_VOTE_TOTALRATE.": </strong>$uservotes</div>\n |
|
91 | 91 | <div style='padding: 8px;'>\n |
92 | - <ul><li> " . _AM_NEWBB_VOTE_DELETEDSC . "</li></ul> |
|
92 | + <ul><li> "._AM_NEWBB_VOTE_DELETEDSC."</li></ul> |
|
93 | 93 | <div>\n |
94 | 94 | <br>\n |
95 | 95 | <table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'> |
96 | 96 | <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n |
97 | 97 | <tr>\n |
98 | - <th align='center'>" . _AM_NEWBB_VOTE_ID . "</th>\n |
|
99 | - <th align='center'>" . _AM_NEWBB_VOTE_USER . "</th>\n |
|
100 | - <th align='center'>" . _AM_NEWBB_VOTE_IP . "</th>\n |
|
101 | - <th align='center'>" . _AM_NEWBB_VOTE_FILETITLE . "</th>\n |
|
102 | - <th align='center'>" . _AM_NEWBB_VOTE_RATING . "</th>\n |
|
103 | - <th align='center'>" . _AM_NEWBB_VOTE_DATE . "</th>\n |
|
104 | - <th align='center'>" . _AM_NEWBB_ACTION . "</th></tr>\n"; |
|
98 | + <th align='center'>" . _AM_NEWBB_VOTE_ID."</th>\n |
|
99 | + <th align='center'>" . _AM_NEWBB_VOTE_USER."</th>\n |
|
100 | + <th align='center'>" . _AM_NEWBB_VOTE_IP."</th>\n |
|
101 | + <th align='center'>" . _AM_NEWBB_VOTE_FILETITLE."</th>\n |
|
102 | + <th align='center'>" . _AM_NEWBB_VOTE_RATING."</th>\n |
|
103 | + <th align='center'>" . _AM_NEWBB_VOTE_DATE."</th>\n |
|
104 | + <th align='center'>" . _AM_NEWBB_ACTION."</th></tr>\n"; |
|
105 | 105 | |
106 | 106 | if (0 == $votes) { |
107 | - echo "<tr><td align='center' colspan='7' class='head'>" . _AM_NEWBB_VOTE_NOVOTES . '</td></tr>'; |
|
107 | + echo "<tr><td align='center' colspan='7' class='head'>"._AM_NEWBB_VOTE_NOVOTES.'</td></tr>'; |
|
108 | 108 | } |
109 | 109 | while (false !== (list($ratingid, $topic_id, $ratinguser, $rating, $ratinghostname, $ratingtimestamp) = $GLOBALS['xoopsDB']->fetchRow($results))) { |
110 | - $sql = 'SELECT topic_title FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' WHERE topic_id=' . $topic_id . ' '; |
|
110 | + $sql = 'SELECT topic_title FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' WHERE topic_id='.$topic_id.' '; |
|
111 | 111 | $down_array = $GLOBALS['xoopsDB']->fetchArray($GLOBALS['xoopsDB']->query($sql)); |
112 | 112 | |
113 | 113 | $formatted_date = formatTimestamp($ratingtimestamp, _DATESTRING); |
@@ -117,10 +117,10 @@ discard block |
||
117 | 117 | <td class='head' align='center'>$ratingid</td>\n |
118 | 118 | <td class='even' align='center'>$ratinguname</td>\n |
119 | 119 | <td class='even' align='center' >$ratinghostname</td>\n |
120 | - <td class='even' align='left'><a href='" . XOOPS_URL . '/modules/newbb/viewtopic.php?topic_id=' . $topic_id . "' target='topic'>" . $myts->htmlSpecialChars($down_array['topic_title']) . "</a></td>\n |
|
120 | + <td class='even' align='left'><a href='".XOOPS_URL.'/modules/newbb/viewtopic.php?topic_id='.$topic_id."' target='topic'>".$myts->htmlSpecialChars($down_array['topic_title'])."</a></td>\n |
|
121 | 121 | <td class='even' align='center'>$rating</td>\n |
122 | 122 | <td class='even' align='center'>$formatted_date</td>\n |
123 | - <td class='even' align='center'><strong><a href='admin_votedata.php?op=delvotes&topic_id=$topic_id&rid=$ratingid'>" . newbbDisplayImage('p_delete', _DELETE) . "</a></strong></td>\n |
|
123 | + <td class='even' align='center'><strong><a href='admin_votedata.php?op=delvotes&topic_id=$topic_id&rid=$ratingid'>".newbbDisplayImage('p_delete', _DELETE)."</a></strong></td>\n |
|
124 | 124 | </tr>\n"; |
125 | 125 | } |
126 | 126 | echo '</table>'; |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | require_once $GLOBALS['xoops']->path('class/pagenav.php'); |
130 | 130 | $page = ($votes > 10) ? _AM_NEWBB_INDEX_PAGE : ''; |
131 | 131 | $pagenav = new \XoopsPageNav($page, 20, $start, 'start'); |
132 | - echo '<div align="right" style="padding: 8px;">' . $page . '' . $pagenav->renderImageNav(4) . '</div>'; |
|
132 | + echo '<div align="right" style="padding: 8px;">'.$page.''.$pagenav->renderImageNav(4).'</div>'; |
|
133 | 133 | echo '<fieldset>'; |
134 | - echo '<legend> ' . _MI_NEWBB_ADMENU_VOTE . ' </legend>'; |
|
134 | + echo '<legend> '._MI_NEWBB_ADMENU_VOTE.' </legend>'; |
|
135 | 135 | echo _AM_NEWBB_HELP_VOTE_TAB; |
136 | 136 | echo '</fieldset>'; |
137 | 137 | break; |
138 | 138 | } |
139 | -require_once __DIR__ . '/admin_footer.php'; |
|
139 | +require_once __DIR__.'/admin_footer.php'; |
@@ -29,11 +29,11 @@ |
||
29 | 29 | // Project: XOOPS Project // |
30 | 30 | // ------------------------------------------------------------------------- // |
31 | 31 | |
32 | -require_once __DIR__ . '/admin_header.php'; |
|
32 | +require_once __DIR__.'/admin_header.php'; |
|
33 | 33 | xoops_cp_header(); |
34 | 34 | |
35 | 35 | $adminObject->displayNavigation(basename(__FILE__)); |
36 | 36 | \Xmf\Module\Admin::setPaypal('PBQZ7D6LT6UBC'); |
37 | 37 | $adminObject->displayAbout(false); |
38 | 38 | |
39 | -require_once __DIR__ . '/admin_footer.php'; |
|
39 | +require_once __DIR__.'/admin_footer.php'; |