유아원님의 최신글 스킨 mainnewsphoto 이미지 원글 변경되도 최신글에는 그대로입니다. 정보
유아원님의 최신글 스킨 mainnewsphoto 이미지 원글 변경되도 최신글에는 그대로입니다.본문
유아원님의 최신글 스킨 mainnewsphoto 이미지 ..원글의 이미지가 변경되어도 최신글에는 그대로입니다.
최근게시물에 이미지 변경이 않되요.
bbs/delete.php 파일의 75번줄 부근
bbs/delete_all.php 파일의 92번줄 부근
bbs/write_update.php 파일의 155번줄 부근
// 파일삭제
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
이부분을 찾아서 바로 아래에
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/latest_thumb/$write[wr_id]"); //최근게시물 썸네일 삭제
bbs/delete_all.php 파일의 92번줄 부근
bbs/write_update.php 파일의 155번줄 부근
// 파일삭제
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
이부분을 찾아서 바로 아래에
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/latest_thumb/$write[wr_id]"); //최근게시물 썸네일 삭제
이방법으로 원 글의 섬네일은 변경이 되던데 latest는 이미지가 변경이 않되네요.
언제나 그렇듯이 자세한 설명 부탁드립니다.
댓글 전체
latest_thumb 부분을 썸네일이 생성되는 폴더로 지정하세요.
latest.skin.php 상단 부분입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb{$board[bo_4]}';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = $board[bo_6]; //1초는 1000, 2초는 2000....
------------ 생략 -----------------------
이것으로 지정하라는 것인가요 ??=>thumb{$board[bo_4]}
@unlink("$g4[path]/data/file/$bo_table/thumb{$board[bo_4]}/$write[wr_id]");
이렇게 했더니만 안되는데요. ~..~
data/file/게시판명 안에 thumb 라는 폴더와 thumb{board[bo_4]} 라는 폴더 그리고 주변에 올린 이미지 몇 개 이렇게 있습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb{$board[bo_4]}';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = $board[bo_6]; //1초는 1000, 2초는 2000....
------------ 생략 -----------------------
이것으로 지정하라는 것인가요 ??=>thumb{$board[bo_4]}
@unlink("$g4[path]/data/file/$bo_table/thumb{$board[bo_4]}/$write[wr_id]");
이렇게 했더니만 안되는데요. ~..~
data/file/게시판명 안에 thumb 라는 폴더와 thumb{board[bo_4]} 라는 폴더 그리고 주변에 올린 이미지 몇 개 이렇게 있습니다.
thumb{$board[bo_4]} 요부분을 bo_4에 입력한 값을 넣어보세요. ㅎㅎ
ㅎㅎ
게시판 관리자 여분 필드 4번째칸에 입력한 값을 말씀하시는 것인가요..? 숫자 요???
110이라고 넣었으니깐
@unlink("$g4[path]/data/file/$bo_table/110/$write[wr_id]");
요렇게 하면 되나요...한 5분정도 걸려요 ~..~ 하고 올께요. ㅎㅎ
게시판 관리자 여분 필드 4번째칸에 입력한 값을 말씀하시는 것인가요..? 숫자 요???
110이라고 넣었으니깐
@unlink("$g4[path]/data/file/$bo_table/110/$write[wr_id]");
요렇게 하면 되나요...한 5분정도 걸려요 ~..~ 하고 올께요. ㅎㅎ
않될것 같더니만 역시 않되는군요 ... ~..~ latest.skin.php 소스입니다.
bo_4dp에 입력한 값이 몬지 당췌 이해가 .... 하하 무식해서 참 쑥스럽네요 ... ㅎㅎㅎ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb{$board[bo_4]}';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = $board[bo_6]; //1초는 1000, 2초는 2000....
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<div align="left">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr> <td align="left">
<p align="left">
<?
for ($i=0; $i<count($list); $i++)
{
$img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $board[bo_5])
$dst = imagecreatetruecolor($board[bo_4], $height);
else
$dst = imagecreatetruecolor($board[bo_4], $board[bo_5]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_9]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$body_data4 = "
<table id=id_s4".$i." style='display:none' border='0' cellpadding='0' cellspacing='0' align='left'>
<tr>
<td align=left style='border:1px; solid #CCCCCC; padding:3px;'><a href='{$list[$i][href]}' onfocus='this.blur()'>{$img}</a></td>
</tr>
</tr>
<tr>
<td style='padding:3 0 3 0px;' align='left' class='sub'><a href='{$list[$i][href]}'>{$list[$i][subject]}</a></td>
</tr>
</table>
";
echo $body_data4;
}
?>
</p>
</td>
</tr>
</table>
</div>
<script language='JavaScript'>
var oldshow4 = 1;
var showid4 = 1;
function ssh_init4() {
eval("document.all.id_s4"+oldshow4+".style.display='none'");
eval("document.all.id_s4"+showid4+".style.display='block'");
oldshow4 = showid4;
showid4++;
if (showid4><?=$i-1?>) showid4=0;
setTimeout("ssh_init4()", <?=$sec_delay4?>);
} </script>
<script language='JavaScript'>
<? if (count($list)>0){ echo "ssh_init4();"; } ?> </script>
bo_4dp에 입력한 값이 몬지 당췌 이해가 .... 하하 무식해서 참 쑥스럽네요 ... ㅎㅎㅎ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb{$board[bo_4]}';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = $board[bo_6]; //1초는 1000, 2초는 2000....
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<div align="left">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr> <td align="left">
<p align="left">
<?
for ($i=0; $i<count($list); $i++)
{
$img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $board[bo_5])
$dst = imagecreatetruecolor($board[bo_4], $height);
else
$dst = imagecreatetruecolor($board[bo_4], $board[bo_5]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_9]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$body_data4 = "
<table id=id_s4".$i." style='display:none' border='0' cellpadding='0' cellspacing='0' align='left'>
<tr>
<td align=left style='border:1px; solid #CCCCCC; padding:3px;'><a href='{$list[$i][href]}' onfocus='this.blur()'>{$img}</a></td>
</tr>
</tr>
<tr>
<td style='padding:3 0 3 0px;' align='left' class='sub'><a href='{$list[$i][href]}'>{$list[$i][subject]}</a></td>
</tr>
</table>
";
echo $body_data4;
}
?>
</p>
</td>
</tr>
</table>
</div>
<script language='JavaScript'>
var oldshow4 = 1;
var showid4 = 1;
function ssh_init4() {
eval("document.all.id_s4"+oldshow4+".style.display='none'");
eval("document.all.id_s4"+showid4+".style.display='block'");
oldshow4 = showid4;
showid4++;
if (showid4><?=$i-1?>) showid4=0;
setTimeout("ssh_init4()", <?=$sec_delay4?>);
} </script>
<script language='JavaScript'>
<? if (count($list)>0){ echo "ssh_init4();"; } ?> </script>
@unlink("$g4[path]/data/file/$bo_table/thumb110/$write[wr_id]");
않되는데요 ... !!
bbs/delete_all.php
// 파일삭제
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/thumb[110]/$write[wr_id]"); //최근게시물 썸네일 삭제
bbs/delete.php
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/thumb[110]/$write[wr_id]"); //최근게시물 썸네일 삭제
bbs/write_update.php
// 존재하는 파일이 있다면 삭제합니다.
$row = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]");
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/thumb[110]/$write[wr_id]"); //최근게시물 썸네일 삭제
}
3개 파일에
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]"); <=이 소스 밑에 다 넣었거든요.
않되요, ㅎㅎ
bbs/delete_all.php
// 파일삭제
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/thumb[110]/$write[wr_id]"); //최근게시물 썸네일 삭제
bbs/delete.php
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/thumb[110]/$write[wr_id]"); //최근게시물 썸네일 삭제
bbs/write_update.php
// 존재하는 파일이 있다면 삭제합니다.
$row = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]");
@unlink("$g4[path]/data/file/$bo_table/thumb/$write[wr_id]"); //썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/thumb[110]/$write[wr_id]"); //최근게시물 썸네일 삭제
}
3개 파일에
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]"); <=이 소스 밑에 다 넣었거든요.
않되요, ㅎㅎ
최신글의 썸네일 주소가 어떻게 되나요?
메인화면에 있어요.
메인이 어딘지 - _-;;
URL을 알아야 정확한 답변을 드릴 수 있습니다.
URL을 알아야 정확한 답변을 드릴 수 있습니다.
메인에만 4개 쓰려는데 전에 충돌않나게 쓰는법 가르쳐 주셨는데 거억하시는지요 ㅎㅎ
최신글 코드를 잘못 짠것 같네요.
$thumb_path = $data_path.'/thumb{$board[bo_4]}';
위 부분을 아래처럼 수정하시고요.
$thumb_path = $data_path.'/thumb'.$board[bo_4];
다음과 같이 하시길. (bo_4 값이 110이면)
@unlink("$g4[path]/data/file/$bo_table/thumb110/$write[wr_id]");
$thumb_path = $data_path.'/thumb{$board[bo_4]}';
위 부분을 아래처럼 수정하시고요.
$thumb_path = $data_path.'/thumb'.$board[bo_4];
다음과 같이 하시길. (bo_4 값이 110이면)
@unlink("$g4[path]/data/file/$bo_table/thumb110/$write[wr_id]");
그누보드설치폴더/data/file/게시판테이블/{$board[bo_4]}/*
위 디렉토리에 있는 {$board[bo_4]} 디렉토리를 지워주세용.
위 디렉토리에 있는 {$board[bo_4]} 디렉토리를 지워주세용.
그러면 아직 가동하지 않는 1.2.3 도 원할이 돌아 가는지요.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'.$board[bo_4];
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = $board[bo_6]; //1초는 1000, 2초는 2000....
이렇게 했는데 ... 수정을 하면 교체가 않되네요.
thumb 폴더에서는 삭제되면서 교체가 되는데 thumb110는 여전히 교체가 않되고 라테스트도 교체가 않되네요
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'.$board[bo_4];
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = $board[bo_6]; //1초는 1000, 2초는 2000....
이렇게 했는데 ... 수정을 하면 교체가 않되네요.
thumb 폴더에서는 삭제되면서 교체가 되는데 thumb110는 여전히 교체가 않되고 라테스트도 교체가 않되네요
wr_id 값으로 썸네일이 생성되기 때문에, 수정시에는 썸네일이 교체되지 않습니다.
wr_id 값이 아닌 파일명으로 썸네일을 생성해야 될 것 같습니다.
wr_id 값이 아닌 파일명으로 썸네일을 생성해야 될 것 같습니다.
이럼 이 상황에서는 라테스트 유아원님꺼 쓸 수가 없나요.
파일명으로 교체하라심은 ...??? 송구스럽지만 방법좀 알려 주십시요...!! OTL
제가 원래 사진쟁이라 들로 산으로 돌아 다닐줄만 알았지 이 좋은 프로그램공부는 못했네요.
ㅎㅎㅎ
이작업 끝내고 모르쏠라에 사진 많이 올릴께요 ㅎㅎㅎㅎ
파일명으로 교체하라심은 ...??? 송구스럽지만 방법좀 알려 주십시요...!! OTL
제가 원래 사진쟁이라 들로 산으로 돌아 다닐줄만 알았지 이 좋은 프로그램공부는 못했네요.
ㅎㅎㅎ
이작업 끝내고 모르쏠라에 사진 많이 올릴께요 ㅎㅎㅎㅎ
생각만했지 만들어본적은 없네요. ^^
몇분뒤에 댓글 달겠습니다. 파이팅!! ^^
몇분뒤에 댓글 달겠습니다. 파이팅!! ^^
감사합니다
list.skin.php 파일에서 썸네일 뽑는 코드.
<?
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$result2 = sql_query($sql2);
for ($j=0; $row2 = sql_fetch_array($result2); $j++) {
//썸네일 코드 시작
$data_path = $g4['path'] . "/data/file/{$bo_table}";//라이브러리 파일 참조
$thumb_path = $data_path . '/thumbList';
$view_w = "54"; //썸네일 가로사이즈
$view_h = "41"; //썸네일 세로사이즈
$sch_q = "100"; //썸네일 퀼리티
if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $view_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $view_h)
$dst = imagecreatetruecolor($view_w, $height);
else
$dst = imagecreatetruecolor($view_w, $view_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $view_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
chmod($thumb_path.'/'.$filename, 0707);
}
}
if (file_exists($thumb) && $filename) {
echo "<a href='{$list[$i][href]}'><img src='{$thumb}' align='absmiddle' border='0'></a>";
}
}
?>
<?
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$result2 = sql_query($sql2);
for ($j=0; $row2 = sql_fetch_array($result2); $j++) {
//썸네일 코드 시작
$data_path = $g4['path'] . "/data/file/{$bo_table}";//라이브러리 파일 참조
$thumb_path = $data_path . '/thumbList';
$view_w = "54"; //썸네일 가로사이즈
$view_h = "41"; //썸네일 세로사이즈
$sch_q = "100"; //썸네일 퀼리티
if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $view_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $view_h)
$dst = imagecreatetruecolor($view_w, $height);
else
$dst = imagecreatetruecolor($view_w, $view_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $view_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
chmod($thumb_path.'/'.$filename, 0707);
}
}
if (file_exists($thumb) && $filename) {
echo "<a href='{$list[$i][href]}'><img src='{$thumb}' align='absmiddle' border='0'></a>";
}
}
?>
아~~정말 감사합니다.
지금 열심히 옮기고 잇습니다. 잠시 후 에 리플 달겠습니다
지금 열심히 옮기고 잇습니다. 잠시 후 에 리플 달겠습니다
크게 차이는 없지만, 최신글에서도 동일하게 썸네일을 파일명으로 뽑으셔야 합니다.
그래야 업데이트시 썸네일이 교체 됩니다. ^^
그래야 업데이트시 썸네일이 교체 됩니다. ^^
지금 쓰고있는 갤러리 게시판 스킨을 위의 소스처럼 고치라는 이야기죠 .. ~..~
엉망진창 난리 부르스입니다... 하하하
위의 소스를 지금 쓰고있는 갤러리 게시판에 적용하니깐 게시판이 먹통입니다. ...에공
섬네일만 수정하는 것이 아닌가 봅니다 ... 고군분투중입니다.
이 넘 만지작거리느라 오늘 꼬박 날밤샐것같습니다 ... 아~~흐 ㅎㅎㅎ
엉망진창 난리 부르스입니다... 하하하
위의 소스를 지금 쓰고있는 갤러리 게시판에 적용하니깐 게시판이 먹통입니다. ...에공
섬네일만 수정하는 것이 아닌가 봅니다 ... 고군분투중입니다.
이 넘 만지작거리느라 오늘 꼬박 날밤샐것같습니다 ... 아~~흐 ㅎㅎㅎ
이미지 출력하는 곳에 넣어줘야 합니다.
해당 게시판의 list.skin.php 파일을 남겨주시면 적절히 수정하여 드리겠습니다. ㅡ.ㅡa
해당 게시판의 list.skin.php 파일을 남겨주시면 적절히 수정하여 드리겠습니다. ㅡ.ㅡa
에공감사합니다 잠만요
요넘이 아까보신 갤러리 list.php입니다
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 제목길이 잘 맞추세요.
$thu_width = '116'; //썸네일 폭
$thu_height = '140'; //썸네일 높이
$thu_quality = '100'; //썸네일 퀄리티_100 이하
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
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>
/*
$tmp_bo_table = "cm_gallery_request";
$tmp_write_table = $g4[write_prefix] . $tmp_bo_table;
$sql = " select wr_id, wr_subject from $tmp_write_table where wr_is_comment = 0 and wr_comment = 0 order by wr_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
echo "<div align=center><a href='$g4[bbs_path]/board.php?bo_table=$tmp_bo_table&wr_id=$row[wr_id]'><span style='height:18px; color:crimson; cursor:pointer;'>★ 이미지 요청 : $row[wr_subject] ★</span></a></div><br>";
}
*/
?>
<style type="text/css">
.bo_ti { font-family:굴림; font-size:9pt; color:#555555; }
.data { font-family:돋움; font-size:8pt; color:#999999; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<!--<table width="100%" cellspacing="0" cellpadding="0">
<tr height="25">
<? 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 align="right">
게시물 <?=number_format($total_count)?>건
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?>
<? 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>
<tr><td height=5></td></tr>
</table>/-->
<form name="fboardlist" method="post" style="margin:0px;">
<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% cellpadding=0 cellspacing=0>
<!--<tr><td colspan='<?=$mod?>' height=2 bgcolor=#B0ADF5></td></tr>
<tr><td colspan='<?=$mod?>' height=25></td></tr>-->
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$image = $list[$i][file][0][file];
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$thu_width' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
//$rate = $thu_width / $size[0];
$rate = 110 / $size[0];
$height = (int)($size[1] * $rate);
if ($height < 135)
//if ($height < $thu_height)
//$dst = imagecreatetruecolor($thu_width, $height);
$dst = imagecreatetruecolor(110, 135);
else
$dst = imagecreatetruecolor($thu_width, $thu_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thu_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thu_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' width='$thu_width' border=0 style='border:1px solid #999999;'>";
$style = "";
if ($list[$i][icon_new])
$style = " style='font-weight:normal;' ";
$subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="thumb_1_2.gif";
else
$bg="thumb_1.gif";
echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>\n";
echo "<table width='150' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr><td height='34' align='center' background='{$board_skin_path}/myimg/$bg' style='padding-top:4px; padding-left:10px;' class='bo_ti'>$subject</td></tr>\n";
echo "<tr><td height='75' align='center' valign='top' background='{$board_skin_path}/myimg/thumb_2.gif' style='padding:10 0 7 0;'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" >$img</a></td></tr>\n";
echo "<tr><td height='23'><a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$board_skin_path}/myimg/thumb_3.gif' width='150' height='23' border='0'></a></td></tr>\n";
echo "<tr><td height='40' background='{$board_skin_path}/myimg/thumb_4.gif' style='padding-left:33px; padding-top:10px;' class='data'>{$list[$i][datetime2]}";
if ($is_checkbox) echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
echo "</td></tr>\n";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<tr><td colspan='<?=$mod?>' height=20></td></tr>
<tr><td colspan=<?=$mod?> height=1 bgcolor=#E7E7E7></td></tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
<tr><td colspan=<?=$mod?> bgcolor=#5C86AD height=1>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' 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>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<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>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</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>
<? } ?>
<!-- 게시판 목록 끝 -->
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 제목길이 잘 맞추세요.
$thu_width = '116'; //썸네일 폭
$thu_height = '140'; //썸네일 높이
$thu_quality = '100'; //썸네일 퀄리티_100 이하
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
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>
/*
$tmp_bo_table = "cm_gallery_request";
$tmp_write_table = $g4[write_prefix] . $tmp_bo_table;
$sql = " select wr_id, wr_subject from $tmp_write_table where wr_is_comment = 0 and wr_comment = 0 order by wr_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
echo "<div align=center><a href='$g4[bbs_path]/board.php?bo_table=$tmp_bo_table&wr_id=$row[wr_id]'><span style='height:18px; color:crimson; cursor:pointer;'>★ 이미지 요청 : $row[wr_subject] ★</span></a></div><br>";
}
*/
?>
<style type="text/css">
.bo_ti { font-family:굴림; font-size:9pt; color:#555555; }
.data { font-family:돋움; font-size:8pt; color:#999999; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<!--<table width="100%" cellspacing="0" cellpadding="0">
<tr height="25">
<? 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 align="right">
게시물 <?=number_format($total_count)?>건
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?>
<? 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>
<tr><td height=5></td></tr>
</table>/-->
<form name="fboardlist" method="post" style="margin:0px;">
<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% cellpadding=0 cellspacing=0>
<!--<tr><td colspan='<?=$mod?>' height=2 bgcolor=#B0ADF5></td></tr>
<tr><td colspan='<?=$mod?>' height=25></td></tr>-->
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$image = $list[$i][file][0][file];
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$thu_width' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
//$rate = $thu_width / $size[0];
$rate = 110 / $size[0];
$height = (int)($size[1] * $rate);
if ($height < 135)
//if ($height < $thu_height)
//$dst = imagecreatetruecolor($thu_width, $height);
$dst = imagecreatetruecolor(110, 135);
else
$dst = imagecreatetruecolor($thu_width, $thu_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thu_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thu_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' width='$thu_width' border=0 style='border:1px solid #999999;'>";
$style = "";
if ($list[$i][icon_new])
$style = " style='font-weight:normal;' ";
$subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="thumb_1_2.gif";
else
$bg="thumb_1.gif";
echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>\n";
echo "<table width='150' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr><td height='34' align='center' background='{$board_skin_path}/myimg/$bg' style='padding-top:4px; padding-left:10px;' class='bo_ti'>$subject</td></tr>\n";
echo "<tr><td height='75' align='center' valign='top' background='{$board_skin_path}/myimg/thumb_2.gif' style='padding:10 0 7 0;'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" >$img</a></td></tr>\n";
echo "<tr><td height='23'><a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$board_skin_path}/myimg/thumb_3.gif' width='150' height='23' border='0'></a></td></tr>\n";
echo "<tr><td height='40' background='{$board_skin_path}/myimg/thumb_4.gif' style='padding-left:33px; padding-top:10px;' class='data'>{$list[$i][datetime2]}";
if ($is_checkbox) echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
echo "</td></tr>\n";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<tr><td colspan='<?=$mod?>' height=20></td></tr>
<tr><td colspan=<?=$mod?> height=1 bgcolor=#E7E7E7></td></tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
<tr><td colspan=<?=$mod?> bgcolor=#5C86AD height=1>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' 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>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<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>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</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>
<? } ?>
<!-- 게시판 목록 끝 -->
요넘을 수정해서 라테스트가 돌아 간다면 으윽 그다음은 드자인 뀌어맞추기만 하면 땡인뎅요 ㅎㅎ
유아원님의 라테스트를 메인에서 4~5개 돌려야 하는데 가능한가요...??
주안점은 이 스킨과 유아원님 라테스트가 메인에서 4~5개가 잘 돌아야 한다는 것인데요.
위의것은 알라뷰님 갤러리스킨 소스입니다.
유아원님의 라테스트를 메인에서 4~5개 돌려야 하는데 가능한가요...??
주안점은 이 스킨과 유아원님 라테스트가 메인에서 4~5개가 잘 돌아야 한다는 것인데요.
위의것은 알라뷰님 갤러리스킨 소스입니다.
다 만들었습니다~~~~
먼저 최신글.
latest.skin.php
latest.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$img_w = "110";
$img_h = "135";
$img_q = "100";
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_latest'.$img_w;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = "1000"; //1초는 1000, 2초는 2000....
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<div align="left">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr> <td align="left">
<p align="left">
<?
for ($i=0; $i<count($list); $i++)
{
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$row2 = sql_fetch($sql2);
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
// $img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $img_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $img_h)
$dst = imagecreatetruecolor($img_w, $height);
else
$dst = imagecreatetruecolor($img_w, $img_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $img_q);
chmod($thumb_path.'/'.$filename, 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$body_data4 = "
<table id=id_s4".$i." style='display:none' border='0' cellpadding='0' cellspacing='0' align='left'>
<tr>
<td align=left style='border:1px; solid #CCCCCC; padding:3px;'><a href='{$list[$i][href]}' onfocus='this.blur()'>{$img}</a></td>
</tr>
</tr>
<tr>
<td style='padding:3 0 3 0px;' align='left' class='sub'><a href='{$list[$i][href]}'>{$list[$i][subject]}</a></td>
</tr>
</table>
";
echo $body_data4;
}
?>
</p>
</td>
</tr>
</table>
</div>
<script language='JavaScript'>
var oldshow4 = 1;
var showid4 = 1;
function ssh_init4() {
eval("document.all.id_s4"+oldshow4+".style.display='none'");
eval("document.all.id_s4"+showid4+".style.display='block'");
oldshow4 = showid4;
showid4++;
if (showid4><?=$i-1?>) showid4=0;
setTimeout("ssh_init4()", <?=$sec_delay4?>);
} </script>
<script language='JavaScript'>
<? if (count($list)>0){ echo "ssh_init4();"; } ?> </script>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$img_w = "110";
$img_h = "135";
$img_q = "100";
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_latest'.$img_w;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$sec_delay4 = "1000"; //1초는 1000, 2초는 2000....
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<div align="left">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr> <td align="left">
<p align="left">
<?
for ($i=0; $i<count($list); $i++)
{
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$row2 = sql_fetch($sql2);
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
// $img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $img_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $img_h)
$dst = imagecreatetruecolor($img_w, $height);
else
$dst = imagecreatetruecolor($img_w, $img_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $img_q);
chmod($thumb_path.'/'.$filename, 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$body_data4 = "
<table id=id_s4".$i." style='display:none' border='0' cellpadding='0' cellspacing='0' align='left'>
<tr>
<td align=left style='border:1px; solid #CCCCCC; padding:3px;'><a href='{$list[$i][href]}' onfocus='this.blur()'>{$img}</a></td>
</tr>
</tr>
<tr>
<td style='padding:3 0 3 0px;' align='left' class='sub'><a href='{$list[$i][href]}'>{$list[$i][subject]}</a></td>
</tr>
</table>
";
echo $body_data4;
}
?>
</p>
</td>
</tr>
</table>
</div>
<script language='JavaScript'>
var oldshow4 = 1;
var showid4 = 1;
function ssh_init4() {
eval("document.all.id_s4"+oldshow4+".style.display='none'");
eval("document.all.id_s4"+showid4+".style.display='block'");
oldshow4 = showid4;
showid4++;
if (showid4><?=$i-1?>) showid4=0;
setTimeout("ssh_init4()", <?=$sec_delay4?>);
} </script>
<script language='JavaScript'>
<? if (count($list)>0){ echo "ssh_init4();"; } ?> </script>
게시판 list.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 제목길이 잘 맞추세요.
$thu_width = "116"; //썸네일 폭
$thu_height = "140"; //썸네일 높이
$thu_quality = "100"; //썸네일 퀄리티_100 이하
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumbList';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
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>
/*
$tmp_bo_table = "cm_gallery_request";
$tmp_write_table = $g4[write_prefix] . $tmp_bo_table;
$sql = " select wr_id, wr_subject from $tmp_write_table where wr_is_comment = 0 and wr_comment = 0 order by wr_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
echo "<div align=center><a href='$g4[bbs_path]/board.php?bo_table=$tmp_bo_table&wr_id=$row[wr_id]'><span style='height:18px; color:crimson; cursor:pointer;'>★ 이미지 요청 : $row[wr_subject] ★</span></a></div><br>";
}
*/
?>
<style type="text/css">
.bo_ti { font-family:굴림; font-size:9pt; color:#555555; }
.data { font-family:돋움; font-size:8pt; color:#999999; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<!--<table width="100%" cellspacing="0" cellpadding="0">
<tr height="25">
<? 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 align="right">
게시물 <?=number_format($total_count)?>건
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?>
<? 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>
<tr><td height=5></td></tr>
</table>/-->
<form name="fboardlist" method="post" style="margin:0px;">
<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% cellpadding=0 cellspacing=0>
<!--<tr><td colspan='<?=$mod?>' height=2 bgcolor=#B0ADF5></td></tr>
<tr><td colspan='<?=$mod?>' height=25></td></tr>-->
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$row2 = sql_fetch($sql2);
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
//$rate = $thu_width / $size[0];
$rate = 110 / $size[0];
$height = (int)($size[1] * $rate);
if ($height < 135)
//if ($height < $thu_height)
//$dst = imagecreatetruecolor($thu_width, $height);
$dst = imagecreatetruecolor(110, 135);
else
$dst = imagecreatetruecolor($thu_width, $thu_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thu_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $thu_quality);
chmod($thumb_path.'/'.$filename, 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' width='$thu_width' border=0 style='border:1px solid #999999;'>";
$style = "";
if ($list[$i][icon_new])
$style = " style='font-weight:normal;' ";
$subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="thumb_1_2.gif";
else
$bg="thumb_1.gif";
echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>\n";
echo "<table width='150' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr><td height='34' align='center' background='{$board_skin_path}/myimg/$bg' style='padding-top:4px; padding-left:10px;' class='bo_ti'>$subject</td></tr>\n";
echo "<tr><td height='75' align='center' valign='top' background='{$board_skin_path}/myimg/thumb_2.gif' style='padding:10 0 7 0;'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" >$img</a></td></tr>\n";
echo "<tr><td height='23'><a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$board_skin_path}/myimg/thumb_3.gif' width='150' height='23' border='0'></a></td></tr>\n";
echo "<tr><td height='40' background='{$board_skin_path}/myimg/thumb_4.gif' style='padding-left:33px; padding-top:10px;' class='data'>{$list[$i][datetime2]}";
if ($is_checkbox) echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
echo "</td></tr>\n";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<tr><td colspan='<?=$mod?>' height=20></td></tr>
<tr><td colspan=<?=$mod?> height=1 bgcolor=#E7E7E7></td></tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
<tr><td colspan=<?=$mod?> bgcolor=#5C86AD height=1>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' 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>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<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>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</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>
<? } ?>
<!-- 게시판 목록 끝 -->
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 제목길이 잘 맞추세요.
$thu_width = "116"; //썸네일 폭
$thu_height = "140"; //썸네일 높이
$thu_quality = "100"; //썸네일 퀄리티_100 이하
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumbList';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
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>
/*
$tmp_bo_table = "cm_gallery_request";
$tmp_write_table = $g4[write_prefix] . $tmp_bo_table;
$sql = " select wr_id, wr_subject from $tmp_write_table where wr_is_comment = 0 and wr_comment = 0 order by wr_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
echo "<div align=center><a href='$g4[bbs_path]/board.php?bo_table=$tmp_bo_table&wr_id=$row[wr_id]'><span style='height:18px; color:crimson; cursor:pointer;'>★ 이미지 요청 : $row[wr_subject] ★</span></a></div><br>";
}
*/
?>
<style type="text/css">
.bo_ti { font-family:굴림; font-size:9pt; color:#555555; }
.data { font-family:돋움; font-size:8pt; color:#999999; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<!--<table width="100%" cellspacing="0" cellpadding="0">
<tr height="25">
<? 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 align="right">
게시물 <?=number_format($total_count)?>건
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?>
<? 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>
<tr><td height=5></td></tr>
</table>/-->
<form name="fboardlist" method="post" style="margin:0px;">
<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% cellpadding=0 cellspacing=0>
<!--<tr><td colspan='<?=$mod?>' height=2 bgcolor=#B0ADF5></td></tr>
<tr><td colspan='<?=$mod?>' height=25></td></tr>-->
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$row2 = sql_fetch($sql2);
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
//$rate = $thu_width / $size[0];
$rate = 110 / $size[0];
$height = (int)($size[1] * $rate);
if ($height < 135)
//if ($height < $thu_height)
//$dst = imagecreatetruecolor($thu_width, $height);
$dst = imagecreatetruecolor(110, 135);
else
$dst = imagecreatetruecolor($thu_width, $thu_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thu_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $thu_quality);
chmod($thumb_path.'/'.$filename, 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' width='$thu_width' border=0 style='border:1px solid #999999;'>";
$style = "";
if ($list[$i][icon_new])
$style = " style='font-weight:normal;' ";
$subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="thumb_1_2.gif";
else
$bg="thumb_1.gif";
echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>\n";
echo "<table width='150' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr><td height='34' align='center' background='{$board_skin_path}/myimg/$bg' style='padding-top:4px; padding-left:10px;' class='bo_ti'>$subject</td></tr>\n";
echo "<tr><td height='75' align='center' valign='top' background='{$board_skin_path}/myimg/thumb_2.gif' style='padding:10 0 7 0;'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" >$img</a></td></tr>\n";
echo "<tr><td height='23'><a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$board_skin_path}/myimg/thumb_3.gif' width='150' height='23' border='0'></a></td></tr>\n";
echo "<tr><td height='40' background='{$board_skin_path}/myimg/thumb_4.gif' style='padding-left:33px; padding-top:10px;' class='data'>{$list[$i][datetime2]}";
if ($is_checkbox) echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
echo "</td></tr>\n";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<tr><td colspan='<?=$mod?>' height=20></td></tr>
<tr><td colspan=<?=$mod?> height=1 bgcolor=#E7E7E7></td></tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
<tr><td colspan=<?=$mod?> bgcolor=#5C86AD height=1>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' 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>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<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>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</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>
<? } ?>
<!-- 게시판 목록 끝 -->
헐 ~~ 이렇게 빨리 ~~~
유아원님 이고마움을 뭐라고 표현해야 할지 모르겠습니다.
아무튼 무쟈게 고맙습니다.
저 혼자 같으면 날밤새고도 내일부터 질문게시판 불납니다.
기둘리면서 모르쏠라에 있었는데 유머 글쪽이 잼있더군요.
할말이 없을 정도로 고맙습니다.
지금부터 적용해 봐야 겠습니다. 감사합니다
유아원님 이고마움을 뭐라고 표현해야 할지 모르겠습니다.
아무튼 무쟈게 고맙습니다.
저 혼자 같으면 날밤새고도 내일부터 질문게시판 불납니다.
기둘리면서 모르쏠라에 있었는데 유머 글쪽이 잼있더군요.
할말이 없을 정도로 고맙습니다.
지금부터 적용해 봐야 겠습니다. 감사합니다
헐~~~ 이 전에는 수정하고 브라우져에서 새로 고침해야 섬네일이 고쳐졌었는데 수정하자마자 그냥 이미지가 교체되네요..
잘 ~~~됩니다... 잘 쓰겠습니다. d=~..~=b 유아원님 대단하십니다.
잘 ~~~됩니다... 잘 쓰겠습니다. d=~..~=b 유아원님 대단하십니다.
잘 된다니 다행입니다. ㅡ.ㅡa