-
Notifications
You must be signed in to change notification settings - Fork 1
/
contactus.php
68 lines (59 loc) · 1.63 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
<?PHP
/*
| Contact us module for Drorit accounting system
*/
global $dir;
$action = isset($_GET['action']) ? $_GET['action'] : '';
if($action == 'submit') {
$fullname = GetPost('fullname');
$email = GetPost('email');
$message = GetPost('message');
if($email == '') {
$noemail = _("If you don't specify email, we will not be able to answer");
print "<h1>$noemail</h1>\n";
}
else {
$to = "[email protected]";
$from = "From: $email";
$body = "From: $fullname <$email>\n$message";
mail($to, "Drorit contact form", $body, $from);
$thanks = _("Message sent to drorit team");
print "<h1>$thanks</h1>\n";
$l = _("We will do our best to answer you shortly");
print "<h1>$l</h1>\n";
$l = _("Click here to continue");
print "<br><h2><a href=\"index.php\">$l</a></h2>\n";
return;
}
}
$fullname1 = _("Full name");
$email1 = _("Email");
$message1 = _("Message");
$submit = _("Submit");
$contactform = <<<EOF
<form action="?module=contactus&action=submit" method="post">
<table class="formtbl" dir="$dir" width="100%">
<tr>
<td>$fullname1: </td>
<td><input type="text" name="fullname" value="$fullname"></td>
</tr><tr>
<td>$email1: </td>
<td><input type="text" name="email" value="$email"></td>
</tr><tr>
<td valign="top">$message1: </td>
<td>
<textarea rows="15" cols="35" name="message">$message</textarea>
</td>
</tr><tr>
<td colspan="2" align="center"><input type="submit" value="$submit"></td>
</tr>
</table>
</form>
EOF;
print "<br>\n";
print "<div class=\"righthalf1\">\n";
$l = _("Contact us");
print "<h3>$l</h3>\n";
print "$contactform";
print "</div>\n";
?>