게시판 리스트가 파이어폭스에서 모두 왼쪽으로 붙어 나옵니다. (소스다시추가) 정보
게시판 리스트가 파이어폭스에서 모두 왼쪽으로 붙어 나옵니다. (소스다시추가)본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
별점게시판을 나름 수정해 사용하려고 하는데...
익스 7,8에선 아무문제없이 첨부된 사진처럼 잘 나오는데 파이어폭스는 글들이 모두 왼쪽으로 붙어나오네요..어찌된건지 이해를 할 수 가 없네요...
아래는 소스를 첨부해봅니다.
어디가 문제인지 알려주시면 감사하겠습니다. 그런데 여기 포인트를 주던것이 없어졌네요???
첫번째로 list.skin.php 입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_w = 160;
$img_q = 95;
$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>
?>
<script language="JavaScript">
<!--
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
toolbar_str = toolbar ? 'yes' : 'no';
menubar_str = menubar ? 'yes' : 'no';
statusbar_str = statusbar ? 'yes' : 'no';
scrollbar_str = scrollbar ? 'yes' : 'no';
resizable_str = resizable ? 'yes' : 'no';
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
// -->
</script>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip"><img src="<?=$g4[path]?>/img/newkolive_title.png"></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=타운뉴스"><img src="<?=$g4[path]?>/img/newkolive_town.png"></a></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=라이프플러스"><img src="<?=$g4[path]?>/img/newkolive_lifeplus.png"></a></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=가스펠"><img src="<?=$g4[path]?>/img/newkolive_gospel.png"></a></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=이벤트"><img src="<?=$g4[path]?>/img/newkolive_event.png"></a></td>
</tr>
</table>
<? if ($sca == "이벤트") { ?>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" cellpadding="0px" cellspacing="0" width="688px" border="0">
<tr>
<td align="center" valign="top" colspan="4"><img src="<?=$g4['path']?>/my/banner/star_main.png" border="0"></td>
</tr>
<tr>
<td align="right" valign="top" border="0"><a href="javascript:na_open_window('win', 'http://www.wnewskorea.com/my/banner/star_progress.jpg', 4, 4, 700, 524, 0, 0, 0, 0, 0)"><img src="<?=$g4['path']?>/my/banner/star_01.png"></a></td>
<td align="center" valign="top" border="0"><a href="javascript:na_open_window('win', 'http://www.wnewskorea.com/my/banner/star_date.jpg', 4, 4, 700, 524, 0, 0, 0, 0, 0)"><img src="<?=$g4['path']?>/my/banner/star_02.png"></a></td>
<td align="center" valign="top" border="0"><a href="<?=$g4['path']?>/my/banner/dallasstarking.zip" target="_blank"><img src="<?=$g4['path']?>/my/banner/star_03.png"></a></td>
<td align="left" valign="top" border="0"><a href="javascript:na_open_window('win', 'http://www.wnewskorea.com/my/banner/star_trophy.jpg', 4, 4, 700, 524, 0, 0, 0, 0, 0)"><img src="<?=$g4['path']?>/my/banner/star_04.png"></a></td>
</tr>
<tr>
<td align="center" valign="top" colspan="4"><img src="<?=$g4['path']?>/my/banner/starking_apply.png"></td>
</tr>
</table>
<? }
else { ?>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="688" height="170">
<param name="movie" value="http://www.wnewskorea.com/my/banner/starking.swf">
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high">
<embed src="http://www.wnewskorea.com/my/banner/starking.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="688" height="170"></embed>
</object></td>
</tr>
</table>
<? } ?>
<!-- 동영상 메인 최근게시물 -->
<? if ($sca == '타운뉴스') { ?>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($sca == '라이프플러스'){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($sca == '가스펠'){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($sca == '이벤트'){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($bo_table == "clip"){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "타운뉴스");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "라이프플러스");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "가스펠");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "이벤트");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
</table>
<? } ?>
<!-- /동영상 메인 최근게시물 -->
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=20 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" style="font:normal 11px tahoma; color:#BABABA;">
Total <?=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/btn_admin.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="">
<? if ($sca == '타운뉴스' || $sca == '라이프플러스' || $sca == '가스펠' || $sca == '이벤트') { ?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td colspan='6' height=2 bgcolor="#0A7299"></td>
</tr>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='150' height='150' align='absmiddle'>";
$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
break;
$rate = $img_w / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($img_w, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_w, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_q);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$style = "";
if ($list[$i][icon_new])
$style = ""; // 읽지 않은 글?? style='font-weight:bold;' 추가
$subject = "<span $style>". $list[$i][subject] ."</span>";
$subject = cut_str(get_text($list[$i][subject]), 30);
$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>";
$temp=@mysql_fetch_assoc(@mysql_query("select star_average from `m3rating` where bo_table='$bo_table' AND wr_id='{$list[$i][wr_id]}'"));
if ($temp[star_average] == 0) {
$sum_print= "<img src='/img/s00.png'>";
} elseif ($temp[star_average] <= 0.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.0) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 2.0) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 2.5) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 3.0) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 3.5) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 4.0) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 4.5) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 5.0) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 5.5) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 6.0) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 6.5) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 7.0) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 7.5) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 8.0) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 8.5) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 9.0) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 9.5) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 10.0) {
$sum_print= "<img src='/img/s100.png'>";
}
echo "<td width='{$td_width}%' align=center valign=top style='word-break:break-all;'>";
echo "<table>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td align=center width='160' height='$height' style='width:$img_wpx;height:$heightpx;border:1px solid #CCCCCC; padding:3px'><div style='width:$img_wpx; height:$heightpx; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}' onfocus='this.blur()'>$img</a></div></td></tr>";
echo "<tr><td align=center width='160'><a href='{$list[$i][href]}' onfocus='this.blur()'>$subject</a>{$comment_cnt}</td></tr>";
echo "<tr><td align=center width='160'>조회수 : {$list[$i]['wr_hit']}</td></tr>";
echo "<tr><td align=center width='160'>$sum_print</td></tr>";
echo "<tr><td align=center width='160'>";
?>
<!-- <a href="javascript://" onclick="window.open('<?=$board_skin_path?>/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=00,left=100,width=810,height=557');"><img src="<?=$board_skin_path?>/img/gohome.gif" border="0"/></a> -->
<?
echo "</td></tr>";
if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><font color=#B9B9B9>[{$list[$i][ca_name]}]</font></a></td></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</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:tahoma; font-size:11px; color:#000000\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#E15916;\">$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'>제목</option>
<option value='wr_content'>내용</option>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='mb_id,1'>회원아이디</option>
<option value='mb_id,0'>회원아이디(코)</option>
<option value='wr_name,1'>이름</option>
<option value='wr_name,0'>이름(코)</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>
</td></tr></table>
<? }
else if ($bo_table == "clip") { ?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td colspan='6' height=2 bgcolor="#ffffff"></td>
</tr>
<tr>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
</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">
</td>
<td width="50%" align="right">
</td>
</tr>
</table>
</form>
</td></tr></table>
<? } ?>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
두번째로 latest.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$la_content = "35"; //내용길이
$img_w = "160"; //썸네일 가로
$img_h = "95"; //썸네일 세로
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_'.$img_w.'_'.$img_h;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table align="center" width=98% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'>
<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sca=<?=$ca_name?>'><?=$ca_name?></a></strong>
</td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sca=<?=$ca_name?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a>
</td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=8 align=center>
<table width=95%>
<tr><td><style type="text/css">
#photo_v27_img, #photo_v27_list{float:left}
#photo_v27_img{width:10px;border:0px solid #ffffff;padding:3px;}
#photo_v27_list{
width:200px;
height:80px;
padding:0 0 0 5px;
color:#000000;
font-family: "돋움";
font-size: 9pt;
text-decoration: none;
}
.photo_v27_sub{
height:18px;
font-family: "돋움";
font-size: 9pt;
font-weight: bold;
text-decoration: none;
}
.photo_v27_con {
height:17px;
font-family: "돋움";
font-size: 8pt;
font-weight: normal;
text-decoration: none;
}
</style>
<?
for ($i=0; $i<count($list); $i++) {
//썸네일 코드 시작
$img = "<div style='width:100px;height:55px;'></div>";
$thumb = $thumb_path . '/' . $list[$i][file][0][file] . '.thumb';
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|bmp|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 . '/' . $list[$i][file][0][file] . '.thumb', 100);
chmod($thumb_path . '/' . $list[$i][file][0][file] . '.thumb', 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' align='absmiddle' border='0'>";
$href = "{$list[$i][href]}";
$wr_1 = "<span $href>".cut_str($list[$i][wr_1],12)."</span>";
$wr_content ="<span $style>".cut_str(strip_tags($list[$i][wr_content]),$la_content)."</span>";
$temp=@mysql_fetch_assoc(@mysql_query("select star_average from `m3rating` where bo_table='$bo_table' AND wr_id='{$list[$i][wr_id]}'"));
if ($temp[star_average] == 0) {
$sum_print= "<img src='/img/s00.png'>";
} elseif ($temp[star_average] <= 0.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.0) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 2.0) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 2.5) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 3.0) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 3.5) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 4.0) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 4.5) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 5.0) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 5.5) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 6.0) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 6.5) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 7.0) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 7.5) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 8.0) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 8.5) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 9.0) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 9.5) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 10.0) {
$sum_print= "<img src='/img/s100.png'>";
}
// 출력
echo <<<HEREDOC
<div>
<div id="photo_v27_img">
<table width=103 border="0" cellspacing="0" cellpadding="0">
<tr><td width=30></td><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td height=10></td></tr>
<tr><td align=center>
<a href='{$href}' onfocus='this.blur()'>{$img}</a>
</td></tr>
<tr><td height=7 align=center></td></tr>
<tr><td align=center height=3><a href='{$href}' onfocus='this.blur()' class=red>
<b>$wr_1</b></td></tr>
</table>
<table>
<tr>
<td><font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font></td>
</tr>
<tr>
<td><font style='font-family:돋움; font-size:9pt; color:#000000;'><strong>조회수 :</strong></font> {$list[$i]['wr_hit']}</td>
</tr>
<tr>
<td>$sum_print</td>
</tr>
</table>
</td></tr></table>
</div>
HEREDOC;
}
?>
</td></tr>
<tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
오류 주소 :
별점게시판을 나름 수정해 사용하려고 하는데...
익스 7,8에선 아무문제없이 첨부된 사진처럼 잘 나오는데 파이어폭스는 글들이 모두 왼쪽으로 붙어나오네요..어찌된건지 이해를 할 수 가 없네요...
아래는 소스를 첨부해봅니다.
어디가 문제인지 알려주시면 감사하겠습니다. 그런데 여기 포인트를 주던것이 없어졌네요???
첫번째로 list.skin.php 입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_w = 160;
$img_q = 95;
$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>
?>
<script language="JavaScript">
<!--
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
toolbar_str = toolbar ? 'yes' : 'no';
menubar_str = menubar ? 'yes' : 'no';
statusbar_str = statusbar ? 'yes' : 'no';
scrollbar_str = scrollbar ? 'yes' : 'no';
resizable_str = resizable ? 'yes' : 'no';
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
// -->
</script>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip"><img src="<?=$g4[path]?>/img/newkolive_title.png"></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=타운뉴스"><img src="<?=$g4[path]?>/img/newkolive_town.png"></a></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=라이프플러스"><img src="<?=$g4[path]?>/img/newkolive_lifeplus.png"></a></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=가스펠"><img src="<?=$g4[path]?>/img/newkolive_gospel.png"></a></td>
<td><a href="http://www.wnewskorea.com/bbs/board.php?bo_table=clip&sca=이벤트"><img src="<?=$g4[path]?>/img/newkolive_event.png"></a></td>
</tr>
</table>
<? if ($sca == "이벤트") { ?>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" cellpadding="0px" cellspacing="0" width="688px" border="0">
<tr>
<td align="center" valign="top" colspan="4"><img src="<?=$g4['path']?>/my/banner/star_main.png" border="0"></td>
</tr>
<tr>
<td align="right" valign="top" border="0"><a href="javascript:na_open_window('win', 'http://www.wnewskorea.com/my/banner/star_progress.jpg', 4, 4, 700, 524, 0, 0, 0, 0, 0)"><img src="<?=$g4['path']?>/my/banner/star_01.png"></a></td>
<td align="center" valign="top" border="0"><a href="javascript:na_open_window('win', 'http://www.wnewskorea.com/my/banner/star_date.jpg', 4, 4, 700, 524, 0, 0, 0, 0, 0)"><img src="<?=$g4['path']?>/my/banner/star_02.png"></a></td>
<td align="center" valign="top" border="0"><a href="<?=$g4['path']?>/my/banner/dallasstarking.zip" target="_blank"><img src="<?=$g4['path']?>/my/banner/star_03.png"></a></td>
<td align="left" valign="top" border="0"><a href="javascript:na_open_window('win', 'http://www.wnewskorea.com/my/banner/star_trophy.jpg', 4, 4, 700, 524, 0, 0, 0, 0, 0)"><img src="<?=$g4['path']?>/my/banner/star_04.png"></a></td>
</tr>
<tr>
<td align="center" valign="top" colspan="4"><img src="<?=$g4['path']?>/my/banner/starking_apply.png"></td>
</tr>
</table>
<? }
else { ?>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="688" height="170">
<param name="movie" value="http://www.wnewskorea.com/my/banner/starking.swf">
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high">
<embed src="http://www.wnewskorea.com/my/banner/starking.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="688" height="170"></embed>
</object></td>
</tr>
</table>
<? } ?>
<!-- 동영상 메인 최근게시물 -->
<? if ($sca == '타운뉴스') { ?>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($sca == '라이프플러스'){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($sca == '가스펠'){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($sca == '이벤트'){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
</table>
<? }
else if ($bo_table == "clip"){ ?>
<table><tr><td style="height:10px "></td></tr></table>
<table><tr><td style="height:10px "></td></tr></table>
<table align="center" style="margin:0px 0px 0px 0px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "타운뉴스");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "라이프플러스");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "가스펠");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
<tr>
<td>
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'clip', 4, 30, "이벤트");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
</td>
</tr>
</table>
<? } ?>
<!-- /동영상 메인 최근게시물 -->
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=20 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" style="font:normal 11px tahoma; color:#BABABA;">
Total <?=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/btn_admin.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="">
<? if ($sca == '타운뉴스' || $sca == '라이프플러스' || $sca == '가스펠' || $sca == '이벤트') { ?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td colspan='6' height=2 bgcolor="#0A7299"></td>
</tr>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='150' height='150' align='absmiddle'>";
$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
break;
$rate = $img_w / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($img_w, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_w, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_q);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$style = "";
if ($list[$i][icon_new])
$style = ""; // 읽지 않은 글?? style='font-weight:bold;' 추가
$subject = "<span $style>". $list[$i][subject] ."</span>";
$subject = cut_str(get_text($list[$i][subject]), 30);
$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>";
$temp=@mysql_fetch_assoc(@mysql_query("select star_average from `m3rating` where bo_table='$bo_table' AND wr_id='{$list[$i][wr_id]}'"));
if ($temp[star_average] == 0) {
$sum_print= "<img src='/img/s00.png'>";
} elseif ($temp[star_average] <= 0.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.0) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 2.0) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 2.5) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 3.0) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 3.5) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 4.0) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 4.5) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 5.0) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 5.5) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 6.0) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 6.5) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 7.0) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 7.5) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 8.0) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 8.5) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 9.0) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 9.5) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 10.0) {
$sum_print= "<img src='/img/s100.png'>";
}
echo "<td width='{$td_width}%' align=center valign=top style='word-break:break-all;'>";
echo "<table>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td align=center width='160' height='$height' style='width:$img_wpx;height:$heightpx;border:1px solid #CCCCCC; padding:3px'><div style='width:$img_wpx; height:$heightpx; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}' onfocus='this.blur()'>$img</a></div></td></tr>";
echo "<tr><td align=center width='160'><a href='{$list[$i][href]}' onfocus='this.blur()'>$subject</a>{$comment_cnt}</td></tr>";
echo "<tr><td align=center width='160'>조회수 : {$list[$i]['wr_hit']}</td></tr>";
echo "<tr><td align=center width='160'>$sum_print</td></tr>";
echo "<tr><td align=center width='160'>";
?>
<!-- <a href="javascript://" onclick="window.open('<?=$board_skin_path?>/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=00,left=100,width=810,height=557');"><img src="<?=$board_skin_path?>/img/gohome.gif" border="0"/></a> -->
<?
echo "</td></tr>";
if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><font color=#B9B9B9>[{$list[$i][ca_name]}]</font></a></td></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</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:tahoma; font-size:11px; color:#000000\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#E15916;\">$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'>제목</option>
<option value='wr_content'>내용</option>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='mb_id,1'>회원아이디</option>
<option value='mb_id,0'>회원아이디(코)</option>
<option value='wr_name,1'>이름</option>
<option value='wr_name,0'>이름(코)</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>
</td></tr></table>
<? }
else if ($bo_table == "clip") { ?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td colspan='6' height=2 bgcolor="#ffffff"></td>
</tr>
<tr>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
</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">
</td>
<td width="50%" align="right">
</td>
</tr>
</table>
</form>
</td></tr></table>
<? } ?>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
두번째로 latest.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$la_content = "35"; //내용길이
$img_w = "160"; //썸네일 가로
$img_h = "95"; //썸네일 세로
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_'.$img_w.'_'.$img_h;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table align="center" width=98% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'>
<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sca=<?=$ca_name?>'><?=$ca_name?></a></strong>
</td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sca=<?=$ca_name?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a>
</td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=8 align=center>
<table width=95%>
<tr><td><style type="text/css">
#photo_v27_img, #photo_v27_list{float:left}
#photo_v27_img{width:10px;border:0px solid #ffffff;padding:3px;}
#photo_v27_list{
width:200px;
height:80px;
padding:0 0 0 5px;
color:#000000;
font-family: "돋움";
font-size: 9pt;
text-decoration: none;
}
.photo_v27_sub{
height:18px;
font-family: "돋움";
font-size: 9pt;
font-weight: bold;
text-decoration: none;
}
.photo_v27_con {
height:17px;
font-family: "돋움";
font-size: 8pt;
font-weight: normal;
text-decoration: none;
}
</style>
<?
for ($i=0; $i<count($list); $i++) {
//썸네일 코드 시작
$img = "<div style='width:100px;height:55px;'></div>";
$thumb = $thumb_path . '/' . $list[$i][file][0][file] . '.thumb';
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|bmp|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 . '/' . $list[$i][file][0][file] . '.thumb', 100);
chmod($thumb_path . '/' . $list[$i][file][0][file] . '.thumb', 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' align='absmiddle' border='0'>";
$href = "{$list[$i][href]}";
$wr_1 = "<span $href>".cut_str($list[$i][wr_1],12)."</span>";
$wr_content ="<span $style>".cut_str(strip_tags($list[$i][wr_content]),$la_content)."</span>";
$temp=@mysql_fetch_assoc(@mysql_query("select star_average from `m3rating` where bo_table='$bo_table' AND wr_id='{$list[$i][wr_id]}'"));
if ($temp[star_average] == 0) {
$sum_print= "<img src='/img/s00.png'>";
} elseif ($temp[star_average] <= 0.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.0) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 1.5) {
$sum_print= "<img src='/img/s10.png'>";
} elseif ($temp[star_average] <= 2.0) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 2.5) {
$sum_print= "<img src='/img/s20.png'>";
} elseif ($temp[star_average] <= 3.0) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 3.5) {
$sum_print= "<img src='/img/s30.png'>";
} elseif ($temp[star_average] <= 4.0) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 4.5) {
$sum_print= "<img src='/img/s40.png'>";
} elseif ($temp[star_average] <= 5.0) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 5.5) {
$sum_print= "<img src='/img/s50.png'>";
} elseif ($temp[star_average] <= 6.0) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 6.5) {
$sum_print= "<img src='/img/s60.png'>";
} elseif ($temp[star_average] <= 7.0) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 7.5) {
$sum_print= "<img src='/img/s70.png'>";
} elseif ($temp[star_average] <= 8.0) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 8.5) {
$sum_print= "<img src='/img/s80.png'>";
} elseif ($temp[star_average] <= 9.0) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 9.5) {
$sum_print= "<img src='/img/s90.png'>";
} elseif ($temp[star_average] <= 10.0) {
$sum_print= "<img src='/img/s100.png'>";
}
// 출력
echo <<<HEREDOC
<div>
<div id="photo_v27_img">
<table width=103 border="0" cellspacing="0" cellpadding="0">
<tr><td width=30></td><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td height=10></td></tr>
<tr><td align=center>
<a href='{$href}' onfocus='this.blur()'>{$img}</a>
</td></tr>
<tr><td height=7 align=center></td></tr>
<tr><td align=center height=3><a href='{$href}' onfocus='this.blur()' class=red>
<b>$wr_1</b></td></tr>
</table>
<table>
<tr>
<td><font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font></td>
</tr>
<tr>
<td><font style='font-family:돋움; font-size:9pt; color:#000000;'><strong>조회수 :</strong></font> {$list[$i]['wr_hit']}</td>
</tr>
<tr>
<td>$sum_print</td>
</tr>
</table>
</td></tr></table>
</div>
HEREDOC;
}
?>
</td></tr>
<tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
댓글 전체
소스 안보이는데요?
크로스브라우징이 안되서 그렇습니다.
URL을 알려주시면 브라우저에서 확인하기 쉽겠지만,
일단 대강 소스를 훍어보니 맨 아래의 출력부분에서 문제가 있는거 같네요.
echo <<<HEREDOC
<div>
<div id="photo_v27_img">
.... 생략
</div>
HEREDOC;
일단 div 닫는 태그가 하나 부족하네요. 아니면 잘못 들어간건지... 아무래도 테이블이나 div에 정의하신 width 부분 좀 보시면 해결되실거 같네요.
그리고 소스가 좀 이상하네요. for문의 중첩되있는데 잘못 복사하신건지...
일단 대강 소스를 훍어보니 맨 아래의 출력부분에서 문제가 있는거 같네요.
echo <<<HEREDOC
<div>
<div id="photo_v27_img">
.... 생략
</div>
HEREDOC;
일단 div 닫는 태그가 하나 부족하네요. 아니면 잘못 들어간건지... 아무래도 테이블이나 div에 정의하신 width 부분 좀 보시면 해결되실거 같네요.
그리고 소스가 좀 이상하네요. for문의 중첩되있는데 잘못 복사하신건지...
다들 감사합니다.
아직 해결이 안됐지만... 채러티맨님 말씀처럼 하나씩 수정해보죠...^^
그럼 다들 즐거운 하루되세요...
아직 해결이 안됐지만... 채러티맨님 말씀처럼 하나씩 수정해보죠...^^
그럼 다들 즐거운 하루되세요...