Vergleich modcp.php - 1.8.17 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 2587Zeile 2587
		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"yahoo" => $mybb->get_input('yahoo'),

 
		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

Zeile 2617Zeile 2616

// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);


// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);

	$errors = '';

	$errors = array();


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())

Zeile 2689Zeile 2688
					$string = $option['action']."_error";
$errors[] = $lang->$string;
}

					$string = $option['action']."_error";
$errors[] = $lang->$string;
}


if(!is_array($errors))

				else


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


Zeile 2700Zeile 2698
						if($suspend_length == "-1")
{
// Permanent ban on action

						if($suspend_length == "-1")
{
// Permanent ban on action

							$extra_user_updates[$option['update_length']] = 0;
}

							$extra_user_updates[$option['update_length']] = 0;
}

						elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

						elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

							$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;

							$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;

						}
}
elseif(!$user[$option['update_field']])

						}
}
elseif(!$user[$option['update_field']])

Zeile 2715Zeile 2713
						if($suspend_length == "-1")
{
$extra_user_updates[$option['update_length']] = 0;

						if($suspend_length == "-1")
{
$extra_user_updates[$option['update_length']] = 0;

						}

						}

						else
{
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;

						else
{
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;

Zeile 2728Zeile 2726
		// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting
if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])

		// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting
if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])

		{

		{

			$errors[] = $lang->suspendmoderate_error;
}


			$errors[] = $lang->suspendmoderate_error;
}


		if(is_array($errors))

		if(is_array($errors) && !empty($errors))

		{
$mybb->input['action'] = "editprofile";
}

		{
$mybb->input['action'] = "editprofile";
}

Zeile 2784Zeile 2782
	if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];

	if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];

	}


	}


	$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{

	$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{

Zeile 2822Zeile 2820
	}

// Sanitize all input

	}

// Sanitize all input

	foreach(array('usertitle', 'website', 'icq', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)

	foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)

	{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
}

	{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
}

Zeile 2842Zeile 2840
			if($title['posts'] <= $user['postnum'])
{
$defaulttitle = $title['title'];

			if($title['posts'] <= $user['postnum'])
{
$defaulttitle = $title['title'];

				break;
}

				break;
}

		}
}


		}
}


Zeile 2924Zeile 2922
			}

eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");

			}

eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");

		}

		}


$returndatemonthsel = array();
foreach(range(1, 12) as $month)


$returndatemonthsel = array();
foreach(range(1, 12) as $month)

Zeile 2980Zeile 2978
				}
}
else

				}
}
else

			{

			{

				$userfield = $user_fields[$field];
}
if($type == "multiselect")
{
if($errors)

				$userfield = $user_fields[$field];
}
if($type == "multiselect")
{
if($errors)

				{

				{

					$useropts = $userfield;

					$useropts = $userfield;

				}

				}

				else
{
$useropts = explode("\n", $userfield);

				else
{
$useropts = explode("\n", $userfield);

Zeile 2998Zeile 2996
					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

					}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);


					}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);


						$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{

						$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{

Zeile 3034Zeile 3032
						$val = trim($val);
$val = str_replace("\n", "\\n", $val);
$sel = "";

						$val = trim($val);
$val = str_replace("\n", "\\n", $val);
$sel = "";

						if($val == $userfield)
{

						if($val == $userfield)
{

							$sel = " selected=\"selected\"";
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

							$sel = " selected=\"selected\"";
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

					{

					{

						$profilefield['length'] = 1;
}


						$profilefield['length'] = 1;
}


Zeile 3063Zeile 3061
						}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");

						}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");

					}
}
}

					}
}
}

			elseif($type == "checkbox")
{
if($errors)

			elseif($type == "checkbox")
{
if($errors)

Zeile 3289Zeile 3287
	$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];

	$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];

	$user_yahoo = $mybb->input['yahoo'];

 

$plugins->run_hooks("modcp_editprofile_end");



$plugins->run_hooks("modcp_editprofile_end");


Zeile 3437Zeile 3434

$plugins->run_hooks("modcp_finduser_end");



$plugins->run_hooks("modcp_finduser_end");


	$username = $mybb->get_input('username');

	$username = htmlspecialchars_uni($mybb->get_input('username'));

	eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
output_page($finduser);
}

	eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
output_page($finduser);
}

Zeile 3510Zeile 3507
		$search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
$mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']);

		$search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
$mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']);

	}
else

	}
else

	{
$mybb->input['filter']['reason'] = '';
}

	{
$mybb->input['filter']['reason'] = '';
}

Zeile 3525Zeile 3522
		case "username":
$sortby = "u.username";
$sortbysel['username'] = ' selected="selected"';

		case "username":
$sortby = "u.username";
$sortbysel['username'] = ' selected="selected"';

			break;

			break;

		case "expires":
$sortby = "w.expires";
$sortbysel['expires'] = ' selected="selected"';

		case "expires":
$sortby = "w.expires";
$sortbysel['expires'] = ' selected="selected"';

			break;

			break;

		case "issuedby":
$sortby = "i.username";
$sortbysel['issuedby'] = ' selected="selected"';

		case "issuedby":
$sortby = "i.username";
$sortbysel['issuedby'] = ' selected="selected"';

Zeile 3539Zeile 3536
			$sortbysel['dateline'] = ' selected="selected"';
}
if(!isset($mybb->input['filter']['order']))

			$sortbysel['dateline'] = ' selected="selected"';
}
if(!isset($mybb->input['filter']['order']))

	{

	{

		$mybb->input['filter']['order'] = '';
}
$order = $mybb->input['filter']['order'];

		$mybb->input['filter']['order'] = '';
}
$order = $mybb->input['filter']['order'];

Zeile 3578Zeile 3575
		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

 
	$pages = ceil($total_warnings / $per_page);
if($page > $pages)
{
$start = 0;
$page = 1;
}

	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

Zeile 3651Zeile 3654
	if(!$warning_list)
{
eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";");

	if(!$warning_list)
{
eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";");

	}

	}


$plugins->run_hooks("modcp_warninglogs_end");

$filter_username = $mybb->input['filter']['username'];
$filter_modusername = $mybb->input['filter']['mod_username'];
$filter_reason = $mybb->input['filter']['reason'];


$plugins->run_hooks("modcp_warninglogs_end");

$filter_username = $mybb->input['filter']['username'];
$filter_modusername = $mybb->input['filter']['mod_username'];
$filter_reason = $mybb->input['filter']['reason'];





	eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";");
output_page($warninglogs);
}

	eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";");
output_page($warninglogs);
}





if($mybb->input['action'] == "ipsearch")
{
if($mybb->usergroup['canuseipsearch'] == 0)
{
error_no_permission();
}

if($mybb->input['action'] == "ipsearch")
{
if($mybb->usergroup['canuseipsearch'] == 0)
{
error_no_permission();
}





	add_breadcrumb($lang->mcp_nav_ipsearch, "modcp.php?action=ipsearch");

$mybb->input['ipaddress'] = $mybb->get_input('ipaddress');

	add_breadcrumb($lang->mcp_nav_ipsearch, "modcp.php?action=ipsearch");

$mybb->input['ipaddress'] = $mybb->get_input('ipaddress');

Zeile 3679Zeile 3682
		{
$groupscache = $cache->read("usergroups");
}

		{
$groupscache = $cache->read("usergroups");
}





		$ipaddressvalue = htmlspecialchars_uni($mybb->input['ipaddress']);

$ip_range = fetch_ip_range($mybb->input['ipaddress']);

		$ipaddressvalue = htmlspecialchars_uni($mybb->input['ipaddress']);

$ip_range = fetch_ip_range($mybb->input['ipaddress']);

Zeile 3733Zeile 3736
				if(!empty($onlyusfids))
{
$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";

				if(!empty($onlyusfids))
{
$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";

				}


				}


				// Moderators can view unapproved/deleted posts
if($mybb->usergroup['issupermod'] != 1)
{

				// Moderators can view unapproved/deleted posts
if($mybb->usergroup['issupermod'] != 1)
{

Zeile 3745Zeile 3748
					while($moderator = $db->fetch_array($query))
{
if($moderator['canviewunapprove'] == 1)

					while($moderator = $db->fetch_array($query))
{
if($moderator['canviewunapprove'] == 1)

						{

						{

							$unapprove_forums[] = $moderator['fid'];

							$unapprove_forums[] = $moderator['fid'];

						}


						}


						if($moderator['canviewdeleted'] == 1)
{
$deleted_forums[] = $moderator['fid'];

						if($moderator['canviewdeleted'] == 1)
{
$deleted_forums[] = $moderator['fid'];

Zeile 3762Zeile 3765
					if(!empty($deleted_forums))
{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";

					if(!empty($deleted_forums))
{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";

					}

					}

				}
else
{
// Super moderators (and admins)
$visible_sql = " AND p.visible >= -1";

				}
else
{
// Super moderators (and admins)
$visible_sql = " AND p.visible >= -1";

				}


				}


				$query = $db->query("
SELECT COUNT(p.pid) AS count
FROM ".TABLE_PREFIX."posts p

				$query = $db->query("
SELECT COUNT(p.pid) AS count
FROM ".TABLE_PREFIX."posts p

Zeile 3790Zeile 3793
					$user_ip_sql = "regip=".$db->escape_binary($ip_range)." OR lastip=".$db->escape_binary($ip_range);
}
else

					$user_ip_sql = "regip=".$db->escape_binary($ip_range)." OR lastip=".$db->escape_binary($ip_range);
}
else

				{

				{

					$user_ip_sql = "regip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1])." OR lastip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);
}

					$user_ip_sql = "regip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1])." OR lastip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);
}

			}

$plugins->run_hooks("modcp_ipsearch_users_start");


			}

$plugins->run_hooks("modcp_ipsearch_users_start");


			if($user_ip_sql)
{
$query = $db->simple_select('users', 'COUNT(uid) AS count', $user_ip_sql);

			if($user_ip_sql)
{
$query = $db->simple_select('users', 'COUNT(uid) AS count', $user_ip_sql);





				$user_results = $db->fetch_field($query, "count");
}

				$user_results = $db->fetch_field($query, "count");
}

		}

$total_results = $post_results+$user_results;


		}

$total_results = $post_results+$user_results;


		if(!$total_results)
{
$total_results = 1;

		if(!$total_results)
{
$total_results = 1;

		}

		}


// Now we have the result counts, paginate
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)
{
$perpage = $mybb->settings['threadsperpage'];


// Now we have the result counts, paginate
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)
{
$perpage = $mybb->settings['threadsperpage'];

		}


		}


		// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")
{

		// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")
{

Zeile 3873Zeile 3876
				$trow = alt_trow();
$ip = false;
if(is_array($ip_range))

				$trow = alt_trow();
$ip = false;
if(is_array($ip_range))

				{

				{

					if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");

					if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");

Zeile 3884Zeile 3887
						eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip']));
}

						eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip']));
}

				}

				}

				elseif($ipaddress['regip'] == $ip_range)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
}
elseif($ipaddress['lastip'] == $ip_range)

				elseif($ipaddress['regip'] == $ip_range)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
}
elseif($ipaddress['lastip'] == $ip_range)

				{

				{

					eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip']));

					eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip']));

				}

				}

				if($ip)
{
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
$result = true;
}
if($result)

				if($ip)
{
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
$result = true;
}
if($result)

				{

				{

					--$post_limit;
}
}

					--$post_limit;
}
}

Zeile 3956Zeile 3959
					if(!$ipaddress['username'])
{
$ipaddress['username'] = $ipaddress['postusername']; // Guest username support

					if(!$ipaddress['username'])
{
$ipaddress['username'] = $ipaddress['postusername']; // Guest username support

					}

					}

					$ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
$trow = alt_trow();
if(!$ipaddress['subject'])

					$ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
$trow = alt_trow();
if(!$ipaddress['subject'])

Zeile 4245Zeile 4248
	$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");


	$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");


	$cache->update_banned();

 
	$cache->update_moderators();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);


	$cache->update_moderators();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);


Zeile 4401Zeile 4403
			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");

			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");


$cache->update_banned();

 

// Log edit or add ban
if($existing_ban)


// Log edit or add ban
if($existing_ban)