Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="col-lg-6">
- <h3>
- Structures
- </h3>
- <?php
- $pf = "";
- if(!isset($_GET['period']) { $pf = "playerranksdb10x"; } else { $pf = mysql_real_escape_string($_GET['period']; }
- $sql = "SELECT `UserID`,`Name`,`StructuresBuilt`,`StructuresUpgraded` FROM $pf
- ORDER BY 3 desc limit 100";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // output data of each row
- echo " <div class='table-responsive'>";
- echo "";
- echo "";
- echo "<table id='StructuresBuilt' class='display compact table table-hover table-striped results '>";
- echo "<thead>";
- echo "<tr>";
- echo "<th>#</th>";
- echo "<th>Name</th>";
- echo "<th>Built</th>";
- echo "<th>Upgraded</th>";
- echo "</tr>";
- echo "</thead>";
- echo "<tbody>";
- $counter = 1;
- while($row = $result->fetch_assoc()) {
- $counter2 = $counter++;
- echo "<tr>";
- echo "<th scope='row'>$counter2</th>";
- echo "<td><a href='http://steamcommunity.com/profiles/" . $row['UserID']. "' target='_blank'>" . $row['Name']. "</td>";
- echo "<td>" . $row['StructuresBuilt']. "</td>";
- echo "<td>" . $row['StructuresUpgraded']. "</td>";
- echo "</tr>";
- }
- echo "</tbody>";
- echo "</table>";
- echo "</div>";
- }
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement