aap_view6.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $mp = "21"; //set top nav
  5. $cd_dealer = $_REQUEST["cd_dealer"];
  6. ?>
  7. <? include("../inc/inc_top.php") ?>
  8. <? include("../inc/inc_header.php") ?>
  9. <section id="contents">
  10. <h2>딜러 / AAP 회원관리</h2>
  11. <? include("../inc/inc_header_aap.php") ?>
  12. <div class="tbl_wrap">
  13. <table class="tbl_list ty2">
  14. <colgroup>
  15. <col width="7%">
  16. <col width="*">
  17. <col width="13%">
  18. <col width="13%">
  19. </colgroup>
  20. <thead>
  21. <tr>
  22. <th>번호</th>
  23. <th>제목</th>
  24. <th>작성일</th>
  25. <th>답변여부</th>
  26. </tr>
  27. </thead>
  28. <?
  29. $cd_board = "02";
  30. $ds_kind = "D";
  31. $cd_user = $cd_dealer;
  32. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  33. $PageSize=2; //목록개수설정
  34. $pagestartpoint=($PageNo-1)*$PageSize;
  35. $sql = "where cd_board='$cd_board' and ds_delind='N'";
  36. $sql = $sql." and ds_kind='$ds_kind' ";
  37. $sql = $sql." and cd_user='$cd_user' ";
  38. if($searchword != ""){
  39. if($searchtype=="" || $searchtype==null){
  40. $sql = $sql. " and (nm_title like '$searchword%' or nm_content like '$searchword%' or cd_userid like '$searchword%')";
  41. }else{
  42. $sql = $sql. " and $searchtype like '$searchword%'";
  43. }
  44. }
  45. $totalrows = @mysql_result(mysql_query("select count(*) from board_master $sql"),0,0);
  46. if($totalrows>0) {
  47. $r = mysql_query("SELECT * FROM board_master $sql ORDER BY ds_top desc, no_famally ASC, no_order ASC LIMIT 0,2");
  48. $i=1;
  49. while($col = mysql_fetch_array($r)) {
  50. $date = strtotime ($col[dt_insert]);
  51. $view_date = strtotime ("-1 day",time());
  52. if($date >= $view_date) {
  53. $newicon = " <img src='".ADMIN_PATH."img/i_new.gif' style='margin-top:1px;' /> ";
  54. } else {
  55. $newicon = "";
  56. }
  57. if($col[no_step]>0){
  58. $padding = $col[no_step] * 8;
  59. $step = "<span style=\"padding-left:".$padding."px\"/>";
  60. }
  61. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  62. $no = ($tmpNum - $i)+1;
  63. ?>
  64. <tr onclick="location.href='./dealer_view6_detail.php?cd_board=<?=$cd_board?>&ds_kind=<?=$ds_kind?>&cd_seq=<?=$col[cd_seq]?>&cd_dealer=<?=$cd_dealer?>&PageNo=1';" style="cursor: pointer; cursor: hand;">
  65. <td><?=$no?></td>
  66. <? if($cd_board=="99"){?>
  67. <td width="10%" align="center" class="list03"><img src="<?=UPLOAD_PATH?>board/board_<?=$cd_board?>/<?=$col[nm_file]?>" width="50"/></td>
  68. <?}?>
  69. <td class="subject"><?=text_cut($col[nm_title],50)?></td>
  70. <td><?=$col[dt_insert]?></td>
  71. <? if($cd_board=="02"){?>
  72. <td><?=($col[nm_reply] == "") ? "미답변" : "답변완료" ?></td>
  73. <?}?>
  74. </tr>
  75. <?
  76. $i++;
  77. }
  78. }else{
  79. ?>
  80. <tr>
  81. <td colspan="4">등록된 정보가 없습니다.</td>
  82. </tr>
  83. <?
  84. }
  85. ?>
  86. </table>
  87. </div>
  88. <div class="paging">
  89. <?
  90. $url = "./dealer_view6.php?searchtype=$searchtype&searchword=$searchword&dt_start=$dt_start&dt_end=$dt_end&cd_dealer=$cd_dealer";
  91. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  92. ?>
  93. </div>
  94. </section>
  95. <? include("../inc/inc_footer.php") ?>
  96. <? include("../inc/inc_bottom.php") ?>
  97. <?
  98. mysql_close($connect);
  99. ?>