모바일 사용후기 상품문의 추가
This commit is contained in:
@ -1,5 +1,11 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (G4_IS_MOBILE) {
|
||||
include_once(G4_MSHOP_PATH.'/itemqa.php');
|
||||
return;
|
||||
}
|
||||
|
||||
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
//$it_id = $_REQUEST['it_id'];
|
||||
@ -39,7 +45,6 @@ $thumbnail_width = 500;
|
||||
$iq_subject = conv_subject($row['iq_subject'],50,"…");
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], $thumbnail_width);
|
||||
$iq_time = substr($row['iq_time'], 2, 8);
|
||||
$iq_href = './itemqalist.php?bo_table=itemqa&wr_id='.$row['wr_id'];
|
||||
|
||||
$hash = md5($row['iq_id'].$row['iq_time'].$row['iq_ip']);
|
||||
|
||||
@ -114,7 +119,7 @@ function itemqa_page($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="pg_page pg_start" onclick="return false;">처음</a>'.PHP_EOL;
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="qa_page qa_start">처음</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
@ -122,21 +127,21 @@ function itemqa_page($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1) $str .= '<a href="'.$url.($start_page-1).$add.'" class="pg_page pg_prev" onclick="return false;">이전</a>'.PHP_EOL;
|
||||
if ($start_page > 1) $str .= '<a href="'.$url.($start_page-1).$add.'" class="qa_page pg_prev">이전</a>'.PHP_EOL;
|
||||
|
||||
if ($total_page > 1) {
|
||||
for ($k=$start_page;$k<=$end_page;$k++) {
|
||||
if ($cur_page != $k)
|
||||
$str .= '<a href="'.$url.$k.$add.'" class="pg_page" onclick="return false;">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
$str .= '<a href="'.$url.$k.$add.'" class="qa_page">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
else
|
||||
$str .= '<span class="sound_only">열린</span><strong class="pg_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="pg_page pg_next">다음</a>'.PHP_EOL;
|
||||
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="qa_page pg_next">다음</a>'.PHP_EOL;
|
||||
|
||||
if ($cur_page < $total_page) {
|
||||
$str .= '<a href="'.$url.$total_page.$add.'" class="pg_page pg_end" onclick="return false;">맨끝</a>'.PHP_EOL;
|
||||
$str .= '<a href="'.$url.$total_page.$add.'" class="qa_page pg_end">맨끝</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if ($str)
|
||||
@ -145,12 +150,12 @@ function itemqa_page($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
return "";
|
||||
}
|
||||
|
||||
echo itemqa_page(10, $page, $total_page, "./itemqa.php?it_id=$it_id&page=", "");
|
||||
echo itemqa_page($config['cf_write_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&page=", "");
|
||||
?>
|
||||
|
||||
<div id="sit_qa_wbtn">
|
||||
<!-- <a href="javascript:itemqawin('it_id=<?php echo $it_id; ?>');">상품문의 쓰기<span class="sound_only"> 새 창</span></a> -->
|
||||
<a href="<?php echo $itemqa_form; ?>" class="btn02 itemqa_form" onclick="return false;">상품문의 쓰기<span class="sound_only"> 새 창</span></a>
|
||||
<a href="<?php echo $itemqa_form; ?>" class="btn02 itemqa_form">상품문의 쓰기<span class="sound_only"> 새 창</span></a>
|
||||
<a href="<?php echo $itemqa_list; ?>" id="itemqa_list" class="btn01">더보기</a>
|
||||
</div>
|
||||
|
||||
@ -158,6 +163,7 @@ echo itemqa_page(10, $page, $total_page, "./itemqa.php?it_id=$it_id&page=",
|
||||
$(function(){
|
||||
$(".itemqa_form").click(function(){
|
||||
window.open(this.href, "itemqa_form", "width=800,height=500,scrollbars=1");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".itemqa_delete").click(function(){
|
||||
@ -175,9 +181,9 @@ $(function(){
|
||||
});
|
||||
});
|
||||
|
||||
$(".pg_page").click(function(){
|
||||
//alert($(this).attr("href"));
|
||||
$(top.document).find('#itemqa').load($(this).attr("href"));
|
||||
$(".qa_page").click(function(){
|
||||
$("#itemqa").load($(this).attr("href"));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user