Rapaz tô com um probleminha eu fiz o seguinte script só que deu um probleminha. O Script é justamente para abrir imagens de um diretorio e aclicar nelas elas aparecem em tamanho maior só que eu tô querendo ao invés de aparecer em janelas popup quero que apareça dentro do iframe. Estou mostrando o codigo pra galera me ajudar.. Help please! De já Agradeço!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <table width="768" height="340" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="178" align="left" valign="top"><table width="178" height="97" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="178" align="left" valign="top"><?php //CODIGO PARA MOSTRAR IMAGENS DE UM DIRETORIO $pag=$_GET['pag']; if(!$pag) { $pag=1; } $rpp=12; //Quantidade de imagens por página $inicio=$pag * $rpp - $rpp; //PASTA DAS IMAGENS $dir = ("");//colocar o diretorio das imagens $abrir = opendir($dir); $arquivos = array(); //LOCALIZA APENAS AS IMAGENS QUE INICIAM COM p--OLHA AQUI O MESMO COMENTARIO foreach (glob($dir."*") as $file) { if (($file != '.') && ($file != '..')) { //FORMATO DAS IMAGENS if ((!is_dir($file)) && (eregi('(jpeg|jpg|bmp)$', $file))) { $arquivos[] = $file; } } } $total = count($arquivos); //total de arquivos $paginas = ceil ($total/$rpp); //arquivos por pagina 30/10=3 echo "<p>"; for ($i = $inicio; $i < $inicio+$rpp && $i < $total; $i++) { if ($i%5==0) { //PEGA A PROPORÇÃO DA IMAGEM $imgsize = GetImageSize ("$arquivos[$i]"); $img_w = 50; //$imgsize[0]; $img_h = 50; //$imgsize[1]; $img_x = $imgsize[0]; $img_y = $imgsize[1]; echo '<img alt="" src="'.$arquivos[$i].'" width="'.$img_w.'" height="'.$img_h.'" class="ampliarimagem" onClick="window.open(\''.$arquivos[$i].'\',\'imagem'.$i.'\',\'width='.$img_x.',height='.$img_y.',location=home.php,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,target=principal\')"/> '; } else { //PEGA A PROPORÇÃO DA IMAGEM $imgsize = GetImageSize ("$arquivos[$i]"); $img_w = 50; //$imgsize[0]; $img_h = 50; //$imgsize[1]; $img_x = $imgsize[0]; $img_y = $imgsize[1]; echo '<img alt="" src="'.$arquivos[$i].'" width="'.$img_w.'" height="'.$img_h.'" class="ampliarimagem" onClick="window.open(\''.$arquivos[$i].'\',\'imagem'.$i.'\',\'width='.$img_x.',height='.$img_y.',location=home.php,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,target=principal\')"/> '; } } echo "</p>"; if ($pag > 1) { $ant = $pag - 1; echo '<p class="align-right"><br /><a href="'.$PHP_SELF.'?pag='.$ant.'"><u>Anterior</u></a>'; } else { echo '<p class="align-right"><br />Anterior'; } if ($pag < $paginas) { $pro = $pag + 1; echo ' <a href="'.$PHP_SELF.'?pag='.$pro.'"><u>Próximo</u></a></p>'; } else { echo ' Próximo</p>'; } echo'</div>'; ?></td> </tr> </table></td> <td width="590" align="left" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> <iframe src="home.php" name="principal" width="589" height="340" marginheight="0" scrolling="Auto" frameborder="0" id="amplia"></iframe> </font></td> </tr> </table> </body> </html>