Sindbad~EG File Manager

Current Path : /home/u625735752/domains/feednationngo.org/public_html/admin/all/
Upload File :
Current File : /home/u625735752/domains/feednationngo.org/public_html/admin/all/add_eve1.php

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Admin Area</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta content=" " name="title">
  <meta content=" " name="description">
  <meta property="og:image" content="http:// .com/img/ss.jpg">
  <link href="img/apple-touch-icon.png" rel="apple-touch-icon">
  <link rel="icon" href="img/favicon.ico" type="image/ico" sizes="16x16">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
  <link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;600&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <link href="css/custom.css" rel="stylesheet">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
  <script src="js/custom.js"></script>
</head>
<body>


<div id="preloader">
	<div id="status">
		<img src="img/logo1.png" id="preloader_image" alt="loader"/>
	</div>
</div>
<?php
 include('nav.php'); ?>
<?php
 include('ini.php'); ?>










<?php
 include('dbconfig.php');
 error_reporting( ~E_NOTICE ); // avoid notice
 require_once 'dbconfig.php';
 
 if(isset($_POST['btnsave']))
 {
  
  $pdfFile = $_FILES['user_pdf']['name']; $pdftmp_dir = $_FILES['user_pdf']['pdftmp_name'];
  
  
  if(empty($pdfFile)){  $errMSG = "Please Select Image File.";}
  else {  $pdfupload_dir = '../dyn/eve/';  $pdfExt = strtolower(pathinfo($pdfFile,PATHINFO_EXTENSION)); $pdfvalid_extensions = array('jpeg', 'jpg', 'png'); $catpdf = rand(1000,1000000).".".$pdfExt;
    
   if(in_array($pdfExt, $pdfvalid_extensions)){  move_uploaded_file($pdftmp_dir,$pdfupload_dir.$catpdf);  }
   else{   $errMSG = "Image files are allowed.";}
   
   
   
  
  // if no error occured, continue ....
  if(!isset($errMSG))
  {
   $stmt = $DB_con->prepare('INSERT INTO tbl_dyn_pg_eve(apdf) VALUES( :cpdf )');
   $stmt->bindParam(':cpdf',$catpdf);
   
   if($stmt->execute())
   {
    ?>
                <script>
    alert('Successfully Updated ...');
    window.location.href='add_eve1.php';
    </script>
                <?php
   }
   
 }
   else
   {
    $errMSG = "error while inserting....";
   }
   
  }
 }
?>



<section class="dbgs">
	<div class="container py-4">
		<h1 class="hs">Add Image</h1>
		
		

<form method="post" enctype="multipart/form-data" class="form-horizontal">
     
 
    

	<div class="row">
		<div class="form-group col-md-6">
			  <input class="form-control" type="file" name="user_pdf" accept="image/*" required/>
		</div>
		</div>
	
	
   
        <button type="submit" name="btnsave" class=" btn-primary">save</button>
        
    
  
    
</form>


    </div>
</section>



<?php
 include('footer.php'); ?>
  <script src="js/custom.js"></script>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists