-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html.tes
71 lines (69 loc) · 3.64 KB
/
index.html.tes
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
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<?php require_once('src/MyApp/Db.php'); ?>
<html lang="ru">
<head>
<title>testinghuesting</title>
<script src="statick/jquery-3.2.1.js"></script>
<link rel="stylesheet" href="statick/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="statick/bootstrap/dist/css/bootstrap-theme.css">
<link rel="stylesheet" href="statick/main.css">
<script src="statick/bootstrap/dist/js/bootstrap.js"></script>
<meta charset="utf-8"/>
</head>
<body>
<div class="panel panel-default">
<div class="panel-heading">
Добро пожаловать в чат посвящонный пробкам в Москве и области
</div>
<div class="panel-body pre-scrollable" style="background: auto" id="#container">
<!--<?php $db = new \MyApp\Db() ?>-->
<!--<?php foreach (array_reverse($db->getLastRecords()) as $message): ?>-->
<!--<?php if ($message['id'] % 2 == 0): ?>-->
<!--<div class="alert alert-success"><?php echo $message['message'] ?></div>-->
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<div class="alert alert-success">Хуяк хуяк хомяк</div>
<!--<?php else: ?>-->
<!--<div class="alert alert-warning"><?php echo $message['message'] ?></div>-->
<!--<?php endif; ?>-->
<!--<?php endforeach; ?>-->
</div>
<div class="panel-heading">
<center><input id="mess" type="text" style="width: 80%"/>
<button type="button" id="send">Отправить</button>
</center>
</div>
</div>
</body>
<script>
var conn = new WebSocket('ws://sidimvprobke.com:49181');
conn.onopen = function (e) {
$('#container').append("<div class='alert alert-info'>Вы подключились к чату заебали пробки точка ру, материться не воспрещаеться! Приятного общения.</div>");
};
conn.onmessage = function (e) {
$('#container').append("<div class='alert alert-success'>" + e.data + "</div>");
};
$('#send').on('click', function () {
var message = $('#mess').val();
$('#mess').val('');
conn.send(message);
});
</script>
</html>