-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsocial.php
129 lines (104 loc) · 3.23 KB
/
social.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
<?php require_once 'asset/php/header.php'; ?>
<div class="container mt-4">
<div class="wrapper d-flex justify-content-center text-center">
<div>
<h1>Meet Friends.</h1>
<p class="text-muted lead text-capitalize">here you can message a friend.</p>
<p id="msg"></p>
<?php if (!isset($cid)) : ?>
<p class="text-danger">Please Log in to chat.</p>
<a href="login.php">Login here!</a>
<?php else : ?>
<p></p>
<?php endif; ?>
</div>
</div>
<div class="d-flex">
<div id="show" class="col-md-9 mx-auto col-sm-12 left-sidebar">
<!--all users--->
</div>
</div>
</div>
<!-- show profile details Modal-->
<div class=" modal fade" id="showProfile">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header bg-info" style="height: 10px;">
<button type="button" class="close text-light pt-0" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<div id="shows">
</div>
</div>
</div>
</div>
</div>
<!-- end show profile details Modal--->
<link rel="stylesheet" href="asset/css/messagezz.css">
<!--bootstrap jquery-->
<script src="asset/js/jquery-3.5.1.min.js"></script>
<!--bootstrap js-->
<script src="asset/js/bootstrap.bundle.min.js"></script>
<!--font awesome-->
<script type="text/javascript" src="asset/DataTables/datatables.min.js"></script>
<script src="asset/js/all.js"></script>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@8"></script>
<script type="text/javascript">
$(document).ready(function() {
getuserp();
function getuserp() {
status = 1;
$.ajax({
url: 'asset/php/status.php',
method: 'get',
data: {
status: status
},
success: function(response) {
$("#upShow").html(response);
}
});
}
$("#show").html('<p class="font-weight-bold mx-auto text-primary">Please wait........</>');
setInterval(function() {
$.ajax({
url: 'asset/php/status.php',
method: 'post',
data: {
status: status
},
success: function(response) {
}
});
}, 2000);
setInterval(function() {
$.ajax({
method: "get",
url: "online.php",
data: {
action: 'get_users'
},
success: function(response) {
$("#show").html(response);
// console.log(response);
}
});
}, 2000);
//modal for show user profile details ajax request
$("body").on('click', '.showProfile', function(e) {
e.preventDefault();
iss = $(this).attr('id');
$.ajax({
url: 'asset/php/status.php',
method: 'post',
data: {
iss: iss
},
success: function(response) {
$("#shows").html(response);
$('#showProfile').modal('show');
}
});
});
});
</script>