Cytat(imashjan82 @ 8.04.2010, 09:39:09 )

Proszę proszę pisać o tych zastrzeżeniach co do pliku ask.php. Nie powinieniem go drukować w printach tak?
Nie o to chodzi, że nie powinieneś, ale skoro już przeplatasz kod (X)HTML i PHP to możesz to robić znacznie bardziej czytelnie (bez używania print). To chyba nie jest cały plik ask.php, bo nigdzie nie widzę znaczników rozpoczynających <html>, sekcji <head></head> itp. rzeczy, ale podany fragment można zapisać w taki sposób:
<?php
require_once('function/function.php');
lacz_bd();
$page_title = 'tytul strony';
include "templates/header.html";
include "templates/header_top.html";
?>
<tr>
<td>
<script language='JavaScript' type='text/javascript' src='http://www.iiads.eu/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if(!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.iiads.eu/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:1");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script>
<noscript>
<a href='http://www.iiads.eu/adclick.php?n=a9320cbb' target='_blank'>
<img src='http://www.iiads.eu/adview.php?what=zone:1&n=a9320cbb' border='0' alt=''>
</a>
</noscript>
</td>
</tr>
<?php include"templates/top_spacer.html"; ?>
<tr>
<td width='15' bgcolor='#e8e7e2'> </td>
<td width='204' bgcolor='#dbdbcf' class='left_column' valign='top'><?php menu_lewe(); ?></td>
<td width='336' class='news_home' bgcolor='#e8e7e2'><?php ask($link); ?></td>
<td width='204' class='right_column' bgcolor='#dbdbcf'></td>
<td width='22' bgcolor='#e8e7e2'> </td>
</tr>
</table>
<?php include"templates/footer.html"; ?>
</body>
</html>
Bynajmniej nie chodzi tu o formatowanie, ale o samo wywoływanie skryptów (funkcji) PHP. Po prostu wstawiamy odpowiedni kod PHP w miejscach, w których jest to absolutnie konieczne.