-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcontactus.php
89 lines (62 loc) · 2.29 KB
/
contactus.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* Allomani Audio & Video (Songs) v3.0
*
* @package Allomani.Songs
* @version 3.0
* @copyright (c) 2006-2018 Allomani , All rights reserved.
* @author Ali Allomani <[email protected]>
* @link http://allomani.com
* @license GNU General Public License version 3.0 (GPLv3)
*
*/
require("global.php");
require(CWD . '/includes/class_security_img.php');
$sec_img = new sec_img_verification();
require(CWD . "/includes/framework_start.php");
//----------------------------------------------------
compile_hook("contactus_start");
$email_name = htmlspecialchars(trim($email_name));
$email_email = htmlspecialchars(trim($email_email));
$email_msg = htmlspecialchars(trim($email_msg));
$email_subject = htmlspecialchars(trim($email_subject));
if($action=="send"){
if($sec_img->verify_string($sec_string)){
if(!$email_subject){$email_subject = $phrases['without_subject'];}
if($email_name && $email_email && $email_msg){
if(check_email_address($email_email)){
$email_msg = nl2br($email_msg);
$ip = getenv("REMOTE_ADDR");
$msg = get_template('contactus_msg');
$msg = str_replace(array('{name}','{email}','{message}','{ip}'),array($email_name,$email_email,$email_msg,$ip),$msg);
$mailResult = send_email($email_name,$mailing_email,$settings['admin_email'],$email_subject ,$msg,true,'',$email_email);
open_table();
if($mailResult){
print "<center> $phrases[contactus_send_successfully] </center>";
}else{
print "<center> $phrases[contactus_send_failed] </center>";
}
close_table();
}else{
open_table();
print "<center> $phrases[err_email_not_valid] </center>";
close_table();
}
}else{
open_table();
print "<center> $phrases[err_fileds_not_complete] </center>";
close_table();
}
}else{
open_table();
print "<center>$phrases[err_sec_code_not_valid]</center>";
close_table();
}
}
if(!$send_done){
run_template("contactus");
}
compile_hook("contactus_end");
//---------------------------------------------------
require(CWD . "/includes/framework_end.php");
?>