갤러리 게시판 문의드립니다. 채택완료
오류 게시판 주소 : http://mulim.woweb.net/bbs/board.php?bo_table=nnn">http://mulim.woweb.net/bbs/board.php?bo_table=nnn
가로로... 이미지 4개씩 출력되야되는데...
엉망으로 출력이 되네요 혹시 수정이 가능할까요
게시판 관리에서 4개로 했는데 소스가 문제인거 같아서 이렇게 글 남깁니다.
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');</strong></p><p><strong>// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
?>
<!-- include jQuery -->
<script type="text/javascript" src="<a href='<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" target="_blank" rel="noopener noreferrer">http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js</a>"></script'><a href="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" target="_blank" rel="noopener noreferrer">http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js</a>"></script</a>>
<!-- for dragging/swiping/pinching, include Hammer.js -->
<script type="text/javascript" src="<a href='<a href="http://cdn.jsdelivr.net/hammerjs/2.0.3/hammer.min.js" target="_blank" rel="noopener noreferrer">http://cdn.jsdelivr.net/hammerjs/2.0.3/hammer.min.js</a>"></script'><a href="http://cdn.jsdelivr.net/hammerjs/2.0.3/hammer.min.js" target="_blank" rel="noopener noreferrer">http://cdn.jsdelivr.net/hammerjs/2.0.3/hammer.min.js</a>"></script</a>></strong></p><p><strong><!-- for scaling UI buttons (for wide websites on small screens), include FlameViewportScale -->
<script type="text/javascript" language="javascript" src="<?php echo $board_skin_url?>/lib/FlameViewportScale.js"></script></strong></p><p><strong><!-- include Tos "R"Us -->
<script type="text/javascript" language="javascript" src="<?php echo $board_skin_url?>/src/js/jquery.tosrus.min.all.js"></script>
<link type="text/css" media="all" rel="stylesheet" href="<?php echo $board_skin_url?>/src/css/jquery.tosrus.all.css" />
<!-- fire the plugin onDocumentReady -->
<script type="text/javascript" language="javascript">
jQuery(function( $ ) {</strong></p><p><strong> $('#gallery-1 a').tosrus({
buttons: 'inline',
pagination : {
add : true,
type : 'thumbnails'
}
});</strong></p><p><strong>
});
</script>
<!-- CSS for this demo page -->
<style type="text/css" media="all"></strong></p><p><strong> .thumbs,
.gallery,
.links,
.thumbs {
padding: 10px 30px 30px 50px;
text-align: center;
}
.thumbs:after {
content: " ";
display: block;
clear: both;
}
.thumbs a {
display: inline-block;
margin: 10px 10px 0 0;
}
thumbs img
{
width: 120px;
height: 120px;
}
.thumbs img,
.gallery img {
border: 1px solid #ccc;
background: #fff;
padding: 9px;
}
.thumbs a:hover img {
border-color: #999;
}
.gallery {
height: 300px;
padding: 30px 0;
}</strong></p><p><strong> .links {
padding: 30px 50px;
}
.links a {
line-height: 30px;
}</strong></p><p><strong> .hidden {
display: none;
}
</style></strong></p><p><strong>
<h2 id="container_title"><?php echo $board['bo_subject'] ?><span class="sound_only"> 목록</span></h2></strong></p><p><strong><!-- 게시판 목록 시작 { -->
<div id="bo_gall" style="width:<?php echo $width; ?>"></strong></p><p><strong> <?php if ($is_category) { ?>
<nav id="bo_cate">
<h2><?php echo $board['bo_subject'] ?> 카테고리</h2>
<ul id="bo_cate_ul">
<?php echo $category_option ?>
</ul>
</nav>
<?php } ?></strong></p><p><strong> <div class="bo_fx">
<div id="bo_list_total">
<span>Total <?php echo number_format($total_count) ?>건</span>
<?php echo $page ?> 페이지
</div></strong></p><p><strong> <?php if ($rss_href || $write_href) { ?>
<ul class="btn_bo_user">
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01">RSS</a></li><?php } ?>
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin">관리자</a></li><?php } ?>
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
</ul>
<?php } ?>
</div></strong></p><p><strong> <form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="sw" value=""></strong></p><p><strong> <?php if ($is_checkbox) { ?>
<div id="gall_allchk">
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
</div>
<?php } ?></strong></p><p><strong> <div id="gallery-1" class="thumbs">
<?php for ($i=0; $i<count($list); $i++) { ?>
<?php $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);?>
<div style="float:left">
<a href="<?php echo $thumb['ori']?>">
<?php $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);?>
<? $image = get_editor_image($list[$i]['wr_content'],true);
preg_match_all("<img [^<>]*>", $image[0][0], $output); </strong></p><p><strong> eregi("[:space:]*(src)[:space:]*=[:space:]*([^ >;]+)",$image[0][0],$regs);
$regs[2] = str_replace(Array("'",'"'),"",$regs[2]);
$buff[] = $regs[2];
if(!$image[0][0]){
$sql = " select bf_file from g5_board_file where bo_table = '".$bo_table."' and wr_id = '".$list[$i]["wr_id"]."' order by bf_no ";
$result = sql_query($sql);
$img_url = mysql_result($result,0,0);
} </strong></p><p><strong> if($img_url){
$thumb[0]['path'] = G5_DATA_URL.'/file/'.$bo_table;
$thumb[0]['file'] = $img_url;
$big_img_url = $thumb[0]['path']."/".$thumb[0]['file'];
}else{
$thumb[0]['file'] = $buff[$i];
$big_img_url = $thumb[0]['file'];
}
?>
<div style="float:left">
<a href="<?=$big_img_url?>">
<img src="<?php echo $thumb['src']?>" /></a>
<p style="padding:5px;text-align:center;">
<?php
if ($is_category && $list[$i]['ca_name']) {
?>
<span style="cursor:pointer" onclick="location.href='<?php echo $list[$i]['ca_name_href'] ?>'" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></span>
<?php } ?>
<span style="cursor:pointer" onclick="location.href='<?php echo $list[$i]['href'] ?>'"><?php echo $list[$i]['subject'] ?>
<?php if (isset($list[$i]['icon_new'])) echo "<span style='background:red;color:#fff'> new <span>";?>
</span>
</p>
</div>
<?php } ?>
<?php if (count($list) == 0) { echo "게시물이 없습니다."; } ?>
</div>
</strong></p><p><strong><?php if ($is_checkbox) { ?>
<script>
function all_checked(sw) {
var f = document.fboardlist;</strong></p><p><strong> for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}</strong></p><p><strong>function fboardlist_submit(f) {
var chk_count = 0;</strong></p><p><strong> for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}</strong></p><p><strong> if (!chk_count) {
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
return false;
}</strong></p><p><strong> if(document.pressed == "선택복사") {
select_copy("copy");
return;
}</strong></p><p><strong> if(document.pressed == "선택이동") {
select_copy("move");
return;
}</strong></p><p><strong> if(document.pressed == "선택삭제") {
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
return false;</strong></p><p><strong> f.removeAttribute("target");
f.action = "./board_list_update.php";
}</strong></p><p><strong> return true;
}</strong></p><p><strong>// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;</strong></p><p><strong> if (sw == 'copy')
str = "복사";
else
str = "이동";</strong></p><p><strong> var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");</strong></p><p><strong> f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<?php } ?>
<!-- } 게시판 목록 끝 -->