Vergleich reputation.php - 1.2.2 - 1.2.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: reputation.php 2345 2006-10-23 03:11:03Z Tikitiki $

 * $Id: reputation.php 3598 2008-01-20 20:42:43Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 98Zeile 98
// Saving the new reputation
if($mybb->input['action'] == "do_add" && $mybb->request_method == "post")
{

// Saving the new reputation
if($mybb->input['action'] == "do_add" && $mybb->request_method == "post")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("reputation_do_add_start");

// Check if the reputation power they're trying to give is within their "power limit"

	$plugins->run_hooks("reputation_do_add_start");

// Check if the reputation power they're trying to give is within their "power limit"

Zeile 235Zeile 238
// Delete a specific reputation from a user.
if($mybb->input['action'] == "delete")
{

// Delete a specific reputation from a user.
if($mybb->input['action'] == "delete")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	// Fetch the existing reputation for this user given by our current user if there is one.
$query = $db->simple_select(TABLE_PREFIX."reputation", "*", "rid='".intval($mybb->input['rid'])."'");
$existing_reputation = $db->fetch_array($query);

	// Fetch the existing reputation for this user given by our current user if there is one.
$query = $db->simple_select(TABLE_PREFIX."reputation", "*", "rid='".intval($mybb->input['rid'])."'");
$existing_reputation = $db->fetch_array($query);

Zeile 243Zeile 249
	if($mybb->usergroup['cancp'] != "yes" && $existing_reputation['adduid'] != $mybb->user['uid'])
{
error_no_permission();

	if($mybb->usergroup['cancp'] != "yes" && $existing_reputation['adduid'] != $mybb->user['uid'])
{
error_no_permission();

	}

	}


// Delete the specified reputation
$db->delete_query(TABLE_PREFIX."reputation", "uid='".intval($mybb->input['uid'])."'AND rid='".intval($mybb->input['rid'])."'");


// Delete the specified reputation
$db->delete_query(TABLE_PREFIX."reputation", "uid='".intval($mybb->input['uid'])."'AND rid='".intval($mybb->input['rid'])."'");

Zeile 261Zeile 267
if(!$mybb->input['action'])
{
if($user_permissions['usereputationsystem'] != "yes")

if(!$mybb->input['action'])
{
if($user_permissions['usereputationsystem'] != "yes")

	{

	{

		error($lang->reputations_disabled_group);
}

$lang->nav_profile = sprintf($lang->nav_profile, $user['username']);
$lang->reputation_report = sprintf($lang->reputation_report, $user['username']);

		error($lang->reputations_disabled_group);
}

$lang->nav_profile = sprintf($lang->nav_profile, $user['username']);
$lang->reputation_report = sprintf($lang->reputation_report, $user['username']);





	// Format the user name using the group username style
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

// Set display group to their user group if they don't have a display group.
if(!$user['displaygroup'])

	// Format the user name using the group username style
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

// Set display group to their user group if they don't have a display group.
if(!$user['displaygroup'])

	{

	{

		$user['displaygroup'] = $user['usergroup'];
}


		$user['displaygroup'] = $user['usergroup'];
}


Zeile 291Zeile 297
		$usertitle = $display_group['usertitle'];
}
// Otherwise, fetch it from our titles table for the number of posts this user has

		$usertitle = $display_group['usertitle'];
}
// Otherwise, fetch it from our titles table for the number of posts this user has

	else

	else

	{
$query = $db->simple_select(TABLE_PREFIX."usertitles", "*", "posts<='{$user['postnum']}'", array('order_by' => 'posts', 'order_dir' => 'DESC'));
$title = $db->fetch_array($query);

	{
$query = $db->simple_select(TABLE_PREFIX."usertitles", "*", "posts<='{$user['postnum']}'", array('order_by' => 'posts', 'order_dir' => 'DESC'));
$title = $db->fetch_array($query);

Zeile 387Zeile 393
		else if($reputation_vote['reputation'] < 0)
{
$negative_count++;

		else if($reputation_vote['reputation'] < 0)
{
$negative_count++;

			if($reputation_vote['dateline'] >= $last_week)
{

			if($reputation_vote['dateline'] >= $last_week)
{

				$negative_week++;
}
if($reputation_vote['dateline'] >= $last_month)
{
$negative_month++;

				$negative_week++;
}
if($reputation_vote['dateline'] >= $last_month)
{
$negative_month++;

			}

			}

			if($reputation_vote['dateline'] >= $last_6months)
{
$negative_6months++;

			if($reputation_vote['dateline'] >= $last_6months)
{
$negative_6months++;

Zeile 436Zeile 442
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}

	}


// Build out multipage navigation
if($reputation_count > 0)


// Build out multipage navigation
if($reputation_count > 0)

Zeile 472Zeile 478
			$status_class = "trow_reputation_neutral";
$vote_type_class = "reputation_neutral";
$vote_type = $lang->neutral;

			$status_class = "trow_reputation_neutral";
$vote_type_class = "reputation_neutral";
$vote_type = $lang->neutral;

		}

		}

		// Otherwise, this is a positive reputation
else
{

		// Otherwise, this is a positive reputation
else
{

Zeile 483Zeile 489
		// Get the reputation for the user who posted this comment
if($reputation_vote['adduid'] == 0)
{

		// Get the reputation for the user who posted this comment
if($reputation_vote['adduid'] == 0)
{

			$reputation_vote['user_reputation'] = 0; 

			$reputation_vote['user_reputation'] = '0'; 

		}

		}

 


		$reputation_vote['user_reputation'] = get_reputation($reputation_vote['user_reputation'], $reputation_vote['adduid']);

		$reputation_vote['user_reputation'] = get_reputation($reputation_vote['user_reputation'], $reputation_vote['adduid']);

 
		if($reputation_vote['username'])
{
$reputation_vote['user_reputation'] = " <span class=\"smalltext\">({$reputation_vote['user_reputation']})";
}
else
{
$reputation_vote['user_reputation'] = '';
}


// Format the date this reputation was last modified
$last_updated_date = my_date($mybb->settings['dateformat'], $reputation_vote['dateline']);


// Format the date this reputation was last modified
$last_updated_date = my_date($mybb->settings['dateformat'], $reputation_vote['dateline']);

Zeile 495Zeile 510
		// Does the current user have permission to delete this reputation? Show delete link
if($mybb->usergroup['cancp'] == "yes" || ($mybb->usergroup['cangivereputations'] == "yes" && $reputation_vote['adduid'] == $mybb->user['uid'] && $mybb->user['uid'] != 0))
{

		// Does the current user have permission to delete this reputation? Show delete link
if($mybb->usergroup['cancp'] == "yes" || ($mybb->usergroup['cangivereputations'] == "yes" && $reputation_vote['adduid'] == $mybb->user['uid'] && $mybb->user['uid'] != 0))
{

			$delete_link = "[<a href=\"reputation.php?action=delete&amp;uid={$reputation_vote['rated_uid']}&amp;rid={$reputation_vote['rid']}\" onclick=\"MyBB.deleteReputation({$reputation_vote['rated_uid']}, {$reputation_vote['rid']}); return false;\">{$lang->delete_vote}</a>]";

			$delete_link = "[<a href=\"reputation.php?action=delete&amp;uid={$reputation_vote['rated_uid']}&amp;rid={$reputation_vote['rid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"MyBB.deleteReputation({$reputation_vote['rated_uid']}, {$reputation_vote['rid']}); return false;\">{$lang->delete_vote}</a>]";

		}
else
{

		}
else
{