-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.php
More file actions
175 lines (169 loc) · 5.59 KB
/
index.php
File metadata and controls
175 lines (169 loc) · 5.59 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
include 'configuration/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="UTF-8" />
<title>
<?php echo $config['website_name'] ?> - File Uploading Service
</title>
<?php include_once 'components/header.php';?>
<style type="text/css">
#submit {
transition: all 0.5s;
}
#submitURL {
transition: all 0.5s;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="#"><?php echo $config['website_name'] ?></a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarColor01"
aria-controls="navbarColor01"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php"
><span class="fa fa-home"></span> Home
<span class="sr-only">(current)</span></a
>
</li>
<li class="nav-item">
<a class="nav-link" href="terms.php"
><span class="fa fa-file-text"></span> Terms of Services</a
>
</li>
<li class="nav-item">
<a class="nav-link" href="about.php"
><span class="fa fa-user"></span> About Us</a
>
</li>
<li class="nav-item">
<a class="nav-link" href="report.php"
><span class="fa fa-flag"></span> Report Abuse</a
>
</li>
</ul>
</div>
</nav>
<div class="container pb-5 pt-5">
<div class="row justify-content-center text-center">
<div class="col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="card-header">
<b>Upload Your Files</b>
</div>
<div class="card-body">
<div id="upload_alert"></div>
<div id="upload_alert">
<?php if( isset( $_GET['error'] )): ?>
<div class="alert alert-danger">You are trying to bypass the security measures</div>
<?php endif; ?>
</div>
<p class="card-title lead font-weight-bold text-dark">
Select Files
</p>
<form
enctype="multipart/form-data"
role="form"
method="POST"
action="upload.php"
>
<div class="form-group" id="dvFile">
<input
type="file"
class="form-control-file pt-2"
id="file[]"
name="file[]"
/>
<input
type="file"
class="form-control-file pt-2"
id="file[]"
name="file[]"
/>
<input
type="file"
class="form-control-file pt-2"
id="file[]"
name="file[]"
/>
<input
type="file"
class="form-control-file pt-2"
id="file[]"
name="file[]"
/>
</div>
<div class="form-group">
<input type="checkbox" name="tos" id="tos" />
<label for="tos"
>I agree to the
<a href="terms.php">Terms and Conditions</a></label
>
</div>
<button
id="submit"
name="submit"
type="submit"
class="btn btn-primary disabled"
>
<span class="fa fa-upload"></span> Upload Files
</button>
<a
onclick="add_more()"
id="add_more"
class="btn btn-primary text-white"
><span class="fa fa-plus"></span> Add a File</a
>
</form>
</div>
<div class="card-footer mb-0">
<p class="mb-0">
Note: Supported formats:
<a href="supported.php">See Here...</a>
</p>
</div>
</div>
</div>
</div>
</div>
<?php include_once 'components/ads.php';?>
<?php include_once 'components/footer.php';?>
<script type="text/javascript">
count = 4;
function add_more() {
if (count <= 9) {
var txt =
"<input type=\"file\" class=\"form-control-file pt-2\" id=\"file[]\" name=\"file[]\">";
$("#dvFile").append(txt);
count++;
} else {
$("#upload_alert").html("<div class=\"alert alert-danger\">Sorry you can't upload more then 10 files</div>")
$("#add_more").addClass("disabled");
}
}
$("#tos").change(function() {
if ($(this).prop("checked")) {
$("#submit").removeClass("disabled");
} else {
$("#submit").addClass("disabled");
}
});
</script>
</body>
</html>
</html>