Vergleich reputation.php - 1.2.0 - 1.2.8

  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 2164 2006-08-30 06:17:49Z chris $

 * $Id: reputation.php 3030 2007-04-26 00:19:47Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

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

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

 
	// 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);


	// Only administrators as well as users who gave a specifc vote can delete one.
if($mybb->usergroup['cancp'] != "yes" && $existing_reputation['adduid'] != $mybb->user['uid'])
{

	// Only administrators as well as users who gave a specifc vote can delete one.
if($mybb->usergroup['cancp'] != "yes" && $existing_reputation['adduid'] != $mybb->user['uid'])
{

Zeile 386Zeile 390
			if($reputation_vote['dateline'] >= $last_week)
{
$negative_week++;

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

			}

			}

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

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

			}

			}

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

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

			}

			}

		}
// Neutral reputation given
else

		}
// Neutral reputation given
else

Zeile 417Zeile 421

// Check if we're browsing a specific page of results
if(intval($mybb->input['page']) > 0)


// Check if we're browsing a specific page of results
if(intval($mybb->input['page']) > 0)

	{

	{

		$page = $mybb->input['page'];
$start = ($page-1) *$mybb->settings['repsperpage'];
$pages = $reputation_count / $mybb->settings['repsperpage'];

		$page = $mybb->input['page'];
$start = ($page-1) *$mybb->settings['repsperpage'];
$pages = $reputation_count / $mybb->settings['repsperpage'];

Zeile 477Zeile 481
			$vote_type = $lang->positive;
}
// Get the reputation for the user who posted this comment

			$vote_type = $lang->positive;
}
// Get the reputation for the user who posted this comment

 
		if($reputation_vote['adduid'] == 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 485Zeile 502
		$last_updated = sprintf($lang->last_updated, $last_updated_date, $last_updated_time);

// Does the current user have permission to delete this reputation? Show delete link

		$last_updated = sprintf($lang->last_updated, $last_updated_date, $last_updated_time);

// Does the current user have permission to delete this reputation? Show delete link

		if($mybb->usergroup['cancp'] == "yes" || ($mybb->usergroup['cangivereputations'] == "yes" && $reputation['adduid'] == $mybb->user['uid']))

		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']}\" onclick=\"MyBB.deleteReputation({$reputation_vote['rated_uid']}, {$reputation_vote['rid']}); return false;\">{$lang->delete_vote}</a>]";
}