openside("nazwa"); ?> query($pyt) ; if ($odp) { $linki = ''; while($wiersz = mysql_fetch_array ($odp)) { $tpl = $tpl_raw; if ($mod_rewrite) { $szcz_adres = "$mod_info-" . $wiersz['id'] . ".html"; } else { $szcz_adres = "index.php?m=3&wpis=" . $wiersz['id'] ; } $t_pow = '`' . $g_przedrostek . 'powiazania`'; $t_pod = '`' . $g_przedrostek . 'podkategorie`'; $t_kat = '`' . $g_przedrostek . 'kategorie`'; $pyt2 = "SELECT * FROM $t_pow pw, $t_pod p , $t_kat k WHERE pw.id='$wiersz[id]' AND pw.id_pod=p.id_pod AND p.id_kat=k.id_kat LIMIT 0,1"; $pow2 = $DB->query($pyt2) ; $kateg = mysql_fetch_array ($pow2); $kategoria = $kateg['kategoria']; $podkategoria = $kateg['podkategoria']; /* if ($mod_rewrite) { $podkategorie = "$podkategoria"; } else { $podkategorie = "$podkategoria"; } */ // $tpl = str_replace('{kategoria}' , $podkategorie, $tpl); $tpl = str_replace('{tytul}' , substr($wiersz['tytul'],0,30) . '...', $tpl); $tpl = str_replace('{opis}' , substr($wiersz['opis'], 0,100) . '...' , $tpl); $tpl = str_replace('{url}' , $wiersz['url'], $tpl); $linki .= $tpl; } } $ostatnie = ''; ?>