Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2-capstone-design2
/
2014104149
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Graduate
2020-11-25 13:32:34 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
03dc7c04964fbed579f07a2aeb5fa11a4d3c0766
03dc7c04
1 parent
7b31367b
Update flask
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
12 deletions
flask/templates/register.html
flask/templates/register.html
View file @
03dc7c0
<!doctype html>
<
title>
Web Attendance System Register
</title
>
<
head
>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Web Attendance System Register
</title>
<link
rel=
"stylesheet"
href=
"https://www.w3schools.com/w3css/4/w3.css"
>
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css?family=Nanum+Gothic:400,700,800&subset=korean"
>
<style>
body
,
h1
,
h2
,
h3
,
h4
,
h5
{
font-family
:
"Nanum+Gothic"
,
sans-serif
}
</style>
<style>body
,
h1
,
h2
,
h3
,
h4
,
h5
{
font-family
:
"Nanum+Gothic"
,
sans-serif
}
</style>
<script
type=
'text/javascript'
src=
"{{url_for('static', filename='js/opencv.js')}}"
></script>
<script
type=
'text/javascript'
src=
"{{url_for('static', filename='js/utils.js')}}"
></script>
<script
type=
'text/javascript'
src=
"https://code.jquery.com/jquery-1.12.4.min.js"
></script>
...
...
@@ -14,16 +13,19 @@ body,h1,h2,h3,h4,h5 {font-family: "Nanum+Gothic", sans-serif}
let
tempCanvas
=
document
.
createElement
(
"canvas"
);
function
load_cascade
()
{
let
faceCascadeFile
=
'haarcascade_frontalface_default.xml'
let
faceCascadeURL
=
"{{url_for('static', filename='js/haarcascade_frontalface_default.xml')}}"
let
utils
=
new
Utils
(
'errorMessage'
);
alert
(
"shibal"
);
let
faceCascadeFile
=
'haarcascade_frontalface_default.xml'
;
let
faceCascadeURL
=
"{{url_for('static', filename='js/haarcascade_frontalface_default.xml')}}"
;
let
utils
=
new
Utils
(
'errorMessage'
);
utils
.
createFileFromUrl
(
faceCascadeFile
,
faceCascadeURL
,
()
=>
{
activate
()
alert
(
"shibal"
);
activate
();
});
}
function
activate
()
{
document
.
getElementById
(
"myFile"
).
disabled
=
false
;
let
fileloader
=
document
.
getElementById
(
"fileloader"
);
fileloader
.
disabled
=
false
;
}
function
detect_face
()
...
...
@@ -51,7 +53,8 @@ function detect_face()
}
if
(
faces
.
size
()
==
1
)
{
document
.
getElementById
(
"sender"
).
disabled
=
false
;
let
sender
=
document
.
getElementById
(
"sender"
);
sender
.
disabled
=
false
;
}
else
if
(
faces
.
size
()
==
0
)
{
...
...
@@ -86,10 +89,22 @@ function submit()
})
}
var
loadFile
=
function
(
event
)
{
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
event
.
target
.
files
[
0
]);
output
.
onload
=
function
()
{
var
output
=
document
.
getElementById
(
'imagefile'
);
output
.
src
=
URL
.
createObjectURL
(
event
.
target
.
files
[
0
]);
detect_face
()
}
};
</script>
</head>
<body
class=
"w3-light-grey"
onload=
"cv['onRuntimeInitialized']=()=>{ load_cascade() }"
>
<!-- w3-content defines a container for fixed size centered content,
and is wrapped around the whole page content, except for the footer in this example -->
<div
class=
"w3-content"
style=
"max-width:1400px"
>
<!-- Header -->
...
...
@@ -103,13 +118,14 @@ and is wrapped around the whole page content, except for the footer in this exam
<div>
학번:
<input
type=
"text"
name=
"student_id"
><br>
이름:
<input
type=
"text"
name=
"student_name"
><br><br>
<input
type=
"file"
name=
"file"
onchange=
"loadFile(event)"
autocomplete=
"off"
accept=
"image/jpeg"
required
disabled
>
<input
type=
"file"
id=
"fileloader"
name=
"file"
onchange=
"loadFile(event)"
autocomplete=
"off"
accept=
"image/jpeg"
required
disabled
>
<div>
<img
id=
"imagefile"
style=
"display:none;"
>
<canvas
id=
"preview"
></canvas>
</div>
<input
id=
"sender"
type=
"button"
onclick=
"submit"
value=
"등록"
disabled
>
</div>
</div>
<script>
var
loadFile
=
function
(
event
)
{
var
reader
=
new
FileReader
();
...
...
@@ -121,5 +137,6 @@ and is wrapped around the whole page content, except for the footer in this exam
}
};
</script>
</div>
</body>
</html>
...
...
Please
register
or
login
to post a comment