Server IP : 111.118.215.189 / Your IP : 18.188.212.154 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home1/a1673wkz/propstonerealty.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include("config.php"); if (!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['mobile']) && !empty($_POST['age']) && !empty($_POST['role']) && !empty($_POST['find']) && !empty($_FILES['file']['name'])) { $name = $_POST['name']; $email = $_POST['email']; $mobile = $_POST['mobile']; $age = $_POST['age']; $role = $_POST['role']; $find = $_POST['find']; $file_name = $_FILES['file']['name']; $allowed_floor = array('gif', 'png', 'jpg', 'jpeg', 'webp','pdf','doc','docx'); $ext_floor = pathinfo($file_name, PATHINFO_EXTENSION); if (in_array($ext_floor, $allowed_floor)) { $tmp_floor = $_FILES['file']['tmp_name']; $temp_floor = explode(".", $file_name); $newfile_floor = rand(00000000, 99999999) . '.' . end($temp_floor); $folder_floor = "file/" . $newfile_floor; if (move_uploaded_file($tmp_floor, $folder_floor)) { $date = date("Y-m-d"); $insert = $obj->query("INSERT INTO `career` (`role`,`name`, `mobile`, `email`, `age`, `date`,`file`) VALUES('$role', '$name', '$mobile', '$email', '$age','$date', '$folder_floor')"); if ($insert) { $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From:'.$email."\r\n"; $headers .= "X-Priority: 3\r\n"; $headers .= "X-Mailer: PHP" . phpversion() . "\r\n"; //echo $headers; $email_from = $email; //replace with your email $email_to = 'info@propstonerealty.com'; $subject = "$name is Requested for a Job"; $body = '<b>Applied for: </b> ' . $role . '<br>' .'<b>Name: </b> ' . $name . '<br>' . '<b>Email:</b> ' . $email . '<br>' . '<b>Phone:</b> ' . $mobile. '<br><b>Age:</b>'.$age. '<br><b>Find out :</b>'.$find. '<br><b>CV:</b> <a href="https://propstonerealty.com/'.$folder_floor.'" download>Download</a>'; // echo $body; // die(); $success = mail($email_to, $subject, $body, $headers); if ($success) { echo '<p class="alert alert-success mt-3"><i class="fa fa-check-square-o"></i> We will get in touch with you shortly.</p>'; } else { echo '<p class="alert alert-danger mt-3"><i class="fa fa-warning"></i> Error Something Wrong!</p>'; } } else { echo '<p class="alert alert-danger mt-3"><i class="fa fa-warning"></i> Error Something Wrong!</p>'; } } else { echo '<p class="alert alert-danger mt-3"><i class="fa fa-warning"></i> Image upload faild</p>'; } } else { echo '<p class="alert alert-danger mt-3"><i class="fa fa-warning"></i> Image format not supported</p>'; } } else { echo '<p class="alert alert-danger mt-3"><i class="fa fa-warning"></i> Please fill up all the field</p>'; }