Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OSS-2018-02
/
PUBGHACK
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이상원
2017-12-06 18:07:10 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c34d368d7f20c3bb080ef552e253a8b3875cc0da
c34d368d
1 parent
313c0369
version 2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
182 additions
and
7 deletions
config.js
route/search.js
views/compare.ejs
views/detail.ejs
config.js
View file @
c34d368
...
...
@@ -2,5 +2,6 @@ module.exports = {
server_port
:
3030
,
route_info
:
[{
file
:
'./search'
,
path
:
'/search'
,
method
:
'search'
,
type
:
'get'
},
{
file
:
'./search'
,
path
:
'/'
,
method
:
'home'
,
type
:
'get'
},
{
file
:
'./search'
,
path
:
'/detail'
,
method
:
'detail'
,
type
:
'get'
}]
{
file
:
'./search'
,
path
:
'/detail'
,
method
:
'detail'
,
type
:
'get'
},
{
file
:
'./search'
,
path
:
'/compare'
,
method
:
'compare'
,
type
:
'get'
}]
};
...
...
route/search.js
View file @
c34d368
...
...
@@ -20,10 +20,24 @@ var detail = function(req,res){
var
mode
=
req
.
query
.
mode
||
req
.
body
.
mode
;
check
.
detaildata
(
id
,
region
,
mode
,
function
(
result
){
console
.
log
(
req
.
connection
.
remoteAddress
+
' 가'
+
id
+
'으로 상세정보'
);
res
.
render
(
'detail.ejs'
,{
id
:
id
,
result
:
result
});
res
.
render
(
'detail.ejs'
,{
id
:
id
,
region
:
region
,
mode
:
mode
,
result
:
result
});
});
};
var
compare
=
function
(
req
,
res
){
var
id
=
req
.
query
.
id
||
req
.
body
.
id
;
var
id2
=
req
.
query
.
id2
||
req
.
body
.
id2
;
var
region
=
req
.
query
.
region
||
req
.
body
.
region
;
var
mode
=
req
.
query
.
mode
||
req
.
body
.
mode
;
check
.
detaildata
(
id
,
region
,
mode
,
function
(
result
){
check
.
detaildata
(
id2
,
region
,
mode
,
function
(
result1
){
console
.
log
(
req
.
connection
.
remoteAddress
+
' 가'
+
id
+
' 와 '
+
id2
+
'으로 비교'
);
res
.
render
(
'compare.ejs'
,{
id
:
id
,
id2
:
id2
,
region
:
region
,
mode
:
mode
,
result
:
result
,
result1
:
result1
});
});
});
};
module
.
exports
.
search
=
search
;
module
.
exports
.
home
=
home
;
module
.
exports
.
detail
=
detail
;
module
.
exports
.
compare
=
compare
;
...
...
views/compare.ejs
0 → 100644
View file @
c34d368
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, height=device-height, initial-scale=1"
>
<title>
PUBG 핵쟁이
</title>
<link
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin=
"anonymous"
>
<link
href=
"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
rel=
"stylesheet"
integrity=
"sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
crossorigin=
"anonymous"
>
<style>
body
{
background
:
url('../public/image/bg2.jpg')
no-repeat
fixed
50%
50%
/
100%
100%
;}
#con
{
padding-top
:
30%
;
}
h1
{
color
:
rgb
(
255
,
255
,
255
);
text-align
:
center
;
}
#info
{
width
:
100%
;
height
:
50px
;
color
:
rgb
(
255
,
255
,
255
);
font-size
:
12pt
;
text-align
:
center
;
}
.fth
{
width
:
25%
;
}
#result
{
border
:
1px
none
;
font-size
:
20pt
;
}
.user2
{
color
:
red
;
}
</style>
</head>
<body>
<div
class=
"container"
>
<div
class =
"row"
>
<div
class =
"col-sm-12"
>
<h1>
<
%= id %>
</h1>
<h1
class =
"user2"
>
<
%= id2 %>
</h1>
<br>
<br>
</div>
</div>
<div
class=
"row"
>
<div
class =
"col-sm-12"
>
<table
id =
"info"
>
<tr>
<th><img
src=
"../public/image/round.png"
>
총 플레이한 라운드
</th>
<th>
<
%= result['round'] %>
</th>
<th
class =
"user2"
>
<
%= result1['round'] %>
</th>
<th><img
src=
"../public/image/chi.png"
>
치킨 뜯은 횟수
</th>
<th>
<
%= result['wins'] %>
</th>
<th
class =
"user2"
>
<
%= result1['wins'] %>
</th>
<th><img
src=
"../public/image/top10.png"
>
TOP 10 에 든 횟수
</th>
<th>
<
%= result['top10'] %>
</th>
<th
class =
"user2"
>
<
%= result1['top10'] %>
</th>
</tr>
<tr><th><br></th></tr>
<tr>
<th><img
src=
"../public/image/lose.png"
>
패배한 횟수
</th>
<th>
<
%= result['lose'] %>
</th>
<th
class =
"user2"
>
<
%= result1['lose'] %>
</th>
<th><img
src=
"../public/image/rate.png"
>
현재 레이팅
</th>
<th>
<
%= result['rating'] %>
</th>
<th
class =
"user2"
>
<
%= result1['rating'] %>
</th>
<th><img
src=
"../public/image/best.png"
>
최고 레이팅
</th>
<th>
<
%= result['bestrate'] %>
</th>
<th
class =
"user2"
>
<
%= result1['bestrate'] %>
</th>
</tr>
<tr><th><br></th></tr>
<tr>
<th><img
src=
"../public/image/deal.png"
>
게임 당 딜량
</th>
<th>
<
%= result['dmg'] %>
</th>
<th
class =
"user2"
>
<
%= result1['dmg'] %>
</th>
<th><img
src=
"../public/image/head1.png"
>
게임 당 헤드샷 비율
</th>
<th>
<
%= result['head'] %>
</th>
<th
class =
"user2"
>
<
%= result1['head'] %>
</th>
<th><img
src=
"../public/image/heal.png"
>
게임당 치료량
</th>
<th
>
<
%= result['heal'] %>
</th>
<th
class =
"user2"
>
<
%= result1['heal'] %>
</th>
</tr>
<tr><th><br></th></tr>
<tr>
<th><img
src=
"../public/image/kill1.png"
>
게임 당 킬량
</th>
<th>
<
%= result['kill'] %>
</th>
<th
class =
"user2"
>
<
%= result1['kill'] %>
</th>
<th><img
src=
"../public/image/distance.png"
>
게임 당 이동거리
</th>
<th>
<
%= result['distance'] %>
</th>
<th
class =
"user2"
>
<
%= result1['distance'] %>
</th>
<th><img
src=
"../public/image/revive.png"
>
게임 당 부활횟수
</th>
<th>
<
%= result['revive'] %>
</th>
<th
class =
"user2"
>
<
%= result1['revive'] %>
</th>
</tr>
<tr><th><br></th></tr>
<tr>
<th><img
src=
"../public/image/road.png"
>
게임 당 로드킬 횟수
</th>
<th>
<
%= result['road'] %>
</th>
<th
class =
"user2"
>
<
%= result1['road'] %>
</th>
<th><img
src=
"../public/image/teamkill.png"
>
게임 당 팀킬 횟수
</th>
<th>
<
%= result['team'] %>
</th>
<th
class =
"user2"
>
<
%= result1['team'] %>
</th>
<th><img
src=
"../public/image/time.png"
>
게임 당 생존시간
</th>
<th>
<
%= result['survive'] %>
</th>
<th
class =
"user2"
>
<
%= result1['survive'] %>
</th>
</tr>
<tr><th><br></th></tr>
<tr>
<th><img
src=
"../public/image/long.png"
>
가장 멀리서 죽인 거리
</th>
<th>
<
%= result['long'] %>
</th>
<th
class =
"user2"
>
<
%= result1['long'] %>
</th>
</tr>
</table>
<br>
</div>
</div>
<div
class =
"row"
>
<div
class =
"col-sm-4"
>
<form
action=
"/compare"
method=
"get"
>
<input
type=
"hidden"
name=
"id"
value=
"<%= id %>"
>
<input
type=
"hidden"
name=
"mode"
value=
"<%= mode %>"
>
<input
type=
"hidden"
name=
"region"
value=
"<%= region %>"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-sm"
placeholder=
"Search for..."
name =
"id2"
>
<span
class=
"input-group-btn"
>
<button
class=
"btn btn-default btn-sm"
type=
"submit"
>
다른사람과비교
</button>
</span>
</div>
</form>
</div>
</div>
<div
class =
"row"
>
<div
class =
"col-sm-12"
>
<form
action=
"/"
method=
"get"
>
<br>
<button
class=
"btn btn-default btn-sm"
type=
"submit"
>
홈으로 가기
</button>
</form>
<br>
<br>
</div>
</div>
</div>
</body>
</html>
views/detail.ejs
View file @
c34d368
...
...
@@ -19,7 +19,7 @@
width
:
100%
;
height
:
50px
;
color
:
rgb
(
255
,
255
,
255
);
font-size
:
1
5
pt
;
font-size
:
1
2
pt
;
text-align
:
center
;
}
.fth
{
...
...
@@ -97,15 +97,29 @@
</div>
</div>
<div
class =
"row"
>
<div
class =
"col-sm-12 col-sm-offset-10"
>
<div
class =
"col-sm-4"
>
<form
action=
"/compare"
method=
"get"
>
<input
type=
"hidden"
name=
"id"
value=
"<%= id %>"
>
<input
type=
"hidden"
name=
"mode"
value=
"<%= mode %>"
>
<input
type=
"hidden"
name=
"region"
value=
"<%= region %>"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-sm"
placeholder=
"Search for..."
name =
"id2"
>
<span
class=
"input-group-btn"
>
<button
class=
"btn btn-default btn-sm"
type=
"submit"
>
다른사람과비교
</button>
</span>
</div>
</form>
</div>
</div>
<div
class =
"row"
>
<div
class =
"col-sm-12"
>
<form
action=
"/"
method=
"get"
>
<br>
<button
class=
"btn btn-default btn-sm"
type=
"submit"
>
홈으로 가기
</button>
</span
>
</form
>
<br>
<br>
</div>
</form>
</div>
</div>
</div>
</body>
...
...
Please
register
or
login
to post a comment