-
Notifications
You must be signed in to change notification settings - Fork 0
/
guest2.php
144 lines (136 loc) · 5.98 KB
/
guest2.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
require_once "app/Model/users.php";
$user_obj = new users();
if (!isset($_COOKIE['guest_code'])){
setcookie('guest_code',rand(),time()+(86400 * 1));
header('location:guest.php');
}
if (isset($_COOKIE['user_code'])){
header('location:/user/index.php?c=index&a=index');
}
if (isset($_GET['link'])){
$code = $_GET['link'];
$check = $user_obj->check_link($code);
if ($check){
header("location:/user/index.php?c=users&a=loginByCode&code=$code");
} else {
echo "<script>alert('همچین کاربری یافت نشد!')</script>";
}
}
require_once "user/section/header.php";
?>
<link rel="stylesheet" href="user/assets/css/dashboard.css">
<link rel="stylesheet" href="user/assets/css/guest.css">
<style>
body{
background-image: url("https://clog.tootfarangee.com/storage/chatbackground.jpg");
background-size: 500px;
}
@media all and (max-width : 600px) {
.content-wrapper{
padding: 0!important;
}
#chatMainBox{
display: block!important;
position: fixed!important;
margin: 0;
top: 0!important;
width: 100% !important;
border-radius: 0;
}
#messageBar{
display: block!important;
position: fixed!important;
margin: 0 auto!important;
bottom: 10px;
width: 100%;
}
#userChatForm input[type=text] {
display: block!important;
width: 100% !important;
}
#userChatForm #recordBtns {
display: block!important;
width: 100% !important;
}
}
.fa_time{
display: block;
position: relative;
width: 100px!important;
text-align: center;
font-size: 0.8rem;
top: -30px;
z-index: 11111111;
background-color: rgba(0, 0, 0,0.8);
color: white;
border-radius: 10px;
right: 5px;
text-decoration: none;
}
</style>
<div class="container-fluid p-0 m-0">
<div class="row col-sm-12 col-lg-6 mb-5 text-center p-0 m-0" style="margin: 0 auto!important;padding: 0!important;">
<div class="col-12 p-0 m-0">
<div class="row text-center m-0">
<div id="chatMainBox" class="scrollbar w-100 bg-whatsapp " style="max-height: 350px;overflow: auto;background-color: lightgrey">
<div class="p-4" >
<div class="text-left">
<p class=" admin-chat-box d-inline-block">
جناب آقای / سرکار خانم
<b>
</b>
سلام،
<br>
به چه خدمتی نیاز دارید ؟
</p>
</div>
<div class="text-left">
<img src="/storage/strawberry-celebration.gif" alt="" class="user-chat-img shadow d-inline-block" width="200" >
</div>
</div>
</div>
<form id="chatForm" class="w-100" method="post" enctype="multipart/form-data">
<!-- Required Variables -->
<input id="user_type" type="hidden" name="user_type" class="w-100" value="guest">
<input id="code" type="hidden" name="code" class="w-100" value="<?php echo $_COOKIE['guest_code'];?>">
<input id="message_type" type="hidden" name="message_type" class="w-100" value="text">
<input id="user_id" type="hidden" name="user_id" class="w-100" value="<?php if (isset($loggedUser_id)){echo $loggedUser_id;} ?>">
<!-- ./ Required Variables -->
<div id="messageBar" class="d-flex justify-content-between align-items-center bg-white p-2 shadow">
<input id="userMessage" type="text" name="message" class="w-75 d-inline messageInput"
placeholder="پیام شما...">
<div id="recordBtns" class="w-25">
<div id="controls" class="d-inline" style="display: none!important;">
<button id="stopButton" disabled onclick="run()">
<i class="fas fa-stop blink_me"></i>
</button>
<button id="pauseButton" disabled>
<i class="fas fa-pause"></i>
</button>
<button id="recordButton">
<i class="fas fa-microphone-alt"></i>
</button>
</div>
<div class="upload-btn-wrapper d-inline ">
<abbr title="آپلود فایل تصویر" >
<input type="file" id="chatfile" name="chatfile" onchange="send_file()"/>
</abbr>
<i class="fas fa-images"></i>
</div>
<a href="#" id="userSubmit" class="btn bg-tootfarangee d-inline messageBtn">ارسال</a>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="mt-5">
<?php require_once "user/section/scripts.php"; ?>
<?php require_once "user/section/footer.php"; ?>
</div>
</div>
<script src="/global_assets/js/chats/prepare.js"></script>
<script src="/global_assets/js/chats/send.js"></script>
<script src="/global_assets/js/chats/receive.js"></script>
<script src="/global_assets/js/chats/user_update.js"></script>