본문이미지 새창띄우기 정보
본문이미지 새창띄우기본문
안녕하세요 초짜 짜집퍼입니다...
소스를 어서 갖고왔는데..어딘지 가물...열심히 짜맞췃습니다.
우선올립니다.
<?
for ($i=0; $i<=4; $i++) {
$image[$i] = "$g4[path]/data/file/$bo_table/".$view[file][$i][file];
}
?>
<? if ($view[file][0][view]) {?>
<img src="<?=$image[0]?>" name='gallery_img' width="500" height="500" border='0'
onclick="image_window('<?=$image[0]?>')" style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][1][view]) {?>
<img src="<?=$image[1]?>" name='gallery_img' width="500" height="500" border='0'
onclick="image_window('<?=$image[1]?>')" style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][2][view]) {?>
<img src="<?=$image[2]?>" name='gallery_img' width="500" height="500" border='0' onclick="image_window('<?=$image[2]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][3][view]) {?>
<img src="<?=$image[3]?>" name='gallery_img' width="500" height="500" border='0' onclick="image_window('<?=$image[3]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][4][view]) {?>
<img src="<?=$image[4]?>" name='gallery_img' width="500" height="500" border='0' onclick="images_window('<?=$image[4]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][5][view]) {?>
<img src="<?=$image[5]?>" name='gallery_img' width="500" height="500" border='0' onclick="fitWindowSize('<?=$image[5]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
위내용은 " 첫번째~다섯째 파일에 이미지가 있으면 가로 세로 500으로 출력하고 본문이미지를 새창으로 띄워라 만약 이미지가 없다면 노이미지를 출력해라" 입니다...
소스를 어서 갖고왔는데..어딘지 가물...열심히 짜맞췃습니다.
우선올립니다.
<?
for ($i=0; $i<=4; $i++) {
$image[$i] = "$g4[path]/data/file/$bo_table/".$view[file][$i][file];
}
?>
<? if ($view[file][0][view]) {?>
<img src="<?=$image[0]?>" name='gallery_img' width="500" height="500" border='0'
onclick="image_window('<?=$image[0]?>')" style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][1][view]) {?>
<img src="<?=$image[1]?>" name='gallery_img' width="500" height="500" border='0'
onclick="image_window('<?=$image[1]?>')" style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][2][view]) {?>
<img src="<?=$image[2]?>" name='gallery_img' width="500" height="500" border='0' onclick="image_window('<?=$image[2]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][3][view]) {?>
<img src="<?=$image[3]?>" name='gallery_img' width="500" height="500" border='0' onclick="image_window('<?=$image[3]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][4][view]) {?>
<img src="<?=$image[4]?>" name='gallery_img' width="500" height="500" border='0' onclick="images_window('<?=$image[4]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
<? if ($view[file][5][view]) {?>
<img src="<?=$image[5]?>" name='gallery_img' width="500" height="500" border='0' onclick="fitWindowSize('<?=$image[5]?>')"style='cursor:pointer'>
<? } else {?>
<img src="<?=$board_skin_path?>/img/no_image.gif" width="500" height="500" border='0'>
<? } ?>
위내용은 " 첫번째~다섯째 파일에 이미지가 있으면 가로 세로 500으로 출력하고 본문이미지를 새창으로 띄워라 만약 이미지가 없다면 노이미지를 출력해라" 입니다...
추천
0
0
댓글 0개