| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
- include $_SERVER['DOCUMENT_ROOT'].'/common/auth_login_chk.php';
- $cd_board = "02";
- $ds_kind = $_REQUEST["ds_kind"];
- $s_cd_user = $_SESSION['s_cd_user'];
- $s_cd_dealer = $_SESSION['s_cd_dealer'];
- $s_cd_dealer_p = $_SESSION['s_cd_dealer_p'];
- $s_ds_type = $_SESSION['s_ds_type'];
- if ( !($ds_kind == "A" || $ds_kind == "D")
- || ($ds_kind == "A" && empty($s_cd_user))
- || ($ds_kind == "D" && empty($s_cd_dealer_p))
- ){
- AlertRedirect("잘못된 요청입니다.","/index.php");
- }
- if($ds_kind == "D"){
- $cd_user = $s_cd_dealer_p;
- }else{
- $cd_user = $s_cd_user;
- }
- if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
- $PageSize=10; //목록개수설정
- $pagestartpoint=($PageNo-1)*$PageSize;
- $sql = "where cd_board='$cd_board' and ds_delind='N'";
- $sql = $sql." and ds_kind='$ds_kind' ";
- $sql = $sql." and cd_user='$cd_user' ";
- if($searchword != ""){
- if($searchtype=="" || $searchtype==null){
- $sql = $sql. " and (nm_title like '$searchword%' or nm_content like '$searchword%' or cd_userid like '$searchword%')";
- }else{
- $sql = $sql. " and $searchtype like '$searchword%'";
- }
- }
- $totalrows = @mysql_result(mysql_query("select count(*) from board_master $sql"),0,0);
- ?>
- <? include("../include/inc_top.php") ?>
- <? include("../include/inc_header.php") ?>
- <section id="wrap">
- <section id="visual" class="visual_mypage">
- <h2>마이페이지</h2>
- <p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
- </section>
- <section id="content">
- <?
- if($ds_kind=="D"){
- ?>
- <? include("./inc_menu_main_dealer.php"); ?>
- <? include("./inc_menu_dealer.php"); ?>
- <?
- }else{
- // /common/lib/func.php 1662에 정의됨
- $is_upro_member = getUproMember($_SESSION['s_cd_user']);
- $depth_info = array("NAME" => array("문의내역", "문의내역"));
- if($is_upro_member) {
- include_once($_SERVER['DOCUMENT_ROOT']."/mypage/inc_menu_member_company.php");
- }else {
- include_once($_SERVER['DOCUMENT_ROOT']."/mypage/inc_menu_main_member.php");
- }
- }
- ?>
- <h3>문의내역</h3>
- <table class="tbl_v">
- <colgroup>
- <col width="7%">
- <col width="*">
- <col width="13%">
- <col width="13%">
- </colgroup>
- <thead>
- <tr>
- <th>번호</th>
- <th>제목</th>
- <th>작성일</th>
- <th>답변여부</th>
- </tr>
- </thead>
- <tbody>
- <?
- if($totalrows>0) {
- $r = mysql_query("SELECT * FROM board_master $sql ORDER BY ds_top desc, no_famally ASC, no_order ASC LIMIT $pagestartpoint,$PageSize");
- $i=1;
- while($col = mysql_fetch_array($r)) {
- $date = strtotime ($col[dt_insert]);
- $view_date = strtotime ("-1 day",time());
- if($date >= $view_date) {
- $newicon = " <img src='".ADMIN_PATH."img/i_new.gif' style='margin-top:1px;' /> ";
- } else {
- $newicon = "";
- }
- if($col[no_step]>0){
- $padding = $col[no_step] * 8;
- $step = "<span style=\"padding-left:".$padding."px\"/>";
- }
- $tmpNum =$totalrows-($PageSize*($PageNo-1));
- $no = ($tmpNum - $i)+1;
- ?>
- <tr onclick="location.href='./qna_view.php?cd_board=<?=$cd_board?>&ds_kind=<?=$ds_kind?>&cd_seq=<?=$col[cd_seq]?>&PageNo=<?=$PageNo?>';" style="cursor: pointer; cursor: hand;">
- <td><?=$no?></td>
- <? if($cd_board=="99"){?>
- <td width="10%" align="center" class="list03"><img src="<?=UPLOAD_PATH?>board/board_<?=$cd_board?>/<?=$col[nm_file]?>" width="50"/></td>
- <?}?>
- <td class="al"><?=text_cut($col[nm_title],50)?></td>
- <td><?=$col[dt_insert]?></td>
- <? if($cd_board=="02"){?>
- <td><?=($col[nm_reply] == "") ? "미답변" : "답변완료" ?></td>
- <?}?>
- </tr>
- <?
- $i++;
- }
- }else{
- ?>
- <tr>
- <td colspan="4">등록된 정보가 없습니다.</td>
- </tr>
- <?
- }
- ?>
- </tbody>
- </table>
- <div class="paging">
- <?
- $url = "/mypage/qna_list.php?cd_board=$cd_board&searchtype=$searchtype&searchword=$searchword&ds_kind=$ds_kind";
- ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
- ?>
- </div>
- <div class="btn_right">
- <a href="./qna_write.php?cd_board=<?=$cd_board?>&ds_kind=<?=$ds_kind?>" class="button">문의하기</a>
- </div>
- </section>
- </section>
- <? include("../include/inc_footer.php") ?>
- <? include("../include/inc_bottom.php") ?>
- <?
- mysql_close($connect);
- ?>
|