This repository was archived by the owner on Jan 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.php
More file actions
116 lines (96 loc) · 4.95 KB
/
contact.php
File metadata and controls
116 lines (96 loc) · 4.95 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>AccionSocialMed</title>
<link rel="stylesheet" href="assetsContact/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assetsContact/css/styles.min.css">
<!-- Left nav bar -->
<link rel="stylesheet" href="assetsFAQ/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assetsFAQ/fonts/fontawesome-all.min.css">
<link rel="stylesheet" href="assetsFAQ/css/Footer-Dark.css">
<link rel="stylesheet" href="assetsFAQ/css/Navegacin-APS.css">
<link rel="stylesheet" href="assetsFAQ/css/Search-Input-responsive.css">
<link rel="stylesheet" href="assetsFAQ/css/Sidebar-1.css">
<link rel="stylesheet" href="assetsFAQ/css/Sidebar-Menu-1.css">
<link rel="stylesheet" href="assetsFAQ/css/Sidebar-Menu.css">
<link rel="stylesheet" href="assetsFAQ/css/Sidebar.css">
<link rel="stylesheet" href="assetsFAQ/css/simple-footer.css">
<link rel="stylesheet" href="assetsFAQ/css/styles.css">
<style media="screen">
.successEmail{
width: 100%;
border-radius: 7px;
border: solid 1px #103567;
background-color: #103567;
color: white;
}
</style>
<?php
function sendMail($email,$nombre,$asunto,$body){
$headers = "From:".$nombre." <".$email.">\r\n";
mail('alphaduck@alphaduck.software',$asunto,$body,$headers);
echo "<p class='successEmail'> Gracias por ponerte en contacto con AccionSocialMed. En la máxima brevedad posible alguien revisará
tu mensaje y responderá tus dudas.</p>";
}
?>
</head>
<body>
<?php include "_navbar.php"; ?>
<div>
<!-- Barra de navegación Izquierda -->
<div id="wrapper">
<div class="shadow-sm" id="sidebar-wrapper" style="width: 15%;background-color: transparent;">
<ul class="sidebar-nav">
<li style="margin-top: 15%;">
<a class="border rounded shadow-sm" href="/faq.php" style="color: #103567;">Preguntas Comunes</a>
</li>
<li>
<a class="border rounded shadow-sm" href="" style="color: #103567;">Contacta</a>
</li>
</ul>
</div>
</div>
<!-- Contenedor Central -->
<div class="container" style="margin-left: 15%;">
<div class="col-xl-8">
<div class="row">
<div class="col-md-4 col-lg-10 col-xl-12 text-center">
<div class="row">
<div class="col">
<div class="form-container" style="padding-top: 20px">
<?php
echo "<form method='post' action='".$_SERVER['PHP_SELF']."'>";
?>
<h2 class="text-center" style="color: #103567;"><strong>Contacta Con AccionSocialMed</strong></h2>
<div class="form-group"><input class="form-control" type="email" name="email" placeholder="Email" required></div>
<div class="form-group"><input class="form-control" type="text" name="nombre" placeholder="Nombre"></div>
<div class="form-group"><input class="form-control" type="text" name="asunto" placeholder="Asunto"></div>
<div class="form-group"><textarea style="height: 160px; resize: none" class="form-control" name="body" placeholder="¿Que te gustaría preguntar?"required></textarea></div>
<div class="form-group">
<button class="btn btn-primary btn-block border rounded" type="submit" style="background-color: #103567;">Enviar</button>
</div>
</form>
<?php
$email = $_POST['email'];
$nombre = $_POST['nombre'];
$asunto = $_POST['asunto'];
$body = $_POST['body'];
if(isset($_POST['email'])){
sendMail($email,$nombre,$asunto,$body);
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assetsContact/js/jquery.min.js"></script>
<script src="assetsContact/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>