
<?php function pokaz_tematy () { include("kernel/opcje_wyswietlania.php"); $sqlbb="SELECT * FROM forum_b WHERE id=$_GET[id]"; if ( ($forum_b[tylko_zarejestrowani] == 0 || $forum_nhb[tylko_zarejestrowani] == 1) || ($forum_b[tylko_zarejestrowani] == 2) && isset( $_SESSION['log'] ) ) { #to ta feralna tabela ###################### echo" <table bgcolor='FFFFFF' align='center' height='1000'> <div width='500' align='left'> <form method='POST' action='forum.php?mode=form_dodaj_posty'> <input type='hidden' value='$_GET[id]' name='id_b'> <input type='submit' name='s1' value='Nowy temat'> <b><a href='forum.php'>Forum</a> -> <a href='forum.php?mode=pokaz_tematy&id=$_GET[id]'>$forum_b[nazwa]</a></b> </div> <table class='tabela_gl' width='750' cellpadding='2' cellspacing='1'> </form> <tr> <th colspan='2' width='492'>Temat</th> <th width='55' align='center'>Autor</th> <th width='55' align='center'>Statystyki</th> <th width='93' align='center'>Ostatni post</th> </tr> "; #zliczanie pomocnicze ilosci tematow $sql8="SELECT * FROM forum_c WHERE id_b=$_GET[id] AND nowy_temat='1'"; #przypisanie z funkcji glownego zapytania do odczytu tematow $funkcja = opcje_wyswietlania( 0, 1 ); #$ile_rekordow = $ilosc_tematy $sql=$funkcja[0]; #sprawdzanie czy sa jakies tematy if ( $ilosc_tematy !== 0 ) { { { $sql9 = "SELECT forum_nieprzeczytane FROM users WHERE login='$_SESSION[log]' LIMIT 1"; $sql7 = "SELECT id FROM forum_c WHERE id_b = $forum_b[id] AND id IN (". implode(", ", $id_nieprzeczytane) .")"; } #if'y do roznych img'ow # tematy-ogloszenia 0 if ( $forum_c['status'] == 0 ) { $status="[Ogłoszenie]"; $img="../theme/default/ogloszenie.gif"; if ( $ile_id_nieprzeczytanych != 0 ) { $img="../theme/default/ogloszenie_nowe.gif"; } } # tematy przyklejone 1 if ( $forum_c['status'] == 1 ) { $status="[Przyklejony]"; $img="../theme/default/przyklejony.gif"; if ( $ile_id_nieprzeczytanych != 0 ) { $img="../theme/default/przyklejony_nowe.gif"; } } # tematy zwykle if ( $forum_c['status'] == 2 ) { if ( $forum_c['zablokowany'] == 1 ) { $img="../theme/default/zablokowany.gif"; if ( $ile_id_nieprzeczytanych != 0 ) { $img="../theme/default/ozablokowany_nowe.gif"; } } $status=""; $img="../theme/default/zwykly.gif"; if ( $ile_id_nieprzeczytanych != 0 ) { $img="../theme/default/zwykly_nowe.gif"; } } #zliczanie ilosci odpowiedzi w danym temacie $sql2="SELECT * FROM forum_c WHERE id_=$forum_c[id]"; #sprawdzanie czy sa jakies posty i jesli sa wyswietlanie ostatniego if ( $ilosc_odpowiedzi == 0 ) { #zmienna pokazujaca brak tpostow $ostatni_post="Brak tematów"; } else { #odczytywanie ostatniego postu w temacie $sql5 = "SELECT MAX(id), id, temat, data_dodania, autor FROM forum_c WHERE id_b='$_GET[id]' AND id_='$forum_c[id_]' GROUP BY id DESC"; #odczytywanie autora ostatniego tematu, na podstawie podanego id $sql6 = "SELECT * FROM users WHERE id=$wynik5[autor]"; #zmienna pokazujaca cale pole 'ostatni post' $ostatni_post="<span class='zw3'>$wynik5[data_dodania]</span><br/><span class='zw3' style='font-weight: bold''><a href=../include/pokaz_profil/pokaz_profil_gl.php?id=$users_ostatni_temat[id]>$users_ostatni_temat[login]</a></span>"; } #odczyt autora tematu $sql3="SELECT * FROM users WHERE id='$forum_c[autor]' ORDER BY id LIMIT 1"; #sprawdzanie czy autorem jest "Gosc" if ( $forum_c[autor] == 0 ) { $users[id] = 0; $users[login] = "Gośc"; } else { } echo" <tr> <td class='kol1'><img src='$img'></td> <td class='kol1'><span class='tytul_kategoria'>$status<a href='./forum.php?mode=pokaz_posty&id=$forum_c[id_]'>$forum_c[temat]</a></span></br><span class='zw3'>$forum_c[opis]</span></td> <td class='kol1' align='center'><a href=../include/pokaz_profil/pokaz_profil_gl.php?id=$users[id]>$users[login]</a></td> <td class='kol1' align='center'><span class='zw2'>Odpowiedzi:<span style='font-weight: bold''>$ilosc_odpowiedzi</span></span></br> <span class='zw2'>Wyświetleń:<span style='font-weight: bold''>$forum_c[odslony]</span></span></td> <td class='kol1' align='center'>$ostatni_post</td> </tr> "; } } #Jesli ilosc tematow = 0 else { echo" <center> <table class='tabela_gl' width='750'> <tr> <td width='750' align='center' height='28'>Nie ma tutaj jeszce żadnych tematów</td> </tr> </table> </center> "; } } { echo" <div class='normal'><div class='title' align='center'>Nie jesteś zalogowany</br></br></div> Kliknij <a href=../index.php><b>tutaj</b></a> aby powrucić do strony głównej serwisu.</br> Kliknij <a href=../logowanie/logowanie.php?mode=rejestruj><b>tutaj</b></a> aby się zarejestrować.</br> Kliknij <a href=forum.php><b>tutaj</b></a> aby powrócić do strony głównej forum.</br> </br></br></div> "; } echo" </table> </center> </table> "; } ?>
P.S.
jak by ktos to chcial na kopie odpalic to daje jeszce CSS, bo bez niego sie chyba nie da wiele zobaczyc
Kod
body
{
background: #628098 url(images/background.gif);
margin: 0px;
padding: 0px;
color: #000;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}
font,th,td,p
{
font-family: Verdana, Arial, Helvetica, sans-serif;
}
a:link,a:active,a:visited
{
text-decoration: none;
color : rgb(27, 41, 88);
}
a:hover
{
text-decoration: none;
color : rgb(255, 90, 0);
}
hr
{
height: 0px;
border: solid #D1D7DC 0px;
border-top-width: 1px;
}
.tabela_gl
{
background-color: #FFFFFF;
border: 1px rgb(27, 48, 95) solid;
}
td.kol1
{
background-color: #c9c9c9;
}
td.kol2
{
background-color: rgb(239, 239, 239);
}
td.kol3
{
background-color: #D1D7DC;
}
td.kol4
{
background-color: #E7DCDC;
}
th
{
color: #FFA34F;
font-size: 11px;
font-weight : bold;
background-color: #006699;
height: 28px;
background-image: url(images/cellpic3.gif);
}
td.kategoria
{
height: 24px;
border-width: 0px 0px 0px 0px;
background-image: url(images/cellpic1.gif);
background-color: rgb(239, 239, 239);
height: 24px;
}
.gl_tytul,h1,h2
{
font-weight: bold;
font-size: 18px;
font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
text-decoration: none;
line-height : 120%;
color : #000000;
}
.zw1
{
font-size : 12px;
}
.zw2
{
font-size : 11px;
}
.zw3
{
font-size : 10px;
}
.zwb
{
font-size : 18px;
font-weight: bold;
}
.zw1,.zw2,.zw3,.zwb
{
color : #000000;
}
a.zw1,a.zw2,a.zw3,.zwb
{
color: rgb(27, 41, 88);
text-decoration: none;
}
a.zw1:hover,a.zw2:hover,a.zw3:hover,a.zwb:hover
{
color: rgb(255, 90, 0);
text-decoration: none;
}
.tytul_kategoria
{
font-weight: bold;
font-size: 12px;
letter-spacing: 1px;
color : rgb(27, 48, 95);
}
a.tytul_kategoria
{
text-decoration: none;
color : rgb(27, 48, 95);
}
a.tytul_kategoria
{
text-decoration: underline;
}
.tytul_tematu
{
font-weight: bold;
font-size: 11px;
color : #000000;
}
a.tytul_tematu:link
{
text-decoration: none;
color : rgb(27, 41, 88);
}
a.tytul_tematu:visited
{
text-decoration: none;
color : rgb(27, 41, 88);
}
a.tytul_tematu:hover
{
text-decoration: none;
color : rgb(230, 93, 40);
}
.code
{
font-family: Courier, 'Courier New', sans-serif;
font-size: 11px;
color: #006600;
background-color: #FAFAFA;
border: #D1D7DC;
border-style: solid;
border-left-width: 1px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px
}
.quote
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #444444;
line-height: 125%;
background-color: #FAFAFA;
border: #D1D7DC;
border-style: solid;
border-left-width: 1px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px
}
.copyright
{
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #444444;
letter-spacing: -1px;
}
a.copyright
{
color: #444444;
text-decoration: none;
}
a.copyright:hover
{
color: #000000;
text-decoration: underline;
}
input
{
font: 11px Verdana, Arial, Helvetica, sans-serif;
}
input.zwykly
{
background: #FAFAFA;
border: 1px solid #000000;
font-size: 10px;
}
input.duzy
{
background: #FAFAFA;
border: 1px solid #000000;
font-size: 11px;
font-weight: bold;
}
select
{
background: #FFFFFF;
font: 11px Verdana, Arial, Helvetica, sans-serif;
}
.plus
{
background:#6BFF6B;
}
.minus
{
background:#FF6B6B;
}
@import url("formIE.css");
{
background: #628098 url(images/background.gif);
margin: 0px;
padding: 0px;
color: #000;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}
font,th,td,p
{
font-family: Verdana, Arial, Helvetica, sans-serif;
}
a:link,a:active,a:visited
{
text-decoration: none;
color : rgb(27, 41, 88);
}
a:hover
{
text-decoration: none;
color : rgb(255, 90, 0);
}
hr
{
height: 0px;
border: solid #D1D7DC 0px;
border-top-width: 1px;
}
.tabela_gl
{
background-color: #FFFFFF;
border: 1px rgb(27, 48, 95) solid;
}
td.kol1
{
background-color: #c9c9c9;
}
td.kol2
{
background-color: rgb(239, 239, 239);
}
td.kol3
{
background-color: #D1D7DC;
}
td.kol4
{
background-color: #E7DCDC;
}
th
{
color: #FFA34F;
font-size: 11px;
font-weight : bold;
background-color: #006699;
height: 28px;
background-image: url(images/cellpic3.gif);
}
td.kategoria
{
height: 24px;
border-width: 0px 0px 0px 0px;
background-image: url(images/cellpic1.gif);
background-color: rgb(239, 239, 239);
height: 24px;
}
.gl_tytul,h1,h2
{
font-weight: bold;
font-size: 18px;
font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
text-decoration: none;
line-height : 120%;
color : #000000;
}
.zw1
{
font-size : 12px;
}
.zw2
{
font-size : 11px;
}
.zw3
{
font-size : 10px;
}
.zwb
{
font-size : 18px;
font-weight: bold;
}
.zw1,.zw2,.zw3,.zwb
{
color : #000000;
}
a.zw1,a.zw2,a.zw3,.zwb
{
color: rgb(27, 41, 88);
text-decoration: none;
}
a.zw1:hover,a.zw2:hover,a.zw3:hover,a.zwb:hover
{
color: rgb(255, 90, 0);
text-decoration: none;
}
.tytul_kategoria
{
font-weight: bold;
font-size: 12px;
letter-spacing: 1px;
color : rgb(27, 48, 95);
}
a.tytul_kategoria
{
text-decoration: none;
color : rgb(27, 48, 95);
}
a.tytul_kategoria
{
text-decoration: underline;
}
.tytul_tematu
{
font-weight: bold;
font-size: 11px;
color : #000000;
}
a.tytul_tematu:link
{
text-decoration: none;
color : rgb(27, 41, 88);
}
a.tytul_tematu:visited
{
text-decoration: none;
color : rgb(27, 41, 88);
}
a.tytul_tematu:hover
{
text-decoration: none;
color : rgb(230, 93, 40);
}
.code
{
font-family: Courier, 'Courier New', sans-serif;
font-size: 11px;
color: #006600;
background-color: #FAFAFA;
border: #D1D7DC;
border-style: solid;
border-left-width: 1px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px
}
.quote
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #444444;
line-height: 125%;
background-color: #FAFAFA;
border: #D1D7DC;
border-style: solid;
border-left-width: 1px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px
}
.copyright
{
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #444444;
letter-spacing: -1px;
}
a.copyright
{
color: #444444;
text-decoration: none;
}
a.copyright:hover
{
color: #000000;
text-decoration: underline;
}
input
{
font: 11px Verdana, Arial, Helvetica, sans-serif;
}
input.zwykly
{
background: #FAFAFA;
border: 1px solid #000000;
font-size: 10px;
}
input.duzy
{
background: #FAFAFA;
border: 1px solid #000000;
font-size: 11px;
font-weight: bold;
}
select
{
background: #FFFFFF;
font: 11px Verdana, Arial, Helvetica, sans-serif;
}
.plus
{
background:#6BFF6B;
}
.minus
{
background:#FF6B6B;
}
@import url("formIE.css");