dealer_view6.php 3.0 KB

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