Vergleich warnings.php - 1.6.0 - 1.6.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: warnings.php 5016 2010-06-12 00:24:02Z RyanGordon $

 * $Id$

 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'warnings.php');


 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'warnings.php');


$templatelist = '';



$templatelist = 'warnings,warnings_warn_post,warnings_active_header,warnings_expired_header,warnings_warning,warnings_warn_existing,warnings_warn_type,warnings_warn_custom,warnings_warn_pm';
$templatelist .= ',warnings_warn,warnings_view_post,warnings_view_user,warnings_view_revoke,warnings_view_revoked,warnings_view,warnings_no_warnings,codebuttons,smilieinsert_getmore,smilieinsert';
$templatelist .= ',multipage_prevpage,multipage_start,multipage_end,multipage_nextpage,multipage,multipage_page_current';

require_once "./global.php";
require_once MYBB_ROOT."/inc/functions_warnings.php";
require_once MYBB_ROOT."inc/functions_modcp.php";

require_once "./global.php";
require_once MYBB_ROOT."/inc/functions_warnings.php";
require_once MYBB_ROOT."inc/functions_modcp.php";

Zeile 180Zeile 182
	}

// Are we notifying the user?

	}

// Are we notifying the user?

	if(!$warn_errors && $mybb->input['send_pm'] == 1 && $group_permissions['canusepms']  != 0 && $user['receivepms'] != 0 && $mybb->settings['enablepms'] != 0)

	if(!$warn_errors && $mybb->input['send_pm'] == 1 && $group_permissions['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)

	{
// Bring up the PM handler
require_once MYBB_ROOT."inc/datahandlers/pm.php";

	{
// Bring up the PM handler
require_once MYBB_ROOT."inc/datahandlers/pm.php";

Zeile 201Zeile 203
		);

$pmhandler->set_data($pm);

		);

$pmhandler->set_data($pm);

 
		$pmhandler->admin_override = true;


// Now let the pm handler do all the hard work.
if(!$pmhandler->validate_pm())


// Now let the pm handler do all the hard work.
if(!$pmhandler->validate_pm())

Zeile 258Zeile 261

if($new_level['lid'])
{


if($new_level['lid'])
{

 
			$expiration = 0;

			$action = unserialize($new_level['action']);

			$action = unserialize($new_level['action']);

 


			switch($action['type'])
{
// Ban the user for a specified time
case 1:

			switch($action['type'])
{
// Ban the user for a specified time
case 1:

					if($action['length'] != 0)
{

					if($action['length'] > 0)
{

						$expiration = TIME_NOW+$action['length'];
}
// Fetch any previous bans for this user

						$expiration = TIME_NOW+$action['length'];
}
// Fetch any previous bans for this user

Zeile 275Zeile 280
					if(($expiration > $existing_ban['lifted'] && $existing_ban['lifted'] != 0) || $expiration == 0 || !$existing_ban['uid'])
{
if(!$warning_title)

					if(($expiration > $existing_ban['lifted'] && $existing_ban['lifted'] != 0) || $expiration == 0 || !$existing_ban['uid'])
{
if(!$warning_title)

						{

						{

							$warning_title = $warning_type['title'];
}

// Never lift the ban?

							$warning_title = $warning_type['title'];
}

// Never lift the ban?

						if($action['length'] == 0)
{

						if($action['length'] <= 0)
{

							$bantime = '---';
}
else

							$bantime = '---';
}
else

Zeile 292Zeile 297
								if($date == '---')
{
continue;

								if($date == '---')
{
continue;

								}

								}

								
$time = 0;
list($day, $month, $year) = explode('-', $date);

								
$time = 0;
list($day, $month, $year) = explode('-', $date);

Zeile 304Zeile 309
								if($month > 0)
{
$time += 60*60*24*30*$month;

								if($month > 0)
{
$time += 60*60*24*30*$month;

								}


								}


								if($year > 0)
{
$time += 60*60*24*365*$year;

								if($year > 0)
{
$time += 60*60*24*365*$year;

Zeile 340Zeile 345
							$new_ban['oldadditionalgroups'] = $db->escape_string($existing_ban['oldadditionalgroups']);
$new_ban['olddisplaygroup'] = $db->escape_string($existing_ban['olddisplaygroup']);
}

							$new_ban['oldadditionalgroups'] = $db->escape_string($existing_ban['oldadditionalgroups']);
$new_ban['olddisplaygroup'] = $db->escape_string($existing_ban['olddisplaygroup']);
}

						














$period = $lang->expiration_never;
$ban_length = fetch_friendly_expiration($action['length']);

if($ban_length['time'])
{
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);
}

$group_name = $groupscache[$action['usergroup']]['title'];
$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_banned, $group_name, $period);


						$db->insert_query("banned", $new_ban);
$updated_user['usergroup'] = $action['usergroup'];
$updated_user['additionalgroups'] = $updated_user['displaygroup'] = "";

						$db->insert_query("banned", $new_ban);
$updated_user['usergroup'] = $action['usergroup'];
$updated_user['additionalgroups'] = $updated_user['displaygroup'] = "";

						$ban_length = fetch_friendly_expiration($action['length']);
$lang_str = "expiration_".$ban_length['period'];
$group_name = $groupscache[$action['usergroup']]['title'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);
$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_banned, $group_name, $period);

 
					}
break;
// Suspend posting privileges
case 2:

					}
break;
// Suspend posting privileges
case 2:

					if($action['length'] != 0)

					if($action['length'] > 0)

					{
$expiration = TIME_NOW+$action['length'];
}

					{
$expiration = TIME_NOW+$action['length'];
}

Zeile 362Zeile 374
					{
if(($user['suspensiontime'] != 0 && $user['suspendposting']) || !$user['suspendposting'])
{

					{
if(($user['suspensiontime'] != 0 && $user['suspendposting']) || !$user['suspendposting'])
{

 
							$period = $lang->expiration_never;
$ban_length = fetch_friendly_expiration($action['length']);

if($ban_length['time'])
{
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);
}

$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_suspended, $period);


							$updated_user['suspensiontime'] = $expiration;
$updated_user['suspendposting'] = 1;

							$updated_user['suspensiontime'] = $expiration;
$updated_user['suspendposting'] = 1;

							$period = fetch_friendly_expiration($action['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);
$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_suspended, $period);

 
						}

						}

					}

					}

					break;
// Moderate new posts
case 3:

					break;
// Moderate new posts
case 3:

					if($action['length'] != 0)

					if($action['length'] > 0)

					{
$expiration = TIME_NOW+$action['length'];
}

					{
$expiration = TIME_NOW+$action['length'];
}

Zeile 382Zeile 401
					{
if(($user['moderationtime'] != 0 && $user['moderateposts']) || !$user['suspendposting'])
{

					{
if(($user['moderationtime'] != 0 && $user['moderateposts']) || !$user['suspendposting'])
{

 
							$period = $lang->expiration_never;
$ban_length = fetch_friendly_expiration($action['length']);

if($ban_length['time'])
{
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);
}

$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_moderate, $period);


							$updated_user['moderationtime'] = $expiration;
$updated_user['moderateposts'] = 1;

							$updated_user['moderationtime'] = $expiration;
$updated_user['moderateposts'] = 1;

							$period = fetch_friendly_expiration($action['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);
$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_moderate, $period);

 
						}
}
break;

						}
}
break;

Zeile 511Zeile 537
			$first = false;

$post_link = "";

			$first = false;

$post_link = "";

			$issuedby = build_profile_link($warning['username'], $warning['uid']);

			$issuedby = build_profile_link($warning['username'], $warning['issuedby']);

			$date_issued = my_date($mybb->settings['dateformat'], $warning['dateline']).", ".my_date($mybb->settings['timeformat'], $warning['dateline']);
if($warning['type_title'])
{

			$date_issued = my_date($mybb->settings['dateformat'], $warning['dateline']).", ".my_date($mybb->settings['timeformat'], $warning['dateline']);
if($warning['type_title'])
{

Zeile 608Zeile 634
					$ban_length = fetch_friendly_expiration($level['action']['length']);
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);

					$ban_length = fetch_friendly_expiration($level['action']['length']);
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);

 
				}
else
{
$period = $lang->result_period_perm;

				}
$group_name = $groupscache[$level['action']['usergroup']]['title'];
$level['friendly_action'] = $lang->sprintf($lang->result_banned, $group_name, $period);

				}
$group_name = $groupscache[$level['action']['usergroup']]['title'];
$level['friendly_action'] = $lang->sprintf($lang->result_banned, $group_name, $period);

				break;

				break;

			case 2:

			case 2:

				if($level['action']['length'] > 0)
{
$period = fetch_friendly_expiration($level['action']['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);





				if($level['action']['length'] > 0)
{
$period = fetch_friendly_expiration($level['action']['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);
}
else
{
$period = $lang->result_period_perm;

				}
$level['friendly_action'] = $lang->sprintf($lang->result_suspended, $period);
break;

				}
$level['friendly_action'] = $lang->sprintf($lang->result_suspended, $period);
break;

Zeile 627Zeile 661
					$period = fetch_friendly_expiration($level['action']['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);

					$period = fetch_friendly_expiration($level['action']['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);

 
				}
else
{
$period = $lang->result_period_perm;

				}
$level['friendly_action'] = $lang->sprintf($lang->result_moderated, $period);
break;

				}
$level['friendly_action'] = $lang->sprintf($lang->result_moderated, $period);
break;

Zeile 639Zeile 677
	$query = $db->simple_select("warningtypes", "*", "", array("order_by" => "title"));
while($type = $db->fetch_array($query))
{

	$query = $db->simple_select("warningtypes", "*", "", array("order_by" => "title"));
while($type = $db->fetch_array($query))
{

 
		$checked = $type_checked[$type['tid']];

		$type['title'] = htmlspecialchars_uni($type['title']);
$new_warning_level = round(($user['warningpoints']+$type['points'])/$mybb->settings['maxwarningpoints']*100);
if($new_warning_level > 100)

		$type['title'] = htmlspecialchars_uni($type['title']);
$new_warning_level = round(($user['warningpoints']+$type['points'])/$mybb->settings['maxwarningpoints']*100);
if($new_warning_level > 100)

Zeile 1021Zeile 1060
	add_breadcrumb($lang->nav_profile, get_profile_link($user['uid']));
add_breadcrumb($lang->nav_warning_log);


	add_breadcrumb($lang->nav_profile, get_profile_link($user['uid']));
add_breadcrumb($lang->nav_warning_log);


	if(!$mybb->settings['postsperpage'])

	if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)

	{

	{

		$mybb->settings['postperpage'] = 20;

		$mybb->settings['postsperpage'] = 20;

	}

// Figure out if we need to display multiple pages.

	}

// Figure out if we need to display multiple pages.