/
index.php
66 lines (57 loc) · 1.75 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
include_once('./includes.php');
$metaDetails = $dbClass->getTableRecordSingle('metatags',"page_name=?",array('Home'));
if(isset($_REQUEST['submitcontact']) && $_REQUEST['sendcontact']=='1')
{
$fullname = $_REQUEST['fullname'];
$email = $_REQUEST['email'];
$phone = $_REQUEST['phone'];
$BotBootInput = $_REQUEST['BotBootInput'];
$botvalue = $_REQUEST['botvalue'];
$comments = $_REQUEST['comments'];
if($fullname!="" && $email!="" && $BotBootInput!="")
{
if($BotBootInput==$botvalue)
{
$headers = "From:".$firstname."<".$email.">\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'Cc: info@mind-labs.com' . "\r\n";
$body = "Query from Flock Mails contact form";
$body .= "<br />";
$body .= "<br />";
$body .= "Name : ".$fullname."<br />";
$body .= "<br />";
$body .= "Email : ".$email."<br />";
$body .= "<br />";
$body .= "Phone : ".$phone."<br />";
$body .= "<br />";
$body .= "Comments : ".stripslashes(nl2br($comments))."<br />";
$body .= "<br />";
@mail("info@flockmails.com","Comment From Flock Mails contact form",$body,$headers);
pageRedirection('index.php?mailsent=1');
}
else
{
?>
<script type="text/javascript">
alert("Security code mismatch");
</script>
<?php
}
}
else
{
?>
<script type="text/javascript">
alert("Some inputs are missings");
</script>
<?php
}
}
$PackageArr = $homeObj->listPackages();
$smarty->assign('metaDetails',$metaDetails);
$smarty->assign('packageCnt',$PackageArr['packageCnt']);
$smarty->assign('packages',$PackageArr['packages']);
$smarty->display('index.tpl');
?>