system: Linux mars.sprixweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
cmd: 

Direktori : /home/pfhr/public_html/classes/Model/
Upload File :
Current File : /home/pfhr/public_html/classes/Model/MContactus.php

<?php
class Model_MContactus
{
	function contact()
	{

			$from=$_POST['txtemail'];
			$name=$_POST['txtname'];
		
			$subject=$_POST['txtsubject'];
			$message=$_POST['txtmessage'];
			$phone=$_POST['txtphone'];
			
			$headers  = "MIME-Version: 1.0\n";
			$headers .= "Content-type: text/html; charset=iso-8859-1\n";
			$headers .= "From: ". $from."\n";	
			$date = date("F j, Y, g:i a");
			$status='Inbox';			
			
			$select1="select * from sitesettings_table where sitesettings_id='4'";
			$obj1=new Bin_Query();
			$obj1->executeQuery($select1);
			$email=$obj1->records[0]['sitesettings_value'];
			$mail=mail($email,$subject,$message,$headers);
			if($mail)
			{
				$obj = new Bin_Query();
				$insertmember="INSERT INTO contactus_table(contactus_name,contactus_phone,contactus_email,contactus_subject,contactus_message,contactus_date,contactus_status) VALUES('$name','$phone','$from','$subject','$message','$date','$status')";
				if($obj->updateQuery($insertmember))
				{
				$_SESSION['contactsuc']="Mail Send Successfully";
				header("Location:?do=contactus");
				}
			
			}
			else
			{
				 $_SESSION['contactsuc']="Mail Sending Failed";
				header("Location:?do=contactus");
			}
			
	}
	function suggestion()
	{

			$from=$_POST['txtemail'];
			$name=$_POST['txtname'];
		
			$subject=$_POST['txtsubject'];
			$message=$_POST['txtmessage'];
			$phone=$_POST['txtphone'];
			
			$headers  = "MIME-Version: 1.0\n";
			$headers .= "Content-type: text/html; charset=iso-8859-1\n";
			$headers .= "From: ". $from."\n";

			$date = date("F j, Y, g:i a");
			$status='Inbox';
			
			
			$select1="select * from sitesettings_table where sitesettings_id='4'";
			$obj1=new Bin_Query();
			$obj1->executeQuery($select1);
			$email=$obj1->records[0]['sitesettings_value'];
			$mail=mail($email,$subject,$message,$headers);
			if($mail)
			{
				$obj = new Bin_Query();
				$insertmember="INSERT INTO suggestion_table(suggestion_name,suggestion_phone,suggestion_email,suggestion_subject,suggestion_message,suggestion_date,suggestion_status) VALUES('$name','$phone','$from','$subject','$message','$date','$status')";
				if($obj->updateQuery($insertmember))
				{
				$_SESSION['contactsuc']="Mail Send Successfully";
				header("Location:?do=suggestion");
				}
			
			}
			else
			{
				 $_SESSION['contactsuc']="Mail Sending Failed";
				header("Location:?do=suggestion");
			}
	}
}
?>