This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sendmessage.php
86 lines (85 loc) · 2.67 KB
/
sendmessage.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
<?php
session_start();
include('exec/dbconnect.php');
include('exec/check_user.php');
/*if ($_GET['id'] == null) { echo '<meta charset="utf-8">Что-бы написать сообщение, допишите ?id=, где id= - ваш друг.<br>https://openvk.gfx3336007.com/sendmessage.php?id=2 - <b> Пример </b>'; exit(); }
никита (или вова) блять чо ты делаешь заебал (- илья) */
if($_SESSION['loginin'] == "1"){
include('exec/header.php');
include('exec/leftmenu.php');
?>
<div>
<div id="content-infoname"><b>Личные сообщения</b></div>
<div class="messages-view">
<h3>Сообщение:</h3>
<hr>
<form action="send_message.php" method="post">
<table>
<tr>
<td>
<table>
<tr>
<td style="font-size: 11px;">
<span>Кому:</span>
</td>
<td style="font-size: 11px;">
<select name="id">
<?php
$qs = $dbh1->prepare("SELECT * FROM friends WHERE id1 = '".$_SESSION['id']."'");
$qs->execute();
while($fr = $qs->fetch()){
$qu = $dbh1->prepare("SELECT * FROM users WHERE id = '".$fr['id2']."'");
$qu->execute();
while ($user = $qu->fetch()) {
if ($_GET['id'] != null) {
if ($_GET['id'] == $user['id']) {
echo '<option value="'.$user['id'].'" selected>'.$user['name'].' '.$user['surname'].'</option>';
}
}else{
echo '<option value="'.$user['id'].'">'.$user['name'].' '.$user['surname'].'</option>';
}
}
}
?>
</select>
</td>
</tr>
<tr>
<td style="font-size: 11px;">
<span>Тема:</span>
</td>
<td style="font-size: 11px;">
<input type="text" name="topic">
</td>
</tr>
<tr>
<td style="font-size: 11px;">
<span>Сообщение:</span>
</td>
<td style="font-size: 11px;">
<?php echo $im['topic']?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<textarea rows="5" id="text" name="text" style="min-width:420px;max-width:420px;min-height:71px;"></textarea><br><br>
<input type="submit" id="button" value="Отправить">
</form>
</div><br><br>
</div>
</div>
</div>
</div>
<div>
<? include('exec/footer.php'); ?>
</div>
</div>
</body>
</html>
<?php }else if($_SESSION['loginin'] != "1"){
echo '<meta charset="utf-8">Пожалуйста, авторизируйтесь.<meta http-equiv="refresh" content="3;blank/../">';
exit();
}
?>