유재민님의 사이트의 첨부된 모든 이미지 추출 (갤러리스킨) 정보
유재민님의 사이트의 첨부된 모든 이미지 추출 (갤러리스킨)본문
여기에서 모든이미지를 뽑아오는 거잖아요??
그런데..
게시판 banner 에 있는 이미지를 제외하고 싶으면 어떻게 해야하나요??
부탁드립니다~
<?
include_once("./_common.php");
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$g4[title] = "photo view";
include_once("$g4[path]/_head.php");
////////////////basic cf control///////////
$g4[g4_board_file] = "g4_board_file";
$one_rows = "20"; // 출력수량
//jpg, gif 파일만 검색한다.
$one_like = " bf_file LIKE '%jpg' or bf_file LIKE '%gif' ";
$one_count_sql = " select count(*) as cnt from $g4[g4_board_file] where $one_like ";
$row = sql_fetch($one_count_sql);
$total_count = $row[cnt];
$total_page = ceil($total_count / $one_rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $one_rows; // 시작 열을 구함
$one_sql = " select * from $g4[g4_board_file] where $one_like order by bf_datetime desc limit $from_record, $one_rows";
$one_result = sql_query($one_sql);
$cols = 4; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 12; // 이미지 상하 간격
?>
<!-----------기간별 출력시작--------->
<table width=100% cellpadding=0 cellspacing=0>
<tr><td align=center>
<b><span style="font-size:11pt;">
<FONT color=#660000>PHOTO VIEW</FONT>
</font></span></b>
</td></tr>
<tr><td height="10"></td></tr>
<tr>
<?//출력
for ($i=0; $one_row = sql_fetch_array($one_result); $i++){
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td valign=top align="center">
<table width=100% cellpadding=0 cellspacing=0>
<tr><td height="3"></td></tr>
<tr><td align="center">
<?
$sql = " select wr_subject from $g4[write_prefix]$one_row[bo_table] where wr_id = '$one_row[wr_id]' ";
$row = sql_fetch($sql);
?>
<?=cut_str($row[wr_subject], 20)?><br>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$one_row[bo_table]?>&wr_id=<?=$one_row[wr_id]?>' onfocus='this.blur()'>
<img src="<?=$g4[path]?>/data/file/<?=$one_row[bo_table]?>/<?=$one_row[bf_file]?>" border="0" width='140' height='104' ></a>
</td></tr>
</table>
</td>
<? } ?>
</tr>
<tr><td height="10"></td></tr>
<tr><td colspan='3' height=1 bgcolor=#E7E7E7></td></tr>
<tr><td align=center>
<?
$page = get_paging($config[cf_write_pages], $page, $total_page, "?&page=");
echo "$page";
?>
</td></tr>
</table>
<?
include_once("$g4[path]/_tail.php");
?>
그런데..
게시판 banner 에 있는 이미지를 제외하고 싶으면 어떻게 해야하나요??
부탁드립니다~
<?
include_once("./_common.php");
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$g4[title] = "photo view";
include_once("$g4[path]/_head.php");
////////////////basic cf control///////////
$g4[g4_board_file] = "g4_board_file";
$one_rows = "20"; // 출력수량
//jpg, gif 파일만 검색한다.
$one_like = " bf_file LIKE '%jpg' or bf_file LIKE '%gif' ";
$one_count_sql = " select count(*) as cnt from $g4[g4_board_file] where $one_like ";
$row = sql_fetch($one_count_sql);
$total_count = $row[cnt];
$total_page = ceil($total_count / $one_rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $one_rows; // 시작 열을 구함
$one_sql = " select * from $g4[g4_board_file] where $one_like order by bf_datetime desc limit $from_record, $one_rows";
$one_result = sql_query($one_sql);
$cols = 4; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 12; // 이미지 상하 간격
?>
<!-----------기간별 출력시작--------->
<table width=100% cellpadding=0 cellspacing=0>
<tr><td align=center>
<b><span style="font-size:11pt;">
<FONT color=#660000>PHOTO VIEW</FONT>
</font></span></b>
</td></tr>
<tr><td height="10"></td></tr>
<tr>
<?//출력
for ($i=0; $one_row = sql_fetch_array($one_result); $i++){
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td valign=top align="center">
<table width=100% cellpadding=0 cellspacing=0>
<tr><td height="3"></td></tr>
<tr><td align="center">
<?
$sql = " select wr_subject from $g4[write_prefix]$one_row[bo_table] where wr_id = '$one_row[wr_id]' ";
$row = sql_fetch($sql);
?>
<?=cut_str($row[wr_subject], 20)?><br>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$one_row[bo_table]?>&wr_id=<?=$one_row[wr_id]?>' onfocus='this.blur()'>
<img src="<?=$g4[path]?>/data/file/<?=$one_row[bo_table]?>/<?=$one_row[bf_file]?>" border="0" width='140' height='104' ></a>
</td></tr>
</table>
</td>
<? } ?>
</tr>
<tr><td height="10"></td></tr>
<tr><td colspan='3' height=1 bgcolor=#E7E7E7></td></tr>
<tr><td align=center>
<?
$page = get_paging($config[cf_write_pages], $page, $total_page, "?&page=");
echo "$page";
?>
</td></tr>
</table>
<?
include_once("$g4[path]/_tail.php");
?>
댓글 전체
저도 궁금하네요.ㅎㅎ
여기저기 들썩거리곤 있는데.... 찾아보니
$g4[g4_board_file] = "g4_board_file";
이부분이 전체 파일에 관련된 부분이라서 그런거 같은데 해당 부분에서 어떻게 처리를 해야 특정 게시판의 이미지를 제외 시킬 수 있을지....
이미지 파일 검색하는 것 보고 몇가지 해봤는데 안되네요..ㅎㅎㅎ
혹 아시는 분은 도와주시길...
여기저기 들썩거리곤 있는데.... 찾아보니
$g4[g4_board_file] = "g4_board_file";
이부분이 전체 파일에 관련된 부분이라서 그런거 같은데 해당 부분에서 어떻게 처리를 해야 특정 게시판의 이미지를 제외 시킬 수 있을지....
이미지 파일 검색하는 것 보고 몇가지 해봤는데 안되네요..ㅎㅎㅎ
혹 아시는 분은 도와주시길...