hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
home
/
u313348419
/
domains
/
paramedicalcouncilup.org
/
public_html
/
Upload FileeE
HOME
<?php if(isset($_POST['cvubmit'])) { $to="paramedicalcouncilup@gmail.com"; $subject="website form submissions from paramedical admission"; $from ="contact@paramedicalcouncilup.org"; $courseapplied = $_REQUEST['courseapplied']; $selectcourse = $_REQUEST['selectcourse']; $name = $_REQUEST['name']; $fathername = $_REQUEST['fathername']; $mothername = $_REQUEST['mothername']; $addresscorrespondence = $_REQUEST['addresscorrespondence']; $permanentaddress = $_REQUEST['permanentaddress']; $mobile = $_REQUEST['mobile']; $contact = $_REQUEST['contact']; $email = $_REQUEST['email']; $dateofbirth = $_REQUEST['dateofbirth']; $formpost = $_REQUEST['formpost']; $gender = $_REQUEST['gender']; $martialstatus = $_REQUEST['martialstatus']; if (!eregi( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { $errors .= "\n Error: Invalid email address"; } $mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x"; $tmp_name = $_FILES['filename']['tmp_name']; $type = $_FILES['filename']['type']; $file_name = $_FILES['filename']['name']; $size = $_FILES['filename']['size']; $message =" <table style='border:1px solid #E6E6E6;background:#fff;font-family:Tahoma; font-size:12px;' width='650' align='center'> <tr> <td valign='top'> <table width='650' cellpadding='0' cellspacing='0' style='border:#0552aa 1px solid;'> <tr bgcolor='#0552aa' height='70'> <td style='font-size:24px; color:#ffffff; font-family:Comic Sans MS;' colspan='2'>Admission</td> </tr>"; $message .=" <tr> <td colspan='2'> <table> <tr><td colspan='2'><h3>Please find below the contact details :</h3></td></tr><tr height=10></tr> <tr><td><strong>Course Applied :</strong></td><td>$courseapplied</td></tr><tr height=10></tr> <tr><td><strong>Select Course :</strong></td><td>$selectcourse</td></tr><tr height=10></tr> <tr><td><strong>Candidate Name :</strong></td><td>$name</td></tr><tr height=10></tr> <tr><td><strong>Father Name :</strong></td><td>$fathername</td></tr><tr height=10></tr> <tr><td><strong>Mother Name :</strong></td><td>$mothername</td></tr><tr height=10></tr> <tr><td><strong>Address Correspondence :</strong></td><td>$addresscorrespondence</td></tr><tr height=10></tr> <tr><td><strong>Permament Address :</strong></td><td>$permanentaddress</td></tr><tr height=10></tr> <tr><td><strong>Mobile :</strong></td><td>$mobile</td></tr><tr height=10></tr> <tr><td><strong>Contact :</strong></td><td>$contact</td></tr><tr height=10></tr> <tr><td><strong>Email :</strong></td><td>$email</td></tr><tr height=10></tr> <tr><td><strong>Date of Birth :</strong></td><td>$dateofbirth</td></tr><tr height=10></tr> <tr><td><strong>Form post :</strong></td><td>$formpost</td></tr><tr height=10></tr> <tr><td><strong>Gender :</strong></td><td>$gender</td></tr><tr height=10></tr> <tr><td><strong>Martial Status :</strong></td><td>$martialstatus</td></tr><tr height=10></tr> "; $message .="<tr height=30></tr><tr></table></td></tr></table></td></tr></table>"; if (file_exists($tmp_name)){ if(is_uploaded_file($tmp_name)){ $file = fopen($tmp_name,'rb'); $data = fread($file,filesize($tmp_name)); fclose($file); $data = chunk_split(base64_encode($data)); } $headers = "From: $from\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: multipart/mixed;\r\n" . " boundary=\"{$mime_boundary}\""; $message = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; $message .= "--{$mime_boundary}\n" . "Content-Type: {$type};\n" . " name=\"{$file_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; $success=mail($to, $subject, $message, $headers); if($success){ echo "<script>alert('Thank you for your submission.');self.location='index.php';</script>"; } } else { $headers = "From:" . $from ."\r\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $success=mail($to, $subject, $message, $headers); if($success){ echo "<script>alert('Thank you for your submission.');self.location='index.php';</script>"; } } } ?>