-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
152 lines (107 loc) · 4.86 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
<?php include "includes/db.php"; ?>
<?php include "includes/header.php"; ?>
<?php session_start();?>
<?php
if(ifItIsMethod('post')){
if(isset($_POST['username']) && isset($_POST['password']))
{
login_user($_POST['username'],$_POST['password']);
}
else{
redirect('..cms/text_us.php');
}
}
?>
<?php
if(isset($_POST['submit']))
{
require_once "Mail.php";
$from = $_POST['email'];
$to = "[email protected]";
$subject = wordwrap($_POST['subject'],70);
$body = $_POST['body'];
$host = "cpanel.freehosting.com";
$username = "[email protected]";
$password = "samsung54606";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else
{
// echo(" <center><p>Message successfully sent!</p></center>");
?>
<script>
$.simplyToast('Message Successfully Sent');
</script>
<?php
}
}
?>
<div id="id01" class="w3-modal">
<div class="w3-modal-content w3-card-4 w3-animate-zoom" style="max-width:600px">
<div class="w3-center"><br>
<span onclick="document.getElementById('id01').style.display='none'" class="w3-button w3-xlarge w3-transparent w3-display-topright" title="Close Modal">×</span>
<img src="images/avatar3.png" alt="Avatar" style="width:30%" class="w3-circle w3-margin-top">
</div>
<form class="w3-container" id="login-form" method="post">
<div class="w3-section">
<h2 class="text-center">Login</h2>
<label><b>Username</b></label>
<input class="w3-input w3-border w3-margin-bottom" type="text" placeholder="Enter Username" name="username" required>
<label><b>Password</b></label>
<input class="w3-input w3-border" type="password" placeholder="Enter Password" name="password" required>
<button class="w3-button w3-block w3-green w3-section w3-padding" type="submit" value="Login" name="login">Login</button>
<!-- <input class="w3-check w3-margin-top" type="checkbox" checked="checked"> Remember me-->
</div>
</form>
<div class="w3-container w3-border-top w3-padding-16 w3-light-grey">
<button onclick="document.getElementById('id01').style.display='none'" type="button" class="w3-button w3-red">Cancel</button>
<span class="w3-right w3-padding w3-hide-small"><a href="forget.php?forgot=<?php echo uniqid(true);?>">Forget password?</a></span>
</div>
</div>
</div>
<?php ?>
<!-- avigation -->
<?php include "includes/navigation.php"; ?>
<!-- Page Content -->
<div class="container">
<section id="login">
<div class="container">
<div class="row">
<div class="col-xs-6 col-xs-offset-3">
<div class="form-wrap">
<div class="well">
<div class="w3-center" >
<img src="images/contact.gif" id="contact-image" alt="Avatar" style="width:30%" class="w3-circle w3-margin-top">
</div>
<h1 style="text-align: center">Contact</h1>
<form role="form" action="" method="post" id="login-form" autocomplete="off">
<div class="form-group">
<label for="email" >Email</label>
<input type="email" name="email" id="email" class="form-control" placeholder="Enter your email">
</div>
<div class="form-group">
<label for="subject" >Subject</label>
<input type="text" name="subject" id="subject" class="form-control" placeholder="Enter your Subject">
</div>
<div class="form-group">
<label for="message" >Message</label>
<textarea class="form-control" name="body" id="body" cols="30" rows="10"></textarea>
</div>
<input type="submit" name="submit" id="btn-login" class="btn btn-primary btn-lg btn-block" name="submit" value="Submit">
</form>
</div>
</div>
</div> <!-- /.col-xs-12 -->
</div> <!-- /.row -->
</div> <!-- /.container -->
</section>
<hr>