ok

Mini Shell

Direktori : /home2/globaltriumphfou/public_html/
Upload File :
Current File : /home2/globaltriumphfou/public_html/operation.php

<?php
include "admin_panel/dbconn.php";
function emailfunctiona($subject,$message,$to)
{
$snname = "globaltriumphfoundation"; //senders name
$snmail = "info@globaltriumphfoundation.com"; //senders e-mail adress
$headers = "From: ". $snname . " <" . $snmail . ">\r\n";
$headers.='MIME-Version: 1.0'."\r\n";
$headers.='Content-type: text/html; charset=iso-8859-1'."\r\n";
mail($to, $subject, $message, $headers);
}	
$operation=$_POST['operation'];
$create_date=date('Y-m-d H:i:s');
switch($operation)
		{
			case 'Enquiry':
			$email=$_POST['email'];
			$mno=$_POST['mno'];
			$name=$_POST['name'];
			$msg=mysqli_real_escape_string($connection,$_POST['msg']);
			if(empty($name))
				echo "Enter Name";
			elseif(empty($email))
				echo "Enter Email Id";
			elseif(empty($mno))
				echo "Enter 10 Digit Mobile No";
			elseif(empty($msg))
				echo "Enter Message";
			else
			{
			$adminmsg="
			Name: ".$name."<br>
			Email : ".$email."<br>
			Mobile : ".$mno."<br>
			Query : ".$msg."<br>";
			$usermessage="Thank you for visiting GTF.<br>
			We appreciate your interest and will soon contact you for further assistance.<br><br>
			Warmest Regards,<br> 
			GTF Team
			";
			$adminemail='amit@globaltriumphfoundation.com';
			$useremail=$email;
			$subject='Thank you for visiting GTF';
			$subject1='Contact Query - Website';
				$rst=mysqli_query($connection,"insert into `contact`(`name`,`email`,`mno`,`msg`,`create_date`) values('$name','$email','$mno','$msg','$create_date')");
				if($rst)
					{
				   emailfunctiona($subject,$usermessage,$useremail);
				   emailfunctiona($subject1,$adminmsg,$adminemail);
				   echo '1';
					}
					else
					{
						echo mysqli_error($connection);
				
					}
			}		
					break;
			case 'Nomination':
			$Inv_id=$_POST['Inv_id'];
			$Nom_Cat=mysqli_real_escape_string($connection,trim($_POST['Nom_Cat']));
			$Cat_id=mysqli_real_escape_string($connection,trim($_POST['Cat_id']));
			$cat_descother=mysqli_real_escape_string($connection,trim($_POST['cat_descother']));
			$O_Name=mysqli_real_escape_string($connection,trim($_POST['O_Name']));
			$Con_Address=mysqli_real_escape_string($connection,trim($_POST['Con_Address']));
			$Con_City=mysqli_real_escape_string($connection,trim($_POST['Con_City']));
			$Con_State=mysqli_real_escape_string($connection,trim($_POST['Con_State']));
			$CP_Name=mysqli_real_escape_string($connection,trim($_POST['CP_Name']));
			$CP_Email=mysqli_real_escape_string($connection,trim($_POST['CP_Email']));
			$Website=mysqli_real_escape_string($connection,trim($_POST['Website']));
			$CP_Mno=$_POST['CP_Mno'];
			$CP_Designation=mysqli_real_escape_string($connection,trim($_POST['CP_Designation']));
			$Y_O_I=mysqli_real_escape_string($connection,trim($_POST['Y_O_I']));
			$A_T=mysqli_real_escape_string($connection,trim($_POST['A_T']));
			$A_C=mysqli_real_escape_string($connection,trim($_POST['A_C']));
			$P_Award=mysqli_real_escape_string($connection,trim($_POST['P_Award']));
			$Comment=mysqli_real_escape_string($connection,trim($_POST['Comment']));
			if($Cat_id=='Others')
			$Cat_id=$cat_descother;
			if(empty($Inv_id))
			echo "select Individula/Organization";
			elseif(empty($Nom_Cat))
			echo "Select Nomination Category";
			elseif(empty($Cat_id))
			echo "organization category";
			elseif(empty($O_Name))
			echo "Name of the Individual/Organization";
			elseif(empty($Con_Address))
			echo "Enter Complete Address";
			elseif(empty($Con_City))
			echo "enter City";
			elseif(empty($Con_State))
			echo "Enter State";
			elseif(empty($CP_Name))
			echo "Enter Name";
			elseif(empty($CP_Mno))
			echo "Enter Mobile No";
			elseif(empty($CP_Email))
			echo "Enter Email Id";
			else
			{
			$rst1=mysqli_query($connection,"insert into `nomination_enquiry`(`Cat_id`,`Inv_id`,`O_Name`,`Nom_Cat`,`CP_Name`,`CP_Email`,`CP_Mno`,`Y_O_I`,`Website`,`Comment`,`A_T`,`A_C`,`create_date`,`Con_City`,`Con_State`,`Con_Address`,`P_Award`,`CP_Designation`) values('$Cat_id','$Inv_id','$O_Name','$Nom_Cat','$CP_Name','$CP_Email','$CP_Mno','$Y_O_I','$Website','$Comment','$A_T','$A_C','$create_date','$Con_City','$Con_State','$Con_Address','$P_Award','$CP_Designation')");
				 if($rst1)
				{
					$adminmsg="
			Organisation Name: ".$O_Name."<br>
			Name: ".$CP_Name."<br>
			Email : ".$CP_Email."<br>
			Mobile : ".$CP_Mno."<br>";
			$usermessage='<div align="center"><img src="http://globaltriumphfoundation.com/img/logos/logo.png" width="150" height="58" /></div>Thank You ! We have received your nomination for the GTF Awards, we will send your details to our jury team for further process and will keep you posted..<br><br>
Team GTF <br>
Bangalore <br>
Mr. Amit : 9513361645 : amit@globaltriumphfoundation.com <br>
Mrs. Monika: 9692700001 : monika@globaltriumphfoundation.com';

			$useremail=$CP_Email;
			$subject='Thank you for the GTF Awards';
			$subject1='Award Query - Website';
			$adminemail='amit@globaltriumphfoundation.com';
			
					emailfunctiona($subject,$usermessage,$useremail);
				   emailfunctiona($subject1,$adminmsg,$adminemail);
					echo "1";
				
				}
				else
				{
					echo mysqli_error($connection);
				}
			}				
			break;
		}
?>

Zerion Mini Shell 1.0