이미지파일 타이틀문구 출력 정보
이미지파일 타이틀문구 출력본문
http://artspacepurl.noll.co.kr/bbs/board.php?bo_table=exhibitions&wr_id=2
위 주소에서 큰이미지 버튼을 누르면 팝업창이 뜹니다.
그 안에서 왼쪽 큰 이미지 아래 파일문구를 출력하고 싶은데... 잘 안되네요.
고수님의 조언 부탁드립니다.
소스는 아래입니다.
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "Artists";
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
?>
<SCRIPT LANGUAGE='JavaScript'>
// 이미지뷰어
<!--
var win= null;
function View_Open(img, w, h)
{
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/3;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars=yes,';
settings +='resizable=yes,';
settings +='status=no';
win=window.open("","newWindow",settings);
win.document.open();
win.document.write ("<html><head><title>원본 이미지 보기</title></head>");
win.document.write ("<script>function init(){window.resizeBy(document.all.pop_img.width-document.body.clientWidth, document.all.pop_img.height-document.body.clientHeight+10);}</script>");
win.document.write ("<body bgcolor=white topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload='init();'>");
win.document.write ("<img src='"+img+"' border=0 onclick='window.close();' style='cursor:hand' title='클릭하면 닫혀요' id='pop_img'>");
win.document.write ("</body></html>");
win.document.close();
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
image_directory = ""; //배경이미지 경로
clear = new Image(); clear.src = image_directory + "./img/blank.gif";
<?
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 5 ";
$result2 = sql_query($sql2);
for ($j=0; $row2 = sql_fetch_array($result2); $j++) {
$view_one = "{$g4['path']}/data/file/{$bo_table}/{$row2['bf_file']}";
?>
view_img<?=$j?> = new Image();
view_img<?=$j?>.src = "<?=$g4['path']?>/data/file/<?=$bo_table?>/<?=$row2['bf_file']?>";
<? } ?>
function bgChange(imgName) {
document.all.view_img.src = eval(imgName + ".src");
}
// -->
</SCRIPT>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr bgcolor="#a7dfe1" height="50">
<td colspan="5"></td>
</tr>
<tr height="10">
<td colspan="5"></td>
</tr>
<tr>
<td width="10"></td>
<td bgcolor="#f1f1f1" style="padding:10 0 10 0px;" width="500" align="center" valign="top">
<div style='width:450px; position:relative; overflow:hidden;' align=center><img src="<?=$view_one?>" name="view_img" border="0"></a></div></td>
<td width="10">
</td>
<td bgcolor="#f1f1f1" style="padding:10 0 10 0px;" width="200" height="450" align="center" valign="top">
<?
//파일 뽑기
$sql = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 5 ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
//썸네일 코드 시작
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path . '/thumbOpen';
$imgwidth=180; //표시할 이미지의 가로사이즈
$imgheight=0; //표시할 이미지의 세로사이즈
$filename = $row[bf_file]; //파일명
include_once("$g4[path]/lib/thumb.lib.php");
$image = $list[file][$i][file]; //원본
$thumb=thumbnail($data_path. "/".$filename, $imgwidth, $imgheight, 0, 2); //썸네일이 없을경우 원본출력
if (file_exists($thumb) && $filename) {
?>
<a href="javascript:void(0);" onClick="View_Open('<?=$data_path?>/<?=$filename?>')" onMouseOver="bgChange('view_img<?=$i?>');" onMouseOut="bgChange('view_img<?=$i?>');"><img src='<?=$thumb?>' border=0 width=80 height=80></a><p>
<?
//onMouseOut="bgChange('clear');"
}
}
?></td>
<td width="10"></td>
</tr>
<tr>
<td height="10" colspan="5"></td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
?>
위 주소에서 큰이미지 버튼을 누르면 팝업창이 뜹니다.
그 안에서 왼쪽 큰 이미지 아래 파일문구를 출력하고 싶은데... 잘 안되네요.
고수님의 조언 부탁드립니다.
소스는 아래입니다.
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "Artists";
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
?>
<SCRIPT LANGUAGE='JavaScript'>
// 이미지뷰어
<!--
var win= null;
function View_Open(img, w, h)
{
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/3;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars=yes,';
settings +='resizable=yes,';
settings +='status=no';
win=window.open("","newWindow",settings);
win.document.open();
win.document.write ("<html><head><title>원본 이미지 보기</title></head>");
win.document.write ("<script>function init(){window.resizeBy(document.all.pop_img.width-document.body.clientWidth, document.all.pop_img.height-document.body.clientHeight+10);}</script>");
win.document.write ("<body bgcolor=white topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload='init();'>");
win.document.write ("<img src='"+img+"' border=0 onclick='window.close();' style='cursor:hand' title='클릭하면 닫혀요' id='pop_img'>");
win.document.write ("</body></html>");
win.document.close();
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
image_directory = ""; //배경이미지 경로
clear = new Image(); clear.src = image_directory + "./img/blank.gif";
<?
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 5 ";
$result2 = sql_query($sql2);
for ($j=0; $row2 = sql_fetch_array($result2); $j++) {
$view_one = "{$g4['path']}/data/file/{$bo_table}/{$row2['bf_file']}";
?>
view_img<?=$j?> = new Image();
view_img<?=$j?>.src = "<?=$g4['path']?>/data/file/<?=$bo_table?>/<?=$row2['bf_file']?>";
<? } ?>
function bgChange(imgName) {
document.all.view_img.src = eval(imgName + ".src");
}
// -->
</SCRIPT>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr bgcolor="#a7dfe1" height="50">
<td colspan="5"></td>
</tr>
<tr height="10">
<td colspan="5"></td>
</tr>
<tr>
<td width="10"></td>
<td bgcolor="#f1f1f1" style="padding:10 0 10 0px;" width="500" align="center" valign="top">
<div style='width:450px; position:relative; overflow:hidden;' align=center><img src="<?=$view_one?>" name="view_img" border="0"></a></div></td>
<td width="10">
</td>
<td bgcolor="#f1f1f1" style="padding:10 0 10 0px;" width="200" height="450" align="center" valign="top">
<?
//파일 뽑기
$sql = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 5 ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
//썸네일 코드 시작
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path . '/thumbOpen';
$imgwidth=180; //표시할 이미지의 가로사이즈
$imgheight=0; //표시할 이미지의 세로사이즈
$filename = $row[bf_file]; //파일명
include_once("$g4[path]/lib/thumb.lib.php");
$image = $list[file][$i][file]; //원본
$thumb=thumbnail($data_path. "/".$filename, $imgwidth, $imgheight, 0, 2); //썸네일이 없을경우 원본출력
if (file_exists($thumb) && $filename) {
?>
<a href="javascript:void(0);" onClick="View_Open('<?=$data_path?>/<?=$filename?>')" onMouseOver="bgChange('view_img<?=$i?>');" onMouseOut="bgChange('view_img<?=$i?>');"><img src='<?=$thumb?>' border=0 width=80 height=80></a><p>
<?
//onMouseOut="bgChange('clear');"
}
}
?></td>
<td width="10"></td>
</tr>
<tr>
<td height="10" colspan="5"></td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
?>
댓글 전체
팝업창 안의 큰이미지아래에 글자넣구 싶다는 뜻으로 이해했습니당~
<div style='width:450px; position:relative; overflow:hidden;' align=center><img src="<?=$view_one?>" name="view_img" border="0"></a><br>글자를 넣으세여~</div>
위 부분입니다
<div style='width:450px; position:relative; overflow:hidden;' align=center><img src="<?=$view_one?>" name="view_img" border="0"></a><br>글자를 넣으세여~</div>
위 부분입니다