Vergleich modcp.php - 1.4.2 - 1.4.4

  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 4184 2008-09-10 04:40:17Z Tikitiki $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 20Zeile 20
$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special";
$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields";
$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs";

$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special";
$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields";
$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs";

$templatelist .= ",modcp_warninglogs";

$templatelist .= ",modcp_warninglogs,modcp_modlogs_result";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_user.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_user.php";

Zeile 50Zeile 50
	while($forum = $db->fetch_array($query))
{
$flist .= ",'{$forum['fid']}'";

	while($forum = $db->fetch_array($query))
{
$flist .= ",'{$forum['fid']}'";

 
		
$children = get_child_list($forum['fid']);
if(!empty($children))
{
$flist .= ",'".implode("','", $children)."'";
}

		$moderated_forums[] = $forum['fid'];
}
if($flist)

		$moderated_forums[] = $forum['fid'];
}
if($flist)

Zeile 62Zeile 68
{
$flist = $tflist = '';
}

{
$flist = $tflist = '';
}





// Fetch the Mod CP menu
eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");

$plugins->run_hooks("modcp_start");

// Fetch the Mod CP menu
eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");

$plugins->run_hooks("modcp_start");





// Make navigation
add_breadcrumb($lang->nav_modcp, "modcp.php");


// Make navigation
add_breadcrumb($lang->nav_modcp, "modcp.php");


Zeile 129Zeile 135
	$postcount = intval($report_count);
$pages = $postcount / $perpage;
$pages = ceil($pages);

	$postcount = intval($report_count);
$pages = $postcount / $perpage;
$pages = ceil($pages);










if($mybb->input['page'] == "last")
{


if($mybb->input['page'] == "last")
{

Zeile 216Zeile 221

// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];


// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];

	if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);

	if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);

	}

$query = $db->simple_select("reportedposts", "COUNT(rid) AS count");

	}

$query = $db->simple_select("reportedposts", "COUNT(rid) AS count");

Zeile 336Zeile 341
	add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");

$perpage = intval($mybb->input['perpage']);

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

$perpage = intval($mybb->input['perpage']);

	if(!$perpage || $pagepage <= 0)

	if(!$perpage || $perpage <= 0)

	{
$perpage = $mybb->settings['threadsperpage'];
}

	{
$perpage = $mybb->settings['threadsperpage'];
}

Zeile 533Zeile 538
}

if($mybb->input['action'] == "do_new_announcement")

}

if($mybb->input['action'] == "do_new_announcement")

{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))
{
error_no_permission();
}

if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;
}

if(!trim($mybb->input['message']))
{
$errors[] = $lang->error_missing_message;
}

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;
}

$startdate = @explode(" ", $mybb->input['starttime_time']);

{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))
{
error_no_permission();
}

if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;
}

if(!trim($mybb->input['message']))
{
$errors[] = $lang->error_missing_message;
}

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;
}

$startdate = @explode(" ", $mybb->input['starttime_time']);

	$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);
$enddate = @explode(":", $enddate[0]);

	$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);
$enddate = @explode(":", $enddate[0]);





	if(stristr($mybb->input['starttime_time'], "pm"))

	if(stristr($mybb->input['starttime_time'], "pm"))

	{

	{

		$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)
{

		$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)
{

Zeile 572Zeile 577
	}

if(stristr($mybb->input['endtime_time'], "pm"))

	}

if(stristr($mybb->input['endtime_time'], "pm"))

	{

	{

		$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{
$enddate[0] = "00";
}

		$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{
$enddate[0] = "00";
}

	}


	}


	$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');			
if(!in_array($mybb->input['starttime_month'], $months))
{

	$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');			
if(!in_array($mybb->input['starttime_month'], $months))
{

Zeile 591Zeile 596
	if($startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	if($startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	}


	}


	if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';

	if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';

Zeile 600Zeile 605
	else
{
if(!in_array($mybb->input['endtime_month'], $months))

	else
{
if(!in_array($mybb->input['endtime_month'], $months))

		{

		{

			$mybb->input['endtime_month'] = 1;

			$mybb->input['endtime_month'] = 1;

		}

		}

		$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if($enddate < 0 || $enddate == false)
{

		$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if($enddate < 0 || $enddate == false)
{

Zeile 611Zeile 616
		elseif($enddate < $startdate)
{
$errors[] = $lang->error_end_before_start;

		elseif($enddate < $startdate)
{
$errors[] = $lang->error_end_before_start;

		}
}


		}
}


	if(!$errors)
{
$insert_announcement = array(

	if(!$errors)
{
$insert_announcement = array(

Zeile 630Zeile 635

$aid = $db->insert_query("announcements", $insert_announcement);
redirect("modcp.php?action=announcements", $lang->redirect_add_announcement);


$aid = $db->insert_query("announcements", $insert_announcement);
redirect("modcp.php?action=announcements", $lang->redirect_add_announcement);

	}
else

	}
else

	{
$mybb->input['action'] = 'new_announcement';

	{
$mybb->input['action'] = 'new_announcement';

	}

	}

}

}





if($mybb->input['action'] == "new_announcement")
{
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");

if($mybb->input['action'] == "new_announcement")
{
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");





	$announcement_fid = intval($mybb->input['fid']);

if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))

	$announcement_fid = intval($mybb->input['fid']);

if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))

Zeile 651Zeile 656

// Deal with inline errors
if(is_array($errors))


// Deal with inline errors
if(is_array($errors))

	{

	{

		$errors = inline_error($errors);

// Set $announcement to input stuff

		$errors = inline_error($errors);

// Set $announcement to input stuff

Zeile 691Zeile 696
		$startdateyear = gmdate("Y", TIME_NOW);

$enddateyear = $startdateyear+1;

		$startdateyear = gmdate("Y", TIME_NOW);

$enddateyear = $startdateyear+1;

	}

// Generate form elements
for($i = 1; $i <= 31; ++$i)
{
if($startday == $i)
{
$startdateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else
{
$startdateday .= "<option value=\"$i\">$i</option>\n";
}

if($endday == $i)
{
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else
{
$enddateday .= "<option value=\"$i\">$i</option>\n";
}
}

$startmonthsel = $endmonthsel = array();
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";

$startdatemonth .= "<option value=\"01\" {$startmonthsel['01']}>{$lang->january}</option>\n";
$enddatemonth .= "<option value=\"01\" {$endmonthsel['01']}>{$lang->january}</option>\n";
$startdatemonth .= "<option value=\"02\" {$startmonthsel['02']}>{$lang->february}</option>\n";
$enddatemonth .= "<option value=\"02\" {$endmonthsel['02']}>{$lang->february}</option>\n";
$startdatemonth .= "<option value=\"03\" {$startmonthsel['03']}>{$lang->march}</option>\n";
$enddatemonth .= "<option value=\"03\" {$endmonthsel['03']}>{$lang->march}</option>\n";
$startdatemonth .= "<option value=\"04\" {$startmonthsel['04']}>{$lang->april}</option>\n";
$enddatemonth .= "<option value=\"04\" {$endmonthsel['04']}>{$lang->april}</option>\n";

	}

// Generate form elements
for($i = 1; $i <= 31; ++$i)
{
if($startday == $i)
{
$startdateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else
{
$startdateday .= "<option value=\"$i\">$i</option>\n";
}

if($endday == $i)
{
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else
{
$enddateday .= "<option value=\"$i\">$i</option>\n";
}
}

$startmonthsel = $endmonthsel = array();
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";

$startdatemonth .= "<option value=\"01\" {$startmonthsel['01']}>{$lang->january}</option>\n";
$enddatemonth .= "<option value=\"01\" {$endmonthsel['01']}>{$lang->january}</option>\n";
$startdatemonth .= "<option value=\"02\" {$startmonthsel['02']}>{$lang->february}</option>\n";
$enddatemonth .= "<option value=\"02\" {$endmonthsel['02']}>{$lang->february}</option>\n";
$startdatemonth .= "<option value=\"03\" {$startmonthsel['03']}>{$lang->march}</option>\n";
$enddatemonth .= "<option value=\"03\" {$endmonthsel['03']}>{$lang->march}</option>\n";
$startdatemonth .= "<option value=\"04\" {$startmonthsel['04']}>{$lang->april}</option>\n";
$enddatemonth .= "<option value=\"04\" {$endmonthsel['04']}>{$lang->april}</option>\n";

	$startdatemonth .= "<option value=\"05\" {$startmonthsel['05']}>{$lang->may}</option>\n";
$enddatemonth .= "<option value=\"05\" {$endmonthsel['05']}>{$lang->may}</option>\n";
$startdatemonth .= "<option value=\"06\" {$startmonthsel['06']}>{$lang->june}</option>\n";

	$startdatemonth .= "<option value=\"05\" {$startmonthsel['05']}>{$lang->may}</option>\n";
$enddatemonth .= "<option value=\"05\" {$endmonthsel['05']}>{$lang->may}</option>\n";
$startdatemonth .= "<option value=\"06\" {$startmonthsel['06']}>{$lang->june}</option>\n";

Zeile 1064Zeile 1069
	}

if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))

	}

if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))

	{

	{

		$end_type_sel['infinite'] = ' checked="checked"';
}
else

		$end_type_sel['infinite'] = ' checked="checked"';
}
else

Zeile 1199Zeile 1204
		$query = $db->query("
SELECT a.pid, a.aid
FROM ".TABLE_PREFIX."attachments a

		$query = $db->query("
SELECT a.pid, a.aid
FROM ".TABLE_PREFIX."attachments a

 
			LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)

			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$flist}

			WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$tflist}

		");
while($attachment = $db->fetch_array($query))
{

		");
while($attachment = $db->fetch_array($query))
{

Zeile 1402Zeile 1408
		$perpage = $mybb->settings['postsperpage'];
$pages = $unapproved_attachments / $perpage;
$pages = ceil($pages);

		$perpage = $mybb->settings['postsperpage'];
$pages = $unapproved_attachments / $perpage;
$pages = ceil($pages);



 

if($mybb->input['page'] == "last")
{


if($mybb->input['page'] == "last")
{

Zeile 1835Zeile 1840
if($mybb->input['action'] == "finduser")
{
$perpage = intval($mybb->input['perpage']);

if($mybb->input['action'] == "finduser")
{
$perpage = intval($mybb->input['perpage']);

	if(!$perpage || $pagepage <= 0)

	if(!$perpage || $perpage <= 0)

	{
$perpage = $mybb->settings['threadsperpage'];
}

	{
$perpage = $mybb->settings['threadsperpage'];
}

Zeile 1904Zeile 1909
		if($mybb->input[$field])
{
$page_url .= "&amp;{$field}=".htmlspecialchars_uni($mybb->input[$field]);

		if($mybb->input[$field])
{
$page_url .= "&amp;{$field}=".htmlspecialchars_uni($mybb->input[$field]);

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

		}
}


		}
}


Zeile 1920Zeile 1926
		$user['postnum'] = my_number_format($user['postnum']);
$regdate = my_date($mybb->settings['dateformat'], $user['regdate']);
$regtime = my_date($mybb->settings['timeformat'], $user['regdate']);

		$user['postnum'] = my_number_format($user['postnum']);
$regdate = my_date($mybb->settings['dateformat'], $user['regdate']);
$regtime = my_date($mybb->settings['timeformat'], $user['regdate']);

		$lastdate = my_date($mybb->settings['dateformat'], $user['lastactive']);
$lasttime = my_date($mybb->settings['timeformat'], $user['lastactive']);

		$lastdate = my_date($mybb->settings['dateformat'], $user['lastvisit']);
$lasttime = my_date($mybb->settings['timeformat'], $user['lastvisit']);

		$usergroup = $usergroups_cache[$user['usergroup']]['title'];
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}

		$usergroup = $usergroups_cache[$user['usergroup']]['title'];
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}

Zeile 2185Zeile 2191

// Now we have the result counts, paginate
$perpage = intval($mybb->input['perpage']);


// Now we have the result counts, paginate
$perpage = intval($mybb->input['perpage']);

		if(!$perpage || $pagepage <= 0)

		if(!$perpage || $perpage <= 0)

		{
$perpage = $mybb->settings['threadsperpage'];
}

		{
$perpage = $mybb->settings['threadsperpage'];
}