File findusers.php
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Finds users
*
* @copyright The XOOPS project http://www.xoops.org/
Avoid deeply nested control flow statements. Open
if ($counter == 1 && $currentpage > 5) {
$hiddenform .= "... ";
}
Avoid deeply nested control flow statements. Open
if ($counter == $totalpages && $currentpage < $totalpages - 4) {
$hiddenform .= "... ";
}
Avoid deeply nested control flow statements. Open
if ($counter == 1 && $currentpage > 5) {
$hiddenform .= "... ";
}
Reference to undeclared constant \_NOPERM
Open
icms_core_Message::error(_NOPERM);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$url_text = new icms_form_elements_Text(_MA_USER_URLC, "url", 30, 100, $url);
- Exclude checks
Reference to undeclared constant \_MA_USER_LEVEL_INACTIVE
Open
2 => _MA_USER_LEVEL_INACTIVE,
- Exclude checks
Call to method addOptionArray
from undeclared class \icms_form_elements_Select
Open
$rank_select->addOptionArray($ranks);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($level_radio);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Select
Open
$order_select = new icms_form_elements_Select(_MA_USER_ORDER, "user_order", $user_order);
- Exclude checks
Reference to undeclared constant \_MA_USER_DESC
Open
"DESC" => _MA_USER_DESC));
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Hidden
Open
$form->addElement(new icms_form_elements_Hidden("token", $token));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item($var, $value . '%', 'LIKE'));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('user_occ', '%' . $user_occ . '%', 'LIKE'));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item($var, $time, '>='));
- Exclude checks
Call to method checkVarArray
from undeclared class \icms_core_DataFilter
Open
$clean_GET = icms_core_DataFilter::checkVarArray($_GET, $filter_get, true);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_elements_Tray
Open
$match_tray->addElement($text);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$less = new icms_form_elements_Text("", "{$var}_less", 10, 5, ${$var . '_less'});
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Tray
Open
$range_tray = new icms_form_elements_Tray($title, " - ");
- Exclude checks
Call to method addOptionArray
from undeclared class \icms_form_elements_Radio
Open
$avatar_radio->addOptionArray(array(
- Exclude checks
Reference to undeclared constant \_MA_USER_BOTH
Open
"both" => _MA_USER_BOTH));
- Exclude checks
Reference to undeclared constant \_MA_USER_RANK
Open
$rank_select = new icms_form_elements_Select(_MA_USER_RANK, 'rank', $rank);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($location_text);
- Exclude checks
Reference to undeclared constant \_MA_USER_UNAME
Open
"uname" => _MA_USER_UNAME,
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement(new icms_form_elements_Hidden("mode", $mode));
- Exclude checks
Reference to static property security
from undeclared class \icms
Open
if (icms::$security->validateToken($_REQUEST['token'], false)) {
- Exclude checks
Reference to undeclared constant \_MA_USER_SHOWMAILOK
Open
$mailok_radio = new icms_form_elements_Radio(_MA_USER_SHOWMAILOK, "user_mailok", empty($user_mailok) ? "both" : $user_mailok);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Radio
Open
$avatar_radio = new icms_form_elements_Radio(_MA_USER_HASAVATAR, "user_avatar", empty($user_avatar) ? "both" : $user_avatar);
- Exclude checks
Reference to undeclared constant \_YES
Open
"y" => _YES,
- Exclude checks
Call to method addOptionArray
from undeclared class \icms_form_elements_Select
Open
$group_select->addOptionArray($groups);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($group_select);
- Exclude checks
Reference to undeclared constant \_MA_USER_LASTLOGIN
Open
"last_login" => _MA_USER_LASTLOGIN,
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Hidden
Open
$form->addElement(new icms_form_elements_Hidden("target", $target));
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Hidden
Open
$form->addElement(new icms_form_elements_Hidden("multiple", $multiple));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item($var, $time, '<='));
- Exclude checks
null
passed to foreach instead of array Open
foreach ($_POST as $k => $v) {
- Exclude checks
Call to method checkVarArray
from undeclared class \icms_core_DataFilter
Open
$clean_POST = icms_core_DataFilter::checkVarArray($_POST, $filter_post, true);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Radio
Open
$mailok_radio = new icms_form_elements_Radio(_MA_USER_SHOWMAILOK, "user_mailok", empty($user_mailok) ? "both" : $user_mailok);
- Exclude checks
Call to method addOptionArray
from undeclared class \icms_form_elements_Radio
Open
$level_radio->addOptionArray($levels);
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item($var, '%' . $value . '%', 'LIKE'));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('posts', $posts_more, '<='));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('posts', $posts_less, '>='));
- Exclude checks
Reference to undeclared constant \_MA_USER_NOFOUND
Open
echo "<h4>" . _MA_USER_NOFOUND, "</h4>";
- Exclude checks
Call to method addElement
from undeclared class \icms_form_elements_Tray
Open
$range_tray->addElement($less);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Select
Open
$rank_select = new icms_form_elements_Select(_MA_USER_RANK, 'rank', $rank);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($url_text);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Select
Open
$sort_select = new icms_form_elements_Select(_MA_USER_SORT, "user_sort", $user_sort);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement(new icms_form_elements_Hidden("multiple", $multiple));
- Exclude checks
Call to method display
from undeclared class \icms_form_Theme
Open
$form->display();
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item($var, '%' . $value, 'LIKE'));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item("rank", ($rank)));
- Exclude checks
Reference to undeclared constant \_MA_USER_UNAME
Open
"uname" => _MA_USER_UNAME,
- Exclude checks
Reference to undeclared constant \_MA_USER_AIM
Open
"user_aim" => _MA_USER_AIM,
- Exclude checks
Reference to undeclared constant \_MA_USER_RANGE_LAST_LOGIN
Open
"last_login" => _MA_USER_RANGE_LAST_LOGIN,
- Exclude checks
Reference to undeclared constant \_MA_USER_MODE_SIMPLE
Open
FINDUSERS_MODE_SIMPLE => _MA_USER_MODE_SIMPLE,
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$text = new icms_form_elements_Text("", $var, 30, 100, ${$var});
- Exclude checks
Reference to undeclared constant \_MA_USER_POSTS
Open
"posts" => _MA_USER_POSTS));
- Exclude checks
Reference to undeclared constant \_MA_USER_ICQ
Open
"user_icq" => _MA_USER_ICQ,
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement(new icms_form_elements_Button("", "user_submit", _SUBMIT, "submit"));
- Exclude checks
Reference to undeclared constant \_MA_USER_YIM
Open
"user_yim" => _MA_USER_YIM,
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('user_mailok', 1));
- Exclude checks
Reference to undeclared constant \_MA_USER_MODE_ADVANCED
Open
FINDUSERS_MODE_ADVANCED => _MA_USER_MODE_ADVANCED);
- Exclude checks
Reference to undeclared constant \_MA_USER_OCCUPATION
Open
$occupation_text = new icms_form_elements_Text(_MA_USER_OCCUPATION, "user_occ", 30, 100, $user_occ);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($avatar_radio);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Tray
Open
$match_tray = new icms_form_elements_Tray($title, " ");
- Exclude checks
Reference to undeclared constant \_MA_USER_REGDATE
Open
"user_regdate" => _MA_USER_REGDATE,
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($order_select);
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item($var, $value));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('posts', $posts_less, '>='));
- Exclude checks
Call to method error
from undeclared class \icms_core_Message
Open
icms_core_Message::error(_NOPERM);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_select_Matchoption
Open
$match = new icms_form_elements_select_Matchoption("", "{$var}_match", ${$var . '_match'});
- Exclude checks
Reference to undeclared constant \_MA_USER_LEVEL
Open
$level_radio = new icms_form_elements_Radio(_MA_USER_LEVEL, "level", $level);
- Exclude checks
Reference to undeclared constant \_MA_USER_LEVEL_ACTIVE
Open
1 => _MA_USER_LEVEL_ACTIVE,
- Exclude checks
Reference to undeclared constant \_MA_USER_LEVEL_DISABLED
Open
3 => _MA_USER_LEVEL_DISABLED);
- Exclude checks
Reference to undeclared constant \_SUBMIT
Open
$form->addElement(new icms_form_elements_Button("", "user_submit", _SUBMIT, "submit"));
- Exclude checks
Call to method addSlashes
from undeclared class \icms_core_DataFilter
Open
$value = str_replace("_", "\\\_", icms_core_DataFilter::addSlashes(trim($$var)));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('url', $url . '%', 'LIKE'));
- Exclude checks
Reference to undeclared constant \_MA_USER_SENDMAIL
Open
echo "<select name='fct'><option value='users'>" . _DELETE . "</option><option value='mailusers'>" . _MA_USER_SENDMAIL . "</option>";
- Exclude checks
Reference to undeclared constant \_MA_USER_REALNAME
Open
"name" => _MA_USER_REALNAME,
- Exclude checks
Reference to undeclared constant \_MA_USER_EMAIL
Open
"email" => _MA_USER_EMAIL,
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Tray
Open
$match_tray = new icms_form_elements_Tray($title, " ");
- Exclude checks
Call to method addOptionArray
from undeclared class \icms_form_elements_Radio
Open
$mailok_radio->addOptionArray(array(
- Exclude checks
Reference to undeclared constant \_MA_USER_MAILOK
Open
"mailok" => _MA_USER_MAILOK,
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Select
Open
$group_select = new icms_form_elements_Select(_MA_USER_GROUP, 'groups', $groups, 3, true);
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
} elseif (is_object(icms::$user) && icms::$user->isAdmin()) {
- Exclude checks
Call to method addElement
from undeclared class \icms_form_elements_Tray
Open
$match_tray->addElement($text);
- Exclude checks
Reference to undeclared constant \_MA_USER_FINDUS
Open
$form = new icms_form_Theme(_MA_USER_FINDUS, "uesr_findform", "findusers.php", 'post', true);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($match_tray);
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$member_handler = icms::handler('icms_member');
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($occupation_text);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement(new icms_form_elements_Text(_MA_USER_LIMIT, "limit", 6, 6, empty($limit) ? 50 : $limit));
- Exclude checks
Call to method addElement
from undeclared class \icms_form_elements_Tray
Open
$match_tray->addElement($match);
- Exclude checks
Call to method addOptionArray
from undeclared class \icms_form_elements_Select
Open
$sort_select->addOptionArray(array(
- Exclude checks
Reference to undeclared constant \_MA_USER_ASC
Open
"ASC" => _MA_USER_ASC,
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement(new icms_form_elements_Hidden("target", $target));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item($var, $time, '>='));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('user_intrest', '%' . $user_intrest . '%', 'LIKE'));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('posts', $posts_more, '<='));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('user_avatar', "('', 'blank.gif')", 'NOT IN'));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('posts', $rank_obj->getVar("rank_min"), '>='));
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
if (!empty($_REQUEST['token']) && is_object(icms::$user)) {
- Exclude checks
Reference to undeclared constant \_MA_USER_RANGE_USER_REGDATE
Open
"user_regdate" => _MA_USER_RANGE_USER_REGDATE,
- Exclude checks
Reference to undeclared constant \_MA_USER_RANGE_POSTS
Open
"posts" => _MA_USER_RANGE_POSTS);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$location_text = new icms_form_elements_Text(_MA_USER_LOCATION, "user_from", 30, 100, $user_from);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$interest_text = new icms_form_elements_Text(_MA_USER_INTEREST, "user_intrest", 30, 100, $user_intrest);
- Exclude checks
Reference to undeclared constant \_MA_USER_MAILNG
Open
"mailng" => _MA_USER_MAILNG,
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($rank_select);
- Exclude checks
Reference to undeclared constant \_MA_USER_SORT
Open
$sort_select = new icms_form_elements_Select(_MA_USER_SORT, "user_sort", $user_sort);
- Exclude checks
Call to method addOptionArray
from undeclared class \icms_form_elements_Select
Open
$order_select->addOptionArray(array(
- Exclude checks
Reference to undeclared constant \_MA_USER_LIMIT
Open
$form->addElement(new icms_form_elements_Text(_MA_USER_LIMIT, "limit", 6, 6, empty($limit) ? 50 : $limit));
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement(new icms_form_elements_Hidden("token", $token));
- Exclude checks
Reference to undeclared constant \_MA_USER_INACTUS
Open
echo "(" . sprintf(_MA_USER_ACTUS, "<span style='color:#ff0000;'>$acttotal</span>") . " " . sprintf(_MA_USER_INACTUS, "<span style='color:#ff0000;'>$inacttotal</span>") . ")";
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('user_mailok', 0));
- Exclude checks
Reference to undeclared constant \_MA_USER_URLC
Open
$url_text = new icms_form_elements_Text(_MA_USER_URLC, "url", 30, 100, $url);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$text = new icms_form_elements_Text("", $var, 30, 100, ${$var});
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($sort_select);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$form->addElement(new icms_form_elements_Text(_MA_USER_LIMIT, "limit", 6, 6, empty($limit) ? 50 : $limit));
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Button
Open
$form->addElement(new icms_form_elements_Button("", "user_submit", _SUBMIT, "submit"));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$acttotal = $user_handler->getUserCountByGroupLink(array(), new icms_db_criteria_Item('level', 0, '>'));
- Exclude checks
Reference to undeclared constant \_MA_USER_ACTUS
Open
echo "(" . sprintf(_MA_USER_ACTUS, "<span style='color:#ff0000;'>$acttotal</span>") . " " . sprintf(_MA_USER_INACTUS, "<span style='color:#ff0000;'>$inacttotal</span>") . ")";
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Compo
Open
$criteria = new icms_db_criteria_Compo();
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item($var, $time, '<='));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item("level", $level));
- Exclude checks
Reference to undeclared constant \_MA_USER_MSNM
Open
"user_msnm" => _MA_USER_MSNM);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Radio
Open
$level_radio = new icms_form_elements_Radio(_MA_USER_LEVEL, "level", $level);
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item($var, '%' . $value, 'LIKE'));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item($var, $value));
- Exclude checks
Reference to undeclared constant \_MA_USER_ADD_SELECTED
Open
echo "<input type='button' value='" . _MA_USER_ADD_SELECTED . "' onclick='addusers();' />";
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$user_handler = icms::handler("icms_member");
- Exclude checks
Call to method addElement
from undeclared class \icms_form_elements_Tray
Open
$match_tray->addElement($match);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($match_tray);
- Exclude checks
Reference to undeclared constant \_MA_USER_INTEREST
Open
$interest_text = new icms_form_elements_Text(_MA_USER_INTEREST, "user_intrest", 30, 100, $user_intrest);
- Exclude checks
Reference to undeclared constant \_NO
Open
"n" => _NO,
- Exclude checks
Reference to undeclared constant \_ALL
Open
0 => _ALL,
- Exclude checks
Reference to undeclared constant \_ALL
Open
$ranks[0] = _ALL;
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($interest_text);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_select_Matchoption
Open
$match = new icms_form_elements_select_Matchoption("", "{$var}_match", ${$var . '_match'});
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$inacttotal = $user_handler->getUserCountByGroupLink(array(), new icms_db_criteria_Item('level', 0, '<='));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item($var, '%' . $value . '%', 'LIKE'));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('url', $url . '%', 'LIKE'));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('user_intrest', '%' . $user_intrest . '%', 'LIKE'));
- Exclude checks
Reference to undeclared constant \_MA_USER_USERSFOUND
Open
echo sprintf(_MA_USER_USERSFOUND, $total) . "<br />";
- Exclude checks
Call to method addElement
from undeclared class \icms_form_elements_Tray
Open
$range_tray->addElement($more);
- Exclude checks
Reference to undeclared constant \_MA_USER_GROUP
Open
$group_select = new icms_form_elements_Select(_MA_USER_GROUP, 'groups', $groups, 3, true);
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($mailok_radio);
- Exclude checks
Reference to undeclared constant \_MA_USER_FINDUS
Open
echo "<h2 style='text-align:" . _GLOBAL_LEFT . ";'>" . _MA_USER_FINDUS . " - " . $modes[$mode] . "</h2>";
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item($var, $value . '%', 'LIKE'));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('user_from', '%' . $user_from . '%', 'LIKE'));
- Exclude checks
Reference to undeclared constant \_MA_USER_REGDATE
Open
<th align='center'>" . _MA_USER_REGDATE . "</th>
- Exclude checks
Reference to undeclared constant \_DELETE
Open
echo "<select name='fct'><option value='users'>" . _DELETE . "</option><option value='mailusers'>" . _MA_USER_SENDMAIL . "</option>";
- Exclude checks
Reference to undeclared constant \_SUBMIT
Open
echo icms::$security->getTokenHTML() . "<input type='submit' value='" . _SUBMIT . "' />";
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('user_avatar', "('', 'blank.gif')", 'IN'));
- Exclude checks
Call to method setOrder
from undeclared class \icms_db_criteria_Compo
Open
$criteria->setOrder($order);
- Exclude checks
Reference to undeclared constant \_MA_USER_POSTS
Open
<th align='center'>" . _MA_USER_POSTS . "</th>
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('user_mailok', 1));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('posts', $rank_obj->getVar("rank_max"), '<='));
- Exclude checks
Reference to static property security
from undeclared class \icms
Open
$hiddenform .= icms::$security->getTokenHTML() . "\n";
- Exclude checks
Call to method setSort
from undeclared class \icms_db_criteria_Compo
Open
$criteria->setSort($sort);
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('user_mailok', 0));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item("rank", ($rank)));
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
$hiddenform .= "<input type='hidden' name='start' value='{$start}' />\n";
- Exclude checks
Call to method stripSlashesGPC
from undeclared class \icms_core_DataFilter
Open
$hiddenform .= "<input type='hidden' name='" . htmlSpecialChars($k, ENT_QUOTES) . "' value='" . htmlSpecialChars(icms_core_DataFilter::stripSlashesGPC($v), ENT_QUOTES) . "' />\n";
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('user_avatar', "('', 'blank.gif')", 'IN'));
- Exclude checks
Reference to undeclared constant \_MA_USER_UNAME
Open
<th align='center'>" . _MA_USER_UNAME . "</th>
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('posts', $rank_obj->getVar("rank_max"), '<='));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('posts', $rank_obj->getVar("rank_min"), '>='));
- Exclude checks
Reference to undeclared constant \_MA_USER_REALNAME
Open
<th align='center'>" . _MA_USER_REALNAME . "</th>
- Exclude checks
Call to method setLimit
from undeclared class \icms_db_criteria_Compo
Open
$criteria->setLimit($limit);
- Exclude checks
Reference to undeclared constant \_MA_USER_LASTLOGIN
Open
<th align='center'>" . _MA_USER_LASTLOGIN . "</th>
- Exclude checks
Call to method stripSlashesGPC
from undeclared class \icms_core_DataFilter
Open
$hiddenform .= "<input type='hidden' name='" . htmlSpecialChars($k, ENT_QUOTES) . "' value='" . htmlSpecialChars(icms_core_DataFilter::stripSlashesGPC($v), ENT_QUOTES) . "' />\n";
- Exclude checks
Call to method setStart
from undeclared class \icms_db_criteria_Compo
Open
$criteria->setStart($start);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
$hiddenform .= "<input type='hidden' name='limit' value='{$limit}' />\n";
- Exclude checks
Reference to undeclared constant \_MA_USER_SEARCHAGAIN
Open
echo "<a href='#' onclick='javascript:document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>" . _MA_USER_SEARCHAGAIN . "</a>\n";
- Exclude checks
Reference to undeclared constant \_MA_USER_NEXT
Open
$hiddenform .= " <a href='#" . $total . "' onclick='javascript:document.findnext.start.value=" . $next . ";document.findnext.submit();'>" . _MA_USER_NEXT . "</a>\n";
- Exclude checks
Reference to undeclared constant \_MA_USER_USERSFOUND
Open
echo "<br />" . sprintf(_MA_USER_USERSFOUND, $total) . " ";
- Exclude checks
Reference to undeclared constant \_MA_USER_PREVIOUS
Open
$hiddenform .= "<a href='#0' onclick='javascript:document.findnext.start.value=" . $prev . ";document.findnext.submit();'>" . _MA_USER_PREVIOUS . "</a> \n";
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('user_avatar', "('', 'blank.gif')", 'NOT IN'));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item("level", $level));
- Exclude checks
Reference to undeclared constant \_MA_USER_FINDUS
Open
echo "<a href='findusers.php?target=" . htmlspecialchars($target, ENT_QUOTES) . "&multiple=" . (int) $multiple . "&token=" . htmlspecialchars($token, ENT_QUOTES) . "'>" . _MA_USER_FINDUS . "</a> <span style='font-weight:bold;'>»»</span> " . _MA_USER_RESULTS . "<br /><br />";
- Exclude checks
Reference to undeclared constant \_MA_USER_RESULTS
Open
echo "<a href='findusers.php?target=" . htmlspecialchars($target, ENT_QUOTES) . "&multiple=" . (int) $multiple . "&token=" . htmlspecialchars($token, ENT_QUOTES) . "'>" . _MA_USER_FINDUS . "</a> <span style='font-weight:bold;'>»»</span> " . _MA_USER_RESULTS . "<br /><br />";
- Exclude checks
Reference to static property security
from undeclared class \icms
Open
$hiddenform .= icms::$security->getTokenHTML() . "\n";
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
$hiddenform .= "<input type='hidden' name='limit' value='" . $limit . "' />\n";
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
$hiddenform .= "<input type='hidden' name='start' value='" . $start . "' />\n";
- Exclude checks
Reference to undeclared constant \_MA_USER_USERADDED
Open
alert("' . _MA_USER_USERADDED . '");
- Exclude checks
Reference to static property security
from undeclared class \icms
Open
echo icms::$security->getTokenHTML() . "<input type='submit' value='" . _SUBMIT . "' />";
- Exclude checks
Reference to undeclared constant \_MA_USER_SEARCHAGAIN
Open
echo "<a href='#' onclick='javascript:document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>" . _MA_USER_SEARCHAGAIN . "</a>\n";
- Exclude checks
Reference to undeclared constant \_SHORTDATESTRING
Open
<td align='center'>" . ($foundusers[$j]->getVar("user_regdate") ? date(_SHORTDATESTRING, $foundusers[$j]->getVar("user_regdate")) : "") . "</td>
- Exclude checks
Call to method __construct
from undeclared class \icms_form_Theme
Open
$form = new icms_form_Theme(_MA_USER_FINDUS, "uesr_findform", "findusers.php", 'post', true);
- Exclude checks
Reference to undeclared constant \_MA_USER_LOCATION
Open
$location_text = new icms_form_elements_Text(_MA_USER_LOCATION, "user_from", 30, 100, $user_from);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$occupation_text = new icms_form_elements_Text(_MA_USER_OCCUPATION, "user_occ", 30, 100, $user_occ);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Text
Open
$more = new icms_form_elements_Text("", "{$var}_more", 10, 5, ${$var . '_more'});
- Exclude checks
Call to method addElement
from undeclared class \icms_form_Theme
Open
$form->addElement($range_tray);
- Exclude checks
Reference to undeclared constant \_MA_USER_BOTH
Open
"both" => _MA_USER_BOTH));
- Exclude checks
Reference to undeclared constant \_MA_USER_HASAVATAR
Open
$avatar_radio = new icms_form_elements_Radio(_MA_USER_HASAVATAR, "user_avatar", empty($user_avatar) ? "both" : $user_avatar);
- Exclude checks
Reference to undeclared constant \_MA_USER_ORDER
Open
$order_select = new icms_form_elements_Select(_MA_USER_ORDER, "user_order", $user_order);
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Hidden
Open
$form->addElement(new icms_form_elements_Hidden("mode", $mode));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('user_from', '%' . $user_from . '%', 'LIKE'));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('user_occ', '%' . $user_occ . '%', 'LIKE'));
- Exclude checks
Reference to undeclared constant \_MA_USER_NOUSERSELECTED
Open
alert("' . _MA_USER_NOUSERSELECTED . '");
- Exclude checks
null
passed to foreach instead of array Open
foreach ($_POST as $k => $v) {
- Exclude checks
Reference to undeclared constant \_MEDIUMDATESTRING
Open
<td align='center'>" . ($foundusers[$j]->getVar("last_login") ? date(_MEDIUMDATESTRING, $foundusers[$j]->getVar("last_login")) : "") . "</td>
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
$hiddenform .= " <a href='#" . $total . "' onclick='javascript:document.findnext.start.value=" . $next . ";document.findnext.submit();'>" . _MA_USER_NEXT . "</a>\n";
- Exclude checks
Identical blocks of code found in 2 locations. Consider refactoring. Open
while ($counter <= $totalpages) {
if ($counter == $currentpage) {
$hiddenform .= "<strong>" . $counter . "</strong> ";
} elseif (($counter > $currentpage - 4 && $counter < $currentpage + 4) || $counter == 1 || $counter == $totalpages) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 168.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
foreach ($_POST as $k => $v) {
if ($k == 'XOOPS_TOKEN_REQUEST') {
// regenerate token value
$hiddenform .= icms::$security->getTokenHTML() . "\n";
} else {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 93.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
foreach ($_POST as $k => $v) {
if ($k == 'XOOPS_TOKEN_REQUEST') {
// regenerate token value
$hiddenform .= icms::$security->getTokenHTML() . "\n";
} else {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 93.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Blank line found at start of control structure Open
if (empty($user_submit)) {
- Exclude checks
Blank line found at start of control structure Open
if ($counter == $currentpage) {
- Exclude checks
Blank line found at start of control structure Open
if (!isset($total)) {
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
- Exclude checks
Blank line found at start of control structure Open
if ($counter == $currentpage) {
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
xoops_footer();
- Exclude checks
Blank line found at start of control structure Open
} else {
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Inline control structures are not allowed Open
if (isset($_GET['filter_post'])) unset($_GET['filter_post']);
- Exclude checks
Inline control structures are not allowed Open
if ($mode == $_mode) continue;
- Exclude checks
Unexpected trailing spaces found. Open
- Exclude checks
Unexpected spaces found. Open
- Exclude checks