채택완료

최근 게시물 추출 썸네일 스킨을 달았는데요 특정 조건에 추출이

2014-04-30 (수) 16:52:11 4,428
 
최근 게시물 추출 썸네일 스킨을 달았는데요
최근 게시물도 추출하고 그리고 탭을 달아서
어떤 조건의 게시물 썸네일도 추출하려고 합니다.
 
어떤 파일을 어떻게 수정해야 하나요?
스킨 파일에는 sql구문이 찾아봐도 없더라고요.
 
조건은 wr_kandf 값이 외산 일때의 추출값.
또하나는 wr_kandf 값이 국산일때의 추출값 이거든요.
 
스킨 소스는 아래와 같고요.
한 수 가르침 부탁드립니다. 꾸벅^^__^^;
<?
//if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//$g4[path]="./mw-builder/bbs/board.php?bo_table=B01";
include_once("_common.php");
include_once("$g4[path]/lib/thumb.lib.php");
 

$cols  = 6; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$img_width = '148'; //썸네일 가로길이
$img_height = '142'; //썸네일 세로길이
$img_quality = '100'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file";
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$col_width = (int)(100 / $cols);
?>
<style type="text/css">
.file-img-t { width:150px; height:140px; border:solid 2px #fff; }
.item_td { padding:10px 0 14px 0; margin:5px 10px 0px 10px; border-bottom:1px dotted #e0e0e0; }
.item_name { margin:3px; height:32px; font-size:11px; font-family:돋움; text-align:left; }
.item_name a { margin:3px; height:32px; font-size:11px; font-family:돋움; text-align:left; }
.title_price { margin:3px; padding-left:3px; color:#FF3300; font-weight:bold; text-align:center; }
.shop { color:#e93100; font-size:11px; font-family:돋움; }
.shop a { color:#e93100; font-size:11px; font-family:돋움; }
</style>  
 
 
 
<!-- 최신글 제목 -->
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
<? for ($i=0; $i<count($list); $i++) {
  if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="164" align="center" valign='top' class="item_td">
<?
$img = "$g4[path]/data/file/$bo_table/thumb/{$list[$i][wr_id]}";
if (!@file_exists($img)) $img = "$g4[path]/data/file/$bo_table/thumbnail/{$list[$i][wr_id]}";
if (!@file_exists($img)) $img = "{$list[$i][file][0][path]}/{$list[$i][file][0][file]}";
if (!@file_exists($img)) $img = "$latest_skin_path/img/noimage.gif";
if (!$list[$i][wr_id]) $img = "$latest_skin_path/img/noimage.gif";
if (@is_dir($img)) $img = "$latest_skin_path/img/noimage.gif";
?>
<? /* if ($g4[server_time] - strtotime($list[$i][wr_datetime]) > 60*60*24*(30*6)) {
  echo "<a href='{$list[$i][wr_9]}' target='_blank'>";
  } else {  
  echo "<a href='{$list[$i][link_href][1]}' target='_blank'>";
  } */ ?>
<a href="javascript:void(0)" onclick="window.open('<?=$list[$i][href]?>','','width=920,height=900,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no')"><img src="<?=$img?>" class="file-img-t" onmouseover="this.style.border='2px solid #000'" onmouseout="this.style.border='solid 2px #fff'" alt="<?=$list[$i][subject]?> - <?=$list[$i][wr_8]?>원"></a>

<!--<a href='<?=$list[$i][href]?>' target="_blank"><img src="<?=$img?>" class="file-img-t" onmouseover="this.style.border='2px solid #000'" onmouseout="this.style.border='solid 2px #fff'" alt="<?=$list[$i][subject]?> - <?=$list[$i][wr_8]?>원"></a>-->
<div style="text-align:left; width:144px; margin-top:5px;">
<span class="shop">
<!--<img src="<?=$latest_skin_path?>/img/list_home_icon.gif" align="top" />-->▶&nbsp;&nbsp;<a href='<?=$list[$i][href]?>' target="_parent"><?=$list[$i][wr_8]?>&nbsp;<?=$list[$i][wr_9]?>&nbsp;<?=$list[$i][wr_10]?></a></span></div>
<!--<div class="item_name"><a href="<?=$list[$i][href]?>" target="_parent"><?=$list[$i]['subject']?></a></div>-->
<div class="title_price"><?=number_format($list[$i][wr_5])?>만원</div>
<div style="text-align:center; margin-top:5px;">
<!--<table width="92%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left"><a href="<?=$list[$i][link_href][1]?>" target="_blank"><img src="http://www.styledb.com/img/blog_buy_icon.gif" align="absmiddle" border="0" /></a></td>
    <td align="right"><a href="<?=$list[$i][href]?>" target="_parent"><img src="http://www.styledb.com/img/blog_re_icon.gif" align="absmiddle" border="0" /></a></td>
  </tr>
</table>-->
</div>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
    echo "<td width=$col_width%>&nbsp;</td>";
}
?>
  <? if (count($list) == 0) { echo "<td align=center>게시물이 없습니다.</td>"; } ?>
  </tr>
</table>
|

답변 1개

채택된 답변
+20 포인트
bbs/list.php

답변을 작성하려면 로그인이 필요합니다.