chicpro팀장님과 작업 겹친 부분 정리

This commit is contained in:
whitedot
2013-01-25 17:32:23 +09:00
5 changed files with 28 additions and 13 deletions

View File

@ -132,14 +132,19 @@ if ($sca || $stx) {
//if ($prev_spt >= $min_spt)
$prev_spt = $spt - $config['cf_search_part'];
if (isset($min_spt) && $prev_spt >= $min_spt)
if (isset($min_spt) && $prev_spt >= $min_spt) {
$prev_part_href = './board.php?bo_table='.$bo_table.$qstr.'&spt='.$prev_spt.'&page=1';
$write_pages = page_insertbefore($write_pages, '<a href="'.$prev_part_href.'">이전검색</a>');
}
$next_spt = $spt + $config['cf_search_part'];
if ($next_spt < 0)
if ($next_spt < 0) {
$next_part_href = './board.php?bo_table='.$bo_table.$qstr.'&amp;spt='.$next_spt.'&amp;page=1';
$write_pages = page_insertafter($write_pages, '<a href="'.$next_part_href.'">다음검색</a>');
}
}
$write_href = '';
if ($member['mb_level'] >= $board['bo_write_level']) {
$write_href = './write.php?bo_table='.$bo_table;

View File

@ -268,10 +268,11 @@ table a {color:#000;text-decoration:none}
#bo_v_link li {padding:0 20px;border-bottom:1px solid #eee}
#bo_v_link a {display:inline-block;padding:8px 0 7px}
.bo_v_link_cnt {display:inline-block;margin:0 10px}
#bo_v_atc {min-height:200px;height:auto !important;height:200px;zoom:1}
#bo_v_atc {width:688px;min-height:200px;height:auto !important;height:200px;overflow:hidden;zoom:1}
#bo_v_atc:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_atc h1 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_img {margin:0 20px;width:700px}
#bo_v_img {margin:0 20px}
/*#bo_v_img img {max-width:100%;height:auto}*/
#bo_v_con {padding:20px;line-height:1.8em}
#bo_v_con a {color:#0075b8;text-decoration:underline}

View File

@ -51,6 +51,21 @@ function get_paging($write_pages, $cur_page, $total_page, $url, $add="")
return "";
}
// 페이징 코드의 <div><span> 태그 다음에 코드를 삽입
function page_insertbefore($paging_html, $insert_html)
{
if ($paging_html) {
return preg_replace("/^(<div[^>]+><span[^>]+>)/", '$1'.$insert_html, $paging_html);
}
}
// 페이징 코드의 </span></div> 태그 이전에 코드를 삽입
function page_insertafter($paging_html, $insert_html)
{
if ($paging_html) {
return preg_replace("/(<\/span><\/div>)$/", $insert_html.'$1', $paging_html);
}
}
// 변수 또는 배열의 이름과 값을 얻어냄. print_r() 함수의 변형
function print_r2($var)

View File

@ -154,9 +154,7 @@ if ($is_nogood) $colspan++;
<? } ?>
<!-- 페이지 -->
<? if ($prev_part_href) { echo '<a href="'.$prev_part_href.'">이전검색</a>'; } ?>
<?=$write_pages?>
<? if ($next_part_href) { echo '<a href="'.$next_part_href.'">다음검색</a>'; } ?>
<? echo $write_pages; ?>
<p>
<span>Total <?=number_format($total_count)?>건</span>

View File

@ -180,14 +180,10 @@ $(window).load(function() {
view_image_resize();
});
$(window).resize(function(){
view_image_resize();
});
function view_image_resize()
{
var $img = $('#bo_v_img img');
var img_wrap = $('#bo_v_img').width();
var $img = $('#bo_v_atc img');
var img_wrap = $('#bo_v_atc').width();
$img.each(function() {
var img_width = $(this).width();