@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | function xoopsCodeTarea($textarea_id, $cols = 60, $rows = 15, $suffix = null) |
| 34 | 34 | { |
| 35 | 35 | xoops_load('XoopsFormDhtmlTextArea'); |
| 36 | - $hiddenText = isset($suffix) ? 'xoopsHiddenText' . trim($suffix) : 'xoopsHiddenText'; |
|
| 36 | + $hiddenText = isset($suffix) ? 'xoopsHiddenText'.trim($suffix) : 'xoopsHiddenText'; |
|
| 37 | 37 | $content = isset($GLOBALS[$textarea_id]) ? $GLOBALS[$textarea_id] : ''; |
| 38 | 38 | $text_editor = new XoopsFormDhtmlTextArea('', $textarea_id, $content, $rows, $cols, $hiddenText); |
| 39 | 39 | $text_editor->htmlEditor = null; |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | $smiles = $myts->getSmileys(false); |
| 53 | 53 | $count = count($smiles); |
| 54 | 54 | for ($i = 0; $i < $count; ++$i) { |
| 55 | - echo "<img src='" . XOOPS_UPLOAD_URL . '/' . htmlspecialchars($smiles[$i]['smile_url'], ENT_QUOTES) . "' border='0' alt='' onclick='xoopsCodeSmilie(\"{$textarea_id}\", \" " . $smiles[$i]['code'] . " \");' onmouseover='style.cursor=\"hand\"' />"; |
|
| 55 | + echo "<img src='".XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smiles[$i]['smile_url'], ENT_QUOTES)."' border='0' alt='' onclick='xoopsCodeSmilie(\"{$textarea_id}\", \" ".$smiles[$i]['code']." \");' onmouseover='style.cursor=\"hand\"' />"; |
|
| 56 | 56 | } |
| 57 | - echo " [<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt='' onclick='openWithSelfMain(\"" . XOOPS_URL . "/misc.php?action=showpopups&type=smilies&target={$textarea_id}\",\"smilies\",300,475);'>" . _MORE . '</a>]'; |
|
| 57 | + echo " [<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt='' onclick='openWithSelfMain(\"".XOOPS_URL."/misc.php?action=showpopups&type=smilies&target={$textarea_id}\",\"smilies\",300,475);'>"._MORE.'</a>]'; |
|
| 58 | 58 | } |
| 59 | 59 | /**#@-*/ |
@@ -715,14 +715,14 @@ |
||
| 715 | 715 | 'renderBanner' => false)); |
| 716 | 716 | $xoopsTpl = $xoTheme->template; |
| 717 | 717 | $xoopsTpl->assign(array( |
| 718 | - 'xoops_theme' => $theme, |
|
| 719 | - 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $theme . '/', |
|
| 720 | - 'xoops_themecss' => xoops_getcss($theme), |
|
| 721 | - 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), |
|
| 722 | - 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), |
|
| 723 | - 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES), |
|
| 724 | - 'xoops_dirname' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('dirname') : 'system', |
|
| 725 | - 'xoops_pagetitle' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('name') : htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES))); |
|
| 718 | + 'xoops_theme' => $theme, |
|
| 719 | + 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $theme . '/', |
|
| 720 | + 'xoops_themecss' => xoops_getcss($theme), |
|
| 721 | + 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), |
|
| 722 | + 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), |
|
| 723 | + 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES), |
|
| 724 | + 'xoops_dirname' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('dirname') : 'system', |
|
| 725 | + 'xoops_pagetitle' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('name') : htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES))); |
|
| 726 | 726 | if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) { |
| 727 | 727 | $xoopsTpl->assign('time', 300); |
| 728 | 728 | $xoopsTpl->assign('xoops_logdump', $xoopsLogger->dump()); |
@@ -30,17 +30,17 @@ discard block |
||
| 30 | 30 | static $handlers; |
| 31 | 31 | $name = strtolower(trim($name)); |
| 32 | 32 | if (!isset($handlers[$name])) { |
| 33 | - if (file_exists($hnd_file = XOOPS_ROOT_PATH . '/kernel/' . $name . '.php')) { |
|
| 33 | + if (file_exists($hnd_file = XOOPS_ROOT_PATH.'/kernel/'.$name.'.php')) { |
|
| 34 | 34 | require_once $hnd_file; |
| 35 | 35 | } |
| 36 | - $class = 'Xoops' . ucfirst($name) . 'Handler'; |
|
| 36 | + $class = 'Xoops'.ucfirst($name).'Handler'; |
|
| 37 | 37 | if (class_exists($class)) { |
| 38 | 38 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
| 39 | 39 | $handlers[$name] = new $class($xoopsDB); |
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | if (!isset($handlers[$name])) { |
| 43 | - trigger_error('Class <strong>' . $class . '</strong> does not exist<br>Handler Name: ' . $name, $optional ? E_USER_WARNING : E_USER_ERROR); |
|
| 43 | + trigger_error('Class <strong>'.$class.'</strong> does not exist<br>Handler Name: '.$name, $optional ? E_USER_WARNING : E_USER_ERROR); |
|
| 44 | 44 | } |
| 45 | 45 | if (isset($handlers[$name])) { |
| 46 | 46 | return $handlers[$name]; |
@@ -74,17 +74,17 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | $name = (!isset($name)) ? $module_dir : trim($name); |
| 76 | 76 | if (!isset($handlers[$module_dir][$name])) { |
| 77 | - if (file_exists($hnd_file = XOOPS_ROOT_PATH . "/modules/{$module_dir}/class/{$name}.php")) { |
|
| 77 | + if (file_exists($hnd_file = XOOPS_ROOT_PATH."/modules/{$module_dir}/class/{$name}.php")) { |
|
| 78 | 78 | include_once $hnd_file; |
| 79 | 79 | } |
| 80 | - $class = ucfirst(strtolower($module_dir)) . ucfirst($name) . 'Handler'; |
|
| 80 | + $class = ucfirst(strtolower($module_dir)).ucfirst($name).'Handler'; |
|
| 81 | 81 | if (class_exists($class)) { |
| 82 | 82 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
| 83 | 83 | $handlers[$module_dir][$name] = new $class($xoopsDB); |
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | if (!isset($handlers[$module_dir][$name])) { |
| 87 | - trigger_error('Handler does not exist<br>Module: ' . $module_dir . '<br>Name: ' . $name, $optional ? E_USER_WARNING : E_USER_ERROR); |
|
| 87 | + trigger_error('Handler does not exist<br>Module: '.$module_dir.'<br>Name: '.$name, $optional ? E_USER_WARNING : E_USER_ERROR); |
|
| 88 | 88 | } |
| 89 | 89 | if (isset($handlers[$module_dir][$name])) { |
| 90 | 90 | return $handlers[$module_dir][$name]; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | function xoops_load($name, $type = 'core') |
| 110 | 110 | { |
| 111 | 111 | if (!class_exists('XoopsLoad')) { |
| 112 | - require_once XOOPS_ROOT_PATH . '/class/xoopsload.php'; |
|
| 112 | + require_once XOOPS_ROOT_PATH.'/class/xoopsload.php'; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | return XoopsLoad::load($name, $type); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | return false; |
| 143 | 143 | } |
| 144 | 144 | $language = empty($language) ? $GLOBALS['xoopsConfig']['language'] : $language; |
| 145 | - $path = ((empty($domain) || 'global' === $domain) ? '' : "modules/{$domain}/") . 'language'; |
|
| 145 | + $path = ((empty($domain) || 'global' === $domain) ? '' : "modules/{$domain}/").'language'; |
|
| 146 | 146 | if (!file_exists($fileinc = $GLOBALS['xoops']->path("{$path}/{$language}/{$name}.php"))) { |
| 147 | 147 | if (!file_exists($fileinc = $GLOBALS['xoops']->path("{$path}/english/{$name}.php"))) { |
| 148 | 148 | return false; |
@@ -230,12 +230,12 @@ discard block |
||
| 230 | 230 | global $xoopsConfig; |
| 231 | 231 | |
| 232 | 232 | $themeSet = $xoopsConfig['theme_set']; |
| 233 | - $themePath = XOOPS_THEME_PATH . '/' . $themeSet . '/'; |
|
| 234 | - $themeUrl = XOOPS_THEME_URL . '/' . $themeSet . '/'; |
|
| 235 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 233 | + $themePath = XOOPS_THEME_PATH.'/'.$themeSet.'/'; |
|
| 234 | + $themeUrl = XOOPS_THEME_URL.'/'.$themeSet.'/'; |
|
| 235 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 236 | 236 | $headTpl = new \XoopsTpl(); |
| 237 | 237 | $headTpl->assign(array( |
| 238 | - 'closeHead' => (bool) $closehead, |
|
| 238 | + 'closeHead' => (bool)$closehead, |
|
| 239 | 239 | 'themeUrl' => $themeUrl, |
| 240 | 240 | 'xoops_langcode' => _LANGCODE, |
| 241 | 241 | 'xoops_charset' => _CHARSET, |
@@ -243,28 +243,28 @@ discard block |
||
| 243 | 243 | 'xoops_url' => XOOPS_URL, |
| 244 | 244 | )); |
| 245 | 245 | |
| 246 | - if (file_exists($themePath . 'theme_autorun.php')) { |
|
| 247 | - include_once($themePath . 'theme_autorun.php'); |
|
| 246 | + if (file_exists($themePath.'theme_autorun.php')) { |
|
| 247 | + include_once($themePath.'theme_autorun.php'); |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | $headItems = array(); |
| 251 | - $headItems[] = '<script type="text/javascript" src="' . XOOPS_URL . '/include/xoops.js"></script>'; |
|
| 252 | - $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/xoops.css">'; |
|
| 253 | - $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/media/font-awesome/css/font-awesome.min.css">'; |
|
| 254 | - $languageFile = 'language/' . $GLOBALS['xoopsConfig']['language'] . '/style.css'; |
|
| 251 | + $headItems[] = '<script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script>'; |
|
| 252 | + $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/xoops.css">'; |
|
| 253 | + $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/media/font-awesome/css/font-awesome.min.css">'; |
|
| 254 | + $languageFile = 'language/'.$GLOBALS['xoopsConfig']['language'].'/style.css'; |
|
| 255 | 255 | if (file_exists($GLOBALS['xoops']->path($languageFile))) { |
| 256 | - $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $GLOBALS['xoops']->url($languageFile) . '">'; |
|
| 256 | + $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="'.$GLOBALS['xoops']->url($languageFile).'">'; |
|
| 257 | 257 | } |
| 258 | 258 | $themecss = xoops_getcss($xoopsConfig['theme_set']); |
| 259 | - if ($themecss!=='') { |
|
| 260 | - $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $themecss . '">'; |
|
| 259 | + if ($themecss !== '') { |
|
| 260 | + $headItems[] = '<link rel="stylesheet" type="text/css" media="all" href="'.$themecss.'">'; |
|
| 261 | 261 | } |
| 262 | 262 | $headTpl->assign('headItems', $headItems); |
| 263 | 263 | |
| 264 | 264 | if (!headers_sent()) { |
| 265 | - header('Content-Type:text/html; charset=' . _CHARSET); |
|
| 265 | + header('Content-Type:text/html; charset='._CHARSET); |
|
| 266 | 266 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 267 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
| 267 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
| 268 | 268 | header('Cache-Control: no-store, no-cache, max-age=1, s-maxage=1, must-revalidate, post-check=0, pre-check=0'); |
| 269 | 269 | header('Pragma: no-cache'); |
| 270 | 270 | } |
@@ -283,8 +283,8 @@ discard block |
||
| 283 | 283 | global $xoopsConfig; |
| 284 | 284 | |
| 285 | 285 | $themeSet = $xoopsConfig['theme_set']; |
| 286 | - $themePath = XOOPS_THEME_URL . '/' . $themeSet . '/'; |
|
| 287 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 286 | + $themePath = XOOPS_THEME_URL.'/'.$themeSet.'/'; |
|
| 287 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 288 | 288 | $footTpl = new \XoopsTpl(); |
| 289 | 289 | $footTpl->assign(array( |
| 290 | 290 | 'themePath' => $themePath, |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | { |
| 310 | 310 | echo '<div class="errorMsg">'; |
| 311 | 311 | if ($title != '') { |
| 312 | - echo '<strong>' . $title . '</strong><br><br>'; |
|
| 312 | + echo '<strong>'.$title.'</strong><br><br>'; |
|
| 313 | 313 | } |
| 314 | 314 | if (is_object($msg)) { |
| 315 | 315 | $msg = (array)$msg; |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | { |
| 339 | 339 | echo '<div class="resultMsg">'; |
| 340 | 340 | if ($title != '') { |
| 341 | - echo '<strong>' . $title . '</strong><br><br>'; |
|
| 341 | + echo '<strong>'.$title.'</strong><br><br>'; |
|
| 342 | 342 | } |
| 343 | 343 | if (is_object($msg)) { |
| 344 | 344 | $msg = (array)$msg; |
@@ -369,23 +369,23 @@ discard block |
||
| 369 | 369 | function xoops_confirm($hiddens, $action, $msg, $submit = '', $addtoken = true) |
| 370 | 370 | { |
| 371 | 371 | $submit = ($submit != '') ? trim($submit) : _SUBMIT; |
| 372 | - echo '<div class="confirmMsg">' . $msg . '<br> |
|
| 373 | - <form method="post" action="' . $action . '">'; |
|
| 372 | + echo '<div class="confirmMsg">'.$msg.'<br> |
|
| 373 | + <form method="post" action="' . $action.'">'; |
|
| 374 | 374 | foreach ($hiddens as $name => $value) { |
| 375 | 375 | if (is_array($value)) { |
| 376 | 376 | foreach ($value as $caption => $newvalue) { |
| 377 | - echo '<input type="radio" name="' . $name . '" value="' . htmlspecialchars($newvalue) . '" /> ' . $caption; |
|
| 377 | + echo '<input type="radio" name="'.$name.'" value="'.htmlspecialchars($newvalue).'" /> '.$caption; |
|
| 378 | 378 | } |
| 379 | 379 | echo '<br>'; |
| 380 | 380 | } else { |
| 381 | - echo '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />'; |
|
| 381 | + echo '<input type="hidden" name="'.$name.'" value="'.htmlspecialchars($value).'" />'; |
|
| 382 | 382 | } |
| 383 | 383 | } |
| 384 | 384 | if ($addtoken != false) { |
| 385 | 385 | echo $GLOBALS['xoopsSecurity']->getTokenHTML(); |
| 386 | 386 | } |
| 387 | - echo '<input type="submit" class="btn btn-default" name="confirm_submit" value="' . $submit . '" title="' . $submit . '"/> |
|
| 388 | - <input type="button" class="btn btn-default" name="confirm_back" value="' . _CANCEL . '" onclick="history.go(-1);" title="' . _CANCEL . '" /> |
|
| 387 | + echo '<input type="submit" class="btn btn-default" name="confirm_submit" value="'.$submit.'" title="'.$submit.'"/> |
|
| 388 | + <input type="button" class="btn btn-default" name="confirm_back" value="' . _CANCEL.'" onclick="history.go(-1);" title="'._CANCEL.'" /> |
|
| 389 | 389 | </form> |
| 390 | 390 | </div>'; |
| 391 | 391 | } |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | $url = trim($url); |
| 599 | 599 | if ($url != '') { |
| 600 | 600 | if ((!preg_match('/^http[s]*:\/\//i', $url)) && (!preg_match('/^ftp*:\/\//i', $url)) && (!preg_match('/^ed2k*:\/\//i', $url))) { |
| 601 | - $url = 'http://' . $url; |
|
| 601 | + $url = 'http://'.$url; |
|
| 602 | 602 | } |
| 603 | 603 | } |
| 604 | 604 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | global $xoopsConfig; |
| 614 | 614 | |
| 615 | 615 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
| 616 | - $bresult = $db->query('SELECT COUNT(*) FROM ' . $db->prefix('banner')); |
|
| 616 | + $bresult = $db->query('SELECT COUNT(*) FROM '.$db->prefix('banner')); |
|
| 617 | 617 | list($numrows) = $db->fetchRow($bresult); |
| 618 | 618 | if ($numrows > 1) { |
| 619 | 619 | --$numrows; |
@@ -623,7 +623,7 @@ discard block |
||
| 623 | 623 | $bannum = 0; |
| 624 | 624 | } |
| 625 | 625 | if ($numrows > 0) { |
| 626 | - $bresult = $db->query('SELECT * FROM ' . $db->prefix('banner'), 1, $bannum); |
|
| 626 | + $bresult = $db->query('SELECT * FROM '.$db->prefix('banner'), 1, $bannum); |
|
| 627 | 627 | list($bid, $cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $date, $htmlbanner, $htmlcode) = $db->fetchRow($bresult); |
| 628 | 628 | if ($xoopsConfig['my_ip'] == xoops_getenv('REMOTE_ADDR')) { |
| 629 | 629 | // EMPTY |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | * Check if this impression is the last one |
| 635 | 635 | */ |
| 636 | 636 | if ($imptotal > 0 && $impmade >= $imptotal) { |
| 637 | - $newid = $db->genId($db->prefix('bannerfinish') . '_bid_seq'); |
|
| 637 | + $newid = $db->genId($db->prefix('bannerfinish').'_bid_seq'); |
|
| 638 | 638 | $sql = sprintf('INSERT INTO %s (bid, cid, impressions, clicks, datestart, dateend) VALUES (%u, %u, %u, %u, %u, %u)', $db->prefix('bannerfinish'), $newid, $cid, $impmade, $clicks, $date, time()); |
| 639 | 639 | $db->queryF($sql); |
| 640 | 640 | $db->queryF(sprintf('DELETE FROM %s WHERE bid = %u', $db->prefix('banner'), $bid)); |
@@ -648,18 +648,18 @@ discard block |
||
| 648 | 648 | if ($htmlcode) { |
| 649 | 649 | $bannerobject = $htmlcode; |
| 650 | 650 | } else { |
| 651 | - $bannerobject = $bannerobject . '<div id="xo-bannerfix">'; |
|
| 651 | + $bannerobject = $bannerobject.'<div id="xo-bannerfix">'; |
|
| 652 | 652 | // $bannerobject = $bannerobject . '<div id="xo-fixbanner">'; |
| 653 | - $bannerobject = $bannerobject . ' <iframe src=' . $imageurl . ' border="0" scrolling="no" allowtransparency="true" width="480px" height="60px" style="border:0" alt="' . $clickurl . ';"> </iframe>'; |
|
| 653 | + $bannerobject = $bannerobject.' <iframe src='.$imageurl.' border="0" scrolling="no" allowtransparency="true" width="480px" height="60px" style="border:0" alt="'.$clickurl.';"> </iframe>'; |
|
| 654 | 654 | $bannerobject .= '</div>'; |
| 655 | 655 | // $bannerobject .= '</div>'; |
| 656 | 656 | } |
| 657 | 657 | } else { |
| 658 | 658 | $bannerobject = '<div id="xo-bannerfix">'; |
| 659 | 659 | if (false !== stripos($imageurl, '.swf')) { |
| 660 | - $bannerobject = $bannerobject . '<div id ="xo-fixbanner">' . '<a href="' . XOOPS_URL . '/banners.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a></div>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; |
|
| 660 | + $bannerobject = $bannerobject.'<div id ="xo-fixbanner">'.'<a href="'.XOOPS_URL.'/banners.php?op=click&bid='.$bid.'" rel="external" title="'.$clickurl.'"></a></div>'.'<object type="application/x-shockwave-flash" width="468" height="60" data="'.$imageurl.'" style="z-index:100;">'.'<param name="movie" value="'.$imageurl.'" />'.'<param name="wmode" value="opaque" />'.'</object>'; |
|
| 661 | 661 | } else { |
| 662 | - $bannerobject = $bannerobject . '<a href="' . XOOPS_URL . '/banners.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; |
|
| 662 | + $bannerobject = $bannerobject.'<a href="'.XOOPS_URL.'/banners.php?op=click&bid='.$bid.'" rel="external" title="'.$clickurl.'"><img src="'.$imageurl.'" alt="'.$clickurl.'" /></a>'; |
|
| 663 | 663 | } |
| 664 | 664 | |
| 665 | 665 | $bannerobject .= '</div>'; |
@@ -704,8 +704,8 @@ discard block |
||
| 704 | 704 | $theme = $xoopsConfig['theme_set']; |
| 705 | 705 | } |
| 706 | 706 | |
| 707 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 708 | - require_once XOOPS_ROOT_PATH . '/class/theme.php'; |
|
| 707 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 708 | + require_once XOOPS_ROOT_PATH.'/class/theme.php'; |
|
| 709 | 709 | $xoopsThemeFactory = null; |
| 710 | 710 | $xoopsThemeFactory = new xos_opal_ThemeFactory(); |
| 711 | 711 | $xoopsThemeFactory->allowedThemes = $xoopsConfig['theme_set_allowed']; |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | $xoopsTpl = $xoTheme->template; |
| 717 | 717 | $xoopsTpl->assign(array( |
| 718 | 718 | 'xoops_theme' => $theme, |
| 719 | - 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $theme . '/', |
|
| 719 | + 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$theme.'/', |
|
| 720 | 720 | 'xoops_themecss' => xoops_getcss($theme), |
| 721 | 721 | 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), |
| 722 | 722 | 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), |
@@ -731,16 +731,16 @@ discard block |
||
| 731 | 731 | } |
| 732 | 732 | if (!empty($_SERVER['REQUEST_URI']) && $addredirect && false !== strpos($url, 'user.php')) { |
| 733 | 733 | if (false === strpos($url, '?')) { |
| 734 | - $url .= '?xoops_redirect=' . urlencode($_SERVER['REQUEST_URI']); |
|
| 734 | + $url .= '?xoops_redirect='.urlencode($_SERVER['REQUEST_URI']); |
|
| 735 | 735 | } else { |
| 736 | - $url .= '&xoops_redirect=' . urlencode($_SERVER['REQUEST_URI']); |
|
| 736 | + $url .= '&xoops_redirect='.urlencode($_SERVER['REQUEST_URI']); |
|
| 737 | 737 | } |
| 738 | 738 | } |
| 739 | 739 | if (defined('SID') && SID && (!isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) { |
| 740 | 740 | if (false === strpos($url, '?')) { |
| 741 | - $url .= '?' . SID; |
|
| 741 | + $url .= '?'.SID; |
|
| 742 | 742 | } else { |
| 743 | - $url .= '&' . SID; |
|
| 743 | + $url .= '&'.SID; |
|
| 744 | 744 | } |
| 745 | 745 | } |
| 746 | 746 | $url = preg_replace('/&/i', '&', htmlspecialchars($url, ENT_QUOTES)); |
@@ -793,18 +793,18 @@ discard block |
||
| 793 | 793 | } elseif (preg_match("/MSIE (\d\.\d{1,2})/i", $uagent)) { |
| 794 | 794 | $str_css = 'style.css'; |
| 795 | 795 | } |
| 796 | - if (is_dir(XOOPS_THEME_PATH . '/' . $theme)) { |
|
| 797 | - if (file_exists(XOOPS_THEME_PATH . '/' . $theme . '/' . $str_css)) { |
|
| 798 | - return XOOPS_THEME_URL . '/' . $theme . '/' . $str_css; |
|
| 799 | - } elseif (file_exists(XOOPS_THEME_PATH . '/' . $theme . '/style.css')) { |
|
| 800 | - return XOOPS_THEME_URL . '/' . $theme . '/style.css'; |
|
| 796 | + if (is_dir(XOOPS_THEME_PATH.'/'.$theme)) { |
|
| 797 | + if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/'.$str_css)) { |
|
| 798 | + return XOOPS_THEME_URL.'/'.$theme.'/'.$str_css; |
|
| 799 | + } elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/style.css')) { |
|
| 800 | + return XOOPS_THEME_URL.'/'.$theme.'/style.css'; |
|
| 801 | 801 | } |
| 802 | 802 | } |
| 803 | - if (is_dir(XOOPS_THEME_PATH . '/' . $theme . '/css')) { |
|
| 804 | - if (file_exists(XOOPS_THEME_PATH . '/' . $theme . '/css/' . $str_css)) { |
|
| 805 | - return XOOPS_THEME_URL . '/' . $theme . '/css/' . $str_css; |
|
| 806 | - } elseif (file_exists(XOOPS_THEME_PATH . '/' . $theme . '/css/style.css')) { |
|
| 807 | - return XOOPS_THEME_URL . '/' . $theme . '/css/style.css'; |
|
| 803 | + if (is_dir(XOOPS_THEME_PATH.'/'.$theme.'/css')) { |
|
| 804 | + if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/'.$str_css)) { |
|
| 805 | + return XOOPS_THEME_URL.'/'.$theme.'/css/'.$str_css; |
|
| 806 | + } elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/style.css')) { |
|
| 807 | + return XOOPS_THEME_URL.'/'.$theme.'/css/style.css'; |
|
| 808 | 808 | } |
| 809 | 809 | } |
| 810 | 810 | |
@@ -823,10 +823,10 @@ discard block |
||
| 823 | 823 | if (is_object($mailer)) { |
| 824 | 824 | return $mailer; |
| 825 | 825 | } |
| 826 | - include_once XOOPS_ROOT_PATH . '/class/xoopsmailer.php'; |
|
| 827 | - if (file_exists($file = XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/xoopsmailerlocal.php')) { |
|
| 826 | + include_once XOOPS_ROOT_PATH.'/class/xoopsmailer.php'; |
|
| 827 | + if (file_exists($file = XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/xoopsmailerlocal.php')) { |
|
| 828 | 828 | include_once $file; |
| 829 | - } elseif (file_exists($file = XOOPS_ROOT_PATH . '/language/english/xoopsmailerlocal.php')) { |
|
| 829 | + } elseif (file_exists($file = XOOPS_ROOT_PATH.'/language/english/xoopsmailerlocal.php')) { |
|
| 830 | 830 | include_once $file; |
| 831 | 831 | } |
| 832 | 832 | unset($mailer); |
@@ -853,9 +853,9 @@ discard block |
||
| 853 | 853 | $rank_id = (int)$rank_id; |
| 854 | 854 | $posts = (int)$posts; |
| 855 | 855 | if ($rank_id != 0) { |
| 856 | - $sql = 'SELECT rank_title AS title, rank_image AS image FROM ' . $db->prefix('ranks') . ' WHERE rank_id = ' . $rank_id; |
|
| 856 | + $sql = 'SELECT rank_title AS title, rank_image AS image FROM '.$db->prefix('ranks').' WHERE rank_id = '.$rank_id; |
|
| 857 | 857 | } else { |
| 858 | - $sql = 'SELECT rank_title AS title, rank_image AS image FROM ' . $db->prefix('ranks') . ' WHERE rank_min <= ' . $posts . ' AND rank_max >= ' . $posts . ' AND rank_special = 0'; |
|
| 858 | + $sql = 'SELECT rank_title AS title, rank_image AS image FROM '.$db->prefix('ranks').' WHERE rank_min <= '.$posts.' AND rank_max >= '.$posts.' AND rank_special = 0'; |
|
| 859 | 859 | } |
| 860 | 860 | $rank = $db->fetchArray($db->query($sql)); |
| 861 | 861 | $rank['title'] = $myts->htmlspecialchars($rank['title']); |
@@ -1204,5 +1204,5 @@ discard block |
||
| 1204 | 1204 | return $domain; |
| 1205 | 1205 | } |
| 1206 | 1206 | |
| 1207 | -include_once __DIR__ . '/functions.encoding.php'; |
|
| 1208 | -include_once __DIR__ . '/functions.legacy.php'; |
|
| 1207 | +include_once __DIR__.'/functions.encoding.php'; |
|
| 1208 | +include_once __DIR__.'/functions.legacy.php'; |
|
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | include_once $GLOBALS['xoops']->path('include/comment_constants.php'); |
| 26 | 26 | |
| 27 | 27 | if (('system' !== $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) || (!is_object($xoopsUser) && !$xoopsModuleConfig['com_anonpost']) || !is_object($xoopsModule)) { |
| 28 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
| 28 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | xoops_loadLanguage('comment'); |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | // End edit by voltan |
| 60 | 60 | |
| 61 | -$r_text = _CM_POSTER . ': <strong>' . $r_name . '</strong> ' . _CM_POSTED . ': <strong>' . formatTimestamp($comment->getVar('com_created')) . '</strong><br><br>' . $comment->getVar('com_text'); |
|
| 61 | +$r_text = _CM_POSTER.': <strong>'.$r_name.'</strong> '._CM_POSTED.': <strong>'.formatTimestamp($comment->getVar('com_created')).'</strong><br><br>'.$comment->getVar('com_text'); |
|
| 62 | 62 | $com_title = $comment->getVar('com_title', 'E'); |
| 63 | -if (!preg_match('/^' . _RE . '/i', $com_title)) { |
|
| 64 | - $com_title = _RE . ' ' . xoops_substr($com_title, 0, 56); |
|
| 63 | +if (!preg_match('/^'._RE.'/i', $com_title)) { |
|
| 64 | + $com_title = _RE.' '.xoops_substr($com_title, 0, 56); |
|
| 65 | 65 | } |
| 66 | 66 | $com_pid = $com_id; |
| 67 | 67 | $com_text = ''; |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | include_once $GLOBALS['xoops']->path('header.php'); |
| 84 | 84 | echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"> |
| 85 | - <tr><td class="head">' . $comment->getVar('com_title') . '</td></tr> |
|
| 86 | - <tr><td><br>' . $r_text . '<br></td></tr> |
|
| 85 | + <tr><td class="head">' . $comment->getVar('com_title').'</td></tr> |
|
| 86 | + <tr><td><br>' . $r_text.'<br></td></tr> |
|
| 87 | 87 | </table>'; |
| 88 | 88 | include_once $GLOBALS['xoops']->path('include/comment_form.php'); |
| 89 | 89 | include_once $GLOBALS['xoops']->path('footer.php'); |
@@ -91,9 +91,9 @@ |
||
| 91 | 91 | include_once $GLOBALS['xoops']->path('include/comment_constants.php'); |
| 92 | 92 | $status_select = new XoopsFormSelect(_CM_STATUS, 'com_status', $com_status); |
| 93 | 93 | $status_select->addOptionArray(array( |
| 94 | - XOOPS_COMMENT_PENDING => _CM_PENDING, |
|
| 95 | - XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, |
|
| 96 | - XOOPS_COMMENT_HIDDEN => _CM_HIDDEN)); |
|
| 94 | + XOOPS_COMMENT_PENDING => _CM_PENDING, |
|
| 95 | + XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, |
|
| 96 | + XOOPS_COMMENT_HIDDEN => _CM_HIDDEN)); |
|
| 97 | 97 | $cform->addElement($status_select); |
| 98 | 98 | $button_tray->addElement(new XoopsFormButton('', 'com_dodelete', _DELETE, 'submit')); |
| 99 | 99 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $icons_radio = new XoopsFormRadio(_MESSAGEICON, 'com_icon', $com_icon); |
| 55 | 55 | $subject_icons = XoopsLists::getSubjectsList(); |
| 56 | 56 | foreach ($subject_icons as $iconfile) { |
| 57 | - $icons_radio->addOption($iconfile, '<img src="' . XOOPS_URL . '/images/subject/' . $iconfile . '" alt="" />'); |
|
| 57 | + $icons_radio->addOption($iconfile, '<img src="'.XOOPS_URL.'/images/subject/'.$iconfile.'" alt="" />'); |
|
| 58 | 58 | } |
| 59 | 59 | $cform->addElement($icons_radio); |
| 60 | 60 | // editor |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * It is highly discouraged to use the license file |
| 25 | 25 | * It will be depreciated and removed |
| 26 | 26 | */ |
| 27 | -@include_once __DIR__ . '/license.php'; |
|
| 27 | +@include_once __DIR__.'/license.php'; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * Define XOOPS version |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $redirect = XoopsRequest::getUrl('xoops_redirect', '', 'POST'); |
| 27 | 27 | |
| 28 | 28 | if ($uname == '' || $pass == '') { |
| 29 | - redirect_header(XOOPS_URL . '/user.php', 1, _US_INCORRECTLOGIN); |
|
| 29 | + redirect_header(XOOPS_URL.'/user.php', 1, _US_INCORRECTLOGIN); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /* @var $member_handler XoopsMemberHandler */ |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | if (false !== $user) { |
| 44 | 44 | if (0 == $user->getVar('level')) { |
| 45 | - redirect_header(XOOPS_URL . '/index.php', 5, _US_NOACTTPADM); |
|
| 45 | + redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM); |
|
| 46 | 46 | } |
| 47 | 47 | if ($xoopsConfig['closesite'] == 1) { |
| 48 | 48 | $allowed = false; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | if (!$allowed) { |
| 56 | - redirect_header(XOOPS_URL . '/index.php', 1, _NOPERM); |
|
| 56 | + redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM); |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | $user->setVar('last_login', time()); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $claims = array( |
| 77 | 77 | 'uid' => $_SESSION['xoopsUserId'], |
| 78 | 78 | ); |
| 79 | - $rememberTime = 60*60*24*30; |
|
| 79 | + $rememberTime = 60 * 60 * 24 * 30; |
|
| 80 | 80 | $token = \Xmf\Jwt\TokenFactory::build('rememberme', $claims, $rememberTime); |
| 81 | 81 | setcookie( |
| 82 | 82 | $GLOBALS['xoopsConfig']['usercookie'], |
@@ -95,11 +95,11 @@ discard block |
||
| 95 | 95 | if (!empty($redirect) && !strpos($redirect, 'register')) { |
| 96 | 96 | $xoops_redirect = rawurldecode($redirect); |
| 97 | 97 | $parsed = parse_url(XOOPS_URL); |
| 98 | - $url = isset($parsed['scheme']) ? $parsed['scheme'] . '://' : 'http://'; |
|
| 98 | + $url = isset($parsed['scheme']) ? $parsed['scheme'].'://' : 'http://'; |
|
| 99 | 99 | if (isset($parsed['host'])) { |
| 100 | 100 | $url .= $parsed['host']; |
| 101 | 101 | if (isset($parsed['port'])) { |
| 102 | - $url .= ':' . $parsed['port']; |
|
| 102 | + $url .= ':'.$parsed['port']; |
|
| 103 | 103 | } |
| 104 | 104 | } else { |
| 105 | 105 | $url .= $_SERVER['HTTP_HOST']; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | $url .= $xoops_redirect; |
| 113 | 113 | } else { |
| 114 | - $url = XOOPS_URL . '/index.php'; |
|
| 114 | + $url = XOOPS_URL.'/index.php'; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | // RMV-NOTIFY |
@@ -121,8 +121,8 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | redirect_header($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')), false); |
| 123 | 123 | } elseif (empty($redirect)) { |
| 124 | - redirect_header(XOOPS_URL . '/user.php', 5, $xoopsAuth->getHtmlErrors()); |
|
| 124 | + redirect_header(XOOPS_URL.'/user.php', 5, $xoopsAuth->getHtmlErrors()); |
|
| 125 | 125 | } else { |
| 126 | - redirect_header(XOOPS_URL . '/user.php?xoops_redirect=' . urlencode($redirect), 5, $xoopsAuth->getHtmlErrors(), false); |
|
| 126 | + redirect_header(XOOPS_URL.'/user.php?xoops_redirect='.urlencode($redirect), 5, $xoopsAuth->getHtmlErrors(), false); |
|
| 127 | 127 | } |
| 128 | 128 | exit(); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $redirect_args = array(); |
| 82 | 82 | foreach ($update_list as $update_item) { |
| 83 | 83 | list($category, $item_id, $event) = preg_split('/,/', $update_item['params']); |
| 84 | - $category_info =& notificationCategoryInfo($category); |
|
| 84 | + $category_info = & notificationCategoryInfo($category); |
|
| 85 | 85 | if (!empty($category_info['item_name'])) { |
| 86 | 86 | $redirect_args[$category_info['item_name']] = $item_id; |
| 87 | 87 | } |
@@ -93,12 +93,12 @@ discard block |
||
| 93 | 93 | $first_arg = 1; |
| 94 | 94 | foreach (array_keys($redirect_args) as $arg) { |
| 95 | 95 | if ($first_arg) { |
| 96 | - $argstring .= '?' . $arg . '=' . $redirect_args[$arg]; |
|
| 96 | + $argstring .= '?'.$arg.'='.$redirect_args[$arg]; |
|
| 97 | 97 | $first_arg = 0; |
| 98 | 98 | } else { |
| 99 | - $argstring .= '&' . $arg . '=' . $redirect_args[$arg]; |
|
| 99 | + $argstring .= '&'.$arg.'='.$redirect_args[$arg]; |
|
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | -redirect_header($_POST['not_redirect'] . $argstring, 3, _NOT_UPDATEOK); |
|
| 103 | +redirect_header($_POST['not_redirect'].$argstring, 3, _NOT_UPDATEOK); |
|
| 104 | 104 | exit(); |
@@ -352,14 +352,14 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | $mailok_radio = new XoopsFormRadio(_MA_USER_SHOWMAILOK, 'user_mailok', empty($_POST['user_mailok']) ? 'both' : $_POST['user_mailok']); |
| 354 | 354 | $mailok_radio->addOptionArray(array( |
| 355 | - 'mailok' => _MA_USER_MAILOK, |
|
| 356 | - 'mailng' => _MA_USER_MAILNG, |
|
| 357 | - 'both' => _MA_USER_BOTH)); |
|
| 355 | + 'mailok' => _MA_USER_MAILOK, |
|
| 356 | + 'mailng' => _MA_USER_MAILNG, |
|
| 357 | + 'both' => _MA_USER_BOTH)); |
|
| 358 | 358 | $avatar_radio = new XoopsFormRadio(_MA_USER_HASAVATAR, 'user_avatar', empty($_POST['user_avatar']) ? 'both' : $_POST['user_avatar']); |
| 359 | 359 | $avatar_radio->addOptionArray(array( |
| 360 | - 'y' => _YES, |
|
| 361 | - 'n' => _NO, |
|
| 362 | - 'both' => _MA_USER_BOTH)); |
|
| 360 | + 'y' => _YES, |
|
| 361 | + 'n' => _NO, |
|
| 362 | + 'both' => _MA_USER_BOTH)); |
|
| 363 | 363 | |
| 364 | 364 | $level_radio = new XoopsFormRadio(_MA_USER_LEVEL, 'level', @$_POST['level']); |
| 365 | 365 | $levels = array( |
@@ -391,8 +391,8 @@ discard block |
||
| 391 | 391 | $form->addElement($rank_select); |
| 392 | 392 | } else { |
| 393 | 393 | foreach (array( |
| 394 | - 'uname', |
|
| 395 | - 'email') as $var) { |
|
| 394 | + 'uname', |
|
| 395 | + 'email') as $var) { |
|
| 396 | 396 | $title = $items_match[$var]; |
| 397 | 397 | $text = new XoopsFormText('', $var, 30, 100, @$_POST[$var]); |
| 398 | 398 | $match = new XoopsFormSelectMatchOption('', "{$var}_match", @$_POST["{$var}_match"]); |
@@ -406,14 +406,14 @@ discard block |
||
| 406 | 406 | |
| 407 | 407 | $sort_select = new XoopsFormSelect(_MA_USER_SORT, 'user_sort', @$_POST['user_sort']); |
| 408 | 408 | $sort_select->addOptionArray(array( |
| 409 | - 'uname' => _MA_USER_UNAME, |
|
| 410 | - 'last_login' => _MA_USER_LASTLOGIN, |
|
| 411 | - 'user_regdate' => _MA_USER_REGDATE, |
|
| 412 | - 'posts' => _MA_USER_POSTS)); |
|
| 409 | + 'uname' => _MA_USER_UNAME, |
|
| 410 | + 'last_login' => _MA_USER_LASTLOGIN, |
|
| 411 | + 'user_regdate' => _MA_USER_REGDATE, |
|
| 412 | + 'posts' => _MA_USER_POSTS)); |
|
| 413 | 413 | $order_select = new XoopsFormSelect(_MA_USER_ORDER, 'user_order', @$_POST['user_order']); |
| 414 | 414 | $order_select->addOptionArray(array( |
| 415 | - 'ASC' => _MA_USER_ASC, |
|
| 416 | - 'DESC' => _MA_USER_DESC)); |
|
| 415 | + 'ASC' => _MA_USER_ASC, |
|
| 416 | + 'DESC' => _MA_USER_DESC)); |
|
| 417 | 417 | |
| 418 | 418 | $form->addElement($sort_select); |
| 419 | 419 | $form->addElement($order_select); |
@@ -479,8 +479,8 @@ discard block |
||
| 479 | 479 | $criteria->add(new Criteria('user_occ', '%' . $myts->addSlashes(trim($_POST['user_occ'])) . '%', 'LIKE')); |
| 480 | 480 | } |
| 481 | 481 | foreach (array( |
| 482 | - 'last_login', |
|
| 483 | - 'user_regdate') as $var) { |
|
| 482 | + 'last_login', |
|
| 483 | + 'user_regdate') as $var) { |
|
| 484 | 484 | if (!empty($_POST["{$var}_more"]) && is_numeric($_POST["{$var}_more"])) { |
| 485 | 485 | $time = time() - (60 * 60 * 24 * (int)trim($_POST["{$var}_more"])); |
| 486 | 486 | if ($time > 0) { |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | /* @var $xoopsUser XoopsUser */ |
| 19 | 19 | |
| 20 | -include_once dirname(__DIR__) . '/mainfile.php'; |
|
| 20 | +include_once dirname(__DIR__).'/mainfile.php'; |
|
| 21 | 21 | |
| 22 | 22 | xoops_header(false); |
| 23 | 23 | |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | $token = isset($_REQUEST['token']) ? $_REQUEST['token'] : ''; |
| 38 | 38 | $name_form = 'memberslist'; |
| 39 | -$name_userid = 'uid' . (!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
| 40 | -$name_username = 'uname' . (!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
| 39 | +$name_userid = 'uid'.(!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
| 40 | +$name_username = 'uname'.(!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
| 41 | 41 | |
| 42 | 42 | xoops_loadLanguage('findusers'); |
| 43 | 43 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | public function get($id = 0) |
| 105 | 105 | { |
| 106 | 106 | $object = $this->create(false); |
| 107 | - $sql = 'SELECT * FROM ' . $this->db->prefix('ranks') . ' WHERE rank_id = ' . $this->db->quoteString($id); |
|
| 107 | + $sql = 'SELECT * FROM '.$this->db->prefix('ranks').' WHERE rank_id = '.$this->db->quoteString($id); |
|
| 108 | 108 | if (!$result = $this->db->query($sql)) { |
| 109 | 109 | $ret = null; |
| 110 | 110 | |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | $criteria = new CriteriaCompo(); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - $sql = 'SELECT rank_id, rank_title FROM ' . $this->db->prefix('ranks'); |
|
| 135 | + $sql = 'SELECT rank_id, rank_title FROM '.$this->db->prefix('ranks'); |
|
| 136 | 136 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 137 | - $sql .= ' ' . $criteria->renderWhere(); |
|
| 137 | + $sql .= ' '.$criteria->renderWhere(); |
|
| 138 | 138 | if ($criteria->getSort() != '') { |
| 139 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
| 139 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
| 140 | 140 | } |
| 141 | 141 | $limit = $criteria->getLimit(); |
| 142 | 142 | $start = $criteria->getStart(); |
@@ -227,14 +227,14 @@ discard block |
||
| 227 | 227 | } |
| 228 | 228 | $groups = array_filter($groups); |
| 229 | 229 | if (empty($groups)) { |
| 230 | - $sql = ' SELECT COUNT(DISTINCT u.uid) FROM ' . $this->db->prefix('users') . ' AS u' . ' WHERE 1=1'; |
|
| 230 | + $sql = ' SELECT COUNT(DISTINCT u.uid) FROM '.$this->db->prefix('users').' AS u'.' WHERE 1=1'; |
|
| 231 | 231 | } else { |
| 232 | - $sql = ' SELECT COUNT(DISTINCT u.uid) FROM ' . $this->db->prefix('users') . ' AS u' . ' LEFT JOIN ' . $this->db->prefix('groups_users_link') . ' AS g ON g.uid = u.uid' . ' WHERE g.groupid IN (' . implode(', ', array_map('intval', $groups)) . ')'; |
|
| 232 | + $sql = ' SELECT COUNT(DISTINCT u.uid) FROM '.$this->db->prefix('users').' AS u'.' LEFT JOIN '.$this->db->prefix('groups_users_link').' AS g ON g.uid = u.uid'.' WHERE g.groupid IN ('.implode(', ', array_map('intval', $groups)).')'; |
|
| 233 | 233 | } |
| 234 | 234 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 235 | 235 | // Use the direct renderer, assuming no `uid` in criteria |
| 236 | 236 | if ($render = $criteria->render()) { |
| 237 | - $sql .= ' AND ' . $render; |
|
| 237 | + $sql .= ' AND '.$render; |
|
| 238 | 238 | } |
| 239 | 239 | } |
| 240 | 240 | $result = $this->db->query($sql); |
@@ -260,16 +260,16 @@ discard block |
||
| 260 | 260 | $limit = null; |
| 261 | 261 | $start = null; |
| 262 | 262 | if (empty($groups)) { |
| 263 | - $sql = ' SELECT u.* FROM ' . $this->db->prefix('users') . ' AS u' . ' WHERE 1=1'; |
|
| 263 | + $sql = ' SELECT u.* FROM '.$this->db->prefix('users').' AS u'.' WHERE 1=1'; |
|
| 264 | 264 | } else { |
| 265 | - $sql = ' SELECT u.* FROM ' . $this->db->prefix('users') . ' AS u' . ' LEFT JOIN ' . $this->db->prefix('groups_users_link') . ' AS g ON g.uid = u.uid' . ' WHERE g.groupid IN (' . implode(', ', array_map('intval', $groups)) . ')'; |
|
| 265 | + $sql = ' SELECT u.* FROM '.$this->db->prefix('users').' AS u'.' LEFT JOIN '.$this->db->prefix('groups_users_link').' AS g ON g.uid = u.uid'.' WHERE g.groupid IN ('.implode(', ', array_map('intval', $groups)).')'; |
|
| 266 | 266 | } |
| 267 | 267 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 268 | 268 | if ($render = $criteria->render()) { |
| 269 | - $sql .= ' AND ' . $render; |
|
| 269 | + $sql .= ' AND '.$render; |
|
| 270 | 270 | } |
| 271 | 271 | if ($sort = $criteria->getSort()) { |
| 272 | - $sql .= ' ORDER BY ' . $sort . ' ' . $criteria->getOrder(); |
|
| 272 | + $sql .= ' ORDER BY '.$sort.' '.$criteria->getOrder(); |
|
| 273 | 273 | $orderSet = true; |
| 274 | 274 | } |
| 275 | 275 | $limit = $criteria->getLimit(); |
@@ -428,16 +428,16 @@ discard block |
||
| 428 | 428 | $acttotal = $user_handler->getCount(new Criteria('level', 0, '>')); |
| 429 | 429 | $inacttotal = $user_handler->getCount(new Criteria('level', 0, '<=')); |
| 430 | 430 | echo '</html><body>'; |
| 431 | - echo "<h2 style='text-align:left;'>" . _MA_USER_FINDUS . ' - ' . $modes[$mode] . '</h2>'; |
|
| 431 | + echo "<h2 style='text-align:left;'>"._MA_USER_FINDUS.' - '.$modes[$mode].'</h2>'; |
|
| 432 | 432 | $modes_switch = array(); |
| 433 | 433 | foreach ($modes as $_mode => $title) { |
| 434 | 434 | if ($mode == $_mode) { |
| 435 | 435 | continue; |
| 436 | 436 | } |
| 437 | - $modes_switch[] = "<a href='findusers.php?target=" . htmlspecialchars(@$_REQUEST['target'], ENT_QUOTES) . '&multiple=' . htmlspecialchars(@$_REQUEST['multiple'], ENT_QUOTES) . '&token=' . htmlspecialchars($token, ENT_QUOTES) . "&mode={$_mode}'>{$title}</a>"; |
|
| 437 | + $modes_switch[] = "<a href='findusers.php?target=".htmlspecialchars(@$_REQUEST['target'], ENT_QUOTES).'&multiple='.htmlspecialchars(@$_REQUEST['multiple'], ENT_QUOTES).'&token='.htmlspecialchars($token, ENT_QUOTES)."&mode={$_mode}'>{$title}</a>"; |
|
| 438 | 438 | } |
| 439 | - echo '<h4>' . implode(' | ', $modes_switch) . '</h4>'; |
|
| 440 | - echo '(' . sprintf(_MA_USER_ACTUS, "<span style='color:#ff0000;'>$acttotal</span>") . ' ' . sprintf(_MA_USER_INACTUS, "<span style='color:#ff0000;'>$inacttotal</span>") . ')'; |
|
| 439 | + echo '<h4>'.implode(' | ', $modes_switch).'</h4>'; |
|
| 440 | + echo '('.sprintf(_MA_USER_ACTUS, "<span style='color:#ff0000;'>$acttotal</span>").' '.sprintf(_MA_USER_INACTUS, "<span style='color:#ff0000;'>$inacttotal</span>").')'; |
|
| 441 | 441 | $form->display(); |
| 442 | 442 | } else { |
| 443 | 443 | $myts = MyTextSanitizer::getInstance(); |
@@ -451,32 +451,32 @@ discard block |
||
| 451 | 451 | $value = str_replace('_', "\\\_", $myts->addSlashes(trim($_POST[$var]))); |
| 452 | 452 | switch ($match) { |
| 453 | 453 | case XOOPS_MATCH_START: |
| 454 | - $criteria->add(new Criteria($var, $value . '%', 'LIKE')); |
|
| 454 | + $criteria->add(new Criteria($var, $value.'%', 'LIKE')); |
|
| 455 | 455 | break; |
| 456 | 456 | case XOOPS_MATCH_END: |
| 457 | - $criteria->add(new Criteria($var, '%' . $value, 'LIKE')); |
|
| 457 | + $criteria->add(new Criteria($var, '%'.$value, 'LIKE')); |
|
| 458 | 458 | break; |
| 459 | 459 | case XOOPS_MATCH_EQUAL: |
| 460 | 460 | $criteria->add(new Criteria($var, $value)); |
| 461 | 461 | break; |
| 462 | 462 | case XOOPS_MATCH_CONTAIN: |
| 463 | - $criteria->add(new Criteria($var, '%' . $value . '%', 'LIKE')); |
|
| 463 | + $criteria->add(new Criteria($var, '%'.$value.'%', 'LIKE')); |
|
| 464 | 464 | break; |
| 465 | 465 | } |
| 466 | 466 | } |
| 467 | 467 | } |
| 468 | 468 | if (!empty($_POST['url'])) { |
| 469 | 469 | $url = formatURL(trim($_POST['url'])); |
| 470 | - $criteria->add(new Criteria('url', $url . '%', 'LIKE')); |
|
| 470 | + $criteria->add(new Criteria('url', $url.'%', 'LIKE')); |
|
| 471 | 471 | } |
| 472 | 472 | if (!empty($_POST['user_from'])) { |
| 473 | - $criteria->add(new Criteria('user_from', '%' . $myts->addSlashes(trim($_POST['user_from'])) . '%', 'LIKE')); |
|
| 473 | + $criteria->add(new Criteria('user_from', '%'.$myts->addSlashes(trim($_POST['user_from'])).'%', 'LIKE')); |
|
| 474 | 474 | } |
| 475 | 475 | if (!empty($_POST['user_intrest'])) { |
| 476 | - $criteria->add(new Criteria('user_intrest', '%' . $myts->addSlashes(trim($_POST['user_intrest'])) . '%', 'LIKE')); |
|
| 476 | + $criteria->add(new Criteria('user_intrest', '%'.$myts->addSlashes(trim($_POST['user_intrest'])).'%', 'LIKE')); |
|
| 477 | 477 | } |
| 478 | 478 | if (!empty($_POST['user_occ'])) { |
| 479 | - $criteria->add(new Criteria('user_occ', '%' . $myts->addSlashes(trim($_POST['user_occ'])) . '%', 'LIKE')); |
|
| 479 | + $criteria->add(new Criteria('user_occ', '%'.$myts->addSlashes(trim($_POST['user_occ'])).'%', 'LIKE')); |
|
| 480 | 480 | } |
| 481 | 481 | foreach (array( |
| 482 | 482 | 'last_login', |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | 1 => 1, |
| 520 | 520 | 2 => 0, |
| 521 | 521 | 3 => -1); |
| 522 | - $level = isset($level_value[(int)$_POST['level']]) ? $level_value[(int)$_POST['level']] : 1; |
|
| 522 | + $level = isset($level_value[(int)$_POST['level']]) ? $level_value[(int)$_POST['level']] : 1; |
|
| 523 | 523 | $criteria->add(new Criteria('level', $level)); |
| 524 | 524 | } |
| 525 | 525 | if (!empty($_POST['rank'])) { |
@@ -555,21 +555,21 @@ discard block |
||
| 555 | 555 | } else { |
| 556 | 556 | $query = trim($_POST['query']); |
| 557 | 557 | // Query with alias |
| 558 | - if (preg_match("/select[\s]+.*[\s]+from[\s]+(" . $xoopsDB->prefix('users') . "[\s]+as[\s]+(\S+).*)/i", $query, $matches)) { |
|
| 558 | + if (preg_match("/select[\s]+.*[\s]+from[\s]+(".$xoopsDB->prefix('users')."[\s]+as[\s]+(\S+).*)/i", $query, $matches)) { |
|
| 559 | 559 | $alias = $matches[2]; |
| 560 | 560 | $subquery = $matches[1]; |
| 561 | 561 | |
| 562 | 562 | // Query without alias |
| 563 | - } elseif (preg_match("/select[\s]+.*[\s]+from[\s]+(" . $xoopsDB->prefix('users') . "\b.*)/i", $query, $matches)) { |
|
| 563 | + } elseif (preg_match("/select[\s]+.*[\s]+from[\s]+(".$xoopsDB->prefix('users')."\b.*)/i", $query, $matches)) { |
|
| 564 | 564 | $alias = ''; |
| 565 | 565 | $subquery = $matches[1]; |
| 566 | 566 | |
| 567 | 567 | // Invalid query |
| 568 | 568 | } else { |
| 569 | - $query = 'SELECT * FROM ' . $xoopsDB->prefix('users'); |
|
| 569 | + $query = 'SELECT * FROM '.$xoopsDB->prefix('users'); |
|
| 570 | 570 | $subquery = $xoopsDB->prefix('users'); |
| 571 | 571 | } |
| 572 | - $sql_count = 'SELECT COUNT(DISTINCT ' . (empty($alias) ? '' : $alias . '.') . 'uid) FROM ' . $subquery; |
|
| 572 | + $sql_count = 'SELECT COUNT(DISTINCT '.(empty($alias) ? '' : $alias.'.').'uid) FROM '.$subquery; |
|
| 573 | 573 | $result = $xoopsDB->query($sql_count); |
| 574 | 574 | list($total) = $xoopsDB->FetchRow($result); |
| 575 | 575 | $result = $xoopsDB->query($query, $limit, $start); |
@@ -584,15 +584,15 @@ discard block |
||
| 584 | 584 | |
| 585 | 585 | echo $js_adduser = ' |
| 586 | 586 | <script type="text/javascript"> |
| 587 | - var multiple=' . (int)$_REQUEST['multiple'] . '; |
|
| 587 | + var multiple=' . (int)$_REQUEST['multiple'].'; |
|
| 588 | 588 | function addusers() |
| 589 | 589 | { |
| 590 | 590 | var sel_str = ""; |
| 591 | 591 | var num = 0; |
| 592 | - var mForm = document.forms["' . $name_form . '"]; |
|
| 592 | + var mForm = document.forms["' . $name_form.'"]; |
|
| 593 | 593 | for (var i=0;i!=mForm.elements.length;i++) { |
| 594 | 594 | var id=mForm.elements[i]; |
| 595 | - if ( ( (multiple > 0 && id.type == "checkbox") || (multiple == 0 && id.type == "radio") ) && (id.checked == true) && ( id.name == "' . $name_userid . '" ) ) { |
|
| 595 | + if ( ( (multiple > 0 && id.type == "checkbox") || (multiple == 0 && id.type == "radio") ) && (id.checked == true) && ( id.name == "' . $name_userid.'" ) ) { |
|
| 596 | 596 | var name = mForm.elements[++i]; |
| 597 | 597 | var len = id.value.length + name.value.length; |
| 598 | 598 | sel_str += len + ":" + id.value + ":" + name.value; |
@@ -600,12 +600,12 @@ discard block |
||
| 600 | 600 | } |
| 601 | 601 | } |
| 602 | 602 | if (num == 0) { |
| 603 | - alert("' . _MA_USER_NOUSERSELECTED . '"); |
|
| 603 | + alert("' . _MA_USER_NOUSERSELECTED.'"); |
|
| 604 | 604 | return false; |
| 605 | 605 | } |
| 606 | 606 | sel_str = num + ":" + sel_str; |
| 607 | 607 | window.opener.addusers(sel_str); |
| 608 | - alert("' . _MA_USER_USERADDED . '"); |
|
| 608 | + alert("' . _MA_USER_USERADDED.'"); |
|
| 609 | 609 | if (multiple == 0) { |
| 610 | 610 | window.close(); |
| 611 | 611 | window.opener.focus(); |
@@ -616,16 +616,16 @@ discard block |
||
| 616 | 616 | '; |
| 617 | 617 | |
| 618 | 618 | echo '</html><body>'; |
| 619 | - echo "<a href='findusers.php?target=" . htmlspecialchars(@$_POST['target'], ENT_QUOTES) . '&multiple=' . (int)(@$_POST['multiple']) . '&token=' . htmlspecialchars($token, ENT_QUOTES) . "'>" . _MA_USER_FINDUS . "</a> <span style='font-weight:bold;'>»</span> " . _MA_USER_RESULTS . '<br><br>'; |
|
| 619 | + echo "<a href='findusers.php?target=".htmlspecialchars(@$_POST['target'], ENT_QUOTES).'&multiple='.(int)(@$_POST['multiple']).'&token='.htmlspecialchars($token, ENT_QUOTES)."'>"._MA_USER_FINDUS."</a> <span style='font-weight:bold;'>»</span> "._MA_USER_RESULTS.'<br><br>'; |
|
| 620 | 620 | if (empty($start) && empty($foundusers)) { |
| 621 | - echo '<h4>' . _MA_USER_NOFOUND, '</h4>'; |
|
| 621 | + echo '<h4>'._MA_USER_NOFOUND, '</h4>'; |
|
| 622 | 622 | $hiddenform = "<form name='findnext' action='findusers.php' method='post'>"; |
| 623 | 623 | foreach ($_POST as $k => $v) { |
| 624 | 624 | if ($k === 'XOOPS_TOKEN_REQUEST') { |
| 625 | 625 | // regenerate token value |
| 626 | - $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML() . "\n"; |
|
| 626 | + $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML()."\n"; |
|
| 627 | 627 | } else { |
| 628 | - $hiddenform .= "<input type='hidden' name='" . htmlspecialchars($k, ENT_QUOTES) . "' value='" . htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES) . "' />\n"; |
|
| 628 | + $hiddenform .= "<input type='hidden' name='".htmlspecialchars($k, ENT_QUOTES)."' value='".htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES)."' />\n"; |
|
| 629 | 629 | } |
| 630 | 630 | } |
| 631 | 631 | if (!isset($_POST['limit'])) { |
@@ -634,15 +634,15 @@ discard block |
||
| 634 | 634 | if (!isset($_POST['start'])) { |
| 635 | 635 | $hiddenform .= "<input type='hidden' name='start' value='{$start}' />\n"; |
| 636 | 636 | } |
| 637 | - $hiddenform .= "<input type='hidden' name='token' value='" . htmlspecialchars($token, ENT_QUOTES) . "' />\n"; |
|
| 637 | + $hiddenform .= "<input type='hidden' name='token' value='".htmlspecialchars($token, ENT_QUOTES)."' />\n"; |
|
| 638 | 638 | $hiddenform .= '</form>'; |
| 639 | 639 | |
| 640 | - echo '<div>' . $hiddenform; |
|
| 641 | - echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>" . _MA_USER_SEARCHAGAIN . "</a>\n"; |
|
| 640 | + echo '<div>'.$hiddenform; |
|
| 641 | + echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>"._MA_USER_SEARCHAGAIN."</a>\n"; |
|
| 642 | 642 | echo '</div>'; |
| 643 | 643 | } elseif ($start < $total) { |
| 644 | 644 | if (!empty($total)) { |
| 645 | - echo sprintf(_MA_USER_USERSFOUND, $total) . '<br>'; |
|
| 645 | + echo sprintf(_MA_USER_USERSFOUND, $total).'<br>'; |
|
| 646 | 646 | } |
| 647 | 647 | if (!empty($foundusers)) { |
| 648 | 648 | echo "<form action='findusers.php' method='post' name='{$name_form}' id='{$name_form}'> |
@@ -653,11 +653,11 @@ discard block |
||
| 653 | 653 | echo "<input type='checkbox' name='memberslist_checkall' id='memberslist_checkall' onclick='xoopsCheckAll(\"{$name_form}\", \"memberslist_checkall\");' />"; |
| 654 | 654 | } |
| 655 | 655 | echo "</th> |
| 656 | - <th align='center'>" . _MA_USER_UNAME . "</th> |
|
| 657 | - <th align='center'>" . _MA_USER_REALNAME . "</th> |
|
| 658 | - <th align='center'>" . _MA_USER_REGDATE . "</th> |
|
| 659 | - <th align='center'>" . _MA_USER_LASTLOGIN . "</th> |
|
| 660 | - <th align='center'>" . _MA_USER_POSTS . '</th> |
|
| 656 | + <th align='center'>" . _MA_USER_UNAME."</th> |
|
| 657 | + <th align='center'>" . _MA_USER_REALNAME."</th> |
|
| 658 | + <th align='center'>" . _MA_USER_REGDATE."</th> |
|
| 659 | + <th align='center'>" . _MA_USER_LASTLOGIN."</th> |
|
| 660 | + <th align='center'>" . _MA_USER_POSTS.'</th> |
|
| 661 | 661 | </tr>'; |
| 662 | 662 | $ucount = 0; |
| 663 | 663 | foreach (array_keys($foundusers) as $j) { |
@@ -670,33 +670,33 @@ discard block |
||
| 670 | 670 | echo "<tr class='$class'> |
| 671 | 671 | <td align='center'>"; |
| 672 | 672 | if (!empty($_POST['multiple'])) { |
| 673 | - echo "<input type='checkbox' name='{$name_userid}' id='{$name_userid}' value='" . $foundusers[$j]->getVar('uid') . "' />"; |
|
| 674 | - echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='" . $foundusers[$j]->getVar('uname') . "' />"; |
|
| 673 | + echo "<input type='checkbox' name='{$name_userid}' id='{$name_userid}' value='".$foundusers[$j]->getVar('uid')."' />"; |
|
| 674 | + echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='".$foundusers[$j]->getVar('uname')."' />"; |
|
| 675 | 675 | } else { |
| 676 | - echo "<input type='radio' name='{$name_userid}' id='{$name_userid}' value='" . $foundusers[$j]->getVar('uid') . "' />"; |
|
| 677 | - echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='" . $foundusers[$j]->getVar('uname') . "' />"; |
|
| 676 | + echo "<input type='radio' name='{$name_userid}' id='{$name_userid}' value='".$foundusers[$j]->getVar('uid')."' />"; |
|
| 677 | + echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='".$foundusers[$j]->getVar('uname')."' />"; |
|
| 678 | 678 | } |
| 679 | 679 | echo "</td> |
| 680 | - <td><a href='" . XOOPS_URL . '/userinfo.php?uid=' . $foundusers[$j]->getVar('uid') . "' target='_blank'>" . $foundusers[$j]->getVar('uname') . '</a></td> |
|
| 681 | - <td>' . $fuser_name . "</td> |
|
| 682 | - <td align='center'>" . ($foundusers[$j]->getVar('user_regdate') ? date('Y-m-d', $foundusers[$j]->getVar('user_regdate')) : '') . "</td> |
|
| 683 | - <td align='center'>" . ($foundusers[$j]->getVar('last_login') ? date('Y-m-d H:i', $foundusers[$j]->getVar('last_login')) : '') . "</td> |
|
| 684 | - <td align='center'>" . $foundusers[$j]->getVar('posts') . '</td>'; |
|
| 680 | + <td><a href='" . XOOPS_URL.'/userinfo.php?uid='.$foundusers[$j]->getVar('uid')."' target='_blank'>".$foundusers[$j]->getVar('uname').'</a></td> |
|
| 681 | + <td>' . $fuser_name."</td> |
|
| 682 | + <td align='center'>" . ($foundusers[$j]->getVar('user_regdate') ? date('Y-m-d', $foundusers[$j]->getVar('user_regdate')) : '')."</td> |
|
| 683 | + <td align='center'>" . ($foundusers[$j]->getVar('last_login') ? date('Y-m-d H:i', $foundusers[$j]->getVar('last_login')) : '')."</td> |
|
| 684 | + <td align='center'>" . $foundusers[$j]->getVar('posts').'</td>'; |
|
| 685 | 685 | echo "</tr>\n"; |
| 686 | 686 | } |
| 687 | 687 | echo "<tr class='foot'><td colspan='6'>"; |
| 688 | 688 | |
| 689 | 689 | // placeholder for external applications |
| 690 | 690 | if (empty($_POST['target'])) { |
| 691 | - echo "<select name='fct'><option value='users'>" . _DELETE . "</option><option value='mailusers'>" . _MA_USER_SENDMAIL . '</option>'; |
|
| 691 | + echo "<select name='fct'><option value='users'>"._DELETE."</option><option value='mailusers'>"._MA_USER_SENDMAIL.'</option>'; |
|
| 692 | 692 | echo '</select> '; |
| 693 | - echo $GLOBALS['xoopsSecurity']->getTokenHTML() . "<input type='submit' value='" . _SUBMIT . "' />"; |
|
| 693 | + echo $GLOBALS['xoopsSecurity']->getTokenHTML()."<input type='submit' value='"._SUBMIT."' />"; |
|
| 694 | 694 | |
| 695 | 695 | // Add selected users |
| 696 | 696 | } else { |
| 697 | - echo "<input type='button' value='" . _MA_USER_ADD_SELECTED . "' onclick='addusers();' />"; |
|
| 697 | + echo "<input type='button' value='"._MA_USER_ADD_SELECTED."' onclick='addusers();' />"; |
|
| 698 | 698 | } |
| 699 | - echo "<input type='hidden' name='token' value='" . htmlspecialchars($token, ENT_QUOTES) . "' />\n"; |
|
| 699 | + echo "<input type='hidden' name='token' value='".htmlspecialchars($token, ENT_QUOTES)."' />\n"; |
|
| 700 | 700 | echo "</td></tr></table></form>\n"; |
| 701 | 701 | } |
| 702 | 702 | |
@@ -704,31 +704,31 @@ discard block |
||
| 704 | 704 | foreach ($_POST as $k => $v) { |
| 705 | 705 | if ($k === 'XOOPS_TOKEN_REQUEST') { |
| 706 | 706 | // regenerate token value |
| 707 | - $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML() . "\n"; |
|
| 707 | + $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML()."\n"; |
|
| 708 | 708 | } else { |
| 709 | - $hiddenform .= "<input type='hidden' name='" . htmlspecialchars($k, ENT_QUOTES) . "' value='" . htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES) . "' />\n"; |
|
| 709 | + $hiddenform .= "<input type='hidden' name='".htmlspecialchars($k, ENT_QUOTES)."' value='".htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES)."' />\n"; |
|
| 710 | 710 | } |
| 711 | 711 | } |
| 712 | 712 | if (!isset($_POST['limit'])) { |
| 713 | - $hiddenform .= "<input type='hidden' name='limit' value='" . $limit . "' />\n"; |
|
| 713 | + $hiddenform .= "<input type='hidden' name='limit' value='".$limit."' />\n"; |
|
| 714 | 714 | } |
| 715 | 715 | if (!isset($_POST['start'])) { |
| 716 | - $hiddenform .= "<input type='hidden' name='start' value='" . $start . "' />\n"; |
|
| 716 | + $hiddenform .= "<input type='hidden' name='start' value='".$start."' />\n"; |
|
| 717 | 717 | } |
| 718 | - $hiddenform .= "<input type='hidden' name='token' value='" . htmlspecialchars($token, ENT_QUOTES) . "' />\n"; |
|
| 718 | + $hiddenform .= "<input type='hidden' name='token' value='".htmlspecialchars($token, ENT_QUOTES)."' />\n"; |
|
| 719 | 719 | if (!isset($total) || ($totalpages = ceil($total / $limit)) > 1) { |
| 720 | 720 | $prev = $start - $limit; |
| 721 | 721 | if ($start - $limit >= 0) { |
| 722 | - $hiddenform .= "<a href='#0' onclick='document.findnext.start.value=" . $prev . ";document.findnext.submit();'>" . _MA_USER_PREVIOUS . "</a> \n"; |
|
| 722 | + $hiddenform .= "<a href='#0' onclick='document.findnext.start.value=".$prev.";document.findnext.submit();'>"._MA_USER_PREVIOUS."</a> \n"; |
|
| 723 | 723 | } |
| 724 | 724 | $counter = 1; |
| 725 | 725 | $currentpage = ($start + $limit) / $limit; |
| 726 | 726 | if (!isset($total)) { |
| 727 | 727 | while ($counter <= $currentpage) { |
| 728 | 728 | if ($counter == $currentpage) { |
| 729 | - $hiddenform .= '<strong>' . $counter . '</strong> '; |
|
| 729 | + $hiddenform .= '<strong>'.$counter.'</strong> '; |
|
| 730 | 730 | } elseif (($counter > $currentpage - 4 && $counter < $currentpage + 4) || $counter == 1) { |
| 731 | - $hiddenform .= "<a href='#" . $counter . "' onclick='document.findnext.start.value=" . ($counter - 1) * $limit . ";document.findnext.submit();'>" . $counter . '</a> '; |
|
| 731 | + $hiddenform .= "<a href='#".$counter."' onclick='document.findnext.start.value=".($counter - 1) * $limit.";document.findnext.submit();'>".$counter.'</a> '; |
|
| 732 | 732 | if ($counter == 1 && $currentpage > 5) { |
| 733 | 733 | $hiddenform .= '... '; |
| 734 | 734 | } |
@@ -738,12 +738,12 @@ discard block |
||
| 738 | 738 | } else { |
| 739 | 739 | while ($counter <= $totalpages) { |
| 740 | 740 | if ($counter == $currentpage) { |
| 741 | - $hiddenform .= '<strong>' . $counter . '</strong> '; |
|
| 741 | + $hiddenform .= '<strong>'.$counter.'</strong> '; |
|
| 742 | 742 | } elseif (($counter > $currentpage - 4 && $counter < $currentpage + 4) || $counter == 1 || $counter == $totalpages) { |
| 743 | 743 | if ($counter == $totalpages && $currentpage < $totalpages - 4) { |
| 744 | 744 | $hiddenform .= '... '; |
| 745 | 745 | } |
| 746 | - $hiddenform .= "<a href='#" . $counter . "' onclick='document.findnext.start.value=" . ($counter - 1) * $limit . ";document.findnext.submit();'>" . $counter . '</a> '; |
|
| 746 | + $hiddenform .= "<a href='#".$counter."' onclick='document.findnext.start.value=".($counter - 1) * $limit.";document.findnext.submit();'>".$counter.'</a> '; |
|
| 747 | 747 | if ($counter == 1 && $currentpage > 5) { |
| 748 | 748 | $hiddenform .= '... '; |
| 749 | 749 | } |
@@ -754,16 +754,16 @@ discard block |
||
| 754 | 754 | |
| 755 | 755 | $next = $start + $limit; |
| 756 | 756 | if ((isset($total) && $total > $next) || (!isset($total) && count($foundusers) >= $limit)) { |
| 757 | - $hiddenform .= " <a href='#" . $total . "' onclick='document.findnext.start.value=" . $next . ";document.findnext.submit();'>" . _MA_USER_NEXT . "</a>\n"; |
|
| 757 | + $hiddenform .= " <a href='#".$total."' onclick='document.findnext.start.value=".$next.";document.findnext.submit();'>"._MA_USER_NEXT."</a>\n"; |
|
| 758 | 758 | } |
| 759 | 759 | } |
| 760 | 760 | $hiddenform .= '</form>'; |
| 761 | 761 | |
| 762 | - echo '<div>' . $hiddenform; |
|
| 762 | + echo '<div>'.$hiddenform; |
|
| 763 | 763 | if (isset($total)) { |
| 764 | - echo '<br>' . sprintf(_MA_USER_USERSFOUND, $total) . ' '; |
|
| 764 | + echo '<br>'.sprintf(_MA_USER_USERSFOUND, $total).' '; |
|
| 765 | 765 | } |
| 766 | - echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>" . _MA_USER_SEARCHAGAIN . "</a>\n"; |
|
| 766 | + echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>"._MA_USER_SEARCHAGAIN."</a>\n"; |
|
| 767 | 767 | echo '</div>'; |
| 768 | 768 | } |
| 769 | 769 | } |
@@ -2,5 +2,5 @@ |
||
| 2 | 2 | // _LANGCODE: en |
| 3 | 3 | // _CHARSET : UTF-8 |
| 4 | 4 | // Translator: XOOPS Translation Team |
| 5 | -define('_XO_ER_FILENOTFOUND','Requested file: <b>%s</b> was not found '); |
|
| 6 | -define('_XO_ER_CLASSNOTFOUND','Requested class %s was not found'); |
|
| 5 | +define('_XO_ER_FILENOTFOUND', 'Requested file: <b>%s</b> was not found '); |
|
| 6 | +define('_XO_ER_CLASSNOTFOUND', 'Requested class %s was not found'); |
|