Showing
2 changed files
with
47 additions
and
16 deletions
1 | <script type="text/javascript"> | 1 | <script type="text/javascript"> |
2 | - post_data = { | 2 | +var type = '<%= type %>'; |
3 | +post_data = { | ||
3 | "collection":'<%= collection %>' | 4 | "collection":'<%= collection %>' |
4 | - } | 5 | +} |
5 | - function winOpen() { | 6 | +function login() { |
6 | - var type = '<%= type %>'; | 7 | + if (document.getElementById("password").value == type) { |
7 | - let sign = window.prompt("password"); | ||
8 | - | ||
9 | - if (sign == type){ | ||
10 | redirectPost('/',post_data) | 8 | redirectPost('/',post_data) |
11 | } | 9 | } |
12 | - else{ | 10 | + else { |
13 | - winOpen(); | 11 | + window.alert("비밀번호가 틀립니다!") |
14 | } | 12 | } |
15 | - } | 13 | +} |
16 | - | 14 | +function redirectPost(url, data) { |
17 | - function redirectPost(url, data) { | ||
18 | var form = document.createElement('form'); | 15 | var form = document.createElement('form'); |
19 | document.body.appendChild(form); | 16 | document.body.appendChild(form); |
20 | form.method = 'post'; | 17 | form.method = 'post'; |
... | @@ -28,6 +25,41 @@ | ... | @@ -28,6 +25,41 @@ |
28 | } | 25 | } |
29 | form.submit(); | 26 | form.submit(); |
30 | } | 27 | } |
31 | - </script> | 28 | +</script> |
29 | +<body> | ||
30 | + <div id="screen-lock" class="hide" style="opacity:0.95;"> | ||
31 | + <div class="panel panel-warning" style="width:500px;margin: 168px 0px 0px -250px;left: 50%;position: absolute;"> | ||
32 | + <!-- begin panel-heading --> | ||
33 | + <div class="panel-heading"> | ||
34 | + <h4 class="panel-title">screenlock_message</h4> | ||
35 | + </div> | ||
36 | + <!-- end panel-heading --> | ||
32 | 37 | ||
33 | - <body onLoad="winOpen()"></body> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
38 | + <!-- begin panel-body --> | ||
39 | + <div class="panel-body"> | ||
40 | + <!-- begin fieldset --> | ||
41 | + <fieldset> | ||
42 | + <!-- begin row --> | ||
43 | + <div class="row"> | ||
44 | + <!-- begin col-8 --> | ||
45 | + <div class="col-md-10 offset-md-1"> | ||
46 | + <!-- begin form-group --> | ||
47 | + <div class="form-group row m-b-10"> | ||
48 | + <label class="col-md-5 col-form-label text-md-right">비밀번호</label> | ||
49 | + <div class="col-md-6"> | ||
50 | + <input type="password" name="password" id="password" class="form-control" /> | ||
51 | + <button id="LockPasswordCheckAction" class="btn btn-success" onclick="login()">unlock</button> | ||
52 | + </div> | ||
53 | + </div> | ||
54 | + <!-- end form-group --> | ||
55 | + </div> | ||
56 | + <!-- end col-8 --> | ||
57 | + </div> | ||
58 | + <!-- end row --> | ||
59 | + </fieldset> | ||
60 | + <!-- end fieldset --> | ||
61 | + </div> | ||
62 | + <!-- end panel-body --> | ||
63 | + </div> | ||
64 | + <!-- end panel --> | ||
65 | + </div> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -52,7 +52,7 @@ limitations under the License. | ... | @@ -52,7 +52,7 @@ limitations under the License. |
52 | <canvas id="output"></canvas> | 52 | <canvas id="output"></canvas> |
53 | <div id="description"> | 53 | <div id="description"> |
54 | <div id="description-title">Face Detecting...</div> | 54 | <div id="description-title">Face Detecting...</div> |
55 | - | 55 | + <input type="button" id="close_button" onclick="location.href='/';" value="종료" /> |
56 | </div> | 56 | </div> |
57 | <video id="video" playsinline style=" | 57 | <video id="video" playsinline style=" |
58 | -webkit-transform: scaleX(-1); | 58 | -webkit-transform: scaleX(-1); |
... | @@ -63,7 +63,6 @@ limitations under the License. | ... | @@ -63,7 +63,6 @@ limitations under the License. |
63 | "> | 63 | "> |
64 | </video> | 64 | </video> |
65 | </div> | 65 | </div> |
66 | - <input type="button" id="AWS_button" onclick="onClick();" value="버튼1" /> | ||
67 | <form> | 66 | <form> |
68 | <input type="hidden" id="method" name="method" value=<%= method %> /> | 67 | <input type="hidden" id="method" name="method" value=<%= method %> /> |
69 | <input type="hidden" id="collection" name="collection" value=<%= collection %> /> | 68 | <input type="hidden" id="collection" name="collection" value=<%= collection %> /> | ... | ... |
-
Please register or login to post a comment