https://coupon.pcmkorea.com/auth/signin

Submitted URL:
https://coupon.pcmkorea.com/
Report Finished:

The outgoing links identified from the page

JavaScript Variables · 7 found

Global JavaScript variables loaded on the window object of a page, are variables declared outside of functions and accessible from anywhere in the code within the current scope

NameType
onbeforetoggleobject
documentPictureInPictureobject
onscrollendobject
$function
jQueryfunction
momentfunction
ZXingobject

Console log messages · 1 found

Messages logged to the web console

TypeCategoryLog
verbosedom
URL
https://coupon.pcmkorea.com/auth/signin
Text
[DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More info: https://goo.gl/9p2vKq) %o

HTML

The raw HTML body of the page

<!DOCTYPE html><html lang="ko"><head>
    <meta charset="utf-8">
    <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"/> -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="description" content="Mobile Pet Registration">
    <meta property="og:title" content="Mobile Pet Registration">
    <meta property="og:description" content="Easy Mobile Pet Registration">
    <!-- <meta property="og:image" content=""/> -->
    
    <title>쿠폰인증시스템</title>
    <link rel="stylesheet" href="/_statics/css/reset.css">
    <link rel="stylesheet" href="/_statics/css/common.css">
    <link rel="stylesheet" href="/_statics/css/style.css">    <script type="text/javascript" src="/_statics/js/jquery-3.7.0.min.js"></script>
    <script type="text/javascript" src="/_statics/js/moment.min.js"></script>
    
    <!-- zxing -->
    <script type="text/javascript" src="/_statics/js/zxing.js"></script>
    
    <script type="text/javascript">
    /** hbs Template engin helper 추가 */
      
    </script>
    <script type="text/javascript">
    
      // -------------------- loading bar -------------------- //
      const displayLoading = (trigger = true) => {
        if(trigger) $('#_loadingbar').show();
        else $('#_loadingbar').hide();
      }
    
      $(document).ready((event) => {
        let isSubmitAction = false;
    
        // if($('input[type=checkbox]').length == 1) $('input[type=checkbox]').attr('disabled', true);
    
        // submit 이벤트가 발생했을때 로딩바 미노출 설정
        $(document).on('submit', 'form', (onSubmitEvent) => {
          displayLoading(false);
          isSubmitAction = true;
        })
        // a tag 클릭시 로딩바 추가
        $(document).on('click', 'a', (onClickEvent) => {
          displayLoading(false);
          isSubmitAction = true;
        })
    
        // 페이지 로드시 로딩바 제거
        window.onpageshow = () => {
          displayLoading(false);
        }
    
        // 페이지 떠날시 로딩바 추가
        $(window).on('beforeunload', (beforeunloadEvent) => {
          if (!isSubmitAction) displayLoading(true);
          isSubmitAction = false;
        })
    
    
        // search-box 선택 이벤트
        $(".search-table_cell-input input").focus(function () {
          $(this).parents("td").prev("th").addClass("active");
        });
    
        $(".search-table_cell-input input").blur(function () {
          $(this).parents("td").prev("th").removeClass("active");
        });
    
        $(".search-table_cell-input .select-box").focus(function () {
            $(this).parents("td").prev("th").addClass("active");
          });
    
        $(".search-table_cell-input .select-box").blur(function () {
          $(this).parents("td").prev("th").removeClass("active");
        });
        
        // 조회데이터 세팅
        $("input").each(function(){
          switch($(this).attr('subattr')){
            // 서브속성이 n(number)인 경우 숫자만 입력 및 3자리 콤마 추가
            case 'n':           
              $(this).val((+$(this).val().replace(/[^0-9]/g,'')).toLocaleString().toString()); 
              // input clone 후 속성, 값 변경 후 append
              $(this).clone().appendTo(this).attr({type:'hidden', 'dt-id': $(this).attr('name')}).removeAttr('id').val($(this).val().replace(/\,/g, ''));        
              // 기존 input 속성 변경 밑 삭제
              $(this).attr('dt-name',$(this).attr('name'));
              $(this).removeAttr('name');
              break;
            
            // 서브속성이 engn(eng & number)인 경우 영문 & 숫자만 입력
            case 'engn': $(this).val($(this).val().replace(/[^a-zA-Z0-9]/g,'')); break;
    
            // 서브속성이 ip인 경우 숫자, '.' 만 허용
            case 'ip': $(this).val($(this).val().replace(/[^.0-9]/g,'')); break;
    
            // e(email)
            case 'e': $(this).val($(this).val().replace(/[^@\-_.a-zA-Z0-9]/g,'')); break;
    
            // p(phone)
            case 'p': $(this).val($(this).val().replace(/[^\-0-9]/g,'')); break;
          }
        });
    
        // 입력데이터 세팅
        $("input").on('keyup focusout', function(){
          switch($(this).attr('subattr')){
            // 서브속성이 n(number)인 경우 숫자만 입력 및 3자리 콤마 추가
            case 'n': 
              $(this).val((+$(this).val().replace(/[^0-9]/g,'')).toLocaleString().toString()); 
              $('[dt-id='+$(this).attr('dt-name')+']').val($(this).val().replace(/\,/g, ''));
              break;
            
            // 서브속성이 engn(eng & number)인 경우 영문 & 숫자만 입력
            case 'engn': $(this).val($(this).val().replace(/[^a-zA-Z0-9]/g,'')); break;
    
            // 서브속성이 ip인 경우 숫자, '.' 만 허용
            case 'ip': $(this).val($(this).val().replace(/[^.0-9]/g,'')); break;
    
            // e(email)
            case 'e': $(this).val($(this).val().replace(/[^@\-_.a-zA-Z0-9]/g,'')); break;
    
            // p(phone)
            case 'p': $(this).val($(this).val().replace(/[^\-0-9]/g,'')); break;
          }
        });
    
      });
    
      // -------------------- 페이지 이동 -------------------- //
      /** 뒤로가기 */
      const goBack = () => {
        const referer = getReferer();
        if (referer.length < 1) {
          window.history.back();
        } else {
          window.location.href = referer;
        }
      };
    
      /** 뒤로가기 주소 불러오기 */
      const getReferer = () => {
        const href = window.location.href;
        const referer = window.localStorage.getItem('pre-referer');
        return referer;
      };
    
      /** 뒤로가기 주소 저장 */
      const setReferer = () => {
        const href = window.location.href;
        window.localStorage.setItem('pre-referer', href);
      };
    
      // -------------------- 체크박스 -------------------- //
      /** 체크박스 전체선택 */
      const allCheck = (event) => {
        if (event.target.checked) $('.select_subject input').prop('checked', true); // all check
        else $('.select_subject input').prop('checked', false); // all uncheck
      };
    
      // -------------------- 로그인 -------------------- //
      /** 로그아웃 */
      const signOut = () => {
        alert('로그아웃 되었습니다.');
        $.ajax({
          type: 'POST',
          url: '/auth/logout',
          success: (result) => {
            if (result) {
              location.href = '/auth/signin'
            }
          },
          error: (err) => {
            console.log(err);
          }
        })
      };
      
      // -------------------- Helper -------------------- //
      // querystring -> json
      const queryStringToJSON = (qs) => {
        qs = qs || location.search.slice(1);
        if(qs.indexOf('?') > -1){
          qs = qs.split('?')[1];
        }
    
        var pairs = qs.split('&');
        var result = {};
        pairs.forEach(function(p) {
            var pair = p.split('=');
            var key = pair[0];
            var value = decodeURIComponent(pair[1] || '').replace(/\+/g, ' ');
    
            if( result[key] ) {
                if( Object.prototype.toString.call( result[key] ) === '[object Array]' ) {
                    result[key].push( value );
                } else {
                    result[key] = [ result[key], value ];
                }
            } else {
                result[key] = value;
            }
        });
    
        return JSON.parse(JSON.stringify(result));
    };
    </script>  </head>

  <body>
    <form class="form">
        <span class="login">PCM 쿠폰 인증 서비스</span>
        <p>
        
        </p>
        <input type="text" placeholder="교환사코드" class="form_input" id="code" name="code" value="" required="">
        <input type="text" placeholder="아이디" class="form_input" id="id" name="id" value="" required="">
        <input type="password" placeholder="비밀번호" class="form_input" id="password" name="password" required="">
        <div class="form_checkbox">
            <input type="checkbox" class="form_checkbox" id="saveId">
            <label for="saveId" class="form_checkbox">아이디 저장</label>
        </div>
        <button type="submit" class="btn w-100 primary" onclick="doLogin();">로그인</button>
    </form>
    
    <div class="popup">
        <div class="popup-wrapper">
            <div class="popup-content">
            <p class="popup-title">로그인 실패</p>
            <p class="popup-description">로그인 정보를 확인해주세요.</p>
            </div>
            <div class="popup-btn-wrapper">
            <button type="button" onclick="location.href='/auth/signin'" class="btn primary w-100">확인</button>
            </div>
        </div>
    </div>
    
    <script type="text/javascript">
    
        $(document).ready(() => {
            sessionStorage.removeItem("couponNumber")
    
            const code = atob(localStorage.getItem('code') || '')
            const id = atob(localStorage.getItem('id') || '')
    
            $('#code').val(code)
            $('#id').val(id)
            $('#saveId').attr('checked', !!code)
        })
    
        const doLogin = () => {
            event.preventDefault();
            const form = document.querySelector("form");
            let $f = jQuery(form);
            let requiredChk = true;
    
            $f.find("input, select").each(function(i) {            
                if($(this).prop("required")) {
                    if(!jQuery.trim($(this).val())) {
                        let text = $(this).attr("placeholder");
                        result = false;
                        $(this).focus();
                        alert(text+" 필수 입력입니다.");                    
                        requiredChk = false;
                        return false;
                    }
                }
            });
            if(!requiredChk) return false;
    
            const saveId = $('#saveId').is(':checked');
            const code = $('#code').val();
            const id = $('#id').val();
            const password = $('#password').val();
            const data = {
                code, 
                id,
                password
               
            };
            $.ajax({
                url: '/auth/signin',
                type: 'post',
                headers: { 'Content-Type': 'application/json' },
                data: JSON.stringify(data),
                success: function (data) {
                    if (!data.result.code) {
                        $('.popup').addClass('active');
                        return;
                    }
                    if(saveId){
                        localStorage.setItem('id', btoa(id));
                        localStorage.setItem('code', btoa(code));
                    } else {
                        localStorage.removeItem('id');
                        localStorage.removeItem('code');
                    }
                    location.href = '/'
                    
                },
                error: (err) => {
                console.log('err => ', err);
                }
            })
        };
    
    </script>
    

  

</body></html>