-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.php
More file actions
293 lines (239 loc) · 12.2 KB
/
interface.php
File metadata and controls
293 lines (239 loc) · 12.2 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?php
if(!extension_loaded("sodium")){
echo "SODIUM Extention is not loaded.";
exit();
}
require_once('functionality/db/_conn.php');
require_once('functionality/_auto_login.php');
require_once('functionality/lib/_validation.php');
if( !isset($_SESSION['userID']) ){
header('location: /user');
exit();
}else{
session_check();
$isAdmin= is_admin();
require_once('functionality/lib/_wrappers.php');
require_once('functionality/lib/_fetch_data.php');
require_once('functionality/lib/_wrappers.php');
require_once('functionality/lib/_fetch_data.php');
$userID = getDecryptedUserID();
$unm = "@"._fetch_unm();
$nm = get_user_full_name(substr($unm , 1));
$gender= _fetch_gender();
$email = _fetch_email();
setcookie("unm" , substr($unm, 1) , time()+(24*60*60*1000), "/");
}
?>
<!-- bots app -->
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Style -->
<link rel="stylesheet" href="/css/interface.css" type="text/css">
<!-- Script -->
<script type="text/javascript" src="/js/interface.js"></script>
<script type="text/javascript" src="/js/lib/_chat.js" ></script>
<script type="text/javascript" src="/js/lib/_notify.js" ></script>
<script type="text/javascript" src="/js/_error_handling.js"></script>
<script type="text/javascript" src="/js/lib/_postReq.js"></script>
<script type="text/javascript" src="/js/lib/_dataRequests.js"></script>
<script type="text/javascript" src="/js/lib/_validation.js"></script>
</head>
<body class="main">
<header>
<?php custom_header($isAdmin);?>
<span class="status red">
<span class="status-icon"></span>
</span>
</header>
<div class="side-bar">
<div class="top">
<!-- Personal -->
<div class="options" title="Personal" data-action="personal">
<div class="img ">
<img src="/img/icons/options/chat-30.png" alt="Personal-Chat-Img" >
</div>
</div>
<!-- group -->
<div class="options" title="Group" data-action="group">
<div class="img">
<img src="/img/icons/options/group_chat.svg" alt="Group-Chat-Img">
</div>
</div>
<?php
if($isAdmin){
?>
<!-- group -->
<div class="options" title="Admin Panel" data-action="admin-panel">
<div class="img">
<img src="/img/icons/options/admin-icon.svg" alt="admin-panel-Img">
</div>
</div>
<?php
}
?>
</div>
<div class="bottom">
<!-- Add New Chat -->
<div class="options" title="addNewChat" data-action="add-new-chat" accesskey="a">
<div class="img">
<div style="font-size: 20px;"><b>+</b></div>
</div>
</div>
<!-- Notifications -->
<div class="options" title="Noti" data-action="noti" accesskey="n">
<div class="img">
<img src="/img/icons/options/noti.png" alt="New-notification-img">
</div>
</div>
<!-- settings -->
<div class="options" title="Settings" data-action="settings" accesskey="s">
<div class="img">
<img src="/img/icons/options/setting-24.png" alt="settings-img">
</div>
</div>
<!-- profile -->
<div class="options profile" title="Profile" data-action="settings" accesskey="p">
<div class="img">
<img src="/img/dp-moon.png" class="avatar" title="<?= $unm?>" />
</div>
</div>
</div>
</div>
<!-- Notification-box -->
<div class="noti-box noti-box_hide">
<div class="title"> Notification</div>
<div class="conteiner">
</div>
</div>
<!-- settings-box -->
<div class="settings-box settings-box_hide">
<ul>
<li class="" name="general">
<div>
<img src="/img/icons/settings/general-64.png" height="20px" width="20px" alt="settings-general-img" >
</div>
<p>General</p>
</li>
<li class="" name="account">
<div>
<img src="/img/icons/settings/account-64.png" height="20px" width="20px" alt="settings-account-img" >
</div>
<p>Account</p>
</li>
<li class="" name="chat">
<div>
<img src="/img/icons/settings/chat-64.png" height="20px" width="20px" alt="settings-chat-img" >
</div>
<p>Chat</p>
</li>
<li class="" name="help">
<div>
<img src="/img/icons/settings/help-64.png" height="20px" width="20px" alt="settings-help-img" >
</div>
<p>Help</p>
</li>
<li class="" name="profile">
<div>
<img src="/img/icons/settings/profile.svg" height="20px" width="20px" alt="settings-profile-icon" >
</div>
<p>Profile</p>
</li>
</ul>
<div class="settings-container">
<div class="body" name="general-body" style="display: none;">
<div class="heading">General</div>
<!-- Emoji section -->
<h4 class="green">Emojis Section:</h4>
<p>You can upload your own emojis here.</p>
<button class="success-button button" name="emoji-upload-btn" style="font-size:10px;left:0;">Upload Emoji</button>
<button class="success-button button" name="emoji-list-open-btn" style="font-size:10px;">Your Emojis List</button>
</div>
<div class="body" name="account-body" style="display: none;">
<div class="heading">Account</div>
<h4>Privacy</h4>
<div class="checkbox" name="edit-can_see_online_status">
<input type="checkbox" name="can_see_online_status" id="can_see_online_status" onclick="_togle_user_data(this);" <?php if(fetch_data_from_users_details($userID , 'can_see_online_status') == '1') { echo 'checked';} ?>>
<label for="can_see_online_status">Everyone can see online status </label>
</div>
<!-- log-out -->
<h4 class="red">Log Out</h4>
<p>Log out from your account</p>
<button class="danger-button button " name="log-out">Log Out</button>
<!-- Blocked Accounts -->
<h4 class="red">Blocked Accounts</h4>
<p>The accounts you Blocked can be seen here.</p>
<p> <span class="red"> Note: </span> Please do remember that chatters block by you or them will not be able to direct contect you or message you but if you are in a group with him/her/them than they can message you from the same groups, so leave the groups immediately.</p>
<button class="danger-button button" name="blocked-list-open-btn" style="font-size:10px;">Check Blocked List</button>
<!-- Delete Account -->
<h4 class="red">Delete Account</h4>
<p>Delete your account, Which means your all data in Botsapp will be no longer available , your all chats will be deleted.</p>
<button class="danger-button button" name="Delete-Account">Delete Account</button>
</div>
<!-- Chat-body -->
<div class="body" name="chat-body" style="display: none;">
<div class="heading">Chat</div>
<h4>Theme</h4>
<div class="swipe-btn">
<label for="theme">Dark</label>
<input type="checkbox" name="theme" id="theme" onclick="_togle_user_data(this);">
<label for="theme">Light</label>
</div>
<h4>Wallpaper Settings</h4>
<a class="Wallpaper_Btn link" data-type="change">Change Background Wallpaper</a>
<br><br>
<a class="Wallpaper_Btn link" data-type="set_default" >Set Default BotsApp Wallpaper</a>
</div>
<!-- Help-body -->
<div class="body" name="help-body" style="display: none;">
<div class="heading">New Chatter ?</div>
<p>Are you new user? Don't know what do ?</p>
<p>Don't worry just visit our information page </p>
<a href="/help/info.html" class="link">More Info</a>
<br><br>
<div class="heading">Give the project what it deserves</div>
<p>So how is your experience using BotsApp web-app?</p>
<p>Better then our competitor right?</p>
<p>Wanna Give this project a star...</p>
<a href="https://github.com/darshitlimbad/BotsApp" class="link" target="_blank">github/BotsApp</a>
<br><br>
<div class="heading">Found any bugs?</div>
<p>If you recently noticed any bug or mistacks by me please share it here,</p>
<p>It will be very helpfull for me</p>
<a href="https://github.com/darshitlimbad/BotsApp/issues" class="link" target="_blank">Bug Report/Issues</a>
</div>
<!-- Profile Body -->
<div class="body" name="profile-body" style="display: none;">
<div class="heading">Profile</div>
<div class="profile-dp">
<img src="/img/dp-moon.png" onerror="defaultDp(this);" title="<?= $nm?>" class="avatar">
</div>
<img src="/img/icons/settings/profile/edit_img.png" class="edit_img ele" title="Edit Profile Picture" onclick="toggle_img_upload_form('upload_new_dp')"/>
<br>
<div class="text"><?= $unm?></div>
<p class="margin-dead">Name:</p>
<div class="grid edit_box" name="edit-user-name">
<input type="text" name="user-name" class="text" style="font-size: 15px;" placeholder="Enter User Name" minlength="5" maxlength="30" onkeydown="_submit_data(event)" value="<?= $nm; ?>" readonly />
<img name="edit-icon" class="edit-icon ele" src="/img/icons/settings/profile/edit.png" title="edit"/>
</div>
<p class="margin-dead">About:</p>
<div class="grid edit_box" name="edit-about" style="margin:30px 0">
<textarea name="about" class="text" maxlength="100" onkeydown="_submit_data(event)" placeholder="Enter About Yourself" resize="none" data-oldValue='<?= fetch_data_from_users_details($userID , 'about');?>' readonly><?= fetch_data_from_users_details($userID , 'about');?></textarea>
<img name="edit-icon" class="edit-icon ele" src="/img/icons/settings/profile/edit.png" title="edit" />
</div>
<p class="margin-dead">Gender:</p>
<div class="grid edit_box" name="edit-gender">
<input type="text" name="gender" class="text" style="font-size: 15px;text-transofrm:capitalize;" placeholder="Enter Your Gender" maxlength="30" onkeydown="_submit_data(event)" value="<?= $gender; ?>" readonly />
<img name="edit-icon" class="edit-icon ele" src="/img/icons/settings/profile/edit.png" title="edit"/>
</div>
<p class="margin-dead">E-mail:</p>
<div class="text"><?= $email?></div>
</div>
</div>
</div>
</body>
<?php require_once('functionality/lib/_features.php'); ?>
</html>