Gacha Posted January 25, 2004 Report Posted January 25, 2004 <head> <link rel="stylesheet" type="text/css" href="../stils.css"> <script language=JavaScript> function pic(file) { window.open(file,"_blank","toolbar=no,status=no,menubar=no,resizable=no,scrollbars=no,fullscreen=no,wid th=500,height=500"); } </script> </head> <? chdir('pics/'); $handle=opendir('.'); readdir($handle); readdir($handle); echo "<BR>"; while (($file = readdir($handle))!==false){ $size=(filesize($file)/100); echo "<table class='pictable' width='200' border='0' cellspacing='0' cellpadding='0'> <tr> <td><div align='center'><A HREF=JavaScript:pic('pics/$file')><img src=pics/$file width=100 height=75></A></div></td> </tr> <tr> <td><div align='center'>Nosaukums: $file <BR> Izmers: $size Kb</div></td> </tr> </table> <table width='200' border='0' cellspacing='0' cellpadding='0'> <tr> <td> </td> </tr> </table> "; } echo "<BR>"; ?> Tur teiblaa ieliekas bildite, bet tie teibli raadaas viens zem otra, bet es gribetu, ka tas bildes raditos kaadas 3 vienaa rindaa! Un ja to varetu panaakt, tad shis mazais skriptinjsh ir lloti noderiigs.
BigUgga Posted January 25, 2004 Report Posted January 25, 2004 uzmetu aci tam srkiptam, man liekas, ka tas tikuntaa saganerees bildes vienu zem otras.
Gacha Posted January 25, 2004 Author Report Posted January 25, 2004 Nu tur jau ta problema, ka bildes buus viena zem otras, man vajag lai buutu kaadas 3 rindaas un tad uz zemi vai kaut kaa taa.
Aleksejs Posted January 25, 2004 Report Posted January 25, 2004 Nepārbaudīju, bet varētu būt šāds. <head> <link rel="stylesheet" type="text/css" href="../stils.css"> <script language=JavaScript> function pic(file) { window.open(file,"_blank","toolbar=no,status=no,menubar=no,resizable=no,scrollbars=no,fullscreen=no,wid th=500,height=500"); } </script> </head> <? chdir('pics/'); $handle=opendir('.'); readdir($handle); readdir($handle); echo "<BR>"; echo '<table><tr>'; //PIEVIENOTS $maxkol = 3; //PIEVIENOTS $kolsk = 1; while (($file = readdir($handle))!==false){ $size=(filesize($file)/100); echo '<td>';//PIEVIENOTS echo "<table class='pictable' width='200' border='0' cellspacing='0' cellpadding='0'> <tr> <td><div align='center'><A HREF=JavaScript:pic('pics/$file')><img src=pics/$file width=100 height=75></A></div></td> </tr> <tr> <td><div align='center'>Nosaukums: $file <BR> Izmers: $size Kb</div></td> </tr> </table> <table width='200' border='0' cellspacing='0' cellpadding='0'> <tr> <td> </td> </tr> </table> "; echo '</td>';//PIEVIENOTS if($kolsk == $maxkol){ //PIEVIENOTS echo '</tr><tr>';//PIEVIENOTS $kolsk = 0;//PIEVIENOTS }//PIEVIENOTS $kolsk++;//PIEVIENOTS } echo '</tr></table>';//PIEVIENOTS echo "<BR>"; ?>
Recommended Posts