29.12.2017, 15:49
To nie to. Cofnij się o 1 stopień, do paczki szablonów, a z niej wybierz "szablony globalne". Tam dodaj szablon, w skrócie: twojadresforum/admin/index.php?module=style-templates&sid=-1
<?php
<?php
define('IN_MYBB', 1);
require "./global.php";
add_breadcrumb("Ranking Killi (V1)", "rankingv1.php");
$servername = "";
$username = "";
$password = "";
$dbname = "";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `dx_users` ORDER BY `kills` DESC limit 15";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>".$row["nick"]."</td><td>".$row["kills"]."</td><td>".$row["deaths"]."</td></tr>";
}
echo "</table>";
} else {
echo "Wyniki pokaza sie wkrotce.";
}
eval("\$podstr = \"".$templates->get("rankingv1")."\";");
output_page($podstr);
?>
<html>
<head>
{$headerinclude}
<title>Ranking killi (V1)</title>
</head>
<body>
{$header}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="3">
Ranking killi (V1)
</td>
</tr>
<tr>
<td class="tcat">Nick</td>
<td class="tcat">Zabojstwa</td>
<td class="tcat">Smierci</td>
</tr>
{$stats}
</table>
{$footer}
</body>
</html>
<?php
define('IN_MYBB', 1);
require "./global.php";
add_breadcrumb("Ranking Killi (V1)", "rankingv1.php");
$servername = "";
$username = "";
$password = "";
$dbname = "";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `dx_users` ORDER BY `kills` DESC limit 15";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>".$row["nick"]."</td><td>".$row["kills"]."</td><td>".$row["deaths"]."</td></tr>";
}
echo "</table>";
} else {
echo "Wyniki pokaza sie wkrotce.";
}
eval("\$podstr = \"".$templates->get("rankingv1")."\";");
output_page($podstr);
?>
(31.12.2017, 16:15)onStyle napisał(a): [ -> ]Kod:<html>
<head>
{$headerinclude}
<title>Ranking killi (V1)</title>
</head>
<body>
{$header}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="3">
Ranking killi (V1)
</td>
</tr>
<tr>
<td class="tcat">Nick</td>
<td class="tcat">Zabojstwa</td>
<td class="tcat">Smierci</td>
</tr>
{$stats}
</table>
{$footer}
</body>
</html>
Kod:<?php
define('IN_MYBB', 1);
require "./global.php";
add_breadcrumb("Ranking Killi (V1)", "rankingv1.php");
$servername = "";
$username = "";
$password = "";
$dbname = "";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `dx_users` ORDER BY `kills` DESC limit 15";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>".$row["nick"]."</td><td>".$row["kills"]."</td><td>".$row["deaths"]."</td></tr>";
}
echo "</table>";
} else {
echo "Wyniki pokaza sie wkrotce.";
}
eval("\$podstr = \"".$templates->get("rankingv1")."\";");
output_page($podstr);
?>
Jak zrobić, żeby wpisało się to w tabelę, bo jak narazie to jest na górze :/ http://boberworld.pl/rankingv1.php
<?php
define('IN_MYBB', 1);
require "./global.php";
add_breadcrumb("Ranking Killi (V1)", "rankingv1.php");
$servername = "";
$username = "";
$password = "";
$dbname = "";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `dx_users` ORDER BY `kills` DESC limit 15";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$stats .= "<tr><td>".$row["nick"]."</td><td>".$row["kills"]."</td><td>".$row["deaths"]."</td></tr>";
}
} else {
$stats = "Wyniki pokaza sie wkrotce.";
}
eval("\$podstr = \"".$templates->get("rankingv1")."\";");
output_page($podstr);
?>