Szablony CS 1.6 tabelka php

Inne  Założony przez  Damianek.

wersja skryptu MyBB:1.6.5
adres forum:localhost
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu):

Chciałbym połączyć ten skrypt http://amxx.pl/topic/57048-screenshoty-zapis-mysql/ z moim forum mybb, doczytałem jak się tworzy osobną podstronę w mybb ale jak mam połączyć ten plik php tworzący i wyświetlający tabelki z moim mybb by można było normalnie to wyświetlić ?

<?php $czasgen=microtime(); ?>
<?php define('IN_PHPBB', true); $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); include($phpbb_root_path . 'includes/page_header.'.$phpEx); ?>
<?php require( "ustawienia.php" ); ?>
<html>
<center>
<?php echo '<table width="100%" border="0" cellpadding="0" cellspacing="0" class="screeny">
<td><b>Mapa</td><td><b>Gracz</td><td><b>Admin</td><td><b>SteamID / IP</td><td><b>Data</td>
<tr style="height:4px; background-color:#000000; font-size:4px;"><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
if(!isset($_GET['page']))
$Page = 'index';
else
$Page = $_GET['page'];
if($Page == 'index')
{
if(!isset($_GET['p']) || intval($_GET['p']) == '0' || intval($_GET['p']) == '1')
$Querys = 0;
else
$Querys = (intval($_GET['p']) - 1) * $QuerysForPage;
}
$all = mysql_query("SELECT * from $table ORDER BY pname DESC, name DESC , mapa DESC , name DESC , pip DESC , steam_id DESC , timer DESC LIMIT $Querys, $QuerysForPage")or die(mysql_error()); while ($row = mysql_fetch_array($all)) {
echo '<tr class ="">'; echo "<td>".$row["mapa"].'</td>'; echo "<td>".$row["pname"].'</td>'; echo "<td>".$row["name"].'</td>'; echo "<td>".$row["pip"].''.$row["steam_id"].'</td>'; echo "<td>".$row["timer"].'</td>'; } ?>
</center>
</table>
<br>
<center>
<? if($Querys == 0) echo '<< Poprzednia Strona | <a href="screenshoty.php?p=2">Nastepna Strona >></a>';
else echo '<a href="screenshoty.php?p='.($_GET['p'] - 1).'"><< Poprzednia Strona</a> | <a href="screenshoty.php?p='.($_GET['p'] + 1).'">Nastepna Strona >></a>'; ?> <br>
<?php echo 'Czas generowania strony: '.round(microtime()-$czasgen, 3).'s.'; ?>
<br>
<right>Skrypt Stworzył <a href="http://www.amxx.pl/"><b>speedkill</a></right>
</center></html>
<?php include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?>
Jeżeli robisz tym sposobem http://mybbsite.pl/dodawanie-nowej-podstrony/ (a jeżeli nie to rób tym) to kod w szablonie powinien być taki (chyba :D)


<html>
<head>
{$headerinclude}
<title>Tutaj podaj tytuł</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="2">

Tutaj wpisz tytuł

</td>
</tr>
<tr>
<td class="trow2 post_content ">

<?php $czasgen=microtime(); ?>
<?php define('IN_PHPBB', true); $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); include($phpbb_root_path . 'includes/page_header.'.$phpEx); ?>
<?php require( "ustawienia.php" ); ?>
<html>
<center>
<?php echo '<table width="100%" border="0" cellpadding="0" cellspacing="0" class="screeny">
<td><b>Mapa</td><td><b>Gracz</td><td><b>Admin</td><td><b>SteamID / IP</td><td><b>Data</td>
<tr style="height:4px; background-color:#000000; font-size:4px;"><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
if(!isset($_GET['page']))
$Page = 'index';
else
$Page = $_GET['page'];
if($Page == 'index')
{
if(!isset($_GET['p']) || intval($_GET['p']) == '0' || intval($_GET['p']) == '1')
$Querys = 0;
else
$Querys = (intval($_GET['p']) - 1) * $QuerysForPage;
}
$all = mysql_query("SELECT * from $table ORDER BY pname DESC, name DESC , mapa DESC , name DESC , pip DESC , steam_id DESC , timer DESC LIMIT $Querys, $QuerysForPage")or die(mysql_error()); while ($row = mysql_fetch_array($all)) {
echo '<tr class ="">'; echo "<td>".$row["mapa"].'</td>'; echo "<td>".$row["pname"].'</td>'; echo "<td>".$row["name"].'</td>'; echo "<td>".$row["pip"].''.$row["steam_id"].'</td>'; echo "<td>".$row["timer"].'</td>'; } ?>
</center>
</table>
<br>
<center>
<? if($Querys == 0) echo '<< Poprzednia Strona | <a href="screenshoty.php?p=2">Nastepna Strona >></a>';
else echo '<a href="screenshoty.php?p='.($_GET['p'] - 1).'"><< Poprzednia Strona</a> | <a href="screenshoty.php?p='.($_GET['p'] + 1).'">Nastepna Strona >></a>'; ?> <br>
<?php echo 'Czas generowania strony: '.round(microtime()-$czasgen, 3).'s.'; ?>
<br>
<right>Skrypt Stworzył <a href="http://www.amxx.pl/"><b>speedkill</a></right>
</center></html>
<?php include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?>

</td>
</tr>
</table>
{$footer}
</body>
</html>

Tak mi się wydaje że tak ma być... musisz tylko dodać nazwę Podstrony jako i tą wyświetlaną nazwę na górze w przeglądarce.



Użytkownicy przeglądający ten wątek:

1 gości