-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
139 lines (114 loc) · 3.94 KB
/
contact.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
/*******************************************************************\
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #
# @ ArBB V 1.0.0 Beta 1 @ #
# @ All Copyrights are saved Arabian bulletin board team @ #
# @ Copyright © 2009 ArBB Team @ #
# @ ArBB Is Free Bulletin Board and not for sale @ #
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #
\*******************************************************************/
#
# announcements File started
#
/*
File name -> announcement.php
File Version -> 1.0.0 Beta 1
File Programmer -> Thaer
File type -> file
*/
// Used Templates list ,,
$templatelist='contactus,contactus_option';
$phrasearray = array('contactus','profile');
Include 'global.php';
// Caching plugins for requiring in the right place ,,
$plugins->cache('contactus_start,contactus_complete');
($evalp = $plugins->load('contactus_start'))?eval($evalp):'';
$contactusoptions = '';
$checked = '';
$contact_options = array();
$other_option = '';
$opt=explode('\n',$options['contactusoptions']);
foreach($opt as $index => $title)
{
if($arbb->input['subject'] == $index)
{
$checked = 'checked';
}
elseif($arbb->input['subject']=='other')
{
$other_option = 'checked';
}
$contactusoptions.=$TP->GetTemp('contactus_option');
$contact_options["$index"]=$title;
$checked = '';
}
if(empty($arbb->input['do']))
{
$name = $local['username'];
$email = $local['email'];
$message = '';
$TP->webtemp('contactus');
}
elseif($arbb->input['do']=='contactus')
{
$name = $bbcode->clearhtml($arbb->input['name']);
$email = $bbcode->clearhtml($arbb->input['email']);
$message = $bbcode->clearhtml($arbb->input['message']);
$subject_other = $bbcode->clearhtml($arbb->input['subject_other']);
$subject = $bbcode->clearhtml($arbb->input['subject']);
if($subject == 'other')
{
$mail_subject = $subject_other;
}
else
{
$mail_subject = $contact_options["$subject"];
}
if(empty($name)||empty($email)||empty($message)||empty($mail_subject))
{
$show['errors']=1;
$error_messages = '';
$errors = array();
if(empty($name))
{
$errors[]=$lang['fill_name_field'];
}
if(empty($email))
{
$errors[]=$lang['fill_email_field'];
}
if(empty($message))
{
$errors[]=$lang['fill_message_field'];
}
if(empty($mail_subject))
{
$errors[]=$lang['fill_subject_filed'];
}
$error_messages=implode('<br><li>',$errors);
$TP->webtemp('contactus');
}
else
{
$send = sendmail($options['webmasteremail'], $mail_subject, $message,$email, $name);
if(!$send)
{
error_message($lang['error_sending_message']);
}
else
{
$url = $options['forumhome'].'.php';
$redirect_message = $lang['message_sent_succefully'];
redirect($redirect_message,$url);
}
}
}
else
{
error_message($lang['contact_page_error']);
}
build_nav_location(stripslashes($lang['contact_us']),'contact.php','add',1);
$titleetc=$lang['contact_us'].' - ';
($evalp = $plugins->load('contactus_complete'))?eval($evalp):'';
print_page();
?>