Vergleich modcp.php - 1.4.4 - 1.4.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: modcp.php 4267 2008-11-10 21:28:36Z Tikitiki $

 * $Id: modcp.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 439Zeile 439
	while($logitem = $db->fetch_array($query))
{
$information = '';

	while($logitem = $db->fetch_array($query))
{
$information = '';

 
		$logitem['action'] = htmlspecialchars_uni($logitem['action']);

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();

Zeile 490Zeile 491
		$user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";
}


		$user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";
}


	$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, '', "fid");

	$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");


eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);


eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);

Zeile 688Zeile 689
	}
else
{

	}
else
{

		// Note: dates are not in user's timezone

		// Note: dates are in GMT timezone

		$starttime_time = gmdate("g:i a", TIME_NOW);
$endtime_time = gmdate("g:i a", TIME_NOW);
$startday = $endday = gmdate("j", TIME_NOW);

		$starttime_time = gmdate("g:i a", TIME_NOW);
$endtime_time = gmdate("g:i a", TIME_NOW);
$startday = $endday = gmdate("j", TIME_NOW);

Zeile 970Zeile 971
	}
else
{

	}
else
{

		// Note: dates are in user's timezone
$starttime_time = my_date('g:i a', $announcement['startdate']);
$endtime_time = my_date('g:i a', $announcement['enddate']);

		// Note: dates are in GMT timezone
$starttime_time = gmdate('g:i a', $announcement['startdate']);
$endtime_time = gmdate('g:i a', $announcement['enddate']);





		$startday = my_date('j', $announcement['startdate']);
$endday = my_date('j', $announcement['enddate']);

		$startday = gmdate('j', $announcement['startdate']);
$endday = gmdate('j', $announcement['enddate']);





		$startmonth = my_date('m', $announcement['startdate']);
$endmonth = my_date('m', $announcement['enddate']);

		$startmonth = gmdate('m', $announcement['startdate']);
$endmonth = gmdate('m', $announcement['enddate']);





		$startdateyear = my_date('Y', $announcement['startdate']);
$enddateyear = my_date('Y', $announcement['enddate']);

		$startdateyear = gmdate('Y', $announcement['startdate']);
$enddateyear = gmdate('Y', $announcement['enddate']);


$errored = false;
}


$errored = false;
}

Zeile 1175Zeile 1176
		{
$moderation->approve_threads($threads_to_approve);
}

		{
$moderation->approve_threads($threads_to_approve);
}

 
		log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads);

		redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated);
}
else if(is_array($mybb->input['posts']))

		redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated);
}
else if(is_array($mybb->input['posts']))

Zeile 1197Zeile 1199
		{
$moderation->approve_posts($posts_to_approve);
}

		{
$moderation->approve_posts($posts_to_approve);
}

 
		log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);

		redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated);
}
else if(is_array($mybb->input['attachments']))

		redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated);
}
else if(is_array($mybb->input['attachments']))

Zeile 1641Zeile 1644
	}
else
{

	}
else
{

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

$displaygroupfields = array(
"usertitle"
);

		$display_group = usergroup_displaygroup($user['displaygroup']);
$defaulttitle = $display_group['usertitle'];

		$display_group = usergroup_displaygroup($user['displaygroup']);
$defaulttitle = $display_group['usertitle'];

	}

	}

	if(empty($user['usertitle']))
{
$lang->current_custom_usertitle = '';

	if(empty($user['usertitle']))
{
$lang->current_custom_usertitle = '';

Zeile 1651Zeile 1662

$bdaysel = '';
for($i = 1; $i <= 31; ++$i)


$bdaysel = '';
for($i = 1; $i <= 31; ++$i)

	{

	{

		if($mybb->input['birthday_day'] == $i)

		if($mybb->input['birthday_day'] == $i)

		{

		{

			$bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";

			$bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";

		}

		}

		else
{
$bdaydaysel .= "<option value=\"$i\">$i</option>\n";
}
}

		else
{
$bdaydaysel .= "<option value=\"$i\">$i</option>\n";
}
}

	$bdaymonthsel[$mybb->input['birthday_month']] = "selected";


	$bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';



// Fetch profile fields
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");


// Fetch profile fields
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");

Zeile 1720Zeile 1731
					}
$select .= "<option value=\"$val\"$sel>$val</option>\n";
}

					}
$select .= "<option value=\"$val\"$sel>$val</option>\n";
}

				if(!$profilefield['length'])
{
$profilefield['length'] = 3;
}

				if(!$profilefield['length'])
{
$profilefield['length'] = 3;
}

				$code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
}
}
elseif($type == "select")

				$code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
}
}
elseif($type == "select")

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

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

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

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

Zeile 1751Zeile 1762
			}
}
elseif($type == "radio")

			}
}
elseif($type == "radio")

		{
$expoptions = explode("\n", $options);
if(is_array($expoptions))

		{
$expoptions = explode("\n", $options);
if(is_array($expoptions))

			{
foreach($expoptions as $key => $val)
{

			{
foreach($expoptions as $key => $val)
{

Zeile 1763Zeile 1774
						$checked = " checked=\"checked\"";
}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

						$checked = " checked=\"checked\"";
}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

				}

				}

			}
}
elseif($type == "checkbox")

			}
}
elseif($type == "checkbox")

Zeile 1773Zeile 1784
				$useropts = $userfield;
}
else

				$useropts = $userfield;
}
else

			{

			{

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

Zeile 1801Zeile 1812
		{
$value = htmlspecialchars_uni($userfield);
$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";

		{
$value = htmlspecialchars_uni($userfield);
$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";

		}
else

		}
else

		{
$value = htmlspecialchars_uni($userfield);

		{
$value = htmlspecialchars_uni($userfield);

			$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";






			$maxlength = "";
if($profilefield['maxlength'] > 0)
{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}
$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";

		}
if($profilefield['required'] == 1)
{

		}
if($profilefield['required'] == 1)
{

Zeile 1963Zeile 1979
		{
$user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['username'] = htmlspecialchars_uni($user['username']);

		{
$user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['username'] = htmlspecialchars_uni($user['username']);

		}
}

		}
}

	if($mybb->input['filter']['mod_username'])
{
$search['mod_username'] = $db->escape_string($mybb->input['filter']['mod_username']);

	if($mybb->input['filter']['mod_username'])
{
$search['mod_username'] = $db->escape_string($mybb->input['filter']['mod_username']);

Zeile 1994Zeile 2010
		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"';

Zeile 2034Zeile 2050
	if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
{
$page = intval($mybb->input['page']);

	if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
{
$page = intval($mybb->input['page']);

	}

	}

	$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && intval($mybb->input['filter']['per_page']) > 0)
{

	$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && intval($mybb->input['filter']['per_page']) > 0)
{

Zeile 2044Zeile 2060
	// 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']))

	{

	{

		foreach($mybb->input['filter'] as $field => $value)
{
$value = urlencode($value);

		foreach($mybb->input['filter'] as $field => $value)
{
$value = urlencode($value);

Zeile 2105Zeile 2121
		{
$points = '+'.$row['points'];
}

		{
$points = '+'.$row['points'];
}





		eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");
}


		eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");
}


Zeile 2125Zeile 2141
	if($mybb->input['ipaddress'])
{
if(!is_array($groupscache))

	if($mybb->input['ipaddress'])
{
if(!is_array($groupscache))

		{

		{

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


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


Zeile 2225Zeile 2241
			$page = 1;
}


			$page = 1;
}


		$page_url = "modcp.php?action=ipsearch&amp;perpage={$perpage}&amp;ipaddress={$mybb->input['ipaddress']}";

		$page_url = "modcp.php?action=ipsearch&amp;perpage={$perpage}";

		foreach(array('ipaddress', 'search_users', 'search_posts') as $input)
{
if(!$mybb->input[$input]) continue;

		foreach(array('ipaddress', 'search_users', 'search_posts') as $input)
{
if(!$mybb->input[$input]) continue;

Zeile 2276Zeile 2292
		if($total_results > $user_results && $post_limit)
{
$post_start = $start-$user_results;

		if($total_results > $user_results && $post_limit)
{
$post_start = $start-$user_results;

			if($post_start < 0) $post_start = 0;




			if($post_start < 0)
{
$post_start = 0;
}

		}
if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0)))
{

		}
if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0)))
{

 
			$ipaddresses = $tids = $uids = array();

			$query = $db->query("

			$query = $db->query("

				SELECT p.username AS postusername, p.uid, u.username, p.subject, p.pid, p.tid, p.ipaddress, t.subject AS threadsubject
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON(p.uid=u.uid)

				SELECT username AS postusername, uid, subject, pid, tid, ipaddress
FROM ".TABLE_PREFIX."posts



				WHERE {$post_ip_sql}

				WHERE {$post_ip_sql}

				ORDER BY p.dateline DESC

				ORDER BY dateline DESC

				LIMIT {$post_start}, {$post_limit}
");
while($ipaddress = $db->fetch_array($query))
{

				LIMIT {$post_start}, {$post_limit}
");
while($ipaddress = $db->fetch_array($query))
{

				$ip = $ipaddress['ipaddress'];
if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support
$trow = alt_trow();
if(!$ipaddress['subject'])






				$tids[$ipaddress['tid']] = $ipaddress['pid'];
$uids[$ipaddress['uid']] = $ipaddress['pid'];
$ipaddresses[$ipaddress['pid']] = $ipaddress;
}

if(!empty($ipaddresses))
{
$query = $db->simple_select("threads", "subject, tid", "tid IN(".implode(',', array_keys($tids)).")");
while($thread = $db->fetch_array($query))

				{

				{

					$ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}";






















					$ipaddresses[$tids[$thread['tid']]]['threadsubject'] = $thread['subject'];
}
unset($tids);

$query = $db->simple_select("users", "username, uid", "uid IN(".implode(',', array_keys($uids)).")");
while($user = $db->fetch_array($query))
{
$ipaddresses[$uids[$user['uid']]]['username'] = $user['username'];
}
unset($uids);

foreach($ipaddresses as $ipaddress)
{
$ip = $ipaddress['ipaddress'];
if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support
$trow = alt_trow();
if(!$ipaddress['subject'])
{
$ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}";
}
$subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']);
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");

				}

				}

				$subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']);
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");

 
			}
}


			}
}


Zeile 2659Zeile 2701
	if($mybb->input['uid'])
{
$query = $db->query("

	if($mybb->input['uid'])
{
$query = $db->query("

			SELECT b.*, u.username

			SELECT b.*, u.username, u.uid

			FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
WHERE b.uid='{$mybb->input['uid']}'

			FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
WHERE b.uid='{$mybb->input['uid']}'

Zeile 2670Zeile 2712
			$username = htmlspecialchars_uni($banned['username']);
$banreason = htmlspecialchars_uni($banned['reason']);
$uid = $mybb->input['uid'];

			$username = htmlspecialchars_uni($banned['username']);
$banreason = htmlspecialchars_uni($banned['reason']);
$uid = $mybb->input['uid'];

 
			$user = get_user($banned['uid']);

			$lang->ban_user = $lang->edit_ban; // Swap over lang variables
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}

			$lang->ban_user = $lang->edit_ban; // Swap over lang variables
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}

Zeile 2866Zeile 2909
	while($logitem = $db->fetch_array($query))
{
$information = '';

	while($logitem = $db->fetch_array($query))
{
$information = '';

 
		$logitem['action'] = htmlspecialchars_uni($logitem['action']);

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();