1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,32 @@ |
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['recsendsipuser']) && $_POST['recsendsipuser'] != '') { |
|
13 |
+ |
|
14 |
+ $recsendsipuser = $_POST['recsendsipuser']; |
|
15 |
+ |
|
16 |
+ if (is_file('textchat/' . $recsendsipuser . '/rsa_1024_pub.pem')) { |
|
17 |
+ |
|
18 |
+ $chatKey = file('textchat/' . $recsendsipuser . '/rsa_1024_pub.pem'); |
|
19 |
+ |
|
20 |
+ if (!empty($chatKey)) { $message = 'success'; } else { $message = 'error'; } |
|
21 |
+ |
|
22 |
+ } else { $chatKey = ''; $message = 'error'; } |
|
23 |
+ |
|
24 |
+ $result = ['chatkey' => $chatKey, 'resmessage' => $message]; |
|
25 |
+ |
|
26 |
+ echo json_encode($result); |
|
27 |
+ |
|
28 |
+} else { |
|
29 |
+ header("Location: roundpin-login.php"); |
|
30 |
+} |
|
31 |
+ |
|
32 |
+?> |