Browse code

Created repository.

DoubleBastionAdmin authored on 26/01/2022 20:32:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+<?php
2
+/**
3
+ *  Copyright (C) 2021  Double Bastion LLC
4
+ *
5
+ *  This file is part of Roundpin, which is licensed under the
6
+ *  GNU Affero General Public License Version 3.0. The license terms
7
+ *  are detailed in the "LICENSE.txt" file located in the root directory.
8
+ */
9
+
10
+session_start();
11
+
12
+if (isset($_POST['s_ajax_call']) && ($_POST['s_ajax_call'] == $_SESSION['validate_s_access']) && isset($_POST['sipusername']) && $_POST['sipusername'] != '') {
13
+
14
+  $sipUser = $_POST['sipusername'];
15
+
16
+  if (is_dir('textchat/' . $sipUser . '/uploads')) {
17
+
18
+       array_map('unlink', glob('textchat/' . $sipUser . '/uploads/*'));
19
+
20
+       if (rmdir('textchat/' . $sipUser . '/uploads')) {
21
+           $cmessage = 'success';
22
+       } else {
23
+           $cmessage = 'failure';
24
+       }
25
+
26
+  } else { $cmessage = 'success'; }
27
+
28
+  $resresult = ["note" => $cmessage];
29
+
30
+  echo json_encode($resresult);
31
+
32
+} else {
33
+       header("Location: roundpin-login.php");
34
+}
35
+
36
+?>