이미지 게시판 스킨에서 no image가... 도와주세요. -_-;; 정보
이미지 게시판 스킨에서 no image가... 도와주세요. -_-;;본문
위에 링크된 이미지 게시판 스킨을 사용하고 있는데요.
이미지를 글 사이사이에 올리려면 cheditor를 써야 하는 게 맞죠?
cheditor로 이미지를 올리면 글목록 썸네일에 no image라고 나와요. -_-;;
cheditor로 이미지를 올리면 혹시 저장경로가 달라지나요? 그래서 그런가 하고 있는데요...
제가 소스를 수정할 능력이 없어서... 고수분들 좀 도와주세요~
아래는 cheditor로 이미지 올릴 때 no image가 뜨는 list.skin.php 소스 전체입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 게시판 설정
if (!$board[bo_10]) $board[bo_10]="100"; // 이미지박스크기
if (!$board[bo_10]) $board[bo_10]="100"; // 이미지박스크기
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
$max = $board[bo_10] - 5 ; // 이미지의 가로세로(긴쪽)의 최대치.
$noIMG = $board_skin_path."/img/noimage.gif"; // URL
$resol = 80 ; // 생성되는 썸네일의 JPG압축률.(퍼센트%)
$resol = 80 ; // 생성되는 썸네일의 JPG압축률.(퍼센트%)
function smaller( $W, $H ) {
global $max, $thum_W, $thum_H ;
global $max, $thum_W, $thum_H ;
if ( $W > $H ) { //가로형일 경우.
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) { //세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) { //정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}
return $thum_W ;
return $thum_H ;
}
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) { //세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) { //정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}
return $thum_W ;
return $thum_H ;
}
function maker( $thum_W, $thum_H ) {
global $thum, $resol, $ori, $ori_info ;
//$newImg = ImageCreate($thum_W,$thum_H); // GD라이브러리 2.0 (이하일 경우)
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수
if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);
//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
Imagejpeg($newImg, $thum, $resol );
@chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수
if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);
//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
Imagejpeg($newImg, $thum, $resol );
@chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);
return $thum ;
}
}
##########################################
function showtextintags($text) {
$text = preg_replace("/(\<script)(.*?)(script>)/si", "dada", "$text");
$text = strip_tags($text);
$text = str_replace("<!--", "<!--", $text);
$text = preg_replace("/(\<)(.*?)(--\>)/mi", "".nl2br("\\2")."", $text);
return $text;
}
##########################################
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 10;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
$colspan = 10;
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>
?>
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<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; }
<!--
.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; }
.title_han {color:FFFFFF;font-weight:bold;font-size:9pt}
.list_han {color:13485D;font-size:9pt;text-decoration:none;text-decoration:none}
.list_han {color:13485D;font-size:9pt;text-decoration:none;text-decoration:none}
.title_eng {font-family:tahoma;color:FFFFFF;font-weight:bold;font-size:8pt;text-decoration:none}
.list_eng {font-family:tahoma;color:13485D;font-size:8pt;text-decoration:none}
.list_eng {font-family:tahoma;color:13485D;font-size:8pt;text-decoration:none}
.head_01 {font-family:verdana;font-size:8pt;color:#555555}
.head_02 {font-family:verdana;font-size:8pt;color:#555555;font-weight:bold;text-decoration:underline}
.head_02 {font-family:verdana;font-size:8pt;color:#555555;font-weight:bold;text-decoration:underline}
-->
</style>
</style>
<!-- 상단 타이틀 라인 부분 -->
<table width="<?=$width?>" border="0" cellspacing="0" cellpadding="0" align=center>
<tr><td colspan=5 height="5" bgcolor='#<?=$board[bo_3]?>'></td></tr>
<tr>
<td width='15'></td>
<td width="3"><table width="1" height="35" cellpadding=0 cellspacing=0><tr><td bgcolor='#<?=$board[bo_3]?>' height="15"></td></tr><tr><td></td></tr></table></td>
<td width="100" align='center'><b>갤러리 List</b></td>
<td width="3"><table width="1" height="35" cellpadding=0 cellspacing=0><tr><td bgcolor='#<?=$board[bo_3]?>' height="15"></td></tr><tr><td></td></tr></table></td>
<td></td>
<tr><td colspan=5 height="1" bgcolor="#ECECEC"></td></tr>
<tr><td colspan=5 height="1" bgcolor="#FFFFFF"></td></tr>
<tr><td colspan=5 height="1" bgcolor="#C4C4C4"></td></tr>
</tr>
</table>
<table width="<?=$width?>" border="0" cellspacing="0" cellpadding="0" align=center>
<tr><td colspan=5 height="5" bgcolor='#<?=$board[bo_3]?>'></td></tr>
<tr>
<td width='15'></td>
<td width="3"><table width="1" height="35" cellpadding=0 cellspacing=0><tr><td bgcolor='#<?=$board[bo_3]?>' height="15"></td></tr><tr><td></td></tr></table></td>
<td width="100" align='center'><b>갤러리 List</b></td>
<td width="3"><table width="1" height="35" cellpadding=0 cellspacing=0><tr><td bgcolor='#<?=$board[bo_3]?>' height="15"></td></tr><tr><td></td></tr></table></td>
<td></td>
<tr><td colspan=5 height="1" bgcolor="#ECECEC"></td></tr>
<tr><td colspan=5 height="1" bgcolor="#FFFFFF"></td></tr>
<tr><td colspan=5 height="1" bgcolor="#C4C4C4"></td></tr>
</tr>
</table>
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 시작 -->
<table width="100%" cellspacing="0" cellpadding="0">
<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" align="absmiddle"></a><? } ?></td>
</tr>
</table>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 끝 -->
<!-- 여백 --><table width="100%" cellspacing="0" cellpadding="0"><tr><td height="2"></td></tr></table>
<!-- 게시판 제목 시작 -->
<table width="100%" height=25 border=0 cellpadding=0 cellspacing=0 background="<?=$board_skin_path?>/img/board_t_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="">
<table width="100%" height=25 border=0 cellpadding=0 cellspacing=0 background="<?=$board_skin_path?>/img/board_t_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="">
<!-- 게시판 제목 끝 -->
<!-- 게시물 리스트 시작 -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr><td colspan="<?=$colspan?>" height="5" bgcolor=white></td></tr>
<tr height=28 class=list<?=($i%2)?> bgcolor='#FFFFFF'>
<td width="40" align="center" valign="middle">
<?
//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=list_eng><strong>{$list[$i][num]}</strong></font>";
//else
//echo "<font class=list_eng>{$list[$i][num]}</font>";
?></td>
<? if ($is_checkbox) { ?><td width="40" align="center" valign="middle"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td> <? } ?>
<?
//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=list_eng><strong>{$list[$i][num]}</strong></font>";
//else
//echo "<font class=list_eng>{$list[$i][num]}</font>";
?></td>
<? if ($is_checkbox) { ?><td width="40" align="center" valign="middle"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td> <? } ?>
<? // 이미지 처리부분
##################################################################################################
$thum = "";
$list_view = "";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$images = "$g4[path]/data/file/$bo_table/$image";
##################################################################################################
$thum = "";
$list_view = "";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$images = "$g4[path]/data/file/$bo_table/$image";
if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
$ori = "$g4[path]/data/file/$bo_table/$image"; //[필수](URL) "./img/Test.gif"
}
$ext = strtolower(substr(strrchr($ori,"."), 1)); //확장자
if ( $ext=="gif"||$ext=="jpg"||$ext=="jpeg"||$ext=="png"||$ext=="bmp"||$ext=="tif"||$ext=="tiff")
$ori_info=getimagesize($ori);
else
$ori_info="";
$ori_info=getimagesize($ori);
else
$ori_info="";
//===== 원파일이 [ 2JPG, 2JPEG, 3PNG ] 경우
if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) {
$thum = $ori.".Thum" ;
if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) {
$thum = $ori.".Thum" ;
if ( file_exists($thum) ) { // Thumbnail [O] 경우
$thum_info = getimagesize ($thum);
$thum_W = $thum_info[0] ;
$thum_H = $thum_info[1] ;
}
else { // Thumbnail [X] 경우
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
maker( $thum_W, $thum_H );
}
}
$thum_info = getimagesize ($thum);
$thum_W = $thum_info[0] ;
$thum_H = $thum_info[1] ;
}
else { // Thumbnail [X] 경우
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
maker( $thum_W, $thum_H );
}
}
}
//===== 원파일이 [ 1GIF,6BMP,7TIF ] 경우
else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) {
if ( smaller( $ori_info[0], $ori_info[1] ) ) { $thum = $ori ; }
}
else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) {
if ( smaller( $ori_info[0], $ori_info[1] ) ) { $thum = $ori ; }
}
//===== 원파일이 [ 1,2,3,6,7 ] 아닐 경우
else {
$thum = $noIMG ;
$noIMG_info = getimagesize ($noIMG);
$thum_W = $noIMG_info[0] ;
$thum_H = $noIMG_info[1] ;
}
else {
$thum = $noIMG ;
$noIMG_info = getimagesize ($noIMG);
$thum_W = $noIMG_info[0] ;
$thum_H = $noIMG_info[1] ;
}
$list_view = "<img src='$thum' width='$thum_W' height='$thum_H' border=0 align=absmiddle style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'>";
} else if (preg_match("/\.($config[cf_flash_extension])$/i", $image)) {
$list_view = "<embed src='$images' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'></embed>";
} else if (preg_match("/\.($config[cf_movie_extension])$/i", $image)) {
$list_view = "<embed src='$images' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'></embed>";
} else { $list_view = "<img src='$noIMG' alt='이미지 없음' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'>"; }
##################################################################################################
?>
<td width='110' align="left" valign="middle" style='word-break:break-all;'>
<a href='<?=$list[$i][href]?>'><?=$list_view?></a>
</td>
<td width='' align="left" valign="middle" style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
echo "<a href='{$list[$i][href]}'>"; // 제목에 링크 시작
$list_view = "<embed src='$images' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'></embed>";
} else if (preg_match("/\.($config[cf_movie_extension])$/i", $image)) {
$list_view = "<embed src='$images' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'></embed>";
} else { $list_view = "<img src='$noIMG' alt='이미지 없음' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'>"; }
##################################################################################################
?>
<td width='110' align="left" valign="middle" style='word-break:break-all;'>
<a href='<?=$list[$i][href]?>'><?=$list_view?></a>
</td>
<td width='' align="left" valign="middle" style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
echo "<a href='{$list[$i][href]}'>"; // 제목에 링크 시작
if ($list[$i][is_notice])
echo "<img src='{$board_skin_path}/img/icon.gif' border=0> <font class=head_02>{$list[$i][subject]}</font>";
else
echo "<img src='{$board_skin_path}/img/icon.gif' border=0> <font class=head_02>{$list[$i][subject]}</font>";
echo "</a>"; // 제목에 링크 끝
echo "{$list[$i][icon_new]}"; // 최신글 아이콘 출력
echo "<img src='{$board_skin_path}/img/icon.gif' border=0> <font class=head_02>{$list[$i][subject]}</font>";
else
echo "<img src='{$board_skin_path}/img/icon.gif' border=0> <font class=head_02>{$list[$i][subject]}</font>";
echo "</a>"; // 제목에 링크 끝
echo "{$list[$i][icon_new]}"; // 최신글 아이콘 출력
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class=w_comment_cnt>{$list[$i][comment_cnt]}</a>";
echo " <a href=\"{$list[$i][comment_href]}\"><span class=w_comment_cnt>{$list[$i][comment_cnt]}</a>";
$wr_content=$list[$i][wr_content];
$wr_content = showtextintags($wr_content);
$wr_content=cut_str($wr_content,200, '...');
//echo"$wr_content";
// 내용 출력 길이 제한 부분
//?><!-- <font color="#666666"><br><br><?//=cut_str($list[$i][wr_content],200,"...");?></font>--> <?//
?><font color="#666666"><br><br><?=$wr_content?></font> <?
$wr_content = showtextintags($wr_content);
$wr_content=cut_str($wr_content,200, '...');
//echo"$wr_content";
// 내용 출력 길이 제한 부분
//?><!-- <font color="#666666"><br><br><?//=cut_str($list[$i][wr_content],200,"...");?></font>--> <?//
?><font color="#666666"><br><br><?=$wr_content?></font> <?
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['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;
?>
<? if ($is_category) { ?><br><font class=w_font><strong>□ <a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a></strong></font><? } ?>
</td>
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_secret];
echo $nobr_end;
?>
<? if ($is_category) { ?><br><font class=w_font><strong>□ <a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a></strong></font><? } ?>
</td>
<? if ($is_good) { ?><td width="40" align="center" valign="middle"><font class=list_eng><?=$list[$i][wr_good]?></font></td><? } ?>
<? if ($is_nogood) { ?><td width="40" align="center" valign="middle"><font class=list_eng><?=$list[$i][wr_nogood]?></font></td><? } ?>
</tr>
<!-- 여백 --><tr><td colspan="<?=$colspan?>" height="15" bgcolor=white></td></tr>
<? if ($is_nogood) { ?><td width="40" align="center" valign="middle"><font class=list_eng><?=$list[$i][wr_nogood]?></font></td><? } ?>
</tr>
<!-- 여백 --><tr><td colspan="<?=$colspan?>" height="15" bgcolor=white></td></tr>
<!-- 구분선 처리 --><tr><td colspan="<?=$colspan?>" height="1" bgcolor=#efefef></td></tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</form>
</table>
<!-- 게시물 리스트 끝 -->
</form>
</table>
<!-- 게시물 리스트 끝 -->
<!-- 페이지 표시 시작 -->
<? if ($write_pages) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center" valign="middle" 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>
<? } ?>
<!-- 페이지 표시 끝 -->
<? if ($write_pages) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center" valign="middle" 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" valign="middle">
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/list.gif" border="0" align="absmiddle"></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/write.gif" border="0" align="absmiddle"></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/allchkdel.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/copy.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/move.gif" border="0" align="absmiddle"></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="50" height="20" src="<?=$board_skin_path?>/img/search.gif" border=0></td>
</form>
</tr>
</table>
<tr align="left" valign="middle">
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/list.gif" border="0" align="absmiddle"></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/write.gif" border="0" align="absmiddle"></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/allchkdel.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/copy.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/move.gif" border="0" align="absmiddle"></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="50" height="20" src="<?=$board_skin_path?>/img/search.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 ("<?=$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;
<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;
}
}
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;
{
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 (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
return;
f.action = "./delete_all.php";
f.submit();
}
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
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>
<? } ?>
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
댓글 전체
치에디터로 그림넣는것 말고
글쓰기 하단에 있는
파일에 이미지를 첨부하셔야 리스트화면에서 이미지가 뜨는거 아닌가요?
^^;
글쓰기 하단에 있는
파일에 이미지를 첨부하셔야 리스트화면에서 이미지가 뜨는거 아닌가요?
^^;