Witam specjalistów!!
Mam skrypt galerii, ale jak klikne na minaturke to otwiera mi się nowe okno z białym tłem i jest o wymiarach owiele za dużych niż jabym chciał, a chciałbym żeby obrazki otwierały się w oknie javascript i żeby były bez żadnyh suwaków, menu itp.. Mnie więcej jak na tej stronie http://www.lipiecphoto.pl/galerie.html ( kliknijcie na obrazek). Jak zmieńić ten skrypt??
Proszę o podpowiedz i z góry dziękuj!

To moje gg 4445110 a emial to bartoszer@poczta.onet.pl

  1. Kod: 
  2. <?php 
  3.  
  4. $_config["url"] = "http://members.lycos.co.uk/czerwony222/galeria.php";
  5. $_config["dir"] = "obrazki";
  6. $_config["cache"] = "min";
  7. $_config["th_max_width"] = 50;
  8. $_config["th_max_height"] = 50;
  9. $_config["columns"] = 2;
  10. $_config["rows"] = 6;
  11. $_config["ext"] = "jpg|gif|png";
  12.  
  13.  
  14. function CreateThumb($file, $w, $h, $dest="", $p=1) { 
  15.  if(!file_exists($file)) return 0; 
  16.  $file_ex = explode("/", $file); 
  17.  $filename = $file_ex[count($file_ex)-1]; 
  18.  list($width, $height, $type) = getimagesize($file); 
  19.  switch($type) { 
  20. case 1: $imagecreate = "imagecreatefromgif"; $imagesave = "imagegif"; break; 
  21. case 2: $imagecreate = "imagecreatefromjpeg"; $imagesave = "imagejpeg"; break; 
  22. case 3: $imagecreate = "imagecreatefrompng"; $imagesave = "imagepng"; break; 
  23. default: return 0; break; 
  24.  } 
  25.  $im = $imagecreate($file); 
  26.  if($p) { 
  27. $prop = $height / $width; 
  28. $nw = $w; 
  29. $nh = $w * $prop; 
  30.  } else { 
  31. $nw = $w; 
  32. $nh = $h; 
  33.  } 
  34.  $dest_im = imagecreatetruecolor($nw, $nh); 
  35.  imagecopyresized($dest_im, $im, 0, 0, 0, 0, $nw, $nh, $width, $height); 
  36.  $imagesave($dest_im, $dest."/".$filename); 
  37.  return 1; 
  38. } 
  39.  
  40.  
  41.  
  42. $dir = dir($_config["dir"]); 
  43. $pliki = array(); 
  44. while($file = $dir->read()) { 
  45. if(eregi("(".$_config["ext"].")$", $file)) { 
  46. $pliki[] = $file; 
  47. } 
  48. } 
  49.  
  50. if(!isset($_GET["gp"])) $gp = 0; 
  51. else $gp = $_GET["gp"]; 
  52. $_start = $gp*$_config["rows"]*$_config["columns"]; 
  53. $_stop = $_start + $_config["rows"]*$_config["columns"]; 
  54.  
  55. echo "<table style=\"width: 100%; border: 0;\">\n"; 
  56. for($i=$_start, $j=0; $i<$_stop && $i<count($pliki); $i++, $j++) { 
  57. if($j == $_config["columns"]) { echo "</tr><tr>"; $j = 0; } 
  58. if(!file_exists($_config["cache"]."/".$pliki[$i])) CreateThumb($_config["dir"]."/".$pliki[$i], $_config["th_max_width"], $_config["th_max_height"], $_config["cache"]); 
  59. echo "<td style=\"width: ".(100/$_config["columns"])."%; text-align: center;\">\n" 
  60. ."<a href=\"#\" onClick=\"window.open('".$_config["dir"]."/".$pliki[$i]."', 'gallery_window', '');\"><img src=\"".$_config["cache"]."/".$pliki[$i]."\" alt=\"Gallery\" /></a>\n" 
  61. ."</td>\n"; 
  62. } 
  63. echo "</table>\n"; 
  64.  
  65.  
  66. if(count($pliki) > $_stop && $_start == 0) { 
  67. $npage = $gp + 1; 
  68. echo "<div style=\"text-align: center;\"><a href=\"".$_config["url"]."gp=".$npage."\" class=\"gal_navlink\">Następna strona &raquo;</a></div>\n"; 
  69. } 
  70. if(count($pliki) <= $_stop && $_start > 0) { 
  71. $ppage = $gp - 1; 
  72. echo "<div style=\"text-align: center;\"><a href=\"".$_config["url"]."gp=".$ppage."\" class=\"gal_navlink\">&laquo; Poprzednia strona</a></div>\n"; 
  73. } 
  74. if(count($pliki) > $_stop && $_start > 0) { 
  75. $ppage = $gp - 1; 
  76. $npage = $gp + 1; 
  77. echo "<div style=\"text-align: center;\"><a href=\"".$_config["url"]."gp=".$ppage."\" class=\"gal_navlink\">&laquo; Poprzednia strona</a> | <a href=\"".$_config["url"]."?gp=".$npage."\" class=\"gal_navlink\">Następna strona &raquo;</a></div>\n"; 
  78. } 
  79.  
  80. ?> 
  81.