member_view.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $mp = "20"; //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_h = "SELECT *, getCode('member_master','ds_area',ds_area) as nm_area FROM member_master where cd_user = $cd_user ";
  11. $col=mysql_fetch_array(mysql_query($sql_h));
  12. if (!empty($col['cd_user'])){
  13. $cd_userid = $col['cd_userid'];
  14. $nm_email = $col['nm_email'];
  15. $nm_pass = $col['nm_pass'];
  16. $nm_join = $col['nm_join'];
  17. $ds_type = $col['ds_type'];
  18. $ds_level = $col['ds_level'];
  19. $nm_birth = $col['nm_birth'];
  20. $nm_name = $col['nm_name'];
  21. $nm_company = $col['nm_company'];
  22. $nm_hp = $col['nm_hp'];
  23. $nm_hp_01 = $col['nm_hp_01'];
  24. $nm_hp_02 = $col['nm_hp_02'];
  25. $nm_hp_03 = $col['nm_hp_03'];
  26. $nm_tel = $col['nm_tel'];
  27. $nm_tel_01 = $col['nm_tel_01'];
  28. $nm_tel_02 = $col['nm_tel_02'];
  29. $nm_tel_03 = $col['nm_tel_03'];
  30. $nm_fax = $col['nm_fax'];
  31. $nm_fax_01 = $col['nm_fax_01'];
  32. $nm_fax_02 = $col['nm_fax_02'];
  33. $nm_fax_03 = $col['nm_fax_03'];
  34. $nm_zip = $col['nm_zip'];
  35. $nm_addr = $col['nm_addr'];
  36. $nm_addr_sub = $col['nm_addr_sub'];
  37. $ds_area = $col['ds_area'];
  38. $ds_area_sub = $col['ds_area_sub'];
  39. $nm_etc_01 = $col['nm_etc_01'];
  40. $nm_etc_02 = $col['nm_etc_02'];
  41. $nm_etc_03 = $col['nm_etc_03'];
  42. $nm_etc_04 = $col['nm_etc_04'];
  43. $nm_etc_05 = $col['nm_etc_05'];
  44. $ds_agree1 = $col['ds_agree1'];
  45. $ds_agree2 = $col['ds_agree2'];
  46. $ds_agree3 = $col['ds_agree3'];
  47. $ds_agree4 = $col['ds_agree4'];
  48. $ds_agree5 = $col['ds_agree5'];
  49. $ds_status = $col['ds_status'];
  50. $ds_status_agree = $col['ds_status_agree'];
  51. $dt_dormant = $col['dt_dormant'];
  52. $dt_insert = $col['dt_insert'];
  53. $nm_insert = $col['nm_insert'];
  54. $dt_update = $col['dt_update'];
  55. $nm_update = $col['nm_update'];
  56. $dt_lastlogin = $col['dt_lastlogin'];
  57. $dt_delind = $col['dt_delind'];
  58. $nm_delind = $col['nm_delind'];
  59. $ds_delind = $col['ds_delind'];
  60. $nm_area = $col['nm_area'];
  61. }else{
  62. $cd_userid = "";
  63. $nm_email = "";
  64. $ds_type = "";
  65. $nm_name = "";
  66. $nm_hp = "";
  67. $dt_lastlogin = "";
  68. $dt_insert = "";
  69. $nm_area = "";
  70. }
  71. ?>
  72. <section id="contents">
  73. <h2>일반회원 관리</h2>
  74. <div class="pos_wrap">
  75. <div class="member_name">
  76. <span class="name"><?=$nm_name?> <em>일반회원</em></span>
  77. <span class="login_time">최종 로그인 : <?=$dt_lastlogin?></span>
  78. </div>
  79. <? include("../inc/inc_header_member.php") ?>
  80. </div>
  81. <div class="area_title">
  82. <h3><em>▶</em> 회원정보</h3>
  83. <!--a href="#" class="rnd_btn ty4 gray">+ 더보기</a-->
  84. </div>
  85. <div class="tbl_wrap">
  86. <table class="tbl_list2 ty2">
  87. <colgroup>
  88. <col width="12%">
  89. <col width="38%">
  90. <col width="12%">
  91. <col width="38%">
  92. </colgroup>
  93. <!--tr>
  94. <th>회원구분</th>
  95. <td>개인회원</td>
  96. <th>추천인</th>
  97. <td>신성우</td>
  98. </tr-->
  99. <tr>
  100. <th>이름</th>
  101. <td><?=$nm_name?></td>
  102. <th>아이디</th>
  103. <td><?=$nm_email?></td>
  104. </tr>
  105. <tr>
  106. <th>회원가입일</th>
  107. <td><?=$dt_insert?></td>
  108. <th>연락처</th>
  109. <td><?=$nm_hp?></td>
  110. </tr>
  111. <tr>
  112. <th>주소</th>
  113. <td colspan="3"><?=$nm_area?></td>
  114. </tr>
  115. <!--tr>
  116. <th>주소</th>
  117. <td colspan="3">서울 마포구 서교동</td>
  118. </tr-->
  119. </table>
  120. </div>
  121. <div class="area_title">
  122. <h3><em>▶</em> 문의내역</h3>
  123. <a href="./member_view5.php?cd_user=<?=$cd_user?>" class="rnd_btn ty4 gray">+ 더보기</a>
  124. </div>
  125. <div class="tbl_wrap">
  126. <table class="tbl_list ty2">
  127. <colgroup>
  128. <col width="7%">
  129. <col width="*">
  130. <col width="13%">
  131. <col width="13%">
  132. <col width="15%">
  133. </colgroup>
  134. <thead>
  135. <tr>
  136. <th>번호</th>
  137. <th>제목</th>
  138. <th>작성일</th>
  139. <th>답변여부</th>
  140. <th>답변</th>
  141. </tr>
  142. </thead>
  143. <?
  144. $cd_board = "02";
  145. $ds_kind = "A";
  146. $cd_user = $_REQUEST["cd_user"];
  147. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  148. $PageSize=2; //목록개수설정
  149. $pagestartpoint=($PageNo-1)*$PageSize;
  150. $sql = "where cd_board='$cd_board' and ds_delind='N'";
  151. $sql = $sql." and ds_kind='$ds_kind' ";
  152. $sql = $sql." and cd_user='$cd_user' ";
  153. if($searchword != ""){
  154. if($searchtype=="" || $searchtype==null){
  155. $sql = $sql. " and (nm_title like '$searchword%' or nm_content like '$searchword%' or cd_userid like '$searchword%')";
  156. }else{
  157. $sql = $sql. " and $searchtype like '$searchword%'";
  158. }
  159. }
  160. $totalrows = @mysql_result(mysql_query("select count(*) from board_master $sql"),0,0);
  161. if($totalrows>0) {
  162. $r = mysql_query("SELECT * FROM board_master $sql ORDER BY ds_top desc, no_famally ASC, no_order ASC LIMIT 0,2");
  163. $i=1;
  164. while($col = mysql_fetch_array($r)) {
  165. $date = strtotime ($col[dt_insert]);
  166. $view_date = strtotime ("-1 day",time());
  167. if($date >= $view_date) {
  168. $newicon = " <img src='".ADMIN_PATH."img/i_new.gif' style='margin-top:1px;' /> ";
  169. } else {
  170. $newicon = "";
  171. }
  172. if($col[no_step]>0){
  173. $padding = $col[no_step] * 8;
  174. $step = "<span style=\"padding-left:".$padding."px\"/>";
  175. }
  176. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  177. $no = ($tmpNum - $i)+1;
  178. ?>
  179. <tr onclick="location.href='./member_view5_detail.php?cd_board=<?=$cd_board?>&cd_user=<?=$cd_user?>&ds_kind=<?=$ds_kind?>&cd_seq=<?=$col[cd_seq]?>&PageNo=1';" style="cursor: pointer; cursor: hand;">
  180. <td><?=$no?></td>
  181. <? if($cd_board=="99"){?>
  182. <td width="10%" align="center" class="list03"><img src="<?=UPLOAD_PATH?>board/board_<?=$cd_board?>/<?=$col[nm_file]?>" width="50"/></td>
  183. <?}?>
  184. <td class="subject"><?=text_cut($col[nm_title],50)?></td>
  185. <td><?=$col[dt_insert]?></td>
  186. <? if($cd_board=="02"){?>
  187. <td><?=($col[nm_reply] == "") ? "미답변" : "답변완료" ?></td>
  188. <td>
  189. <? if($col[nm_reply] == ""){?>
  190. <a href="./member_view5_detail.php?cd_board=<?=$cd_board?>&cd_user=<?=$cd_user?>&ds_kind=<?=$ds_kind?>&cd_seq=<?=$col[cd_seq]?>&PageNo=1" class="rnd_s_btn">답변</a>
  191. <?}?>
  192. </td>
  193. <?}?>
  194. </tr>
  195. <?
  196. $i++;
  197. }
  198. }else{
  199. ?>
  200. <tr>
  201. <td colspan="5">등록된 정보가 없습니다.</td>
  202. </tr>
  203. <?
  204. }
  205. ?>
  206. </table>
  207. </div>
  208. </section>
  209. <script laguage="javascript" type="text/javascript">
  210. $(document).ready(function() {
  211. $("#btn_cancel").bind("click",function(){
  212. // alert($("#btn_cancel").attr('value'));
  213. if(confirm("해제하시겠습니까?")){
  214. $("#cd_user_cancel").val($("#btn_cancel").attr('value'));
  215. $("#frmCancel").submit();
  216. }
  217. });
  218. $("#btn_write").bind("click",function(){
  219. var c=confirm("정보를 등록하시겠습니까?");
  220. if(c){
  221. $("#btn_write").hide();
  222. $("#frmMember").submit();
  223. }else{
  224. $("#btn_write").show();
  225. return false;
  226. }
  227. });
  228. });
  229. </script>
  230. <? include("../inc/inc_footer.php") ?>
  231. <? include("../inc/inc_bottom.php") ?>
  232. <?
  233. mysql_close($connect);
  234. ?>