@@ -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 | $cat_orders = Request::getArray('cat_orders', null, 'POST'); |
| 37 | 37 | $orders = Request::getArray('orders', null, 'POST'); |
@@ -41,14 +41,14 @@ discard block |
||
| 41 | 41 | if (Request::getString('submit', '', 'POST')) { |
| 42 | 42 | $catOrdersCount = count($cat_orders); |
| 43 | 43 | for ($i = 0; $i < $catOrdersCount; ++$i) { |
| 44 | - $sql = 'update ' . $GLOBALS['xoopsDB']->prefix('newbb_categories') . ' set cat_order = ' . $cat_orders[$i] . " WHERE cat_id=$cat[$i]"; |
|
| 44 | + $sql = 'update '.$GLOBALS['xoopsDB']->prefix('newbb_categories').' set cat_order = '.$cat_orders[$i]." WHERE cat_id=$cat[$i]"; |
|
| 45 | 45 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 46 | 46 | redirect_header('admin_forum_reorder.php', 1, _AM_NEWBB_FORUM_ERROR); |
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | $ordersCount = count($orders); |
| 50 | 50 | for ($i = 0; $i < $ordersCount; ++$i) { |
| 51 | - $sql = 'update ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . ' set forum_order = ' . $orders[$i] . ' WHERE forum_id=' . $forum[$i]; |
|
| 51 | + $sql = 'update '.$GLOBALS['xoopsDB']->prefix('newbb_forums').' set forum_order = '.$orders[$i].' WHERE forum_id='.$forum[$i]; |
|
| 52 | 52 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 53 | 53 | redirect_header('admin_forum_reorder.php', 1, _AM_NEWBB_FORUM_ERROR); |
| 54 | 54 | } |
@@ -65,14 +65,14 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $adminObject->displayNavigation(basename(__FILE__)); |
| 67 | 67 | |
| 68 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 68 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 69 | 69 | $tform = new \XoopsThemeForm(_AM_NEWBB_SETFORUMORDER, '', ''); |
| 70 | 70 | $tform->display(); |
| 71 | 71 | echo "<form name='reorder' method='post'>"; |
| 72 | 72 | echo "<table border='0' width='100%' cellpadding='2' cellspacing='1' class='outer'>"; |
| 73 | 73 | echo '<tr>'; |
| 74 | - echo "<td class='head' align='left' width='60%'><strong>" . _AM_NEWBB_REORDERTITLE . '</strong></td>'; |
|
| 75 | - echo "<td class='head' align='center'><strong>" . _AM_NEWBB_REORDERWEIGHT . '</strong></td>'; |
|
| 74 | + echo "<td class='head' align='left' width='60%'><strong>"._AM_NEWBB_REORDERTITLE.'</strong></td>'; |
|
| 75 | + echo "<td class='head' align='center'><strong>"._AM_NEWBB_REORDERWEIGHT.'</strong></td>'; |
|
| 76 | 76 | echo '</tr>'; |
| 77 | 77 | |
| 78 | 78 | // /** @var Newbb\ForumHandler $forumHandler */ |
@@ -85,10 +85,10 @@ discard block |
||
| 85 | 85 | $forums = $forumHandler->getTree(array_keys($categories), 0, 'all', ' '); |
| 86 | 86 | foreach (array_keys($categories) as $c) { |
| 87 | 87 | echo '<tr>'; |
| 88 | - echo "<td align='left' nowrap='nowrap' class='head' >" . $categories[$c]->getVar('cat_title') . '</td>'; |
|
| 88 | + echo "<td align='left' nowrap='nowrap' class='head' >".$categories[$c]->getVar('cat_title').'</td>'; |
|
| 89 | 89 | echo "<td align='right' class='head'>"; |
| 90 | - echo "<input type='text' name='cat_orders[]' value='" . $categories[$c]->getVar('cat_order') . "' size='5' maxlength='5' />"; |
|
| 91 | - echo "<input type='hidden' name='cat[]' value='" . $c . "' />"; |
|
| 90 | + echo "<input type='text' name='cat_orders[]' value='".$categories[$c]->getVar('cat_order')."' size='5' maxlength='5' />"; |
|
| 91 | + echo "<input type='hidden' name='cat[]' value='".$c."' />"; |
|
| 92 | 92 | echo '</td>'; |
| 93 | 93 | echo '</tr>'; |
| 94 | 94 | |
@@ -99,24 +99,24 @@ discard block |
||
| 99 | 99 | foreach ($forums[$c] as $key => $forum) { |
| 100 | 100 | echo '<tr>'; |
| 101 | 101 | $class = ((++$i) % 2) ? 'odd' : 'even'; |
| 102 | - echo "<td align='left' nowrap='nowrap' class='" . $class . "'>" . $forum['prefix'] . $forum['forum_name'] . '</td>'; |
|
| 103 | - echo "<td align='left' class='" . $class . "'>"; |
|
| 104 | - echo $forum['prefix'] . "<input type='text' name='orders[]' value='" . $forum['forum_order'] . "' size='5' maxlength='5' />"; |
|
| 105 | - echo "<input type='hidden' name='forum[]' value='" . $key . "' />"; |
|
| 102 | + echo "<td align='left' nowrap='nowrap' class='".$class."'>".$forum['prefix'].$forum['forum_name'].'</td>'; |
|
| 103 | + echo "<td align='left' class='".$class."'>"; |
|
| 104 | + echo $forum['prefix']."<input type='text' name='orders[]' value='".$forum['forum_order']."' size='5' maxlength='5' />"; |
|
| 105 | + echo "<input type='hidden' name='forum[]' value='".$key."' />"; |
|
| 106 | 106 | echo '</td>'; |
| 107 | 107 | echo '</tr>'; |
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | 110 | echo "<tr><td class='even' align='center' colspan='6'>"; |
| 111 | 111 | |
| 112 | - echo "<input type='submit' name='submit' value='" . _SUBMIT . "' />"; |
|
| 112 | + echo "<input type='submit' name='submit' value='"._SUBMIT."' />"; |
|
| 113 | 113 | echo '</td></tr>'; |
| 114 | 114 | echo '</table>'; |
| 115 | 115 | echo '</form>'; |
| 116 | 116 | echo '</td></tr></table>'; |
| 117 | 117 | echo '<fieldset>'; |
| 118 | - echo '<legend> ' . _MI_NEWBB_ADMENU_ORDER . ' </legend>'; |
|
| 118 | + echo '<legend> '._MI_NEWBB_ADMENU_ORDER.' </legend>'; |
|
| 119 | 119 | echo _AM_NEWBB_HELP_ORDER_TAB; |
| 120 | 120 | echo '</fieldset>'; |
| 121 | 121 | } |
| 122 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 122 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -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 | xoops_cp_header(); |
| 36 | 36 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 37 | 37 | $adminObject->displayNavigation(basename(__FILE__)); |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | ///** @var Newbb\ForumHandler $forumHandler */ |
| 41 | 41 | //$forumHandler = Newbb\Helper::getInstance()->getHandler('Forum'); |
| 42 | 42 | if (Request::getString('submit', '', 'POST')) { |
| 43 | - $fgroups = Request::getArray('group', '', 'POST');// !empty($_POST['group']) ? $_POST['group'] : ''; |
|
| 44 | - $fforum = Request::getInt('forenid', 0, 'POST');// (int)($_POST['forenid']); |
|
| 43 | + $fgroups = Request::getArray('group', '', 'POST'); // !empty($_POST['group']) ? $_POST['group'] : ''; |
|
| 44 | + $fforum = Request::getInt('forenid', 0, 'POST'); // (int)($_POST['forenid']); |
|
| 45 | 45 | $fuser = []; |
| 46 | 46 | if (0 !== $fforum) { |
| 47 | 47 | if ('' !== $fgroups) { |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | if (-1 == $fforum) { // alle Foren |
| 59 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . " SET forum_moderator='" . serialize($fuser) . "'"; |
|
| 59 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_forums')." SET forum_moderator='".serialize($fuser)."'"; |
|
| 60 | 60 | } else { |
| 61 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . " SET forum_moderator='" . serialize($fuser) . "' WHERE forum_id =" . $fforum; |
|
| 61 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_forums')." SET forum_moderator='".serialize($fuser)."' WHERE forum_id =".$fforum; |
|
| 62 | 62 | } |
| 63 | 63 | if (is_array($fuser) && $GLOBALS['xoopsDB']->queryF($sql)) { |
| 64 | 64 | $mess = _AM_NEWBB_GROUPMOD_ADDMOD; |
| 65 | 65 | } else { |
| 66 | - $mess = _AM_NEWBB_GROUPMOD_ERRMOD . '<br><small>( ' . $sql . ' )</small>'; |
|
| 66 | + $mess = _AM_NEWBB_GROUPMOD_ERRMOD.'<br><small>( '.$sql.' )</small>'; |
|
| 67 | 67 | } |
| 68 | 68 | redirect_header('admin_groupmod.php', 1, $mess); |
| 69 | 69 | // echo '<div class="confirmMsg">' . $mess . '</div><br><br>'; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | echo _AM_NEWBB_GROUPMOD_TITLEDESC; |
| 74 | -echo "<br><br><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 74 | +echo "<br><br><table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 75 | 75 | echo "<form name='reorder' method='post'>"; |
| 76 | 76 | ///** @var Newbb\CategoryHandler $categoryHandler */ |
| 77 | 77 | //$categoryHandler = Newbb\Helper::getInstance()->getHandler('Category'); |
@@ -80,14 +80,14 @@ discard block |
||
| 80 | 80 | $categories = $categoryHandler->getAll($criteriaCategory, ['cat_id', 'cat_order', 'cat_title']); |
| 81 | 81 | $forums = $forumHandler->getTree(array_keys($categories), 0, 'all', ' '); |
| 82 | 82 | echo '<select name="forenid">'; |
| 83 | -echo '<option value="-1">-- ' . _AM_NEWBB_GROUPMOD_ALLFORUMS . ' --</option>'; |
|
| 83 | +echo '<option value="-1">-- '._AM_NEWBB_GROUPMOD_ALLFORUMS.' --</option>'; |
|
| 84 | 84 | foreach (array_keys($categories) as $c) { |
| 85 | 85 | if (!isset($forums[$c])) { |
| 86 | 86 | continue; |
| 87 | 87 | } |
| 88 | 88 | $i = 0; |
| 89 | 89 | foreach ($forums[$c] as $key => $forum) { |
| 90 | - echo '<option value="' . $forum['forum_id'] . '"> ' . $categories[$c]->getVar('cat_title') . '::' . $forum['forum_name'] . '</option>'; |
|
| 90 | + echo '<option value="'.$forum['forum_id'].'"> '.$categories[$c]->getVar('cat_title').'::'.$forum['forum_name'].'</option>'; |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | echo '</select>'; |
@@ -95,14 +95,14 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | $groups = $memberHandler->getGroups(); |
| 97 | 97 | foreach ($groups as $value) { |
| 98 | - echo '<input type="checkbox" name="group[]" value="' . $value->getVar('groupid') . '" /> ' . $value->getVar('name') . '<br>'; |
|
| 98 | + echo '<input type="checkbox" name="group[]" value="'.$value->getVar('groupid').'" /> '.$value->getVar('name').'<br>'; |
|
| 99 | 99 | } |
| 100 | 100 | echo "</td><tr><tr><td class='odd' style='text-align:center;'>"; |
| 101 | -echo '<input type="submit" value="' . _SUBMIT . '" name="submit" />'; |
|
| 101 | +echo '<input type="submit" value="'._SUBMIT.'" name="submit" />'; |
|
| 102 | 102 | echo '</td></tr></table>'; |
| 103 | 103 | echo '</form>'; |
| 104 | 104 | echo '<fieldset>'; |
| 105 | -echo '<legend> ' . _MI_NEWBB_ADMENU_GROUPMOD . ' </legend>'; |
|
| 105 | +echo '<legend> '._MI_NEWBB_ADMENU_GROUPMOD.' </legend>'; |
|
| 106 | 106 | echo _AM_NEWBB_HELP_GROUPMOD_TAB; |
| 107 | 107 | echo '</fieldset>'; |
| 108 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 108 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | use Xmf\Request; |
| 33 | 33 | use XoopsModules\Newbb; |
| 34 | 34 | |
| 35 | -require_once __DIR__ . '/admin_header.php'; |
|
| 35 | +require_once __DIR__.'/admin_header.php'; |
|
| 36 | 36 | xoops_cp_header(); |
| 37 | 37 | |
| 38 | 38 | $adminObject->displayNavigation(basename(__FILE__)); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if (!empty($queue)) { |
| 71 | 71 | echo "<pre>\n"; |
| 72 | 72 | foreach ($queue as $line) { |
| 73 | - echo $line . ";\n"; |
|
| 73 | + echo $line.";\n"; |
|
| 74 | 74 | } |
| 75 | 75 | echo "</pre>\n"; |
| 76 | 76 | } |
@@ -92,4 +92,4 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | echo "<div>$message</div>"; |
| 94 | 94 | |
| 95 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 95 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -31,12 +31,12 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | use XoopsModules\Newbb; |
| 33 | 33 | |
| 34 | -require_once __DIR__ . '/admin_header.php'; |
|
| 34 | +require_once __DIR__.'/admin_header.php'; |
|
| 35 | 35 | //require_once __DIR__ . '/../class/Utility.php'; |
| 36 | -require_once __DIR__ . '/../include/functions.stats.php'; |
|
| 36 | +require_once __DIR__.'/../include/functions.stats.php'; |
|
| 37 | 37 | |
| 38 | -$attach_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/'); |
|
| 39 | -$thumb_path = $attach_path . 'thumbs/'; |
|
| 38 | +$attach_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'].'/'); |
|
| 39 | +$thumb_path = $attach_path.'thumbs/'; |
|
| 40 | 40 | $folder = [$attach_path, $thumb_path]; |
| 41 | 41 | |
| 42 | 42 | /** @var Xmf\Module\Admin $adminObject */ |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | $imageLibs = []; |
| 76 | 76 | unset($output, $status); |
| 77 | 77 | if (1 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) { |
| 78 | - $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'] . '/'; |
|
| 79 | - @exec($path . 'convert -version', $output, $status); |
|
| 78 | + $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'].'/'; |
|
| 79 | + @exec($path.'convert -version', $output, $status); |
|
| 80 | 80 | if (empty($status) && !empty($output) && preg_match("/imagemagick[ \t]+([0-9\.]+)/i", $output[0], $matches)) { |
| 81 | 81 | $imageLibs['imagemagick'] = $matches[0]; |
| 82 | 82 | } |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | unset($output, $status); |
| 85 | 85 | } |
| 86 | 86 | if (2 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) { |
| 87 | - $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'] . '/'; |
|
| 88 | - @exec($path . 'jpegtopnm -version 2>&1', $output, $status); |
|
| 87 | + $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'].'/'; |
|
| 88 | + @exec($path.'jpegtopnm -version 2>&1', $output, $status); |
|
| 89 | 89 | if (empty($status) && !empty($output) && preg_match("/netpbm[ \t]+([0-9\.]+)/i", $output[0], $matches)) { |
| 90 | 90 | $imageLibs['netpbm'] = $matches[0]; |
| 91 | 91 | } |
@@ -127,30 +127,30 @@ discard block |
||
| 127 | 127 | $adminObject->addInfoBox(_AM_NEWBB_PREFERENCES); |
| 128 | 128 | // START irmtfan better poll module display link and version - check if xoops poll module is available |
| 129 | 129 | if ($isOK) { |
| 130 | - $pollLink = _AM_NEWBB_AVAILABLE . ': '; |
|
| 131 | - $pollLink .= '<a href="' . XOOPS_URL . '/modules/' . $xoopspoll->getVar('dirname') . '/admin/index.php"'; |
|
| 132 | - $pollLink .= ' alt="' . $xoopspoll->getVar('name') . ' ' . _VERSION . ' (' . $xoopspoll->getInfo('version') . ') "'; |
|
| 133 | - $pollLink .= ' title="' . $xoopspoll->getVar('name') . ' ' . _VERSION . ' (' . $xoopspoll->getInfo('version') . ') "'; |
|
| 134 | - $pollLink .= '>' . '(' . $xoopspoll->getVar('name') . ')</a>'; |
|
| 130 | + $pollLink = _AM_NEWBB_AVAILABLE.': '; |
|
| 131 | + $pollLink .= '<a href="'.XOOPS_URL.'/modules/'.$xoopspoll->getVar('dirname').'/admin/index.php"'; |
|
| 132 | + $pollLink .= ' alt="'.$xoopspoll->getVar('name').' '._VERSION.' ('.$xoopspoll->getInfo('version').') "'; |
|
| 133 | + $pollLink .= ' title="'.$xoopspoll->getVar('name').' '._VERSION.' ('.$xoopspoll->getInfo('version').') "'; |
|
| 134 | + $pollLink .= '>'.'('.$xoopspoll->getVar('name').')</a>'; |
|
| 135 | 135 | } else { |
| 136 | 136 | $pollLink = _AM_NEWBB_NOTAVAILABLE; |
| 137 | 137 | } |
| 138 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_POLLMODULE . ': %s', $pollLink)); |
|
| 138 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_POLLMODULE.': %s', $pollLink)); |
|
| 139 | 139 | // END irmtfan better poll module display link and version - check if xoops poll module is available |
| 140 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_IMAGEMAGICK . ' %s', array_key_exists('imagemagick', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['imagemagick'] : _AM_NEWBB_NOTAVAILABLE)); |
|
| 141 | -$adminObject->addInfoBoxLine(sprintf('NetPBM' . ': %s', array_key_exists('netpbm', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['netpbm'] : _AM_NEWBB_NOTAVAILABLE)); |
|
| 142 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_GDLIB . ' %s', array_key_exists('gd', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['gd'] : _AM_NEWBB_NOTAVAILABLE)); |
|
| 143 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_UPLOAD . ' %s', $uploadlimit)); |
|
| 144 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_INDEX_PDF_PAGE . '', '')); |
|
| 140 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_IMAGEMAGICK.' %s', array_key_exists('imagemagick', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['imagemagick'] : _AM_NEWBB_NOTAVAILABLE)); |
|
| 141 | +$adminObject->addInfoBoxLine(sprintf('NetPBM'.': %s', array_key_exists('netpbm', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['netpbm'] : _AM_NEWBB_NOTAVAILABLE)); |
|
| 142 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_GDLIB.' %s', array_key_exists('gd', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['gd'] : _AM_NEWBB_NOTAVAILABLE)); |
|
| 143 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_UPLOAD.' %s', $uploadlimit)); |
|
| 144 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_INDEX_PDF_PAGE.'', '')); |
|
| 145 | 145 | |
| 146 | 146 | $adminObject->addInfoBox(_AM_NEWBB_BOARDSUMMARY); |
| 147 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALTOPICS . ': %s', getTotalTopics())); |
|
| 148 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALPOSTS . ': %s', getTotalPosts())); |
|
| 149 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALVIEWS . ': %s', getTotalViews())); |
|
| 147 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALTOPICS.': %s', getTotalTopics())); |
|
| 148 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALPOSTS.': %s', getTotalPosts())); |
|
| 149 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALVIEWS.': %s', getTotalViews())); |
|
| 150 | 150 | |
| 151 | 151 | $adminObject->addInfoBox(_AM_NEWBB_REPORT); |
| 152 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PENDING . ': %s', $reportHandler->getCount(new \Criteria('report_result', 0)))); |
|
| 153 | -$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PROCESSED . ': %s', $reportHandler->getCount(new \Criteria('report_result', 1)))); |
|
| 152 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PENDING.': %s', $reportHandler->getCount(new \Criteria('report_result', 0)))); |
|
| 153 | +$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PROCESSED.': %s', $reportHandler->getCount(new \Criteria('report_result', 1)))); |
|
| 154 | 154 | |
| 155 | 155 | foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
| 156 | 156 | Newbb\Utility::prepareFolder($uploadFolders[$i]); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $adminObject->displayNavigation(basename(__FILE__)); |
| 161 | 161 | $adminObject->displayIndex(); |
| 162 | 162 | |
| 163 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 163 | +require_once __DIR__.'/admin_footer.php'; |
|
| 164 | 164 | |
| 165 | 165 | $cacheHelper = Newbb\Utility::cleanCache(); |
| 166 | 166 | //$cacheHelper = new \Xmf\Module\Helper\Cache('newbb'); |
@@ -192,6 +192,6 @@ discard block |
||
| 192 | 192 | $base = log($sizeAsString) / log(1024); |
| 193 | 193 | $suffix = ['', 'KB', 'MB', 'GB', 'TB']; |
| 194 | 194 | |
| 195 | - return round(pow(1024, $base - floor($base))) . ' ' . $suffix[(int)floor($base)]; |
|
| 195 | + return round(pow(1024, $base - floor($base))).' '.$suffix[(int)floor($base)]; |
|
| 196 | 196 | } |
| 197 | 197 | } |
@@ -33,15 +33,15 @@ |
||
| 33 | 33 | use XoopsModules\Newbb; |
| 34 | 34 | |
| 35 | 35 | //include $GLOBALS['xoops']->path('include/cp_header.php'); |
| 36 | -include __DIR__ . '/../../../include/cp_header.php'; |
|
| 37 | -require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'); |
|
| 38 | -require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.user.php'); |
|
| 39 | -require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.render.php'); |
|
| 36 | +include __DIR__.'/../../../include/cp_header.php'; |
|
| 37 | +require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'); |
|
| 38 | +require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/functions.user.php'); |
|
| 39 | +require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/functions.render.php'); |
|
| 40 | 40 | //require_once $GLOBALS['xoops']->path('Frameworks/art/functions.php'); |
| 41 | 41 | //require_once $GLOBALS['xoops']->path('Frameworks/art/functions.admin.php'); |
| 42 | 42 | |
| 43 | -require_once dirname(__DIR__) . '/include/config.php'; |
|
| 44 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
| 43 | +require_once dirname(__DIR__).'/include/config.php'; |
|
| 44 | +require_once dirname(__DIR__).'/include/common.php'; |
|
| 45 | 45 | |
| 46 | 46 | //require_once dirname(__DIR__) . '/class/Helper.php'; |
| 47 | 47 | $helper = Newbb\Helper::getInstance(); |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | use Xmf\Request; |
| 13 | 13 | |
| 14 | 14 | // irmtfan - TODO - should be changed completly with Newbb new function newbbSynchronization |
| 15 | -require_once __DIR__ . '/admin_header.php'; |
|
| 15 | +require_once __DIR__.'/admin_header.php'; |
|
| 16 | 16 | xoops_cp_header(); |
| 17 | -require_once __DIR__ . '/../include/functions.recon.php'; |
|
| 17 | +require_once __DIR__.'/../include/functions.recon.php'; |
|
| 18 | 18 | $form = ''; |
| 19 | 19 | $form .= $adminObject->displayNavigation(basename(__FILE__)); |
| 20 | 20 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | case 'forum': |
| 27 | 27 | $result = newbbSynchronization('forum'); |
| 28 | 28 | if (!empty($result)) { |
| 29 | - redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_FORUM . '<br>' . _AM_NEWBB_DATABASEUPDATED); |
|
| 29 | + redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_FORUM.'<br>'._AM_NEWBB_DATABASEUPDATED); |
|
| 30 | 30 | } |
| 31 | 31 | break; |
| 32 | 32 | // irmtfan rewrite topic sync |
@@ -46,13 +46,13 @@ discard block |
||
| 46 | 46 | $topicHandler->synchronization($tObj); |
| 47 | 47 | } |
| 48 | 48 | $result = newbbSynchronization('topic'); |
| 49 | - redirect_header('admin_synchronization.php?type=topic&start=' . ($start + $limit) . "&limit={$limit}", 2, _AM_NEWBB_SYNCHING . " {$count}: {$start} - " . ($start + $limit)); |
|
| 49 | + redirect_header('admin_synchronization.php?type=topic&start='.($start + $limit)."&limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start + $limit)); |
|
| 50 | 50 | break; |
| 51 | 51 | // irmtfan rewrite post sync |
| 52 | 52 | case 'post': |
| 53 | 53 | $result = newbbSynchronization('post'); |
| 54 | 54 | if (!empty($result)) { |
| 55 | - redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_POST . '<br>' . _AM_NEWBB_DATABASEUPDATED); |
|
| 55 | + redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_POST.'<br>'._AM_NEWBB_DATABASEUPDATED); |
|
| 56 | 56 | } |
| 57 | 57 | break; |
| 58 | 58 | // irmtfan - user is not in recon functions - only here |
@@ -63,26 +63,26 @@ discard block |
||
| 63 | 63 | if ($start >= ($count = $userHandler->getCount())) { |
| 64 | 64 | break; |
| 65 | 65 | } |
| 66 | - $sql = ' SELECT uid' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('users'); |
|
| 66 | + $sql = ' SELECT uid'.' FROM '.$GLOBALS['xoopsDB']->prefix('users'); |
|
| 67 | 67 | $result = $GLOBALS['xoopsDB']->query($sql, $limit, $start); |
| 68 | 68 | while (false !== (list($uid) = $GLOBALS['xoopsDB']->fetchRow($result))) { |
| 69 | 69 | // irmtfan approved=1 AND |
| 70 | - $sql = ' SELECT count(*)' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " WHERE topic_poster = {$uid}"; |
|
| 70 | + $sql = ' SELECT count(*)'.' FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." WHERE topic_poster = {$uid}"; |
|
| 71 | 71 | $ret = $GLOBALS['xoopsDB']->query($sql); |
| 72 | 72 | list($topics) = $GLOBALS['xoopsDB']->fetchRow($ret); |
| 73 | 73 | // irmtfan approved=1 AND |
| 74 | - $sql = ' SELECT count(*)' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " WHERE topic_digest > 0 AND topic_poster = {$uid}"; |
|
| 74 | + $sql = ' SELECT count(*)'.' FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." WHERE topic_digest > 0 AND topic_poster = {$uid}"; |
|
| 75 | 75 | $ret = $GLOBALS['xoopsDB']->query($sql); |
| 76 | 76 | list($digests) = $GLOBALS['xoopsDB']->fetchRow($ret); |
| 77 | 77 | // irmtfan approved=1 AND |
| 78 | - $sql = ' SELECT count(*), MAX(post_time)' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " WHERE uid = {$uid}"; |
|
| 78 | + $sql = ' SELECT count(*), MAX(post_time)'.' FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." WHERE uid = {$uid}"; |
|
| 79 | 79 | $ret = $GLOBALS['xoopsDB']->query($sql); |
| 80 | 80 | list($posts, $lastpost) = $GLOBALS['xoopsDB']->fetchRow($ret); |
| 81 | 81 | |
| 82 | - $GLOBALS['xoopsDB']->queryF(' REPLACE INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_user_stats') . " SET uid = '{$uid}', user_topics = '{$topics}', user_posts = '{$posts}', user_digests = '{$digests}', user_lastpost = '{$lastpost}'"); |
|
| 82 | + $GLOBALS['xoopsDB']->queryF(' REPLACE INTO '.$GLOBALS['xoopsDB']->prefix('newbb_user_stats')." SET uid = '{$uid}', user_topics = '{$topics}', user_posts = '{$posts}', user_digests = '{$digests}', user_lastpost = '{$lastpost}'"); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - redirect_header('admin_synchronization.php?type=user&start=' . ($start + $limit) . "&limit={$limit}", 2, _AM_NEWBB_SYNCHING . " {$count}: {$start} - " . ($start + $limit)); |
|
| 85 | + redirect_header('admin_synchronization.php?type=user&start='.($start + $limit)."&limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start + $limit)); |
|
| 86 | 86 | break; |
| 87 | 87 | // irmtfan rewrite stats reset |
| 88 | 88 | case 'stats': |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | case 'read': |
| 93 | 93 | $result = newbbSynchronization(['readtopic', 'readforum']); |
| 94 | 94 | if (!empty($result)) { |
| 95 | - redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_READ . '<br>' . _AM_NEWBB_DATABASEUPDATED); |
|
| 95 | + redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_READ.'<br>'._AM_NEWBB_DATABASEUPDATED); |
|
| 96 | 96 | } |
| 97 | 97 | exit(); |
| 98 | 98 | // END irmtfan add read sync |
@@ -106,70 +106,70 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 108 | 108 | $form .= '<div style="padding: 10px 2px;">'; |
| 109 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_FORUM . '</h2>'; |
|
| 109 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_FORUM.'</h2>'; |
|
| 110 | 110 | $form .= '<input type="hidden" name="type" value="forum">'; |
| 111 | 111 | // $form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="20">'; // irmtfan remove |
| 112 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 112 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 113 | 113 | $form .= '</div>'; |
| 114 | 114 | $form .= '</form>'; |
| 115 | 115 | |
| 116 | 116 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 117 | 117 | $form .= '<div style="padding: 10px 2px;">'; |
| 118 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_TOPIC . '</h2>'; |
|
| 118 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_TOPIC.'</h2>'; |
|
| 119 | 119 | $form .= '<input type="hidden" name="type" value="topic">'; |
| 120 | -$form .= _AM_NEWBB_SYNC_ITEMS . '<input type="text" name="limit" value="1000">'; |
|
| 121 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 120 | +$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; |
|
| 121 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 122 | 122 | $form .= '</div>'; |
| 123 | 123 | $form .= '</form>'; |
| 124 | 124 | |
| 125 | 125 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 126 | 126 | $form .= '<div style="padding: 10px 2px;">'; |
| 127 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_POST . '</h2>'; |
|
| 127 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_POST.'</h2>'; |
|
| 128 | 128 | $form .= '<input type="hidden" name="type" value="post">'; |
| 129 | 129 | // $form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; // irmtfan remove |
| 130 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 130 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 131 | 131 | $form .= '</div>'; |
| 132 | 132 | $form .= '</form>'; |
| 133 | 133 | |
| 134 | 134 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 135 | 135 | $form .= '<div style="padding: 10px 2px;">'; |
| 136 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_USER . '</h2>'; |
|
| 136 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_USER.'</h2>'; |
|
| 137 | 137 | $form .= '<input type="hidden" name="type" value="user">'; |
| 138 | -$form .= _AM_NEWBB_SYNC_ITEMS . '<input type="text" name="limit" value="1000">'; |
|
| 139 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 138 | +$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; |
|
| 139 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 140 | 140 | $form .= '</div>'; |
| 141 | 141 | $form .= '</form>'; |
| 142 | 142 | // START irmtfan add read sync |
| 143 | 143 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 144 | 144 | $form .= '<div style="padding: 10px 2px;">'; |
| 145 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_READ . '</h2>'; |
|
| 145 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_READ.'</h2>'; |
|
| 146 | 146 | $form .= '<input type="hidden" name="type" value="read">'; |
| 147 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 147 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 148 | 148 | $form .= '</div>'; |
| 149 | 149 | $form .= '</form>'; |
| 150 | 150 | // END irmtfan add read sync |
| 151 | 151 | |
| 152 | 152 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 153 | 153 | $form .= '<div style="padding: 10px 2px;">'; |
| 154 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_STATS . '</h2>'; |
|
| 154 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_STATS.'</h2>'; |
|
| 155 | 155 | $form .= '<input type="hidden" name="type" value="stats">'; |
| 156 | 156 | //$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; |
| 157 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 157 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 158 | 158 | $form .= '</div>'; |
| 159 | 159 | $form .= '</form>'; |
| 160 | 160 | |
| 161 | 161 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 162 | 162 | $form .= '<div style="padding: 10px 2px;">'; |
| 163 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_MISC . '</h2>'; |
|
| 163 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_MISC.'</h2>'; |
|
| 164 | 164 | $form .= '<input type="hidden" name="type" value="misc">'; |
| 165 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 165 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 166 | 166 | $form .= '</div>'; |
| 167 | 167 | $form .= '</form>'; |
| 168 | -echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 168 | +echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 169 | 169 | echo $form; |
| 170 | 170 | echo '</td></tr></table>'; |
| 171 | 171 | echo '<fieldset>'; |
| 172 | -echo '<legend> ' . _MI_NEWBB_ADMENU_SYNC . ' </legend>'; |
|
| 172 | +echo '<legend> '._MI_NEWBB_ADMENU_SYNC.' </legend>'; |
|
| 173 | 173 | echo _AM_NEWBB_HELP_SYNC_TAB; |
| 174 | 174 | echo '</fieldset>'; |
| 175 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 175 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | use Xmf\Request; |
| 33 | 33 | use XoopsModules\Newbb; |
| 34 | 34 | |
| 35 | -require_once __DIR__ . '/admin_header.php'; |
|
| 35 | +require_once __DIR__.'/admin_header.php'; |
|
| 36 | 36 | include $GLOBALS['xoops']->path('class/xoopstree.php'); |
| 37 | 37 | require_once $GLOBALS['xoops']->path('class/pagenav.php'); |
| 38 | -require_once __DIR__ . '/../include/functions.forum.php'; |
|
| 39 | -require_once __DIR__ . '/../include/functions.render.php'; |
|
| 38 | +require_once __DIR__.'/../include/functions.forum.php'; |
|
| 39 | +require_once __DIR__.'/../include/functions.render.php'; |
|
| 40 | 40 | |
| 41 | 41 | $cacheHelper = Newbb\Utility::cleanCache(); |
| 42 | 42 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | if ($forumHandler->insert($forumObject)) { |
| 70 | 70 | if ($cid !== $forumObject->getVar('cat_id') && $subforums = newbbGetSubForum($forum_id)) { |
| 71 | 71 | $forums = array_map('intval', array_values($subforums)); |
| 72 | - $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '(' . implode(', ', $forums) . ')', 'IN')); |
|
| 72 | + $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '('.implode(', ', $forums).')', 'IN')); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | //$cacheHelper->delete('forum'); |
@@ -79,19 +79,19 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | } else { |
| 81 | 81 | $box = '<select name="dest_forum">'; |
| 82 | - $box .= '<option value=0 selected>' . _SELECT . '</option>'; |
|
| 82 | + $box .= '<option value=0 selected>'._SELECT.'</option>'; |
|
| 83 | 83 | $box .= newbbForumSelectBox($forum_id, 'all', true, true); |
| 84 | 84 | $box .= '</select>'; |
| 85 | 85 | |
| 86 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 86 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 87 | 87 | echo '<form action="./admin_forum_manager.php" method="post" name="forummove" id="forummove">'; |
| 88 | 88 | echo '<input type="hidden" name="op" value="moveforum" />'; |
| 89 | - echo '<input type="hidden" name="forum" value=' . $forum_id . ' />'; |
|
| 89 | + echo '<input type="hidden" name="forum" value='.$forum_id.' />'; |
|
| 90 | 90 | echo '<table border="0" cellpadding="1" cellspacing="0" align="center" valign="top" width="95%"><tr>'; |
| 91 | - echo '<td class="bg2" align="center"><strong>' . _AM_NEWBB_MOVETHISFORUM . '</strong></td>'; |
|
| 91 | + echo '<td class="bg2" align="center"><strong>'._AM_NEWBB_MOVETHISFORUM.'</strong></td>'; |
|
| 92 | 92 | echo '</tr>'; |
| 93 | - echo '<tr><td class="bg1" align="center">' . $box . '</td></tr>'; |
|
| 94 | - echo '<tr><td align="center"><input type="submit" name="save" value=' . _GO . ' class="button" /></td></tr>'; |
|
| 93 | + echo '<tr><td class="bg1" align="center">'.$box.'</td></tr>'; |
|
| 94 | + echo '<tr><td align="center"><input type="submit" name="save" value='._GO.' class="button" /></td></tr>'; |
|
| 95 | 95 | echo '</table></form>'; |
| 96 | 96 | echo '</td></tr></table>'; |
| 97 | 97 | } |
@@ -104,17 +104,17 @@ discard block |
||
| 104 | 104 | $forum_dest = $forumHandler->get(Request::getString('dest_forum', '', 'POST')); |
| 105 | 105 | if (is_object($forum_dest)) { |
| 106 | 106 | $cid = $forum_dest->getVar('cat_id'); |
| 107 | - $sql = ' UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' SET forum_id=' . Request::getInt('dest_forum', 0, 'POST') . " WHERE forum_id=$forum_id"; |
|
| 107 | + $sql = ' UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' SET forum_id='.Request::getInt('dest_forum', 0, 'POST')." WHERE forum_id=$forum_id"; |
|
| 108 | 108 | $result_post = $GLOBALS['xoopsDB']->queryF($sql); |
| 109 | 109 | |
| 110 | - $sql = ' UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' SET forum_id=' . Request::getInt('dest_forum', 0, 'POST') . " WHERE forum_id=$forum_id"; |
|
| 110 | + $sql = ' UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' SET forum_id='.Request::getInt('dest_forum', 0, 'POST')." WHERE forum_id=$forum_id"; |
|
| 111 | 111 | $result_topic = $GLOBALS['xoopsDB']->queryF($sql); |
| 112 | 112 | |
| 113 | 113 | $forumObject = $forumHandler->get($forum_id); |
| 114 | 114 | $forumHandler->updateAll('parent_forum', Request::getInt('dest_forum', 0, 'POST'), new \Criteria('parent_forum', $forum_id)); |
| 115 | 115 | if ($cid !== $forumObject->getVar('cat_id') && $subforums = newbbGetSubForum($forum_id)) { |
| 116 | 116 | $forums = array_map('intval', array_values($subforums)); |
| 117 | - $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '(' . implode(', ', $forums) . ')', 'IN')); |
|
| 117 | + $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '('.implode(', ', $forums).')', 'IN')); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $forumHandler->delete($forumObject); |
@@ -129,19 +129,19 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | } else { |
| 131 | 131 | $box = '<select name="dest_forum">'; |
| 132 | - $box .= '<option value=0 selected>' . _SELECT . '</option>'; |
|
| 132 | + $box .= '<option value=0 selected>'._SELECT.'</option>'; |
|
| 133 | 133 | $box .= newbbForumSelectBox($forum_id, 'all'); |
| 134 | 134 | $box .= '</select>'; |
| 135 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 136 | - echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post" name="forummove" id="forummove">'; |
|
| 135 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 136 | + echo '<form action="'.xoops_getenv('PHP_SELF').'" method="post" name="forummove" id="forummove">'; |
|
| 137 | 137 | echo '<input type="hidden" name="op" value="mergeforum" />'; |
| 138 | - echo '<input type="hidden" name="forum" value=' . $forum_id . ' />'; |
|
| 138 | + echo '<input type="hidden" name="forum" value='.$forum_id.' />'; |
|
| 139 | 139 | echo '<table border="0" cellpadding="1" cellspacing="0" align="center" valign="top" width="95%"><tr>'; |
| 140 | - echo '<td class="bg2" align="center"><strong>' . _AM_NEWBB_MERGETHISFORUM . '</strong></td>'; |
|
| 140 | + echo '<td class="bg2" align="center"><strong>'._AM_NEWBB_MERGETHISFORUM.'</strong></td>'; |
|
| 141 | 141 | echo '</tr>'; |
| 142 | - echo '<tr><td class="bg1" align="center">' . _AM_NEWBB_MERGETO_FORUM . '</td></tr>'; |
|
| 143 | - echo '<tr><td class="bg1" align="center">' . $box . '</td></tr>'; |
|
| 144 | - echo '<tr><td align="center"><input type="submit" name="save" value=' . _GO . ' class="button" /></td></tr>'; |
|
| 142 | + echo '<tr><td class="bg1" align="center">'._AM_NEWBB_MERGETO_FORUM.'</td></tr>'; |
|
| 143 | + echo '<tr><td class="bg1" align="center">'.$box.'</td></tr>'; |
|
| 144 | + echo '<tr><td align="center"><input type="submit" name="save" value='._GO.' class="button" /></td></tr>'; |
|
| 145 | 145 | echo '</form></table>'; |
| 146 | 146 | echo '</td></tr></table>'; |
| 147 | 147 | } |
@@ -196,13 +196,13 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | redirect_header('admin_forum_manager.php', 2, $message); |
| 198 | 198 | } else { |
| 199 | - redirect_header('admin_forum_manager.php?op=mod&forum=' . $forumObject->getVar('forum_id') . '', 2, _AM_NEWBB_FORUM_ERROR); |
|
| 199 | + redirect_header('admin_forum_manager.php?op=mod&forum='.$forumObject->getVar('forum_id').'', 2, _AM_NEWBB_FORUM_ERROR); |
|
| 200 | 200 | } |
| 201 | 201 | break; |
| 202 | 202 | |
| 203 | 203 | case 'mod': |
| 204 | 204 | $forumObject = $forumHandler->get($forum_id); |
| 205 | - include $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/form.forum.php'); |
|
| 205 | + include $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/form.forum.php'); |
|
| 206 | 206 | break; |
| 207 | 207 | |
| 208 | 208 | case 'del': |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $forumObject = $forumHandler->create(); |
| 228 | 228 | $forumObject->setVar('parent_forum', $parent_forum); |
| 229 | 229 | $forumObject->setVar('cat_id', $cat_id); |
| 230 | - include $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/form.forum.php'); |
|
| 230 | + include $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/form.forum.php'); |
|
| 231 | 231 | break; |
| 232 | 232 | |
| 233 | 233 | default: |
@@ -242,15 +242,15 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | $echo = $adminObject->displayNavigation(basename(__FILE__)); |
| 245 | - $echo .= "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 245 | + $echo .= "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 246 | 246 | $echo .= "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 247 | 247 | $echo .= "<tr align='center'>"; |
| 248 | - $echo .= "<th class='bg3' colspan='2'>" . _AM_NEWBB_NAME . '</th>'; |
|
| 249 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_EDIT . '</th>'; |
|
| 250 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_DELETE . '</th>'; |
|
| 251 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_ADD . '</th>'; |
|
| 252 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_MOVE . '</th>'; |
|
| 253 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_MERGE . '</th>'; |
|
| 248 | + $echo .= "<th class='bg3' colspan='2'>"._AM_NEWBB_NAME.'</th>'; |
|
| 249 | + $echo .= "<th class='bg3'>"._AM_NEWBB_EDIT.'</th>'; |
|
| 250 | + $echo .= "<th class='bg3'>"._AM_NEWBB_DELETE.'</th>'; |
|
| 251 | + $echo .= "<th class='bg3'>"._AM_NEWBB_ADD.'</th>'; |
|
| 252 | + $echo .= "<th class='bg3'>"._AM_NEWBB_MOVE.'</th>'; |
|
| 253 | + $echo .= "<th class='bg3'>"._AM_NEWBB_MERGE.'</th>'; |
|
| 254 | 254 | $echo .= '</tr>'; |
| 255 | 255 | |
| 256 | 256 | // $categoryHandler = Newbb\Helper::getInstance()->getHandler('Category'); |
@@ -261,15 +261,15 @@ discard block |
||
| 261 | 261 | foreach (array_keys($categories) as $c) { |
| 262 | 262 | $category = $categories[$c]; |
| 263 | 263 | $cat_id = $c; |
| 264 | - $cat_link = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/index.php?viewcat=' . $cat_id . '">' . $category . '</a>'; |
|
| 265 | - $cat_edit_link = '<a href="admin_cat_manager.php?op=mod&cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_edit', _EDIT) . '</a>'; |
|
| 266 | - $cat_del_link = '<a href="admin_cat_manager.php?op=del&cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_delete', _DELETE) . '</a>'; |
|
| 267 | - $forum_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id=' . $cat_id . '">' . newbbDisplayImage('new_forum') . '</a>'; |
|
| 264 | + $cat_link = '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/index.php?viewcat='.$cat_id.'">'.$category.'</a>'; |
|
| 265 | + $cat_edit_link = '<a href="admin_cat_manager.php?op=mod&cat_id='.$cat_id.'">'.newbbDisplayImage('admin_edit', _EDIT).'</a>'; |
|
| 266 | + $cat_del_link = '<a href="admin_cat_manager.php?op=del&cat_id='.$cat_id.'">'.newbbDisplayImage('admin_delete', _DELETE).'</a>'; |
|
| 267 | + $forum_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id='.$cat_id.'">'.newbbDisplayImage('new_forum').'</a>'; |
|
| 268 | 268 | $echo .= "<tr class='even' align='left'>"; |
| 269 | - $echo .= "<td width='100%' colspan='2'><strong>" . $cat_link . '</strong></td>'; |
|
| 270 | - $echo .= "<td align='center'>" . $cat_edit_link . '</td>'; |
|
| 271 | - $echo .= "<td align='center'>" . $cat_del_link . '</td>'; |
|
| 272 | - $echo .= "<td align='center'>" . $forum_add_link . '</td>'; |
|
| 269 | + $echo .= "<td width='100%' colspan='2'><strong>".$cat_link.'</strong></td>'; |
|
| 270 | + $echo .= "<td align='center'>".$cat_edit_link.'</td>'; |
|
| 271 | + $echo .= "<td align='center'>".$cat_del_link.'</td>'; |
|
| 272 | + $echo .= "<td align='center'>".$forum_add_link.'</td>'; |
|
| 273 | 273 | $echo .= '<td></td>'; |
| 274 | 274 | $echo .= '<td></td>'; |
| 275 | 275 | $echo .= '</tr>'; |
@@ -279,21 +279,21 @@ discard block |
||
| 279 | 279 | $i = 0; |
| 280 | 280 | foreach (array_keys($forums[$c]) as $f) { |
| 281 | 281 | $forum = $forums[$c][$f]; |
| 282 | - $f_link = $forum['prefix'] . '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewforum.php?forum=' . $f . '">' . $forum['forum_name'] . '</a>'; |
|
| 283 | - $f_edit_link = '<a href="admin_forum_manager.php?op=mod&forum=' . $f . '">' . newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT) . '</a>'; |
|
| 284 | - $f_del_link = '<a href="admin_forum_manager.php?op=del&forum=' . $f . '">' . newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE) . '</a>'; |
|
| 285 | - $sf_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id=' . $c . '&forum=' . $f . '">' . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . '</a>'; |
|
| 286 | - $f_move_link = '<a href="admin_forum_manager.php?op=moveforum&forum=' . $f . '">' . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . '</a>'; |
|
| 287 | - $f_merge_link = '<a href="admin_forum_manager.php?op=mergeforum&forum=' . $f . '">' . newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE) . '</a>'; |
|
| 282 | + $f_link = $forum['prefix'].'<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/viewforum.php?forum='.$f.'">'.$forum['forum_name'].'</a>'; |
|
| 283 | + $f_edit_link = '<a href="admin_forum_manager.php?op=mod&forum='.$f.'">'.newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT).'</a>'; |
|
| 284 | + $f_del_link = '<a href="admin_forum_manager.php?op=del&forum='.$f.'">'.newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE).'</a>'; |
|
| 285 | + $sf_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id='.$c.'&forum='.$f.'">'.newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM).'</a>'; |
|
| 286 | + $f_move_link = '<a href="admin_forum_manager.php?op=moveforum&forum='.$f.'">'.newbbDisplayImage('admin_move', _AM_NEWBB_MOVE).'</a>'; |
|
| 287 | + $f_merge_link = '<a href="admin_forum_manager.php?op=mergeforum&forum='.$f.'">'.newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE).'</a>'; |
|
| 288 | 288 | |
| 289 | 289 | $class = (($i++) % 2) ? 'odd' : 'even'; |
| 290 | - $echo .= "<tr class='" . $class . "' align='left'><td></td>"; |
|
| 291 | - $echo .= '<td><strong>' . $f_link . '</strong></td>'; |
|
| 292 | - $echo .= "<td align='center'>" . $f_edit_link . '</td>'; |
|
| 293 | - $echo .= "<td align='center'>" . $f_del_link . '</td>'; |
|
| 294 | - $echo .= "<td align='center'>" . $sf_add_link . '</td>'; |
|
| 295 | - $echo .= "<td align='center'>" . $f_move_link . '</td>'; |
|
| 296 | - $echo .= "<td align='center'>" . $f_merge_link . '</td>'; |
|
| 290 | + $echo .= "<tr class='".$class."' align='left'><td></td>"; |
|
| 291 | + $echo .= '<td><strong>'.$f_link.'</strong></td>'; |
|
| 292 | + $echo .= "<td align='center'>".$f_edit_link.'</td>'; |
|
| 293 | + $echo .= "<td align='center'>".$f_del_link.'</td>'; |
|
| 294 | + $echo .= "<td align='center'>".$sf_add_link.'</td>'; |
|
| 295 | + $echo .= "<td align='center'>".$f_move_link.'</td>'; |
|
| 296 | + $echo .= "<td align='center'>".$f_merge_link.'</td>'; |
|
| 297 | 297 | $echo .= '</tr>'; |
| 298 | 298 | } |
| 299 | 299 | } |
@@ -303,14 +303,14 @@ discard block |
||
| 303 | 303 | echo '</table>'; |
| 304 | 304 | echo '</td></tr></table>'; |
| 305 | 305 | echo '<fieldset>'; |
| 306 | - echo '<legend> ' . _MI_NEWBB_ADMENU_FORUM . ' </legend>'; |
|
| 306 | + echo '<legend> '._MI_NEWBB_ADMENU_FORUM.' </legend>'; |
|
| 307 | 307 | echo _AM_NEWBB_HELP_FORUM_TAB; |
| 308 | - echo '<br>' . newbbDisplayImage('admin_edit', _EDIT) . ' - ' . _EDIT; |
|
| 309 | - echo '<br>' . newbbDisplayImage('admin_delete', _DELETE) . ' - ' . _DELETE; |
|
| 310 | - echo '<br>' . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . ' - ' . _AM_NEWBB_CREATEFORUM; |
|
| 311 | - echo '<br>' . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . ' - ' . _AM_NEWBB_MOVE; |
|
| 312 | - echo '<br>' . newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE) . ' - ' . _AM_NEWBB_MERGE; |
|
| 308 | + echo '<br>'.newbbDisplayImage('admin_edit', _EDIT).' - '._EDIT; |
|
| 309 | + echo '<br>'.newbbDisplayImage('admin_delete', _DELETE).' - '._DELETE; |
|
| 310 | + echo '<br>'.newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM).' - '._AM_NEWBB_CREATEFORUM; |
|
| 311 | + echo '<br>'.newbbDisplayImage('admin_move', _AM_NEWBB_MOVE).' - '._AM_NEWBB_MOVE; |
|
| 312 | + echo '<br>'.newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE).' - '._AM_NEWBB_MERGE; |
|
| 313 | 313 | echo '</fieldset>'; |
| 314 | 314 | break; |
| 315 | 315 | } |
| 316 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 316 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -169,14 +169,14 @@ discard block |
||
| 169 | 169 | // Days selected by selbox (better error control :lol:) |
| 170 | 170 | $days = new \XoopsFormSelect(_AM_NEWBB_PRUNE_DAYS, 'days', null, 1, false); |
| 171 | 171 | $days->addOptionArray([ |
| 172 | - 604800 => _AM_NEWBB_PRUNE_WEEK, |
|
| 173 | - 1209600 => _AM_NEWBB_PRUNE_2WEEKS, |
|
| 174 | - 2592000 => _AM_NEWBB_PRUNE_MONTH, |
|
| 175 | - 5184000 => _AM_NEWBB_PRUNE_2MONTH, |
|
| 176 | - 10368000 => _AM_NEWBB_PRUNE_4MONTH, |
|
| 177 | - 31536000 => _AM_NEWBB_PRUNE_YEAR, |
|
| 178 | - 63072000 => _AM_NEWBB_PRUNE_2YEARS |
|
| 179 | - ]); |
|
| 172 | + 604800 => _AM_NEWBB_PRUNE_WEEK, |
|
| 173 | + 1209600 => _AM_NEWBB_PRUNE_2WEEKS, |
|
| 174 | + 2592000 => _AM_NEWBB_PRUNE_MONTH, |
|
| 175 | + 5184000 => _AM_NEWBB_PRUNE_2MONTH, |
|
| 176 | + 10368000 => _AM_NEWBB_PRUNE_4MONTH, |
|
| 177 | + 31536000 => _AM_NEWBB_PRUNE_YEAR, |
|
| 178 | + 63072000 => _AM_NEWBB_PRUNE_2YEARS |
|
| 179 | + ]); |
|
| 180 | 180 | $sform->addElement($days); |
| 181 | 181 | // START irmtfan remove hardcode db access |
| 182 | 182 | require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/footer.php'); // to include js files |
@@ -228,14 +228,14 @@ discard block |
||
| 228 | 228 | |
| 229 | 229 | $hot_confirmation = new \XoopsFormSelect(_AM_NEWBB_PRUNE_HOT, 'hot', null, 1, false); |
| 230 | 230 | $hot_confirmation->addOptionArray([ |
| 231 | - '0' => 0, |
|
| 232 | - '5' => 5, |
|
| 233 | - '10' => 10, |
|
| 234 | - '15' => 15, |
|
| 235 | - '20' => 20, |
|
| 236 | - '25' => 25, |
|
| 237 | - '30' => 30 |
|
| 238 | - ]); |
|
| 231 | + '0' => 0, |
|
| 232 | + '5' => 5, |
|
| 233 | + '10' => 10, |
|
| 234 | + '15' => 15, |
|
| 235 | + '20' => 20, |
|
| 236 | + '25' => 25, |
|
| 237 | + '30' => 30 |
|
| 238 | + ]); |
|
| 239 | 239 | $sform->addElement($hot_confirmation); |
| 240 | 240 | |
| 241 | 241 | $sform->addElement(/*$radiobox*/ |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | use Xmf\Request; |
| 29 | 29 | |
| 30 | -require_once __DIR__ . '/admin_header.php'; |
|
| 30 | +require_once __DIR__.'/admin_header.php'; |
|
| 31 | 31 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 32 | 32 | |
| 33 | 33 | xoops_cp_header(); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | //if (!$newXoopsModuleGui) loadModuleAdminMenu(5, _AM_NEWBB_PRUNE_TITLE); |
| 37 | 37 | // else $adminObject->displayNavigation(basename(__FILE__)); |
| 38 | 38 | |
| 39 | -echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 39 | +echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 40 | 40 | |
| 41 | 41 | if (Request::getString('submit', '', 'POST')) { |
| 42 | 42 | $post_list = null; |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | $hot = Request::getInt('hot', 0, 'POST'); |
| 64 | 64 | $store = Request::getInt('store', null, 'POST'); |
| 65 | 65 | |
| 66 | - $sql = 'SELECT t.topic_id FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' t, ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' p |
|
| 67 | - WHERE t.forum_id IN (' . $selected_forums . ') |
|
| 66 | + $sql = 'SELECT t.topic_id FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' t, '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' p |
|
| 67 | + WHERE t.forum_id IN (' . $selected_forums.') |
|
| 68 | 68 | AND p.post_id =t.topic_last_post_id '; |
| 69 | 69 | |
| 70 | 70 | if ($sticky) { |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | $sql .= ' AND t.topic_status <> 1 '; |
| 78 | 78 | } |
| 79 | 79 | if (0 !== $hot) { |
| 80 | - $sql .= ' AND t.topic_replies < ' . $hot . ' '; |
|
| 80 | + $sql .= ' AND t.topic_replies < '.$hot.' '; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - $sql .= ' AND p.post_time<= ' . $prune_ddays . ' '; |
|
| 83 | + $sql .= ' AND p.post_time<= '.$prune_ddays.' '; |
|
| 84 | 84 | // Ok now we have the sql query completed, go for topic_id's and posts_id's |
| 85 | 85 | $topics = []; |
| 86 | 86 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $post_list = ''; |
| 96 | 96 | |
| 97 | 97 | if ('' !== $topic_list) { |
| 98 | - $sql = 'SELECT post_id FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' WHERE topic_id IN (' . $topic_list . ')'; |
|
| 98 | + $sql = 'SELECT post_id FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' WHERE topic_id IN ('.$topic_list.')'; |
|
| 99 | 99 | |
| 100 | 100 | $posts = []; |
| 101 | 101 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
@@ -112,35 +112,35 @@ discard block |
||
| 112 | 112 | if ('' !== $post_list) { |
| 113 | 113 | // COPY POSTS TO OTHER FORUM |
| 114 | 114 | if (null !== $store) { |
| 115 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 115 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 116 | 116 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 117 | 117 | return _MD_NEWBB_ERROR; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 120 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 121 | 121 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 122 | 122 | return _MD_NEWBB_ERROR; |
| 123 | 123 | } |
| 124 | 124 | } else { |
| 125 | 125 | // ARCHIVING POSTS |
| 126 | 126 | if (1 == $archive) { |
| 127 | - $result = $GLOBALS['xoopsDB']->query('SELECT p.topic_id, p.post_id, t.post_text FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' p, ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . " t WHERE p.post_id IN ($post_list) AND p.post_id=t.post_id"); |
|
| 127 | + $result = $GLOBALS['xoopsDB']->query('SELECT p.topic_id, p.post_id, t.post_text FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' p, '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text')." t WHERE p.post_id IN ($post_list) AND p.post_id=t.post_id"); |
|
| 128 | 128 | while (false !== (list($topic_id, $post_id, $post_text) = $GLOBALS['xoopsDB']->fetchRow($result))) { |
| 129 | - $sql = $GLOBALS['xoopsDB']->query('INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_archive') . " (topic_id, post_id, post_text) VALUES ($topic_id, $post_id, $post_text)"); |
|
| 129 | + $sql = $GLOBALS['xoopsDB']->query('INSERT INTO '.$GLOBALS['xoopsDB']->prefix('newbb_archive')." (topic_id, post_id, post_text) VALUES ($topic_id, $post_id, $post_text)"); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | // DELETE POSTS |
| 133 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " WHERE topic_id IN ($topic_list)"; |
|
| 133 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." WHERE topic_id IN ($topic_list)"; |
|
| 134 | 134 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 135 | 135 | return _MD_NEWBB_ERROR; |
| 136 | 136 | } |
| 137 | 137 | // DELETE TOPICS |
| 138 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " WHERE topic_id IN ($topic_list)"; |
|
| 138 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." WHERE topic_id IN ($topic_list)"; |
|
| 139 | 139 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 140 | 140 | return _MD_NEWBB_ERROR; |
| 141 | 141 | } |
| 142 | 142 | // DELETE POSTS_TEXT |
| 143 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . " WHERE post_id IN ($post_list)"; |
|
| 143 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text')." WHERE post_id IN ($post_list)"; |
|
| 144 | 144 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 145 | 145 | return _MD_NEWBB_ERROR; |
| 146 | 146 | } |
@@ -179,15 +179,15 @@ discard block |
||
| 179 | 179 | ]); |
| 180 | 180 | $sform->addElement($days); |
| 181 | 181 | // START irmtfan remove hardcode db access |
| 182 | - require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/footer.php'); // to include js files |
|
| 183 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
| 184 | - $forumSelMulti = "<select name=\"forums[]\" multiple=\"multiple\" onfocus = \"validate('forums[]','select', false,true)\">";// disable all categories |
|
| 182 | + require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/footer.php'); // to include js files |
|
| 183 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
| 184 | + $forumSelMulti = "<select name=\"forums[]\" multiple=\"multiple\" onfocus = \"validate('forums[]','select', false,true)\">"; // disable all categories |
|
| 185 | 185 | $forumSelSingle = "<select name=\"store\" onfocus = \"validate('store','select', false,true)\">"; // disable all categories |
| 186 | - $forumSelBox = '<option value = 0 >-- ' . _AM_NEWBB_PERM_FORUMS . ' --</option>'; |
|
| 186 | + $forumSelBox = '<option value = 0 >-- '._AM_NEWBB_PERM_FORUMS.' --</option>'; |
|
| 187 | 187 | $forumSelBox .= newbbForumSelectBox(null, 'access', false); //$accessForums = nothing, $permission = "access", $delimitorCategory = false |
| 188 | 188 | $forumSelBox .= '</select>'; |
| 189 | - $forumEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_FORUMS, $forumSelMulti . $forumSelBox); |
|
| 190 | - $storeEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_STORE, $forumSelSingle . $forumSelBox); |
|
| 189 | + $forumEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_FORUMS, $forumSelMulti.$forumSelBox); |
|
| 190 | + $storeEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_STORE, $forumSelSingle.$forumSelBox); |
|
| 191 | 191 | /* irmtfan remove hardcode |
| 192 | 192 | $checkbox = new \XoopsFormCheckBox(_AM_NEWBB_PRUNE_FORUMS, 'forums'); |
| 193 | 193 | $radiobox = new \XoopsFormRadio(_AM_NEWBB_PRUNE_STORE, 'store'); |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | echo '</td></tr></table>'; |
| 258 | 258 | echo '<fieldset>'; |
| 259 | -echo '<legend> ' . _MI_NEWBB_ADMENU_PRUNE . ' </legend>'; |
|
| 259 | +echo '<legend> '._MI_NEWBB_ADMENU_PRUNE.' </legend>'; |
|
| 260 | 260 | echo _AM_NEWBB_HELP_PRUNE_TAB; |
| 261 | 261 | echo '</fieldset>'; |
| 262 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 262 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | use Xmf\Request; |
| 14 | 14 | |
| 15 | -require_once __DIR__ . '/admin_header.php'; |
|
| 15 | +require_once __DIR__.'/admin_header.php'; |
|
| 16 | 16 | xoops_cp_header(); |
| 17 | 17 | echo '<br>'; |
| 18 | 18 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | if (count($type_del) > 0) { |
| 88 | - $type_list = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', $type_del) . ')', 'IN')); |
|
| 88 | + $type_list = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', $type_del).')', 'IN')); |
|
| 89 | 89 | xoops_confirm(['op' => 'delete', 'type_del' => serialize($type_del)], xoops_getenv('PHP_SELF'), sprintf(_AM_NEWBB_TODEL_TYPE, implode(', ', array_values($type_list))), '', false); |
| 90 | 90 | } else { |
| 91 | 91 | redirect_header(xoops_getenv('PHP_SELF'), 2, _MD_NEWBB_DBUPDATED); |
@@ -115,14 +115,14 @@ discard block |
||
| 115 | 115 | $adminObject->addItemButton(_AM_NEWBB_TYPE_TEMPLATE_APPLY, 'admin_type_manager.php?op=apply', $icon = 'add'); |
| 116 | 116 | $adminObject->addItemButton(_AM_NEWBB_TYPE_FORUM, 'admin_type_manager.php?op=forum', $icon = 'add'); |
| 117 | 117 | $adminObject->displayButton('left'); |
| 118 | - echo '<legend style="font-weight: bold; color: #900;">' . _AM_NEWBB_TYPE_ORDER_DESC . '</legend>'; |
|
| 119 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 120 | - echo "<form name='template' method='post' action='" . xoops_getenv('PHP_SELF') . "'>"; |
|
| 118 | + echo '<legend style="font-weight: bold; color: #900;">'._AM_NEWBB_TYPE_ORDER_DESC.'</legend>'; |
|
| 119 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 120 | + echo "<form name='template' method='post' action='".xoops_getenv('PHP_SELF')."'>"; |
|
| 121 | 121 | echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 122 | 122 | echo "<tr align='center'>"; |
| 123 | - echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_ORDER . '</th>'; |
|
| 124 | - echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>'; |
|
| 125 | - echo "<th class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>'; |
|
| 123 | + echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_ORDER.'</th>'; |
|
| 124 | + echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>'; |
|
| 125 | + echo "<th class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>'; |
|
| 126 | 126 | echo '</tr>'; |
| 127 | 127 | |
| 128 | 128 | if ($templates = $cacheHelper->read('type_template')) { |
@@ -133,9 +133,9 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | $typeObject = $typesObject[$key]; |
| 135 | 135 | echo "<tr class='even' align='left'>"; |
| 136 | - echo "<td><input type='text' name='type_order[{$key}]' value='" . $order . "' size='10' /></td>"; |
|
| 137 | - echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>'; |
|
| 138 | - echo '<td>' . $typeObject->getVar('type_description') . '</td>'; |
|
| 136 | + echo "<td><input type='text' name='type_order[{$key}]' value='".$order."' size='10' /></td>"; |
|
| 137 | + echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>'; |
|
| 138 | + echo '<td>'.$typeObject->getVar('type_description').'</td>'; |
|
| 139 | 139 | echo '</tr>'; |
| 140 | 140 | unset($typesObject[$key]); |
| 141 | 141 | } |
@@ -144,15 +144,15 @@ discard block |
||
| 144 | 144 | foreach ($typesObject as $key => $typeObject) { |
| 145 | 145 | echo "<tr class='odd' align='left'>"; |
| 146 | 146 | echo "<td><input type='text' name='type_order[{$key}]' value='0' size='10' /></td>"; |
| 147 | - echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>'; |
|
| 148 | - echo '<td>' . $typeObject->getVar('type_description') . '</td>'; |
|
| 147 | + echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>'; |
|
| 148 | + echo '<td>'.$typeObject->getVar('type_description').'</td>'; |
|
| 149 | 149 | echo '</tr>'; |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | echo "<tr><td colspan='3' style='text-align:center;'>"; |
| 153 | 153 | echo "<input type='hidden' name='op' value='save_template' />"; |
| 154 | - echo "<input type='submit' name='submit' value='" . _SUBMIT . "' /> "; |
|
| 155 | - echo "<input type='reset' value='" . _CANCEL . "' />"; |
|
| 154 | + echo "<input type='submit' name='submit' value='"._SUBMIT."' /> "; |
|
| 155 | + echo "<input type='reset' value='"._CANCEL."' />"; |
|
| 156 | 156 | echo '</td></tr></table>'; |
| 157 | 157 | echo '</form>'; |
| 158 | 158 | echo '</td></tr></table>'; |
@@ -161,12 +161,12 @@ discard block |
||
| 161 | 161 | case 'save_template': |
| 162 | 162 | $templates = array_flip(array_filter(Request::getArray('type_order', [], 'POST'))); |
| 163 | 163 | $cacheHelper->write('type_template', $templates); |
| 164 | - redirect_header(xoops_getenv('PHP_SELF') . '?op=template', 2, _MD_NEWBB_DBUPDATED); |
|
| 164 | + redirect_header(xoops_getenv('PHP_SELF').'?op=template', 2, _MD_NEWBB_DBUPDATED); |
|
| 165 | 165 | break; |
| 166 | 166 | |
| 167 | 167 | case 'apply': |
| 168 | 168 | if (!$templates = $cacheHelper->read('type_template')) { |
| 169 | - redirect_header(xoops_getenv('PHP_SELF') . '?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE_ERR); |
|
| 169 | + redirect_header(xoops_getenv('PHP_SELF').'?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE_ERR); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | // $categoryHandler = Newbb\Helper::getInstance()->getHandler('Category'); |
@@ -176,9 +176,9 @@ discard block |
||
| 176 | 176 | // $forumHandler = Newbb\Helper::getInstance()->getHandler('Forum'); |
| 177 | 177 | $forums = $forumHandler->getTree(array_keys($categories), 0, 'all'); |
| 178 | 178 | foreach (array_keys($forums) as $c) { |
| 179 | - $fm_options[-1 * $c] = '[' . $categories[$c] . ']'; |
|
| 179 | + $fm_options[-1 * $c] = '['.$categories[$c].']'; |
|
| 180 | 180 | foreach (array_keys($forums[$c]) as $f) { |
| 181 | - $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name']; |
|
| 181 | + $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name']; |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | unset($forums, $categories); |
@@ -199,15 +199,15 @@ discard block |
||
| 199 | 199 | $adminObject->addItemButton(_AM_NEWBB_TYPE_FORUM, 'admin_type_manager.php?op=forum', $icon = 'add'); |
| 200 | 200 | $adminObject->displayButton('left'); |
| 201 | 201 | |
| 202 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 202 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 203 | 203 | echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 204 | 204 | echo "<tr align='center'>"; |
| 205 | - echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>'; |
|
| 206 | - echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_ORDER . '</th>'; |
|
| 207 | - echo "<th class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>'; |
|
| 205 | + echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>'; |
|
| 206 | + echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_ORDER.'</th>'; |
|
| 207 | + echo "<th class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>'; |
|
| 208 | 208 | echo '</tr>'; |
| 209 | 209 | |
| 210 | - $typesObject = $typeHandler->getAll(new \Criteria('type_id', '(' . implode(', ', array_values($templates)) . ')', 'IN')); |
|
| 210 | + $typesObject = $typeHandler->getAll(new \Criteria('type_id', '('.implode(', ', array_values($templates)).')', 'IN')); |
|
| 211 | 211 | arsort($templates); |
| 212 | 212 | foreach ($templates as $order => $key) { |
| 213 | 213 | if (!isset($typesObject[$key])) { |
@@ -215,9 +215,9 @@ discard block |
||
| 215 | 215 | } |
| 216 | 216 | $typeObject = $typesObject[$key]; |
| 217 | 217 | echo "<tr class='even' align='left'>"; |
| 218 | - echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>'; |
|
| 219 | - echo '<td>' . $order . '</td>'; |
|
| 220 | - echo '<td>' . $typeObject->getVar('type_description') . '</td>'; |
|
| 218 | + echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>'; |
|
| 219 | + echo '<td>'.$order.'</td>'; |
|
| 220 | + echo '<td>'.$typeObject->getVar('type_description').'</td>'; |
|
| 221 | 221 | echo '</tr>'; |
| 222 | 222 | unset($typesObject[$key]); |
| 223 | 223 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | |
| 230 | 230 | case 'save_apply': |
| 231 | 231 | if (!$templates = $cacheHelper->read('type_template')) { |
| 232 | - redirect_header(xoops_getenv('PHP_SELF') . '?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE); |
|
| 232 | + redirect_header(xoops_getenv('PHP_SELF').'?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE); |
|
| 233 | 233 | } |
| 234 | 234 | foreach (Request::getArray('forums', [], 'POST') as $forum) { |
| 235 | 235 | if ($forum < 1) { |
@@ -255,9 +255,9 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | foreach (array_keys($forums) as $c) { |
| 258 | - $fm_options[-1 * $c] = '[' . $categories[$c] . ']'; |
|
| 258 | + $fm_options[-1 * $c] = '['.$categories[$c].']'; |
|
| 259 | 259 | foreach (array_keys($forums[$c]) as $f) { |
| 260 | - $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name']; |
|
| 260 | + $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name']; |
|
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | unset($forums, $categories); |
@@ -282,12 +282,12 @@ discard block |
||
| 282 | 282 | |
| 283 | 283 | case 'edit_forum': |
| 284 | 284 | if (!Request::getInt('forum', 0, 'POST') || Request::getInt('forum', 0, 'POST') < 1) { |
| 285 | - redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR); |
|
| 285 | + redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR); |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | // $forumHandler = Newbb\Helper::getInstance()->getHandler('Forum'); |
| 289 | 289 | if (!$forumObject = $forumHandler->get(Request::getInt('forum', 0, 'POST'))) { |
| 290 | - redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR); |
|
| 290 | + redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | $typesObject = $typeHandler->getAll(); |
@@ -299,14 +299,14 @@ discard block |
||
| 299 | 299 | $adminObject->addItemButton(_AM_NEWBB_TYPE_TEMPLATE, 'admin_type_manager.php?op=template', $icon = 'add'); |
| 300 | 300 | $adminObject->addItemButton(_AM_NEWBB_TYPE_FORUM, 'admin_type_manager.php?op=forum', $icon = 'add'); |
| 301 | 301 | $adminObject->displayButton('left'); |
| 302 | - echo '<legend style="font-weight: bold; color: #900;">' . _AM_NEWBB_TYPE_ORDER_DESC . '</legend>'; |
|
| 303 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 304 | - echo "<form name='template' method='post' action='" . xoops_getenv('PHP_SELF') . "'>"; |
|
| 302 | + echo '<legend style="font-weight: bold; color: #900;">'._AM_NEWBB_TYPE_ORDER_DESC.'</legend>'; |
|
| 303 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 304 | + echo "<form name='template' method='post' action='".xoops_getenv('PHP_SELF')."'>"; |
|
| 305 | 305 | echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 306 | 306 | echo "<tr align='center'>"; |
| 307 | - echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_ORDER . '</th>'; |
|
| 308 | - echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>'; |
|
| 309 | - echo "<th class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>'; |
|
| 307 | + echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_ORDER.'</th>'; |
|
| 308 | + echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>'; |
|
| 309 | + echo "<th class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>'; |
|
| 310 | 310 | echo '</tr>'; |
| 311 | 311 | |
| 312 | 312 | $types = $typeHandler->getByForum(Request::getInt('forum', 0, 'POST')); |
@@ -321,9 +321,9 @@ discard block |
||
| 321 | 321 | } |
| 322 | 322 | $typeObject = $typesObject[$type['type_id']]; |
| 323 | 323 | echo "<tr class='even' align='left'>"; |
| 324 | - echo "<td><input type='text' name='type_order[" . $type['type_id'] . "]' value='" . $type['type_order'] . "' size='10' /></td>"; |
|
| 325 | - echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>'; |
|
| 326 | - echo '<td>' . $typeObject->getVar('type_description') . '</td>'; |
|
| 324 | + echo "<td><input type='text' name='type_order[".$type['type_id']."]' value='".$type['type_order']."' size='10' /></td>"; |
|
| 325 | + echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>'; |
|
| 326 | + echo '<td>'.$typeObject->getVar('type_description').'</td>'; |
|
| 327 | 327 | echo '</tr>'; |
| 328 | 328 | unset($typesObject[$type['type_id']]); |
| 329 | 329 | } |
@@ -331,17 +331,17 @@ discard block |
||
| 331 | 331 | foreach ($typesObject as $key => $typeObject) { |
| 332 | 332 | echo "<tr class='odd' align='left'>"; |
| 333 | 333 | echo "<td><input type='text' name='type_order[{$key}]' value='0' size='10' /></td>"; |
| 334 | - echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>'; |
|
| 335 | - echo '<td>' . $typeObject->getVar('type_description') . '</td>'; |
|
| 334 | + echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>'; |
|
| 335 | + echo '<td>'.$typeObject->getVar('type_description').'</td>'; |
|
| 336 | 336 | echo '</tr>'; |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | echo "<tr><td colspan='3' style='text-align:center;'>"; |
| 340 | - echo '<legend style="font-weight: bold; color: #900;">' . _AM_NEWBB_TYPE_EDITFORUM_DESC . '</legend>'; |
|
| 341 | - echo "<input type='hidden' name='forum' value='" . Request::getInt('forum', 0, 'POST') . "' />"; |
|
| 340 | + echo '<legend style="font-weight: bold; color: #900;">'._AM_NEWBB_TYPE_EDITFORUM_DESC.'</legend>'; |
|
| 341 | + echo "<input type='hidden' name='forum' value='".Request::getInt('forum', 0, 'POST')."' />"; |
|
| 342 | 342 | echo "<input type='hidden' name='op' value='save_forum' />"; |
| 343 | - echo "<input type='submit' name='submit' value='" . _SUBMIT . "' /> "; |
|
| 344 | - echo "<input type='reset' value='" . _CANCEL . "' />"; |
|
| 343 | + echo "<input type='submit' name='submit' value='"._SUBMIT."' /> "; |
|
| 344 | + echo "<input type='reset' value='"._CANCEL."' />"; |
|
| 345 | 345 | echo '</td></tr></table>'; |
| 346 | 346 | echo '</form>'; |
| 347 | 347 | echo '</td></tr></table>'; |
@@ -349,10 +349,10 @@ discard block |
||
| 349 | 349 | |
| 350 | 350 | case 'save_forum': |
| 351 | 351 | if (!Request::getInt('forum', 0, 'POST') || Request::getInt('forum', 0, 'POST') < 1) { |
| 352 | - redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _AM_NEWBB_TYPE_FORUM); |
|
| 352 | + redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _AM_NEWBB_TYPE_FORUM); |
|
| 353 | 353 | } |
| 354 | 354 | $typeHandler->updateByForum(Request::getInt('forum', 0, 'POST'), Request::getArray('type_order', null, 'POST')); |
| 355 | - redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _MD_NEWBB_DBUPDATED); |
|
| 355 | + redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _MD_NEWBB_DBUPDATED); |
|
| 356 | 356 | break; |
| 357 | 357 | |
| 358 | 358 | case 'add': |
@@ -372,16 +372,16 @@ discard block |
||
| 372 | 372 | $adminObject->displayButton('left'); |
| 373 | 373 | } |
| 374 | 374 | echo _AM_NEWBB_TYPE_HELP; |
| 375 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 376 | - echo "<form name='list' method='post' action='" . xoops_getenv('PHP_SELF') . "'>"; |
|
| 375 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 376 | + echo "<form name='list' method='post' action='".xoops_getenv('PHP_SELF')."'>"; |
|
| 377 | 377 | echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 378 | 378 | echo "<tr align='center'>"; |
| 379 | 379 | if ('add' !== $op) { |
| 380 | - echo "<th class='bg3' width='5%'>" . _DELETE . '</th>'; |
|
| 380 | + echo "<th class='bg3' width='5%'>"._DELETE.'</th>'; |
|
| 381 | 381 | } |
| 382 | - echo "<th align='left' class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>'; |
|
| 383 | - echo "<th class='bg3' width='15%'>" . _AM_NEWBB_TYPE_COLOR . '</th>'; |
|
| 384 | - echo "<th align='left' class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>'; |
|
| 382 | + echo "<th align='left' class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>'; |
|
| 383 | + echo "<th class='bg3' width='15%'>"._AM_NEWBB_TYPE_COLOR.'</th>'; |
|
| 384 | + echo "<th align='left' class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>'; |
|
| 385 | 385 | echo '</tr>'; |
| 386 | 386 | |
| 387 | 387 | $isColorpicker = require_once $GLOBALS['xoops']->path('class/xoopsform/formcolorpicker.php'); |
@@ -390,14 +390,14 @@ discard block |
||
| 390 | 390 | foreach ($typesObject as $key => $typeObject) { |
| 391 | 391 | echo "<tr class='odd' align='left'>"; |
| 392 | 392 | echo "<td><input type='checkbox' name='type_del[{$key}]' /></td>"; |
| 393 | - echo "<td><input type='text' name='type_name[{$key}]' value='" . $typeObject->getVar('type_name') . "' size='10' /></td>"; |
|
| 393 | + echo "<td><input type='text' name='type_name[{$key}]' value='".$typeObject->getVar('type_name')."' size='10' /></td>"; |
|
| 394 | 394 | if ($isColorpicker) { |
| 395 | 395 | $form_colorpicker = new \XoopsFormColorPicker('', "type_color[{$key}]", $typeObject->getVar('type_color')); |
| 396 | - echo '<td>' . $form_colorpicker->render() . '</td>'; |
|
| 396 | + echo '<td>'.$form_colorpicker->render().'</td>'; |
|
| 397 | 397 | } else { |
| 398 | - echo "<td><input type='text' name='type_color[{$key}]' value='" . $typeObject->getVar('type_color') . "' size='10' /></td>"; |
|
| 398 | + echo "<td><input type='text' name='type_color[{$key}]' value='".$typeObject->getVar('type_color')."' size='10' /></td>"; |
|
| 399 | 399 | } |
| 400 | - echo "<td><input type='text' name='type_description[{$key}]' value='" . $typeObject->getVar('type_description') . "' size='30' /></td>"; |
|
| 400 | + echo "<td><input type='text' name='type_description[{$key}]' value='".$typeObject->getVar('type_description')."' size='30' /></td>"; |
|
| 401 | 401 | echo '</tr>'; |
| 402 | 402 | } |
| 403 | 403 | echo "<tr><td colspan='4' style='text-align:center;'>"; |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | echo "<td><input type='text' name='type_name[{$i}]' value='' size='10' /></td>"; |
| 411 | 411 | if ($isColorpicker) { |
| 412 | 412 | $form_colorpicker = new \XoopsFormColorPicker('', "type_color[{$i}]", ''); |
| 413 | - echo '<td>' . $form_colorpicker->render() . '</td>'; |
|
| 413 | + echo '<td>'.$form_colorpicker->render().'</td>'; |
|
| 414 | 414 | } else { |
| 415 | 415 | echo "<td><input type='text' name='type_color[{$i}]' value='' size='10' /></td>"; |
| 416 | 416 | } |
@@ -421,16 +421,16 @@ discard block |
||
| 421 | 421 | echo "<input type='hidden' name='isnew' value='1' />"; |
| 422 | 422 | } |
| 423 | 423 | echo "<input type='hidden' name='op' value='save_type' />"; |
| 424 | - echo "<input type='submit' name='submit' value='" . _SUBMIT . "' /> "; |
|
| 425 | - echo "<input type='reset' value='" . _CANCEL . "' />"; |
|
| 424 | + echo "<input type='submit' name='submit' value='"._SUBMIT."' /> "; |
|
| 425 | + echo "<input type='reset' value='"._CANCEL."' />"; |
|
| 426 | 426 | echo '</td></tr></table>'; |
| 427 | 427 | echo '</form>'; |
| 428 | 428 | echo '</td></tr></table>'; |
| 429 | 429 | echo '<fieldset>'; |
| 430 | - echo '<legend> ' . _MI_NEWBB_ADMENU_TYPE . ' </legend>'; |
|
| 430 | + echo '<legend> '._MI_NEWBB_ADMENU_TYPE.' </legend>'; |
|
| 431 | 431 | echo _AM_NEWBB_HELP_TYPE_TAB; |
| 432 | 432 | echo '</fieldset>'; |
| 433 | 433 | break; |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 436 | +require_once __DIR__.'/admin_footer.php'; |
|