View difference between Paste ID: 6Cz8j3PE and XHqdqmVB
SHOW: | | - or go back to the newest paste.
1
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
2
<meta http-equiv="Content-Language" content="pl">
3
4
<link rel="stylesheet" type="text/css" href="styles.css" />
5
<title>Statystki Serwera ONLY AWP</title>
6
7
<script src="js/jquery-1.4.4.min.js"></script>
8
<script type="text/javascript" src="js/jquery.titlecase.js"></script>
9
<script type="text/javascript" src="js/jquery.blockUI.js"></script>
10
<script src="scripts.js"></script>	
11
<body onload="make_oddeven(0)" style="cursor:pointer; background-image: url(/rankme/images/header.jpg); background-attachment: fixed";>
12
13
<center>
14
<?php
15
16
include_once "check_restore.php";
17
18
global $bd_table;
19
20
$query1 = "SELECT * FROM `$bd_table` ORDER BY score DESC LIMIT 32";
21
$resultado1 = mysql_query($query1,$conexao);
22
23
echo "<table style='background: rgba(245, 245, 245, 0.5)' id='table1'><tr><th>P.</th><th>NICK</th><th>KILLE</th><th>ZGONY</th><th>WYNIK</th><th>ŚREDNIA</th><th>HS</th><th>RUNDY</th><th>WYGRANE</th><th>CELNOŚĆ</th><th>STEAMID</th></td>";
24
25
$rank=0;
26
$bg1 = 'green';
27
$bg2 = 'yellow';
28
$bg3 = 'orange';
29
while ($row = mysql_fetch_array($resultado1)) {
30
	$rank++;
31
	if($row['hits'] == 0){
32
		$hits = 1;
33
	} else {
34
		$hits = $row['hits'];
35
	}
36
	
37
	if($row['deaths'] == 0){
38
		$deaths = 1;
39
	} else {
40
		$deaths = $row['deaths'];
41
	}
42
43
	if($row['shots'] == 0){
44
		$shots = 1;
45
	} else {
46
		$shots = $row['shots'];
47
	}
48
	$accuracy = "";
49
	
50
	$temp = strval($row['hits']/$shots);
51
	//$accuracy = $temp;
52
	
53
	if(strpos($temp,".") !== false){
54
																			for($i = 0; $i<=strpos($temp,".")+2;$i++){
55
																				if( strlen($temp)-1 <$i ){
56
																					$accuracy .= "";
57
																				}else{
58
																					$accuracy = $accuracy . $temp[$i];
59
																					}
60-
	echo "<tr align=center onclick=\"showmodal('showplayer.php?id={$row['id']}')\"><td>$rank</td><td>" . $row['name'] . "</td><td>" . $row['kills'] ."</td><td>" . $row['deaths'] . "</td><td>{$row['score']}</td><td>";
60+
61
																			}
62
																		} else { $accuracy = $temp . ".00";}
63
if($rank == 1) 
64
	$bg = $bg1;
65
else if($rank == 2)
66
	$bg = $bg2;
67
else if($rank == 3)
68
	$bg = $bg3;
69
else $bg ='';
70
	echo "<tr style='background:".$bg."' align=center onclick=\"showmodal('showplayer.php?id={$row['id']}')\"><td>$rank</td><td>" . $row['name'] . "</td><td>" . $row['kills'] ."</td><td>" . $row['deaths'] . "</td><td>{$row['score']}</td><td>";
71
	$temp = strval($row['kills']/$deaths);
72
	if(strpos($temp,".") !== false){
73
		for($i = 0; $i<=strpos($temp,".")+2;$i++){
74
			if( strlen($temp)-1 <$i ){
75
				break;
76
			}else{
77
				echo $temp[$i];
78
			}
79
			
80
		}
81
	} else { echo $temp . ".00";}
82
	$rounds = $row['rounds_tr']+$row['rounds_ct'];
83
	$wins = $row['tr_win']+$row['ct_win'];
84
	echo "</td><td>{$row['headshots']}</td><td>{$rounds}</td><td>{$wins}</td><td>" . $accuracy . "</td><td>{$row['steam']}</td></tr>";
85
}
86
87
$logdb = null;
88
?>
89
</center>
90
<div id="modal"></div>