Exemplo n.º 1
0
?>
</th>
    <th><?php 
echo $MSG_LANG["rating"];
?>
</th>
    <th>&nbsp;</th>
</tr>
<?

    $p = mysql_query("SELECT * from players $search  ORDER BY firstName LIMIT $inicio,$perpage");

    if (mysql_num_rows($p)>0){
    while ($row = mysql_fetch_array($p)){

		$truerating = countRating($row[playerID]);

		echo "<tr>
                <td align='center'  style='text-align: left'><a href='../stats_user.php?cod=$row[playerID]'>$row[firstName]</a></td>
                <td align='center'>$row[nick]</td>";

		if ($row[rating] != $truerating)
                echo "<td align='center'  style='text-align: left'><B><a title='The rating would be $truerating'><font color='$cor'>$row[rating]</font></B> <a href='fixuser.php?player=$row[playerID]'>fix</a></td>";
		else
				echo "<td align='center' style='text-align: left'>$row[rating]</td>";
		echo "
		        <td align='center'><input style='font-size:11' type=button value='".$MSG_LANG["edit"]."' onClick=\"window.location='editplayer.php?player=$row[playerID]'\"></td>
              </tr>";
    }
}
Exemplo n.º 2
0
</head>

<body bgcolor=white text=black>
<font face=verdana size=2>
<? require_once('header.inc.php');?>
<BR>
<? if ($action == "" ){
	echo "Are you sure that you want to fix this user rating?";
	echo "<form method=post action='fixuser.php'>";
	echo "<input type=hidden name=player value=$player>";
	echo "<input type=hidden name=action value='APPLY'>";
	echo "<input type=submit value='".$MSG_LANG['yes']."'> <input type=button value='".$MSG_LANG['no']."' onClick=\"window.location='allusers.php'\">";
	echo "</form>";
	exit;
}
	$truerating = countRating($player);
    $p = mysql_query("UPDATE players SET rating='$truerating' WHERE playerID='$player'");

?>
<BR>
<script>
	alert('The user has been fixed!');
	window.location='allusers.php';
</script>

</font>

<form name="logout" action="mainmenu.php" method="post">
        <input type="hidden" name="ToDo" value="Logout">
</form>