-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistmensagem.php
More file actions
95 lines (90 loc) · 2.4 KB
/
registmensagem.php
File metadata and controls
95 lines (90 loc) · 2.4 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Envio de mensagem</title>
<style type="text/css">
.texto1 {
font-family: Verdana, Geneva, sans-serif;
text-align: center;
}
.texto1 strong {
font-family: Verdana, Geneva, sans-serif;
text-align: center;
}
.texto1 a {
text-align: center;
}
</style>
<?php
include('restt.php');
include('conectar.php');
$myemaili = $_POST['myemaili'];
$emailifri = $_POST['emailifri'];
$assuntofri = $_POST['assuntofri'];
$mensagfri = $_POST['mensagfri'];
$data = date("d/m/Y");
//---- maili seu
$query_maili = "SELECT * FROM usuarios WHERE ncartao = ?";
$stmt_maili = $mysqli->prepare($query_maili);
$stmt_maili->bind_param("s", $login_ncartaou);
$stmt_maili->execute();
$res_maili = $stmt_maili->get_result();
$infomaili = $res_maili->fetch_array();
$intermail = $infomaili['intermail'];
//---- Fim
if($intermail != $myemaili){
?>
<table align='center' background='Imagens/backpayed.png' width='681' height='452' border='0'>
<tr>
<td height='111'><h1 class='texto1'> </h1></td>
</tr>
<tr>
<td height='136'><span class='texto1'>
<h1>Este email não é o seu!</h1>
</span>
<p class='texto1'> <a href='javascript: window.history.go(-1)'>Clique aqui para voltar</a>
</p>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php
}else{
$nulo = 0;
//==== INSERTS INTERNAL EMAIL IN THE DATABASE
$query_insert = "INSERT INTO mensagens (remetente, destinatario, titulo, data, mensagem, lido) VALUES (?, ?, ?, ?, ?, ?)";
$stmt_insert = $mysqli->prepare($query_insert);
$stmt_insert->bind_param("sssssi",
$myemaili, //==== WHO SENDS
$emailifri, //==== TO WHOM
$assuntofri, //==== SUBJECT
$data, //==== DATE
$mensagfri, //==== MESAGE
$nulo //=== NULL VALUE (WASN'T READ YET)
);
$stmt_insert->execute();
?>
<table align='center' background='Imagens/backpayed.png' width='681' height='452' border='0'>
<tr>
<td height='111'><h1 class='texto1'> </h1></td>
</tr>
<tr>
<td height='136'><span class='texto1'>
<h1>Seu email foi enviado para <?=$emailifri; ?>!</h1>
</span>
<p class='texto1'> <a href='cliente.php'>Clique aqui para ir à página do cliente</a>
</p>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php
}
?>
</body>
</html>