고수님들 도와주세요 ㅠㅠ 정보
고수님들 도와주세요 ㅠㅠ본문
답사에 하이슬라이드를 접목시켰는데요
첫글에 있는 모든 이미지들이 썸네일로 저장되서 작은그림은 썸네일로 클릭하면 원본이미지가 하이슬라이드로 뜨거든요.
예를 들면)
1번이미지 2번이미지 3번이미지....
이런식으로 나옵니다.
제가 원하는것은 1번이미지나 2번이나 원하는 곳에 하나만 불러와서 넣을 려고 하는데 잘불러와지지가 않습니다.
예를 들면)
1번이미지
설명 : 어쩌구 저쩌구~~~~~
어쩌구저쩌구 이런식으로쓰고 2번이미지
이런식으로 제가 원하는이미지만 썸네일을 불러오고 싶은데 소스좀 봐주세요 아래부분에 제가 할려다가 실패한부분이 있습니다 ㅠㅠ 좀 도와주세요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 사진보이기 설정
// 각각의 설정은 0이 아니면 보인다.
//$pic_view = 1; // 사진보이기... 다른 숫자는 안보임 현재 사용안함
$pic_q =3 ; //한게시물당 몇개의 사진을 보여줄건가? 답사기로 쓸경우를 대비...
$p_con_len=18; //사진 설명글 글자수 조정
$pic_c = 1 ; //각 사진에 쓴 해당글 or 설명글 보이기.
$sub_con_v = 1; // 해당글 제목과 글내용 보이기, 0이 아니면 보인다.
$writer_v = 1; // 해당글 글쓴이 보이기, 0이 아니면 보인다.
$date_v = 1 ;// 해당글 날짜 보이기, 0이 아니면 보인다.
$hit_v = 1 ;// 해당글 조회수 보이기, 0이 아니면 보인다.
$thumbx=120; //썸네일 가로
$thumby=90; //썸네일 세로
$thumbxx= $thumbx+20;//사진테이블 크기조정..사진의 크기보다 20크다
$thumbyy = $thumby+6;
$p_width=$thumbxx*$pic_q;// 사진을 위하여 테이블 넓이 조정
$height_p=135;
$view_dap= 1; // 답사기 모드로 보기 1이면 답사기처럼 보이기..
//답사기모드일때는 글제목만 보이게 한다. 위의 설정중 조회수,글쓴이 날짜 히트수는등은 따로처리..
if($view_dap==!0){
$sub_con_v = 0; // 해당글 제목과 글내용 보이기, 0이 아니면 보인다.
$writer_v = 0; // 해당글 글쓴이 보이기, 0이 아니면 보인다.
$date_v = 0 ;// 해당글 날짜 보이기, 0이 아니면 보인다.
$hit_v = 0 ;// 해당글 조회수 보이기, 0이 아니면 보인다.
$p_width="100%";// 사진을 위하여 테이블 넓이 조정
$height_p=165;
}
$p_height=$thumbyy;// 사진설명을 위하여 테이블 높이 조정
if (($pic_c == !0)){$p_height=$thumbyy+30;}
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 9;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<style type="text/css">
<!--
.data { font-family:돋움; font-size:8pt; color:#999999; }
-->
</style>
<!--
1 ) Reference to the file containing the javascript.
This file must be located on your server.
-->
<script type="text/javascript" src="<?=$board_skin_path?>/highslide/highslide.js"></script>
<!--
2) Initialize the hs object and optionally override the settings defined at the top
of the highslide.js file. The parameter hs.graphicsDir is important!
-->
<script type="text/javascript">
hs.graphicsDir = '<?=$board_skin_path?>/highslide/graphics/';
// Identify a caption for all images. This can also be set inline for each image.
hs.captionId = 'the-caption';
hs.outlineType = 'rounded-white';
window.onload = function() {
hs.preloadImages(5);
}
</script>
<!--
3) These CSS-styles are necessary for the script to work. You may also put
them in an external CSS-file. See the webpage for documentation.
-->
<style type="text/css">
.highslide {
cursor: url(<?=$board_skin_path?>/highslide/graphics/zoomin.cur), pointer;
outline: none;
}
.highslide img {
border: 0px solid gray;
}
.highslide:hover img {
border: 2px solid white;
}
.highslide-image {
border: 2px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
display: none;
border: 2px solid white;
border-top: none;
font-family: Verdana, Helvetica;
font-size: 10pt;
padding: 5px;
background-color: white;
}
.highslide-loading {
display: block;
color: white;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
background-color: black;
/*
padding-left: 22px;
background-image: url(highslide/graphics/loader.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
*/
}
a.highslide-credits,
a.highslide-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
color: white;
background-color: gray;
}
.highslide-move {
cursor: move;
}
.highslide-display-block {
display: block;
}
.highslide-display-none {
display: none;
}
.control {
float: right;
display: block;
position: relative;
margin: 0 5px;
font-size: 9pt;
font-weight: none;
text-decoration: none;
text-transform: uppercase;
margin-top: 1px;
margin-bottom: 1px;
}
.control:hover {
border-top: 0px solid #333;
border-bottom: 1px solid #333;
margin-top: 0;
margin-bottom: 0;
}
.control, .control * {
color: #666;
}
</style>
<style type="text/css">
<!--
.w_fixed { table-layout:fixed; }
.w_font { font-family:돋움; font-size:9pt; color:#5E5E5E; }
.w_title { font-family:돋움; font-size:9pt; color:#5E5E5E; }
.w_num { font-family:돋움; font-size:9pt; color:#7BB2D6; }
.w_list { font-family:돋움; font-size:9pt; color:#6A6A6A; }
.w_notice { font-family:돋움; font-size:9pt; color:#2C88B9; }
.w_comment_cnt { font-family:돋움; font-size:8pt; color:#9A9A9A; }
.w_padding { PADDING-LEFT: 15px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; }
.w_padding2 { PADDING-LEFT: 15px; PADDING-TOP: 5px; }
.w_text { BORDER: #D3D3D3 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff; }
.w_textarea { BORDER: #D3D3D3 1px solid; BACKGROUND-COLOR: #ffffff; WIDTH: 100%; WORD-BREAK: break-all; }
.w_message { font-family:돋움; font-size:9pt; color:#4B4B4B; }
.w_norobot { font-family:돋움; font-size:9pt; color:#BB4681; }
-->
</style>
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 시작 -->
<table width="100%" cellspacing="0" cellpadding="0" style=padding-top:0px>
<tr>
<? if ($is_category) { ?><form name="fcategory" method="get">
<td width="50%"><select name=sca onchange="location='<?=$category_location?>'+this.value;"><option value=''>전체</option><?=$category_option?></select></td>
</form><? } ?>
<td height=25 align="right"><font class=w_font>게시물 <?=number_format($total_count)?>건</font><? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" width="63" height="22" border="0"></a><? } ?></td>
</tr>
</table>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 끝 -->
<!-- 여백 --><table width="100%" cellspacing="0" cellpadding="0"><tr><td height="5"></td></tr></table>
<!-- 게시판 제목 시작 -->
<table width="100%" cellspacing="0" cellpadding="0" background="<?=$board_skin_path?>/img/latest_l_bg.gif">
<form name="fboardlist" method="post">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<tr>
<? if($view_dap==0) {?>
<td height="36" width="40" align="center" ><font style="font-family:돋움; font-size:9pt; color:#333333"><strong>번호</strong></font></td>
<? if ($is_category) { ?><td width="70" align="center" ><font class=w_title><strong>분류</strong></font></td><? } ?>
<? if ($is_checkbox) { ?><td width="40" align="center" ><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td><? } ?>
<td align="center" width="<?=$p_width?>"><font class=w_title><strong>사진</strong></font></td>
<? if ($sub_con_v == !0) { ?><td align="center" ><font class=w_title><strong>제목과 글내용</strong></font></td><? } ?>
<? if ($writer_v == !0) { ?><td width="110" align="center" ><font class=w_title><strong>글쓴이</strong></font></td><? } ?>
<? if ($date_v == !0) { ?><td width="40" align="center" ><?=subject_sort_link('wr_datetime', $qstr2, 1)?><font class=w_title><strong>날짜</strong></font></a></td><? } ?>
<? if ($hit_v == !0) { ?><td width="40" align="center" ><font class=w_title><strong>조회</strong></font></td><? } ?>
<? if ($is_good) { ?><td width="40" align="center" ><font style="font-family:돋움; font-size:9pt; color:#7993AF"><strong>추천</strong></font></td><? } ?>
<? if ($is_nogood) { ?><td width="40" align="center" ><font style="font-family:돋움; font-size:9pt; color:#A07C7C"><strong>비추천</strong></font></td><? } ?>
<? } ?>
</tr>
</table>
<!-- 게시판 제목 끝 -->
<!-- 게시물 리스트 시작 -->
<table border='0' width="100%" cellspacing="0" cellpadding="0" class="w_fixed">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr <? if ($list[$i][is_notice]) { ?>bgcolor="#F9FBFB"<? } ?>>
<td width="40" align="center">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/notice_icon.gif\" width=30 height=16>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<font class=w_num><strong>{$list[$i][num]}</strong></font>";
else
echo "<font class=w_list>{$list[$i][num]}</font>";
?></td>
<? if ($is_category) { ?><td width="70" align="center"><font class=w_font><strong><a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a></strong></font></td><? } ?>
<? if ($is_checkbox) { ?><td width="40" align="center"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>">
<div align="center"><a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>"><img src="<?=$board_skin_path?>/img/modify_btn.gif" alt="수정" width="39" height="12" vspace="5" border="0" align="absmiddle" title="수정하기"></a></div>
</td><? } ?>
<td width="<?=$p_width?>" align="center" style="padding:0px;" valign=top align=left>
<? if($view_dap==!0) { // 답사기모드이면?>
<table border='0' width="100%" cellpadding="5" cellspacing="0" bgcolor='#F7f7f7'>
<tr>
<td>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
echo "<img src=\"$board_skin_path/img/arr_01.gif\" border=0>";
echo "<font color='#B44804'>제품명칭</font>";
echo "<img src=\"$board_skin_path/img/arr_03.gif\" border=0 align=absmiddle><a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font class=w_notice><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font class=w_list><strong>{$list[$i][subject]}</strong></font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class=w_comment_cnt>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
// echo " " . $list[$i][icon_file];
// echo " " . $list[$i][icon_link];
// echo " " . $list[$i][icon_hot];
// echo " " . $list[$i][icon_secret];
// echo " <font class=w_font> 읽음 : {$list[$i][wr_hit]}</font>";
echo $nobr_end;
?>
</td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
<tr>
<td width=100%>
<img src=<?=$board_skin_path?>/img/arr_01.gif border=0><?=$list[$i][wr_content]?>
</td>
</tr>
</table>
<? } ?>
<table height="1" cellpadding="0" cellspacing="0" border="0" style="padding:0px;" align=left>
<tr>
<? //for GD ***이미지 보이기
$wr_id2=$list[$i][wr_id];
$sql3 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id2' order by bf_no asc limit 0, $pic_q ";
$result3 = sql_query($sql3);
while ($row3 = sql_fetch_array($result3)) {
$pic_con = $row3[bf_content];
$pic_content=conv_subject($pic_con, $p_con_len, "…");//conv_subject($list[wr_subject], $subject_len, "…");
$image = "$g4[path]/data/file/$bo_table/".$row3[bf_file];
$img = "$g4[path]/data/file/$bo_table/".$row3[bf_file];
$destfile =$img.'pic_1Thumb'; // 썸네일 파일명
$size = @getimagesize($img);
if(is_array($size) && !is_file($destfile)) {
switch($size[2]) {
case(1) :
if(function_exists('ImageCreateFromGif')) $im = ImageCreateFromGif($img);
break;
case(2) :
if(function_exists('ImageCreateFromJpeg')) $im = ImageCreateFromJpeg($img);
break;
case(3) :
if(function_exists('ImageCreateFromPng')) $im = ImageCreateFromPng($img);
break;
}
$fixsize = mando_image_size($size[0], $size[1], $thumbx, $thumby);
if($im) {
if($i==0) @exec("rm ".dirname($_SERVER[SCRIPT_FILENAME])."/data/file/$bo_table/*pic_1Thumb-rf");
if(function_exists('ImageCreateTrueColor')) $newim = ImageCreateTrueColor($fixsize[x],$fixsize[y]);
else $newim = ImageCreate($fixsize[x],$fixsize[y]);
if(function_exists('ImageCopyResampled')) ImageCopyResampled($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
else ImageCopyResized($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
ImageDestroy($im);
ImageJpeg($newim, $destfile, 100);
ImageDestroy($newim);
unset($im, $newim);
}
$list[$i][img][x] = $fixsize[x];
$list[$i][img][y] = $fixsize[y];
} else {
if(is_file($destfile)) {
$size = @getimagesize($destfile);
$list[$i][img][x] = $size[0];
$list[$i][img][y] = $size[1];
} else {
$img = "";
$size = @getimagesize($img);
$list[$i][img][x] = $thumbx;
$list[$i][img][y] = $thumby;
}
}
if(is_file($destfile))$img = $destfile;
//$p_height=$thumbyy;// 사진설명을 위하여 테이블 높이 조정
//if (($pic_c == !0) && ($pic_con)){$p_height=$thumbyy;}
// 사진(그림)설명글 뽑기
//$bf_no=$row3[bf_no];
//$sql4 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id2' and bf_no = '$bf_no' ";
//$result4 = sql_query($sql4);
// while ($row4 = sql_fetch_array($result4)) {
// $p_c=0;
// if($row4[bf_content]){$p_c=1;}
//$pic_content=get_text($row4[bf_content]);
//$p_height="129";// 사진설명을 위하여 테이블 높이 조정
// if (($pic_c == !0) && ($pic_content)){$p_height="159";}
// }
?>
<td align=left>
<table width='<?=$thumbxx?>' height="<?=$p_height?>" cellpadding="0" cellspacing="0" border="0" style='padding-bottom:7px;' align=left>
<tr>
<td height='<?=$thumbyy?>' style='padding-top:5px;padding-bottom:5px;'>
<table width="10" bgcolor='#ffffff' height='<?=$thumby?>' cellpadding="3" cellspacing="0" border="0" align="center">
<tr>
<td align="center" valign="middle" style='border:1px solid #cfcfcf'><a href='<?=$g4[path]?>/<?=$bo_table?>/<?=$image?>') class='highslide' onclick='return hs.expand(this)' ><img src=" <?=$destfile?>" width="<?=$list[$i][img][x]?>" height="<?=$list[$i][img][y]?>" border="0" title="<?=$list[$i][wr_content]?>" align="center"></a></td>
</tr>
</table>
</td>
</tr>
<? if (($pic_c == !0) && ($pic_content)){//사진설명 ?>
<tr>
<td height="30" align="center" valign="top">
<table height='25' width="96%" bgcolor='#f7f7f7' cellpadding="0" cellspacing="0" border="0">
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
<tr>
<td align="center" valign="middle" style='border:0px solid #cfcfcf'>
<?= $pic_content?>
</td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
</table>
</td>
</tr>
<?}?>
</table>
</td>
<?}//GD while?>
</tr>
</table>
이부분입니다~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<?
$abc = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $abc)) {
echo "<a href='{$g4[path]}/{$bo_table}/{$image}') class='highslide' onclick='return hs.expand(this)' >";
echo "<img src='{$abc}' width='{$list[$i][img][x]}' height='{$list[$i][img][y]}' border='0' title='{$list[$i][wr_content]}' align='center'>"; // 이미지크기
echo "</a>";
} else
echo "";
?>
이부분까지입니다~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</td>
<? if ($sub_con_v == !0) { ?>
<td width="100%" height="100%" align="left" style='word-break:break-all;' valign=top>
<table width="100%" cellpadding="5" cellspacing="0" >
<tr>
<td bgcolor="#f7f7f7">
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font class=w_notice><strong>{$list[$i][subject]}</strong></font>";
else
echo "<img src=\"$board_skin_path/img/sub_icon.gif\" border=0 align=absmiddle> <font class=w_list><strong>{$list[$i][subject]}</strong></font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class=w_comment_cnt>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_file];
// echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
// echo " " . $list[$i][icon_secret];
echo $nobr_end;
?></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
<tr>
<td width=100%><?=$list[$i][wr_content]?></td>
</tr>
</table>
</td>
<? } ?>
<? if ($writer_v == !0) { ?><td width="110" align="center"><font class=w_font><?=$list[$i][name]?></font></td><? } ?>
<? if ($date_v == !0) { ?><td width="40" align="center" ><font class=w_font><?=$list[$i][datetime2]?></font></td><? } ?>
<? if ($hit_v == !0) { ?><td width="40" align="center"><font class=w_font><?=$list[$i][wr_hit]?></font></td><? } ?>
<? if ($is_good) { ?><td width="40" align="center" ><font class=w_font><?=$list[$i][wr_good]?></font></td><? } ?>
<? if ($is_nogood) { ?><td width="40" align="center" ><font class=w_font><?=$list[$i][wr_nogood]?></font></td><? } ?>
</tr>
<div class='highslide-caption' id='the-caption'>
<a href="#" onclick="return hs.previous(this)" class="control" style="float:left; display: block">이전</a>
<a href="#" onclick="return hs.next(this)" class="control" style="float:left; display: block; text-align: right; margin-left: 4px">다음</a>
<a href="#" onclick="return hs.close(this)" class="control">닫기</a>
<a href="#" class="highslide-move control">화면이동</a>
<div style="clear:both"></div>
</div>
<tr>
<td colspan="<?=$colspan?>" height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</form>
</table>
<!-- 게시물 리스트 끝 -->
<!-- 페이지 표시 시작 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center" background="<?=$board_skin_path?>/img/number_line.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=50 height=20 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font>", $write_pages);
?>
<strong><?=$write_pages?></strong>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' width=50 height=20 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- 페이지 표시 끝 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr align="left">
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0"></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
<? } ?>
</td>
<form name=fsearch method=get>
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select>
<INPUT maxLength=15 size=10 name=stx itemname="검색어" required value="<?=$stx?>">
<SELECT name=sop>
<OPTION value=and>And</OPTION>
<OPTION value=or>Or</OPTION>
</SELECT>
</td>
<td width="10%" align="center"><INPUT type=image width="53" height="18" src="<?=$board_skin_path?>/img/search_btn.gif" border=0></td>
</form>
</tr>
</table>
</td></tr></table>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
첫글에 있는 모든 이미지들이 썸네일로 저장되서 작은그림은 썸네일로 클릭하면 원본이미지가 하이슬라이드로 뜨거든요.
예를 들면)
1번이미지 2번이미지 3번이미지....
이런식으로 나옵니다.
제가 원하는것은 1번이미지나 2번이나 원하는 곳에 하나만 불러와서 넣을 려고 하는데 잘불러와지지가 않습니다.
예를 들면)
1번이미지
설명 : 어쩌구 저쩌구~~~~~
어쩌구저쩌구 이런식으로쓰고 2번이미지
이런식으로 제가 원하는이미지만 썸네일을 불러오고 싶은데 소스좀 봐주세요 아래부분에 제가 할려다가 실패한부분이 있습니다 ㅠㅠ 좀 도와주세요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 사진보이기 설정
// 각각의 설정은 0이 아니면 보인다.
//$pic_view = 1; // 사진보이기... 다른 숫자는 안보임 현재 사용안함
$pic_q =3 ; //한게시물당 몇개의 사진을 보여줄건가? 답사기로 쓸경우를 대비...
$p_con_len=18; //사진 설명글 글자수 조정
$pic_c = 1 ; //각 사진에 쓴 해당글 or 설명글 보이기.
$sub_con_v = 1; // 해당글 제목과 글내용 보이기, 0이 아니면 보인다.
$writer_v = 1; // 해당글 글쓴이 보이기, 0이 아니면 보인다.
$date_v = 1 ;// 해당글 날짜 보이기, 0이 아니면 보인다.
$hit_v = 1 ;// 해당글 조회수 보이기, 0이 아니면 보인다.
$thumbx=120; //썸네일 가로
$thumby=90; //썸네일 세로
$thumbxx= $thumbx+20;//사진테이블 크기조정..사진의 크기보다 20크다
$thumbyy = $thumby+6;
$p_width=$thumbxx*$pic_q;// 사진을 위하여 테이블 넓이 조정
$height_p=135;
$view_dap= 1; // 답사기 모드로 보기 1이면 답사기처럼 보이기..
//답사기모드일때는 글제목만 보이게 한다. 위의 설정중 조회수,글쓴이 날짜 히트수는등은 따로처리..
if($view_dap==!0){
$sub_con_v = 0; // 해당글 제목과 글내용 보이기, 0이 아니면 보인다.
$writer_v = 0; // 해당글 글쓴이 보이기, 0이 아니면 보인다.
$date_v = 0 ;// 해당글 날짜 보이기, 0이 아니면 보인다.
$hit_v = 0 ;// 해당글 조회수 보이기, 0이 아니면 보인다.
$p_width="100%";// 사진을 위하여 테이블 넓이 조정
$height_p=165;
}
$p_height=$thumbyy;// 사진설명을 위하여 테이블 높이 조정
if (($pic_c == !0)){$p_height=$thumbyy+30;}
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 9;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<style type="text/css">
<!--
.data { font-family:돋움; font-size:8pt; color:#999999; }
-->
</style>
<!--
1 ) Reference to the file containing the javascript.
This file must be located on your server.
-->
<script type="text/javascript" src="<?=$board_skin_path?>/highslide/highslide.js"></script>
<!--
2) Initialize the hs object and optionally override the settings defined at the top
of the highslide.js file. The parameter hs.graphicsDir is important!
-->
<script type="text/javascript">
hs.graphicsDir = '<?=$board_skin_path?>/highslide/graphics/';
// Identify a caption for all images. This can also be set inline for each image.
hs.captionId = 'the-caption';
hs.outlineType = 'rounded-white';
window.onload = function() {
hs.preloadImages(5);
}
</script>
<!--
3) These CSS-styles are necessary for the script to work. You may also put
them in an external CSS-file. See the webpage for documentation.
-->
<style type="text/css">
.highslide {
cursor: url(<?=$board_skin_path?>/highslide/graphics/zoomin.cur), pointer;
outline: none;
}
.highslide img {
border: 0px solid gray;
}
.highslide:hover img {
border: 2px solid white;
}
.highslide-image {
border: 2px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
display: none;
border: 2px solid white;
border-top: none;
font-family: Verdana, Helvetica;
font-size: 10pt;
padding: 5px;
background-color: white;
}
.highslide-loading {
display: block;
color: white;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
background-color: black;
/*
padding-left: 22px;
background-image: url(highslide/graphics/loader.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
*/
}
a.highslide-credits,
a.highslide-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
color: white;
background-color: gray;
}
.highslide-move {
cursor: move;
}
.highslide-display-block {
display: block;
}
.highslide-display-none {
display: none;
}
.control {
float: right;
display: block;
position: relative;
margin: 0 5px;
font-size: 9pt;
font-weight: none;
text-decoration: none;
text-transform: uppercase;
margin-top: 1px;
margin-bottom: 1px;
}
.control:hover {
border-top: 0px solid #333;
border-bottom: 1px solid #333;
margin-top: 0;
margin-bottom: 0;
}
.control, .control * {
color: #666;
}
</style>
<style type="text/css">
<!--
.w_fixed { table-layout:fixed; }
.w_font { font-family:돋움; font-size:9pt; color:#5E5E5E; }
.w_title { font-family:돋움; font-size:9pt; color:#5E5E5E; }
.w_num { font-family:돋움; font-size:9pt; color:#7BB2D6; }
.w_list { font-family:돋움; font-size:9pt; color:#6A6A6A; }
.w_notice { font-family:돋움; font-size:9pt; color:#2C88B9; }
.w_comment_cnt { font-family:돋움; font-size:8pt; color:#9A9A9A; }
.w_padding { PADDING-LEFT: 15px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; }
.w_padding2 { PADDING-LEFT: 15px; PADDING-TOP: 5px; }
.w_text { BORDER: #D3D3D3 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff; }
.w_textarea { BORDER: #D3D3D3 1px solid; BACKGROUND-COLOR: #ffffff; WIDTH: 100%; WORD-BREAK: break-all; }
.w_message { font-family:돋움; font-size:9pt; color:#4B4B4B; }
.w_norobot { font-family:돋움; font-size:9pt; color:#BB4681; }
-->
</style>
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 시작 -->
<table width="100%" cellspacing="0" cellpadding="0" style=padding-top:0px>
<tr>
<? if ($is_category) { ?><form name="fcategory" method="get">
<td width="50%"><select name=sca onchange="location='<?=$category_location?>'+this.value;"><option value=''>전체</option><?=$category_option?></select></td>
</form><? } ?>
<td height=25 align="right"><font class=w_font>게시물 <?=number_format($total_count)?>건</font><? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" width="63" height="22" border="0"></a><? } ?></td>
</tr>
</table>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 끝 -->
<!-- 여백 --><table width="100%" cellspacing="0" cellpadding="0"><tr><td height="5"></td></tr></table>
<!-- 게시판 제목 시작 -->
<table width="100%" cellspacing="0" cellpadding="0" background="<?=$board_skin_path?>/img/latest_l_bg.gif">
<form name="fboardlist" method="post">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<tr>
<? if($view_dap==0) {?>
<td height="36" width="40" align="center" ><font style="font-family:돋움; font-size:9pt; color:#333333"><strong>번호</strong></font></td>
<? if ($is_category) { ?><td width="70" align="center" ><font class=w_title><strong>분류</strong></font></td><? } ?>
<? if ($is_checkbox) { ?><td width="40" align="center" ><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td><? } ?>
<td align="center" width="<?=$p_width?>"><font class=w_title><strong>사진</strong></font></td>
<? if ($sub_con_v == !0) { ?><td align="center" ><font class=w_title><strong>제목과 글내용</strong></font></td><? } ?>
<? if ($writer_v == !0) { ?><td width="110" align="center" ><font class=w_title><strong>글쓴이</strong></font></td><? } ?>
<? if ($date_v == !0) { ?><td width="40" align="center" ><?=subject_sort_link('wr_datetime', $qstr2, 1)?><font class=w_title><strong>날짜</strong></font></a></td><? } ?>
<? if ($hit_v == !0) { ?><td width="40" align="center" ><font class=w_title><strong>조회</strong></font></td><? } ?>
<? if ($is_good) { ?><td width="40" align="center" ><font style="font-family:돋움; font-size:9pt; color:#7993AF"><strong>추천</strong></font></td><? } ?>
<? if ($is_nogood) { ?><td width="40" align="center" ><font style="font-family:돋움; font-size:9pt; color:#A07C7C"><strong>비추천</strong></font></td><? } ?>
<? } ?>
</tr>
</table>
<!-- 게시판 제목 끝 -->
<!-- 게시물 리스트 시작 -->
<table border='0' width="100%" cellspacing="0" cellpadding="0" class="w_fixed">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr <? if ($list[$i][is_notice]) { ?>bgcolor="#F9FBFB"<? } ?>>
<td width="40" align="center">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/notice_icon.gif\" width=30 height=16>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<font class=w_num><strong>{$list[$i][num]}</strong></font>";
else
echo "<font class=w_list>{$list[$i][num]}</font>";
?></td>
<? if ($is_category) { ?><td width="70" align="center"><font class=w_font><strong><a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a></strong></font></td><? } ?>
<? if ($is_checkbox) { ?><td width="40" align="center"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>">
<div align="center"><a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>"><img src="<?=$board_skin_path?>/img/modify_btn.gif" alt="수정" width="39" height="12" vspace="5" border="0" align="absmiddle" title="수정하기"></a></div>
</td><? } ?>
<td width="<?=$p_width?>" align="center" style="padding:0px;" valign=top align=left>
<? if($view_dap==!0) { // 답사기모드이면?>
<table border='0' width="100%" cellpadding="5" cellspacing="0" bgcolor='#F7f7f7'>
<tr>
<td>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
echo "<img src=\"$board_skin_path/img/arr_01.gif\" border=0>";
echo "<font color='#B44804'>제품명칭</font>";
echo "<img src=\"$board_skin_path/img/arr_03.gif\" border=0 align=absmiddle><a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font class=w_notice><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font class=w_list><strong>{$list[$i][subject]}</strong></font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class=w_comment_cnt>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
// echo " " . $list[$i][icon_file];
// echo " " . $list[$i][icon_link];
// echo " " . $list[$i][icon_hot];
// echo " " . $list[$i][icon_secret];
// echo " <font class=w_font> 읽음 : {$list[$i][wr_hit]}</font>";
echo $nobr_end;
?>
</td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
<tr>
<td width=100%>
<img src=<?=$board_skin_path?>/img/arr_01.gif border=0><?=$list[$i][wr_content]?>
</td>
</tr>
</table>
<? } ?>
<table height="1" cellpadding="0" cellspacing="0" border="0" style="padding:0px;" align=left>
<tr>
<? //for GD ***이미지 보이기
$wr_id2=$list[$i][wr_id];
$sql3 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id2' order by bf_no asc limit 0, $pic_q ";
$result3 = sql_query($sql3);
while ($row3 = sql_fetch_array($result3)) {
$pic_con = $row3[bf_content];
$pic_content=conv_subject($pic_con, $p_con_len, "…");//conv_subject($list[wr_subject], $subject_len, "…");
$image = "$g4[path]/data/file/$bo_table/".$row3[bf_file];
$img = "$g4[path]/data/file/$bo_table/".$row3[bf_file];
$destfile =$img.'pic_1Thumb'; // 썸네일 파일명
$size = @getimagesize($img);
if(is_array($size) && !is_file($destfile)) {
switch($size[2]) {
case(1) :
if(function_exists('ImageCreateFromGif')) $im = ImageCreateFromGif($img);
break;
case(2) :
if(function_exists('ImageCreateFromJpeg')) $im = ImageCreateFromJpeg($img);
break;
case(3) :
if(function_exists('ImageCreateFromPng')) $im = ImageCreateFromPng($img);
break;
}
$fixsize = mando_image_size($size[0], $size[1], $thumbx, $thumby);
if($im) {
if($i==0) @exec("rm ".dirname($_SERVER[SCRIPT_FILENAME])."/data/file/$bo_table/*pic_1Thumb-rf");
if(function_exists('ImageCreateTrueColor')) $newim = ImageCreateTrueColor($fixsize[x],$fixsize[y]);
else $newim = ImageCreate($fixsize[x],$fixsize[y]);
if(function_exists('ImageCopyResampled')) ImageCopyResampled($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
else ImageCopyResized($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
ImageDestroy($im);
ImageJpeg($newim, $destfile, 100);
ImageDestroy($newim);
unset($im, $newim);
}
$list[$i][img][x] = $fixsize[x];
$list[$i][img][y] = $fixsize[y];
} else {
if(is_file($destfile)) {
$size = @getimagesize($destfile);
$list[$i][img][x] = $size[0];
$list[$i][img][y] = $size[1];
} else {
$img = "";
$size = @getimagesize($img);
$list[$i][img][x] = $thumbx;
$list[$i][img][y] = $thumby;
}
}
if(is_file($destfile))$img = $destfile;
//$p_height=$thumbyy;// 사진설명을 위하여 테이블 높이 조정
//if (($pic_c == !0) && ($pic_con)){$p_height=$thumbyy;}
// 사진(그림)설명글 뽑기
//$bf_no=$row3[bf_no];
//$sql4 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id2' and bf_no = '$bf_no' ";
//$result4 = sql_query($sql4);
// while ($row4 = sql_fetch_array($result4)) {
// $p_c=0;
// if($row4[bf_content]){$p_c=1;}
//$pic_content=get_text($row4[bf_content]);
//$p_height="129";// 사진설명을 위하여 테이블 높이 조정
// if (($pic_c == !0) && ($pic_content)){$p_height="159";}
// }
?>
<td align=left>
<table width='<?=$thumbxx?>' height="<?=$p_height?>" cellpadding="0" cellspacing="0" border="0" style='padding-bottom:7px;' align=left>
<tr>
<td height='<?=$thumbyy?>' style='padding-top:5px;padding-bottom:5px;'>
<table width="10" bgcolor='#ffffff' height='<?=$thumby?>' cellpadding="3" cellspacing="0" border="0" align="center">
<tr>
<td align="center" valign="middle" style='border:1px solid #cfcfcf'><a href='<?=$g4[path]?>/<?=$bo_table?>/<?=$image?>') class='highslide' onclick='return hs.expand(this)' ><img src=" <?=$destfile?>" width="<?=$list[$i][img][x]?>" height="<?=$list[$i][img][y]?>" border="0" title="<?=$list[$i][wr_content]?>" align="center"></a></td>
</tr>
</table>
</td>
</tr>
<? if (($pic_c == !0) && ($pic_content)){//사진설명 ?>
<tr>
<td height="30" align="center" valign="top">
<table height='25' width="96%" bgcolor='#f7f7f7' cellpadding="0" cellspacing="0" border="0">
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
<tr>
<td align="center" valign="middle" style='border:0px solid #cfcfcf'>
<?= $pic_content?>
</td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
</table>
</td>
</tr>
<?}?>
</table>
</td>
<?}//GD while?>
</tr>
</table>
이부분입니다~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<?
$abc = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $abc)) {
echo "<a href='{$g4[path]}/{$bo_table}/{$image}') class='highslide' onclick='return hs.expand(this)' >";
echo "<img src='{$abc}' width='{$list[$i][img][x]}' height='{$list[$i][img][y]}' border='0' title='{$list[$i][wr_content]}' align='center'>"; // 이미지크기
echo "</a>";
} else
echo "";
?>
이부분까지입니다~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</td>
<? if ($sub_con_v == !0) { ?>
<td width="100%" height="100%" align="left" style='word-break:break-all;' valign=top>
<table width="100%" cellpadding="5" cellspacing="0" >
<tr>
<td bgcolor="#f7f7f7">
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font class=w_notice><strong>{$list[$i][subject]}</strong></font>";
else
echo "<img src=\"$board_skin_path/img/sub_icon.gif\" border=0 align=absmiddle> <font class=w_list><strong>{$list[$i][subject]}</strong></font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class=w_comment_cnt>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_file];
// echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
// echo " " . $list[$i][icon_secret];
echo $nobr_end;
?></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td></tr>
<tr>
<td width=100%><?=$list[$i][wr_content]?></td>
</tr>
</table>
</td>
<? } ?>
<? if ($writer_v == !0) { ?><td width="110" align="center"><font class=w_font><?=$list[$i][name]?></font></td><? } ?>
<? if ($date_v == !0) { ?><td width="40" align="center" ><font class=w_font><?=$list[$i][datetime2]?></font></td><? } ?>
<? if ($hit_v == !0) { ?><td width="40" align="center"><font class=w_font><?=$list[$i][wr_hit]?></font></td><? } ?>
<? if ($is_good) { ?><td width="40" align="center" ><font class=w_font><?=$list[$i][wr_good]?></font></td><? } ?>
<? if ($is_nogood) { ?><td width="40" align="center" ><font class=w_font><?=$list[$i][wr_nogood]?></font></td><? } ?>
</tr>
<div class='highslide-caption' id='the-caption'>
<a href="#" onclick="return hs.previous(this)" class="control" style="float:left; display: block">이전</a>
<a href="#" onclick="return hs.next(this)" class="control" style="float:left; display: block; text-align: right; margin-left: 4px">다음</a>
<a href="#" onclick="return hs.close(this)" class="control">닫기</a>
<a href="#" class="highslide-move control">화면이동</a>
<div style="clear:both"></div>
</div>
<tr>
<td colspan="<?=$colspan?>" height="1" background="<?=$board_skin_path?>/img/dot_bg.gif"></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</form>
</table>
<!-- 게시물 리스트 끝 -->
<!-- 페이지 표시 시작 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center" background="<?=$board_skin_path?>/img/number_line.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=50 height=20 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font>", $write_pages);
?>
<strong><?=$write_pages?></strong>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' width=50 height=20 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- 페이지 표시 끝 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr align="left">
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0"></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
<? } ?>
</td>
<form name=fsearch method=get>
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select>
<INPUT maxLength=15 size=10 name=stx itemname="검색어" required value="<?=$stx?>">
<SELECT name=sop>
<OPTION value=and>And</OPTION>
<OPTION value=or>Or</OPTION>
</SELECT>
</td>
<td width="10%" align="center"><INPUT type=image width="53" height="18" src="<?=$board_skin_path?>/img/search_btn.gif" border=0></td>
</form>
</tr>
</table>
</td></tr></table>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
댓글 전체