search.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. $_SESSION['s_car_update_ing'] = null; //세션 값 삭제 : car 정보 수정 중
  4. $_SESSION['s_cd_car'] = null; //세션 값 삭제 : car key
  5. ?>
  6. <?php include("../include/inc_header.php") ?>
  7. <main class="pb123">
  8. <section>
  9. <div class="sub--top--visual">
  10. <div class="contents--inner">
  11. <h2>내차 사고이력 조회</h2>
  12. <p>이차조아에서 사고 이력 조회 후 최고가 내차 팔기</p>
  13. </div>
  14. </div>
  15. </section>
  16. <section>
  17. <div class="car--search--wrap">
  18. <form id="frmSearch" name="frmSearch" method="post" action="search_detail.php" enctype="multipart/form-data">
  19. <div class="car--serach--inner">
  20. <div class="thumb"></div>
  21. <div class="desc">
  22. <h2><span>걱정없는</span> 내차 팔기</h2>
  23. <p>딜러 대면 걱정 없이 견적 후 불필요한 가격 실랑이 걱정없어요!</p>
  24. <div class="d-flex align-items-center">
  25. <input type="text" class="form-control" id="nm_number" name="nm_number" placeholder="띄어쓰기 없이 차량번호를 입력하세요 (12가 12345)" style="height:72px;"/>
  26. <button type="button" class="btn btn-primary ml15" style="height:72px;" id="btn_search_car">차량 조회</button>
  27. </div>
  28. </div>
  29. </div>
  30. </form>
  31. </div>
  32. </section>
  33. </main>
  34. <script>
  35. $(function() {
  36. $("#btn_search_car").on("click", function() {
  37. var custom_opts = {
  38. title : '',
  39. btn_close_show : false,
  40. }
  41. <?php if(empty($_SESSION['s_cd_userid'])) { ?>
  42. custom_opts.title = '회원로그인 후 이용할 수 있습니다. 로그인 페이지로 이동하시겠습니까?';
  43. custom_modal_confirm(custom_opts, function(confirm) {
  44. if(confirm) {
  45. custom_modal_confirm_close();
  46. link("/member/login.php");
  47. return false;
  48. }else {
  49. return false;
  50. }
  51. });
  52. return false;
  53. <?php } ?>
  54. var fieldlist = [["nm_number","차량번호"]];
  55. if (!fnCheckForm(fieldlist)){
  56. return false;
  57. }
  58. $("#frmSearch").submit();
  59. return false;
  60. // link("search_detail.php?")
  61. //
  62. // $("#btn_search_car").hide();
  63. // var data = $("#frmSearch").serialize();
  64. // $.ajax({
  65. // url : 'proc.php',
  66. // type: 'POST',
  67. // dataType : 'json',
  68. // data: data,
  69. // success: function(res) {
  70. // $("#btn_search_car").show();
  71. //
  72. // if(res.CODE != "0000") {
  73. // custom_opts.title = res.MSG;
  74. //
  75. // custom_modal_alert(custom_opts);
  76. // return false;
  77. // }
  78. // link("sell_step1.php?mode=Step1");
  79. // },
  80. // error:function(request,status,error){
  81. // $("#btn_search_car").show();
  82. //
  83. // alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
  84. // }
  85. // });
  86. });
  87. });
  88. </script>
  89. <?php include("../include/inc_footer.php") ?>
  90. <?
  91. mysql_close($connect);
  92. ?>