-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ejs
143 lines (129 loc) · 6.6 KB
/
index.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interaxn</title>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
</head>
<body style="background-image: url('assets/image.png');background-image: url('image.png');" onload="randomNo()">
<style>
body,
html {
height: 100%;
}
.container {
margin: auto;
margin-top: 0px;
}
.card {
border-radius: 2em;
}
.modal-content {
border-radius: 2em;
}
/* input[type="submit"] {
margin: auto;
margin: 25px;
border-radius: 10px;
} */
input {
margin: auto;
}
</style>
<div class="container d-flex h-100 justify-content-center">
<div class="row align-self-center w-50">
<div class="card text-center shadow align-self-center pt-4 pb-4">
<div class="mt-5">
<h1>INTERAXN</h1>
<h6>QUICK FILE TRANSFER</h6>
</div>
<div class="mt-3 mb-5">
<!-- Button trigger modal -->
<button class="btn btn-primary" data-toggle="modal" data-target="#exampleSend">SEND</button>
<!-- Modal -->
<div class="modal " id="exampleSend" tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">UPLOAD</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container mt-3 mb-3">
<h3>Random ID: <b id="randomText"></b></h3>
<form action="/api/file/upload" method="POST" enctype="multipart/form-data">
<input type="file" name="filename" id="filename" ref="filename"
class="text-center col-8 mb-3 form-control">
<input type="submit" value="Upload"
class="btn btn-primary col-4 form-control" onclick="call()">
<!-- <h3>Random ID: <b id="random"></b></h3> -->
<input type="text" name="random" id="random" class="form-control"
style="display: none;">
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Button trigger modal -->
<button class="btn btn-primary" data-toggle="modal" data-target="#exampleReceive">RECEIVE</button>
<!-- Modal -->
<div class="modal " id="exampleReceive" tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">DOWNLOAD</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container mt-3">
<form action="/api/file/download" method="POST" enctype="multipart/form-data">
<h3>Enter random ID</h3>
<input type="text" name="random" id="random"
class="col-4 mb-3 form-control text-center">
<input type="submit" value="Download"
class="text-center col-4 btn btn-primary form-control">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<h6>
<%= author %>
</h6>
</div>
</div>
</div>
</body>
<script>
function randomNo() {
var random = Math.floor(Math.random() * 100000000);
$("#random").val(random)
$("#randomText").html(random)
}
</script>
</html>