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 | if (isset($param['sender_name'])) $sender_name=addslashes($param['sender_name']); else $sender_name="";
|
---|
14 | if (isset($param['sender_email'])) $sender_email=addslashes($param['sender_email']); else $sender_email="";
|
---|
15 | if (isset($param['opi'])) $opi=addslashes($param['opi']); else $opi="";
|
---|
16 | if (isset($param['message'])) $message=addslashes($param['message']); else $message="";
|
---|
17 |
|
---|
18 | $ip = $_SERVER["REMOTE_ADDR"];
|
---|
19 | global $adminmail;
|
---|
20 | echo"<br/>";
|
---|
21 |
|
---|
22 | $form_block = "
|
---|
23 | <center><font class=\"title\"><b><br/>"._FEEDBACKTITLE."</b></font>
|
---|
24 | <br/><br/><font class=\"content\">"._FEEDBACKNOTE."</font>
|
---|
25 | </center>
|
---|
26 | <FORM METHOD=\"post\" ACTION=\"modules.php\">
|
---|
27 | <P><strong>"._YOURNAME.":</strong><br/>
|
---|
28 | <INPUT class=\"modulo\" type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\" SIZE=30></p>
|
---|
29 | <P><strong>"._YOUREMAIL.":</strong><br/>
|
---|
30 | <INPUT class=\"modulo\" type=\"text\" NAME=\"sender_email\" VALUE=\"$sender_email\" SIZE=30></p>
|
---|
31 | <P><strong>"._MESSAGE.":</strong><br/>
|
---|
32 | <TEXTAREA class=\"modulo\" NAME=\"message\" COLS=70 ROWS=5 >$message</TEXTAREA></p>
|
---|
33 | <INPUT type=\"hidden\" name=\"opi\" value=\"ds\">
|
---|
34 | <INPUT type=\"hidden\" name=\"file\" value=\"index\">
|
---|
35 | <INPUT type=\"hidden\" name=\"op\" value=\"contatti\">
|
---|
36 | <INPUT type=\"hidden\" name=\"name\" value=\"Elezioni\">
|
---|
37 | <P><INPUT class=\"modulo-button\" TYPE=\"submit\" NAME=\"submit\" VALUE=\""._SEND."\"></p>
|
---|
38 | </FORM>
|
---|
39 | ";
|
---|
40 |
|
---|
41 |
|
---|
42 | if ($opi != "ds") {
|
---|
43 | echo "$form_block";
|
---|
44 | } elseif ($opi == "ds") {
|
---|
45 | $send="";
|
---|
46 | $subject="From EleOnLine";
|
---|
47 | if ($sender_name == "") {
|
---|
48 | $name_err = "<font class=\"message\"><i>"._FBENTERNAME."</i></font><br/><br/>";
|
---|
49 | $send = "no";
|
---|
50 | }
|
---|
51 | if ($sender_email == "") {
|
---|
52 | $email_err = "<font class=\"message\"><i>"._FBENTEREMAIL."</i></font><br/><br/>";
|
---|
53 | $send = "no";
|
---|
54 | }
|
---|
55 | if ($message == "") {
|
---|
56 | $message_err = "<font class=\"message\"><i>"._FBENTERMESSAGE."</i></font><br/>";
|
---|
57 | $send = "no";
|
---|
58 | }
|
---|
59 | if ($send != "no") {
|
---|
60 |
|
---|
61 | $sender_name = strtr($sender_name, "\015\012", ' ');
|
---|
62 |
|
---|
63 | $sender_email = strtr($sender_email, "\015\012", ' ');
|
---|
64 | $msg = "$sitename\n\n";
|
---|
65 | $msg .= ""._SENDERNAME.": $sender_name\n";
|
---|
66 | $msg .= ""._SENDEREMAIL.": $sender_email\n";
|
---|
67 | $msg .= "IP: $ip\n";
|
---|
68 | $msg .= "<br/>"._MESSAGE.": $message\n\n";
|
---|
69 | $to = $adminmail;
|
---|
70 | $mailheaders = "From: $sender_name <$sender_email>\n";
|
---|
71 | $mailheaders .= "Reply-To: $sender_email\n\n";
|
---|
72 | mail($to, $subject, $msg, $mailheaders);
|
---|
73 | echo "<P><center>"._FBMAILSENT."</center></p>";
|
---|
74 | echo "<P><center>"._FBTHANKSFORCONTACT."</center></p>";
|
---|
75 | } elseif ($send == "no") {
|
---|
76 |
|
---|
77 | echo "$name_err";
|
---|
78 | echo "$email_err";
|
---|
79 | echo "$message_err";
|
---|
80 |
|
---|
81 | echo "<br/><br/>";
|
---|
82 | echo "$form_block";
|
---|
83 | }
|
---|
84 | }
|
---|
85 |
|
---|
86 |
|
---|
87 |
|
---|
88 |
|
---|
89 | ?>
|
---|