|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/junsu/ |
Upload File : |
<?
require $_SERVER['DOCUMENT_ROOT']."/conf/conf_dir.php";
// =============================================== Query
$tableName = "qna";
if(!$pageCount) $pageCount =10;
$show_one_page = $pageCount;
$show_view_page = 5;
$page = ( $page ) ? $page : 1;
$offset = ($page-1)*$show_one_page;
if($search_sort) {
$where .= "AND general_setting ='$search_sort'";
}
if($search_reply == "0"){
$where .= "AND original_no ='$search_reply'";
}
if($sessionLevel !=15){
$where .= "AND is_secret = 'N'";
}
$order_by = ' ORDER BY is_notice asc,no desc';
$query_limit = "limit $offset,$show_one_page";
$QUERY_TOTAL = "SELECT count(*) FROM board_$tableName where user_no = '$sessionIDX' and is_delete ='N' $where $order_by";
$QUERY_PAGE = "SELECT * FROM board_$tableName where user_no = '$sessionIDX' and is_delete ='N' $where $order_by $query_limit";
$total_count = get_db($QUERY_TOTAL);
$total_page = ceil( $total_count / $show_one_page);
$start_num = $total_count - $offset; //
$viewlist = ( !$total_count ) ? "" : Get_viewpage5($page,$total_count,$show_one_page,$show_view_page,$url_tail);
$result= mysql_query($QUERY_PAGE,$db_con);
if(!$result) {
error("DB_ERROR");
exit;
}
$total = mysql_affected_rows();
if(!$total)
{
$BRD_LIST = "
<div class='post03' >
<div class='myp_date_tit'>
<div class='myqa_tit_ri' style='text-align:center;padding-top:10px;'>
<div class='myqa_tit_sel font_bold' >登録されたコメントはありません。</div>
</div>
</div>
</div>";
}
else
{
for($i=0; $i<$total; $i++)
{
$Num = $start_num - $i;
$row = mysql_fetch_array($result);
$regdate = substr($row[reg_date],0,10);
$reply_content = nl2br($row[reply_content]);
$subject = stripslashes($row[subject]);
$contents = stripslashes($row[contents]);
if($row[original_no]==1) {
$original_no_chk="<p class='myqa_ans_ok'>回答</p>";
$replay_chk="
<div class='board_annotation padding_10'><span class='txt_align_l font_bold'>管理者</span><span class='txt_align_l padding_l_10'>".substr($row[modify_date],0,10)."</span><br>
$reply_content
<div style='position:absolute; top:-9px; left:0;'><img src='../images/sub/annotation_dir.png' width='14' height='9' /></div>
</div>
";
}
else
{
$original_no_chk="<p class='myqa_ans_no'>未回答</p>";
$replay_chk="";
}
if($row[mChk] == 1){
$bgColor ="#dddddd";
}else{
$bgColor ="#ffffff";
}
switch($row[general_setting]){
case "1":
$qubunName ="その他";break;
case "2":
$qubunName ="入金確認";break;
case "3":
$qubunName ="GOODS払い戻し要請";break;
case "4":
$qubunName ="GOODS取り消し";break;
}
if($i != 0) $tmpClass="border_tn";
$BRD_LIST .="
<div class='post03 $tmpClass' id='post".$Num."'>
<div class='myp_date_tit'>
<div class='myqa_tit_le '>$original_no_chk</div>
<div class='myqa_tit_ri'>
<div class='myqa_btn_top'>
<div style='position:relative; left:0; top:0px; z-index:5; margin-right:0px;'>
<a href='javascript:chklist($Num);'><img id='listBtn".$Num."' src='../images/sub/icon_arr_more.jpg' /></a></div>
</div>
<div class='myqa_tit_sel font_bold'><span class='mvis_date_02'>「".$qubunName."」 </span><br />
$subject<span class='mvis_date txt_align_r txt_bk1 '>$regdate</span>
</div>
</div>
<div id='list".$Num."' class='post_del bg_w1 padding_s1 border_t1 '>
<p class='line_h23px padding_b_40 image featured'>".$contents."</p>
$replay_chk
</br>
<p class='margin_t10 txt_align_c'>
<a href='javascript: write_del($row[no]);'><img src='../images/sub/btn_del_02.jpg'/></a>
</p>
</div>
</div>
</div>
";
}
}
?>
<?=$BRD_LIST?>
<div class="pagination02">
<?=$viewlist?>
</div>