1 | <?php
|
---|
2 |
|
---|
3 | /************************************************************************/
|
---|
4 | /* Eleonline - Raccolta e diffusione dei dati elettorali */
|
---|
5 | /* by Luciano Apolito & Roberto Gigli */
|
---|
6 | /* http://www.eleonline.it */
|
---|
7 | /* info@eleonline.it luciano@aniene.net rgigli@libero.it */
|
---|
8 | /************************************************************************/
|
---|
9 |
|
---|
10 | if (!defined('MODULE_FILE')) {
|
---|
11 | die ("You can't access this file directly...");
|
---|
12 | }
|
---|
13 |
|
---|
14 | $ip = $_SERVER["REMOTE_ADDR"];
|
---|
15 | global $adminmail;
|
---|
16 | echo"<br/>";
|
---|
17 |
|
---|
18 | $form_block = "
|
---|
19 | <center><font class=\"title\"><b><br/>"._FEEDBACKTITLE."</b></font>
|
---|
20 | <br/><br/><font class=\"content\">"._FEEDBACKNOTE."</font>
|
---|
21 | </center>
|
---|
22 | <FORM METHOD=\"post\" ACTION=\"modules.php\">
|
---|
23 | <P><strong>"._YOURNAME.":</strong><br/>
|
---|
24 | <INPUT class=\"modulo\" type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\" SIZE=30></p>
|
---|
25 | <P><strong>"._YOUREMAIL.":</strong><br/>
|
---|
26 | <INPUT class=\"modulo\" type=\"text\" NAME=\"sender_email\" VALUE=\"$sender_email\" SIZE=30></p>
|
---|
27 | <P><strong>"._MESSAGE.":</strong><br/>
|
---|
28 | <TEXTAREA class=\"modulo\" NAME=\"message\" COLS=70 ROWS=5 >$message</TEXTAREA></p>
|
---|
29 | <INPUT type=\"hidden\" name=\"opi\" value=\"ds\">
|
---|
30 | <INPUT type=\"hidden\" name=\"file\" value=\"index\">
|
---|
31 | <INPUT type=\"hidden\" name=\"op\" value=\"contatti\">
|
---|
32 | <INPUT type=\"hidden\" name=\"name\" value=\"Elezioni\">
|
---|
33 | <P><INPUT class=\"modulo-button\" TYPE=\"submit\" NAME=\"submit\" VALUE=\""._SEND."\"></p>
|
---|
34 | </FORM>
|
---|
35 | ";
|
---|
36 |
|
---|
37 |
|
---|
38 | if ($opi != "ds") {
|
---|
39 | echo "$form_block";
|
---|
40 | } elseif ($opi == "ds") {
|
---|
41 | if ($sender_name == "") {
|
---|
42 | $name_err = "<font class=\"message\"><i>"._FBENTERNAME."</i></font><br/><br/>";
|
---|
43 | $send = "no";
|
---|
44 | }
|
---|
45 | if ($sender_email == "") {
|
---|
46 | $email_err = "<font class=\"message\"><i>"._FBENTEREMAIL."</i></font><br/><br/>";
|
---|
47 | $send = "no";
|
---|
48 | }
|
---|
49 | if ($message == "") {
|
---|
50 | $message_err = "<font class=\"message\"><i>"._FBENTERMESSAGE."</i></font><br/>";
|
---|
51 | $send = "no";
|
---|
52 | }
|
---|
53 | if ($send != "no") {
|
---|
54 |
|
---|
55 | $sender_name = strtr($sender_name, "\015\012", ' ');
|
---|
56 |
|
---|
57 | $sender_email = strtr($sender_email, "\015\012", ' ');
|
---|
58 | $msg = "$sitename\n\n";
|
---|
59 | $msg .= ""._SENDERNAME.": $sender_name\n";
|
---|
60 | $msg .= ""._SENDEREMAIL.": $sender_email\n";
|
---|
61 | $msg .= "IP: $ip\n";
|
---|
62 | $msg .= "<br/>"._MESSAGE.": $message\n\n";
|
---|
63 | $to = $adminmail;
|
---|
64 | $mailheaders = "From: $sender_name <$sender_email>\n";
|
---|
65 | $mailheaders .= "Reply-To: $sender_email\n\n";
|
---|
66 | mail($to, $subject, $msg, $mailheaders);
|
---|
67 | echo "<P><center>"._FBMAILSENT."</center></p>";
|
---|
68 | echo "<P><center>"._FBTHANKSFORCONTACT."</center></p>";
|
---|
69 | } elseif ($send == "no") {
|
---|
70 |
|
---|
71 | echo "$name_err";
|
---|
72 | echo "$email_err";
|
---|
73 | echo "$message_err";
|
---|
74 |
|
---|
75 | echo "<br/><br/>";
|
---|
76 | echo "$form_block";
|
---|
77 | }
|
---|
78 | }
|
---|
79 |
|
---|
80 |
|
---|
81 |
|
---|
82 |
|
---|
83 | ?>
|
---|