sa_view5.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $mp = "22"; //set top nav
  5. ?>
  6. <? include("../inc/inc_top.php") ?>
  7. <? include("../inc/inc_header.php") ?>
  8. <?
  9. $cd_user = $_REQUEST["cd_user"];
  10. $sql ="SELECT
  11. *
  12. FROM sa_master
  13. WHERE cd_user='$cd_user' AND ds_delind='N'";
  14. $mode = "Add";
  15. $col=mysql_fetch_array(mysql_query($sql));
  16. if (!empty($col['cd_user'])){
  17. $cd_user = $col['cd_user'];
  18. $cd_userid = $col['cd_userid'];
  19. $nm_email = $col['nm_email'];
  20. $nm_pass = $col['nm_pass'];
  21. $nm_join = $col['nm_join'];
  22. $ds_type = $col['ds_type'];
  23. $ds_level = $col['ds_level'];
  24. $nm_birth = $col['nm_birth'];
  25. $nm_name = $col['nm_name'];
  26. $nm_company = $col['nm_company'];
  27. $nm_hp = $col['nm_hp'];
  28. $nm_hp_01 = $col['nm_hp_01'];
  29. $nm_hp_02 = $col['nm_hp_02'];
  30. $nm_hp_03 = $col['nm_hp_03'];
  31. $nm_tel = $col['nm_tel'];
  32. $nm_tel_01 = $col['nm_tel_01'];
  33. $nm_tel_02 = $col['nm_tel_02'];
  34. $nm_tel_03 = $col['nm_tel_03'];
  35. $nm_fax = $col['nm_fax'];
  36. $nm_fax_01 = $col['nm_fax_01'];
  37. $nm_fax_02 = $col['nm_fax_02'];
  38. $nm_fax_03 = $col['nm_fax_03'];
  39. $nm_zip = $col['nm_zip'];
  40. $nm_addr = $col['nm_addr'];
  41. $nm_addr_sub = $col['nm_addr_sub'];
  42. $ds_area = $col['ds_area'];
  43. $ds_area_sub = $col['ds_area_sub'];
  44. $nm_etc_01 = $col['nm_etc_01'];
  45. $nm_etc_02 = $col['nm_etc_02'];
  46. $nm_etc_03 = $col['nm_etc_03'];
  47. $nm_etc_04 = $col['nm_etc_04'];
  48. $nm_etc_05 = $col['nm_etc_05'];
  49. $ds_agree1 = $col['ds_agree1'];
  50. $ds_agree2 = $col['ds_agree2'];
  51. $ds_agree3 = $col['ds_agree3'];
  52. $ds_agree4 = $col['ds_agree4'];
  53. $ds_agree5 = $col['ds_agree5'];
  54. $ds_status = $col['ds_status'];
  55. $ds_status_agree = $col['ds_status_agree'];
  56. $dt_insert = $col['dt_insert'];
  57. $nm_insert = $col['nm_insert'];
  58. $dt_update = $col['dt_update'];
  59. $nm_update = $col['nm_update'];
  60. $dt_delind = $col['dt_delind'];
  61. $nm_delind = $col['nm_delind'];
  62. $ds_delind = $col['ds_delind'];
  63. /*
  64. $arr_nm_info1 = explode("-",$nm_info1);
  65. if(count($arr_nm_info1) == 3){
  66. $nm_info11 = $arr_nm_info1['0'];
  67. $nm_info12 = $arr_nm_info1['1'];
  68. $nm_info13 = $arr_nm_info1['2'];
  69. }else{
  70. $nm_info11 = "";
  71. $nm_info12 = "";
  72. $nm_info13 = "";
  73. }
  74. $arr_nm_info3 = explode("@",$nm_info3);
  75. if(count($arr_nm_info3) == 2){
  76. $nm_info31 = $arr_nm_info3['0'];
  77. $nm_info32 = $arr_nm_info3['1'];
  78. }else{
  79. $nm_info31 = "";
  80. $nm_info32 = "";
  81. }
  82. $nm_info3 = $col['nm_info3'];
  83. */
  84. $mode = "Update";
  85. }else{
  86. $ds_level = "1";
  87. }
  88. $totalrows = @mysql_result(mysql_query("select count(*) from admin_info WHERE ds_delind='N'"),0,0);
  89. ?>
  90. <section id="contents">
  91. <h2>SA회원 관리</h2>
  92. <? include("../inc/inc_header_sa.php") ?>
  93. <h3><em>▶</em> 문의내역</h3>
  94. <div class="tbl_wrap">
  95. <table class="tbl_list ty2">
  96. <colgroup>
  97. <col width="7%">
  98. <col width="*">
  99. <col width="13%">
  100. <col width="13%">
  101. </colgroup>
  102. <thead>
  103. <tr>
  104. <th>번호</th>
  105. <th>제목</th>
  106. <th>작성일</th>
  107. <th>답변여부</th>
  108. </tr>
  109. </thead>
  110. <?
  111. $cd_board = "02";
  112. $ds_kind = "A";
  113. $cd_user = $_REQUEST["cd_user"];
  114. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  115. $PageSize=2; //목록개수설정
  116. $pagestartpoint=($PageNo-1)*$PageSize;
  117. $sql = "where cd_board='$cd_board' and ds_delind='N'";
  118. $sql = $sql." and ds_kind='$ds_kind' ";
  119. $sql = $sql." and cd_user='$cd_user' ";
  120. if($searchword != ""){
  121. if($searchtype=="" || $searchtype==null){
  122. $sql = $sql. " and (nm_title like '$searchword%' or nm_content like '$searchword%' or cd_userid like '$searchword%')";
  123. }else{
  124. $sql = $sql. " and $searchtype like '$searchword%'";
  125. }
  126. }
  127. $totalrows = @mysql_result(mysql_query("select count(*) from board_master $sql"),0,0);
  128. if($totalrows>0) {
  129. $r = mysql_query("SELECT * FROM board_master $sql ORDER BY ds_top desc, no_famally ASC, no_order ASC LIMIT 0,2");
  130. $i=1;
  131. while($col = mysql_fetch_array($r)) {
  132. $date = strtotime ($col[dt_insert]);
  133. $view_date = strtotime ("-1 day",time());
  134. if($date >= $view_date) {
  135. $newicon = " <img src='".ADMIN_PATH."img/i_new.gif' style='margin-top:1px;' /> ";
  136. } else {
  137. $newicon = "";
  138. }
  139. if($col[no_step]>0){
  140. $padding = $col[no_step] * 8;
  141. $step = "<span style=\"padding-left:".$padding."px\"/>";
  142. }
  143. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  144. $no = ($tmpNum - $i)+1;
  145. ?>
  146. <tr onclick="location.href='./member_view5_detail.php?cd_board=<?=$cd_board?>&ds_kind=<?=$ds_kind?>&cd_seq=<?=$col[cd_seq]?>&cd_user=<?=$cd_user?>&PageNo=1';" style="cursor: pointer; cursor: hand;">
  147. <td><?=$no?></td>
  148. <? if($cd_board=="99"){?>
  149. <td width="10%" align="center" class="list03"><img src="<?=UPLOAD_PATH?>board/board_<?=$cd_board?>/<?=$col[nm_file]?>" width="50"/></td>
  150. <?}?>
  151. <td class="subject"><?=text_cut($col[nm_title],50)?></td>
  152. <td><?=$col[dt_insert]?></td>
  153. <? if($cd_board=="02"){?>
  154. <td><?=($col[nm_reply] == "") ? "미답변" : "답변완료" ?></td>
  155. <?}?>
  156. </tr>
  157. <?
  158. $i++;
  159. }
  160. }else{
  161. ?>
  162. <tr>
  163. <td colspan="4">등록된 정보가 없습니다.</td>
  164. </tr>
  165. <?
  166. }
  167. ?>
  168. </table>
  169. </div>
  170. <div class="paging">
  171. <?
  172. $url = "./member_view5.php?searchtype=$searchtype&searchword=$searchword&dt_start=$dt_start&dt_end=$dt_end&cd_user=$cd_user";
  173. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  174. ?>
  175. </div>
  176. </section>
  177. <? include("../inc/inc_footer.php") ?>
  178. <? include("../inc/inc_bottom.php") ?>
  179. <?
  180. mysql_close($connect);
  181. ?>