Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
- <meta http-equiv="Content-Language" content="pl">
- <link rel="stylesheet" type="text/css" href="styles.css" />
- <title>Statystki Serwera ONLY AWP</title>
- <script src="js/jquery-1.4.4.min.js"></script>
- <script type="text/javascript" src="js/jquery.titlecase.js"></script>
- <script type="text/javascript" src="js/jquery.blockUI.js"></script>
- <script src="scripts.js"></script>
- <body onload="make_oddeven(0)" style="cursor:pointer; background-image: url(/rankme/images/header.jpg); background-attachment: fixed";>
- <center>
- <?php
- include_once "check_restore.php";
- global $bd_table;
- $query1 = "SELECT * FROM `$bd_table` ORDER BY score DESC LIMIT 32";
- $resultado1 = mysql_query($query1,$conexao);
- 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>";
- $rank=0;
- $bg1 = 'green';
- $bg2 = 'yellow';
- $bg3 = 'orange';
- while ($row = mysql_fetch_array($resultado1)) {
- $rank++;
- if($row['hits'] == 0){
- $hits = 1;
- } else {
- $hits = $row['hits'];
- }
- if($row['deaths'] == 0){
- $deaths = 1;
- } else {
- $deaths = $row['deaths'];
- }
- if($row['shots'] == 0){
- $shots = 1;
- } else {
- $shots = $row['shots'];
- }
- $accuracy = "";
- $temp = strval($row['hits']/$shots);
- //$accuracy = $temp;
- if(strpos($temp,".") !== false){
- for($i = 0; $i<=strpos($temp,".")+2;$i++){
- if( strlen($temp)-1 <$i ){
- $accuracy .= "";
- }else{
- $accuracy = $accuracy . $temp[$i];
- }
- }
- } else { $accuracy = $temp . ".00";}
- if($rank == 1)
- $bg = $bg1;
- else if($rank == 2)
- $bg = $bg2;
- else if($rank == 3)
- $bg = $bg3;
- else $bg ='';
- 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>";
- $temp = strval($row['kills']/$deaths);
- if(strpos($temp,".") !== false){
- for($i = 0; $i<=strpos($temp,".")+2;$i++){
- if( strlen($temp)-1 <$i ){
- break;
- }else{
- echo $temp[$i];
- }
- }
- } else { echo $temp . ".00";}
- $rounds = $row['rounds_tr']+$row['rounds_ct'];
- $wins = $row['tr_win']+$row['ct_win'];
- echo "</td><td>{$row['headshots']}</td><td>{$rounds}</td><td>{$wins}</td><td>" . $accuracy . "</td><td>{$row['steam']}</td></tr>";
- }
- $logdb = null;
- ?>
- </center>
- <div id="modal"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement