-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
152 lines (122 loc) · 4.51 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
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
$alert_text = '';
$name = '';
$email = '';
$subject = '';
$msg = '';
if( $_POST ){
require_once('clsTwitterDB.php');
$tw = new clsTwitterDB();
$contact_email = $tw->get_contact_email();
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$msg = $_POST['message'];
if ($name == '' || $email == '' || $subject == '' || $msg == ''){
$alert_text = 'Oh no! you forgot to fill all fields, please complete them all and try again';
}else{
$message = "
Name: ".$nombre."
".$msg."";
if (@mail($contact_email, $subject, $msg, "FROM: $email\n")){
$alert_text = "Thanks for sending us your comments, we're going to answer you soon! ";
$email = '';
$subject = '';
$msg = '';
}else{
$alert_text = "Oh no! There was an error, please try sending your comments again ";
}
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>.:: Welcome to ltweet.com ::.</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="css/default.css" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(function(){
$('#name').val('<?php echo $name ?>');
$('#email').val('<?php echo $email ?>');
$('#subject').val('<?php echo $subject ?>');
$('#message').val('<?php echo $msg ?>');
});
</script>
</head>
<body>
<?php //Showing applications page
include_once('common_design.php');
$common_design = new commonDesign();
?>
<!-- Main Menu -->
<?php echo $common_design->topMenu() ?>
<div id="contact-text">
<?php echo $alert_text ?>
</div>
<div id="main-container">
<!-- Right Column -->
<?php echo $common_design->rightColumn(false, false) ?>
<div id="left">
<h1 class="info-title">Contact Us</h1>
<div class="info-text">
We welcome your feedback! If you have a suggestion for how we
may improve the service, feel free to use the contact form below
to get in touch with us. We also encourage you to report any bugs
or glitches that you may experience when using our site. We do
not need to hear from you if you get the infamous twitter "Fail
Whale" when trying to use our service as that is an issue with their
servers not ours, but we won't get angry if you write us about it
anyway!
</div>
<form class="contact-form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table width="420" border="0">
<tr>
<td width="auto">
<label for="name"> Name:</label>
</td>
<td width="auto">
<input name="name" id="name" type="text" size="37" class="txt" />
</td>
</tr>
<tr>
<td>
<label for="email"> Email:</label>
</td>
<td>
<input name="email" id="email" type="text" size ="37" class="txt"/>
</td>
</tr>
<tr>
<td>
<label for="subject"> Subject:</label>
</td>
<td>
<input name="subject" id="subject" type="text" size="37" class="txt"/>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<br/>
<label for="message" class="comment-label">Comments</label>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<textarea name="message" id="message" rows="10" cols ="50" class="txt">
</textarea>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="submit" id="send-button" value="Send"/>
</td>
</tr>
</table>
</form>
</div>
<div style="clear:both;height:30px;"></div>
</div>
</body>
</html>