Browse code

removed appinfo/info.xml appinfo/signature.json CHANGELOG.txt js/showsmstables.js js/adminsettings.js css/style.css lib/Controller/AuthorApiController.php lib/Controller/SmsrelentlessController.php lib/Service/SmsrelentlessService.php templates/settings/admin.php

DoubleBastionAdmin authored on 20/04/2024 03:30:52
Showing 10 changed files
1 1
deleted file mode 100644
... ...
@@ -1,167 +0,0 @@
1
-======= CHANGELOG =======
2
-
3
-Versions:
4
-
5
-== 1.0.0 - 2022-1-27 ==
6
-* Initial release.
7
-
8
-== 1.0.1 - 2022-3-31 ==
9
-* Changed presentation text.
10
-
11
-== 1.0.2 - 2022-4-13 ==
12
-* Changed application controller class, to respect custom path of 'datadirectory'.
13
-* Fixed filters row arrow not showing up when using Apache.
14
-* Added the 'Contributors.txt' file.
15
-
16
-== 1.0.3 - 2022-4-15 ==
17
-* Changed the way the app gets the timezone.
18
-
19
-== 1.0.4 - 2022-5-7 ==
20
-* Changed the data type of the 'message' column in the 'sms_relent_sent' and 'sms_relent_received' tables.
21
-
22
-== 1.0.5 - 2022-5-9 ==
23
-* Changed string length for 'message' column in 'sms_relent_sent' and 'sms_relent_received' tables.
24
-* Changed syntax of SQL queries and of encryption function.
25
-* Changed structure of webhook URLs in case Nextcloud is served on a subdirectory.
26
-
27
-== 1.0.6 - 2022-8-13 ==
28
-* Added support for Twilio.
29
-* Added support for new lines in messages and email notifications.
30
-* Solved column width issue in sent/received SMS tables.
31
-* Minor explanatory text changes.
32
-
33
-== 1.0.7 - 2022-8-16 ==
34
-* Solved bug related to receiving messages on Twilio number when it's not associated with any Messaging Service.
35
-* Changed css properties for Network column.
36
-
37
-== 1.0.8 - 2022-8-23 ==
38
-* Added support for Flowroute.
39
-* Added automatic scrolling to bottom of received/sent messages table when clicking on 'Received/Sent SMS Messages' button.
40
-* Added scroll bar to info pop-up notes.
41
-
42
-== 1.0.9 - 2022-9-3 ==
43
-* Added support for MMS.
44
-* Minor CSS improvements.
45
-* Small changes to explanatory text.
46
-
47
-== 1.1.0 - 2022-9-5 ==
48
-* Solved issue with previewing images picked from Nextcloud.
49
-* Text changes to README.md.
50
-
51
-== 1.1.1 - 2022-9-9 ==
52
-* Changed signature verification process for Twilio.
53
-* Removed Alphanumeric Sender ID for Flowroute, since it's not supported.
54
-* Minor text changes on presentation page and settings page.
55
-
56
-== 1.1.2 - 2022-10-27 ==
57
-* Changed CSS settings to match the modifications introduced in Nextcloud 25.
58
-
59
-== 1.1.3 - 2022-12-1 ==
60
-* Fixed SQL error that appeared in fresh installations.
61
-* Added support for dark themes.
62
-* Updated explanatory text for Telnyx on the Settings page.
63
-
64
-== 1.1.4 - 2022-12-2 ==
65
-* Changed migration files to prevent installation errors.
66
-* Modified 3 svg files converting text objects to paths.
67
-
68
-== 1.1.5 - 2023-2-28 ==
69
-* Fixed issue related to Twilio message signing.
70
-* Updated message pricing information in app description.
71
-
72
-== 1.1.6 - 2023-5-8 ==
73
-* Implemented showing display names of message authors before their messages.
74
-* Added checkbox to enable/disable prepending display names before messages.
75
-* Custom display names can be now saved for external phone numbers.
76
-* Restrictions for groups or users can be placed on phone numbers by admins.
77
-* Admins can see just their own messages or all the messages in their message tables.
78
-* Auto-replies with 'daily mode' and 'vacation mode' can be configured for any controlled phone number.
79
-* Added a new message table that lists all the messages grouped by phone numbers.
80
-* Added the ability to see all the messages sent/received to/from a phone number, by clicking on 
81
-  a button located below the number, in the 'Received SMS Messages' and 'Sent SMS Messages' tables
82
-
83
-== 1.1.7 - 2023-5-9 ==
84
-* Fixed bug related to not being able to see messages in pop-up windows and on grouped messages table.
85
-
86
-== 1.1.8 - 2023-5-9 ==
87
-* Fixed migration issue bug.
88
-
89
-== 1.1.9 - 2023-5-9 ==
90
-* Made the app available to upgrade to for Nextcloud 26.
91
-
92
-== 1.2.0 - 2023-5-20 ==
93
-* Fixed auto-reply bug.
94
-* Moved the API keys and alphanumeric sender ID fields from the Personal settings page to the Admin 
95
-  settings page.
96
-* Available phone numbers are loaded automatically when the app's icon is clicked.
97
-* When only one phone number is available, it is selected automatically in the 'Set ID' field.
98
-* Admins can share their API keys with other non-admins.
99
-* Admins can see only their messages and the messages of the non-admins whith whom they share their API 
100
-  keys. Non-admins can see only their messages.
101
-* Added pop-up window that shows the messages exchanged between 2 phone numbers and allows sending replies.
102
-
103
-== 1.2.1 - 2023-5-23 ==
104
-* Allowed non-admin users to see incoming messages received on the phone numbers they are restricted to.
105
-* Customized confirm pop-up windows.
106
-
107
-== 1.2.2 - 2023-5-24 ==
108
-* Changed how non-admins view sent messages.
109
-
110
-== 1.2.3 - 2023-5-24 ==
111
-* Fixed 'Load more messages' bug.
112
-* Changed the way the display name is searched for and added to old messages, during app upgrade.
113
-
114
-== 1.2.4 - 2023-5-30 ==
115
-* Fixed MMS files domain problem.
116
-* Made MMS URLs clickable.
117
-* Added refresh button for messages in pop-up windows.
118
-
119
-== 1.2.5 - 2023-6-3 ==
120
-* Fixed incoming MMS issue.
121
-* Added checkbox on Settings page to allow users to include their display names in the text
122
-  of the message itself.
123
-
124
-== 1.2.6 - 2023-6-22 ==
125
-* Fixed messages display issue for non-admins.
126
-* Fixed how non-admins are able to see the messages sent/received from/to the numbers that are
127
-  shared with them but not restricted to them.
128
-
129
-== 1.2.7 - 2023-7-15 ==
130
-* Fixed alert messages issue.
131
-* Fixed text color for dark themes.
132
-* Added 'full-day' exception to auto-reply.
133
-* Added auto-refresh button on received/sent messages pages.
134
-
135
-== 1.2.8 - 2023-10-30 ==
136
-* Changed main screenshot and modified presentation text.
137
-* Changed text on Settings page.
138
-* Marked the app as compatible with Nextcloud 27.
139
-
140
-== 1.2.9 - 2023-11-1 ==
141
-* Changed how the app sends notifications for incoming messages.
142
-
143
-== 1.3.0 - 2023-11-3 ==
144
-* Changed notifications mechanism so that non-admin users receive notifications 
145
-  for messages received on phone numbers shared with them.
146
-* Fixed bug related to listing received messages for non-admin users.
147
-* Minor text modifications on the settings pages.
148
-
149
-== 1.3.1 - 2023-11-6 ==
150
-* Simplified some complex prepared SQL queries.
151
-
152
-== 1.3.2 - 2023-12-18 ==
153
-* Replaced default fonts with 2 free and open source fonts ('Open Sans' and 'Inter'),
154
-  included in the 'fonts' directory.
155
-* Fixed minor CSS issues.
156
-
157
-== 1.3.3 - 2024-2-15 ==
158
-* Implemented auto-refresh of the received messages table, when new messages arrive.
159
-* Fixed bug related to listing received messages, for non-admins.
160
-* Removed the 'Start auto refresh' button on pop-up windows.
161
-* Made the app completely functional when installed in a custom 'apps' directory.
162
-
163
-== 1.3.4 - 2024-4-2 ==
164
-* Removed the right of non-admin users to delete sent/received messages.
165
-* Added the 'Conversations' page, to list the messages exchanged between pairs of numbers and allow tagging, flagging and archiving conversations.
166
-* Improved mobile compatibility.
167
-* Changed the presentation text.
168 0
deleted file mode 100644
... ...
@@ -1,101 +0,0 @@
1
-<?xml version="1.0"?>
2
-<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
3
-      xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
4
-    <id>sms_relentless</id>
5
-    <name>SMS Relentless</name>
6
-    <summary>Send and receive SMS in Nextcloud</summary>
7
-    <description><![CDATA[
8
-This application allows sending and receiving SMS and MMS messages in Nextcloud. An SMS/MMS enabled phone number acquired from 
9
-Telnyx, Plivo, Twilio or Flowroute is needed. Detailed instructions on how to configure and use this application can be found on the 'Admin documentation' page.
10
-
11
-### Features:
12
-
13
-* 🚀 Use one or multiple local phone numbers in countries of your choice, to send and receive SMS/MMS messages with your browser, on any device connected to the Internet.
14
-
15
-* 📑 Sent and received SMS/MMS messages are stored in the database per sending/receiving user and can be viewed in paginated tables with filters for every column.
16
-
17
-* 🖼️  Up to 10 files of various formats, including jpeg, png and gif, can be sent as MMS messages from MMS enabled phone numbers. Files included in incoming MMS messages are not downloaded automatically. They are stored as URL links to the actual files, so that the receivers can download them only if they trust the senders.
18
-
19
-* 📔 SMS/MMS messages older than a specified number of days can be deleted in bulk with one click and they are automatically archived in csv files stored in Nextcloud, before being removed from the database. This makes them available for future analysis.
20
-
21
-* 💻 Sending SMS/MMS messages to thousands of recipients can be achieved by uploading a txt/csv file containing the recipients' phone numbers and the same SMS/MMS is sent automatically to all. The time interval between two consecutive messages is configurable.
22
-
23
-* 👤 The Display Name of Nextcloud users can be prepended to their messages, to make the origin of messages clearer.
24
-
25
-* ⚠️  Admins can restrict the use of specific phone numbers to specific groups or users.
26
-
27
-* ✉️  Auto-replies in 'daily mode' and 'vacation mode' can be configured for any controlled phone number.
28
-
29
-* 🔏 SMS/MMS messages coming from Telnyx, Plivo and Twilio are checked for authenticity by verifying the SMS provider's signature.
30
-
31
-* 📧 Users receive notifications in Nextcloud and (optionally) emails when new SMS/MMS messages arrive.
32
-
33
-* 📄 Each sent message receives a delivery receipt displayed in the Sent SMS Messages table.
34
-
35
-* 🎎 Messages exchanged between pairs of numbers are organized into conversations on a separate page where each conversation can be viewed, tagged and archived.
36
-
37
-* 📞 It can be used with regular 'long code' (10-digit) phone numbers, but also with 'toll-free' numbers and 'short codes'. Users see a list with their current phone numbers and can set them as Sender IDs. Setting alphanumeric Sender IDs is also possible.
38
-
39
-* 📱 If Nextcloud is accessed in Firefox for mobile (version 123.0 or newer), it can be used directly on mobile devices.
40
-
41
-* 💵 It allows checking the current Telnyx/Plivo/Twilio balance by selecting the provider on the left panel.
42
-
43
-* 💰 The only ongoing cost is about $1 per month (depending on the country) for an SMS/MMS enabled phone number located in a country chosen by the user. No contracts.
44
-
45
-* 💸 Low prices per SMS: starting from $0.0040 per sent message and $0.0040 per received message (Telnyx), or $0.0085 per sent message and $0.0085 per received message (Plivo), or $0.0109 per sent message and 0.0079 per received message (Twilio), or $0.0055 per sent message and 0.0040 per received message (Flowroute) in the USA.
46
-
47
-We have no affiliation with Telnyx, Plivo, Twilio or Flowroute.
48
-
49
-### Documentation
50
-
51
-* [Admin documentation](https://www.doublebastion.com/install-nextcloud/#install-sms-relentless)
52
-
53
-### Donations
54
-
55
-* 🎁 [Donate](https://www.doublebastion.com/donations/)
56
-
57
-    ]]></description>
58
-    <version>1.3.4</version>
59
-    <licence>AGPL</licence>
60
-    <author mail="contact@doublebastion.com">Double Bastion LLC</author>
61
-    <namespace>SMSRelentless</namespace>
62
-	<documentation>
63
-		<admin>https://www.doublebastion.com/install-nextcloud/#install-sms-relentless</admin>
64
-	</documentation>
65
-    <category>office</category>
66
-    <category>organization</category>
67
-
68
-    <website>https://www.doublebastion.com/sms-relentless/</website>
69
-    <bugs>https://git.doublebastion.com/sms-relentless/issues/develop</bugs>
70
-    <repository>https://git.doublebastion.com/sms-relentless/develop/</repository>
71
-
72
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/sms_relentless_sent_messages.png</screenshot>
73
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/sms_relentless_received_messages.png</screenshot>
74
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/active_archived_conversations.png</screenshot>    
75
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/sms_relentless_grouped_by_number.png</screenshot>
76
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/sms_relentless_exchanged_messages_popup.png</screenshot>
77
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/sms_relentless_send_mms.png</screenshot>
78
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/sms_relentless_on_mobile.png</screenshot>
79
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/received_messages_on_mobile.png</screenshot>
80
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/reply_to_message_on_mobile.png</screenshot>
81
-            
82
-    <dependencies>
83
-            <nextcloud min-version="26" max-version="28" />
84
-    </dependencies>
85
-
86
-    <navigations>
87
-        <navigation>
88
-            <name>SMS Relentless</name>
89
-            <route>sms_relentless.page.index</route>
90
-            <order>102</order>
91
-            <icon>sms_relentless.svg</icon>
92
-        </navigation>
93
-    </navigations>
94
-
95
-    <settings>
96
-            <personal>OCA\SMSRelentless\Settings\Personal</personal>
97
-            <personal-section>OCA\SMSRelentless\Settings\PersonalSection</personal-section>
98
-            <admin>OCA\SMSRelentless\Settings\Admin</admin>
99
-    	    <admin-section>OCA\SMSRelentless\Settings\AdminSection</admin-section>
100
-    </settings>
101
-</info>
102 0
deleted file mode 100644
... ...
@@ -1,936 +0,0 @@
1
-{
2
-    "hashes": {
3
-        "CHANGELOG.txt": "cc071f744abee7a7caacdae2daf4f5313d9737ffed783abe5e67806cb0b9e44c0b1bdf57a8d28fb43e5d2f752ec7dc718b8dd3640f67ebc0482ebb71179dd91d",
4
-        "COPYING.txt": "a0a86214ea153fb07ff35ceec0848dd1703eae22de036a825efc8394e50f65e3044832f3b49cf7e45a39edc470bdf738abc36a3a78ca7df3a6e73c14eaef94a8",
5
-        "Contributors.txt": "8ab4ea9b8c38e4d115af6ca08e8e27592198b763982bd166b67f38ee0b9f2b7e093cd58ce0927ae38ee3bc015b129add2ffeb3967288c804da493241bc67ba9b",
6
-        "README.md": "593e8b8ffd899357e54f1a4cc3d83b3e6b62fe123c298a59daf1a177b1623713b769a7ba2db01560009400ddc8599289cf1916ce9208db71d03ac52b8417b744",
7
-        "appinfo\/info.xml": "510185b44442efac8959d750519ed1953d2ed6e3d48dffac354cfaa5428b66611a0bf9014c3d0d54e862eb377937a0d0bd8be7df3d3a8db7590500fd585ea7ce",
8
-        "appinfo\/routes.php": "acff816e1947bf78f4387aa477c3183898e94d862ad84c53a64b69828cb5c4b5c42f0f127fd6e9b463eac4764463f134bc023b9e5c6caf24d90ad491d021bf5c",
9
-        "css\/style.css": "a0955e6a72bda2e4e870c1a5dc4c1c36727efa2e2bbf5e500947ae30558129abbbe62aa2e32043a7356879416d9051568c8cd3d729621caca1107061f2b320ba",
10
-        "fonts\/Apache_License_v2.0_Open_Sans.txt": "fdae7ed259455ca9fa45939e7f25cbb4de29831cda16d9151de25a5f6e9d9be43b053f4fd3b896026239fca77abce04f543d591c501ecf4ce18c854bc0a51660",
11
-        "fonts\/Inter-Bold.woff": "f34ed611dc0ba6e7c0bf7242bad7c02e09f208bfbdd21d6649ebf9b41bc06696d8856707851944786c80c718df455e619caab170c70bfe97ba2043d651d4532e",
12
-        "fonts\/Inter-Bold.woff2": "736b4aaf8a2de0c17fbd5396a338577227326f078ee0646072d851d328b58a8058989af8735ac073f935b05f291d9310797d95c963e5e3ff0ea61a87f21c9da5",
13
-        "fonts\/Inter-BoldItalic.woff": "619e398d37249fae96ba0deb06fcf5dab215ba888740024287e2c8f1278b33273124cd5b9ea8f7525a17657566b72a1661b688ca670bc068ca6ddf466b7e7ffe",
14
-        "fonts\/Inter-BoldItalic.woff2": "a24bdb558a9b26fbe7631d6cf90b8db8f5f0164c3c814a2971fb7d45e807b0856454893bbd0d5bd0d9f060689f2be5f5bb1b69e4bdea0293d1122e13ad28e96f",
15
-        "fonts\/Inter-Italic.woff": "72defeb5040f6375683dba41d4ce43654fdbae4f64aea88b01feb023b3e894c278c8a8c7e5583b6d83d980495ca0d5afa5ec7e1bfcc731be08d3dbe1b8b3f348",
16
-        "fonts\/Inter-Italic.woff2": "b128da83c81fe4a28026dc0a2a75c7920f37d4e04d6d6bde4e60b3a9527dbff04ff0ebc8b300874db9bd90036a41a52f4c9d82eb2f78fb8e99a35bb04defa1c2",
17
-        "fonts\/Inter-Medium.woff": "1f7c25aeb1ed534a106254fdba6bf59dfa03542f813489dca31fe067e2a22ab9549babb48af4cd465ab3ef0ef2f4b0f46532efcc8aae8942ad2cf98d0a5a4a3f",
18
-        "fonts\/Inter-Medium.woff2": "ce94d1a0cea81d42546ebc0247403b02c6fae24d3afba618cf658436734557a8b2b8ebed54319a9f66b233bd224da3685f848470866de63a144c8c28070491d4",
19
-        "fonts\/Inter-MediumItalic.woff": "7b7bef9c7a7717c6d52d619059e5ec258b537f538ada38325c2c7bfa4968ff53109bc9ee17a57819ef37d0a145a973f4a7c8e4d8d09e71d3faa4d0fe14cbf487",
20
-        "fonts\/Inter-MediumItalic.woff2": "4a2c5dc8c2ece82489e63b16cd8b1536b8f5502cf8f93307b0c71c6d54594a28ec2a80b8e58dfbbcc1d38a51aa8dd6d6fa025aed2cdc1429a462745a2bf2d414",
21
-        "fonts\/Inter-Regular.woff": "e37409956d19653617af32af2f99f4038c815a3664f2dcb2fef5e6a1a7345c78aaac3badc2ae499b1423514076ad676ab4bd5d936ef9d159899a6f668d991e4c",
22
-        "fonts\/Inter-Regular.woff2": "731924aedf31d6ef8fcd57a3b74182331ec7ba743d64033d8912d350ba98fd5b1942decaa4268f4dc925be2ed711c71a77200b2497bec10cae499b452fb27138",
23
-        "fonts\/Inter-SemiBold.woff": "684602b1f45bf7a9ca5ea6b1aca2cc2046e07ac79eb63b920099463f25866f50cca77ca253f16078d3a6e781ca23b964a69c87389621fa101d5cfffdb292d132",
24
-        "fonts\/Inter-SemiBold.woff2": "12b7680eccc54f56f800ac3ea4eff0490f515911d0fc83f99f62fa0f72d848155c8a7186918301a372d0fd0238d8093109c7b9b3c05168058e3cb47b1f7216ae",
25
-        "fonts\/Inter-SemiBoldItalic.woff": "9623d9c91148b651b7d4a642751e4f9eaeda68b6f4c33355d0173e303252039b3bcd301556a1d8451ffbd36d7996c1e8fc5ca1276884636cf57468e38c9e442a",
26
-        "fonts\/Inter-SemiBoldItalic.woff2": "97b7d8ab268ebcbc00876bd69ca9cc7cf2ae9ba5a6a30c13e3412e41a88f1f5ed758a6d9abbab3a14359943a003b14307cbc379bb11505c014b002322fd53c6e",
27
-        "fonts\/SIL_Open_Font_License_v1.1_Inter.txt": "073e141d4e45a3adfd2cb569db6a4fd217b1721dd6aeab8159e36940b984df5ebdc345deb0eb6be65367f943e516a12dff41eb1238a322d248ca3478c50ef9b6",
28
-        "fonts\/opensans-bold.woff": "d094832745611e047ffa87fdb21bac41befabdb07aecade483d4dc5a5b97bad00f1d4a5dca2a615789cd494791f0ab4209be537eb4b1bc7cbee7c42eb5e201dc",
29
-        "fonts\/opensans-bold.woff2": "096abb618c9ce1a534f0198aeea53c6d1138000f98b883131ab49ee48b80b483af635f0196ac40a1c1bde679f63b3c3b907b8f9b0102a752862d623dd22393a5",
30
-        "fonts\/opensans-bolditalic.woff": "c80f105a10d37c812f5d1b29445cd21cbc95594f71d9c5fc1b3aeeb9985c5465ba017654f1453baefdc56cc27aa325b586d77323012073eb713ab8f88f08dab4",
31
-        "fonts\/opensans-bolditalic.woff2": "38b99ebf320264d74a456fe590fc610580b003bc77a39d97ff42dec41353a8f908d6f680b4777cdb34ed544d9b4ed20dce8c418317de1d721e25ab670f49fc1d",
32
-        "fonts\/opensans-extrabold.woff": "6636a395ba345853ada2237b8e1f81c52e54bfb65559cbcb8de143cac00232f20cf34c764c9c4d4b80e82dae79cba3064ebdf22999cce8839df2d5709ee64092",
33
-        "fonts\/opensans-extrabold.woff2": "758c90eb07c6db7e78cb703ea285f82b443ca2cfab792328a3f8c14acc1f932ae79ec2987b8b94bf19b3cc16fae31c76f3164c9437a2591283fb1592e40ec33d",
34
-        "fonts\/opensans-extrabolditalic.woff": "ab1966f1ab3bb436e489c2d6ee562cf22d05b6b8c9bbca17e903518311aa45659efc329255e08ab597e2b8effe3bda602a7fb56b7d0c1d872b69337537d49dff",
35
-        "fonts\/opensans-extrabolditalic.woff2": "2132d6309969f868521f2d788b991bc9bcf3239f1768db9a2b90faf8838c35efea85225b24db256f54c86d0a7915ecd50a7f5348e6ab040e0f172ba7510598cd",
36
-        "fonts\/opensans-italic.woff": "a9751e7ac7a3c3d9f739d1fe00730a545b68e4a6473beafee8edf583f175b34fd5e0b60a14ec3707c8691fdbebea17e191c51707f50a21281e76be46f55a1140",
37
-        "fonts\/opensans-italic.woff2": "7a80c01d34562e2fe248a71078ffa9413c04c9c320d27acb0bce96cc295101eb9e80a25e97dab3e67c184c40937862be820581441aa4100bd512a26ef2d523cf",
38
-        "fonts\/opensans-light.woff": "cca2c5d207e0935c1848e22965972cb6feea39aa93b1b546051cfabe5ab16e909934d007a7ccd174eda1e7671d838f477890dedcb93d68ba722eda39a16d0bb8",
39
-        "fonts\/opensans-light.woff2": "cdc332de1b13eb0f05cc9dd1ebc905fa5ce948eab71e2fdb1bc538ad54a0de980bf83352090becd650af9c101ec9a6898d2e4798e4fb777e41c20fae85fd568b",
40
-        "fonts\/opensans-lightitalic.woff": "26e7759869088d8abba380f0bb22bbb9fdf0a985c0999519390cbd85099e3f48864d866f4639a8ff1992e7c81c755b0bbf66f525d4d38a929067886e9b54eb88",
41
-        "fonts\/opensans-lightitalic.woff2": "b7f80b69abeca9d0369f5d46da192e98a6329cf1f948c897fb7130e0d815f73e293c37f0e6d0047273fe3f13a19e648d1bd06cfa2fac2142ec38ac244e7f0940",
42
-        "fonts\/opensans-regular.woff": "3a526ba177f8f16ad95941c185411f350fab7e5202b9f56ea9c5f972c62912781d66da10e278e065cc6748a4bc9ab9182d68b27eaf380131c602195148e4b8b4",
43
-        "fonts\/opensans-regular.woff2": "66b3e915b891f7b37b441ee18e40f01274fe19f2515470760e503f428fc1c524ccfbe832191978c2c5f6bc4b7ef46937e4f77f5457b6efbf878c97c054cb45f2",
44
-        "fonts\/opensans-semibold.woff": "173f703ab767d0fcff014dac2fa3dcac787ffd0eb39f0c532b6679935c0105daacfa6a32bca97de13e420e10194b701ad2487bfd35d28807563ebf0b16d0ca35",
45
-        "fonts\/opensans-semibold.woff2": "75068ba76befc2356fe83b198bf6da70e177e53cc3128af09d0d9f69dfe538013f2828b2363c6f533fcaca4d4b2a5ec5159b5eb6f288504ac73d33ac5d1d2c4d",
46
-        "fonts\/opensans-semibolditalic.woff": "9e1e965095991d4a12a0658fa22a116b043ce20fd5f73bb9655d870ae49c46170cec52827510be323332b535002eb96445f79c3d1e4dd0550ff622fda0465f1d",
47
-        "fonts\/opensans-semibolditalic.woff2": "d7e43f05802e26f4cb80ab6a492b01c398c5b41168c7f61356ca3ffc5f4fccabae5ba332956f0aecad69ccabb6b7526efbc0395552cc5d68e47bec00bc660ad7",
48
-        "img\/active.svg": "3ab8794185150eceb9d54b7cebb6e2a925fa1baa8c979336f4f7b033278b4c48f1a9f4edeb92c2dd633fd4b2bfd199ed6634ec5db5fe20bd59bdeecd6da74463",
49
-        "img\/active_archived_conversations.png": "7432aa1588a1e5a9ff0d087b9268f904ff4d372791ea17eaecf9850dda3ebf568fed67f369c3ced0ee430d22eb8aef1b488d56431e396712e5e2a6a34cb2ae65",
50
-        "img\/active_small.svg": "c9076edc03da508e2c9ed3744db125cd961fae8e12a152b0fd8b9de9ff9c94531f558e436c81a358dcc62a0e3f53e09c565eb949fe5e7781494ca463a5c426aa",
51
-        "img\/add.svg": "5711a740d20d8243b4fa9a52783689af96b3b01af6e422ec6a9f0aca16db068869a5a302e6960168d9c90e2dc0a69eed851d69e7f1bf33684304cf861f990604",
52
-        "img\/app-dark.svg": "cbe97fe9fe636790ea0b415035cd78321ff53ec93ab1276d4ef609555592fa13d09b2037c20e06bbb9024fcfcc0ebb806c89572b08adcfe4ee9d06c6466b685a",
53
-        "img\/app.svg": "010ad7cee20f3a256a24bee2482b6798f042a3992c7df5d56ba803cca93552c3cda2a68d1772e67143ce45207b89d397e34ba6909f6b8515134db64e2c5497eb",
54
-        "img\/archive.svg": "ec3fd9dfd0724a1ca352043be8d1bea5ed6de6ef74e72dbb8e852d9579a330a74f16423587fe22b4a515cc593e45bc598a5f9b0128650a6003d7ccfc88522be4",
55
-        "img\/archive_red.svg": "0e43899668cfd9ce3992e02c8a99a3d011b9c94bbff57ed2777305d58350e031aea33d71aaf4e48d879bd19c6a29d981fa7e37351d4f13d84aca4cef42ce419d",
56
-        "img\/archived.svg": "6fb344ce2d1927a0245379857d2069c3b22acb9645ccd4c7b2d159575298433bfeb2e91fb2cde4e3f8536f197b0baa885d8c1546fdffb7b1587dbc2ec1013add",
57
-        "img\/archived_small.svg": "70c8c0a692bce23a07416d8782a6fd8ed2a68d27dbc384d8488968c933743d9304df82ab5f4cfeb4748449c38874e5c3b8fc8ec325c1742451548e7697b85726",
58
-        "img\/arrow-top-small.svg": "3fba2fbf3a27f4d6b44d1c94da2260d025bbe682a3db18c21b9aa548f4878609770cdaa2e5c24e8b5cd97249647187b7499ab18bcd843ae7ee145def41561bbf",
59
-        "img\/arrow-top.svg": "d89358d5d6316e6298789bfaee21aad3a48468f3744888e32325da04e70be385a0f72b97f77e9bb3c80e5907a4c6721a1454b2958c7fd35f6739512a2f2c2b9b",
60
-        "img\/arrowDown.svg": "6fb30b189e848b26369238f7446eb1533327a4e99c70b699c10bb03088eeb7d47393f18d4f16bc03edb945f36cf13b96f05b763dba821c0b04b209cd81624103",
61
-        "img\/arrowDown_small.svg": "cb41e401624082681d60fe5a753fbb3de0d9934b9313ff2f683cbef349ec5e5dbe43f59f60d96f76bb2474517a2a98cc48e1391e8e10c382c85ec9b8d5b3ad03",
62
-        "img\/arrowUp.svg": "4f6a413d836635fd7e2e4d5846ee257c9a13e80624468e444ec906febfcf07a1c84f48d29cce730f29729cc8fbbbd3dab490e2192e5beb2707a6a4b1036bfd76",
63
-        "img\/arrowUp_small.svg": "817c225554678442d19f5bb75733ffff789a97a54313aeac543a3a5dfd90d59b79eeb8032190d2264c8a35a46ec9fa0e2c6ec22e28016fcbbc757fd2668a2c0c",
64
-        "img\/between.svg": "8e7f4309dde5c83b0ef55b72bdac1d5b9ac26b8cc13d134f13a1819a6d214ddada19937cdd2012aa210dc612c0953e3bbb266aa98a02fe55607a0bc028251ca7",
65
-        "img\/check.svg": "aff77744fbd4e8eef8d91fd9e128e9e8be2830a93db9ba8d8a8277e78c8610d6ea5ec9678b3dfd2b8f2b4f8970dc40c4111e7af5011b0873bf461f5fbdeeaa88",
66
-        "img\/clearfilters.svg": "dd92c6c434ebcef78659c8b1f2f80444e25c6977e3ba86f3490baf6d9fe98581901a5d5279f78912b0e7b6df434a552c51e7223015579e632ad88665104004a8",
67
-        "img\/clearfilters_small.svg": "ab3500542d45d66ccc2a7d852ab3fe25e942f270cf0400efb07790eef182c891a7d7d349657c9d447a2cdc7361d063bb7ab05053aa74cd7f7d0b98aa2b872437",
68
-        "img\/clock.svg": "d8aa7359883b08e96bdc3c870cecaf482b149bf135f3ecabac77081ad0d7db02caeeb516aaa111d031bbea3e0fda05a295069a8c00d579ff23f140e99409155a",
69
-        "img\/closeconvpart.svg": "6253cc849d6322ff6395d3fe82106aeec1318f25e482b08db7407ef39ef7b02a3a6fef0916dade71c2f6f6238626a7a6edd11a4aaa266af478bd3c642856a3dc",
70
-        "img\/closewnd.svg": "38f6ba89d70905ab3d2c7d524fee42ce08f007622bb1256d04556cccdf40f549d39ab2fc455c878e6c318c03a8680d042c8e7d0dff9360a921e397e38567bf9a",
71
-        "img\/conversations.svg": "412ce4a14bb38b633ec0ff7d714c785f45f9153e0e5d77d04a051eb551e378374961e68255e124a2c5042a70d7c11fffce95631336529502503f920844d3c25c",
72
-        "img\/description.svg": "e024846cea431279325a17c92c964490a09e485cd3828f232cf69dc9c10233b7feda3c8bd0fb1500a0899fe356a2d7d7df9bd18a88bfb4076296f10181097b1b",
73
-        "img\/description_added.svg": "35e922d182e98be95edc056b3d2ff7eacd0443f49c294cbe7d0d3353284b590db1a7c4f72fb3505da4b2c65021074e41dff84473a88b0c92fa271675345bc49f",
74
-        "img\/dots.svg": "e4a46301c4b70f3820be8d6906ccec273a96edaaab44d7c133bb58f5499f2fc6381f2029c27d0393e3d31e1cf10bc55ee98f05347fa6af3533cc74290d9bb909",
75
-        "img\/filter_blue.svg": "740f464212882e0f785ecefceb3954ac836ffaff5e77d1cad83d1296c88fa469eafc1241a111a48d720124cc94ccc362ecf2da4121613e6a512f596057506df8",
76
-        "img\/filter_icon.svg": "5258d0d0e3677c10a8ae5d8cc37318855e5a6d5071d5a61ee6d29aad7109292502d60571f2c5ae716295dd8f93a327c060ec7c65f2f9cbfee4b85086682a385e",
77
-        "img\/flag_empty.svg": "a009b1228f4b504fc1e72b33a06ae0c8f1173b011c03bb5051409f8d732b5c51fc97158e234b2ca29e58522ce84931b925a6b710bf7d25240fbad4375f252748",
78
-        "img\/flag_red.svg": "1f3590d7a9fbe9f083970481af1cc4b945cfd0604fc91cd31da129aed67b1e6bb875f0e54221d217c6b3635446c291b7009c65b822a00779752ce6a30cebcadf",
79
-        "img\/garbage.svg": "b76cde0659b7f127a810406d2b734f03871e3a7c8bc53acb723c2a97fa6ca0801a26cfebd4ceaa28d2ad237a67a222e00aafaecaf7e749cc8e8f93ae35a4c4f3",
80
-        "img\/garbage_bright.svg": "45bbad63a659b6add876294f8aebda1cf03790b0c253ba442f04fd9677c1a35795eb823dbb92bbf38066e8cdf89fb34671763dabbcdad4722aba3ffcaa21581b",
81
-        "img\/garbage_grey.svg": "8b3f724edd0a1ac3e1161af3b37708bbd007aab58413c7e55f4f43abddea740b5a7956ce1f8c845bf99117f0f99716d6b5efdb7b221d92502ce4c89176345a80",
82
-        "img\/group.svg": "fbc10073fb9f5ac1780ccad2c61586512a922359b48ff76194bc5be2711ba99efcf9ce42a694e4cf1209dc78cf2bd077e12f98590c1fe1123260a23419cd256f",
83
-        "img\/incoming.svg": "c8f6e4c7e55c7fff5c74a87fe14e9f404fe5954a546949f148fd60cae7dd2e9165e883c34f1a3eb5500c12ae2bf281ab1607e04c4b75bd6322571ccf7e6ccc25",
84
-        "img\/list.svg": "2364a4ad93d0e4c85345a293f4f6b0e4135cbfb8b7b5e1ecd81d08affd0e0441439f9cd9e60da77eaa53052ef20cec20b49263e387b500c1fb4a3607b081e73f",
85
-        "img\/network.svg": "8778d56a1827da8787bf74704f1b296f4b882e04a1a36434e91dfee52f8f00925bdc72905de3b3833e3f79aa9f51d9a3cc7855aecade6892edf84a042668664f",
86
-        "img\/nextcloud_logo.svg": "4e0d3f0c371d668d83d443e5b1f69f0eedcc759092601d8fe8710dd97b16fd53aa3f9667bba7f305dc3aacfbc14e29b09b78da8b7bf6f41dcb83f5b16473991e",
87
-        "img\/nextcloud_logo_bright.svg": "aeab941556e29f9537508171583bb3309372866122c150c887c21d6a567c5aa06d2653db67c7151b064d4e2fa25f1fc63df21c786ede02ca5f40f12e5c1bad26",
88
-        "img\/outgoing.svg": "b5be7538df66570991b975b1fdca452144fdc27a14521dfb2ae4d0393d0f3b8abb6837458892e04adbdec0182ee3fd25ae33c6792457154dc2cab6e35bd6eb9e",
89
-        "img\/participants.svg": "83cf03ce7bda7cd15a87da78e5e4a8b7db674ff59ebd377cee909fc90b0cd746714123597d019e9b8ce208ce86f4fe03890c9c11b8e858b2e4e0f704aeaf165e",
90
-        "img\/participants_red.svg": "6a26e9d9a45d29f90e6ff335adf644310e55907d36af92cb7441babd76c826c6b31dfb3297465c42193caf450e1e84f8ae2f01a89cd8a58167a035ccc168e4c5",
91
-        "img\/question.svg": "c2bb43256a2b8c43997dd6b40a2db8c811e3a2a28a0ebc11c8e87d71c21b8cfea3367a39730e6675ca77c9ec6e9adb4bab65cee474c02276f905b4477e28b1bf",
92
-        "img\/received_messages_on_mobile.png": "ead85cbf9d328caca3840dc3d92d2247f744ac002c3628750e096aaca8ec865a56cd0d77a38c5e46c7f440ebdda0256c2e1dafdd78c6ee883f462f37f9c66900",
93
-        "img\/refresh.svg": "a95a19645bbde5e2146a3ec669950bc6029bfc6104886552eaeb4746733657ecbe4f9199e676ee2e9852ef0c5adb612d93e300e3fa9713fc611e1f8e7c1d5183",
94
-        "img\/reply.svg": "6c603311ec3fdb28314cb8c8477ec491e4d5b04ebc71f3f68409ff80b97fab8397c34a5d576c369cadfbe4bec7cd1fb177ee4963bc9bfca376126979afbadb42",
95
-        "img\/reply_to_message_on_mobile.png": "5b5b3ad0a668b15418c37d0832b1c252125006664d60fc58928bb7ce789fe6afb6a046bdf6c28a8b4e58d358d87f0880c8ac3b2e390bfad77d35f0970cf1d036",
96
-        "img\/sms_relentless.svg": "010ad7cee20f3a256a24bee2482b6798f042a3992c7df5d56ba803cca93552c3cda2a68d1772e67143ce45207b89d397e34ba6909f6b8515134db64e2c5497eb",
97
-        "img\/sms_relentless_dark.svg": "cbe97fe9fe636790ea0b415035cd78321ff53ec93ab1276d4ef609555592fa13d09b2037c20e06bbb9024fcfcc0ebb806c89572b08adcfe4ee9d06c6466b685a",
98
-        "img\/sms_relentless_delete_old_messages.png": "f8534ca040cd5e7d1bec0dcbd309742ff18e4cde8f978deaa2b50eeae8c810b1c4f605d941319e68353bb20a3b8fcf9e126d76e0b65a6176db530f8c2c9eae4a",
99
-        "img\/sms_relentless_exchanged_messages_popup.png": "7f64fb5e59222335a45fc93eb1ecf58e67635441d7768ecf3939dbee2ff3cb55f3e0f4c1b4e6b6e38744d86be65609ceca3e839538f185e62d98601218e16ee8",
100
-        "img\/sms_relentless_filter_messages_by_date_and_keyword.png": "d61047f211bfd6f51bb4222ec68fd13ec69af764964461f6e24194d99fab49c74c7e80c411c9be52f52e83357963a49fd7b2c0abe53dd60a145e5ef10993da26",
101
-        "img\/sms_relentless_grey.svg": "ffac810d151f22067a4ce4985b6c84ec6f6bbf7f1c0a8711ad4a374b838251d3681edfa8439e18c1fcb78160fcdfa20d4f08527a594c5080938aa611991acb2e",
102
-        "img\/sms_relentless_grouped_by_number.png": "fb34074ffba14dab82d4549162b4a447638c702b5e6c496f4bb7015b5456dbb2de919ec5c467c973f3299ef49b11e239a4ba4a7e78c4f306f49f11b6d78c19cd",
103
-        "img\/sms_relentless_logo.png": "bcc8bc7301aa9c4811ee875b5deb4ed21d9c7eca187970643962f0ae11a7483adc5257e26b307c41644dfef63ec82c4e61a221f133c62827e1d4418928c253c5",
104
-        "img\/sms_relentless_messages_to_from_popup.png": "a465c0c318bef7600610c345d3f88beee50bcfffa7b11986b1a8030f98797d73ab25f4eb1c773562566c0e0e02b69048f927a6da2a99e638f3ac09368b0ee0bb",
105
-        "img\/sms_relentless_on_mobile.png": "dcf7c74ed512afb2f296b675c4c6008bbab511ea77150cde4523eff16fce8a4fe67da9bc1adbd76ed0e9e3f27589ec900edc936ee7c3a9ac5be0b1720ed8b3ea",
106
-        "img\/sms_relentless_received_messages.png": "c661692d3f1a766aac5e453a387f5d72cf374691010790f80087f35e78152652e963b937ff9f74bafc3513ae56561e4bae5409b5711cdd792aa09a10b7d17355",
107
-        "img\/sms_relentless_send_mass_sms.png": "277796f41a62a36683d9fc8f3b125dee29114be6e2cf6544c5023219c032f8ed2667ce02543b7550c0c72ccfc29f54d4a5e6d41d47c3dcbfa38eb8a48072c779",
108
-        "img\/sms_relentless_send_mms.png": "af7fa40084cb677f72f940585550c0a3515bec5989df70b56ed6e3a99d894b2fbc2a1faeb31135f897520d478f6aeb39ed5c3632a2375f4d8ca23a2b65a07474",
109
-        "img\/sms_relentless_send_sms.png": "75955a572f44c24c5e35a556de66d60f7af356d8c5b3a95134dc9165143326d285c4ec42a8154cc017fd4020d44a7df911461f00d2f3514cb2bbb6e519b206de",
110
-        "img\/sms_relentless_sent_messages.png": "ed145791dabad6478c05a9aa3a396e7a3422f64d90143b49a5df1a893f2279931df6945ba5b35b80291fd738066f4040dd468e4bee2acb630956af1d89c2a5ce",
111
-        "img\/tag.svg": "7c554ae1a7b31af214bff8429fcac39ea4218bf55a83846b53b695bfd2fed43859efa7aa99a7dd6b2389a904baddf54f09e171378b02d9aeca6d0bfb74632289",
112
-        "img\/tag_added.svg": "346f3b192dc194bc100614e6afd3958eb52f76f641b402674da4d0b7273262345a6bf0fad18f9962a0edde724af5c231933e3c5391a6fdf8150ef784087eed46",
113
-        "img\/unarchive.svg": "a278a8e54b20c462cbb283dac6f5ecaebf863b055b377d32bb77e8cd443cba4e961d147729ca737816df1e90afe0b28b6b551f88a4f5753f14c87eb35dc55005",
114
-        "img\/unarchive_red.svg": "331ca9e9e9d51b70bca279366d7481153a24130cb19fbd6a0fea72a425967c9167bbe575c0d54b88b76d83a533b9fc2737b019aaa75e12b781b5d2e0d1c103fb",
115
-        "img\/user-grey.svg": "1128d96d0a4281591140149de57924e014a1d709ab97d351100c901569bbabc8c8834caf1a5932408b7918997547c323b8b9f4f410e1f03a4eeb89045bd95ff8",
116
-        "img\/user.svg": "d69cf4ee448f7ba5d46fcee24895e8705c297f078d943ecee1ea242b470c5e89318a5eb077c81e9c2a656f903c4e869298cc2935cf05a4a5f79e295dbf86df60",
117
-        "js\/adminsettings.js": "62e06665c2f4f45006ce43d79e76c4dbe4bea8004e059d3eed2924d7eb6e0cf16ec65c14b55bcd517e8fe4a2c4db29511513dcea6d2ef81af401981776441dbd",
118
-        "js\/arrowup.js": "f7d5c5aa20b49cf936f88e8ba0d3dc8574481f842edf3867fc761ce4b20699604a66a611dbcf999f25c3122fdd2b97d5f7e84e090453fd8563067f9821044478",
119
-        "js\/deleteoldsms.js": "7f967d97186690b1bf07a36efa4af3b593ef53c0efcecfb61d125aa15d077d5a6e69c703e3a0c0784475c5985272459c1fa9865395f7689838ecb37eb1b84ee0",
120
-        "js\/sendsms.js": "ef2b36d542b0ed5b00effaab76add3057d6bc6f04952304b157c51351fefbb7ed4210d0c9250d7663f2b39949a98b4b7ddf57edcbf532f3679a8428dbb924577",
121
-        "js\/settings.js": "17145e18c5e36ff81809ff4bdb05b4a7bbab0d71a95d671b07ca81aba6b8bd07fa2d00edb2fc70fec7737bf525210dbbc00e4c47e25fb152a3f934fdf2a6c4a2",
122
-        "js\/showsmstables.js": "958a5f009dcaa0b7680c942006ad72466c56379ad110d8f5333641caf6b1ded182eaf0b7a3311ba9dafec0f860b35bbb528a85fbbcfd2fedad6b19c744e67085",
123
-        "js\/tiff.js": "0c20e8d4f9f602ef497a26a50d8fd253abd55cf53afb0699638264550e931aba9b5b41c1ab0fdabee064046aab13b921c8d6988d76048f6c9795bed5aaac8aa7",
124
-        "js\/tiff.min.js": "c35f67b587aab62db7a3de662779a7b3264d70f5f856142cae88eadd1b477e474977f2b8c5ab31c16be002cb7ca9b52282e6de533b6fd79a02e6d33815919cb4",
125
-        "l10n\/en_GB.js": "475318da15c9eb934c4891702695fd9b1c9e98539585d2324b6702af6adc4a1a6adcb0e1e353163d5816de63fbccb8a0f3f71f0f2ac03c203d1ad9eb8eb56d35",
126
-        "l10n\/en_GB.json": "acce76cc12e2305761858a524874d691e463395102253d654c92f53c58b2794d185505256386bb6bafe55e16e291971fb14ee5bf9bdc495d0868016e75de61ba",
127
-        "l10n\/en_US.js": "475318da15c9eb934c4891702695fd9b1c9e98539585d2324b6702af6adc4a1a6adcb0e1e353163d5816de63fbccb8a0f3f71f0f2ac03c203d1ad9eb8eb56d35",
128
-        "l10n\/en_US.json": "acce76cc12e2305761858a524874d691e463395102253d654c92f53c58b2794d185505256386bb6bafe55e16e291971fb14ee5bf9bdc495d0868016e75de61ba",
129
-        "lib\/AppConfig.php": "c52269913ee80151397520bbebe4f0c725526910ce18f8717ba1c8016a5f4dcdc9a6f9350bc56c8a6b607ea342ee0cbe0f65afd9f03c31902190c008f41c9672",
130
-        "lib\/AppInfo\/Application.php": "7a4b185c9d8c130f7d3d804cd92099d38925e37b910f8bc2c433e3f0156f5631e2f952c7ece34f25e7139391f03158f3df1a3f60662d28699ecfbd89965b8cc7",
131
-        "lib\/Controller\/AuthorApiController.php": "e2d372c0a323e0a916aa7e7c4252ec5854e5f23b27cb1b278b76d46b33e3247749873a08b8588de00af5dbe1a5f578247d94808fcf1b392f55db53afa60c5020",
132
-        "lib\/Controller\/PageController.php": "07da5883ea41b3f7993a3e358a03a3db592a30fa81ea1ed0f26a234fcc3824a243316b76824fb9a24f40304ae945c48118dd4bed1f0d2f6993e479ab2c1dcab6",
133
-        "lib\/Controller\/SmsrelentlessController.php": "9d189f221bfa268b59985ba42f04c3876c3d95ab0a9b2b72e0e1cbace5f7cb64df31b5e63a5a1ac6a28f5341c6fd49c6f3d932f8036511d8a57c00ac6bb1674a",
134
-        "lib\/Migration\/Version100Date20211106192148.php": "96b9793edf72598c0330aed9f0c6c27ebf02287bd84b6b7a0285fc784bdf6442b560bc5dd2e55b464bb384a24831ae17d7ea144b0896d9b11cb82a27fbf602ff",
135
-        "lib\/Migration\/Version106Date20220813144231.php": "33f1f2953e038350e37c670462cc79fa48ab3a72b595f5fce970fdcc6d7eefa3401722da4cc532c7114d0c8aab7fbf0281afb374a695d5c1c1b311c30f64c9b8",
136
-        "lib\/Migration\/Version108Date20220823132408.php": "5d94388496cd88cec1dbbe67a2e9d6ae6fd5db7ed42d4bc737710d3c51ad4d8ad29d53a62739e05e2986e2d4c96374f4660a53dd7b7808d30e44e5c605105971",
137
-        "lib\/Migration\/Version114Date20221202011625.php": "920ee001204afad537bf2b7dbdb7c78e95b4ad0c79f5f693bd56347a1df91045cd83348f99e2ad714df2a735cf1a1d85aeb385c675ef6e90eed26f18b0b7d344",
138
-        "lib\/Migration\/Version116Date20230508212745.php": "556137e5580eb33beffbf6198447581b71de677c2a2561508c0d7f2f51e3ab7ca9feb0715b994a2753616838ad732e01e6cacbcfb521eaf559fb40200f0594fd",
139
-        "lib\/Migration\/Version117Date20230509183517.php": "dd289fe9ed0947b1174390dbd921ee696b50af9bdb360585376a6d5334e390dbcae65833c13c332732309f8fbaf8d83d047df6accb8118c9e4fdde8370db7b18",
140
-        "lib\/Migration\/Version118Date20230509194216.php": "165c805c76bedec7f48811fb4a83685287daa07660cf369b952ed2dbd9a6c0bf1bee2b78d3642478acc37ebd597f0df7d9eb7035c047acfc69146b664afdd286",
141
-        "lib\/Migration\/Version120Date20230520072431.php": "322eda5d5112d5e52a466c91ba02c40f1e77231c627c155e00cf6a924fbe16b4d6cee69978b0b3789c5daa03dfdb3fbf0f33b42fd40811aa366c7a227db4c31e",
142
-        "lib\/Migration\/Version121Date20230523201743.php": "d4f5e1520213a4f0a1d74c6faa1da8a4988dacf8d3f3c7aa8bb932744789a366e1758e2a9be14c7768ca7114ac0e7588ad53b7a9ad6bc1a45da5ef22806126b4",
143
-        "lib\/Migration\/Version123Date20230524182156.php": "7bc033f8852ac9b79e15bea2e13421c603acfcc443304bd36cb0f015991a0816b90950e6b45a84ebe5e03e92c4604e3473dbc90bd72810166a6a20f97eec546c",
144
-        "lib\/Migration\/Version125Date20230603224815.php": "430f98229247d0ca7e3c96f44d810e84a04a9b971c42f645eaaad08b213ec87506b4253c013b47b4c06d7f595aad414a17e3a9078b0fac9c9ed0d980bc39b4d9",
145
-        "lib\/Migration\/Version133Date20240215094712.php": "a47381d134e326413d2b8214f602d0abe5de30f99107c3f68bc2959fa6a601426d1f3f8f5a40b2ec7e297de696234918aa96eee51dea504ea76dd9fb63926958",
146
-        "lib\/Migration\/Version134Date20240402032516.php": "0dd7ecee413ef1bfe1768a2fa795210100acb9234c447fb1a0fd80239e7949485d33f1509408a09425db9171bc18dc2ec94989bb6160337078ae60c2e2fff732",
147
-        "lib\/Notification\/Notifier.php": "87389f3cc99cd6e54357f7659cea534bddbefb9912150ccc9c38ee71606aed37831bae0dad3670156813ce50493dff9b2e7a4d838dac043bf9c7844879dd9f44",
148
-        "lib\/Service\/SmsrelentlessService.php": "36a394e7c6c30df1bbbff687da31e3732bcb0f64960138cbacce488a011299130bb3c952cf4d3cc975f4baf53c1c47b2bc75b19c9266aac2abddc1d9bd8c4b3c",
149
-        "lib\/Settings\/Admin.php": "e4e5f6e8fc5748b11c90b676326dc228fbc52fe1f77a07e7b7460c6dbf2a8013b5e0b0f9084aac3f941478ae6ae75c47be17df3d229d8a998363b9a1d289f405",
150
-        "lib\/Settings\/AdminSection.php": "1c8fb26e8347d67c69af385b0aa33be2764135a4672b872b6c6d41bef3eac6733ca2796c393c8ff334ff56accd7ed4d4c38ca50baff2360d8d8be02b9f8a7c08",
151
-        "lib\/Settings\/Personal.php": "db6fc80342c865841edcae7d2cce5e50d04473a9ac47e26c2daabce493bbb1bbb922bbe9eb7353d759965506dbf1b4c99ce8e9c93f5c43769e1064cba19f95dd",
152
-        "lib\/Settings\/PersonalSection.php": "e65e1a8939e3818e7cd295ce86581a603b1e2fedb732ce51ed1fce62cb61ebae9b93742b1d923f08e14cdc6bd5cf2818d47917321e0aa1736932830c05a81682",
153
-        "providers\/Flowroute\/readme.txt": "25f08fea0f30105e850dbf07bb7a9351e47883640dd87d26981cf50f02ab5af8ef59dbd1fbe5e4127c0e019e13ce036f9414401b9d3f3a924c4125c291e53446",
154
-        "providers\/Plivo\/composer.json": "2d8def5ce9444d4bfe4ff32e008e6aeec924efd40e0cb61f3a72585fc4cf89e7b62970e796d56ebdd5d2f6378f39d3ad540ffdd02c31e2c4daae9b760482619e",
155
-        "providers\/Plivo\/composer.lock": "d9a2b89de334156eaded5ca4cdaee9b53c05e5d78584faf000a141692225a1bf6a1dd9ea6259bee2158ca7669c4000b3c366703fcd1f55a835278aa9f653c7c1",
156
-        "providers\/Plivo\/vendor\/autoload.php": "597387bcc320be22e8b0060c456fc745d8e3fbb06cd1cfbdf093b0ee52aa30cb7e4c31d6d8c38450f52387c0cd5f9d0483e3976611d96f391f5651b71d2095fc",
157
-        "providers\/Plivo\/vendor\/composer\/ClassLoader.php": "2b6fa585122ace1ba816410acbd8372cb75329917aae6363dbad48e396cca581452616e1386a2e445a8fbb0e461b988279103f4f89adf704bce7726f761abf0e",
158
-        "providers\/Plivo\/vendor\/composer\/InstalledVersions.php": "62b61a5303337c975905fa55addb6b1157034fecaa5fb3b5bad251ef7fa1b1ba840308f64fd2e1244d2098b7f87431e35939a153298530cdbd82f81b99cabaa2",
159
-        "providers\/Plivo\/vendor\/composer\/LICENSE": "f3bb64009f41a425df5a9bbab53490f0eb9b74fa8d6aaa2f57efb928edc4ffff330260666edeaa04a91fed708c3663371cf01b284f3a08d6698aaef7a23f355a",
160
-        "providers\/Plivo\/vendor\/composer\/autoload_classmap.php": "1844f7843fdaabef42d1d9e4c09f92f51a5ad45b26d44b34a2aa9202a183489239a0f5ee6502f302b169ccfa3a4bea7308771ca02d3bad96095b5b2194a65377",
161
-        "providers\/Plivo\/vendor\/composer\/autoload_files.php": "c0eaa5b28b83539deb67f24a98ebff5ac0483f9117a72d5cbba02e26f1f18cd4c93ebc23786047ee61eeef11961c55ae6cd4d4096a16f18a19d2af49a47820bb",
162
-        "providers\/Plivo\/vendor\/composer\/autoload_namespaces.php": "0ac6bde683c053d62b7024686ecced083ca1a326d5346a248b1a058ac74a5af71d515d311ce76df799a518027f734b80b9e7f6e8022a9556c0f24ce90240d822",
163
-        "providers\/Plivo\/vendor\/composer\/autoload_psr4.php": "91bffab80b2ba961f206bf3008a7380f81b7cac7b09afe4bcd2d4787d8b4c839ffe2a67442e04010918631b1c76b66304e7d7bce76371e741b444f2ef527355f",
164
-        "providers\/Plivo\/vendor\/composer\/autoload_real.php": "2ff5b7a817e3acbf585fe506b11345f6f3ab0f21c0ee96c67037f09de6130126d4c0e728ea22508192787a451322369197610726f96f32a12f91b7e48cee86a1",
165
-        "providers\/Plivo\/vendor\/composer\/autoload_static.php": "4fdf5e58875a6dc6bab4aafefd254cf3504f78feecdeda5fb431a56f84b37d2cf8fab8e233ecaadc2667f1be492ded264423f3200e1095aa507172b0dad3f60b",
166
-        "providers\/Plivo\/vendor\/composer\/installed.json": "0365a8c8cb376a0b3ca8cdf63147012435d2488c5ab585db3f9e0d926b588887992c1c8cfe07ac187f5f72afa9a3db936c6885d443db444147d7c87ff0f3084b",
167
-        "providers\/Plivo\/vendor\/composer\/installed.php": "923c151f9cca2fe9489aa4cfe04053d20e1923dfb388cc6aea2486557d77284fe6d9d2a77a7acd94496237465f03b712166a2f2f5837ab13bbb7f0aed8d52552",
168
-        "providers\/Plivo\/vendor\/composer\/platform_check.php": "49e79f2c7c1c32796dfef02f64feda4fc8fc5aa05197465fba579997d332cb9dfcad3511efbb34a32a2b2c8d8901be4ca39867026b2471fb17999ba840c3c340",
169
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/LICENSE": "6f6cbdccc57476f5386f5336c1efa105b4116760a329ae2fedb30fabe1f34f7c1a3073e7f711e07284c8b57b3b8ab6dcb38ba8d71f6835ac024ad524ad658f94",
170
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/README.md": "8f3226941b2d676aa31b66f5a38f6fa78a4073ec7ea6d6a3aaf0209072cbc8df2ebee65f64460e350f499f8448542443f9859db75f927fcbe70f1f59384e1a70",
171
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/composer.json": "82e17e8f606504476175a3c5116bff37c3d58faf5fbd9590cc4047f787b6aae79a84c660bf2e8dca453b998926dec84e6d5bca5d81b6817e09d99c6774cd04e3",
172
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/BeforeValidException.php": "8aac5fb14b6d94bcf048a1cd4935af09c25183e74eaad8f2db19902f1f017a33261707b12be8080d5a662bd01d997d4d5805cfcdf3127f447feb6ec6b971f563",
173
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/ExpiredException.php": "7cf0ec0dd02717f5152abf5c01979526fbb89f04c01802915745097c8606e432b41a4de5bf92b7cd1543b37a939ce8e133b7622f29cc48798c321654dfb94a3a",
174
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/JWK.php": "3f134e7503b44f882a92a699dc4cbb4d7415bb93526438e4395cbe877ab2da700d3ef7a8c037d7d2ffabb84e20165f93e338bb32c2bad9426e63708da4f842e3",
175
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/JWT.php": "9e5e21477b0495c3cc6fdff79d9b6acc136c0187d732cfa4ea438d9802be4642c2fe0e76b288238fa29bb0a8e37e31d57546d548519436dc49de467cfa704ed1",
176
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/SignatureInvalidException.php": "0c00a3a08bf4fc2eb675fe8ad3d8cb732a82a8f88d37dba5e510ec798a49342b8089098dfae1f1ef1906e62a4b8e465fb7b4c6d17c9c0d8e66ba33ab271e5c88",
177
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/CHANGELOG.md": "f99b50bf2d30b8e842d2db14a28068364b330b402db7bb1fe87fd4e1e3a9009edb05a519a4c35be68ba99c4c334680ff52ff0bebb84ab99de8814959d34e9c90",
178
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/LICENSE": "ed4199d68a412c0515450194549bac0c6a6d838b3950c036bff6c97457fade76fc914d11bf008321b3e2622ef0a3c14da0bee2f109529cfa5a5fdc11fc6452ae",
179
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/README.md": "dcb463420d7da1805c5cc020988f60c15fc5623a2493556ba4bba63d431c21f0584c1e65f27bf0a4c7962074aacf40d763981f878a10e12327cff9b89204ae57",
180
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/UPGRADING.md": "4f2540329c6e06bc0f05a574b0ce5d77ac3f7fa4032371665dce41a766cd28ee12a0b7803ca507faf005f6a3ec5107a60978b69a4fede8bc562333b736576f55",
181
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/composer.json": "8746b3c8b0fcf0ede926b6a60b4d34e7a3e0e9664aef67b34e7e238c25179d22ce599e8c4a580e9f3d73122a0c9b373b87526874c947878ab339e662b03c150d",
182
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/BodySummarizer.php": "649dbacf3be500e6171769c18b1eec1888bfe831dcef8464ebce4461d5fd337c60a200d3c89f9bd7c2714c0567e5e220b31ec2970e7a013f914123824ea324a8",
183
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/BodySummarizerInterface.php": "d0a1271ad03136dca5752c0dfaa7fa678c6fb03890be828780201cd9fbdc8169ff4fd7c17867cf82ef1672ecf0e9f871f682ade1a8ff37e7b84d24c572e1b962",
184
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Client.php": "8fc98c3490398476a81f660a0dda38306acedaab2f662f762881c11f98bab8b5194ea6c05477bfb2676848f54229087df8fac0e6aacec6499f2313e09b940ea4",
185
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/ClientInterface.php": "d1ab53fbb1b6695e6537050421b3a749a7b34b3184015da449a1c76987fd6944bcc1c4cca7247b98b338926af89fa477f9be4897e6316cefb2c1656520c3ea2d",
186
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/ClientTrait.php": "ec1e95b2f1c56e4443c6fcf695ede88e02f1129b7027287f968a0ef2f7debb7533ce2371a27b5ee07f78818786b0a6d1b3d2f8ce28f44f4a8f7e275bbd1b6727",
187
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/CookieJar.php": "3fa0964d59cbba956bb47fe103f02e4707a2a6ebe5a60dd5c33f59402a090b6f0110c2795b52f961f6ddf338567382e1248f1e27bf2d0e2033a43efd15e2705c",
188
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/CookieJarInterface.php": "a3c6b9138e285d6c6b7521dc7059a04e1c80bc0de7a925c93ecde6c95cb7fadab91ee05e9594d6b891872a557a1b98fc6717ca1d1d46e00992c9cdcdb934a71a",
189
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/FileCookieJar.php": "35111b9229059f54b537baec960b8480d5e3caf2961ca3e7e45de3fa5ad5bd0b0a91c2c4231f6386a4966bf9d97aa308a7e444000dae9b21f8c58b6832dee68b",
190
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/SessionCookieJar.php": "9cf11d2908913a7555e9e190e6a4ffb0f0e26ddb3d141faeb0e7bafaa6f0b3259119ce6febb6d01b5a7f5a3193f72a099f08ea45b5955bdc7120bfd4857879a6",
191
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/SetCookie.php": "7d6c4c14c9d652c27da23923cb577fa999e24f81c1b82f13fa329da3eda3373ba7a832b72d793d924fda9d6a3a02cb39db97e49e17feab3ecc93f395e614d44b",
192
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/BadResponseException.php": "4b7a572e9796b8043d56dc6650709e59bde237b3bacab1206b807485cc850ec99dde86892696d73121c345f1c88a9d2e879dc91be2cd438defe2609e521011b4",
193
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/ClientException.php": "0011418b0cd07eff70f99645a008c30e9a6a90b9ec396e8cf70ffc281140054bf313eba40d97ed34b59e04e5fd6712330d34268353493d112b8029c1c42e5046",
194
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/ConnectException.php": "bca929720f3f8f4484899b18b40f5d4d40ebc4105b316679a9349b97200c74ad2ae6408e2362b4639bcc4a3150fe63ca1e08bc1b159c51744d76466c41203c83",
195
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/GuzzleException.php": "444ae2d2847cc99d9a3895e2d23f0abe59bf0eae279809f7a4983e34098ee0a0ad7408d251df821c4029621060aff1ea0dc890615535ea4368e5796151a767cb",
196
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/InvalidArgumentException.php": "2647ca6c297960b01b29435db7522ece3a997def6b3af71e26113abd43ca4493501c130e7767b845db0e723f9955164ce33664d49bd67a45bd29d270a66e0e3b",
197
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/RequestException.php": "b0b3163e4eb96ace90c03faf9406b89ae21c7cd5fcabe78035d5d9e1e7ba0ff72bcf31b877ce2d5cd38e940cf0ead52659c3637dfa3567745fb46a11cc9de31a",
198
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/ServerException.php": "9cab599fd913d8f0bb1b8f448932ae0b5c5b1cd7d83fc4e1e4c13fec29b0a849a5385a6c40183b8dc58404ed020227b9ea4483ac89d135c6c82e4c7985604044",
199
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/TooManyRedirectsException.php": "99c4e6f908a5dc03939ca083232cf48cecd742616e00839ae25ca173ec458e6da10be2690b98588b76e0f3c24ee7f35c09ed5c848f9348c639c414aecedf6c2d",
200
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/TransferException.php": "665600a8617328454b70a43fbb72c81ea196584dc22e10324b3c861974aa55ff5867b30b86a65123f1bd4fece75049a9f6c4bfeef5410a9f29913d350358178b",
201
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php": "1dd7a848ab73a8db9354fa2f0461a995320ccb677b29464812a484730a85f405d8b6c9b39783881b299328cb8f99e67b9d959b00672bf60a4559b136fdae8119",
202
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactoryInterface.php": "0d063ee120e0ff6042a58d29b109bf6573494d427e20184a4d448ef31fe0cb0cedd60bb47c7289d5f6e1027413a28f9f57921823605d4f11086da5c9be8c0902",
203
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlHandler.php": "ae0388a0146bd0cfff1c597570f58acec92876d3d01298e1988dabc717ffd76895b45359cafd7bbc62ca1fb5e7e96fdab70697a2cb469c8c5d0298aef12e44e9",
204
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlMultiHandler.php": "d03d4a374657d671554d06e5622eef0d1b06d0a39a9167ec6f894ee28af31defe1d4306f937376cf5997c1421643e08e757880e45a1c9c10959c967022160f96",
205
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/EasyHandle.php": "7438c054921687fcc4bea6ef6b49aae15651a95cced2cf73ffe46bb15abdf924afdd4784e8d2121ca851934fafce69d3661f1a792e6f2352cc5f5c1803ace3de",
206
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/MockHandler.php": "0d8e2e43e0b8079f20de6b86c241afdc83bb5bcdc5a91ac47084ffdf2a3904a79e5db6fbafa4715785ded8fb90dd8fc418aa05bc0fa8c52220555720f81e827e",
207
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php": "9caf11da430da351eff6e9be0a1e8e029bce41283a6d8215e2215d6abbd3f021018564d1e6717f65f280703d5e4dab78a2b522042d63c5a9cfd019b0bb0aa4f9",
208
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/StreamHandler.php": "e45738ddf123fa57df229fccc94622b9a2ad5dd9bf6f65d24756239b587937bac9b7a37220e65c55f2abbd7159bc16ac785893d4aac5c192e6422af4fc4f1222",
209
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/HandlerStack.php": "900b9df966c3c1f3aadc45bd42a81e8ab153c74d0eb90cb3c8b2f9d46115353f45e5bcaf0eaba1281ab98dffb3d136a0c0fa0058fe73d906eebb741b273c150a",
210
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/MessageFormatter.php": "99460bb55080cbc7e08eb6f1b3c8abc71c38cd5d6e04422bdf8144ca554e7d7de29fc5d5dbf7aab5f7440c4ec9d779d684f8194f90139a1ece1bb086f14e3cc5",
211
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/MessageFormatterInterface.php": "609462659ab00682e7fdd1bb56aed5ad3cf54a2ee3b641623175b9dca0136b4e1cbd3cb0541526ed86d05174a18a9333ba52a9e50f4c05ece55cdc636815e385",
212
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Middleware.php": "42fea3a5bff7eb363a7af1f85a21a9322aee8d7e343295209815739f8bbd5dc372f14e3e8c5454f7650a3b9d802ca25fa069d64fa16b0f5d4d48c3d626ba3527",
213
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Pool.php": "a6d17779976754d7c16127680ae32f8e45ed54c3ef4a2a6364a1e4100ce732b8494b2848977ba6b2bf6fd296d7a54b30a2f021cba5a88ddd0d1e0f3a3712b9cd",
214
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php": "268182133f0e484b56fa23193d20def23166eeabcc2fd9626b17cbc20188d76549adaa4c768df695b787d31b2eb26a5316f0a3531ad3ed022aaddf0574fc2ac8",
215
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php": "38bbd75b92a6764b0502cea113e222d5cce7abe53c7ea0c01e441fbbb6b0514f2f54388ff14d459ed611925eaf9b48c0aee1b1fb41892d07d1b260734a1d2afb",
216
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/RequestOptions.php": "239e524c17dadb296efbd8b9ba82b94ddfcd90c83377fe4bf2890dae5dbc62f58032205274575f14bb2e745112ee59bb559936b992d9a227dec00f5b2e32c03d",
217
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/RetryMiddleware.php": "01236bb2265c0761148ccdda7d3668c10f9539119bcdcc36f10d077ca32013ca0169938d6f4bd0703018f38fac53b2bd34e873a07d8e5287c26fb64b7284dfe8",
218
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/TransferStats.php": "4fe882f7f801ba55a3934e00d81aef09edd092eadef498f3bb424f7f32dc8d568940806a9d8e80b1b6c768cffd41ecf0814a0bb366195b2400f08a8e310a8c19",
219
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Utils.php": "c3e52199a0a1755f52b6902b78d008de10e33ff8b93242a709d7a12e8c05c1c2c09c2874439606f0f3ce6b353bbe3b8ac385a236307b428fbccc078e1959c7c1",
220
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/functions.php": "f45c62cbff0de0255f4f149ee3e93c52bdae44492d43c9314a48d8a793ef028f8a8f704a2b28c5b84491687c3b682e9f85c4ea61bf63de56c6cc6a4ba8081ae8",
221
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/functions_include.php": "058a92f735b5848dc18be383478bd1659a0b578beba1dce5a1ef3b7a0b6b5f643e2f222dd72ed09ec72e8a5c5c9fae9757979f7c4016c5654bcce9d7dfd42d37",
222
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/.php_cs.dist": "4d42019074dff2a1a5bebfa51568de254e5128b88ad309bbed5e8348ef213035cf3a4da66ae6753354a0dcf6ccc0001bfafa2453028bffb3548f2ede26c30177",
223
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/CHANGELOG.md": "0c021cdbfea029de4a20511445e64d0d6c35400025f1361cc913754adce9b2dc16efeac12cbdd489ffcbb76e95f91108dcc557fb9dfdacc99e5bb98f20b55b43",
224
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/LICENSE": "9699a00cb2c5ebf932515e1232b83f79c944f8100881df096de09e25222fa01173bf24d9e083db7d9605d1e4f5dfa14c726aed52c0fc2499643714a9e64c4cc5",
225
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/Makefile": "a350f48cbb68a05cd07f787522193851f9cdc6b2643e34eb502fe261387d97e5ceb8499a22b20ff2fec5d7352ff239a952fa3b129ba3407fae871683d65e9bbe",
226
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/README.md": "1ea705deca28d726cc65d0f55db886545b9f5309ccc085bb482f627a0ddb5f8609d6635f65686e3e26b9a23cb8bf03b3e8d02a26d25eaf8195dc6c2cc93be0bf",
227
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/composer.json": "74a66451bfa422f886266ff300b4ca5f7b0ed62199293635671718caced457f6eab5b8c9467f24e999762f56368fb35742dc0adaa35a233d32c72783112a6c50",
228
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/phpstan-baseline.neon": "916bcb7d298578dfc4770a3c49ee558eef9a20dbff8e3d097506379c8680917b08a8f96f2b59d96b1b56b1ccf4a5478c868a2da504a1935956db70f51528494f",
229
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/phpstan.neon.dist": "ddfcf700a47b916ed1072c979f13d6d51327c9bc389c49ad264ba23279b01151b90aaeef0a81a13eafd40115d407ceaf471c20a61b47f1b4796f8adf3c1ad218",
230
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/psalm.xml": "52c09c8b7daf6d90db16a5ce50b7a8ce15c1ffa02265fd1d4b117cf717331475245bfd4f2dc45d3990d67333988a11081e13ebf783bca8854a1df9c1b0cc9cfa",
231
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/AggregateException.php": "97b6e46aa16ad26a2b714129b83d933cba02ec7afcda514ef67c5027cf5b9b93a5d7cbc72560307adf294179a4d7b86a6da9caa835bcf5be17e398501bb88fba",
232
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/CancellationException.php": "b958ade84fa4e6c7a7efed66dfb6a7f83b9743a9ac6581276eb99bcab667ebcdfea92a9bb114d086c5831d26abf7f6ec3e03254067e2b29abaec995e28cbce8d",
233
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Coroutine.php": "d1c789e47536cf8c9db52acf791bc6de0d61790856a78f0cf6a9c98a1628d2c42cdf9e5e94e05fea802a099bd3ae3c65b790f2fb5a342bd130654c4cfb4fcf07",
234
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Create.php": "a3651bfb1f458675c58397460c8534c2819404fc89422467f119de4cd80147177e462a9965bde6a75e74e4354c3c6935cebe1891e6a53a1bb26383f22e9dbccc",
235
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Each.php": "e57ea03f69e1680b56676ca1057e8defe7eaefeffb456b636f3cb32295eb6be36073c7a9a621f656c40d5661c0fbfaa3a632961d82ec7f116ab7fb5aa9db196a",
236
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/EachPromise.php": "c7d79757cca80b7352ffd12a6743a515255e4a89764f65067035b16fe39c09b6dabb833aec3fad3cb741aefd778f620202caf79e98b86095c6b252f4e555bbcd",
237
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/FulfilledPromise.php": "952eac7f7cc150394dedb72ac97e624db8156ecd41c8afc382ed0cf8e4c2c6c94879b7ddf6ff76608c6a95ef30ee136f44fa03ab9f5ce4b7fa01bcd0c7e7574f",
238
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Is.php": "894b3c475b5a828e442745507fae4b35bf394fc9fc93905258f9736a67112c321b1f3e353f8f3fb84e8778bff67bd9d27a6fd5ab6dab3218a30d82b8fd14ae0a",
239
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Promise.php": "bbfba94124c36b87941e1548162708a5543f156d64a8f465f78397a02bdc34c764b60f73d5e77a3a2e48727f4cbd91f60b9c1cd47c0fe205994c4ffdadb99c5c",
240
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/PromiseInterface.php": "8d8d1d9e04d75ceb6d3e656794fa93170a3b1f9c2dd3b53ba6b4dd3e599f880599cab0b1ec15eaedc1b26d09d6c535dc9fe92802ea8ab1ed5927ee8cda7cb9b3",
241
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/PromisorInterface.php": "1058176a68078d02c288528673176648e38d2b8093e67b0984d73ebc710c0bda7019689303b1f064726cbbfc9382e733443e9d5443a77715ba40bb798ac79e04",
242
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/RejectedPromise.php": "53914a46ca238b8d079333f9c71180aed015a77bf765cd2793790dde21fa7fcf67dcedc5c797a1d7caa06d788bd9631628712861b1185f3cef9aa63260aff0cd",
243
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/RejectionException.php": "6dae5e0b0b47538e5c94a3d4890623e3ec41be8198a1d00ca84d77f32b9d074cae13e25ea90e2af614e802aa28271def466e5ab623c187df49425cdfc5bc05f3",
244
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/TaskQueue.php": "431a73762758dd08406a41587115a11e61f921cc01997ea71efd803b2e3882b9cb7f6d89694e06ecd2992f2bffa38ba55d631dba7fabfce3b84d68dd4913a02f",
245
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/TaskQueueInterface.php": "f0b2b36ffb75337c590f82d3d7d19a4caa4eecd6003c0bec7ef935604dfe35f4e960f49da7115b3b3cf65c61d04bdf258310ae1b4f4b6cff4eb09f52626adc11",
246
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Utils.php": "9bb1eebf4d0f43bc47cda6f70f08b3fde962355075bb87d40ec75d41b552c262a79023a72e2e8d776b6d0db1ef1d412e398ae16d96476aa5c72afbdab9d5a9fc",
247
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/functions.php": "b756c2bce2557e9c6b8db2ebfb026354418c93f54169d1e9249478532bb02e1062c30e14060a3bae195098c74deb4f7580943aca944a162615c44139acfa7861",
248
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/functions_include.php": "17063296fca8aa655e7d5267abcf04051cd58fab5a7ff02530e1becb5002306252d5ec55c82461cc51f62c881c51dd80da53ed9d90640b6d0dd56d5e8f819022",
249
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/CHANGELOG.md": "0540da857957565d77741b846932c739e0883751660d561b2a0990a7cec8188573c2d31400cf9f125d1b6eab482455d19f30a8363354341e3c54088a0c418e7a",
250
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/LICENSE": "5d25479f1c9c0b802e2944e029d7011f9b9d3f7b37f7c12eb77321ba448414f79b0b254c0846d2e5e1b8826bed85d7c377803a4ad5d5afb288f220c761822043",
251
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/README.md": "b9759cedfe2199b2477e95fc0770f35ed6a4a18c6e6b4b4e30a20f75945505dcc76834e20e61e3aed90fd790c677536bb43f593de8a68558a200000eca8d0bdc",
252
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/composer.json": "27ad0b2937068e201fd0312a7dcfba706a8a318ca4e09d80f29611803bfb28d48433ba5f2b452da8bd76fdfe2b9f073f81f2e2cd6fc3e4223b20637408f6c836",
253
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/AppendStream.php": "d94d352d6f640589e84fe2aae0bd20880c4d6e897a29a47d4dffe6aed4d852fd5df274db2e68124c7f15b84d6f4fc684873fd03d003db39caa61b024b053e396",
254
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/BufferStream.php": "eee7de67e107fb33e8f97949743726a30e8201fd874490fc93870a410b1e0e3a059b75dda972b3a844b8c739b9b768a73d65c61bf8030589d0d787aa26f70e8e",
255
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/CachingStream.php": "e9b1e3d5e2bfae610677b9d216643be7b2e8b97cf661bc5c67631f994df0dc88a9a9ac7bb9dd68fcfd2ed343cadbbae227a8a46baa3b732733497e24f1338be7",
256
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/DroppingStream.php": "63db37354a2eba98b768f0929ee9a4ffbce1647a79cc9aee5e994cb693e53cfdb9f7a0fc4c32b68b46c64b39438b1c53a30532f5f8fb442f07062a6b4861e39e",
257
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/FnStream.php": "bd25e2ca8ea196a5e876c5b9d01c6f2a27b206f7ba05d047cb46476c52191a594f1280c7435b6429e4ea411fe5fc01a2388e213df26d27c5ae5094a0d0f2d619",
258
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Header.php": "27014466522ffca93b4a3da6e96a5e8501f11691f7642a2e5091f3d0c1b146789ea41fd7fa1e3948f264926e7b764b557b1b564a95a7b5cd56c17c8ddfb6b7d1",
259
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/InflateStream.php": "e19b69eb2f1d2f8782f7285414095ea810f746d02a447badef5ec7185623235f17f5689682b185ba124e71a19b0dcf3d36b64894d183e25edf27f1d1e34c1c0f",
260
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/LazyOpenStream.php": "8c262a2c574767d61a9eb084d6848bef77d047601ec5688a90fbc012d5349d9b4ea188444fe509c8ffbcbf6ecdfd839a461505ed3746b6e1c5283860f7fd4a2d",
261
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/LimitStream.php": "81a43b1ec261207c1a52faac2c5099a429e43083bbe0c9099f447859d2ea12a45d30e7f0b5a994696084b3c59401bc28564685c432644caf6a9d8b9669404c91",
262
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Message.php": "4e9b857c226b57e2d2faea27643d6f213bba65bf158889a528fd684cf1acce6f480805d04da39a32fbd25be9fc51c4f1a3c1bbc9e92f3707fcf33a120b2aa256",
263
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/MessageTrait.php": "367bacfe383be2caeb0064fe80e5f6b138050dd4189bb65ff82d8f86d0b1b604090b61a2473d7e80c733c395cb893fa9eb2dad0a63a353c19da32e940a1de01a",
264
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/MimeType.php": "98467f19beca7d4239963d4d91a7896d44539c13a5c694c4aa8ec68f3b57031367d1cddff19fb51c389393cd1402a574c9afdc448766c8807228d726796d2e9c",
265
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/MultipartStream.php": "5bbb8f71ad1f2f421eac8c0d40c3a18372516e8ab8f2bb3f917871bec9aef0eafbef930902084aa3ca64a8ae930edb1f2befe1e6b49dec387ea239c5c475c099",
266
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/NoSeekStream.php": "f003ec01ce15f5dd56200396a84a2c94a1b134d320230983ef91efb1abc770827018894a1b8d1f3a68c2aa481e8f0bfbaec4c568d0b0fe251a61f76ee22efa38",
267
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/PumpStream.php": "15192b83cabf910107b30bde59197618e524aece85f9d396dcd8459174fe50a1cb82de51e5225b8e6ea64fbeec7b4d94f035bba2ed893efebb660105021fc98d",
268
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Query.php": "8ace1f141c08396103431803ed35e1bf247fdf7f7c7b727ca63e58a1cfdd7e353a6c266c8a7bdbb863e5d290414ea630bbe37f55f275cc5a5b946b794ce01740",
269
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Request.php": "e0582b7b304fddcd81a214bd8ecd4db301479eddec3084b18b822f5e22fbc9d1fe3f3d2f6ba52959619dfbd0e98db304b2400e67675fca41f470ca6126085da2",
270
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Response.php": "32524250d58fba5c152472ed37160a9aba92c586c9b2a6bc55f97134e490636189bc8708fd8ca4145478a5bb20ea51b5bc417fa8d61ab08fab3479a04c4506e2",
271
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Rfc7230.php": "beb2f85fd643c3cdb3c92b401c4df1385bc6fcddf7dfbfbed88396611438720a1b86ecb9b913472ca8edf1bd9782a3692b2138195fb366ac1b8a7f1b0b81d390",
272
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/ServerRequest.php": "f3fead87c83ce2f73b2890ec79cc620f319c59ebc41a041e4b70b38bb1e412c928fd7ff0f10d96fffed841cdc1ef2874d5ddb0e7cfbbad3ffa81ce7484365c05",
273
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Stream.php": "7d108ed410ba89cad35637f837d97f7ef53c43a4666d0502e3e7dc4aad06e7bc365f311961d2bb8768faf9d9c6d64d09e080aa9bc65638084a127e7a563acbbb",
274
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/StreamDecoratorTrait.php": "e1b90e1d97a4a1ed1eb1552bcaa9011f79733167b7e5e3f2af8cfdc54adf0d64a414ed630ec74418020fd8ecc7c75e43db6bbe0fdb9ec6d3ea928bd3bb3f4561",
275
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/StreamWrapper.php": "7ed1833a91a1f56b743172192b7ce4399928b261eddba6bdcdde958bbeedeadcaadff4fe5b3913dad0e4b2cd9346f47b43849cc65bbdb839c9d9e4b586638eef",
276
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/UploadedFile.php": "a66f1119bd7327a19315456f17ac2d3ecb40e564705d41047a91a02b431efcde1eab2750b2f354fd2f5c10c1ec1b5968e84e758d51210f011dafa8df5fb35c0c",
277
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Uri.php": "fc5c81c97687dcd34ebd18c6714479eb6b4d1c7d58963bf7f1f732eae98a04b094dd9c99d58f4bff265b2faf0629a456c391ab5b96534c927420f51a95dda637",
278
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/UriNormalizer.php": "8992ef486358f43df4a9567a6a232ad76883d9c7cacdc94707343e5465c857a4385739f66d0024136df94c59e60a5ccbf1850634a55f2cc1f56adddc717434e0",
279
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/UriResolver.php": "46e4c0ed24579ad9a0cf467141fda7dce6dd3a3d3281a1606261f322462d1b19bca413f3c5590b7ad42fda1fc57e60ba86d121b5af0c5b5a2ea21bbdf07f44fa",
280
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Utils.php": "be75312627f929b2ac94cd6d12972816a13660a40d25cf87f6fc7fb7af416316ba8988656147a16becfa8120ce2a484c84d9f399b43dea2cd3c7ed916f7d8302",
281
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/functions.php": "f31604b89969730b482cd03a13b1356ff9b91324eeaa9ec45a45f86be2bd52a8209cec55aa878d5875a3c82fadd86848d558789d0072e853505d644f0a2603ab",
282
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/functions_include.php": "5b85d1438039f778c454f67bfd3ff2933d06b1aa4bbf9dc516e385bd36cd749f7001de6278c5a1b4e3c5a7d280876d4d35337f87a0dcc6e521ccc20a3ddad1bb",
283
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/AUTHORS.md": "bd202fc574c862a7c3d4a27653605b6fa377823744a793a7848ddaa7001166fd645d6047892d79c8488786d82fee785b87b19e9af1d04512503eb195bd300aad",
284
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/CHANGELOG.md": "ef87f930b797ba0b32dec670491e021b5c881f6986624c1906d8f910e8393b37e6d7f5eb9f860c1bb8447ce61a206bca80db4b2279c57bb064a28be3d83690fd",
285
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/Jenkinsfile": "98d95e7185d040e9aea6e75118ec17ac34e38e17f8ad5a38d869ea02c0c9de5dd79d208a78da23ccb87444df7b7de827b314469027ee7573cc51423521786320",
286
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/LICENSE.txt": "0974968907abaaf61b640ece98a502e3c677b7cf734ccc82cb522b3e166c50eaccb189b4d31b03bdfe8e61a97b3ce06917a7ff5c7c60887e2ae944f909fb6e72",
287
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/README.md": "ddaea1367057ed09023311b6ce37938985c188fbbcb6867c6c3ddfbdb984b954e42fd6450d1e5cfe10374ddc4448f9b96d6130d465983d634ddb3c0b01a276a4",
288
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/ci\/config.yml": "d50e43de2ba68261ae35625f8ce984903baffc3c6535d31a7fb3c5efddd08f71cf0ec3aaf22ee9e17e93852dd99284b653b343a053ba50a45cf6716033131e3f",
289
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/composer.json": "c6b4f35c928d33d62b48139a8be5d85868fdcd0716380865f8dbe0f5a708600ad7dffb3ba510a45bf4a8002f7e1fbefb1c835de7e3e2d9b7c1cbddf9fa2b565d",
290
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Examples\/JWT.php": "ee8052cfd45be4eac77df60902c518a14bf2df07ae7218322493a8e2d115280b87c65f9637ca766a63d82dce36c7c78e894984dc83031a9b7a8d5a6345d38214",
291
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Examples\/Phlo.php": "f9d6482c51987aaa3d7f0db59cd45030e17284262681866999309205161094d96a55a39dd2898d0b7980074d764e1bde6cb6ad1f50be8a40cc9d557431c1bf91",
292
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Examples\/SSML.php": "932a827eedcd81956c275529815a2f7542636b0cb887fcf182648e8f972006f6ba8ea4a763b3de48aac989f26a5e44752c7d3a62df256ee2b6a1c922de677e14",
293
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Authentication\/BasicAuth.php": "42c036c38225556834ad5cb916db0c4783c7127909053ef623e7f71aa51c9fc968b9523fe5dcdaebee769cecdb0c4c76215116cbf5959b268c8792fa96754531",
294
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/BaseClient.php": "029f2be5a3c7734b5030b4fa96e0d7c0c1252bb7b30b9f001a78abaa646d6d3821a127859e5d170ea5e3c7f5c86d06112f28152c5cb2315f94dbccd318f9e5e0",
295
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoAuthenticationException.php": "7ee7458999adea1ab1722358f669467cb35265eb616ef2eb16e6bc3d42a7f3c2fcb0b42655df8f4f21127bfecded765bcb479a6923dbf1a184e00f6e26321ab4",
296
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoNotFoundException.php": "bf54dd70534e988c27d5e7d17bf8edf9dc65191b77677d9ffbf95ae3bd019f1ba368065e82440e04f9a0d7045cd62b5915943273b5d8d72ba01676ebf2975edb",
297
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoRequestException.php": "6655a36e42e700283235b84889088e378bab6861ae98ea99c20bde017ed39b83dc743e5c166e8129b9910a434b119578b23523fdfd5e9e1dcf3d57c5cf9375ef",
298
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoResponseException.php": "4f18628f90b1c5142446f0e394d5071a91995baec240344a1afa47687ae463cdc3dd18a79008813077a3511c1b00dff7a8715d26990afcb6f9726598c96822f3",
299
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoRestException.php": "758babb40ea45fb50dafe5231605196214736f014860618af9ca7161157255cdf20c5b0bf534f6f6b30a4f9bf612b5ff5edd2f7adc45553ef12555354f82c15a",
300
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoServerException.php": "b2b8f6d1d03a720885ce5718b1c80bc75c7f483f72a1d2d2313b98a37e152ca78bb688f7923f025563517a52de7e915325cf86e463a2083c30ca2473446b91c6",
301
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoValidationException.php": "5faec3f351037d6affa710c10f733c57a7919cb04820f93ef0c19f75b2f2b2b8ae1a0d004c216673977539b713ca31475f233fdd21698a390319364d2b9a4ba3",
302
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoXMLException.php": "a66429863ac7caad7e0d77f7a1fc105fea0a45e7eecb753e64bfd5a76c89b5eb06e4228bd63a78134090774458a646e10a11417855d3e72b2a6fd75aa754c625",
303
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Http\/PlivoRequest.php": "3fa26ce55e1b201dbe78e4bf3615f8c38d9e6c4e96e5b3673f6cf7985bc4055b88f227677273189381bd29076ae5e8baba6c0cef4bd612f2ff8fbd2847b6c129",
304
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Http\/PlivoResponse.php": "3f9f1ce15ef75db2e028f198d1bb337c37f31fa6dc7e5b985ad589f6a4dd7d873e3dae968b80f5e1eb6056b4bd00e1a4df4d54242206861302f9d6263d177bbe",
305
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/HttpClients\/HttpClientsFactory.php": "a9fbd6c007260fc2169648c9c764ff7b5988af0874b21211f8e85e8a995897d597cbc0c9fce4ec5c8d60a901ea05c5a8cd70684c2302ea17bff528ac674ea578",
306
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/HttpClients\/PlivoGuzzleHttpClient.php": "dc661dc489b30bfa98e0d75f04147d164ad953e7dc51326a20fa94846fe30afff07ce92958c27a9bce9fd15371543852c0be4c24031cf382b54403a0901189ce",
307
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/HttpClients\/PlivoHttpClientInterface.php": "61a18efcb4383bea7598ad9167ffe49a73e295d2ed3229c015f9a5ea08b00362005df1388cf6846f1c331b123b187290a1651341c76ce2cd4233926c927b6e9c",
308
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/MessageClient.php": "f96e09d05b71a2e0b6675300132634f5664026bbb84472a1e7ca5f72b679390170ed5aa0d4e21a4dd1bc646cf0267f0f9240c931657f7cca9b2bdea501586d26",
309
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/Account.php": "22bf526a376e6045fe9045ef4eaef52c769ceb8a7c3ef11902e66acdbb673fa521f70f446e6724155c8499cc700a6cf4f4d435ed06d81baab69f638cb15651ef",
310
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/AccountInterface.php": "5093f51c3803de918f3a500f1754f47a3dbf990008804c07e543da253a22641b96ca2ae5faa7e6800cfa10a41f7d407e5d29e9907c0970a9183a8795be9f7543",
311
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/Address\/Address.php": "7ba3e1e7e136d43989fa0449b29882d78fcea39cb764e54228c7a4a899d5ce4db2deae9d9ff9ed5cc53a8af72f98c55914c10be3dbb7b9a354b8a06e17cce829",
312
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/Address\/AddressInterface.php": "36182073184f67cb024e0c020307d4d74c8b5c65e3ac7affcb76e189c91af9750c318404d8ba3a5a6e104d64459c59c80d7a944395796f0f5aaad18d43d93720",
313
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/Application.php": "9431715557954e8ac1cc340f3f568a6eddd6e00a0ff0356154b2778b118f620d0afad3979e79eef0a583b313256fdd018516cc8128a441dc667b39668b6f506b",
314
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/ApplicationCreateResponse.php": "cb1167e6057eb71e102d55ad2ac3cc2c7aa2a757b317cc97d8d08dc400548d4ac56379653583d53185ee8ab37c4dd189b66af011bc9a32baae55991922c41466",
315
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/ApplicationInterface.php": "77af1063e341dacee15504837264b8140ffa3e8f537b9eb0b102e8f6d184deefab6a08ff7f771965c31d6c84333de9963b2e998bd0389bd0517479d5ee150d3f",
316
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/ApplicationList.php": "0840ebcf3a0d9688cc68a82f11484339d8dadc9d1a50787ee11b3849a361a421f30417ad4322633c53633b4cf58ff7980de6ef87471fc88b16d090f127763450",
317
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/Call.php": "8e0a3bd97abbb7b9d03e22a4eca6eac4989653c43facff064a374f6787698bcc91320352d105f66aa3f31cc0d70902c8cef0f9264062ec4bf4e5cba6d07549ec",
318
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallCreateResponse.php": "a3a07958282fc5a6e7b99978427e2361e8828a63c06a940159a7fbb356ab9621a899e6e2a25c27d445fb92ac34b63d8e5a8b6f0782b7f20c7d9f4308306903ee",
319
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallInterface.php": "9aa42eadb3b1c06c802d46f1a11b17acf59e0c78ae65b6c9039b4afd9fe53f171cd8023be738a359128afef545a6fddd43bc039d94b014d122e9714f9591ab71",
320
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallList.php": "9883c38a74497c496cbf7c4a837051cb6bfa0ed0b9ca9298f8908e7195a000196f7c79b4846417c64af0aeddb6327e45ad4b36352a28e8300c977e21db0fbd0e",
321
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallLive.php": "14fc226091078fd069998fe41625d086407e0c22455dde078284f9a3e8fb34fbcac0b75484c5350b437387dc203db7690d9fe1f02aeb09da2d5c57f7b2ffa651",
322
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallQueued.php": "64552d83e5911b11202ae4a965bcd7c408643c446566c3d09aebb0bd02fac0dca41477988aae62e91bfb42913900f1eeae9d20693c6bc29651e2734b06cf18da",
323
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallRecording.php": "d23438ea994b0ab936c3917d77ae9bb38bc9ca14dff4c5c120a0f583db46891af3bde1a8c3f55d15bacae99723e510184c14c60eb6d3d411d46aa90c5c8acfa8",
324
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/CallFeedback\/CallFeedbackCreateResponse.php": "cff0c47988bfee02787a2d73df6b3165749844c1a93b1fb91e87e80582bd28c8c7efe101fcd532bdab62886eadc6354924eea81278da5037ad9d3ee5d8dc8f29",
325
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/CallFeedback\/CallFeedbackInterface.php": "7860708568f488bd0832e626123f4bb5ab986fa5d54f305d4744503ceb4e919857b78a02b766e7241d324a77d86592f60f26d1ed78955f5550bd0fcc7bbabcab",
326
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/Conference.php": "8b97d6c9abee836cce410fa1216fdb5aa8a4df0c8543a75c2415bb31a5ee2d87531d5d162b218660a33cdc30539861cb09d85a780feab2d5321d0e8ce06194cc",
327
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/ConferenceInterface.php": "34f563cac4a75ca234e4517cb4678998461011440f30f9d81895adfdbb2e1960009114773ac30901dfbd2596d327554fd335057de66516b656f7a96446f4b06b",
328
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/ConferenceMember.php": "1a880200a2988394ed0436702f805ce60762be1774e1d156f38e45be39cc72203fd4f04411a521ceba8fa9647cb00f6d1bc6d94798b66f12175fc68d88c51dcb",
329
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/ConferenceRecording.php": "1c3239209726556971c2cccc812ce5bb5a3fc8c7a0e4f3ef520e037acde32d9659dea1dc5d3803e1f7cfd39e945a1680983bdeba8cf62459fc168f0df731adab",
330
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Endpoint\/Endpoint.php": "4c9a87fd6042a3eb486af5dc899d1e4c0948de5ebb1467cc85704030947e2588e79d23407ff662a21b097fb46a05925c3df29dd6e2a038555cf44844342cb206",
331
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Endpoint\/EndpointCreateReponse.php": "f77356f3ca29ef7163e47530004a5d79c1da73e922b17333a89512e39c7d3cc842b161d9dcbc745075f6a6c7ae27b7f7cf85f56a6d5bb796b87db4efbb8425ae",
332
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Endpoint\/EndpointInterface.php": "09914bc8e8eeca2812a4dc07469137011eec1dd77b99e3aefc8d5b8f4675b8f221bc54e37417f6c45b07896b84bed953f8c85831f9e7cc7b85b7293142b60fff",
333
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Lookup\/LookupInterface.php": "040b0a2c01ca3c0c02c2c8450b47e8d1847ab7158014ae161ce971e330712d14d389cd746a353707d2bd2667dc604e55c662af8eb15796cfc613f285e170ed15",
334
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Media\/Media.php": "72b83f02669ec7b942dd898a74c22e909cd9b058ea2e903e92ef4dd9e985305311d53c30a0c54a3f0c210433aeb7b8bd04a4b3a768c853aa73ee4dad9c621a56",
335
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Media\/MediaInterface.php": "1cda06754bd1ba503a8405561594f9d3cd5befee2cc6d9cee98542886c71601bd8744899e7ede346df6b90552f05a9eadeec4cb4d11fdab3269de88170cae961",
336
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/Message.php": "54ae356246cc911258552001390f10f701929afa24801b2bc6cde72484c915e2e738a03d04aee90908003efb3b4b3cc8106f92d7ff87d2119e8a350f7aeab54e",
337
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/MessageCreateResponse.php": "75495f459ecf577e2e0c2f8c075d569f36df80c5c828fd1d6b84a001de2c3d032add50b5ef08177d5c68014fccbc939c8ff89ce6c884ac0c1b64f4301d81cc5e",
338
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/MessageInterface.php": "e96af121fd4a851e4c1f27297c602a5e6862e0ac54974aedb19248f017f2d98386ea9b495ef6cb775aacafa7b51b6117665c803356442786142c15e86066ef41",
339
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/MessageList.php": "baacdb72ec116be9a14b8e7e55d6c40cfd8b04c5bd1b0d93d5c9919ccba2591105e03dee96effee29e95ab7b7e58e45569760ae825351c1891877dd96853254e",
340
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Number\/Number.php": "1bf8e1b1844ccced8d8068a80ae45b6904f59b0fa0e7d6a7c5b43adda906859ec11d709a501f560aac3f8315176e9260ba4796aa9cbbd637431ec94f0ec0c668",
341
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Number\/NumberInterface.php": "e633bf2e705735759f6e27f9e747e3e05e839484b57672e2da405b7e2d8615653fa828f8295a442d13f5b64645fd009ba6cd923f0c163f2070710c7df57a1a70",
342
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/ConferenceBridge\/ConferenceBridge.php": "3da97309ccefdb15596bab5180d386e2a78cf938823225820f5b206d8d8f366209dcf96bd139cd0364729c8b733612ae067d03e1e29aef472c4dc82527d3002f",
343
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/ConferenceBridge\/ConferenceBridgeMember.php": "9ee728dc1f37fc183fd4890ca5d213bb1f47899d2379a16009de7ae32b75b459444a1a329357faff349909ee89843ac5798c75699fb2b8d939501f61dc09b564",
344
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/MultiiPartyCall\/MultiPartyCall.php": "d13d863ee416714a697600882f33b88a8bc9de8d5603149fa199f787d7d904d55aaa6646cfdb3d71caa99e4e95d7e352199e8b54230d3c64cfb81924f1b603f9",
345
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/MultiiPartyCall\/MultiPartyCallMember.php": "6e8f1c6a1177d0c933352bc2d8bd54c989db7679f2feb893f430e9e634c446d033d01a82ea740185b1926734f285facdb3d99b18ffcefe83be723fc08b50fc12",
346
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Node\/NodeClass.php": "b8a08dfe16a42c08ea66d141b3b4471caffd2bbf89fa4b360a1b16a7072ea29d538792c16b93f1e3f1a1a01d564acf1a40906c32482c4cef0ef42f1647e483d8",
347
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Node\/NodeMember.php": "e13f76753f278f07e8778f1d0ad64c9ff401633423ab2476700ad0711ea5534f7caa871b5e10fbb26096feca64471205082f9ba45de607e7ce71eccda0e7db91",
348
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Phlo.php": "da8e7b69e9290d876b6ebe6778c09ab68f47f13cb22438ac92d6eb880b7fe72ffcc68c681cbb9be074e36f3ce4afefc69680e7a3493d3046a04ca9ec432d7a99",
349
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/PhloRestClient.php": "5f3b9bb5e3f7dd96572f1dc71531caeb0b14b21ba7c291561c1ebb040c3ded22bfc0dbd9030843cfeda8b4f83e69d86ed9db2b3b7d0cc8b311ec64000f3b935c",
350
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Phlorunner.php": "c1f3764aa4a4c14a33614bc7cdaa05043d268b24f88cb2312bec3596e5e7e5286e9d0429edb8583b640723784b28ebf69df691d5e4ec53b7d7912252832c3ed9",
351
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PhoneNumber\/PhoneNumber.php": "57bb602a9f511dd39c7143c50a9ca6537bd83f398eeb6f198feec689877a9a423d9cfb0645c4d20eaf30490ae6b6ebb91fbf1d00ce633a2007333ddd6273b032",
352
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PhoneNumber\/PhoneNumberBuyResponse.php": "6929f9a7447425d76afae60b91de8d6a5a42a1e7864871dc73a40199181d5af8be9f645185ce1e796e75440d138cd0f69ef86ef404879d74b58107ce32824b6b",
353
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PhoneNumber\/PhoneNumberInterface.php": "3720a8056618a019c64de2e4e05e99e0b30cf48de07117e75172b8ba02f2b2c60a1e0b12c3cc07b3f5ba8aeee2e747c3eed43b5bf589c29c7236b47b5ce75747",
354
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Numberpool.php": "a774de315b1d34a61c9b9af9b21b8fd1f624b48bcdbc7ed1302ed25cc21093e05ce1533c0ce4788ad36ab28792878321a99b941cf9e1a8ec7fa2f2ab1d16f872",
355
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Numbers.php": "f62f6534b223fa353f2363e38fb1069c3d10544a4cae2efeaff30019c0cfec7de2b4b9f551cfc16bf26fa1dfb916f6d916f9cd1d1357f8cf6f7cc84815812237",
356
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Powerpack.php": "895da995fc1445bb6f7458c3904c918d8ba8e8db75e94e558f04ab8355058bf82d881d7c282fd8e03acf723c232f3081733a9ace2bef1da42c3e9f4de452d2cb",
357
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/PowerpackInterface.php": "e09a8e4e67ece27935a81730b7587bf29afe72ff9aac57b6c0efa6fdbc4b7cf4c91d60bdcc506a2c0b86f7a4cf7df70c38135e295504417d39024a4671b3cd33",
358
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Shortcode.php": "afd1a0a277918a55fabfc2b46460ab6a8740ac68e1d7b9a0180d88229d7a93269305765fdc362c02cc2996ff7c3d8c95417bc90bb74e44f9c2cf12f023f45b08",
359
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Tollfree.php": "0c63aaf33046375a8d7c0f9c7c092ca1041f553b1987ad5e2944630dd23f865785e06205b0711c215468630455d8c2264c0b141fee5cbdb4bf9430e6ef90527d",
360
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Inbound.php": "285fd073a2fbf84c533af3c0e60b369689592882364413a1879691a025655bf4bdc40831d13d96c59ec7a8827233e92d478c14d1d648df885c75fbe3d054351b",
361
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Local.php": "5140df58e671179a4edbfa82fcb7b7277e440706406200255ade35177e9a715c3340f5920c4a57c351b6e222f7bb1ef20b207d0830c487bd14b9fa713d3d8c4f",
362
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Message.php": "ae4e8bbe3a668748ba57bfa571cabcd97932d6cb7a8a63ea04689863ccf75a63e0aa867fad60c39e263cc685521a8465b46f730014933dcdc941ebf152fc437b",
363
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Outbound.php": "7656989e6b1da4e4887f8443304e422ad2aa01c9c05aea5b5245b4f3edc333935be4f573fc5105e13cf03ba6ed0ee0ea323cc76c833846bc5cfa01f3a0f33763",
364
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/OutboundNetwork.php": "900ae54c0c0aa0f85af4f02da252a34907999bcd311e9e39ef8d8e27a16fc6c8bbde5d5f6460af6b8e68cf584419ccd7fbc4de177cb827cabb5ae9b2c896494e",
365
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/PhoneNumbers.php": "cb51001dfd504ac52dfd39e2a0fcd01686de42e78464c76767f99fbc7884cc2d6e304cedd72e66dde42852f72cd833dc49dc1e92fe1487b2682648432e7979fa",
366
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Pricing.php": "5d197bd5eef109ba3d877f6de48f8567f135466adf1d811d32908d8d4fa7c8961592733d6bdbaa4f646c3d25a31c8098768dff183d192617b2c1726e8f41c447",
367
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/PricingInterface.php": "dc940fc2f0338348b06fefb22caa65b98fbfd37063621fb4e4f1e23c5dfe21149e2e648c1a32b09012b34c5bd622fe28126bd33ba1255c6ae3c370dabce6ee97",
368
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Tollfree.php": "ad733c0d904ecfd646e79a3b6bb3ade270f99df5e6353bd6c8695322a71238fae107a55d33167063dc2e4b1b905273bb0631f051d06cbfcf5d01c94e9252fbdb",
369
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Voice.php": "ab645548152bfd840951e981c0d18aad23d613afefd4453af077a6055f902d6bea6a0bcc805288f130da6686d8419913e86422cae35b57c1087eea3371b7e799",
370
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Recording\/Recording.php": "def8da050e24afea59514b4fda360ecd1d80a49df2013b258e3d78304d6eb2ccbe21ff1ac50a851079234a1460d0f2750da8fb59c9ff184e8ba1f1becdfffe6c",
371
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Recording\/RecordingInterface.php": "1953832ff8be0a6801f306632f3ca3bc46f067d08662b8ca6d53e29d53507a48750bdd891d2d0164c029f675b8c4c1dfa6765c9abf328578838b428dcea22615",
372
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Resource.php": "b8a8f583217c43c3eceedcb8f047efa1569bfe5f440fcf4f252f1a8402f484e18abff63229521f89697c1f7df21a2ff919488fcd9df42b5aaf7a160a50f0c62a",
373
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResourceInterface.php": "85bde5b0479b85aefa79139d36192ac334e3deb3a07353b7b1b0cea1180a050a92dcb563ef4a968b6436f60ac990fc5c1322ba3ee6f4ffd41d2997d604653b6b",
374
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResourceList.php": "71fc010407c57d77f5b31105f6e645d04347d961c3c81eef6cacc7b8dd475d86bd228c5ea5dd5976ce34d025b0753083b5361a47cde5d5daf0507678762106fe",
375
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResponseDelete.php": "3acf13bc2797c0ed58c78abac46ae2822a67b9c9194b3c9864738516847618c0033fe12c5a62d9dcb7d110ffd4264c534fded370d04a2960a2da32059fecaa8e",
376
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResponseUpdate.php": "4db3ee43405d0a456dbc23801c2c0d71676c3f88ac7c4161395ad275e7fd0dc6b53aee99a882706da4f14fc6c35844d54143a7fa3b6597a5a25d59ed67e0e6bc",
377
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccount.php": "b39e628ab06827320f3dcb47d3ea55d459af1a133430e8e51e8e6aed5216c31b54498c836cfd2a5c5f2d9cda4bcac03ac476bd8ae81c3ee2c7865ddfcd359dfb",
378
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccountCreateResponse.php": "3b92a7ef8da848a7a5d7b79436ae557657e97141ecb2bad076e69d495d78f94f6e9c68464dd7e790d64dc563428e4567a1baf96df1f8bc97cfdcb946e60e94ce",
379
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccountInterface.php": "a4cec509ce127faf30261cf75555a2905c6e551223b4b90949251f0822dc20d7b97efadbcb6bb189cc9302acffed8106ceab79628a7531c161f4f713d6a26c4e",
380
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccountList.php": "228e0fc0fc27fb523c9d2d9e62de77a5deb3bb2a29c10d91d7c59b6cf36b3e12b8b1935a69fb0ceda72c4008b2a04436e6aa3f84740edf265d0f647eed7c52d4",
381
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/RestClient.php": "91f01799f98c6d65e1a0a8025668fb0c9f5fa4b77d44e86790b34599c2b9045cbce2cb3a5dcd93a1fa8523cb688d9f2b895d7d5f2377f64f2e33ce68e621dd82",
382
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/ArrayOperations.php": "04a84eb09d1ba33c3414dfc74d1c4b31c3149dc8e3a038912be632673a92e693da8e531a987c5ce747aa11fe01bf65bc05ac91924ccbb8f157c15c62f8ce9694",
383
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/jwt.php": "61ef00cfe10afee4047149729431595a9e21d44b25de3e8808014312a869110bc22898552fd9216cda6906c91de2b3ef9d723ff0d4e18020d1b7f5d1050fe810",
384
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/signatureValidation.php": "2bf40afd282bd8711459cff1b366510ea253508349adca2f64ad101b6c4e3e20bf405194b9e421ea7cad5b738716624127969de5497e16e3647872e0b3bfc6a6",
385
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/v3SignatureValidation.php": "d70083f5ecd20fc41035462a2a27e04a9367d9b7b13e6bad5579dde4556ff187b8ecdfa17b2c07a0fcf88cce0141baf7dccfaad85a17aa2fd1a7afe7998d1037",
386
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Version.php": "365ed59af02f30183af840aafe55b67b682919cbb3d662f860baf1defaede8a67fccc5a7f087209494239466f356fc83f612faa02f9f03a301f5ffc66b52bd09",
387
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Break.php": "89a669d486a72465efc2c6128deb6760dd86c9fb69cd8c0f57c209d10eb74067efb50bc6f0e68e2d1c9c2f39862ef3fa03a35c65b7395aea6ca963a013869658",
388
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Conference.php": "bf673327e263996b05a0b45e323168e3d44b27a65efb8a8acb0eccb0276360c1a0391f08edc34ac617aa079c6c2b1f45eba6142446a7ae2286e23f337819caef",
389
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Cont.php": "45ed9435166f1b72dc5ee98afaf3547ae646d16d41677ce5409a6005ccb9ff23743e4c528385a1e0a8f5570eb7ec9374433f609bb8cdcbdfe756842f1005c52f",
390
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/DTMF.php": "14c619e3f01d6dee2dbbe9b718c6c64458a97bf70ae333455aa45c9cce91e4bab693f5265de0099c9cef2334a5310bb85e3374c5f0cde9b93c3051cdf5b57a4f",
391
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Dial.php": "5370d1f1a1ca8420560fa204d295558ba9aeb626fb7149ee06e12acf7f4b7d079307f329f91594e138847a2b3dd9e3f3e9a9e6e774a3c1095c3201ab249e9c03",
392
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Element.php": "4913c3c78365a85eb5c90aa721b0e1cf535c00d5815f509e336ce635cf47a9d9aed1346ff0cbc875eabae65190be2875d0820312a6a5c90c6df3acfa23bc80c0",
393
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Emphasis.php": "d6fda7993f909d3a1a50441ef74003811252d68a33ec2da63d3551236a005952d3b6c7e2bcdf5d9c85d33bee2a9255dbc2b95988cbe0e115b42eeb667d58ca38",
394
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/GetDigits.php": "e41a4e05fd55fec82a24cb2a545db122000251abc0986715a4d5866dc64604ac340c59cf0a30a35ffeeaf17713eed730a7705f32aa20aa3b14ffea368cdddfe2",
395
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/GetInput.php": "cb11a5e0311d3b8938f7d94462d24c5d4b8a2ea4d733943253ffcf36aaa648cd3a4337d732799f382526e0e2b2059dd1489e9ac7fc5ae478eb1db07b3830a711",
396
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Hangup.php": "6a7ac35846ffaf61d8de286929bdce05974799b26b17f4d61e68b6f740cff49bc4a0b72899d1150ae03d72e4f8c4dc7cac491872e76be0aec6b1a665446a9226",
397
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Lang.php": "c16c3db519373df61712fb1748f91785d79ba0fcd7e85a32cff1d17ae89768cbc10b3c4cbceab380fa9762cc1b6948d8fa56054d78185f8c9c1d6c60a012f527",
398
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Message.php": "541a76d5dc1e25633d7bf67c83d1fa123820296b4755e7e48aca094040ba0c2acc6215eb29176551516941b8e8225e6084fbf89892893557e12f678cbe2abb86",
399
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Number.php": "82569de717d895eca9c4270a3fc48022e666e59e6d6c74dffe4982a8db1f6031d80c51863226c750cef5db111f0de940878baaafb352153bd0d053f716c43fe2",
400
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/P.php": "d8bc0f70c13af91549bf4c37ce4c95b6683590ac9c9a3006bf2a4dc02d85ea63a33d0d8fce4a6465f25e0f86b35994d98e7bf75c07e30737305a7f2707ceb444",
401
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Phoneme.php": "9bce52123dcc7451f21ecb2e155884479b7530715d78d175cd616da86198151481632af22cfc19f9c70a4cf0f29f3262f335982fc9988e4aa3a435cd74f14c59",
402
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Play.php": "9b25a9f3a6149ad856c4aa008c405192bf2804432d83d3a572cf066dbb151b8298272b0a9185bb26a5faa51c03d069aed172ddb135d4dff3fb99af9fe982ded5",
403
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/PlivoXML.php": "03c37815022f4b4e7ea917f69b5516c3bb5499e68b65ed1b50f7427d9827de1e84037745d25b420c1f81ab829f51ae752b126943005c82b06a668c8ff895e923",
404
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/PreAnswer.php": "f66f22bedaae6dce341d650d5ded5007d867361c570162a642e0a15f5fd6e90b49a4c8fac2d3a1cb5fea446c75e30834a1106a3acd1ac02a87b5a7df7c1d5af2",
405
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Prosody.php": "12c8b634b226bad4ec0a7dea7b8249959943bc5ab0e71f75fd42afbf6d1413834563c38430e9348bde2cdf1059f266a2ef59fb7a8f6187ecec135ee9d5dede4b",
406
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Record.php": "070470af5650220e0556baa6b109684e1abceb6e80af620ec750f0c691824249121e1c6aef6cc1c91bebb45b76ea9db24f9cadbdbab8857b367ba2521d1cd001",
407
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Redirect.php": "34e09e0b208c4dde1c4b53c451b09f23985c8f74737e73f4675053494cfc81b14920afd6620ff161877c4e1b7b6e7381cf3f824a2b06508d84299aa4e0e45690",
408
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Response.php": "8db3a9e823e3c11b8377829c783d93f0b7cf98afc6d837e514803b478a7887d6602bae6efac9dae6a2e7683d8409c23f78c463185754fd7916845aec23e42c58",
409
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/S.php": "d0dc3f3bcc818d107fd8e4be38718587edf610e3f840d7e6763ce8fef51a1e96de3b49076995802aac9edc7d8a976ef024a1d45ef634599a56d13c56a8ba73de",
410
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/SayAs.php": "46c8fff6a9dbb36df1bb14d0c4247569e00ce77b37730d7f8fe6fc4a404a632ae70e48c774f40c4ac0e19b10ecca7c09686c7d5a6fc7d5311edcba657177b6db",
411
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Speak.php": "d18aafc18ac404a85d18627ddc66d2810ba1061f8e0d3d3634d5f5258b239a139649a8cf479367dc026929010288a291aa1144aec2415a2de6083040b8a4a96f",
412
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Sub.php": "9d34d26e76074e65fc01a3a477ac176027b1ceb5dca2fff450111bd2cfc0027c7f7338777b494728ae2617a27075888ea699d4226b60049c4fec633d42cff8d5",
413
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/User.php": "2dab0ac6bb38d9216c1b39b81ce20f1a2af1d385c90ea13aa566176eeb288f8ce80e11048209abf8c38151207137cc86b754b7784cc478dcfa1f567fcf929520",
414
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/W.php": "798d6f10e6d07a54b29916216dbb2382f25bbf2f96e15906f842cd2ae4aee22b8f3e56535264b1da6d40835d5b9da6a9f4346303f7602c9562587b29fa419f3b",
415
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Wait.php": "99e6e66fb4d2a81f0419ac823be64ea8c81e6ffc8313934b41d6189519d053b54b5e95dbc7b869dc979b72b551b5654dcd6eef0540c3b01eb900716e97d52dd9",
416
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/BaseTestCase.php": "662140921fab3f1e7be65bef2d063673900eb3c41de8ddf68320de194e254ec3fbba3322790812c258698af81da35277cbdfc0d2fc957fd5f68956e7db2ceac2",
417
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/accountGetResponse.json": "1ee7d7e260e8678fa70fa47206ac7c4645e9d698da7017ab05fb56266710e34bce48b19d3c65541a084be28cfe918e81fd52073064071daba77355af2eddbbf2",
418
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/accountModifyResponse.json": "ef0e777d38b4605ab58d951f26e975566b61a26ebe5710b9c8c7588aae799c68cf76dc5860f44aaa666864f3fc1f74185b5eba888c1dfa8c2004fb8baf6d859a",
419
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationCreateResponse.json": "19336630707d50a021e3dd3cbcd8a229f9f6123211e27fdba211494bc40e9b9fc5573ef328806bf00b937106e7c894ef96a98080f6003d91cdec67f50196849d",
420
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationGetResponse.json": "26a3aee28fa9219455b0c7a54d47eaf1ee7e9fb526185d1598d5611246c1ad7b0cb1abb05b12d21189463955e25d2da906cf5b04f1bd4c3b826d44de47c0d56d",
421
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationListResponse.json": "b363791ef3276030677b53f555a42deb02a9873cb5b21e17aee9176d425ed38c562da7fc162cf5771f0bd259b46d615ded3799f34f6fef590e2df97180ebd228",
422
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationModifyResponse.json": "742b49b7f428a281b1189fd5f23811931f2d6c71fa271ead086b6acfac63bafed22b86f2e460fcea35d8bdd46786c5db83707f35c7a855efbb92e51ec01a4859",
423
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/break.xml": "6707a46a4316a9f23104a23e4ce9c79f8b4f969639c08f5196a9aa94ba3abd4a1972a29d6131e563a685732e8cb0a4fc90a76f2d0ff5b72637fba2f974abecd3",
424
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callCreateResponse.json": "513446e1e7fb97b30b86dad2119bc9fe73e70f01f4976ac40e57e41e7d96a2faf978fc72fe2ff49e3326fdef8e17cb4da24bf665be81089aad1232716e42e114",
425
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callGetResponse.json": "2958c05e7fe02f5f6f2f8834b34050599df05c6f5751fde2fb038853383683e78b2b33b9534bf8da38770173e08ea9c7015d7b2d4f270efddcaedffd77ce661a",
426
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callListResponse.json": "b2b35a27aaff76dafc6f5a42b6ff515e56ea9d7c196670613b97c2b4c0b7f2dfc3ba7ca705b2618f3851e1db554268018c7c2bb658e94b66493576048c54ab49",
427
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callUpdateResponse.json": "06be7ca7ccaf82f24f23e8c33382d372ba639662283023a9b6ef555fa24d273efd845ab27fd423dd4267d66a8df24604f96113aa3bb8f8dcfa49e713f3d71bbf",
428
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceDeleteAllResponse.json": "6722c7663c8877f4bd5d417638d5a0fde3db7cd2ba1880dc66a7ce9ad25a14de60b4942d84647cc21c0b12211227161349109162ef3eafc2a9607c2645d3c93a",
429
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceDeleteResponse.json": "9a8baf62bab7971a89490d637633a3d498d4442bb11ca29486d21a3dde432ca6c0cb36d236bbc94859efac83b2e56d33442a13a4395f4b026dfece2103ca790d",
430
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceGetResponse.json": "950fb7d6e6e120ce670da43937ab4ce9e7a7df5296848cb52261f5f854bd89d47f26d76f89929adc59bdadbc8d0e77de79f29edc5d6e6b4b73aff1a0c126bd43",
431
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceListResponse.json": "9f5635d9e0988b03c2bffa8457962cb6870a39d4354ec6c065b58949850b188d2829fcd3db1761ec42a4bed30ee3704b6c353d2b9372742cd6d8b00bff273dc3",
432
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberDeafCreateResponse.json": "b39ae8d7a1de7d5732afdc00da955a91850b855f6463b143b5837023dd8281b450fa79635a3fc729b5b198c6af5cb57f9c6797c8eb56daf72b7c7131196fb4da",
433
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberDeleteResponse.json": "ec18404f82674de8b7ca25eaf95074cefef51b13b038de14dc9ed5f2664c6e6c5c87d3f7a08eeab3926869e171ac26d1647ba1cca03253085a194cb0fbe16975",
434
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberKickCreateResponse.json": "9f924beac462c4ad9f42a705f7bfde5aafe5e73563b07e98ac9db42e95d3c657f5c4ba0d6ea64b01e2e061563fec41d53f8ae8fbd7f5e08857a903c948019e1c",
435
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberMuteCreateResponse.json": "c3f1c38b6c8295b28d531c446199454fd7422d00e3cf71fdd318a821edca4afba444f8cea38175c0853b34dcda5dcc2c6317a9f3103e16474fb36c43241a52de",
436
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberPlayCreateResponse.json": "ac345d15512ca5debe0a20092d8a4bba1f725a581799a632bbdccea771f1b6094b6df3362120a29c1d9109cd8ca8857447c3be08436fa94a5a4304725b75ef4d",
437
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberPlayDeleteResponse.json": "10b6ab89ba98b9d6d08dba8637971ca9260757c318a4842521c7d2bb2a1b967498453aee4cef6fd964cf2e614c25364f543412a0a88b877154b3faa9f18ab3ca",
438
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberSpeakCreateResponse.json": "b2b01526d4838a72c816ad9c6ca7f9cb473a89818d4444b48aefc269d0173fc9eeed1e2473667517280c18315d67a548f41937ab4b7d26f2edd4d0e13486aff7",
439
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberSpeakDeleteResponse.json": "d42658e98680911d21be32033be208b53071e3ee2c514a86809ef4d06cc138ca0a74d9b2e546c54b51c66f3aa891cf0ba3b4db9a6a07e7f06ed37bfb39ef3a6f",
440
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceRecordCreateResponse.json": "c9d8570ab20fea79181b1416cdc44b8e9f8b18b06ad446a0929ecbec53a6bb3d66ddc8609a2baff92d8ddf9bb68b802ac4eb3d62e958d2cdc1485711a6286ed8",
441
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/contSpeak.xml": "1115d194144f96d3b4ba895d45268e346e7e56bd308b4b7c58bf62712380908bb71d5250323bfa6d13b8d25e64a86580437f7ac1f2c63896965e3c13909c240d",
442
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/defaultSpeak.xml": "2449ff96f102465168a4551ddac6ff85bc680370b423d46ee10b345c128755560e0bf48c070081e8045839503450c0f8b443fe0b33b455410ad5dfd639a6adb0",
443
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/emphasisSpeak.xml": "1ae7422578c6921013c5dd65650f0c1efa50512824b429334cc150ee6872dd2a7981a125b07a8023e360d8a881a32333de24f1b595c95a339507dfb29732af83",
444
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointCreateResponse.json": "e0cd43507839270c51117e48fdf3158e67662c1bdf9c8c964b57a13c15517ab7c83483855764b763f63bfee011bb893c20eca7e7a0b3b8872bbb1f26228ed720",
445
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointGetResponse.json": "05359131cc3ed432c1b29f3766d019be556f58e5e7f7b502d866d0057c04917ad7011bea5afd7ca8f2814dc75c45a52930d48464f7fd740ae94b45d0a07d3627",
446
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointListResponse.json": "d6488ec5e6277af9a34629d901a211e37c9a522107f84ea77f861c417345ddfa409d7de389ae69b719997600a0495289bcde64791ef07c257f75bdef4fa8006e",
447
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointUpdateResponse.json": "3f20870d3ef78c57407bd42cd424775a7014473d891020bfc41fd78c9187acc3d7fc2a2d7a137eb5bf9e8741525db9aec853889b11d2d3ff508f7fb16a4bfc88",
448
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/langSpeak.xml": "1eb16f6028ee00a12e677560ec9b3ca4921deb2d6da15b3686c43f506e9a13ab0cf811d71e942e1f225989f3a486ee39b4949d17d8692ac0a50574845491cc8f",
449
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallDtmfCreateResponse.json": "f30ceb762f24445068ff4a688935a84cb64840310bd518806c1259ec26fd60da6a8be9f11c9c0882d08c857058944cf1c69c95035517716dba322a1a865435f2",
450
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallGetResponse.json": "339633aa5d9cd2aea4a86dc48dd8c63ea8c0c56d5cc0f4513bcd2d66df425ce4b74b246a8c39d6cb0dcde75a8c01d4ec8347e69342649ac27599a79a72fafd9e",
451
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallListGetResponse.json": "7e8efa8df76422d6a9bb0133c81d96b9ed932f7f529644a109b35e9f8f301b3a548e8e7f6a9213e301f25e914b98c3855160ca7e0d6f0283e947cd6fc95c5ed8",
452
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallPlayCreateResponse.json": "4cf2ddd4f3087fdcdf772219c5ed84ffe1dc027208540059bc532961b6c4cad382bce98dec481e0245c99e288c9523e8f33ae7c3c35316c8130f49f81db40604",
453
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallRecordCreateResponse.json": "02f2c4c88fc63e5585f6e5988d5f615488507a7d7eba442430753a60f0cc2763c38abf905042c9ae0f7d017dc50caf67f269267972b5a7fdd4fe7675572589a6",
454
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallSpeakCreateResponse.json": "ef69736cd0199704894c2fd938e4f84768b09a6b9d2f334ef0a83b1750db0bf0eab538471fead4397b49ffa8e86011da111e867d5d8b3532bf3f4250958d6146",
455
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallSpeakDeleteResponse.json": "63a9fda757cfbe1a338c42f19532609e8607f3c2c8a317ec8e5aa2a164b0e9f9a652129bbf7fbf9fe05c38a0f68138ba10b4d256f48dda1fa292c18f2b717d3b",
456
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/lookupGetResponse.json": "6b2dd461ce651012160ed88d092de0859ff1cc132c57091a1064b5745b83cd6e5144e8204b6810da7bb675eca802fff54fa298f03be6ef858c59058acd24e640",
457
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mediaGetResponse.json": "251c9d7226411a160031776b1c7039d7e7f3d715ad7bb89131353611a2509a570656b8e29577e505102cf588ba50cab34b3b74351dd33e2a99333676d48b7aaf",
458
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mediaListResponse.json": "1512baf046701056ae6b5ef06a1e6405cd62a27d4b82f5b38ed2b2ef6faddfd147b6d57074d04d77cc14325d50d7908c0446acd4a5a0355e9dd9316f80b0f448",
459
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mediaResponse.json": "329e01ec90033528ca170704dc7a3de8f5d004a609fda5abaee4ad610b1559464a97b423ca27248f49fa3696f12ce6c1b3ef69ba198ae57877927ff78257231f",
460
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/messageGetResponse.json": "10494dc350e9a659083f44802a899a893e67fd82acdc506210c827642e27bb4ca1fca7c00a73a7aa20900ead392b9983ae719c6a9aaeeb0ff9f9b9e02539ca4b",
461
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/messageListResponse.json": "5751782fdb135ac45cec47687b7bcb10d4e2c4c8ae88461baca0eb6f0f81b8144aca9b610cc6ef7f3cffd4b5dc2ddac08247e74608166d147bafb1a9ecd4b834",
462
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/messageSendResponse.json": "ae5ef8b7e2a5db03fc5c04e96cef35b3f819f1670cce72e0e729b57de018bd6ffc254e00f20fa7c662eea100f78bb1824f0080275ac270f7e1229566683fc62a",
463
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mmsmediaListResponse.json": "fa4d1e3885b6c84d72c9f9a4a414de7d1ae1d574db325cd773600c7a17f83fcbe2a84c0daa8fc690d5f5d95431b1ffe5097c17279593ccb4155d5f99b1a853c6",
464
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberCreateResponse.json": "e7acbc2aac3a716dd50e27de2e8937e27fe70da7dfcce17561f4d81a2de53e8cdfb5a695255e1ac65c8c49e4b894722e7ecc9297b9d040dadff97d1cb61ea414",
465
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberGetResponse.json": "261a85df87eb4ebd1d310575e8f33d94f74c30f5ba3aef1ed47654f7569ebe4310019c5dd317a8c6e2b015a1ac3f72455118e0878d688817580b18b747d6dda4",
466
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberListResponse.json": "134543e58c07917a79e0498e85466b9cbb1c97a0e3087473463419bc6c178bc278ca75e148f885eead7f6b1074063256fa61745c57a0dec4ac060c4b03afc499",
467
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberUpdateResponse.json": "e7acbc2aac3a716dd50e27de2e8937e27fe70da7dfcce17561f4d81a2de53e8cdfb5a695255e1ac65c8c49e4b894722e7ecc9297b9d040dadff97d1cb61ea414",
468
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberpoolListResponse.json": "961fe25a8fe8c35dee1b0608a24d741b6ab91f2104a9f2af2080279d6cbe4e631416d7b3d8e3772715e376a603cb740d652435a0f2d7971e64e00eb44e7cd518",
469
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberpoolResponse.json": "c725314dd96d000028683c175528d15657c046cb421add91a927472c235ae5c1ee1aab060aa0eec56b6c717138623684f827a2de50bdbec1017e7bff937b437f",
470
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/pSpeak.xml": "1e49af0752b825db21fc50126642fde3f39dd8b63cec3db00c3df92ca38935d58b8752ad14928278b98ef23421d0926d624b6aae948f9473398d25e2d087b963",
471
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/paramBreak.xml": "1202da39615a87758a5fd85096a4d98f6c2726d705ef0b1086cfc66cd0f456b15e3f79d9850e1bb8b99e9114e41b3ca19ee4fd269a42c002c205de005c72ceef",
472
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/phoneNumberCreateResponse.json": "a1dd38958ee69b5036aaa1c86cc730802dc2d7612eb1de9266f9a6651f6f067cf9a42d44c736bf85d1f40048f01f99fa05ccb3fb26baf3875e3bea98fbb9bbd8",
473
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/phoneNumberListResponse.json": "f2c263fdf122dfcf98289f6cd9276cd8c22fe4ff5bffca19b3509800d07909664e9ddfa3e145da04c06dfc6c5227a39868d17ca947e55b65a9cb18a6faadfe57",
474
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/phonemeSpeak.xml": "30620187252e4a92154e06e611a2cda1ca881a0d85b1c6c36e3c713734c0be9ce79bb9ad38a11e040cff437c5676c01638eecbacc5b50a20e0adb506565a9475",
475
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/powerpackDeleteResponse.json": "f170bba1b0b6bb42c88bc74353ea4db09b82f07f5a2166f693d0579e5b7d6beacb8cf11e39cff546345333b14752456212584e284c2c360cc673d009fd2aa018",
476
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/powerpackListResponse.json": "0cf4f36945bf4f73377a6688f99bb3efb0c35924ca9278bd777ecd0081c3f667d45de4a34f7101588b7a7b3b20179d18a393dcc468ed88df8eb53b5e2463d7c1",
477
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/powerpackResponse.json": "4318b75a2ac1642f6ee33fc62f18765a5142aa52e0353082a9d38cbc7660e40f24e1665a59c723ba90ba9a86edb4cd4a396bb9a0c00cebf6d5944e0ba84e7919",
478
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/pricingGetResponse.json": "25a616f338c147cb22228535abafa9c1439f663230d1fc5109af24f4f11a637c5d0cfdbfbf3b2762b87d0b4693f14223254e431f3b8ab1f518b32ea884e2d1fd",
479
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/prosodySpeak.xml": "0529a04b9ebbfc245e7d50bce1177e3eea9f0f6ede900e9fd3a447f86078ca86fe8c9911fad4645494cc784394194c5e6b63141a2a9125a1ecdde2cbe8bd7c86",
480
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/recordingGetResponse.json": "bdf9cd97b6c687685b9c37a0921bcba910dfc811abe416be7b17fefbf857c3ee1233e987570eb444d168edd660c26acb55377f60b8aa0a898f0c9af1743edc81",
481
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/recordingListResponse.json": "2d831eb418cd0de8a0d63da8a2ed133005a3e15e4e021c3451a737c45f42e5753ca5143204acf2f8bdf6ee91cf1ee8b04ee960f942ae0e62bfc3583ab44a1dbb",
482
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/sSpeak.xml": "b81f50357fb60ad968d8e949aed15c7544abed0a45c26c5bdcd4b166fa1d9bf74f57137fcfd378fec345e1fb2281ac38c30b2a3150cc6fcdc13581ea29379796",
483
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/sayAsSpeak.xml": "84e2d4a310c8d1fccc5be4be4cab026e1dde129ed2e18ab4fedcd50512cee91a52cf437606cc936c474cbfa508a105f36272edb6bcae29388f2a75bcb354de6b",
484
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/shortcodeListResponse.json": "449e0c165ad81254715b4521e5f4d39b0a6d1ecd583bf337e8b85ba40550a0942c04a8e33b69e5327a275fca4e42e31dd1719f100c8d6e459939a3696ede1a71",
485
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/shortcodeResponse.json": "867e2309b5c912c9dac5b06929a835b578b0dd3391c43f6e0d454adccf997060e1e5013051b394a94d44af3e5cfea67a88f4376088a376a031d6fde5fafa09be",
486
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/speak.xml": "a781afeb86ed31833e74d834de6d9834783264ec43678fe3e70a7f963e97a9dfd05dcb5ae75f51fdeec1d5d8d299d8c476454307a23efb830022a477500c02f2",
487
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subSpeak.xml": "06ff8e0c15b36727265d9f80c736a1781438c04445e91bd563b73a1f9ed4b501458f7e3ec22607dcd96e9f95da6e6d874c39381ca061a768c2b664a1b4bfc504",
488
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountCreateResponse.json": "7fb28239b065aab21f14d158e51ab6bfff6b10de97ca558da02adb639fd15e99343ca54277d0e0b0dc6be11c01abe6517fcc2f0e862d5a3538342f86bea87994",
489
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountGetResponse.json": "929de7e767657a691c8bf34be8abe52990835f9787114256bca7a1fd6016b34798d36e2318ad3d4a2a8931986d8034e2310e4b4247fa38a84314658402aa3bc3",
490
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountListResponse.json": "c57bcf1f52d302550eacbe5492bbb1cc17bd399d03b6c83971bebd83fa8be975e97859063a2115edfed47f622adfb413d5c28d6cc180710211bce192d867052c",
491
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountModifyResponse.json": "a06022b797598bdabfd7029128d9ebc9934784edf77175292c17b60152e7464938f78ddb8ab2883e0da22fdf94e584d0fe8d766c40228bc0a564e6ce76c39365",
492
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/uploadmedia.json": "35f19877904dd5eacf97183a286db18153002e37159f6e007c9c70644843d73963e9293a5e64c1854665821e36592f5ca11289d2ece86fafb3ddc4b8b758dc4f",
493
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/wSpeak.xml": "05cdd9418d049dc33432e02bc305b10635daf3bda936c695c4136bc4bb8167ac63e6ae809202a566e5a1488d8543c06fd9c52f869b03a474bfc3db560769c00b",
494
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/AccountTest.php": "8a98fbb165ab60db8a7423252e78d9db1da922dc2e1de9ef5cde32488c04380ab01e8fe53f4f542c602b28e574966adf58385456388fb4aff543dc04467de668",
495
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/ApplicationTest.php": "e23381682056702928ea1c587bf8241f71743e4349cb30b621f2c843711c108c0811689c953ecd52515b2c780c50c134f959e4ef77ad2c0dd65dfccfa8c79c2c",
496
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/CallTest.php": "7aa7df68b91782de7a8ff67ce4bdce917de03ce4800da2d6c103f0d1297fc26c09effbbb7ead06d70566398b8679c54246213c4babefca43976c289b8bdb895c",
497
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/ConferenceTest.php": "3d1149c50cc760ec57de791d7a1eb46a5210c113fe91e1756dc642d2d94b333067c9c3c5ff9d0c90d9ad8981963394d332287b57b84c634c8e4008ec5cb2356c",
498
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/EndpointTest.php": "aae4c23a72674a9d4da6261986147a3b3a1c5e4da03d2efe7f4ec21336e03d352ddc0f7e47dab3c9b4063a170d37e0eebeba649ecd1159d85a3c5553789c51b1",
499
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/LookupTest.php": "c436483d9ad54681ed44ef7a6b44d4899d06b7b421be27d2a076aa4bbef23a5d160d5098c60d5c380a8e66ebf8245c917074edf6a7b682d056f9f60e082de032",
500
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/MediaTest.php": "a6ea3f17046c123698c0b8fc1e7cfca6665159166dd53b51d1b5a7700373527c7346a90e67a382f4df26ed3f92209790c3ca93c0c3d3b653d424e17a1fed9f17",
501
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/MessageTest.php": "9749cc39c4acb64b49150958745f19952ffeab648abf06ae839eccf8eb9a6c66bea62e7d8fa398dc48a79bdc97ee063df934ba827632faf88f4aca01e5432181",
502
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/NumberTest.php": "9123fe40158482d314279a729e4c5c0eecf3733884ea39df16de986e775e93e90b8d9c7ad35fbde8f3d4cde3e02b33c70ebe87cbb27039615de8213cc27aad47",
503
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/PhoneNumberTest.php": "4b52dd78392c66e1d1803a278ab98bb03e4bfe5275e28b043e4f672357125b4373acece1c2c5668081be021a683acd2796e6ba5ff2646baf3435dda1d6de7667",
504
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/PowerpackTest.php": "52a3c6967c93b1b996abb3fe7e40ebaec915e58e715c6943b0f5ebd945c8a59023184dd1339cd044d2f3ef1a0041a61559a41a3832bfc222332fd85bca8371c9",
505
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/PricingTest.php": "91a088d32f726c2eb49160363f7a77d351f3f65d43a9282cbea646310e2d01a33d22a2adff9ce5795f949bd205c0b6e77571f0a231265514704f42bdefbc51bf",
506
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/RecordingTest.php": "353008dcfc66ae09e915787634877d598930e60fff3f1e6eec0aa5590881f66d78ebd79aa1ba2b2a20409e4b9372eef9ab28406c9fd29f95ca6c773d8c83fa63",
507
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/SubAccountTest.php": "6dd803629402c6f7b8d923753477f6c03d6cfbd50aa59fcd63556527cdbc3d932557b318cf8c7a9f5a9d3ff8ff143ef15f31256e488fa8c35cd62bf80ae04d5a",
508
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/TestClient.php": "8917a380e2cc030228dbb37a7a3aaedd2cd624d8102eee1fc3469a9838f31f7ee734a40cd45e510d63bf4c1526da4bb3af8d45bd4ebd4382cc9fd5bc2ba178c1",
509
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/UtilTest.php": "6a66cd73b0cd403f64f8a4752381964bbac7507b4449e81c9aaa64d61db244128c604a8995327dd8e8ccc8a30cee7a3a57fc617b845ebe65a65ac38125ca7394",
510
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/BreakTest.php": "740c84bc38e7044f5138e3816b72c6a94bca3accb592733421578a6eee2080bc6721d85cefeb8b6f1db751e2056fbf722e0dae61d260b089dd803e72cd9cc0d7",
511
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/ContSpeakTest.php": "f3b641231907bf807c5c09b65a13409ea054b0116b9b36f5bbcc2bfa651592ae1f4707be5780c37c5b9f1516044a9f524f4ca829cd0b5387a6a32526ba11cc94",
512
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/EmphasisTest.php": "b76b6d0eee048b44965f87fa6f59614e64d885864ef3ff0aa2310746d76304fb5ac6cc6d0c714e7560e5472e018fd0183cf9a918d3e4ee5415723314d7d219e6",
513
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/LangTest.php": "1a4ef409ded7d9c7abd8c63994dd3e221b16bd1fcca8133ce43e04b300a28468cea68e430098393acafb78e537e37b0574644735cb84fd08e33dbd828e2fb071",
514
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/PTest.php": "9084715ad9065f1a926e8dfdabc5816b16a385dd5cd74f16f6fdfd1aef043b7d344d9cdac4b9dc43df85e8e63f329909553e20b86d995d9eb6d25d716fc5fd1b",
515
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/PhonemeTest.php": "f85a3119f95615c3d3e16c0a4c1d2aec7b2191629b60de276cedb769b23e11546fc27fff57e329c1ac6cb52868208d29f88d1412b452932b573d88cee9fbd68c",
516
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/ProsodyTest.php": "5aecbb6cb41b0269b0895e580bf87dae24703c3116dd39774c11d52406635f4167bf55ed0b950cb4d8af9138c03361161527c7f0e08867053034d8aea1fb1daa",
517
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/STest.php": "55343bd191ba9b88fdafcc409c1685224cd6673225c1ecdc006d4c3643d9e4f71fde0a07ead3f1bfda80bed486f09a7fdf42e16cf3d4fe66f592bb72397320bf",
518
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/SayAsTest.php": "005fb0efa4803847719d9e7d52438ada0026b3860d7143fa4deb96a80826ff0f8608b3dd9302617547dd36cdee5293ec25570dd6513cd81a921ff483379574ab",
519
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/SpeakTest.php": "cc92de5d0f5df6de17b121249074752bb191265335a6e50dcc4739fe525cc9d0014c187a7d15cd0c1226c56360277469ba10da72dc56dde01f478acc510a8dad",
520
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/SubTest.php": "5c113371cb363691313226362512772facc38c30afdc32e96976aa309d6ac33aa32bab7d4ba674cd566182641048434dc65cf1403f25ea4adfdf6c6793db2fc9",
521
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/WTest.php": "f7cb4983bde61290a90fac15c009ff1780b02fb81c8568d0e8a1f40fab97dc1ec2245cd477b5ec669c6f54e56bcf7351e38c09caac7255756174baf4070c9284",
522
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XmlTest.php": "58317dda536a0383749d695ee8cce6f73d6ab413984673d46b10d9299e5a70c6cc464051e986b75c849286787a8fb23ef15e8bdf6bbc9a27e1c0cadf46a1bcd3",
523
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/bootstrap.php": "fb1c83cc2a11ffef9903eaf721f4cbcda4767f70368be33a0980aec4e5b515fa8258750f6e19fca0eff6843d0294de9c35b8e95af0e62f51a94442be0099720d",
524
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/phpunit.xml": "74191aa62aebbcf797167fc2bfb6bb304cb3d309287a73919caa1c43c188dcef47a1f1905e56143952e4b342ef183a84887dacd6976c18e58025582d5f672035",
525
-        "providers\/Plivo\/vendor\/psr\/http-client\/CHANGELOG.md": "82bb81ca074204aff5d95ac5d3edfa9c85569c8b9114f809e3e2f9525a6046a1276187ca42f638ed428311631791f60e6dace74cd60d77f1af0a41e9f76ab2ac",
526
-        "providers\/Plivo\/vendor\/psr\/http-client\/LICENSE": "3e0ee70fc857b6dda26ef2eafa55ef09384d82bb2f85b4289abcd94a60201c698eb477dcf03a73858b2cbb9efcf00affa199e848344b84dd4a4c135601e886ce",
527
-        "providers\/Plivo\/vendor\/psr\/http-client\/README.md": "a8fc38f5744eb4c1f14f5016b02108319b7cceea7fb3219f57f0604a2e92778fa9be6f1e340003b095f70c962aff0b49ccfb0264b26eecb8fa7782667e62cf3a",
528
-        "providers\/Plivo\/vendor\/psr\/http-client\/composer.json": "b767c510e3dc28fc5c8c0debf4e5627f4897940d41ced88cb0c85284c2e0765f49305997407e84d87154a4d9e14045e6c50fd86163d3d7452294af8b7bc36ccf",
529
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/ClientExceptionInterface.php": "33aededf573747615cbf7b8bc6aa10faea7762c903a0cc98bc43803043f9bad58460f09f7301814c22e95f2a6d0269388d8ca899ab76fcf0f2bd8d82aea5d9c3",
530
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/ClientInterface.php": "11b1cee24748c4ed1a41681b1b6e43e865e08150be14452de885daaca737f4029d65e8381632a23910789d3cf5e9f9d02f4999aad62e4e8c80a2fda9ac96a4ed",
531
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/NetworkExceptionInterface.php": "6d3d81d18a51f451e8a1b74a16b3ac8ce6c5642013a2d1375ce6718090de5369779f9d6f594675aeeb7bc3f55a11f1b9396036354c4e9ae0c90183ff369fd65e",
532
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/RequestExceptionInterface.php": "46391124b679cd54538ce5ae6b05d7fcfb6b9ef7680f33c8771f94b38075a366788293b757ccc674060d615783476e1151d0ab8a5f2a10e24578c9b46cc1433f",
533
-        "providers\/Plivo\/vendor\/psr\/http-message\/CHANGELOG.md": "5567e49c016bd259491fd13a96e5b88629fe67ccaa0d75f7aa7c54096edd663fc743930eeade981a041cf7524d9f65104718c129fa36a200397d30c0e5d2c954",
534
-        "providers\/Plivo\/vendor\/psr\/http-message\/LICENSE": "22ef0ac33682fbed60a5274a5b25991308decbb45c6ed45fb3222cc045bb9e552fa7310b1ab6f38329b63f53a02c25e7bc5e955ad23c5bb2366b417563cb71de",
535
-        "providers\/Plivo\/vendor\/psr\/http-message\/README.md": "d58ab57a3e35e51848c3c21313836c88eaca950eb5b716878ba950ad2389bdd84b24a5fd8e6b19ce3ff04b07d879b5206b0f26d5e3a63a5be19beac0e9ccc1de",
536
-        "providers\/Plivo\/vendor\/psr\/http-message\/composer.json": "4f074821b6fb7074c418bed0fb6232677a0cf6ae5ddf24694e14bd5aa7fb3610a645f2221fd024e7c4bfe3e95501421455dcfbbbb38468e9db442b8cde9471a7",
537
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/MessageInterface.php": "b79e96e691ad169d4d70420953ccb5933301ce7cedc17d4eaba859dbd56719008198fd201e3be1606ea5dbc78b559f1d86ba17b73ab7e843f0c2f0b49564147f",
538
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/RequestInterface.php": "f54aefad46987c6b4880d5f09f7e99909e6e2a99f9d305d1f73e4de58b43493179149912352869e50fc46e057f50c78ba7ed5df6280a7c0347f3d7c36afcbfe4",
539
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/ResponseInterface.php": "69d177fb504f47ca0181ab35e2155cacf16e77535d07bf4eb4d790e1ddbc7a133f3de21eff936a3e75acb704c936ee2f2b12b2cf3516464222c3d60ea9760488",
540
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/ServerRequestInterface.php": "ea36ff66e8bd962e468fb2bc832e70f7bbd81f92dc0e607cd69092b737609d565f3e254a2d54fb3588f5302315f62e53c6eefe9299ba4b6f1f53ba8feffa815c",
541
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/StreamInterface.php": "11ab8a9d07beea1f1633f8f6cabb2a463ff288555f2fb8a4cc0b99404d8580493018557a0f2674feef653be51f6fb8d9aa3ad8e6dede0391cadb7bb49f96f781",
542
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/UploadedFileInterface.php": "65da733a08d80c5490fec8e69c7b56a47efc522e720a2ddcc673bd74c0e21f5fad4d522ad47da4942d25d139b5392e0882de32b7fe5a5697b86f40fd96ff0f8e",
543
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/UriInterface.php": "0d46735005331a3489e3ef4c8229307320de44b0443ff74d238cf8f3962d83e99316da9435259d479b48477d33e8713dd3d1a1859264c22f2a53b43cd6adae2c",
544
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/LICENSE": "ba7ad111dab105773d8a75d20024b48c4222cba6f7836b7b608fddf34f367cd218302829a1926a675bfd22660f4562b0e9a679d15b41162412924ebcc1a4e557",
545
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/README.md": "48ce2def80836640ced369db92da9f9e943b319849cc89441023bc260edd6919c710d08c91fbdf04864c6e08bf89e60a397f5e814b3e9699b48df574f5799522",
546
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/composer.json": "495b111d0e0b4f4496ccaec984dc89c897f189a67d840c09b0cf17034629e1c896c37c4ddb1afdceb7d5a188dd0d90405ce34aad409d3b7722169628411d3ca4",
547
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/src\/getallheaders.php": "a61a5f91f21a68108c7e9c8eef22282e4b1b6f6f14ff997c5f47c83f39acd08ec60f4b9d25d306d67fdc68ec57c7f71a44a1f63ebf7c25b40ad61fa1cb4e58a6",
548
-        "providers\/Telnyx\/CHANGELOG.md": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
549
-        "providers\/Telnyx\/LICENSE": "8756122099aea86ddf6f176a480c0454f2be6dd278e475bd6be7d7ab3d572162f1bd44c9f623e52e53514cb15336be6e84a5eafc8e2a347b481ab5799ebd6e17",
550
-        "providers\/Telnyx\/README.md": "321748e1de717ff62ccd3fb2c10fbed8ce92a66271f2047c83be8929f965c179cd163e429175b44893ae30addef3623f96659b98528a405a585f7afc7394e866",
551
-        "providers\/Telnyx\/VERSION": "7558cccb74c98362a480e1c0ae17e711de8e5d6cd10f508a31395105c0efb22cdea79aa6f9f6f890837d519acafc2cb3c429d3ab17a283e1992e5aca5053e25b",
552
-        "providers\/Telnyx\/build.php": "485d76b827a54d8455550e8a8f8d14862f9444381da251e66c2bb8ceaf2106a554c1cd339666b1260450749d0244d6b9ba0c6d0a2220ab2411aa4041fc83f8ad",
553
-        "providers\/Telnyx\/composer.json": "7ab90dcc0b5854786b213e5f2ee8c8030b21f65b2f8d0f74a3aa6d771ca1054ae5e1ba58ad6684dd1234e7eb7244be537cdb0a6888172cffcdaefcc7f5908dd5",
554
-        "providers\/Telnyx\/composer.lock": "1e4b665caeb711f94b1e7f0ce6388e91ada9973159c1230d4e60f0dcfd44ba9af2dd236e6acaa27564e91b4a89dde817d5a73cad8682aa9cb93b203f467c6be0",
555
-        "providers\/Telnyx\/data\/ca-certificates.crt": "66816e077ee99ceb9535a472e6bbf4f0e48ca838099c8a97c7baf3297fcada9a43016ea1ded63a455ee56a8f18501417a0f744fc17b215bb599cafd76b754518",
556
-        "providers\/Telnyx\/docker-compose.yml": "1fe4c651e406095f0ff1bfc196406d473184bf53cf80f7c67dc79f1aa94b26db74174e0e9bc47adc95eb2a5f6eb950255c4a5cf44ccb7029ba712df3be9e6384",
557
-        "providers\/Telnyx\/docker\/Dockerfile": "a63d1fabd8c19fef37b90922aa4bb21fbd1094635666cf2a3a4db47009888bfd3f1ad5c34c05184e2ccc8f581971f6dae91c1ff137730821422cd482c39e9390",
558
-        "providers\/Telnyx\/docker\/entrypoint.sh": "2bf3911c365a271fc52d17a0aac1687abf52e5286a5d52cd34367e18651dcfd6ef1f791b54105b7742f5d691564ddca3c05a9ba4ce8edfbc68fe919e0bdf6c1e",
559
-        "providers\/Telnyx\/init.php": "e590e355286b775423b39dd23b5aa0d3383d8a85ed2d1346802e0c487cb834154b4ba1b0ca41ae112ba81cf5afbcc9133db8747e08565c00fa3b0ea04fa7ccbd",
560
-        "providers\/Telnyx\/lib\/AlphanumericSenderID.php": "c6f7d381cd9901af59d67c66fbe6ace0729c77ac2b2962ce41351ed076cb39c9049aeeb72ba0e3933ebce4ab8a936b86a7e21d30a1c07b2b08cad9da2abcda1e",
561
-        "providers\/Telnyx\/lib\/ApiOperations\/All.php": "5caeaf5bede40fa19422387d224255ed534a866638b22a7a832111cada5496764bc0434cb1aa7365e1d4e0a8ad55545bb05a42a17ae5f2b361ed42c12166a229",
562
-        "providers\/Telnyx\/lib\/ApiOperations\/Create.php": "811f9227ecc5acb172e8e7120541227de0bc22cbf66a41490b743b3e49647a38889d5cfa5d64139b602572f0fcc0fbb96e3971c78801ed9acf7b50db2ab7499c",
563
-        "providers\/Telnyx\/lib\/ApiOperations\/Delete.php": "4c03010d81be8014694e366cf93244dd2f73dfb38fe8a1f3066b6ce179b999967de5a9d3e3140b3076d0dbbeccea329ac750ebb93915ced1e44891ab589f0c7f",
564
-        "providers\/Telnyx\/lib\/ApiOperations\/NestedResource.php": "390efb020ed7c101b32379716bc2111e83273e2a7092da61623f85295c67ad1f6ac2fda617ec91eb28d02ed52a86db9992ee044356f3d96aff2e3474b16da601",
565
-        "providers\/Telnyx\/lib\/ApiOperations\/Request.php": "5b947c7171a05a754fce9c5bcb81f93c1614db086fd4ceef9be1a57977f8bfa7311af0a60a2879d8cb9380c64ddbf7c991738e5b5a4e4b2feb5d88e25c822f3d",
566
-        "providers\/Telnyx\/lib\/ApiOperations\/Retrieve.php": "d2a5aed1aaab9421f2f2b41f69047a70bdea46082e118cd94e087f4082865313d7c67aa037fac194063c53b06d9dccbfa5e65582a9adbbcaaa2982396cbda01c",
567
-        "providers\/Telnyx\/lib\/ApiOperations\/Update.php": "a102e823a46dca1eea6c0bd67b4b7c63bdc0d074c97b42a830de18006782309d3c5f77103b32e82c778f670aade73d3c31f49da49682d9ac204560bd868cd526",
568
-        "providers\/Telnyx\/lib\/ApiRequestor.php": "617ebb71c97dbd896ad736a4e1235f784ea7b89dd73a980a2b259820e3dde0ae935fa532d1fc8e0d9e14a63f843e880e074319bab2f9c519c1ec19467f80bbd7",
569
-        "providers\/Telnyx\/lib\/ApiResource.php": "5adbc90947859652ee20745236c330c5a3124edd3140cb54cb2d4ecb46409d4d825024708b6bc0a44a418f181fd5631a65b41381aae7a55d7c98d80ca9751b5e",
570
-        "providers\/Telnyx\/lib\/ApiResponse.php": "0d292d053a85224f4ac839f54253decab0eec5ae9861ca95314e98cad0fec2d2f0a7e712a8ec433adb302b6702d69262c8866b20fd08d67b2d18571965bf6789",
571
-        "providers\/Telnyx\/lib\/AvailablePhoneNumber.php": "7c82ca4fa28264c4fdd910c71741270657e52cdbc760343339bbb7c1d5980d27b7af476f7e1bd431926d428dba685a6e34d250f9678ef0a4e3cd8c4b06289e55",
572
-        "providers\/Telnyx\/lib\/Collection.php": "8953b7490974401e598cfdba09be005dcc037ff74d7eed660d11afca7a45d62c47f6b6c4f31b3b3003f3d9401599283122034362618a9c3d487eb131d05cfa13",
573
-        "providers\/Telnyx\/lib\/Error\/Api.php": "5c496f65e000a74652c5e7e3c79303befb693e497d67dab4e13287ebe72722c9651fa04c4de4065ea969e140f7a2f74ccaee2ab728f05790ee26200558d0085c",
574
-        "providers\/Telnyx\/lib\/Error\/ApiConnection.php": "469821ef557d096a088d2997f762b4a39c82c49bcf22ca707bcbf611b20006106522150d6365835e0c7e23e3303bd407d78181fb7b5d86bd35095645e68da158",
575
-        "providers\/Telnyx\/lib\/Error\/Authentication.php": "e1c7a938a695fcd8602e5a972086989efd349a6d8d5e3abddbf6f548ba2e1f9bdabe708b5ea75474f7c3588ba7cca8a1dc60970a8be70a80962f90342e67c13c",
576
-        "providers\/Telnyx\/lib\/Error\/Base.php": "9d311a5445b2f3d9c4e25c42094734c3d6243fdc5025c7e5a609ce49d2b2a47f01ea2f163154917f3330e1a92d30a736319c4daf3ae18bb6ddc41d131afae0ff",
577
-        "providers\/Telnyx\/lib\/Error\/Idempotency.php": "cde2f56479baab53e74c6784878c7914e7393b655bfdbf7a36e0619fa9c521671c105c3d5002983b3759989a22eafa0bba7b4aedd4801d7d6b820842c0285e35",
578
-        "providers\/Telnyx\/lib\/Error\/InvalidRequest.php": "0c5748224174c20020155c9f0c734121d07c752460ef63648b08a2392bb6d8b6ff0a9eba13ed1cfb8988545f6dc8c70930de6e78da03c63da0e59bc5fa109a9f",
579
-        "providers\/Telnyx\/lib\/Error\/Permission.php": "3a03b08e77e6fd0897de16d69fb3769707f6fb46717b2a00f1282d7b3e33527f5ca5ea94b6df03c883ea177520140ab2dce4986e0ee0977cce8c375e8a5011fd",
580
-        "providers\/Telnyx\/lib\/Error\/RateLimit.php": "0ceb884f1078559f5bbfbba6153e6bacd6ebc49dac2d047da9e7c64d45c7cff0abc067711366aaec74a4f2736b7205c02ae9de8c214871a82ed1fc53faf4be73",
581
-        "providers\/Telnyx\/lib\/Error\/SignatureVerification.php": "8aec6ea46f62c2b6ecf845cadb726332f89a6c0dd92f4864ac71ffd25268b2af0468cfa83b32a24e91c735ae947498bdc6181efe09857c6bfa799cec721dadda",
582
-        "providers\/Telnyx\/lib\/HttpClient\/ClientInterface.php": "f47e88048bac320e8cabb1b61869f138f84a04858afc3b7aff4de858db9b3efc507d1607037bf07ec5fb1f1df4069b71bf8ec1d0edf953bd1eb8255e67651ae9",
583
-        "providers\/Telnyx\/lib\/HttpClient\/CurlClient.php": "fed4939d221213da7fa7865b4405e5c0b7dc092375e5acd890bfdf178baa6572ec7ac7ad57cb02caab5af24d2aa52763bae1b21679f3b94e6f7ba659cee7a438",
584
-        "providers\/Telnyx\/lib\/Message.php": "18acf4bf51ec27d330df16216924c65a45db59895b610a3c803ef1d09beb7d96d20753b4ec16be06ed40f2886ad46bb3d866f14a87021484ede5d33ac1a93c4a",
585
-        "providers\/Telnyx\/lib\/MessagingPhoneNumber.php": "2a2caa5e44efc5de92ef9b0f8ed0a68af1ab2c80932f4cd7fe79caa87ca1e146af3bd0e1d16d977738da2a3af1fb3cef77081c32a0dac50bbe8ef54a108efbc9",
586
-        "providers\/Telnyx\/lib\/MessagingProfile.php": "351d96a913427c045f534b6993c37fa6ce2ecbdd7a398502ae6447d631ff322ce146cd73dcd1161c999f6bc9ab9764221b4bd3567888dd14c110b98bdc4432b3",
587
-        "providers\/Telnyx\/lib\/NumberOrder.php": "52067d9999c150fbefcbba9969b308bb6118eabe25bd08f30cc4978cdebd68fce4479e53d71ce29632133e8c69bb4ce9276301f5a36ea95bd77d29fd057f5d46",
588
-        "providers\/Telnyx\/lib\/NumberReservation.php": "2b44bfa3fdcce2e21668004d458e9e6bcdb5e33cc37e9a0c980bbdcacec945dc4e06e489bf5b9d0194df00229a79e39bc2a62395d44e4072473441e258841baa",
589
-        "providers\/Telnyx\/lib\/Reporting\/ReportRun.php": "2a7b066db83e08b86e3da4c0b2d041c4d53ce0a1fc95ca3dab76ad2bbf549d74f9a97974be6bbbf0d7b592a814a00b514bb26ad13c7621b5c229f9bc40abac7c",
590
-        "providers\/Telnyx\/lib\/Reporting\/ReportType.php": "92ad055c626d39d9f878666310ffec1c425d4625af9e7803547d50f1684c166ea1dc67d79c35580ae08850bb6e570a81994014e82f4d4080377cfbc664c4fbc5",
591
-        "providers\/Telnyx\/lib\/RequestTelemetry.php": "cefdb55dce61e5f276bd49f6b49e57c78085338537e56cce6fea5a81cd1d2235f1eaa78be326cbd513117be88a046177afb628659088b66ce423799995c53709",
592
-        "providers\/Telnyx\/lib\/ShortCode.php": "4abc882d0dbc72becbff07212d17b8e1383b0efb43818a7eab983fd2a08c3f591a4f4ba2f185003fab0622a43329c969d2fcc80b23cb94410007a0879309ad49",
593
-        "providers\/Telnyx\/lib\/SingletonApiResource.php": "f11599b789dfaef76ef6cf10bade1b426d2e16749bd207c6d08ddd007fea470fdbf0492f9a59cf8bc9f8589aa4532cd6c3887629cf27060696c3f086b0a48673",
594
-        "providers\/Telnyx\/lib\/Telnyx.php": "4971ff61049149242b0cfdca4a15dce213c465ee697cb444eb47da8215eddf2737508164c59393bd7661cf40b1a525afa9fc0df0dae8a071a59f3646a5ec44b9",
595
-        "providers\/Telnyx\/lib\/TelnyxObject.php": "a1bb11b6bfecd69ba694dd34d6309707e916ef45edea1e81e160c572dc404aa4e16841f3be7a82b3965037efef24db7c7c9730fbb65d26e8a188d30fa9af01f6",
596
-        "providers\/Telnyx\/lib\/Util\/AutoPagingIterator.php": "d03ac3841bb553d847be9ea73ab9debd8c1f2c829b0d38ac4416a121ac535a5ece2ecd9943d89e720cb5abb1c907ca9b96df899a561c190ccd6843bde785114b",
597
-        "providers\/Telnyx\/lib\/Util\/CaseInsensitiveArray.php": "bcdf3fba35ae234bc63ba6cdb5429aaa5fd6baed85857991abb9eff854b23eb7a878184ed038636292ac470b67f91c6bf8d79c20a6214d31c872d22fe51833a5",
598
-        "providers\/Telnyx\/lib\/Util\/DefaultLogger.php": "50a69f9f6ad628e489a05fdad0df811c926c957c301adb0b4b906dcce9733a0598f6c2eb126865c54a0100131dc4230a834b1e98275237ce8e90bff2e96cd0fb",
599
-        "providers\/Telnyx\/lib\/Util\/LoggerInterface.php": "8d2dc2c59af5e625eaeef0b85b09f78a42e533b62fee84717d67a4c706fbacd94674f439d3ac60984c0a3947b7d2f5a8ccfb64e071c41d063b8298f57578f88c",
600
-        "providers\/Telnyx\/lib\/Util\/RandomGenerator.php": "292c880420b28390e3d734c6343acd48f322db0c474f80430402916de1dcbf8e988b3d2753a7c18e763e632f474284b213ccc8e8fe4e52f00569e72728dcccb4",
601
-        "providers\/Telnyx\/lib\/Util\/RequestOptions.php": "61a13e62a72e7fc4a1f4d2a707d03ca785af36dd8566e037efa4b1a07d91debe1bccc637bbae6ab9dd836b20a4133cdb7316d6c2628da0d13d2164d6613f1e3f",
602
-        "providers\/Telnyx\/lib\/Util\/Set.php": "1381d2144748a490fd27329fe231e9d3a9a8b428499d4005f9ff18a946c350d8dda1ea90285314a1a99f5d351b1b235ad37a74823c37d7345da8af528dbbba87",
603
-        "providers\/Telnyx\/lib\/Util\/Util.php": "d7c35dbf5a2832ced6059800a6730fbe75338252641edab902adfb134a179d96e162f05bca2902c6c2d99cf4827d5b89b0daac826162c7d460e17017ee405606",
604
-        "providers\/Telnyx\/phpunit.no_autoload.xml": "06ad2f4fe0a292902757629f5605509f32a0d1dca527550619c98a61519d83fc70f3c886b12f5e5734b1031186fd9c7fed6fba813cd816b0f07d36c2a6bf11e4",
605
-        "providers\/Telnyx\/phpunit.xml": "82ac037adc20f2aa76682878094e8bffbfe31782dc6a94e2987bac5546e3ffec90577d03715f4ce481cc977685eec9e4109a61b4b46bc19351c2cad555d7cadf",
606
-        "providers\/Telnyx\/tests\/TelnyxMock.php": "e8e93ca1114530cb7e9cad46eb20e32072934496d515a9391ce8093773450dd60f3288f9d3ba46533a0f650fe67b508d5e54bbfc6e1642443d1fc043b88eaaeb",
607
-        "providers\/Telnyx\/tests\/TestCase.php": "9945df738b56e344648cc00d3d4b94345c15d8749ce511b5095a87d5e52aed35d8e3c773276d9dde9d9fa04eada784a55e4876ebf70a198ba719c8e94c8c32d8",
608
-        "providers\/Telnyx\/tests\/api_resources\/AlphanumericSenderIDTest.php": "1db47c5c215f1dccbc0456035edb1619cb7575dfe2b152924a6e1abe4a021bf63be3b1d1cf1b86285c5425f5df46c8e396cd66b6ff6a27534e402e145e5fb194",
609
-        "providers\/Telnyx\/tests\/api_resources\/AvailablePhoneNumberTest.php": "823ab5138035a84a790d70c9bc5964e7aa163f195aeaa2fb50d2cfc7068f1a77440f09a134bec36a187cf57cca6c735b428b225239a263aa26cc5cecbecdf6d5",
610
-        "providers\/Telnyx\/tests\/api_resources\/CollectionTest.php": "af248a4d4c4504f5fb7148e8f5ddbce3a05cc859a761f57cffb8335be10b07ef6d4e808002601f92eff2968e86873fbbc3fad838420db0694f81b9cd95091452",
611
-        "providers\/Telnyx\/tests\/api_resources\/MessageTest.php": "a616a69339b599526dfd24a25d8e99eefc99c2341bb7d4f635d1b4984f41dc38a3eb6bca3e4242caccb974b141a490624669b5c2b2f5315b6cb07540d74fcad7",
612
-        "providers\/Telnyx\/tests\/api_resources\/MessagingPhoneNumberTest.php": "40409c270a6f9a683bc690f6e91051fe1ac4c8a6cb1b4e5536416d64fc3f8c81f327f33e562ee94cee1481e0ec2f13148b0dc3f76f3f20a49a9d80adfa5c1afa",
613
-        "providers\/Telnyx\/tests\/api_resources\/MessagingProfileTest.php": "1ca7abc2b47f221b491ebbe7def5569deada6eaf4184bd6e6327f7bf2da15669d1fff581e24c466621e8462e816c0a12d02e0aa1d91aa3746092f8a09a9131ae",
614
-        "providers\/Telnyx\/tests\/api_resources\/NumberOrderTest.php": "dd6e4382dcdb0cd60ded9d9db6262bbc7f523e8f5eb842e15655fe8ba4e24ad5192b8be40bbc762de2c62de3aeec31e1373063420a99e39bf02f5bf74915d5ab",
615
-        "providers\/Telnyx\/tests\/api_resources\/NumberReservationTest.php": "8b8386c0e044e120b6d60f97433c9ecf0ddc272f805034768300bf01bfbc731a3f6f964758e509d650013df03bca66eb1db13fa1a24315df76ea55fd86287fd6",
616
-        "providers\/Telnyx\/tests\/api_resources\/ShortCodeTest.php": "8aef092868b89adda6517905c7f05245b3c39affed4c7723e5a32cf17b8e39528e8925923aad4b2add5a0bbce9049a8f934141b87a790fcb002eaf77aa494258",
617
-        "providers\/Telnyx\/tests\/bootstrap.no_autoload.php": "cb002f7c8f77834b6414db6535f083bcd227ee6085363fa3cb0f66b55226680a45c8562fd8458249868465957b2aeae134b3379f8ee2ed22c96425475e9c0af1",
618
-        "providers\/Telnyx\/tests\/bootstrap.php": "50e143ed68aceb91d3e119d5a31521e76bfe9876bd780c90ac83afb7ca4f32be48ff81c33c134109eafe1d22f35e0957a9a834966b8853df99dc1df04795adf4",
619
-        "providers\/Telnyx\/tests\/data\/test.png": "6ad523f5b65487369d305613366b9f68dcdeee225291766e3b25faf45439ca069f614030c08ca54c714fdbf7a944fac489b1515a8bf9e0d3191e1bcbbfe6a9df",
620
-        "providers\/Telnyx\/tests\/openapi\/README.md": "0c54fffd5b7a5f393358864ff9e3bd3793075d6060cc1336603b2455d60f16d160ffd47b52bca6834acf0d9713855b386f69580099a3dcc131e8d5d617975ff2",
621
-        "providers\/Telnyx\/update_certs.php": "46dfc1129c3dff2211cdd8274fadd8629c450e94a7a1c8527373221b25a0664b6043d6b007351ac9afa4b40ba349a7fdbf4ad2e088cf0a8d864f7cbb81145fb9",
622
-        "providers\/Telnyx\/vendor\/autoload.php": "1d4735a3ebfd65901ce478f8bb98ac576ef9ba2706f17a1c6ab125979a882ec7ff463b577fed1c418f817c1a56e842fc25b6aeb8e7ce6dcdd554a25e03959c3a",
623
-        "providers\/Telnyx\/vendor\/composer\/ClassLoader.php": "866e8cbde808b4e7774c5d9e2bdda44e84ff9bc84268785aff1a75277bd7918dc26ceeb27732718c9ea93756777ec0d16c09c15f9c1179be3cbb410c7914d295",
624
-        "providers\/Telnyx\/vendor\/composer\/InstalledVersions.php": "86ebb1216b59b01b7cd1f3b2e66311cd6295b58fab91a9a82603f903c6d2f716d7697a82d625372538f809e9e45f7dbd257a00e2b95d23c3785e4eeb3a6ebb60",
625
-        "providers\/Telnyx\/vendor\/composer\/LICENSE": "f3bb64009f41a425df5a9bbab53490f0eb9b74fa8d6aaa2f57efb928edc4ffff330260666edeaa04a91fed708c3663371cf01b284f3a08d6698aaef7a23f355a",
626
-        "providers\/Telnyx\/vendor\/composer\/autoload_classmap.php": "a298b75d605ec9a330a5efe11769e79f02cf202f49d8b241afbd175c7fcfa0ac4db8e72a29aa1d839138e3b181fbfeca525181eb57e998a4a2c14ec9e457cf1a",
627
-        "providers\/Telnyx\/vendor\/composer\/autoload_files.php": "107b2d75757e7b39e2d279e373fd4291d57e91a7f442b0f880b51d07e7119beb9d41d1cdf916131bba717e8da953e2117ff83f1bd9ef850fc1d9056d0f02996f",
628
-        "providers\/Telnyx\/vendor\/composer\/autoload_namespaces.php": "30324cf2dc20c214c5b5c8fdc2099b67772149ddea1d1d51969c711be9a83d036e43746c600f958a6b49969b16a10ef93e9b1e3d5af9714721ead916b9aef344",
629
-        "providers\/Telnyx\/vendor\/composer\/autoload_psr4.php": "02804e683dc13b4eb2ad98284be2dff3eeb97f0ae9054c3a45641ce7e6144a3b5f34ae36eb764fd2faae39fe5dd4131b4dffd4649c6ba3220ef24aeab45efcb4",
630
-        "providers\/Telnyx\/vendor\/composer\/autoload_real.php": "469f95fde429006c3262cabe72cd49970b0cd6098b743d8e5a646af25679dfe539c98d3337b51a8faf7f30d9c64e1def8d131a93e8897f801830e7e1c4da5874",
631
-        "providers\/Telnyx\/vendor\/composer\/autoload_static.php": "4845f043e32744886f456f358ea87cdcfd641508151ba6c3b0169c9aa53fe111f05b78b82e204368da01da68d7007709c9140d08dce4e7dca3cc4c9f60397dcb",
632
-        "providers\/Telnyx\/vendor\/composer\/installed.json": "5ca47a408f164e118f7ccba81577933913002efce47331f2eeb13f3e24d78878521db08454026d270deaa6552095260d745f0a424c91eb7efd36f6a9a20adfba",
633
-        "providers\/Telnyx\/vendor\/composer\/installed.php": "38fb24f1f4e4aa0435926d601c7b78797c231eb0e3621e370b17078645f5d238a1d02da3a29cd14a9125f78f53964445f4326311f6e830cf8faa24e944215ce4",
634
-        "providers\/Telnyx\/vendor\/composer\/platform_check.php": "4d385b31994301facce94382fa007a56ee32268d2e1cdbe7c9f9cfa834ed4195d3cf8e8e7c9a800c97aafe2c9b46f3c1a93e632c7415e8a9e4a282c083cc6f9a",
635
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/LICENSE": "0c0bf603f7e196edaf56d02acbb2e14df7f73a2da0617d62b5fc811f088c29865ecdbc7c6925a19bda63132cc651c56f1cdac79dfa02aaeb3fcca49033636ee0",
636
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/build-phar.sh": "a5ecc580bc6e95a9c901ad1a0097fd47ab857dee79d0221ae463e27f27cc8b2227e1975ab2699b9d0782f0b0396ed9b3ac0106f53fe61315cd2954ae54beb333",
637
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/composer.json": "c400438df2f41ace7bff40d284236bb06c6095ac03b58caef5b062e7ef317bac5a6bf551c94459ffc838acdae7df6cdfc615dfc3cbecd16be37ba67bd948415f",
638
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/dist\/random_compat.phar.pubkey": "e8909663e5350be2fa9416e28c6b179c41e87feab8da0d6fa6a41c294c9b00e8cc40ae8bcd03997770056f70d946315fd530f72f42974f63195f14b3c675e3c9",
639
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/dist\/random_compat.phar.pubkey.asc": "f07fb9c7b00f297e73127dddb1f3986fcebdb0760454765f6ce0977347919c0c74ea197ed310bcd86dca7ed227812bfa6d1595c44e40f10c085cbcbf602e163f",
640
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/lib\/random.php": "fe4539e2b55b47dfff1e2256c91498e5a41a85e28e42d790fdbcc42102c16abb09b0d7a0e2268ee004c555e1001241a9925fab1eeaa16c11ae2188e1f01540b9",
641
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/other\/build_phar.php": "370c622746a37b65aa6e36c2fb94486b4fb01f2db3f3c9539a7fde711d1abe3f9e9c30bc61f4200e6da9b47086c207b03cd7258d77dd2ea6b48126a618e2fa0e",
642
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/psalm-autoload.php": "f05ea11c8e973ddffde4d60688b161701217ac8e5c9237cfb57babf7113482d5e19ea441f5092eb1448a21b95ceed75f994427d6febfe0de100c376ed17e91c3",
643
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/psalm.xml": "88c631fb2f70a79d0e56a4484fb7ae8b6b3502ed2a9599757e7a3302c42b0adfc6f0c45c9916b88d7430f209d8934b6121221dd8b424dd913c49236db7ef01c4",
644
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/LICENSE": "db260eb10b8775cb408f675dcbe11bfb1a738d638f4215467df6c4bd03b8265dec7712fffa30dbcd38b5ef944266c3963343d033f497eaa6dc602f55fdd8729d",
645
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/README.md": "82f123f85b02a7e91c3ebece404b85ef5a0950e0ca79bb0841735a5a03b88d1a3efed4bc8229b3ee1db245471cf58b81923ac9800586ace3b794421f379f7bb3",
646
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/appveyor.yml": "ed6f025871e47d5afb1eda2e0705a2185670c447279cadd8c0fa796779fa2f1d7a5f17efaf6412c403e40bee345ac3224a45f9aa0e5143f06ea5e25ba8cb848a",
647
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-fast.php": "a40c6c77f211a2257d3339ad80ae7197ede8ba0a94c76b48052cfbcc8ce903959dbd8e3434e6660bfce2c5e935cb9f38568f96cf00819d03f4a1c46cd6b7b0b1",
648
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-pedantic.php": "c1a0e8a5b461135bc58ebf0a37d75e865d9e44ce666aba9a95d6416cc7d57a834aae6fb6ef4a9cb4176690a4e41cdd8638106a11b32a155f3a8ca3acebf7a504",
649
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-php7.php": "0ac98043c8df48e7bdd3a20c11688ad3702a06271687e1019c2a7288288532ea593e7e462635b806c0b18dacbb8f2bd6d9c700a61d2b1deb90eba0b49660b008",
650
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-phpunit.php": "d34cda9cd77a67d93817d5b9b1bb51a13521b2539f9a8d0189debb1938934df1d5fd51fd2a82c9d4775f5a8613708a1e78687fab86c3afdc356bc4b02045bc66",
651
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload.php": "91c2a6366a27a76a0390c69dc4cf061c73cb03a22a3303aad673cd08e8cd659c7fa7e6796acdd9d2d271f015eb16b15663c5d21d8a538fe14f459519c9f9e8d1",
652
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/build-phar.sh": "5bc154a32c62797e85b82595da69ed11676d98deb9644b62a12d5ec169d3edfd4d3b24c67170143f12ca63d9bea06cd0803f68d5e63a7849ea9c4dc9483f7b4e",
653
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/composer-php52.json": "10cd40189c6ef385b9e21311b8b2bc8f7943273552227c8006a38889d743fde82c8c61286484d59bebfb83e645a87cf6d99f29409439a1057fd16a4ca7727417",
654
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/composer.json": "e9b03b450c47dc1a593e35493c7c80c373f958ac5ddbe89a163f15e7a30a8139ac0f9868466610899e3d5e5d573d517bf09acfc68d2b9420e3301b39e7736aad",
655
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/dist\/Makefile": "1cb0cca3e1413538bad70b8c8a22dd68d17bcb6450e0c4ee41fab9fab09c36bffb4816dd0f7ea2f40ca1b4cec6b030c5c0cc17955d2c83ec08759e748b04d965",
656
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/dist\/box.json": "47543b120abf7596f26b58f9911963e9bd0cbe2297b65d43f74dc52130e503ce09049a4be53146387b7fb42b7640f6577e3c1f4862540d4f8a0e668b0001e62c",
657
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/constants.php": "4e0597dadc39ae7b81e46ef5f3f045812a11753d9116215bf0d905e0bb3760bc44639988f1ec8f0ae8998f507e0c99eecbd19705f5399edfacb87172d7a577ba",
658
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/namespaced.php": "c550633d5dbd23c1bb2fe9a14b787e239bd5fa898932ddb8a1b1f8909a57393e01f12337fcc53f54b24bc48a97c3ed89de03da089ffbea71ef90d48c5091e200",
659
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/php72compat.php": "85b52455b2764ef4b80d60b8d99d5f65264b2a2e7d770b2ab05871a5aad213ad35f2cd755a8b5d19b5ddcea758c024175480f2dbc89ec75dc86ccdb453f5fc25",
660
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/php72compat_const.php": "177d6b1b8fb5286842400019be1465fa0438e06dfce2fbf5e93e93d0715c161ad07c0c31c17394cb0c6673a058f34544454cc0845893242dfb5a998655c93701",
661
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/ristretto255.php": "f2c36f65a9a556c43bf9f2fcad02f1c87c29d89bb5b3d81634112defbae7ac0c85e558fb3b5a5e74d95906a4b543e7a2cf16fd444ff28888ef09d73fb9e6b6f9",
662
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/sodium_compat.php": "75e3119fb1d400aba554506a562c64c1b1b82e66277383bf307406fd1f4c68499a32b82108529d5af99878890e3551dfd1fef1ab62ae86982c27dc975dd39155",
663
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/stream-xchacha20.php": "4cf0cb7bf023249c18f2261057f994faf8c4233022651285fdf8978fe9a71d7eae0511ea1f64faf2f3fcb1ae5b010112a5a4ebe8df9fea7ce908916cc2ec90af",
664
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Compat.php": "7a8389a0ca9cb8e544b7f345c60705e1cca41769105531211219142f15c83bd60b442dbe8bd62042a5fddf31040a19ba1f3f00ba6c2a44c3160089a2605099da",
665
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/BLAKE2b.php": "91aa0293c7c821d238f36fbb1f4327e67a718b53c13f0ea0f4d6e1d1675618bdadf183d842d4dea103017be863d40762a20c644a4f3619c7549991f11a19445b",
666
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/ChaCha20.php": "7e09160954fc59c77890f28e75f7ce8b75fdf08b9d5461c5e7dc1f49bc664bcb1b7ac74e3f5437657a20729c2db965d968060b27309a4a06a252d22b7f8dd4f6",
667
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/ChaCha20\/Ctx.php": "f19f61e54d42bf154182d203594613371f430d7c78f5b8229cb9bb94e19e42bb9a8e434639accff18497cd728ef391a1128d0145b8958f8d4350ee340340df39",
668
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/ChaCha20\/IetfCtx.php": "41ac6fb53ae553db13ef5c12d8c1c16d017267f130e8a00e9c2a8ad10d723aaee5ee08f2888f016babe4d712a0f1fa50012e4ebe6626b34973c26ad6728e36da",
669
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519.php": "5404d91b94a8e6c442c3eb30b763f1dd0c1234b845b967b7048f71d5a0b6e1ab287b44f43e06ae5bd6fce31f78154b8655353d7df86b6ac699a41200b9df33d7",
670
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Fe.php": "937defa56e99d4f38a81b88c03c649deca5b0f41f5d0b8e340cadccb34ef0677563f18967bb9f63e9547137a2a1827f9e37c62005fe745aff3764e39adf86cee",
671
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/Cached.php": "3db1263681f9414d237a8318c08ad07bbe3279b7310e21a40c22033f5d90eb5d7074dbde430eec7910a8d7e4286fa6c0131938c92045520f56fe6acc37af70af",
672
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/P1p1.php": "d757efd8638aa0c1609d59c47f3b18608a0fc6e1e5bc3cb94f16fd3fa2d6125872a796f4837cd8b940ca6988db92d3c668bba684c721476ee5fdb6fb6d50670e",
673
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/P2.php": "cd70c62efef16eb21967d5bb0489dadef845fb3cd4faf0b1bb7d080a8685164b2b0fde4d8865dec22037795eea6df605dc2151f20871c31d5e9e0084f0066219",
674
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/P3.php": "56c14b848691af72c00f5dcc3d31281a300d0ea9b6ec273ff929cf30d2279cf34d51891729a5b095445fffa8a63b8c8147f4d1ea24935c86b0216b3c40aa4241",
675
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/Precomp.php": "f6c53daf36931b4289248a231da52759e91e5c38af10b2cb89a1bd7e55d29e316dc77d144fb9e52ca1cbf50db84234aeebf13603c62d58d5b3ee58dc19cc18f0",
676
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/H.php": "c2e48f6273cabcdc40f20fd0f7ea55975fc9da5a419b1c9cb834b694c858533f9a0d3e3ce768b532ea6b69ff5d2df1ae4c246a15b7129916d4034ac497ca2be4",
677
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Ed25519.php": "eda61c7ee144449df655ea9a9142d0b26624644542012652598bdc51493f61938c13651b32b05e942d31d3cfbfb7899b8621f4ebd8a5909a1ed12704b2bcfbca",
678
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/HChaCha20.php": "b5005439c15ef7aed83b566e670053819f59c415d9c5f607550c756622d7161ca32fe65dad8f688e6a292f88192637260d859302064b416465c08bbf7f6dbe13",
679
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/HSalsa20.php": "c882b541376c8eea8ab3bb63d8b51dddb345cc45ade8d5d264dbaa96427f72f0201aea828e696808155da7a978c4a1fad09723d42ec393117693e48187cf2a4f",
680
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Poly1305.php": "c438e61d6b330be26cff863f8b5c42fa3284d6e8abdd1e43a2023c2695dec643d2641b2239a9b0fbea1a34e9e8011d5094b4eb024b111b6fa903a1c026328747",
681
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Poly1305\/State.php": "4558eb5b05c7664408a4e793c2b85a4c2593ab8a1118c3b89db712f337a12346e2e882a0c638c32af733f5589a310b4a528c9bc02c136692ae82f3ac7e6cddab",
682
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Salsa20.php": "2836d7eeeec597187c456ec790107a5dc478a1f79c1c1e4ede4314bb830f865f189e048e3dc55742703e2fb7bf31275f515cca57ab5bc47332961bbdcac7c490",
683
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/SipHash.php": "345fc6b9f37659ec9830c9b3bd1459257b81568dc73809c023c551dd825981b0da6b150b6b7cd57b00097ae9cd3b742d730ebfda2d2e459ebd7d5257fc967156",
684
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Util.php": "81aac8187fcd44a14ae856e34d7337c012ff3603c606e1b9ff5a95fd5cdeb962725b70672a57b600d344fb2f34aeea00ddc8f1d4d8f8888961fae9171f8262d1",
685
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/X25519.php": "d11fca34bc3d313e365ca47981a0efb880a3cc8be3e2cb00da7df69de8d52f2f1fc793c1654cce1385ea66aec40eb5339c5cbf120c127cb399b72fe84b7297c4",
686
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/XChaCha20.php": "de5d7f3dd4402fe3c99b66a92fa4f0766beec66928c8996b3754b2f7a8869b65035c6ebafcc8ba2fe9b309adf541e89eba9491554f1ba548af6139770aedabf8",
687
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Xsalsa20.php": "6abb7e9217d5463d373023d5aab49c41cd3e1026835985dd13256e68374ef63b90b7dd033f7fe14ea60229a98e5e64d0d0f23b7a382ecc9d8b41746bbe3fec11",
688
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Crypto.php": "257d3d05f1acc745b21f25652ddf0b09b5a68b2b75abaa9216bee10ea958f8ed1d3c964dda5326216366d9cca4a71e8678c23994fd07eca2582e3d8c8aa75500",
689
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/File.php": "d7cce5179670dc18544eace3bf8b8b9863e62fc9520526da2870e45d5d400004fdeeb3c0f44a90caf0742f89b633e7fe3f996bd5f89af4c7f52ea37f429e453b",
690
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/phpunit.xml.dist": "0f8b25b7effe47068dfafdc568c3298d7c5f2d4eb1abc040c8dcda1b0daea8523a1f82d8e00d6475ffde3cb566c18d17ccfd07db59c72bda11f40d555b692d32",
691
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/psalm-above-3.xml": "5bb5402c96cd45a0d88542bfaa12ee03c26c3242f42f1e33a2a32e5a16143e6b66e7dd4bca7cbe30f73ee9eea7e72862e356f1bc4c4daaaaf1ebcb248d63b230",
692
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/psalm-below-3.xml": "9ef67d2d8ee81c94d0ed80d592894be0c200045b295178f246865d12a54d963e97b4a8d75ab88595bbb73d74c75ab2275a54b9a33733bea2d15487c5894f515c",
693
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Compat.php": "1c233a4b931c13b00e243f699eed9e81fc683846e089a24ad90dd17f786bfdec9ab32509eb9666074c9fc2a168ea8d411144274e6c4d4413996c78bd3c536515",
694
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/BLAKE2b.php": "27fdd20dc655cc7f58454cfa97fb974e4d99f6da5b97d79e669d41b9c5bfd1be18fa34f0ef7a353731a3bebb11b56fcb68818cabb3d8ff026682e7b39106c6f5",
695
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Base64\/Common.php": "c8512fc6d570a3198107493c7b8d20f38539caec221adb14161d7efbd6ab7d1d0bef4cb5528fcd84cd9484f1a9e0fbeb45aaa2365012680b0106ea92f8873281",
696
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Base64\/Original.php": "4564f7cfef60c318abe626832bcd355cffbe04d020e04d18c5554fc1610c4a1b0ae8d1111681e2a458ae0b9d7ef3528bd62aef019fe3c1a3f9d28b5ae58da86f",
697
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Base64\/UrlSafe.php": "dcbd158a52f33b9c64c8046c8f091d9af95657a562ac694c9ac0beb3a1876d55a3f23cd42c1777d9cf2a55cdae38d88ec54628b2d5fccd6befc92d4d51eaca2a",
698
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/ChaCha20.php": "f0015a4f95fb6028c015c954992233d76ff0b07c7c60de6347e7b7ff1cf704e80de4ed5b3e236502fddd3c56071aa8012758d905031d6154f965c4898251329c",
699
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/ChaCha20\/Ctx.php": "aeb8c31a1bb46b8519f280f23d349fa93911bf766715c0964c0a901369d0f0599e87c6e13459734f582a04ce74d9ba9f3ed7553d4b7214855a815424a8a8610d",
700
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/ChaCha20\/IetfCtx.php": "d22a84b5bbe07297fa80c989e93681b27b3ee502a9b77b63e2b08eccdca03cb98c39834feec5fce3cb0e1915f2944b06e94fe555da123de982fedc61b30c1f91",
701
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519.php": "b25ba0383cbaa00339f5cbaff6b400a25f3bd4d244d2fe70a08b987ead0ebb04a7f51b9476baf01fea5967610911f809114e39d21d4e278a9be72b48ca39b09e",
702
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Fe.php": "0fad7d424e7f3fbc0abd6a4f9113c83523aadc3f9d3423a94da0954f56d31705ca567ffad0972794bfbba00c4909c8638130b99a983cc52022d262d6b7d145bb",
703
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/Cached.php": "58ed8181f08dd61076c0ae9ce176455d951de04b9b1b03260c593d009414e9757d9120ea9e94040ddc1e0867f8a6574dc55e3acf82f946100d03d4506c9f778b",
704
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/P1p1.php": "63b5f5a6c7061826799c2e3285884ac2108adb19ea246475b98fb68a26aebd694eeba56191fe15fbc1a9ecb9b85c139bf9e8b65b4456b8fb42652fcf29097fad",
705
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/P2.php": "4caf0b912ad4bd82f8c447fc25829177323ba7af6d2355a7709b8ef99a855b51158e5252a1739cf6e9ae72b780e415af0cf3d510bded3fbce3542c99cf057535",
706
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/P3.php": "5bd84bc8087c48e62e9d29451c0165376ae8486ad9288556c81e4cb897822cdaf95a2df6093f16e2a336839d0a4ea7c1535361bf041d8be0fddeb1eb245eae55",
707
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/Precomp.php": "a58cbf2c93a75948b4576395ba1ebcef5a35b6dfb4625690e872010a44edd92939ba146b145cf40bc2cb6e45da0e19f169a45b575d813a70428f171459ee2d8c",
708
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/H.php": "0ce669e4f370acdbf6cf27d5a525b0a3a3bb7c794b8a2ccc7b2f3a3670fbb048a8493e3e6306a5f148204f50a5458d47ffe4a2705520e15631b02d45d39b0676",
709
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/README.md": "3f50765b54a3cf172c9cdaf2541a54273b811df61330af83883de5309103d6309a0900ecbae056f60aa831e438543c16c809fe183cc15c6a2f2bf15f6f910cf7",
710
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Ed25519.php": "89eada60bdd8739af528cd74b771a2ac04e36aa3e588549c7e8a82d2267a4df5eb4ef13c806185ac65bcd33fcba0f49a03cdbc03f143ffaa576ba6f4ab5efaa7",
711
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/HChaCha20.php": "e221d5f3c4818256a895cc05a8e68ae2b3cced7eaf4e425f3c373d59b2cec31fa7b498e5e42af7e374e70c3a176f966da3cccc4be97b646182a8bef2817986cd",
712
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/HSalsa20.php": "05e5376ceaa53ddb24971a43ded855892cf37fe0f03647660f573334ca79e61edafdd511c418cdb3d42e62298462e729c69b4dae3eb802c4749774b43d659536",
713
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Poly1305.php": "1bc3f6e6323d44ab76eca14cce61e7043ee98d8f7c50f29a5e29704c35adee345faaac767af588e1c6566f5732c1ec40ea815c51711056737460c9143adef1e8",
714
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Poly1305\/State.php": "9a69f92ff7c3e384cd57c0d5fddf9111d57abc9849acebb329ffd1ac4f53e539e1548140f4a430f628cb378d7fc980494307df13e4d1837b0af377bd7811c6d5",
715
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Ristretto255.php": "c4fcc5c22d8ece4e704c847ca01ce6edba7682fb2b9b91d74d664a204cd5955128c3bf8089a855312244f28c4ef6953927832ed989a03edf6eaec5c26df1722e",
716
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Salsa20.php": "8c2ad19b46f527ef9c091cbab17f64d36610745ef32f778e3911e1aa2a142e88c0f6e005ced046a678d66982d2e9ca48677f082697af3999cb62fecee4d800bb",
717
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/SecretStream\/State.php": "629c6f96a7bba323ddb8eb422e7048839c188560932cb4306b9f11ba8a2b15afdfc037fc14ce8725ed3efc72c26700cf6cd2ca4a85870fa885aad6b6d57a4a0c",
718
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/SipHash.php": "6f24cd7d32eb80c943461199a0937b0acdf01560542c54ca916fae6843c3dc5fa65d751380434508aa50501f7dfb6c227e9330996956c4a8c8b32b6ae55bebba",
719
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Util.php": "fe12c7259ad5daa7eecd8e199c77f822e612333169878309cec5b5483a9bcc775261c344a31023c2741d53f37f05a0f6dc6289dc45c7d7b8ac7fedafd5458d57",
720
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/X25519.php": "ea1d665ec23534de7f18c4f48094de4463753baf8b9ba011e38b969873bbaaa32e6b90bbbd0597baed3687c28e37fe394c224a229d734671b7d7e03197d039f1",
721
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/XChaCha20.php": "56d827be22c68fe9a2cc01b9f5890846197c5831c3c0f129d9b8c522391b7d7391a217a2dc48a4bd78e81c3d2f3bd8187546d311f991148fdf43a8a67730c81e",
722
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/XSalsa20.php": "c0367d97622bfb654340a6a7948e8ca4ed399d106dd8b27169a9f5d9bc6532129548b4dabf9f12ffba654f490b8adfa07b0b76935bda15705560feb7c590a3bb",
723
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/BLAKE2b.php": "97cb339b44cc54299394b4fc27c8ab13d5a8d48aa4c8fce71733a27cea5d3226df4341bf9722fb4f4ba71c38f5491d677774245d75bd91a693269aaba0487036",
724
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/ChaCha20.php": "da693dd0be25c739b477673933d361ed4b2f83110ae98f7c6805af20789fb4379b4b7a4ae34aca588666cfbdf61c2dd5776f8a4b1ee0215dae64ea09c6479a10",
725
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/ChaCha20\/Ctx.php": "621194fbbe2eb42c04c9d94e45e3a0ebafdb4cd87195b924705f8c2a9e54c9dc52fa6dcb39967ea1dc4ceeb6f2d20659a1b0aced8035529376f6244ffaa96f07",
726
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/ChaCha20\/IetfCtx.php": "b4a0690f9af7ace9fb3f8c10ca78989573a1cd49d3309f9c0011501daa3c44f7b616868e417096076846b19502ddaaaacb7c85f9b5c8622c57e4882982e09a10",
727
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519.php": "fd10531c29a88f84f8b7de7c09a0e9e66472658827bcbdc55dcb1fba54f620b32dfe9359788e67abe4f6ffed3e4841e6b74939d7504188cfda243512a86c7eb4",
728
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Fe.php": "e6e5ce11b327d42167d51d2fa462ca6a54bf180229261af9ac1189fab30941148136ddabfff606dcf656985cb9da9bee93902f1863a84a3e5d42bfccbb0111d3",
729
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/Cached.php": "350f529a5a178921a2f40818a1668c3effdeac12b9b8aded2f57f1654343d0f7f535c780c5a271d9b7772969fff9381befcb85aaf676650c67b6e583d616c064",
730
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/P1p1.php": "fc8344d196cfa17fb61ab576b0a73f0ecbdfdf03de53d669cbf56bf10cf13eabd8c8a83d3eab7d9f9436b4dbb8d0785f9929c190059e0695579811405f3c840a",
731
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/P2.php": "6c4051bff3e25a7863fcfef3b9c1f028fa8b94d301e4de5dcb6654c629bc95f44978fdb697698375e3cfd1dfb9ae6a3c8dfcad0bd5138e51cd5d5315b5e5b788",
732
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/P3.php": "d6ee2e6bd34cba83a2025bd79e2d8a829d39f148c65ceee5a382662ef25b1c684552e0486ca29215f52d5d1e140176bdf6e2c40febd55970db55675b76d448e2",
733
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/Precomp.php": "397b94e8292ad4f09cc37f1b08a7f364e12d6acb74f125ff0148c5562631f632a2ecc44db517cbd5ea61865e70732e6223a0c736b831c751df859a7d2afc4ae6",
734
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/H.php": "7bd14df9e3afbf8bc2ba27d5faf6ba72f17eed218cb7e89f4a458f500f6d9a60c52eaf5f1fd656d7de492246b0b0ac3d5904da319c5d85b754c64ce4b1f1b433",
735
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/README.md": "3f50765b54a3cf172c9cdaf2541a54273b811df61330af83883de5309103d6309a0900ecbae056f60aa831e438543c16c809fe183cc15c6a2f2bf15f6f910cf7",
736
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Ed25519.php": "30b970fe798803452a504ac453c70b5a2b51cf3094639dc58195b3c8e44fc37089c58bec2337d7f79ca60c91c4951af5dfa89e9dfbe3ae327084a806a6b8db7f",
737
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/HChaCha20.php": "d4fdd553cde5a1ff277805bbba85128e3ea59e4fc32eaacbc8502414148933c760ef6da06fd967bc594f9d22523c62e45ebd7cc9411ad4b76e2d76c0fc2c00c5",
738
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/HSalsa20.php": "8bbde85156bb88b6f0f14cab67840cabf1e1c456f9459edc145e09907161bd6fbea93fd37f121678064de6922102e78789cbfa3c2eddfcb40b93178fa3fbab6e",
739
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Int32.php": "325772c5cadd6953316e83afe2a04804041292f25cb16e6027ea230e20aebcdd819c937977918161eeb9c43187fc105be2824949c9d6059e9c0a39e0cbc42219",
740
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Int64.php": "8fde2b57266d78e8b03d8c3f89a1fbca3329bb6d0ed4526b3c6dbf5a0e92ef9d8e9e3697cd23b7eb5f7524fba7474cc5a2e06f1ba6faa04f7cb8729c985a5794",
741
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Poly1305.php": "f0cc2f5cf32a37ad6c3dbaff1a8a155ff334995eab78ab42f2e5bd950390babaee0c1588e3f17d4e73cf970b8e3c34f536096d7da23182f526b0eed704e3ecc8",
742
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Poly1305\/State.php": "8656ebf7aa0c2c7e8cf01546a261bf5e9f6c374eb5f40f8133bcb33e35bda2f19f47471b2ae6af6224df7ab9bf3886cc43b88049e8ddbe54b8dd129b28491129",
743
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Salsa20.php": "bbb3dc0a30030d9c5f5ef1ef63e36f9a067d67891185b9620ebee17a67bee31a7abc420abb7b82f38e913b5de54d235859f0e8f5f718d8f02316f4fb03e24b2a",
744
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/SecretStream\/State.php": "69d505517dbbdd2e77cf5aed72673edffa2aa008e70325db88877ba5673ac3ac070bc4c19cf13707932b0b4d71ee0a9b007e06a0f822292ec278a60def7cf511",
745
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/SipHash.php": "8c3c2d2e4c656ee6f7af729856cc4c79918ae2e09a167d6d0cb92f7dc9240c0bdaa36e65a167f5b63961d9f9ac4df2c19e50c848e5a6da5855566deb5b9ab8b4",
746
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Util.php": "d6ff44eb1015687847600f8b7f6a80974f4de1cb80224ea7f733e908fd53ba2aa669b97d891fe89bf0bb8d358c15a2bbf0661a779e68a715cde0405455127eb4",
747
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/X25519.php": "9e2d803c100fc9a3749100dda30fabe25c6ec59382be64f9995b6505e1652d5b2762111f2243b69316abd942c88106fa5239adcae842971f22fedd8e3aedd954",
748
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/XChaCha20.php": "1d4ef660701da25af79c9d4af2f158e3f62afbc1e5c2aa062f64b970dd33378d5f67c9f0172991985ddd65a976759e09f4604ffdf6ae158bd8a98f4e97af851d",
749
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/XSalsa20.php": "ffcbccb7d8a1d0262c5e74cbc679022bbcf1acf9160599ce2b92f66e261996f0e93b419231fd41ca95852e09b7a892dd8e98101c3426d30cb294f869908ee21b",
750
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Crypto.php": "1af076765319483b5e0c2a3ed9d5a12133fd41b7172cd15073da3723200c41cdf077dbee04f1e4badc2b86ee5e23965dfd0e8f3af3f52b3b584ab2f775f64cf7",
751
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Crypto32.php": "9fd3ecc6e6faec645f2c5166ca551cbb4ff8430664bdb46c383da399048de42ab505a05c709b6ed0de245402a1abd701f21398252f059003a59fd55bffd6399b",
752
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/File.php": "4f2a6c996bd3fe4a07e4e1d49d2790e68798add08c4887efb3d7bdc7beb5ec2c1601b8e77a0b40e570211f7d3b4e5a5f97471f60df8b31434487495677052640",
753
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/PHP52\/SplFixedArray.php": "2adc50710dd4bc2cc1138b741cde09f225f727f2177d006ce8ca82691de0336dc51b6c30384938eef1693ae92628460f8984aaacf336815dea092de4ed1521b5",
754
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/SodiumException.php": "705f6e9777db6be71970f7e218339e36d50023abf723446195cef782976d7431f815a90d1ed83e32ec527303057287f890215b4b0a9a8c992a13d111e8bfb947",
755
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/CHANGELOG.md": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
756
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/LICENSE": "8756122099aea86ddf6f176a480c0454f2be6dd278e475bd6be7d7ab3d572162f1bd44c9f623e52e53514cb15336be6e84a5eafc8e2a347b481ab5799ebd6e17",
757
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/README.md": "b552bcb37ad765a0aba888fe43d2e2f41b5bee6c90e734c365797e74dd0b8c4df017ae74dab2458edb410630299efd7b649438db57acd53fefb1723e233416f3",
758
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/VERSION": "294108697ec66acf16af2f9518c5999605a8585058ad25dc9303029fd890e6835b2fcda23fff2ad60058f8f6a8a19c945d998e4e228453d4946e395b9aa2055d",
759
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/build.php": "485d76b827a54d8455550e8a8f8d14862f9444381da251e66c2bb8ceaf2106a554c1cd339666b1260450749d0244d6b9ba0c6d0a2220ab2411aa4041fc83f8ad",
760
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/composer.json": "e05f4af7ceef33d82ed5704be36e1b9839236d13073d0e23ef77d33ce7ec303cc2cfc2ddcd25318f1a5295bbe3b61a13bc2fe72f55c226e2f072e2a0b1959481",
761
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/composer.lock": "2b8c24986c6cbd290c0ce53ac4f773836751aebfd65a2350fd07b4cf45292ce2667a54494fa098da13a385ce7a9e10a2ed55d20f7c8dd6817f93f33a6cc710fd",
762
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/data\/ca-certificates.crt": "659e8d36bcb65a7fdd299ee008fc4ecd42be87d8ae7d7d15828567b9be44b4ed8a316978f2f7d3d5d7e96a4da0b30bb8bdcfae5202ef099691daa796318a869e",
763
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/docker-compose.yml": "1fe4c651e406095f0ff1bfc196406d473184bf53cf80f7c67dc79f1aa94b26db74174e0e9bc47adc95eb2a5f6eb950255c4a5cf44ccb7029ba712df3be9e6384",
764
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/docker\/Dockerfile": "a63d1fabd8c19fef37b90922aa4bb21fbd1094635666cf2a3a4db47009888bfd3f1ad5c34c05184e2ccc8f581971f6dae91c1ff137730821422cd482c39e9390",
765
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/docker\/entrypoint.sh": "2bf3911c365a271fc52d17a0aac1687abf52e5286a5d52cd34367e18651dcfd6ef1f791b54105b7742f5d691564ddca3c05a9ba4ce8edfbc68fe919e0bdf6c1e",
766
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/examples\/example_webhook.php": "336b92a647e49d8c994c8e6dc6b26670f0a58cb57d4679d0ba7177fa1f56a84a628e5385dd4c1c25a1395b1d8499e54d34eb2c20f9742a2a2a3d0cb20c36be08",
767
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/examples\/simple_webhook.php": "ed299912ca9a55170796df76b25c5c92462660b065ef7eabf24bf7f552e75fe44512fc3fa977fae2a9dd5e9be1ea28100a456de926fd7f24c32152f577f8e46b",
768
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/examples\/verify_sms_demo.php": "042dee741d4fe90d78edcd0614df6a371cee77d1a95d34623b4e558ead69378c693a33d044f450ea204efd7253e7eeee1e5a4119708dfddbafeea358bc5408b0",
769
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/init.php": "82a207681a76c9b00d1a35fcfe64753cf286d9d0122366f8c1f3009ecd6c548369d2b65d5b4e03f20faa9502b967a3bdae30865e5bf8598eba630b5f9555542f",
770
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Address.php": "a01e1efcaab0209fa7cf32ed85722ff793b9c0f750daf7d3bcd0499037dea764f2a61defa54b4bbaf602f8d0f5f477fd4198e35d6d8b47b82fd13c7a7e70ad59",
771
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/AlphanumericSenderID.php": "c6f7d381cd9901af59d67c66fbe6ace0729c77ac2b2962ce41351ed076cb39c9049aeeb72ba0e3933ebce4ab8a936b86a7e21d30a1c07b2b08cad9da2abcda1e",
772
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/All.php": "5a6381d1492e2ebd1498fb4371b55c7e112ebf2c898e1861d7dfd2345db8c56df221795208a29b2a0e42295846fcf98f6a60fa8839df7e28fb66b9bde9226ce5",
773
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Create.php": "811f9227ecc5acb172e8e7120541227de0bc22cbf66a41490b743b3e49647a38889d5cfa5d64139b602572f0fcc0fbb96e3971c78801ed9acf7b50db2ab7499c",
774
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Delete.php": "e3cde9f67ab7281870c7399c4e76ff5807791b94b595567f56ee4ee494574e0f6f282a8d0c024c78c1709940198460f386ab8de6118a85de7d8a52feea0b0dd9",
775
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/NestedResource.php": "209aecf9e6abb679b4f1ec2b59b1ce363a73970f6d389829b77802cb88b7bb368506e4d0aad42f090b715b4d4a580fdbe5c8479c02227102b4d147d615fbdb8e",
776
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Request.php": "afcba7de3fa312bc9e532e43bdcab8fcc5ca8b532c6f7bec08f94a8d7b2849467266f98af029bd688a136ac24ab2b7f438ca2fc666395c589d578e9d0156053b",
777
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Retrieve.php": "6f29bd2711e3c6b586c2bf6d9805b986a5f76fb0cd8c98c63259cd9873eeacd679f9718dd333110966ec3bb772e2ad06da7b1586bb590180770bf300aef63c8f",
778
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Update.php": "1d353ac81bc74cd57c75f01da21d6c59e053813930a0eb0fa054417bc87b6a140f64393bc04ac312b8c16803bb4c3eabae278839973f772e3202df32828480c0",
779
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiRequestor.php": "deeca798d9ba058eced71d846bd22cac360cbb25bd1271db25cd0ebdb29b1af9ee863b362849035e8a9f6ee62bd49b8415cec97e1fc01e674ad6942ac987b6e0",
780
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiResource.php": "f093051a36277165763e1ee66594056cc266fdb89caec9ab9223ae6af9add8ea4a20e6e3ea6fff4e9625fcbb95f430686f1f89db36f981d7d54034d79bf397a4",
781
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiResponse.php": "0d292d053a85224f4ac839f54253decab0eec5ae9861ca95314e98cad0fec2d2f0a7e712a8ec433adb302b6702d69262c8866b20fd08d67b2d18571965bf6789",
782
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/AvailablePhoneNumber.php": "7c82ca4fa28264c4fdd910c71741270657e52cdbc760343339bbb7c1d5980d27b7af476f7e1bd431926d428dba685a6e34d250f9678ef0a4e3cd8c4b06289e55",
783
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Balance.php": "333bbe5f278ca247d8287c8da5cf3b3f6a96c896a82e3c3b54d01277e3cdc82dd5bbda2a1253fb473a29c49d3030b73b24eb8231cc34f85b0a43bd853682e000",
784
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/BillingGroup.php": "60d9fed23d1520237a50a707986709f3b700d42d049e4070a48fbb50f257a98eab779f45a15939af3d5bce811014c01abbcb86fa1b9ccc5b89d55f44c4b1a308",
785
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Call.php": "eec97591c5e7af2b057dac6e6498cbb2c1fee0439b1b7f31c2d879a5a0fdb5a3eb5ba3bb7e3c5a9195d9019e9df82c99a491ec52f15bec59b496435c0787d43e",
786
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/CallControlApplication.php": "fee499465ecfdd2d5aee0479d3770a80219a5837bed934e0930413e6dde740be21bcd965216c782e0765ba18fd71714ac69a5ee887497845ccc1bd7797d6cac4",
787
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Collection.php": "ba4afd20a921ae7c838a74bd9efcc4e468fc12ecae86b2222f97c9405d376a77533f55924bd1d577429825e746ac59142f6d4576f4d446cb3757cb36b65894fd",
788
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Conference.php": "ef9da126fc06537687947c8eea71fc34a53a7d44607d60bcaea7d8c7f55e76a94a9d7e0057f9abf7efb1f4f270680cba042112a127c2c487fe3c617c5102be29",
789
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Connection.php": "c5f43a62ff80b2e91556dc63ad2f78cd83b4fcae4a7a28ede36388177591fbfc6c20b244f6fd4e540cd9401e34b04946bf422eedfce25316e61c89f15de97665",
790
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/CredentialConnection.php": "fe9d8b7b34a24f5b3b83d6a2597359fedce871db3a526124832d4bf4129e7515366ae16517b8dae259305ae69f95655aaa8b4710a9addc23fffee0e70b70b74c",
791
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ErrorObject.php": "cf83764f49da72bbc816c8741644e15b9a74481145c6c0c11c390221ee4c7ae485cfc09d77db24a48b0756b69c85570242bb2b903c39ca699e636a299ec4dd31",
792
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Event.php": "4e4ccaef81755432630c46881a958928c8b633ef1dea76d05f05711da17f68bf6e5b7b77395abf297b3ab128c065da7b4ed38d1be3a45306eb6d7a1080e72994",
793
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/ApiConnectionException.php": "b2a920958f3e1664a6ea5c5f32c73f9914b3f59d8a927c4e920d385ce87a6676475823729f203b09f5530da667f52e3dc3d4471fa498277270ee9360d0797b5f",
794
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/ApiErrorException.php": "b775efde92c04d1a53dd3f948f2efd92baf1f1dcb5092ed0863f37bb71fe03052562fa89349b1030f3d27a0dffa974ee47c9a3655b40a3941b05e721e7fe97c9",
795
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/AuthenticationException.php": "f8154528a04642cdd24f3de876b1a38d6f97e357d36badafd39e596ca739df7fb77f4259de1efde8bc300f126b20f6e242db4c1e3a25503565df579b62676ec7",
796
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/BadMethodCallException.php": "5e6df108c1df11bc1275948d96829f0ca6ff039126934ec57dbeee74913af00a64e6a9f2b58f42bf74aebeb94596c45cbcf66e5a4afa8924b238ca63d424f452",
797
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/ExceptionInterface.php": "77d5904b79a9a5b265ef121cd19d91b952f631ac7436e7896bb0786d9afc0b7ffe54c7ea901091baefa0154b91abfbb3f9f3a7fcfea4053f27cb44be2d7cb23f",
798
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/InvalidArgumentException.php": "f2872cf684dba5abd50bf876971e32364a23c9259c1e85a01575348614274453d00cc655b01c2dbf2c78c88f4a6143cb486c786dd1664204dc7676a64a9cac4c",
799
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/InvalidRequestException.php": "fa310ff5d5ea8f02f731089c27e6903d9b0e692a3faf272efd19ae4f1075a2a1219d167730b21cac6a30e705816c4230e2511fdda981fb47714f4d81606ffcdd",
800
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/PermissionException.php": "4cc209df863027760738530c5c01962702970a73ac7f11be232234413376dfd34db049f4e49305c8a15ee1f016b26f1c128312930e10cab174e80d6ba20cb12f",
801
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/RateLimitException.php": "c37157b02475d2a3940dc7d007b84cc3c86cab88b42e841a392e3ce4919e637c9b59bc7b33ad3ed8b4b32e74dddafd8e61a6f30d60029b8b1ecc82b8faad4833",
802
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/SignatureVerificationException.php": "3aaa44cc52efcc4caeaee624c070e8ec87b665decbdf00d8aef04ac857358028e4bc0495c4a86c504f3ccc6d753413c5ed685816e3b80851026bf2034514cb59",
803
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/UnexpectedValueException.php": "33504e45241779bae5e9c1d6ace82a75d545e6f7ae76f7d7f071fa4bbab13b2c23d11e59230da3c242b548ee7b5386bf4795e0d06d1719812348d1f9efb0c1cb",
804
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/UnknownApiErrorException.php": "cf5cc44f46c03d9d0de656e2ae61d7b077d123a4b6666a4b0f57fafa2033e072ceb5b14d6a47987bb14e0acd48ae00b39d4d6ac1849fadc879bcc43ed1acb44a",
805
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/FQDN.php": "b7d44de17cfcd207ac1fe6aada6c24871a98dadafc4cddebe28b135c6e507634608e1b6c7052a40cc750f6515fe19c2de29864d4b9551e7002fd800cc6cc05fa",
806
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/FQDNConnection.php": "527d18ad480447e4d79e567e7a91796ca31bb778f10011aa9fafafba6e769d387fdfbc306a6f1ba58e583bc7c37a9a66f1961494d3639dcdcd8912efcd0e6a55",
807
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Fax.php": "fd8af5f711fb5341e2b86a7fc66a49707bd31efabd2cd63a1d5153c24462f07341d6af618b7e82ff1faeb9bdc203f62b6dd5570d74754e052300d0d7edd0424b",
808
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/FaxApplication.php": "f489a9e161565a6e7f55a4d90fc05bdc8147a8947788a757a2b5464059ff2c49e61fa26b6d1f0b43fbf9ce8d0c08328e276442ab4d2d100e7ef34e9b2e0860c0",
809
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/HttpClient\/ClientInterface.php": "da6ee5de3e8aec8ac144511858cb3bec53bfd2aa0b5ff27eb43c7f72dcdbfb1646da223cbd861db7595db904007ff4c8d6a010122547a98bc1d2c07139328a80",
810
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/HttpClient\/CurlClient.php": "dfcbf2f40053699b94de74defc4a57461c2e07280976a377cf4ec3600e6279fa9cc434060b0291c7e10a634647e1a86e67cbaaadc49783eb532681ca25256a42",
811
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/IP.php": "624821d6dcc5d30a1a08368bacba88cc7ce8b768bb3315b3f8013606e303fa8940c13da8ece0c67a43329a0cfd86d8bd09682963eb54138f4253eb2f159c7560",
812
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/IPConnection.php": "01239dc2096fbe207ce1a5a58dad8d25795b9a8a81dbdd4290730009f2fafee76d74335aa951fb7b54e930e4e9530a0566daa9ef7e99ea60a50b8daf956f11dd",
813
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/InboundChannel.php": "c37478b08abc62ca491806db6e2814c4a28a11357fef873f6aff8867e179dc8d89817ee3db3fdaa84150111cbeb426ad0282dfd7550eb815dca100843f542178",
814
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Message.php": "18acf4bf51ec27d330df16216924c65a45db59895b610a3c803ef1d09beb7d96d20753b4ec16be06ed40f2886ad46bb3d866f14a87021484ede5d33ac1a93c4a",
815
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MessagingHostedNumberOrder.php": "ecee6ab7a46ebf03b93870017aba4ce00c10ee36342a6d3ead209078aacf4ebcb798ae129535fb15af860355b52ea72ae6bcbf0e5261a9d66224e43560858227",
816
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MessagingPhoneNumber.php": "2a2caa5e44efc5de92ef9b0f8ed0a68af1ab2c80932f4cd7fe79caa87ca1e146af3bd0e1d16d977738da2a3af1fb3cef77081c32a0dac50bbe8ef54a108efbc9",
817
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MessagingProfile.php": "7a561dcea7b45a4ad4c3dbfc6baa766f011de2b2dee9a23e512689b374017b05f4fcc5c3510f19111a9d8484ed93a5e05d3dc01f35d75e356f475a894596dc49",
818
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MobileOperatorNetwork.php": "d4436bfd9a628713889a37846829763909033339a086b6983eac792e9af42c0df2a8bcbd688c5c54a196d1fcb3d22aae7b45e9e18c015592d979e9a924c42ffd",
819
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberLookup.php": "cac3b5f1ea0ca30f9121849a8aa52ed2e18b7776c4f1d552dca4c3536e0d4eb96af45267bb687319a9ec715972bc95a19c7dda54c33a2701e20cff9564dfcee5",
820
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberOrder.php": "52067d9999c150fbefcbba9969b308bb6118eabe25bd08f30cc4978cdebd68fce4479e53d71ce29632133e8c69bb4ce9276301f5a36ea95bd77d29fd057f5d46",
821
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberOrderDocument.php": "007830f9c03979a7811a4e0dd0c74c4b2b6d05e05b56b9d6ceb5a6e55167eb95b2546087ae17328715e01d486c0e58e396bc41816b44866391b98d48ca246d03",
822
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberReservation.php": "988c853084f13e0d86445d6638517f84ef3d90c3f618c2c85c0bd8ab790012c3986a1a3eb3e00fef7759d04a6a1957bd9521bb8da6ade8c05fd2e02a8040f6a3",
823
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/OtaUpdate.php": "3c9579c6ac1ef6f31ff572fa3fb7562b3618182cb36eab3f406d8fbe6fc7b1d35a996e47923074428583ee3653aaff3792f9fdc47eabe1627f1a85722fd9dbf0",
824
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/OutboundVoiceProfile.php": "d0c5985f6f629904f4c95b892e329f280f7e0e13b8794d1950e216ef4c28ede7b94baa99f18803ff6f60b09d6178ad39fe5d3c182e984c2b4b57e9732991597e",
825
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PhoneNumber.php": "8106765a769bf3f6190783917aa923f3f7690af5b7bf971e3dbe73ee5f227b27531a553cff9cc425ccfc7cf2ac52bcfc685f3d3b178875f8fa837a5de99a077c",
826
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PhoneNumber\/Messaging.php": "d0aded1cbbd4c6108b0fc6e6773dbd03040af54c967f0a8aa9b2523db769317182889c882e6efe6fb0e187ac3f2919563aa6a937c77f4c1ff94e5bbc31f4d9d6",
827
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PhoneNumber\/Voice.php": "e7e8184351cb186fee77019e88600dcb15da0435161d1878799433686e012167ab3347d7f02efb5cd511b5d02cd7b6547453f6ecaab623ed23fac7c91b0a7333",
828
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PortingOrder.php": "ad9a683aab02c8817796e62131fa9cad6f3490d3afe231b5718b3b4f0689a535543362a88333ab808c36e9c41bfc8b7b6178be7fbd5b12f38b6d806053726997",
829
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PortingPhoneNumber.php": "ff2e1e98371b6a7b0cc5265d1ab82f053d97711a72633a7d3911a4211dacf75c08083d6629aa4fc028643c0dc929d3ab56132f6f21808b875a9ce679e56fe055",
830
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Portout.php": "71de0eb22350f649e5023b2c4a374b3d10a4beb0f8066d67482c62f68a39219d9cda4bd95d91e1df2fc215479f45b1ab79bfc0ccc2d39267d2f268356ae83ec8",
831
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/RegulatoryRequirement.php": "0658d49bc2c20a9a16ac72ea01b5306eda422d81747529c3373333facb5ce1940252387aa498d2957dec62f0eeaa8aac3979ffd84ca72308e660a1a0708796d4",
832
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/RequestTelemetry.php": "cefdb55dce61e5f276bd49f6b49e57c78085338537e56cce6fea5a81cd1d2235f1eaa78be326cbd513117be88a046177afb628659088b66ce423799995c53709",
833
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ShortCode.php": "4abc882d0dbc72becbff07212d17b8e1383b0efb43818a7eab983fd2a08c3f591a4f4ba2f185003fab0622a43329c969d2fcc80b23cb94410007a0879309ad49",
834
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/SimCard.php": "46289711eda27b37931b0d9f7e9624c114ef9c1e997ea88055dfdf6fe6dfaf7f9169b9a67cbfe48100dc4df2b73ba4d27328b0ca3ff0af3655789535ec3c0b26",
835
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/TelephonyCredential.php": "497a3dde2d7fcf8bf57b502c71daa5e166010daae45e30e1db7ebacb3a37028fc70c7cdcf39a356dd32f845664e8e9723a366fa69610c8f9bd31fa59b3300624",
836
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Telnyx.php": "f5ecf9589eaf7db991051de8482d582b36edc387b8a7ca48c80a419c1a99e1393d7f099aa4ad3e87adb4706ab62c8714dc843c9a8ce77d6fe6ea5ab929d9a882",
837
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/TelnyxObject.php": "0f45c91559ef686a3eb4ce3777ab7d43ba288b380ffd1031cc3c562138410d3582c251e2d986e8a84a2c189257ed4307500e3fa0d662a48a30b28a9622ae8ad2",
838
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/AutoPagingIterator.php": "d03ac3841bb553d847be9ea73ab9debd8c1f2c829b0d38ac4416a121ac535a5ece2ecd9943d89e720cb5abb1c907ca9b96df899a561c190ccd6843bde785114b",
839
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/CaseInsensitiveArray.php": "d5bcc37aeab4fcbbe0b9f4a9057a5654f6080ed899ae54f8ef18bfc907f244071a6693386dd306caceb6bf338883a13c7972574ac5d700aa00e22ec363932cd6",
840
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/DefaultLogger.php": "50a69f9f6ad628e489a05fdad0df811c926c957c301adb0b4b906dcce9733a0598f6c2eb126865c54a0100131dc4230a834b1e98275237ce8e90bff2e96cd0fb",
841
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/LoggerInterface.php": "8d2dc2c59af5e625eaeef0b85b09f78a42e533b62fee84717d67a4c706fbacd94674f439d3ac60984c0a3947b7d2f5a8ccfb64e071c41d063b8298f57578f88c",
842
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/ObjectTypes.php": "99ce4f7d4d4d9d43e24f3124a7c21b9540267aa160c780efe69d6559843a12948f3790b179db66282b0adda384309a793636d71aeb97d9aab0a62dccfbe2b51b",
843
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/RandomGenerator.php": "292c880420b28390e3d734c6343acd48f322db0c474f80430402916de1dcbf8e988b3d2753a7c18e763e632f474284b213ccc8e8fe4e52f00569e72728dcccb4",
844
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/RequestOptions.php": "00b6d4890b5a38f42f13ffdca556bbf1377c05c8a79ad2d6d0b69b7e27deb70252c15088458da4bbd56e7832cc6b2828e261241661dc344727e2bfb170465de2",
845
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/Set.php": "9cfa1c1bc6c012e8a7a797ba8a7893382eeeb234da73f93594a159f78b9858c984dec1e42da5a6cdb240f00d27d250e3fd6a7842d40c23513661201a148a6c5e",
846
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/Util.php": "4556fc8b785486adfb60ea8001296ad0ae7b13d785f92d545324b557fc4aad85a69ec19dbca27dd868050d64670e4e2be2e3a4f50e4aaac609b0089c0e9e2749",
847
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Verification.php": "b63d4f9d717ba204dcedd1c3315db3300567fe09563faed0e4b8f1415171e43e0068fb06ebb2f42c808602248f623f5773414a1612539a873070f461398be650",
848
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/VerifyProfile.php": "fbdf0818dbe1fdcd6bf13720f21ab6552a3ee7930c80a9adc44c3863ebb3df990b18adc8beee6770f4fca9bcda0d514a689d051c129d871eca48f2c0eccd7649",
849
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/VerifyVerification.php": "f2883946ac990666dfa62e07dad649ae0c9de75d5682857cd22419fda8926d45d504ce4fbf38896a1cbf25323a604a818d3b89f05baf58d91cef497c54d981e7",
850
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Webhook.php": "b451d90496fcad105eb4f61d5716b93878405315742c09d7c4be96c6b9c0427e35c03c1a664ab2f30f1288566b45117f87b069a3ce96d64111ef6a1ef289ac9e",
851
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/WebhookSignature.php": "ad990cd80d771718468e39aab1b06809a0efb9bb47f5ea4d42a649dbe481f5929fcbd502da6140f1438920e96ce2e4af82d9cfd810b0ddd0eaea391599685c0d",
852
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/phpunit.no_autoload.xml": "06ad2f4fe0a292902757629f5605509f32a0d1dca527550619c98a61519d83fc70f3c886b12f5e5734b1031186fd9c7fed6fba813cd816b0f07d36c2a6bf11e4",
853
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/phpunit.xml": "82ac037adc20f2aa76682878094e8bffbfe31782dc6a94e2987bac5546e3ffec90577d03715f4ce481cc977685eec9e4109a61b4b46bc19351c2cad555d7cadf",
854
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/TelnyxMock.php": "e8e93ca1114530cb7e9cad46eb20e32072934496d515a9391ce8093773450dd60f3288f9d3ba46533a0f650fe67b508d5e54bbfc6e1642443d1fc043b88eaaeb",
855
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/TestCase.php": "9945df738b56e344648cc00d3d4b94345c15d8749ce511b5095a87d5e52aed35d8e3c773276d9dde9d9fa04eada784a55e4876ebf70a198ba719c8e94c8c32d8",
856
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/AddressTest.php": "dd980e7890ad3dc1d12858f2d241a461689a34892bd780a8db034e620c23d01587996042c2c12d82333b2072bfcca6585afb06213694b7415b0b13d3084b83f5",
857
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/AllTest.php": "6031bc6fa9e899f06af9465468fb9e15bf5a9a7c1051fb52fbd383ea879842e72ba4b5347d07566182c632b5f66d5f2d4bdf73c1368a3581c6010330bff91ec9",
858
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/CreateTest.php": "c94c7e854a40716aec0e257c4d7fa279c3e941d64a37e167d4885dae5a0e22a513c8f3b018c436eff90ee045432c5e34b96aeb7d879380e9386c2bc177b94f39",
859
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/DeleteTest.php": "02ea2d3adfd1d83770f10dc42cc2c12c28079ca80933fbe02219ea79fe7eb6958d2b1d76cb7a0bfee9e308c01efb1eff61901e22d192e15e89ae67f7edcabe5e",
860
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/RequestTest.php": "f6e158958616f0637f827b94cce168e873e0d3be09e4ec27165f984af3d89c0be4d5d5cd3ed66df5b6237bf183003a0de1c652f599827fd01a2ee7ad47d5fd61",
861
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/RetrieveTest.php": "b26b8f61eb3cb893ce4ff9517817295fe9b727dd570b1cf79ace36e16902e0ab9f460d6b65342afa28c59236b59ec0ba0809e1cee673f69ea26489fdbf5f4f42",
862
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/UpdateTest.php": "6aafed3640a1173822ac9a26c002168eeef552f9b681fab9ec4f191df4f988a920d8c290b2f875c02596ef613273ed003e4b5a6bb6e0bc2760f54ffff445cdd1",
863
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiRequestorTest.php": "5a1234c4a1e4107aaf970bf87f0fdb1420979dd575a548e589b046cd7feea4dc914f25bf15474fe5bcd9773c94184b610d06b309d48639964a78e6137078cb5a",
864
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiResourceTest.php": "05562966c7ecea541b0ae95f67a11d9e2b86e45439b436b319e252d5998e0eb7a6c9b677e233572fc616caee856d9764b56feed80fd07cc1bec0d861490753b4",
865
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiResponseTest.php": "6f8d458b49e34df5c0634276659fd441e4140fb4dade92b384230e4e2b897e0da6d0e82c373b1eca98770dc3396ffc8b924672ce2141426706c624d00ffc7af9",
866
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/AvailablePhoneNumberTest.php": "354326429958fdd199df78d11bbc582a0988018b8f907d93808cbd53243f50332482c0603bf4ff12db2a8977ffe7e663ea9d6e8cb5f485aece0d46ae8942833d",
867
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/BalanceTest.php": "8f866f88a8a59754e2fce7d5fe2a0bf50399fd21711cef171873a45308ff96f929b23163495c273e96c9894b7ea39ee5149c45e764fa0de3b51807a329c674c6",
868
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/BillingGroupTest.php": "4333c81ee3ac767fa600095d95f324286d289c7e105ab251f635d9a942e75c418bde60f96c5954ae29dc152ee5fe7679bc5a8b67452f5fa1f59a411dc4854c69",
869
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CallControlApplicationTest.php": "2bb4f83cdf82457840352c5beaaed8963aba1dcb59711e310d5aaed0d35429730796b412f1aa4e85d5be5a2288ebdd12fc2be9ad75549506d1a613d604d20749",
870
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CallTest.php": "50f830a3a3c28953ec53c244d22381910307513ba18b7199d5e7bffc5747863e4da975fa972114b2f8a81d0c24afb2f72df8315010febd8d606d086d79d82165",
871
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CollectionTest.php": "9e742f72d8a223e64bf1a25362f9a28356c0b55037811510692880a359ee5e39266d9e76aa0832de39530e26798806929fb9ab9795a04651ff316f609e2211f8",
872
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ConferenceTest.php": "4e8ab0baaf21da65e3942b0d98caff11b7a30c24bae10ba546b82f7031d7a85b9d88087f9ac8172e69546eb7635bc1cf8f39b509017b82116e0e13b557bc1f7e",
873
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ConnectionTest.php": "429f80316a563f45783c87db6b6d3dd1564190b5c6a259f254e91ad8b71b2aa5e6ed40b9cf1a98632b7c89b66441e07f0285d434c78dd9729c032c7a4891d4ee",
874
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CredentialConnectionTest.php": "a1c37f36e418debb034faa2b7df5095eee175ac8801baed517089622123dcc4af642448aecde7aa8b19cf67629de087e4995ec816d791b5007923ee614590c1c",
875
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ErrorObjectTest.php": "97344e9d24c204ae429b856d0b32299de4380ec52e9cfbdef6090add25355d268e3dd3ec35ae7c5e0893f5bb204624930d1a856932243180bb71b40e5a1dc08f",
876
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/EventTest.php": "5152c008cb3de14a47586eeaf3ef778629b2beef87fe154a2c40c337c3f918d664c0ea44d8339e22846fedc696fe6b98f0bb0b557d3f88a3ac62990445a55ec5",
877
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Exception\/ApiErrorExceptionTest.php": "7d54379e1ab9f7d6bddb721ea1c284a8d023674e24e99d115f388ae367250089e10b5962e2bd091e3ebbedd0cc83bb4f821eb0a986ae11487e341569ef7f5c6e",
878
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Exception\/InvalidRequestExceptionTest.php": "a7da1818af1dfb3eaade1e1a122a8a3224e03a557396e11528af75b13cfae07764f82a282a3161d514358b4c55312193c73b5a8900fd70463fe0a66b448cc9f8",
879
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Exception\/SignatureVerificationExceptionTest.php": "1bb0fd1563a5c91b78b02e4f66f3cf0288986f546a0805830e0d4ad1ac449549930558caf86c06cdc578279323c43e4739747961065d5ddfa198dbbcd9540599",
880
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FQDNConnectionTest.php": "0af10bfb2398682865c4ee72cfb34425fe73b0fd20c86b51c61c4cf72f8c4d39a4ecfa21e4ae2e07a67fdf956057549f0c8c4f77e27e65dc1b75dae8b9b849c9",
881
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FQDNTest.php": "625370468fb338819fb823fbd38656799a8750f5093eebf75c02cfb592969a8635a442ec2febfe07705a5d6feea362b7644c25c67ae653a245bdf55fc178a2ed",
882
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FaxApplicationTest.php": "64a60460c62983cb0afc2c76880628e16270f14b0b761a8d62766cbe4c0fb33dfc7bd93ae0cb62de25a8f2b3e1994826fcbfe300ea37353f398c4cc8ed7dd62b",
883
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FaxTest.php": "a920c8ac18021bedbbc4972109afb0cd0afc16e5d86df2fffa2f8e0bdf837e5684124f926f01daf0bae439473022899498441a770ad8cc52479da3d012f1ea1f",
884
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/HttpClient\/CurlClientTest.php": "cff15215b95a804e4ee233df60671c5c1e9270f621025f6ea7cd5a0bdbb55175caa6c43c62e176300bde05c9ee90d84efda0dcdf0d0b5dda4dab2a47d1a669b7",
885
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/IPConnectionTest.php": "6e034e287616ac89e5059d337c682e3fde010130f4403dc76fe4efa12742c40dac114ddc1aaf7ce9e553c597d9ac27170419c5e33fb1439c31c6b585953ff1a4",
886
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/IPTest.php": "7ff33e91d1c7b8bdbef1ca1f5e373150a05f709e524d5a62b000b5c8b8d697ce42306ea8df917305d9ef2a4ea19f797ca28e2f8d0d5f9e3e31c4ebe5eab55ee9",
887
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/InboundChannelTest.php": "c430f6df3eb5add5bda2342e4b4a3acd77b33d74758516782ee0a045d75e7387aaccf36017fdaef18d71cf8865a28faaa0cf07a4f31c9876858719d84d479657",
888
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessageTest.php": "08ae5ad7b98362fa7c1478254f851078ef7e9a223c74f3fc57619d2b9c255259edefefc400e261cceafce7072fa7457b8c1cb4dc8dda29b51e432f6d274a8c3a",
889
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessagingHostedNumberOrderTest.php": "f8f8ac7271fb01b07815e2a92d7a0974e4320de63942eadc12df307c9458a7cbda7ddae505a731c491e4aa6bcdda7bec04786890df80dd9acd422593f2a02c0e",
890
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessagingPhoneNumberTest.php": "7827d12be3191d1329168c6b277899b81df17aa18b775be538b9b29ec9a90868969c05cf61d53715c42105b92cc37977270c1a7b78bee3d13214d8ece51172f2",
891
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessagingProfileTest.php": "0949c56ac67ee6f87854959635dbd003391e497325305692784905987d114b399e4c648252f314bc1147e385daf4e60198cbfd6aa940a6cb24992b8cb5abc24e",
892
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MobileOperatorNetworkTest.php": "6cdaa23aa8cd0a0e9cc43b6f17c86d9c1f7793f7eb30b774f4a8ae9754488e59e0c180823c31d062abaa356578a8718c65f367588c61015e5e36f9f98e7a5cbe",
893
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberLookupTest.php": "e03a73e589abd73cf52a637dd7d273dd2477533b66bcb75685552b77b47f7b58116c4637477da7f9ccb36a408909d91d3f0d3079396aca9bee996b862f358499",
894
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberOrderDocumentTest.php": "06f3e8f8e8dcf5d8c96f25a6f1888d59e9433654ff060701bcc5cb9f54b07357bb3606ac17af3e3913033fb639358df85c6d5c55bff114407168333d7d49cbec",
895
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberOrderTest.php": "176ca2e94df05262e8a43f14e112fb62108ce886bd90a690e8b907881c696e35bd223f08a4960fb58ebebd20cd42bd4217ffa14132e53ddac260926c6d7e8842",
896
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberReservationTest.php": "11742f7449c279908848fd493817731f3f1343895e16d3426a7a7f9fc3d4cc27e275a858e16d7efb8e9c18d32de1ffffc92929e8e3ba277157ab7304c3023c86",
897
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/OtaUpdateTest.php": "14830affab4936804afdd723714f2dc76c520fc2fd6e4d36d7bb255ef566836eafb6b29c18c5adb8785eed39f4bab030e3cd1aab1ef0293d9660b38a10fd6a45",
898
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/OutboundVoiceProfileTest.php": "e49828087e2114fb11569db7387a0acb7cce8bdb0cd655b280b567445ba2dbf16f8b66a88369876e7a2530fb282bf5a04be702719adf4ace871c2b6df8fa5edf",
899
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PhoneNumber\/MessagingTest.php": "b3c5665f4661624f58f02b814ab1edbee5ceb8c26643bd356b486f049dbb498a44da0af43daf200890c79acad16d51c169d7aa1a2ad4befe074b0ac539ebe3c0",
900
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PhoneNumber\/VoiceTest.php": "af08b444289d0194437c414916a8ec9285b98413d78e74d1c832b9b45583f9037832a538751628b5dc86b5a13c40c63e9dd360b719501762e8e868fcaa6fb215",
901
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PhoneNumberTest.php": "7a07f41165e45e5fab268b0e01523c2f67f0ad146965c401856582c4b4a3f63e53324585b1785b41cbeb637d8e61e26e2bfdb57feaf6c6c04cc33be8e4864df8",
902
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PortingOrderTest.php": "48d2ed4bb9354c772eef6484a0c9a195487c39f26bee3d143ddf64ae7da15e42e5f280a3e26eaa280940230fdee52ea09b7e5320823d4baefa73eec4490537ad",
903
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PortingPhoneNumberTest.php": "476748b7e467c4f5a648c394eb19dbf297aebc2c16357c946dbc4f363241639dd1001985a7bb21166d5bc77bff1e31edce6e379dbda10f04406377dafcae1bd5",
904
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PortoutTest.php": "cd262d5eae7c9ef9ba8c76856ef2d4f604484e6bf8646e9ad5231e89f5d45c8176a8ac33a757c53e4be8e2c98e6bb750c6041aefe8b2a589ac1e70a2db4493b2",
905
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/RegulatoryRequirementTest.php": "daa2836606e7c3f34fa122045e982e42f5da86b46f367ddcd7fe9b12e2a3fe5d472d4f38403d4b63aa0c58473d3b5901b8dd49b93a56fa3e76a0bdcf88ebade0",
906
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/RequestTelemetryTest.php": "61190b3601f7c2c72f55e9b1634cfaf11ca53231cf4b5f854ab14859b97f5dc0f07f6c95b8f7c3516ed253e13768b7d4ed9c1d15d0772fd1850eb894f5821152",
907
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ShortCodeTest.php": "f2e867e0b75d8334ccce51f7bdce842b350e7028319e8d388e0512b5e119585952a54ea79762010f12de8ffcd1c440638ba5300ddbe59adfdcefc712d8e079ac",
908
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/SimCardTest.php": "7000edb2f9b739bdbd44fceeee2e4a16c708efb22c7e38483569d5416f3c107bcecdc759e2e6108553193ba99acc542f5bf3bc353ee1428593a81b80d89ad7c8",
909
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelephonyCredentialTest.php": "1f65bad536cd49b2df684db54533b9799856b32464b80700bed5008c9379c414f756d075ab8e231d83f5bd9c1729dba064a5ab5c7e515ca5c32e85698e2036ad",
910
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelnyxObjectTest.php": "6214f2c38865c7a183f6a3fd64bc79e7f04963bd726fc124a87b65412075fd236e00cb5f5ed514a3ca2847faec77f4e7a14c59e8906478543daea9c4ddecb7b7",
911
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelnyxTelemetryTest.php": "ced938d8d20bdcd0d465155e1bd3ffbaec8ba96a6392c42dbec27a1d10a04da17b90fd3b91322c94b54fcd5a974528e6f10d081ca9b1915a8c8166e0727ceb31",
912
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelnyxTest.php": "d88d70053ebb64905acccf7e3cf651ea40c9155130e351d56135c96ada96263311faeabc83d4cef1e72387302ea4a11edf338c3744093d9828e056351eefe11a",
913
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/CaseInsensitiveArrayTest.php": "671262198a48a16dc2ddb7ecf1c7fd309241db9c74c11072d86cbd2f56403973e4bb17ca5bc6c489bddf46cc391098dd6b666b134fded9430c211c2a3193fc58",
914
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/DefaultLoggerTest.php": "39942a071430588bf6c089f5d0c97596b3b46b5b7a2b45d900cc41670dcf4bcf0d34e37895e494f0c89242e52d11d8a62f419650407c26ed91b43ea18c816e9e",
915
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/ObjectTypesTest.php": "2d697994485e6c8f9084f9155a5a5b753261bcd2afcc9dfc5760daa5d4196b7c5baee49b264142a705ca7dd6c5d2cde227db3c1f860173aee6769299db95cd83",
916
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/RequestOptionsTest.php": "86d628c4b19e4b7d057cac471219603643b6405e83745535b6c5f743fe84d5cf918a273f9e8e22c5eded36cc20ce49453e90c0ae05a9ed437059ddc287ccb5f7",
917
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/SetTest.php": "c91cbf6d983f16e033eec154e56705b1d942243371df25d5cec7cb375a359faf29fec0c87fa5f3e4d7aad512d7e757361cf409e60d643fff7fa8fef72d9ff172",
918
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/UtilTest.php": "10f13d306d3ac2211b67e759a6e1fbbbdcbc1cb791db4531ac799a8f84be67b3ab43cc85498b786b0630510324bf5039ac7ed39e2252f607f7937e802f9b578d",
919
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/VerificationTest.php": "8ea7985bfc5075c0e5d3a8b0b703af578479e481d769a0e8659d4b0996314aae15de36cc7022e087c0625c5976255aae323f9ac141e9e4fef3939a23fda6d260",
920
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/VerifyProfileTest.php": "c0986530c0ddd14e2227cbf9ceb0614aeec3c3b2dc37b5bce0de0d174ebd047f61fa28ba0787b4de1fd3efb5d77d5924e36ebf6fbba09711d0237f520365e8fc",
921
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/WebhookTest.php": "7e06c31d714348c6c9a6cf14c4a21a1f593287fe61e41630a6d766f15cf2595dccb1cd92981578cc205f6c89839a07c7c845efca2b44521d0aa36c0be9e444f7",
922
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/bootstrap.no_autoload.php": "cb002f7c8f77834b6414db6535f083bcd227ee6085363fa3cb0f66b55226680a45c8562fd8458249868465957b2aeae134b3379f8ee2ed22c96425475e9c0af1",
923
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/bootstrap.php": "50e143ed68aceb91d3e119d5a31521e76bfe9876bd780c90ac83afb7ca4f32be48ff81c33c134109eafe1d22f35e0957a9a834966b8853df99dc1df04795adf4",
924
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/data\/test.png": "6ad523f5b65487369d305613366b9f68dcdeee225291766e3b25faf45439ca069f614030c08ca54c714fdbf7a944fac489b1515a8bf9e0d3191e1bcbbfe6a9df",
925
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/openapi\/README.md": "0c54fffd5b7a5f393358864ff9e3bd3793075d6060cc1336603b2455d60f16d160ffd47b52bca6834acf0d9713855b386f69580099a3dcc131e8d5d617975ff2",
926
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/update_certs.php": "6a7fd896832dbc4c039fc907c74f25fad01f26882809d1ed0bef2870ba7db5d5930311208e2864190209862a077e4397dabcc1760ef2ec7e29127868016fc0d8",
927
-        "providers\/Twilio\/readme.txt": "879f75eaefe03b56788a884a5cb031533b33a94acd816b9e3e51a9cf0db826de700062955fc45d9561bd4c69f71178e2976f702e801fc06c3c076494c55c8bcb",
928
-        "templates\/content\/index.php": "63d6e27dee39188b80cef2b095db84791e02af0526b80d41bd37845386714f9f82cc9dafaf97fa355b927ab9b74527199ec70604480e09feb10a2b076e313b5a",
929
-        "templates\/index.php": "15ea019ef66fa303773941fa9ca673e472e9521b3f9fdb9052870e6f0596ca3939b247c8924ec0d67e0f3fee6e612e2c447a1297cf23cb5b6144e58a6197d65e",
930
-        "templates\/navigation\/index.php": "809473d6820d964c49f32e64f568f20142a0a6e14af2921201d2fa63e0d49d6328530dd1110312325afa83a01a1402815c5b0219d103dcf4cb0e5d7fd4cbfacc",
931
-        "templates\/settings\/admin.php": "b4866d15ab16f577c861f5f5f5a8a15944fb8577cbc439efb5c2323d2bbea925eb96643be6513bf76daa584117547f282cd5aef9c5eb06211fdf4792f5fa6c52",
932
-        "templates\/settings\/personal.php": "81312f8aff45cf49957b73099beddc082c23dda3af4bd63275b3df3b293cbf0c60099348237e7a4b41838ed8f7d5573ce74d28ea1926f7309a39d3d7aca2bf80"
933
-    },
934
-    "signature": "bafgCFOvwsO6BrJcdnMHtwxx1yv\/FPzfSHm4tir5CTvmuu7dl1Qe0rhypw45voIFjd+sTAQqGYyN\/roJMgsphDYA+KaTii0wT8OYuX3+3NJNRa0V98Vi\/3unICgOi96CuhLGuLBQ25riltQdrtJI5Z0dD7e7BxB+afbNIf6+dE1RL4HDTp58ZZND8geiDuiZByIZwHhlBsKlZSO0a9wVLxC7C0iYguAytEcWiE4IUNM37FzG38girNYKYjrtXV4Y4PEQQvkS2sclxECEHYa8yiQBd3LnEYZyKdnI7Ocz60mJoO20h4QU8xJFO7eB2rdznagG\/9s6UTqWThAWVKji2mYpKzHCDS5DXs2qOxOPSTzv8jUwMnMcZxfy7UH1YHWNt1L9aAibmxVOgjKKoPYmojpwo\/67YI7J2ncrgUVyq2VFoezvQWwXY2niAITzpimL4pIKSzqbXc0VKKFlEr3bJ9kJW7iPeJ\/sjTPLbdjapbz7sSBiPRimfrJOXy\/PPyXSIJXOyxrN4UPDQ6GuOpS7K7M5wiK9Qmh3bMeZnZdM5+Bo0C3yOLWorUJy3G7WGXoXRXjOvz6yRW1Zgr\/i1p++znpASD7EFzIRKF5zznzv3ueBtoxXJVHLc0tMimQpD2JOYi8gP2d1NhUQ4KuPxWe+4JzZjpq46ZdtGQ2y6P9agxg=",
935
-    "certificate": "-----BEGIN CERTIFICATE-----\r\nMIIECTCCAvECAhG8MA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMjIwMjI1MTYwMjIyWhcNMzIwNjAyMTYwMjIyWjAZMRcwFQYD\r\nVQQDDA5zbXNfcmVsZW50bGVzczCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC\r\nggIBALbJJdLJIooOqb46AyOdNlWR9LXm3hWzjNBkH0o8wtMFEnotUOLcbaXbmTun\r\niG0Q0eunZGLSF6in+kY5M420Jh9bbDP6bYI8iDG6CSDkmKgnfcdJRlB6i7g0qBG8\r\noMzOB1x7ZVTef8Ho2ylTMWCxCfTlcQ15okAUpLU1G37I5rg0DZH2fPdGs9PMg11a\r\n64Tofl2GJSf9aHsgLi0AXXVzSN\/96wmK2fJYBqTVsPo5qIqKtMVWduhDXsb9yT4q\r\nDMYzyHrr8ydrMSGPwfs940R00hG2qHJcuKKGjYCCtu7djMfpKA9fqsGZBE6IWlVH\r\nCZxYIHPaEfHOybPR5d2GIKzncUQjtO2\/9rsju31GwzrVswG7w0tQUIIaj5AFLIL3\r\njnagjo2LH11ta9mB+DikaZDfd4VYEEfkTJA4BjnNCDa9pYOaFBGGwJMBSH3eWJCZ\r\nURBtk2NBnIheFRaGWRAzUpKAc+ZYdnmuAqe3Eh1en9GNlKTMCO+mAHkFJp3z8Nai\r\n1ijEVK+PIgtrzqc48ft0r6L43Zd184JnSIscBm\/9GUb0sCf+Uv4WFBKm4c7nrWtM\r\nC1LMKqmj2OYD1fZJ65M1VrkAqh8VXNtqQI1caBGMkcs4\/\/1eo\/XomL6sEkvfa9Y2\r\n1OywnVt52ZeLHyUS2P1mvPyWZgL8AxIie82Mtp7ZWX9Q8ubbAgMBAAEwDQYJKoZI\r\nhvcNAQELBQADggEBAI6OdKpKpevWVprPZ1TzUpq5ATj2JyCZySYC71Ud8l3lAEmn\r\nuh9ok5P7ccY\/c\/9\/ePWuvGxNSHmk1+nEEWC8XNXY5OoU9+i+g7vXd6EKOsowallw\r\nvWZB2rjl6+eNC\/AVa0NE2d9C6AWZtLxiV6rVsmkNUbBS6orHq8JJ2PSJKPT0\/nfM\r\nWL+ZORuFguWazEsy9oZBlplaWNxyAgq\/L66SKXynQPe74kZeVdZ5aQluHnBKZAoh\r\n6v0c2YiaoG5Mg6tDWcx4zM8HXv39Nbg2hcAtP2j3F9EkHZaytW9nM7nTIOxZJtR\/\r\nuGJtkj5+e1NQaMYn2NDiYSZALGUQ3YkHv4OIzDY=\r\n-----END CERTIFICATE-----"
936
-}
937 0
\ No newline at end of file
938 1
deleted file mode 100644
... ...
@@ -1,4246 +0,0 @@
1
-/**
2
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
3
- *
4
- * @author Double Bastion LLC
5
- *
6
- * @license GNU AGPL version 3 or any later version
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
- * License as published by the Free Software Foundation; either
11
- * version 3 of the License, or any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
- *
18
- * You should have received a copy of the GNU Affero General Public
19
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-@font-face {
24
-    font-family: 'Inter';
25
-    src: url('../fonts/Inter-Bold.woff2') format('woff2'),
26
-         url('../fonts/Inter-Bold.woff') format('woff');
27
-    font-weight: 700;
28
-    font-style: normal;
29
-}
30
-@font-face {
31
-    font-family: 'Inter';
32
-    src: url('../fonts/Inter-BoldItalic.woff2') format('woff2'),
33
-         url('../fonts/Inter-BoldItalic.woff') format('woff');
34
-    font-weight: 700;
35
-    font-style: italic;
36
-}
37
-@font-face {
38
-    font-family: 'Inter';
39
-    src: url('../fonts/Inter-MediumItalic.woff2') format('woff2'),
40
-         url('../fonts/Inter-MediumItalic.woff') format('woff');
41
-    font-weight: 500;
42
-    font-style: italic;
43
-}
44
-@font-face {
45
-    font-family: 'Inter';
46
-    src: url('../fonts/Inter-SemiBold.woff2') format('woff2'),
47
-         url('../fonts/Inter-SemiBold.woff') format('woff');
48
-    font-weight: 600;
49
-    font-style: normal;
50
-}
51
-@font-face {
52
-    font-family: 'Inter';
53
-    src: url('../fonts/Inter-Regular.woff2') format('woff2'),
54
-         url('../fonts/Inter-Regular.woff') format('woff');
55
-    font-weight: 400;
56
-    font-style: normal;
57
-}
58
-@font-face {
59
-    font-family: 'Inter';
60
-    src: url('../fonts/Inter-SemiBoldItalic.woff2') format('woff2'),
61
-         url('../fonts/Inter-SemiBoldItalic.woff') format('woff');
62
-    font-weight: 600;
63
-    font-style: italic;
64
-}
65
-@font-face {
66
-    font-family: 'Inter';
67
-    src: url('../fonts/Inter-Italic.woff2') format('woff2'),
68
-         url('../fonts/Inter-Italic.woff') format('woff');
69
-    font-weight: 400;
70
-    font-style: italic;
71
-}
72
-@font-face {
73
-    font-family: 'Inter';
74
-    src: url('../fonts/Inter-Medium.woff2') format('woff2'),
75
-         url('../fonts/Inter-Medium.woff') format('woff');
76
-    font-weight: 500;
77
-    font-style: normal;
78
-}
79
-
80
-@font-face {
81
-    font-family: 'Open Sans';
82
-    src: url('../fonts/opensans-light.woff2') format('woff2'),
83
-         url('../fonts/opensans-light.woff') format('woff');
84
-    font-weight: 300;
85
-    font-style: normal;
86
-}
87
-@font-face {
88
-    font-family: 'Open Sans';
89
-    src: url('../fonts/opensans-lightitalic.woff2') format('woff2'),
90
-         url('../fonts/opensans-lightitalic.woff') format('woff');
91
-    font-weight: 300;
92
-    font-style: italic;
93
-}
94
-@font-face {
95
-    font-family: 'Open Sans';
96
-    src: url('../fonts/opensans-regular.woff2') format('woff2'),
97
-         url('../fonts/opensans-regular.woff') format('woff');
98
-    font-weight: 400;
99
-    font-style: normal;
100
-}
101
-@font-face {
102
-    font-family: 'Open Sans';
103
-    src: url('../fonts/opensans-italic.woff2') format('woff2'),
104
-         url('../fonts/opensans-italic.woff') format('woff');
105
-    font-weight: 400;
106
-    font-style: italic;
107
-}
108
-@font-face {
109
-    font-family: 'Open Sans';
110
-    src: url('../fonts/opensans-semibold.woff2') format('woff2'),
111
-         url('../fonts/opensans-semibold.woff') format('woff');
112
-    font-weight: 600;
113
-    font-style: normal;
114
-}
115
-@font-face {
116
-    font-family: 'Open Sans';
117
-    src: url('../fonts/opensans-semibolditalic.woff2') format('woff2'),
118
-         url('../fonts/opensans-semibolditalic.woff') format('woff');
119
-    font-weight: 600;
120
-    font-style: italic;
121
-}
122
-@font-face {
123
-    font-family: 'Open Sans';
124
-    src: url('../fonts/opensans-bold.woff2') format('woff2'),
125
-         url('../fonts/opensans-bold.woff') format('woff');
126
-    font-weight: 700;
127
-    font-style: normal;
128
-}
129
-@font-face {
130
-    font-family: 'Open Sans';
131
-    src: url('../fonts/opensans-bolditalic.woff2') format('woff2'),
132
-         url('../fonts/opensans-bolditalic.woff') format('woff');
133
-    font-weight: 700;
134
-    font-style: italic;
135
-}
136
-@font-face {
137
-    font-family: 'Open Sans';
138
-    src: url('../fonts/opensans-extrabold.woff2') format('woff2'),
139
-         url('../fonts/opensans-extrabold.woff') format('woff');
140
-    font-weight: 800;
141
-    font-style: normal;
142
-}
143
-@font-face {
144
-    font-family: 'Open Sans';
145
-    src: url('../fonts/opensans-extrabolditalic.woff2') format('woff2'),
146
-         url('../fonts/opensans-extrabolditalic.woff') format('woff');
147
-    font-weight: 800;
148
-    font-style: italic;
149
-}
150
-
151
-#smsrelentless_vbar {
152
-   font-family: 'Open Sans';
153
-}
154
-
155
-div > label {
156
-   position: relative;
157
-}
158
-
159
-label span {
160
-   display: inline-block;
161
-   min-width: 110px;
162
-   padding: 0px 0px 8px 0px;
163
-}
164
-
165
-select {
166
-   min-height: 25px;
167
-   box-sizing: border-box;
168
-   text-overflow: inherit;
169
-}
170
-
171
-.providerSettings {
172
-   background-color: #F7F7F7;
173
-   padding: 14px;
174
-}
175
-
176
-.providerName {
177
-   font-size: 18px;
178
-   font-weight: bold;
179
-   margin-bottom: 20px;
180
-}
181
-
182
-#smsrelentless_vbar {
183
-   padding: 18px;
184
-   color: #6d6c6c;
185
-}
186
-
187
-.smsr_textbox {
188
-   display: block;
189
-   box-sizing: content-box;
190
-   width: 70%;
191
-   font-family: 'Inter';
192
-   font-size: 15px;
193
-}
194
-
195
-.smsr_textbox[type='password'] {
196
-   font-size: 10px !important;
197
-}
198
-
199
-.smsr_textboxspec {
200
-   box-sizing: content-box;
201
-   width: 70%;
202
-   font-family: 'Inter';
203
-   font-size: 15px;
204
-}
205
-
206
-#copyToClipboardtel, #copyToClipboardnex, #copyToClipboardtwil, #copyToClipboardflow {
207
-   display: inline-block;
208
-   width: 18px;
209
-   height: 18px;
210
-   margin: 0px 0px -4px 5px;
211
-   cursor: pointer;
212
-}
213
-
214
-#copyToClipboardtel:hover, #copyToClipboardnex:hover, #copyToClipboardtwil:hover, #copyToClipboardflow:hover {
215
-   background-color: #E0E0E0;
216
-}
217
-
218
-#telapi_url, #nexapi_url, #twilapi_url, #twilapi_url_rec, #flowapi_url, #flowapi_url_rec {
219
-   display: inline-block;
220
-   box-sizing: content-box;
221
-   width: 70%;
222
-   font-family: 'Inter';
223
-   font-size: 15px !important;
224
-}
225
-
226
-#generate_tel_rcpt, #generate_tel_delrcpt, #generate_nex_rcpt, #generate_nex_delrcpt, #generate_twil_rcpt, #generate_twil_delrcpt, #generate_flow_rcpt, #generate_flow_delrcpt {
227
-   display: block;
228
-   white-space: normal;
229
-   word-wrap: break-word;
230
-}
231
-
232
-.generateUrl {
233
-   color: #161616;
234
-   background-color: #e3ecf0 !important;
235
-   font-family: 'Inter';
236
-}
237
-
238
-.generateUrl:hover {
239
-   background-color: #c2dcea !important;
240
-}
241
-
242
-.generateUrl:active {
243
-   background-color: #b5cfdd !important;
244
-}
245
-
246
-.setlabeltext {
247
-  font-size: 15px;
248
-}
249
-
250
-#smsr_save_msg {
251
-   display: inline;
252
-   color: #181918;
253
-   background-color: #a5e5b3;
254
-   font-weight: bold;
255
-}
256
-
257
-#get_notify {
258
-   display: block;
259
-   margin-bottom: 18px;
260
-   cursor: pointer;
261
-}
262
-
263
-#includesmsinemail, #showdisplaynames, #adddisplaynames, #showallmessages {
264
-   display: block;
265
-   margin-bottom: 14px;
266
-   cursor: pointer;
267
-}
268
-
269
-#currentbaldiv, #smsnumbersdiv {
270
-   display: block;
271
-   position: relative;
272
-   font-size: 15px;
273
-   font-weight: bold;
274
-   height: 30px;
275
-   margin: 0px 0px 14px 0px;
276
-   background-color: #4CA3D9;
277
-   border-radius: 20px;
278
-}
279
-
280
-.providername {
281
-  color: #FFFFFF;
282
-}
283
-
284
-.providername:hover {
285
-  color: #2c0cfc;
286
-}
287
-
288
-#currentbalance {
289
-  display: inline;
290
-  position: absolute;
291
-  margin: 3px 0px 0px 110px;
292
-  color: #262626;
293
-  font-weight: 600;
294
-}
295
-
296
-#smsprovider {
297
-  display: inline;
298
-  position: absolute;
299
-  width: 102px;
300
-  height: 22px;
301
-  margin: 3px 0px 0px 0px;
302
-  padding: 0px 0px 1px 0px !important;
303
-  -moz-box-sizing: border-box;
304
-  -webkit-box-sizing: border-box;
305
-  box-sizing: border-box;
306
-  background: #fcfcfc;
307
-  font-family: 'Inter' !important;
308
-  font-size: 14.5px;
309
-  font-weight: 600;
310
-  color: #565656;
311
-  text-align: center;
312
-  border-radius: 20px;
313
-}
314
-
315
-#currentsmsnmbrs {
316
-  display: inline-block;
317
-  position: absolute;
318
-  height: 22px;
319
-  width: 54%;
320
-  padding: 0 !important;
321
-  margin: 2px 0px 0px 0px;
322
-  text-align: center;
323
-  text-overflow: inherit;
324
-  font-family: 'Inter' !important;
325
-  font-size: 14px;
326
-  font-weight: 600;
327
-  color: #565656;
328
-  -moz-box-sizing: border-box;
329
-  -webkit-box-sizing: border-box;
330
-  box-sizing: border-box;
331
-  background: #fcfcfc;
332
-  border-radius: 20px;
333
-}
334
-
335
-#refreshSenderIDs {
336
-  display: block;
337
-  position: relative;
338
-  min-width: 24px;
339
-  min-height: 24px;
340
-  float: right;
341
-  padding-left: 0;
342
-  margin-top: 2.6px;
343
-  margin-right: 4px;
344
-  background-image: url('../img/refresh.svg');
345
-  background-repeat: no-repeat;
346
-  background-size: 110% 110%;
347
-  background-position: center center;
348
-  cursor: pointer;
349
-  background-color: #ffffff;
350
-}
351
-
352
-.cllridcls {
353
-  position: relative;
354
-  display: inline;
355
-  font-size: 17px;
356
-  color: #000000;
357
-}
358
-
359
-.tooltipbalanceid  {
360
-  position: relative;
361
-  display: inline-block;
362
-  float: right;
363
-  font-size: 15px;
364
-  color: #000000;
365
-  z-index: 9;
366
-}
367
-
368
-.tooltipsetid  {
369
-  position: relative;
370
-  display: inline-block;
371
-  float: right;
372
-  font-size: 15px;
373
-  color: #000000;
374
-  z-index: 8;
375
-}
376
-
377
-.tooltipbalanceid #infobalance {
378
-  display: block;
379
-  position: relative;
380
-  margin: 4px 14px 0px 0px;
381
-  color: #000000;
382
-  font-size: 19px;
383
-  font-weight: bold;
384
-  font-family: 'Open Sans';
385
-  font-style: italic;
386
-  z-index: 6;
387
-}
388
-
389
-.tooltipbalanceid .balancetooltip {
390
-  display: block;
391
-  position: absolute;
392
-  visibility: hidden;
393
-  width: 264px;
394
-  background-color: #fafafa;
395
-  font-size: 14px;
396
-  font-weight: bold;
397
-  color: #595959;
398
-  text-align: left;
399
-  border-radius: 5px;
400
-  padding: 5px 5px 5px 8px;
401
-  margin: -4px 0px 0px -244px;
402
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
403
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
404
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
405
-  z-index: 6;
406
-}
407
-
408
-.tooltipbalanceid:hover .balancetooltip {
409
-   visibility: visible;
410
-}
411
-
412
-#infotipid {
413
-   display: block;
414
-   position: relative;
415
-   margin: 3.5px 12px 0px 0px;
416
-   color: #000000;
417
-   font-size: 19px;
418
-   font-weight: bold;
419
-   font-family: 'Open Sans';
420
-   font-style: italic;
421
-   z-index: 5;
422
-}
423
-
424
-#setcalleridtp {
425
-   display: block;
426
-   position: absolute;
427
-   width: 274px;
428
-   overflow-y: scroll;
429
-   visibility: hidden;
430
-   background-color: #fafafa;
431
-   border-radius: 5px;
432
-   margin: -5px 0px 0px -223px;
433
-   scrollbar-width: auto;
434
-   scrollbar-color: #a2a2a2 #ececec;
435
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
436
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
437
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
438
-   z-index: 10;
439
-}
440
-
441
-.calleridtooltip {
442
-   display: block;
443
-   position: relative;
444
-   width: auto;
445
-   height: auto;
446
-   background-color: #f4f4f4;
447
-   font-size: 14px;
448
-   font-weight: bold;
449
-   color: #595959;
450
-   text-align: left;
451
-   padding: 5px 12px 5px 10px;
452
-   z-index: 10;
453
-}
454
-
455
-.tooltipsetid:hover #setcalleridtp {
456
-   visibility: visible;
457
-}
458
-
459
-.pflabels {
460
-   font-size: 15px;
461
-   font-weight: bold;
462
-}
463
-
464
-.srheader {
465
-   display: block;
466
-   position: relative;
467
-   margin: 0px 0px 7px 0px;
468
-   font-size: 15px;
469
-   font-weight: bold;
470
-}
471
-
472
-.sendtomultrcvrs {
473
-   display: block;
474
-   position: relative;
475
-   margin: 0px 0px 7px 0px;
476
-   font-size: 17px;
477
-}
478
-
479
-.smsnbformat {
480
-   display: block;
481
-   position: relative;
482
-   margin: 0px;
483
-   font-size: 15px;
484
-   font-weight: bold;
485
-}
486
-
487
-.smsrelentless_box {
488
-   width: 400px;
489
-   display: block;
490
-}
491
-.indtext {
492
-   display: inline-block;
493
-   padding-left: 10px;
494
-}
495
-
496
-#settings-dscr {
497
-   padding-top: 3px;
498
-}
499
-
500
-#sms_upload_msg {
501
-   display: block;
502
-   color: #181918;
503
-   background-color: #a5e5b3;
504
-   font-weight: bold;
505
-}
506
-
507
-#sms_submit_msg {
508
-   display: none;
509
-   margin: 14px 0px 8px 0px;
510
-   padding: 1px 20px 1px 20px;
511
-   width: 100%;
512
-   color: #181918;
513
-   background-color: #a5e5b3;
514
-   font-size: 15px;
515
-   font-weight: bold;
516
-   text-align: center;
517
-   border-radius: 14px;
518
-}
519
-
520
-#pickedfilename {
521
-   font-size: 13px;
522
-}
523
-
524
-#smstodiv {
525
-   display: block;
526
-   position: relative;
527
-   height: 32px;
528
-}
529
-
530
-#smsto {
531
-   display: block;
532
-   width: 99%;
533
-   max-height: 32px;
534
-   padding: 0px 15px 0px 15px;
535
-   color: #565656;
536
-   font-family: 'Inter';
537
-   font-size: 15px;
538
-   font-weight: 600;
539
-   border-radius: 20px;
540
-}
541
-
542
-#sendtomultiple {
543
-   display: inline-block;
544
-   position: relative;
545
-   margin: 10px 0px 12px 0px;
546
-   font-size: 15px;
547
-   font-weight: bold;
548
-}
549
-
550
-#entermessage {
551
-   display: block;
552
-   position: relative;
553
-   margin: 4px 0px 0px 0px;
554
-   font-size: 15px;
555
-   font-weight: bold;
556
-}
557
-
558
-#uploadfileforsms {
559
-   margin-left: 7px;
560
-   background-color: #ffffff;
561
-   border-radius: 3px !important;
562
-}
563
-
564
-.entertime {
565
-   display: inline-block;
566
-   font-size: 15px;
567
-   font-weight: 700;
568
-   margin: 0 0 9px 0;
569
-}
570
-
571
-#sendmediafl {
572
-   display: block;
573
-   position: relative;
574
-   margin: 0px 0px 20px 0px;
575
-   font-size: 15px;
576
-   font-weight: 700;
577
-}
578
-
579
-#tomultchckbx {
580
-   display: inline-block;
581
-   position: absolute;
582
-   margin: 3px 0px 0px 10px;
583
-}
584
-
585
-#mediafilechckbx {
586
-   display: inline-block;
587
-   position: absolute;
588
-   margin: -7px 0px 0px 10px;
589
-}
590
-
591
-#deleteoldchckbox {
592
-   display: inline-block;
593
-   position: absolute;
594
-   margin: 3.5px 0px 0px 10px;
595
-}
596
-
597
-#tomultchckbx:hover, #mediafilechckbx:hover, #deleteoldchckbox:hover {
598
-   cursor: pointer;
599
-}
600
-
601
-.maxmessagelength {
602
-   display: none;
603
-   position: relative;
604
-   margin: 2px 7px 4px 0px;
605
-   font-size: 15px;
606
-   color: #000000;
607
-   z-index: 6;
608
-}
609
-
610
-#maxlengthinfo {
611
-   display: block;
612
-   position: absolute;
613
-   width: 274px;
614
-   height: 200px;
615
-   overflow-y: scroll;
616
-   visibility: hidden;
617
-   background-color: #fafafa;
618
-   border-radius: 5px;
619
-   margin: -11px 0px 0px -6px;
620
-   scrollbar-width: auto;
621
-   scrollbar-color: #a2a2a2 #ececec;
622
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
623
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
624
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
625
-   z-index: 10;
626
-}
627
-
628
-.maxlengthtooltip {
629
-   display: block;
630
-   position: relative;
631
-   width: auto;
632
-   height: auto;
633
-   background-color: #f4f4f4;
634
-   font-size: 14px;
635
-   font-weight: bold;
636
-   color: #595959;
637
-   text-align: left;
638
-   padding: 5px 12px 5px 10px;
639
-   z-index: 10;
640
-}
641
-
642
-.maxmessagelength:hover #maxlengthinfo {
643
-   visibility: visible;
644
-}
645
-
646
-.up-bttn-wrapper {
647
-  display: block;
648
-  position: relative;
649
-  overflow: hidden;
650
-  padding-top: 20px;
651
-  padding-bottom: 30px;
652
-}
653
-
654
-#smstext {
655
-  display: inline-block;
656
-  color: #2a2a2a;
657
-  width: 100%;
658
-  height: 130px;
659
-  text-align: left;
660
-  font-family: 'Inter';
661
-  font-size: 15px;
662
-  font-weight: 500;
663
-  border-radius: 6px;
664
-  resize: vertical;
665
-  white-space: pre-wrap;
666
-}
667
-
668
-#char_count {
669
-  display: none;
670
-  font-size: 14px;
671
-  font-weight: bold;
672
-}
673
-
674
-#mtextSize {
675
-  display: none;
676
-  margin-left: 10px;
677
-  font-size: 14px;
678
-  font-weight: bold;
679
-  color: #4CA3D9;
680
-}
681
-
682
-#submitsms {
683
-   display: block;
684
-   position: relative;
685
-   margin-top: 14px;
686
-   color: white;
687
-   font-family: 'Open Sans';
688
-   font-weight: 700;
689
-   font-size: 15px;
690
-   background-color: #4CA3D9;
691
-   border-radius: 20px;
692
-   cursor: pointer;
693
-   opacity: 1 !important;
694
-}
695
-
696
-#submitsms:hover {
697
-   border-color: #5CAECC;
698
-}
699
-
700
-#submitsms:active {
701
-   background: #4B96B1;
702
-   border-color: #4B96B1;
703
-}
704
-
705
-#multiplerecivers {
706
-   display: none;
707
-   background: #e8f6ff;
708
-   border-radius: 6px;
709
-   padding: 5px;
710
-   margin: 0px 0px 20px 0px;
711
-}
712
-
713
-#multsetrows {
714
-  display: block;
715
-  padding: 5px;
716
-}
717
-
718
-#multsmsinterval {
719
-  display: block;
720
-  width: 100px;
721
-  height: 25px;
722
-  font-family: 'Inter';
723
-  font-size: 14px;
724
-  font-weight: 600;
725
-  padding: 0px 0px 0px 10px;
726
-  border-radius: 20px;
727
-}
728
-
729
-#app {
730
-  position: relative;
731
-  display: flex;
732
-  min-height: 100%;
733
-  min-width: 100%;
734
-}
735
-
736
-#app-content {
737
-   position: relative;
738
-   z-index: 1000;
739
-   flex-basis: 100vw;
740
-   min-width: 0;
741
-   min-height: 100%;
742
-   margin: 0 !important;
743
-   overflow-y: scroll;
744
-}
745
-
746
-#viewerContainer {
747
-   display: block;
748
-   position: relative;
749
-   width: 100%;
750
-   height: 100%;
751
-}
752
-
753
-.pdfViewer #viewer {
754
-   display: block;
755
-   position: relative;
756
-   min-width: 100%;
757
-   min-height: 100%;
758
-}
759
-
760
-#smsdocpreview {
761
-   display: inline-block;
762
-   position: relative;
763
-   width: 100%;
764
-   height: 100%;
765
-   margin-top: -50px;
766
-}
767
-
768
-#outerContainer {
769
-   display: block;
770
-   position: relative;
771
-   width: 100%;
772
-   height: 100%;
773
-}
774
-
775
-#mainContainer {
776
-   display: block;
777
-   position: relative;
778
-   width: 100%;
779
-   height: 100%;
780
-}
781
-
782
-.texttooltip {
783
-  font-family: 'Open Sans';
784
-  font-style: italic;
785
-  color: #000000;
786
-  font-size: 19px;
787
-  font-weight: bold;
788
-  margin: 0px 0px 4px 4px;
789
-}
790
-
791
-.fortooltip {
792
-   position: relative;
793
-   display: inline-block;
794
-   margin: 0px;
795
-   font-size: 15px;
796
-   color: #000000;
797
-   z-index: 7;
798
-}
799
-
800
-.fortooltipsec {
801
-   position: relative;
802
-   display: inline-block;
803
-   font-size: 15px;
804
-   color: #000000;
805
-   padding: 2px 0px 4px 2px;
806
-   z-index: 3;
807
-}
808
-
809
-.fortooltiptert {
810
-   position: relative;
811
-   display: inline-block;
812
-   font-size: 15px;
813
-   color: #000000;
814
-   padding: 2px 0px 4px 2px;
815
-   z-index: 0;
816
-}
817
-
818
-.fortooltipfourth {
819
-   position: relative;
820
-   display: inline-block;
821
-   font-size: 15px;
822
-   color: #000000;
823
-   padding: 2px 0px 4px 2px;
824
-   z-index: 4;
825
-}
826
-
827
-#tonmbrformat {
828
-   display: block;
829
-   position: absolute;
830
-   width: 274px;
831
-   overflow-y: scroll;
832
-   visibility: hidden;
833
-   background-color: #fafafa;
834
-   border-radius: 5px;
835
-   margin: -11px 0px 0px -6px;
836
-   scrollbar-width: auto;
837
-   scrollbar-color: #a2a2a2 #ececec;
838
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
839
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
840
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
841
-   z-index: 10;
842
-}
843
-
844
-.fortooltiptext {
845
-   display: block;
846
-   position: relative;
847
-   width: auto;
848
-   height: auto;
849
-   background-color: #f4f4f4;
850
-   font-size: 14px;
851
-   font-weight: bold;
852
-   color: #595959;
853
-   text-align: left;
854
-   padding: 5px 12px 5px 10px;
855
-   z-index: 10;
856
-}
857
-
858
-.fortooltip:hover #tonmbrformat {
859
-   visibility: visible;
860
-}
861
-
862
-#uploadfileinfo {
863
-   display: block;
864
-   position: absolute;
865
-   width: 274px;
866
-   overflow-y: scroll;
867
-   visibility: hidden;
868
-   background-color: #fafafa;
869
-   border-radius: 5px;
870
-   margin: -11px 0px 0px -6px;
871
-   scrollbar-width: auto;
872
-   scrollbar-color: #a2a2a2 #ececec;
873
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
874
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
875
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
876
-   z-index: 10;
877
-}
878
-
879
-.fortooltiptextsec {
880
-   display: block;
881
-   position: relative;
882
-   width: auto;
883
-   height: auto;
884
-   background-color: #f4f4f4;
885
-   font-size: 14px;
886
-   font-weight: bold;
887
-   color: #595959;
888
-   text-align: left;
889
-   padding: 5px 12px 5px 10px;
890
-   z-index: 10;
891
-}
892
-
893
-.fortooltipsec:hover #uploadfileinfo {
894
-   visibility: visible;
895
-}
896
-
897
-#deleteoldinfo {
898
-   display: block;
899
-   position: absolute;
900
-   width: 274px;
901
-   height: 200px;
902
-   overflow-y: scroll;
903
-   visibility: hidden;
904
-   background-color: #fafafa;
905
-   border-radius: 5px;
906
-   margin: -11px 0px 0px -6px;
907
-   scrollbar-width: auto;
908
-   scrollbar-color: #a2a2a2 #ececec;
909
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
910
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
911
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
912
-   z-index: 10;
913
-}
914
-
915
-.fortooltiptexttert {
916
-   display: block;
917
-   position: relative;
918
-   width: auto;
919
-   height: auto;
920
-   background-color: #f4f4f4;
921
-   font-size: 14px;
922
-   font-weight: bold;
923
-   color: #595959;
924
-   text-align: left;
925
-   padding: 5px 12px 5px 10px;
926
-   z-index: 10;
927
-}
928
-
929
-.fortooltiptert:hover #deleteoldinfo {
930
-   visibility: visible;
931
-}
932
-
933
-#uploadmmfileinfo {
934
-   display: block;
935
-   position: absolute;
936
-   width: 274px;
937
-   height: 350px;
938
-   overflow-y: scroll;
939
-   visibility: hidden;
940
-   background-color: #fafafa;
941
-   border-radius: 5px;
942
-   margin: -11px 0px 0px -16px;
943
-   scrollbar-width: auto;
944
-   scrollbar-color: #a2a2a2 #ececec;
945
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
946
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
947
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
948
-   z-index: 10;
949
-}
950
-
951
-#tooltiptextfourth {
952
-   display: block;
953
-   position: relative;
954
-   width: auto;
955
-   height: auto;
956
-   background-color: #f4f4f4;
957
-   font-size: 14px;
958
-   font-weight: bold;
959
-   color: #595959;
960
-   text-align: left;
961
-   padding: 5px 12px 5px 10px;
962
-   z-index: 10;
963
-}
964
-
965
-.fortooltipfourth:hover #uploadmmfileinfo {
966
-   visibility: visible;
967
-}
968
-
969
-.fileupload {
970
-   display: none;
971
-}
972
-
973
-.uploadflbt {
974
-   width: 411px;
975
-}
976
-
977
-#infotipmms {
978
-   display: block;
979
-   position: relative;
980
-   margin: 0px;
981
-   color: #000000;
982
-   font-size: 19px;
983
-   font-weight: bold;
984
-   font-family: 'Open Sans';
985
-   font-style: italic;
986
-   z-index: 5;
987
-}
988
-
989
-#mmsfoldersview {
990
-   display: none;
991
-   position: relative;
992
-   width: 100%;
993
-   height: 100%;
994
-   margin-top: -50px;
995
-   background-color: #f4f9ff;
996
-}
997
-
998
-#upmediafiles {
999
-   display: none;
1000
-   background: #e8f6ff;
1001
-   border-radius: 6px;
1002
-   padding: 10px;
1003
-   margin: 0px 0px 20px 0px;
1004
-}
1005
-
1006
-.uploadflbt .icon-upload {
1007
-   display: inline;
1008
-}
1009
-
1010
-.pfprompt {
1011
-   font-size: 15px;
1012
-   font-weight: bold;
1013
-}
1014
-
1015
-.fileuploadstl, .filesfromnc {
1016
-  display: block;
1017
-  font-size: 15px;
1018
-  font-weight: bold;
1019
-  color: #000000;
1020
-}
1021
-
1022
-#uploadfileformms {
1023
-  margin-left: 21px;
1024
-  background-color: #ffffff;
1025
-  border-radius: 3px !important;
1026
-}
1027
-
1028
-#filestotsize {
1029
-  display: none;
1030
-  position: relative;
1031
-  height: auto;
1032
-  padding: 0px 0px 8px 0px;
1033
-  font-size: 14px;
1034
-  font-weight: bold;
1035
-  color: #189558;
1036
-}
1037
-
1038
-#filessizetext {
1039
-  display: inline;
1040
-  position: relative;
1041
-  padding-left: 10px;
1042
-}
1043
-
1044
-#fileuploadednm #induploadfile .indivflcls {
1045
-  display: inline-block;
1046
-  position: relative;
1047
-  height:auto;
1048
-  max-width: 90%;
1049
-  overflow: visible;
1050
-  white-space: normal;
1051
-  word-break: break-all;
1052
-  text-overflow: ellipsis;
1053
-  font-size: 15px;
1054
-  color: #0e6ba0;
1055
-}
1056
-
1057
-#fileuploadednm #induploadfile .indivflcls:hover {
1058
-  cursor: pointer;
1059
-  text-decoration: underline;
1060
-}
1061
-
1062
-#fileuploadednm #induploadfile .indupfldl {
1063
-  position: relative;
1064
-  display: inline-block;
1065
-  float: right;
1066
-  cursor: pointer;
1067
-  width: 20px;
1068
-  color: #0e6ba0;
1069
-  text-align: center;
1070
-  font-size: 15px;
1071
-}
1072
-
1073
-#fileuploadednm #induploadfile .indupfldl:hover {
1074
-  background-color: #e8f6ff;
1075
-  cursor: pointer;
1076
-}
1077
-
1078
-#filespickednc .indivflpckd {
1079
-  display: inline-block;
1080
-  position: relative;
1081
-  height:auto;
1082
-  max-width: 90%;
1083
-  overflow: visible;
1084
-  white-space: normal;
1085
-  word-break: break-all;
1086
-  text-overflow: ellipsis;
1087
-  color: #0e6ba0;
1088
-}
1089
-
1090
-.indivflpckd:hover {
1091
-  cursor: pointer;
1092
-  text-decoration: underline;
1093
-}
1094
-
1095
-.indpckfldl {
1096
-  position: relative;
1097
-  display: inline-block;
1098
-  float: right;
1099
-  cursor: pointer;
1100
-  width: 20px;
1101
-  color: #0e6ba0;
1102
-  text-align: center;
1103
-}
1104
-
1105
-#filespickednc .indpckfldl:hover {
1106
-  background-color: #e8f6ff;
1107
-  cursor: pointer;
1108
-}
1109
-
1110
-#pf_upload_msg, #pf_choose_msg {
1111
-  display: block;
1112
-  color: #181918;
1113
-  background-color: #a5e5b3;
1114
-  font-weight: bold;
1115
-  text-align: center;
1116
-  border-radius: 3px;
1117
-}
1118
-
1119
-#choosefilen {
1120
-  display: inline;
1121
-  position: relative;
1122
-  margin: 0px 0px 20px 16px;
1123
-  padding-top: 15px;
1124
-  background-image: url('../img/nextcloud_logo.svg');
1125
-  background-repeat: no-repeat;
1126
-  background-size: 110% 125%;
1127
-  background-position: center center;
1128
-  min-width: 66px;
1129
-  min-height: 30px;
1130
-  cursor:pointer;
1131
-}
1132
-
1133
-#choosefilen:active {
1134
-  background-image: url('../img/nextcloud_logo_bright.svg');
1135
-  background-repeat: no-repeat;
1136
-  background-size: 110% 125%;
1137
-  background-position: center center;
1138
-  min-width: 66px;
1139
-  min-height: 30px;
1140
-}
1141
-
1142
-#pickFromNext, #uploadFile {
1143
-  display: inline-block;
1144
-  position: relative;
1145
-  font-size: 15px;
1146
-  font-weight: bold;
1147
-  color: #6d6c6c;
1148
-}
1149
-
1150
-#filespickednc .indivflpckd {
1151
-  display: inline-block;
1152
-  position: relative;
1153
-  height:auto;
1154
-  max-width: 90%;
1155
-  overflow: visible;
1156
-  white-space: normal;
1157
-  word-break: break-all;
1158
-  text-overflow: ellipsis;
1159
-  color: #0e6ba0;
1160
-}
1161
-
1162
-#filespickednc .indpckfldl:hover {
1163
-  background-color: #e8f6ff;
1164
-  cursor: pointer;
1165
-}
1166
-
1167
-.uploadflbt {
1168
-  width: 411px;
1169
-}
1170
-
1171
-.uploadflbt .icon-upload {
1172
-  display: inline;
1173
-}
1174
-
1175
-.uploadphnfiledv {
1176
-  display: inline-block;
1177
-  position: relative;
1178
-  margin: 16px 0;
1179
-}
1180
-
1181
-.uploadfiledv {
1182
-  display: inline-block;
1183
-  position: relative;
1184
-  margin: 16px 0px 22px 0px;
1185
-}
1186
-
1187
-#mmsfileuploadednm .indivflcls {
1188
-  display: inline-block;
1189
-  position: relative;
1190
-  height:auto;
1191
-  max-width: 90%;
1192
-  overflow: visible;
1193
-  white-space: normal;
1194
-  word-break: break-all;
1195
-  text-overflow: ellipsis;
1196
-  color: #0e6ba0;
1197
-}
1198
-
1199
-#mmsfileuploadednm .indivflcls:hover {
1200
-  cursor: pointer;
1201
-  text-decoration: underline;
1202
-}
1203
-
1204
-#mmsfileuploadednm .indupfldl {
1205
-  position: relative;
1206
-  display: inline-block;
1207
-  float: right;
1208
-  cursor: pointer;
1209
-  width: 20px;
1210
-  color: #0e6ba0;
1211
-  text-align: center;
1212
-}
1213
-
1214
-#mmsfileuploadednm .indupfldl:hover {
1215
-  background-color: #e8f6ff;
1216
-  cursor: pointer;
1217
-}
1218
-
1219
-#filessizetext {
1220
-  display: inline;
1221
-  position: relative;
1222
-  padding-left: 10px;
1223
-}
1224
-
1225
-.srheaderch {
1226
-  display: block;
1227
-  position: relative;
1228
-  margin: 0px 0px 15px 0px;
1229
-  font-size: 15px;
1230
-  font-weight: bold;
1231
-}
1232
-
1233
-.indgenflclsmms, .indgenpckfls {
1234
-  display: block;
1235
-  margin: 10px 6px 0px 6px;
1236
-}
1237
-
1238
-#pickfilesNext {
1239
-  display: block;
1240
-  margin: 20px 0px 0px 0px;
1241
-}
1242
-
1243
-#dirbuttons {
1244
-  margin-top: 20px;
1245
-}
1246
-
1247
-button, input, textarea, div[contenteditable="true"], div[contenteditable="false"] {
1248
-  min-height: 9px;
1249
-}
1250
-
1251
-#choosefilen {
1252
-  display: inline;
1253
-  position: relative;
1254
-  margin: 4px 0px 20px 16px;
1255
-  background-image: url('../img/nextcloud_logo.svg');
1256
-  background-repeat: no-repeat;
1257
-  background-size: 110% 125%;
1258
-  background-position: center center;
1259
-  min-width: 66px;
1260
-  min-height: 30px;
1261
-  cursor:pointer;
1262
-}
1263
-
1264
-#choosefilen:active {
1265
-  background-image: url('../img/nextcloud_logo_bright.svg');
1266
-  background-repeat: no-repeat;
1267
-  background-size: 110% 125%;
1268
-  background-position: center center;
1269
-  min-width: 66px;
1270
-  min-height: 30px;
1271
-}
1272
-
1273
-#pickid, #showsum {
1274
-  display: inline-block;
1275
-  position: relative;
1276
-  font-size: 15px;
1277
-  font-weight: bold;
1278
-  margin: 3px 4px 0px 14px;
1279
-  color: #FFFFFF;
1280
-}
1281
-
1282
-.smsrelentless_checkbox:hover {
1283
-  cursor: pointer;
1284
-}
1285
-
1286
-#smstables {
1287
-  display: block; 
1288
-  position: relative;
1289
-  min-width: 100%;
1290
-  min-height: 100%;
1291
-  font-family: 'Inter' !important;
1292
-}
1293
-
1294
-#smsRGreyLogo {
1295
-  display: block;
1296
-  position: relative;
1297
-  background-image: url('../img/sms_relentless_grey.svg');
1298
-  background-repeat: no-repeat;
1299
-  background-position: center center;
1300
-  width: 100%;
1301
-  height: 675px;
1302
-}
1303
-
1304
-#recSmsTable, #sentSmsTable {
1305
-  display: block;
1306
-  position: relative;
1307
-  top: 0px;
1308
-  width: 100%;
1309
-  height: auto;
1310
-  font-size: 14px;
1311
-  z-index: 50;
1312
-  background: #FFFFFF;
1313
-}
1314
-
1315
-.receivedrows, .receivedrowsbody, .sentrows, .sentrowsbody, .groupedmsgrows {
1316
-  border: 1px solid #f3f3f3;
1317
-  padding: 8px;
1318
-}
1319
-
1320
-#conversationsTable {
1321
-  display: block;
1322
-  position: relative;
1323
-  top: 0;
1324
-  bottom: 0;
1325
-  font-size: 14px;
1326
-  background-color: #ffffff;
1327
-  z-index: 1000;
1328
-}
1329
-
1330
-#conversationsTable td {
1331
-  text-align: left;
1332
-  vertical-align: top;
1333
-  border: 1px solid #f3f3f3;
1334
-  padding: 2px;
1335
-}
1336
-
1337
-#conversationsTable tr:hover {
1338
-  background-color: #ffffff;
1339
-}
1340
-
1341
-#convArchAndActive {
1342
-  overflow-y: auto;
1343
-  margin-top: -2.5px;
1344
-  min-width: 245px;
1345
-}
1346
-
1347
-#conversationsText {
1348
-  overflow-y: auto;
1349
-  margin-top: -2.5px;
1350
-}
1351
-
1352
-#totalConvNmbr {
1353
-  display: block;
1354
-  position: relative;
1355
-  width: 100%;
1356
-  height: auto;
1357
-  margin: -1px 0 0 0;
1358
-  padding: 0 0 0 7px;
1359
-  font-size: 13px;
1360
-  font-weight: 600;
1361
-  color: #4cbc86;
1362
-  white-space: normal;
1363
-  word-break: break-word;
1364
-}
1365
-
1366
-#activeCvImg {
1367
-  display: inline-block;
1368
-  position: relative;
1369
-  width: 12px;
1370
-  height: 12px;
1371
-  margin: 0px 4px 0px 14px;
1372
-  background-image: url('../img/active_small.svg');
1373
-  background-repeat: no-repeat;
1374
-  background-position: center center;
1375
-  vertical-align: middle;
1376
-}
1377
-
1378
-#archivedCvImg {
1379
-  display: inline-block;
1380
-  position: relative;
1381
-  width: 15px;
1382
-  height: 15px;
1383
-  margin: 0px 6px 0px 4px;
1384
-  background-image: url('../img/archived_small.svg');
1385
-  background-repeat: no-repeat;
1386
-  background-position: center center;
1387
-  vertical-align: text-top;
1388
-}
1389
-
1390
-#convTextHeader {
1391
-  position: sticky;
1392
-  top: 0;
1393
-  min-height: 30px;
1394
-  margin-bottom: 8px;
1395
-  background-color: #e3f4fa;
1396
-  border-radius: 4px;
1397
-  font-size: 15px;
1398
-  font-weight: 700;
1399
-  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.1);
1400
-  z-index: 1000;
1401
-}
1402
-
1403
-#convTextTbl {
1404
-  display: table;
1405
-  table-layout: fixed;
1406
-  position: relative;
1407
-  margin: 0;
1408
-  border: none;
1409
-  font-size: 14px;
1410
-  width: 100%;
1411
-  height: 100%;
1412
-}
1413
-
1414
-#convTextTbl tr:hover {
1415
-  background-color: transparent;
1416
-}
1417
-
1418
-#convTextTbl td {
1419
-  height: 100%;
1420
-  margin: 0;
1421
-  padding: 0;
1422
-  border: none;
1423
-  text-align: center;
1424
-}
1425
-
1426
-#archUnarchAct {
1427
-  display: block;
1428
-  width: 20.8px;
1429
-  height: 26px;
1430
-  z-index: 999999;
1431
-}
1432
-
1433
-.archiveConv {
1434
-  display: block;
1435
-  position: absolute;
1436
-  width: 20.8px;
1437
-  height: 26px;
1438
-  top: 1px;
1439
-  left: 12.5px;
1440
-  background-image: url('../img/archive.svg');
1441
-  background-repeat: no-repeat;
1442
-  background-position: center center;
1443
-  cursor: pointer;
1444
-}
1445
-
1446
-.archiveConv:hover {
1447
-  background-image: url('../img/archive_red.svg');
1448
-}
1449
-
1450
-.unarchiveConv {
1451
-  display: block;
1452
-  position: absolute;
1453
-  width: 20.8px;
1454
-  height: 26px;
1455
-  top: 1px;
1456
-  left: 11px;
1457
-  background-image: url('../img/unarchive.svg');
1458
-  background-repeat: no-repeat;
1459
-  background-position: center center;
1460
-  cursor: pointer;
1461
-}
1462
-
1463
-.unarchiveConv:hover {
1464
-  background-image: url('../img/unarchive_red.svg');
1465
-}
1466
-
1467
-#filterSection {
1468
-  display: block;
1469
-  position: relative;
1470
-  height: 16px;
1471
-  margin: 4px 6px 0 6px;
1472
-  background-color: #f0fbff;
1473
-  border-radius: 10px;
1474
-  border: none;
1475
-  cursor: pointer;
1476
-  text-align: center;
1477
-}
1478
-
1479
-#filterSecImg {
1480
-  display: inline-block;
1481
-  position: relative;
1482
-  width: 10.7px;
1483
-  height: 10.7px;
1484
-  margin: 0 auto 4.5px auto;
1485
-  background-image: url('../img/filter_blue.svg');
1486
-  background-repeat: no-repeat;
1487
-  background-position: center center;
1488
-  cursor: pointer;
1489
-}
1490
-
1491
-#filterByTag {
1492
-  display: none;
1493
-  width: 100%;
1494
-  height: auto;
1495
-  margin: 1px 0 2px;
1496
-}
1497
-
1498
-#filterByTagImg {
1499
-  display: inline-block;
1500
-  position: relative;
1501
-  width: 12px;
1502
-  height: 12px;
1503
-  margin: 0 13px 0 8px;
1504
-  background-image: url('../img/tag.svg');
1505
-  background-repeat: no-repeat;
1506
-  background-position: center center;
1507
-}
1508
-
1509
-#tagFilter {
1510
-  display: inline-block;
1511
-  position: relative;
1512
-  height: 20px;
1513
-  width: 79%;
1514
-  margin: 0;
1515
-  padding: 0 9px;
1516
-  text-align: left;
1517
-  text-overflow: inherit;
1518
-  font-family: 'Inter' !important;
1519
-  font-size: 14px;
1520
-  font-weight: 600;
1521
-  color: #565656;
1522
-  -moz-box-sizing: border-box;
1523
-  -webkit-box-sizing: border-box;
1524
-  box-sizing: border-box;
1525
-  background-color: #f0fbff;
1526
-  border-radius: 20px;
1527
-  border: none;
1528
-}
1529
-
1530
-#clearTagFilter {
1531
-  display: inline-block;
1532
-  position: relative;
1533
-  width: 18px;
1534
-  height: 18px;
1535
-  margin: 0 0 -4px 9px;
1536
-  background-image: url('../img/clearfilters_small.svg');
1537
-  background-repeat: no-repeat;
1538
-  background-position: center center;
1539
-  cursor: pointer;
1540
-}
1541
-
1542
-#filterByFlag {
1543
-  display: none;
1544
-  width: 100%;
1545
-  height: auto;
1546
-  margin: 1px 0 2px 0;
1547
-}
1548
-
1549
-#filterByFlagImg {
1550
-  display: inline-block;
1551
-  position: relative;
1552
-  width: 15px;
1553
-  height: 15px;
1554
-  margin: 0 10px 0 8px;
1555
-  background-image: url('../img/flag_red.svg');
1556
-  background-repeat: no-repeat;
1557
-  background-position: center center;
1558
-}
1559
-
1560
-#flagFilter {
1561
-  display: inline-block;
1562
-  position: relative;
1563
-  height: 20px;
1564
-  width: 79%;
1565
-  margin: 0;
1566
-  padding: 0 9px;
1567
-  text-align: left;
1568
-  text-overflow: inherit;
1569
-  font-family: 'Inter' !important;
1570
-  font-size: 14px;
1571
-  font-weight: 600;
1572
-  color: #565656;
1573
-  -moz-box-sizing: border-box;
1574
-  -webkit-box-sizing: border-box;
1575
-  box-sizing: border-box;
1576
-  background-color: #f0fbff;
1577
-  border-radius: 20px;
1578
-  border: none;
1579
-}
1580
-
1581
-#clearFlagFilter {
1582
-  display: inline-block;
1583
-  position: relative;
1584
-  width: 18px;
1585
-  height: 18px;
1586
-  margin: 0 0 -4px 9px;
1587
-  background-image: url('../img/clearfilters_small.svg');
1588
-  background-repeat: no-repeat;
1589
-  background-position: center center;
1590
-  cursor: pointer;
1591
-}
1592
-
1593
-#convBarTitle {
1594
-  width: 90% !important;
1595
-  vertical-align: middle !important;
1596
-  white-space: normal;
1597
-}
1598
-
1599
-#titleFirstRow {
1600
-  display: block;
1601
-  position: relative;
1602
-  width: 100%;
1603
-  height: auto;
1604
-  text-align: center;
1605
-  color: #353535;
1606
-}
1607
-
1608
-#titleSecRow {
1609
-  display: none;
1610
-  position: relative;
1611
-  width: 100%;
1612
-  height: auto;
1613
-  color: #353535;
1614
-}
1615
-
1616
-#titleConvDesc, #titleConvTag, #titleConvFlag, #titleConvDelete {
1617
-  display: block;
1618
-  position: relative;
1619
-  width: 100%;
1620
-  height: auto;
1621
-  text-align: left;
1622
-  margin: 6px 0 6px 11px;
1623
-}
1624
-
1625
-.cvFlagRedCvt {
1626
-  display: inline-block;
1627
-  position: relative;
1628
-  width: 15px;
1629
-  height: 15px;
1630
-  margin: 0;
1631
-  background-image: url('../img/flag_red.svg');
1632
-  background-repeat: no-repeat;
1633
-  background-position: center center;
1634
-}
1635
-
1636
-.cvFlagEmptyCvt {
1637
-  display: inline-block;
1638
-  position: relative;
1639
-  width: 15px;
1640
-  height: 15px;
1641
-  margin: 0;
1642
-  background-image: url('../img/flag_empty.svg');
1643
-  background-repeat: no-repeat;
1644
-  background-position: center center;
1645
-}
1646
-
1647
-.convTagCvt {
1648
-  display: inline-block;
1649
-  position: relative;
1650
-  width: 12px;
1651
-  height: 12px;
1652
-  margin: 0 0 -0.3px 0;
1653
-  background-image: url('../img/tag.svg');
1654
-  background-repeat: no-repeat;
1655
-  background-position: center center;
1656
-}
1657
-
1658
-.convTagAddedCvt {
1659
-  display: inline-block;
1660
-  position: relative;
1661
-  width: 12px;
1662
-  height: 12px;
1663
-  margin: 0 4.5px -0.3px 0;
1664
-  background-image: url('../img/tag_added.svg');
1665
-  background-repeat: no-repeat;
1666
-  background-position: center center;
1667
-}
1668
-
1669
-.convDescCvt {
1670
-  display: inline-block;
1671
-  position: relative;
1672
-  width: 12px;
1673
-  height: 11px;
1674
-  margin: 6px 0 0 0;
1675
-  background-image: url('../img/description.svg');
1676
-  background-repeat: no-repeat;
1677
-  background-position: center center;
1678
-  vertical-align: top;
1679
-}
1680
-
1681
-.convDescAddedCvt {
1682
-  display: inline-block;
1683
-  position: relative;
1684
-  width: 12px;
1685
-  height: 11px;
1686
-  margin: 6px 0 0 0;
1687
-  background-image: url('../img/description_added.svg');
1688
-  background-repeat: no-repeat;
1689
-  background-position: center center;
1690
-  vertical-align: top;
1691
-}
1692
-
1693
-.cvTagContent {
1694
-  display: inline-block;
1695
-  margin: 0 0 0 10px;
1696
-  width: 94%;
1697
-}
1698
-
1699
-.cvFlagContent {
1700
-  display: inline-block;
1701
-  margin: 0 0 0 10px;
1702
-  width: 94%;
1703
-}
1704
-
1705
-.cvDescContent {
1706
-  display: inline-block;
1707
-  margin: 0 0 0 14px;
1708
-  width: 94%;
1709
-}
1710
-
1711
-#deleteAllMsgConv {
1712
-  display: inline-block;
1713
-  position: relative;
1714
-  width: 16px;
1715
-  height: 20px;
1716
-  margin: 0 10px -1px -1px;
1717
-  background-image: url('../img/garbage.svg');
1718
-  background-repeat: no-repeat;
1719
-  background-position: center center;
1720
-  cursor: pointer;
1721
-}
1722
-
1723
-#deleteMsgsCvText {
1724
-  display: inline-block;
1725
-  position: relative;
1726
-  margin: 0;
1727
-  font-size: 14px;
1728
-  color: #7d1d84;
1729
-}
1730
-
1731
-#expandTitle {
1732
-  display: block;
1733
-  position: relative;
1734
-  width: 100%;
1735
-  height: 13px;
1736
-  margin: -6px auto 0 auto;
1737
-  text-align: center;
1738
-}
1739
-
1740
-#expandTitleImg {
1741
-  display: block;
1742
-  position: relative;
1743
-  width: 60px;
1744
-  height: 13px;
1745
-  margin: 0 auto;
1746
-  background-image: url('../img/arrowDown_small.svg');
1747
-  background-repeat: no-repeat;
1748
-  background-position: center center;
1749
-  cursor: pointer;
1750
-}
1751
-
1752
-.convPart {
1753
-  display: block;
1754
-  position: absolute;
1755
-  width: 16px;
1756
-  height: 20px;
1757
-  top: 8px;
1758
-  right: 10px;
1759
-  background-image: url('../img/participants.svg');
1760
-  background-repeat: no-repeat;
1761
-  background-position: center center;
1762
-  cursor: pointer;
1763
-}
1764
-
1765
-.convPartRed {
1766
-  display: block;
1767
-  position: absolute;
1768
-  width: 16px;
1769
-  height: 20px;
1770
-  top: 8px;
1771
-  right: 10px;
1772
-  background-image: url('../img/participants_red.svg');
1773
-  background-repeat: no-repeat;
1774
-  background-position: center center;
1775
-  cursor: pointer;
1776
-}
1777
-
1778
-.removeConv {
1779
-  display: block;
1780
-  position: absolute;
1781
-  width: 16px;
1782
-  height: 20px;
1783
-  top: 5px;
1784
-  right: 12.5px;
1785
-  background-image: url('../img/garbage.svg');
1786
-  background-repeat: no-repeat;
1787
-  background-position: center center;
1788
-  cursor: pointer;
1789
-}
1790
-
1791
-.removeConv:hover {
1792
-  background-image: url('../img/garbage_bright.svg');
1793
-}
1794
-
1795
-.removeConvGrey {
1796
-  display: block;
1797
-  position: relative;
1798
-  width: 16px;
1799
-  height: 20px;
1800
-  float: right;
1801
-  margin: 5px 12.5px 0 0;
1802
-  background-image: url('../img/garbage_grey.svg');
1803
-  background-repeat: no-repeat;
1804
-  background-position: center center;
1805
-}
1806
-
1807
-#convListRowCell {
1808
-  display: block;
1809
-  width: 100%;
1810
-  height: auto;
1811
-  min-height: 358px;
1812
-  margin: 0;
1813
-  padding: 0 0 0 7px;
1814
-  overflow: scroll;
1815
-  white-space: nowrap;
1816
-}
1817
-
1818
-.convsListArch {
1819
-  display: block;
1820
-  position: relative;
1821
-  margin: 7px 6px;
1822
-  padding: 3px 10px;
1823
-  border: none;
1824
-  border-radius: 10px;
1825
-  background-color: #fcf5fb;
1826
-  font-size: 14px;
1827
-  white-space: normal;
1828
-  word-break: break-word;
1829
-  cursor: pointer;
1830
-}
1831
-
1832
-.convsListAct {
1833
-  display: block;
1834
-  position: relative;
1835
-  margin: 7px 6px;
1836
-  padding: 3px 10px;
1837
-  border: none;
1838
-  border-radius: 10px;
1839
-  background-color: #effcfc;
1840
-  font-size: 14px;
1841
-  white-space: normal;
1842
-  word-break: break-word;
1843
-  cursor: pointer;
1844
-}
1845
-
1846
-.archConvImg {
1847
-  display: block; 
1848
-  position: relative;
1849
-  float: right;
1850
-  margin: 3.6px -3px 0 6px;
1851
-}
1852
-
1853
-.activeConvImg {
1854
-  display: block; 
1855
-  position: relative;
1856
-  float: right;
1857
-  margin: 1.8px -1.8px 0 6px;
1858
-}
1859
-
1860
-.convLastMsgFrom {
1861
-  display: inline-block;
1862
-  margin-right: 8px;
1863
-  padding: 0;
1864
-  font-size: 12.5px;
1865
-  color: #353535;
1866
-  cursor: pointer;
1867
-}
1868
-
1869
-.convLastMsgTo {
1870
-  display: inline-block;
1871
-  margin: 0;
1872
-  padding: 0;
1873
-  font-size: 12.5px;
1874
-  color: #353535;
1875
-  line-height: 14px;
1876
-  cursor: pointer;
1877
-}
1878
-
1879
-.msgAuthorNameConv {
1880
-  border: none;
1881
-  border-radius: 20px;
1882
-  padding: 2px 8px;
1883
-  margin: 0 4px 0 0;
1884
-  color: #535353;
1885
-  background-color: #ebf4ff !important;
1886
-  cursor: pointer;
1887
-}
1888
-
1889
-.convLastMsg {
1890
-  font-size: 14px;
1891
-  font-weight: 500;
1892
-  margin: 5px 0 4px 0;
1893
-  color: #353535;
1894
-  white-space: normal;
1895
-  word-break: break-word;
1896
-  overflow: hidden;
1897
-  text-overflow: ellipsis;
1898
-  display: -webkit-box;
1899
-  -webkit-line-clamp: 3;
1900
-  -webkit-box-orient: vertical;
1901
-  cursor: pointer;
1902
-}
1903
-
1904
-.dateSection {
1905
-  display: block;
1906
-  position: relative;
1907
-  width: 100%;
1908
-  height: auto;
1909
-  cursor: pointer;
1910
-}
1911
-
1912
-.dateClock {
1913
-  display: inline-block;
1914
-  position: relative;
1915
-  width: 14px;
1916
-  height: 14px;
1917
-  margin: 0 0 -2.3px 0;
1918
-  background-image: url('../img/clock.svg');
1919
-  background-repeat: no-repeat;
1920
-  background-position: center center;
1921
-}
1922
-
1923
-.convLastMsgDate {
1924
-  display: inline-block;
1925
-  position: relative;
1926
-  margin: 1px 0 0 6px;
1927
-  font-size: 12.5px;
1928
-  line-height: normal;
1929
-  color: #353535;
1930
-  cursor: pointer;
1931
-}
1932
-
1933
-.convDesc {
1934
-  display: inline-block;
1935
-  position: relative;
1936
-  width: 12px;
1937
-  height: 11px;
1938
-  margin: 0 0 -0.2px 0;
1939
-  background-image: url('../img/description.svg');
1940
-  background-repeat: no-repeat;
1941
-  background-position: center center;
1942
-  cursor: pointer;
1943
-}
1944
-
1945
-.convDescAdded {
1946
-  display: inline-block;
1947
-  position: relative;
1948
-  width: 12px;
1949
-  height: 11px;
1950
-  margin: 0 0 -0.2px 0;
1951
-  background-image: url('../img/description_added.svg');
1952
-  background-repeat: no-repeat;
1953
-  background-position: center center;
1954
-  cursor: pointer;
1955
-}
1956
-
1957
-.convTag {
1958
-  display: inline-block;
1959
-  position: relative;
1960
-  width: 12px;
1961
-  height: 12px;
1962
-  margin: 0 0 -0.3px 11px;
1963
-  background-image: url('../img/tag.svg');
1964
-  background-repeat: no-repeat;
1965
-  background-position: center center;
1966
-  cursor: pointer;
1967
-}
1968
-
1969
-.convTagAdded {
1970
-  display: inline-block;
1971
-  position: relative;
1972
-  width: 12px;
1973
-  height: 12px;
1974
-  margin: 0 0 -0.3px 11px;
1975
-  background-image: url('../img/tag_added.svg');
1976
-  background-repeat: no-repeat;
1977
-  background-position: center center;
1978
-  cursor: pointer;
1979
-}
1980
-
1981
-.archactTag {
1982
-  display: inline-block;
1983
-  position: relative;
1984
-  width: 76%;
1985
-  height: 20px;
1986
-  margin: 0 0 -2px 7px;
1987
-  font-weight: 500;
1988
-  font-size: 14px;
1989
-  color: #39608a;
1990
-  overflow: hidden;
1991
-  text-overflow: ellipsis;
1992
-  white-space: nowrap;
1993
-  word-break: break-word;
1994
-  cursor: pointer;
1995
-}
1996
-
1997
-.cvFlagEmpty {
1998
-  display: inline-block;
1999
-  position: absolute;
2000
-  width: 15px;
2001
-  height: 15px;
2002
-  right: 8px;
2003
-  bottom: 8px;
2004
-  background-image: url('../img/flag_empty.svg');
2005
-  background-repeat: no-repeat;
2006
-  background-position: center center;
2007
-  cursor: pointer;
2008
-}
2009
-
2010
-.cvFlagRed {
2011
-  display: inline-block;
2012
-  position: absolute;
2013
-  width: 15px;
2014
-  height: 15px;
2015
-  right: 8px;
2016
-  bottom: 8px;
2017
-  background-image: url('../img/flag_red.svg');
2018
-  background-repeat: no-repeat;
2019
-  background-position: center center;
2020
-  cursor: pointer;
2021
-}
2022
-
2023
-#convDescWindow, #convTagWindow, #convFlagWindow {
2024
-  display: block;
2025
-  position: absolute;
2026
-  width: 338px;
2027
-  height: auto;
2028
-  white-space: pre-wrap;
2029
-  border-radius: 6px;
2030
-  background-color: #ffffff;
2031
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2032
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2033
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2034
-  z-index: 5100;
2035
-}
2036
-
2037
-#closeDescWindow, #closeTagWindow, #closeFlagWindow {
2038
-  display: block;
2039
-  position: absolute;
2040
-  width: 12px;
2041
-  height: 12px;
2042
-  right: 8px;
2043
-  top: 8px;
2044
-  padding: 0;
2045
-  background-image: url('../img/closewnd.svg');
2046
-  background-repeat: no-repeat;
2047
-  background-position: center center;
2048
-  cursor: pointer;
2049
-}
2050
-
2051
-#dragDescWindow, #dragTagWindow, #dragFlagWindow {
2052
-  display: block;
2053
-  position: relative;
2054
-  width: 40px;
2055
-  height: 20px;
2056
-  margin: -3px auto 0px auto;
2057
-  cursor: grab;
2058
-  text-align: center;
2059
-}
2060
-
2061
-#convTitle {
2062
-  display: block;
2063
-  margin: 1px 29px 4px 29px;
2064
-  width: 84%;
2065
-  text-align: center;
2066
-  color: #353535;
2067
-  font-family: Inter;
2068
-  font-size: 15px;
2069
-  font-weight: 400;
2070
-}
2071
-
2072
-#convBetween {
2073
-  display: block;
2074
-  margin: 1px 23px 0 23px;
2075
-  text-align: center;
2076
-  color: #353535;
2077
-  font-family: Inter;
2078
-  font-size: 15px;
2079
-  font-weight: 400;
2080
-}
2081
-
2082
-#descriptionText {
2083
-  display: block;
2084
-  width: 84%;
2085
-  height: 170px;
2086
-  margin: 6px auto 0 auto;
2087
-  padding: 3px 5px;
2088
-  color: #363636;
2089
-  text-align: left;
2090
-  font-family: 'Inter';
2091
-  font-size: 15px;
2092
-  font-weight: 500;
2093
-  border-radius: 6px;
2094
-  resize: none;
2095
-  white-space: pre-wrap;
2096
-  border: 1px solid #dedede;
2097
-  background-color: #f1f1f1;
2098
-  overflow-y: auto;
2099
-}
2100
-
2101
-#saveConvDesc, #saveConvTag, #setConvFlag {
2102
-  display: block;
2103
-  border-radius: 20px !important;
2104
-  padding: 0px 14px !important;
2105
-  margin: 10px auto !important;
2106
-  min-height: 30px !important;
2107
-  height: 30px !important;
2108
-  color: #ffffff !important;
2109
-  background-color: #40c1a3 !important;
2110
-}
2111
-
2112
-#tagText {
2113
-  display: block;
2114
-  width: 84%;
2115
-  height: 40px;
2116
-  margin: 6px auto 0 auto;
2117
-  padding: 3px 5px;
2118
-  color: #363636;
2119
-  text-align: left;
2120
-  font-family: 'Inter';
2121
-  font-size: 15px;
2122
-  font-weight: 500;
2123
-  border-radius: 6px;
2124
-  white-space: pre-wrap;
2125
-  border: 1px solid #dedede;
2126
-  background-color: #f1f1f1;
2127
-  overflow-x: auto;
2128
-}
2129
-
2130
-#sendMsgReplySec {
2131
-  display: none;
2132
-  position: sticky;
2133
-  height: 148px;
2134
-  bottom: 17px;
2135
-  background-color: #ffffff;
2136
-}
2137
-
2138
-#expToSendReply {
2139
-  display: block;
2140
-  position: sticky;
2141
-  width: 100%;
2142
-  bottom: 0;
2143
-  height: 17px;
2144
-  background-color: #e3f4fa;
2145
-  border-radius: 4px;
2146
-  cursor: pointer;
2147
-}
2148
-
2149
-#expandWindowRplSec {
2150
-  display: block;
2151
-  margin: 0 auto 0 auto;
2152
-  cursor: pointer;
2153
-}
2154
-
2155
-#fromPhnNmbrCv {
2156
-  display: inline-block;
2157
-  width: 50%;
2158
-  height: auto;
2159
-  margin: 6px 0px 2px 8px;
2160
-  font-size: 14.5px;
2161
-  font-weight: 500;
2162
-  color: #222222;
2163
-  white-space: wrap;
2164
-}
2165
-
2166
-#selectToNbConv {
2167
-  height: 26px;
2168
-  width: auto;
2169
-  margin: 0;
2170
-  text-align: left;
2171
-  color: #222222;
2172
-  background-color: #ffffff !important;
2173
-  border: 1px solid #d8d8d8;
2174
-}
2175
-
2176
-#toPhnNmbrCv {
2177
-  display: inline-block;
2178
-  width: 50%;
2179
-  height: auto;
2180
-  margin: 6px 0px 2px -20px;
2181
-  font-size: 14.5px;
2182
-  font-weight: 500;
2183
-  color: #222222;
2184
-  text-align: right;
2185
-  white-space: wrap;
2186
-}
2187
-
2188
-#sendMsgConvSec {
2189
-  display: block;
2190
-  height: auto;
2191
-  margin: 0 auto;
2192
-  border: none;
2193
-}
2194
-
2195
-#sendMsgConvSec td {
2196
-  background-color: #ffffff;
2197
-  border: none;
2198
-}
2199
-
2200
-#sendMsgConvTextSec {
2201
-  display: inline-block;
2202
-  height: 72px;
2203
-  padding: 3px 5px;
2204
-  color: #000000;
2205
-  text-align: left;
2206
-  font-family: 'Inter';
2207
-  font-size: 15px;
2208
-  border-radius: 6px;
2209
-  resize: none;
2210
-  white-space: pre-wrap;
2211
-  border: 1px solid #dedede;
2212
-  background-color: #ffffff;
2213
-  overflow-y: auto;
2214
-}
2215
-
2216
-#sendMsgBtnConv {
2217
-  display: flex;
2218
-  position: relative;
2219
-  width: 200px;
2220
-  height: 20px;
2221
-  padding: 0;
2222
-  margin: 0 auto;
2223
-  bottom: 1.8px;
2224
-  color: #ffffff;
2225
-  background-color: #40c1a3;
2226
-  border: 1px solid #40c1a3;
2227
-  border-radius: 20px;
2228
-  text-align: center;
2229
-  font-weight: 500;
2230
-  cursor: pointer;
2231
-  line-height: normal;
2232
-  justify-content: center;
2233
-}
2234
-
2235
-#grpdbynamelstcv {
2236
-  display: none;
2237
-  position: absolute;
2238
-  top: 31px;
2239
-  right: 16px;
2240
-  width: 200px;
2241
-  height: auto;
2242
-  padding: 17px 19px 17px 20px;
2243
-  font-size: 15px;
2244
-  font-weight: 500;
2245
-  color: #0a559e;
2246
-  cursor: pointer;
2247
-  border-radius: 6px;
2248
-  white-space: normal;
2249
-  background-color: #ffffff;
2250
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2251
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2252
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2253
-  z-index: 999999;
2254
-}
2255
-
2256
-#closeConvPart {
2257
-  display: inline-block;
2258
-  position: absolute;
2259
-  width: 10px;
2260
-  height: 10px;
2261
-  top: -7px;
2262
-  right: -7px;
2263
-  background-image: url('../img/closeconvpart.svg');
2264
-  background-repeat: no-repeat;
2265
-  background-position: center center;
2266
-  cursor: pointer;
2267
-}
2268
-
2269
-#betweenNmbrs, #btwnNbCvTitle {
2270
-  display: inline-block;
2271
-  position: relative;
2272
-  width: 20px;
2273
-  height: 8px;
2274
-  margin: 0 6px 1px 6px;
2275
-  background-image: url('../img/between.svg');
2276
-  background-repeat: no-repeat;
2277
-  background-position: center center;
2278
-}
2279
-
2280
-#convImgGrey {
2281
-  position: absolute;
2282
-  display: block;
2283
-}
2284
-
2285
-#groupedSmsTable {
2286
-  display: block;
2287
-  position: relative;
2288
-  top: 0px;
2289
-  width: 100%;
2290
-  height: auto;
2291
-  font-size: 14px;
2292
-  z-index: 50;
2293
-  background: #FFFFFF;
2294
-}
2295
-
2296
-#groupedSmsTable td {
2297
-  text-align: left;
2298
-  vertical-align: top;
2299
-  border: 1px solid #f3f3f3;
2300
-  padding: 5px;
2301
-}
2302
-
2303
-.groupedrowsbody {
2304
-  border: 1px solid #f3f3f3;
2305
-  padding: 8px;
2306
-}
2307
-
2308
-.groupedLstNmbr {
2309
-  overflow: scroll;
2310
-  white-space: nowrap;
2311
-}
2312
-
2313
-.groupedLstNames {
2314
-  overflow: scroll;
2315
-  white-space: nowrap;
2316
-}
2317
-
2318
-.groupedLstMsgs {
2319
-  overflow: scroll;
2320
-  white-space: nowrap;
2321
-  min-width: 250px;
2322
-}
2323
-
2324
-.groupedSentMsg {
2325
-  display: block;
2326
-  width: 95%;
2327
-  float: right;
2328
-  margin: 6px 6px 6px 0px;
2329
-  padding: 8px 10px;
2330
-  border: none;
2331
-  border-radius: 10px;
2332
-  background-color: #f2fbff;
2333
-  font-size: 14px;
2334
-  white-space: normal;
2335
-  word-break: break-word;
2336
-}
2337
-
2338
-.groupedRecMsg {
2339
-  display: block; 
2340
-  width: 95%;
2341
-  float: left;
2342
-  margin: 6px 0px;
2343
-  padding: 8px 10px;
2344
-  border: none;
2345
-  border-radius: 10px;
2346
-  background-color: #f2fff8;
2347
-  font-size: 14px;
2348
-  white-space: normal;
2349
-  word-break: break-word;
2350
-}
2351
-
2352
-.fixedRowHeight {
2353
-  max-height: 300px;
2354
-}
2355
-
2356
-.expandGrpRow {
2357
-  display: block;
2358
-  margin:-3px auto 7px auto;
2359
-  cursor: pointer;
2360
-}
2361
-
2362
-.dispNameList {
2363
-  display: block;
2364
-  margin: 2px 0px;
2365
-  font-size: 14.5px;
2366
-  font-weight: 500;
2367
-  color: #0a559e;
2368
-  cursor: pointer;
2369
-}
2370
-
2371
-.dispNameList:hover {
2372
-  color: #1483f0;
2373
-}
2374
-
2375
-.phoneNmbrRow {
2376
-  font-size: 14.5px;
2377
-  font-weight: 500;
2378
-  color: #06866f;
2379
-  cursor: pointer;
2380
-}
2381
-
2382
-.phoneNmbrRow:hover {
2383
-  color: #08b899;
2384
-}
2385
-
2386
-#selectListedNmbrs {
2387
-  display: block;
2388
-  width: 100%;
2389
-  font-family: 'Inter';
2390
-}
2391
-
2392
-.sentMssgStatus {
2393
-  display: inline-block;
2394
-  margin: 0px 6px 0px 6.5px;
2395
-}
2396
-
2397
-.saveRestrictions, .saveAutoReply {
2398
-  display: inline-block;
2399
-  border-radius: 8px !important;
2400
-  padding: 0px 14px !important;
2401
-  margin: 0px 0px 0px 10px !important;
2402
-  color: #ffffff !important;
2403
-  background-color: #59d0b4 !important;
2404
-}
2405
-
2406
-.savealwdKeys {
2407
-  display: inline-block;
2408
-  border-radius: 8px !important;
2409
-  padding: 0px 14px !important;
2410
-  margin: 0 !important;
2411
-  color: #ffffff !important;
2412
-  background-color: #59d0b4 !important;
2413
-}
2414
-
2415
-.saveRestrictions:hover, .saveAutoReply:hover, .savealwdKeys:hover {
2416
-  background-color: #40c1a3 !important;
2417
-}
2418
-
2419
-.saveRestrictions:active, .saveAutoReply:active, .savealwdKeys:active {
2420
-  background-color: #3aad92 !important;
2421
-}
2422
-
2423
-#save_admin_settings {
2424
-  display: inline-block;
2425
-  border-radius: 8px !important;
2426
-  padding: 0px 14px !important;
2427
-  color: #ffffff !important;
2428
-  background-color: #1e89c2 !important;
2429
-}
2430
-
2431
-#save_admin_settings:hover {
2432
-  background-color: #0369a0  !important;
2433
-}
2434
-
2435
-#save_admin_settings:active {
2436
-  background-color: #025480  !important;
2437
-}
2438
-
2439
-#phoneNmbrRestr th {
2440
-  font-weight: 500;
2441
-}
2442
-
2443
-#tnxKeysAccessTbl th, #plvKeysAccessTbl th, #twlKeysAccessTbl th, #flrKeysAccessTbl th {
2444
-  font-weight: 500;
2445
-  color: #222222;
2446
-}
2447
-
2448
-.restrAuthor {
2449
-  width: 200px;
2450
-  height: 40px !important;
2451
-}
2452
-
2453
-.restrPhoneNmbr, .arplPhoneNmbr {
2454
-  width: 194px;
2455
-  height: 40px !important;
2456
-}
2457
-
2458
-.restrGroups, .restrUsers {
2459
-  width: 330px;
2460
-  height: 40px !important;
2461
-  border: 1px solid #000;
2462
-  border-radius: 6px;
2463
-  margin: 0px 1px 0px 0px;
2464
-  padding: 0px 4px;
2465
-  overflow: hidden;
2466
-}
2467
-
2468
-.restrGroups:hover, .restrUsers:hover {
2469
-  overflow: auto !important;
2470
-}
2471
-
2472
-.alwdKeysGroups, .alwdKeysUsers {
2473
-  width: 398px;
2474
-  min-height: 80px !important;
2475
-  background-color: #ffffff !important;
2476
-  border: 1px solid #000;
2477
-  border-radius: 6px;
2478
-  margin: 0px 1px 0px 0px;
2479
-  padding: 0px 4px;
2480
-  overflow-y: scroll;
2481
-  white-space: pre-wrap;
2482
-}
2483
-
2484
-.alwdKeysGroups:hover, .alwdKeysUsers:hover {
2485
-  overflow: auto !important;
2486
-}
2487
-
2488
-#addRestrRow, #addArplRow {
2489
-  display: block;
2490
-  margin: 10px 0px 0px 6px;
2491
-  width: 16px;
2492
-  height: 16px;
2493
-  cursor: pointer;
2494
-  border-radius: 2px;
2495
-}
2496
-
2497
-#autoReplyTbl td {
2498
-  text-align: left;
2499
-  vertical-align: top;
2500
-  padding: 0px 0px 10px 0px;
2501
-}
2502
-
2503
-#autoReplyTbl th {
2504
-  font-weight: 500;
2505
-}
2506
-
2507
-.arplAuthor {
2508
-  width: 200px;
2509
-  height: 38px !important;
2510
-}
2511
-
2512
-.arplMode {
2513
-  display: inline-block;
2514
-  width: 330px;
2515
-  height: 184px;
2516
-  border: 1px solid #000;
2517
-  border-radius: 6px;
2518
-  margin: 0px 4px 0px 0px;
2519
-  overflow: visible;
2520
-}
2521
-
2522
-.modeContent .date-picker-x {
2523
-  top: -170px !important;
2524
-  left: -170px !important;
2525
-}
2526
-
2527
-.arplText {
2528
-  display: inline-block;
2529
-  color: #000000;
2530
-  width: 330px;
2531
-  height: 184px;
2532
-  font-size: 15px;
2533
-  text-align: left;
2534
-  border: 1px solid #000;
2535
-  border-radius: 6px;
2536
-  margin: 0px 1px 0px 0px;
2537
-  resize: vertical;
2538
-  white-space: pre-wrap;
2539
-  overflow: auto;
2540
-}
2541
-
2542
-.selectArplMode {
2543
-  display: block;
2544
-  width: 322px;
2545
-  margin: 4px 0px 0px 4px;
2546
-  cursor: pointer;
2547
-  font-weight: 500;
2548
-}
2549
-
2550
-.daysOfWeek {
2551
-  display: block;
2552
-  width: 100%;
2553
-  height: 26px;
2554
-  margin: 3px auto;
2555
-  font-weight: 500;
2556
-  text-align: center;
2557
-}
2558
-
2559
-.daysInWeek {
2560
-  display: block;
2561
-  position: relative;
2562
-  width: 322px;
2563
-  height: auto;
2564
-  margin: 0px 0px 0px 4px !important;
2565
-  text-align: center;
2566
-  border: 1px solid #000;
2567
-  border-radius: 6px;
2568
-}
2569
-
2570
-.chooseTInterval {
2571
-  display: block;
2572
-  width: 100%;
2573
-  height: 26px;
2574
-  margin: 5px auto 0px auto;
2575
-  font-weight: 500;
2576
-  text-align: center;
2577
-}
2578
-
2579
-.selectArplHours {
2580
-  display: block;
2581
-  width: 100%;
2582
-  text-align: center;
2583
-}
2584
-
2585
-.tooltipautoreply {
2586
-  display: inline-block;
2587
-  position: absolute;
2588
-  font-size: 15px;
2589
-  z-index: 9;
2590
-}
2591
-
2592
-.tooltipautoreplyst, .tooltipautoreplypn, .tooltiprestrict {
2593
-  display: inline-block;
2594
-  position: absolute;
2595
-  font-size: 15px;
2596
-  z-index: 7;
2597
-}
2598
-
2599
-#infoautoreply, #infoautoreplyst, #infoautoreplypn, #inforestrict {
2600
-  display: inline-block;
2601
-  position: relative;
2602
-  margin: -2px 0px 0px 10px;
2603
-  color: #000000;
2604
-  font-size: 18px;
2605
-  font-weight: bold;
2606
-  font-family: 'Open Sans';
2607
-  font-style: italic;
2608
-  cursor: pointer;
2609
-}
2610
-
2611
-.autorpltooltip, .autorpltooltipst, .autorpltooltippn, .restricttooltext {
2612
-  display: block;
2613
-  position: absolute;
2614
-  visibility: hidden;
2615
-  width: 330px;
2616
-  height: auto;
2617
-  background-color: #fafafa;
2618
-  font-size: 15px;
2619
-  font-weight: 600;
2620
-  white-space: normal;
2621
-  color: #595959;
2622
-  text-align: left;
2623
-  border-radius: 5px;
2624
-  padding: 5px 5px 5px 8px;
2625
-  margin: -4px 0px 0px -150px;
2626
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2627
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2628
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2629
-}
2630
-
2631
-.tooltipautoreply:hover .autorpltooltip, .tooltipautoreplyst:hover .autorpltooltipst, .tooltipautoreplypn:hover .autorpltooltippn, .tooltiprestrict:hover .restricttooltext  {
2632
-   visibility: visible;
2633
-}
2634
-
2635
-.selectHrMin {
2636
-  font-weight: 500 !important;
2637
-  color: #01446d !important;
2638
-}
2639
-
2640
-.chooseDateIntvl {
2641
-  display: block;
2642
-  width: 100%;
2643
-  height: 32px;
2644
-  margin: 19px auto 4px auto;
2645
-  font-weight: 500;
2646
-  text-align: center;
2647
-}
2648
-
2649
-.arplstrtendDates {
2650
-  display: block;
2651
-  position: absolute;
2652
-  width: 330px;
2653
-  height: auto;
2654
-}
2655
-
2656
-.stdtTitle {
2657
-  display: inline-block;
2658
-  position: absolute;
2659
-  width: 140px;
2660
-  height: 38px;
2661
-  left: 10px;
2662
-  top: 2px;
2663
-  font-weight: 500;
2664
-  text-align: center;
2665
-}
2666
-
2667
-.enddtTitle {
2668
-  display: inline-block;
2669
-  position: absolute;
2670
-  width: 140px;
2671
-  height: 38px;
2672
-  right: 10px;
2673
-  top: 2px;
2674
-  font-weight: 500;
2675
-  text-align: center;
2676
-}
2677
-
2678
-.startDate {
2679
-  display: inline-block;
2680
-  position: absolute;
2681
-  width: 140px;
2682
-  height: 38px;
2683
-  left: 10px;
2684
-  top: 26px;
2685
-  border: 1px solid #3b3b3b;
2686
-  border-radius: 6px;
2687
-  text-align: center;
2688
-  font-weight: 500;
2689
-  color: #01446d !important;
2690
-}
2691
-
2692
-.endDate {
2693
-  display: inline-block;
2694
-  position: absolute;
2695
-  width: 140px;
2696
-  height: 38px;
2697
-  right: 10px;
2698
-  top: 26px;
2699
-  border: 1px solid #3b3b3b;
2700
-  border-radius: 6px;
2701
-  text-align: center;
2702
-  font-weight: 500;
2703
-  color: #01446d !important;
2704
-}
2705
-
2706
-#adminOverlay {
2707
-  display: block;
2708
-  position: absolute;
2709
-  top: 0;
2710
-  left: 0;
2711
-  opacity: 0;
2712
-  z-index: 4990;
2713
-}
2714
-
2715
-.grpsList, .usrsList {
2716
-  display: block;
2717
-  position: absolute;
2718
-  width: 300px;
2719
-  max-height: 400px;
2720
-  z-index: 5000;
2721
-  overflow: auto;
2722
-  background-color: #ffffff;
2723
-}
2724
-
2725
-.groupsList, .usersList {
2726
-  display: block;
2727
-  position: relative;
2728
-  float: left;
2729
-  padding: 6px 4px;
2730
-  width: 300px;
2731
-  height: auto;
2732
-  color: #353535;
2733
-  border-radius: 6px;
2734
-  border: 1px solid #dadada;
2735
-  cursor: pointer;
2736
-}
2737
-
2738
-.groupsList:hover, .usersList:hover {
2739
-  background-color: #f1f1f1;
2740
-}
2741
-
2742
-.selectedGrps, .selectedUsrs {
2743
-  display: inline-block;
2744
-  position: relative;
2745
-  margin: 6px 1px 0px 1px;
2746
-  padding: 0px 6px;
2747
-  color: #353535;
2748
-  background-color: #ffffff;
2749
-  border: 1px solid #dadada;
2750
-  border-radius: 6px;
2751
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2752
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2753
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2754
-}
2755
-
2756
-.removeGroup, .removeUser {
2757
-  margin: 0px 0px 0px 6px;
2758
-  width: 9px;
2759
-  height: 9px;
2760
-  cursor: pointer;
2761
-}
2762
-
2763
-.showAllGroups, .showAllUsers {
2764
-  max-width: 40px !important;
2765
-  margin: 3px 10px 0px 6px;
2766
-  background-color: #ffffff;
2767
-  border-radius: 6px;
2768
-  padding: 4px 4px 0px 4px;
2769
-  z-index: 5000;
2770
-}
2771
-
2772
-.showAllGroupsak {
2773
-  max-width: 40px !important;
2774
-  margin: 3px 12px 0px 6px;
2775
-  background-color: #F7F7F7;
2776
-  border-radius: 6px;
2777
-  padding: 4px 4px 0px 4px;
2778
-}
2779
-
2780
-.showAllUsersak {
2781
-  max-width: 40px !important;
2782
-  margin: 3px 10px 0px 6px;
2783
-  background-color: #F7F7F7;
2784
-  border-radius: 6px;
2785
-  padding: 4px 4px 0px 4px;
2786
-}
2787
-
2788
-.showByNmbrTitle {
2789
-  display: block;
2790
-  width: 100%;
2791
-  color: #353535;
2792
-  text-align: center;
2793
-  font-size: 16px; 
2794
-  font-weight: 500;
2795
-  margin: 0px auto 5px auto;
2796
-}
2797
-
2798
-#refreshMsgsWrap, #refreshMsgsWraptf {
2799
-  display: block;
2800
-  position: sticky;
2801
-  width: 21px;
2802
-  height: 21px;
2803
-  bottom: 12px;
2804
-  left: 0;
2805
-}
2806
-
2807
-#refreshMsgsConv, #refreshMsgsConvtf {
2808
-  display: inline-block;
2809
-  position: relative;
2810
-  background-image: url("../img/refresh.svg");
2811
-  background-repeat: no-repeat;
2812
-  background-color: transparent !important;
2813
-  width: 21px;
2814
-  height: 21px;
2815
-  opacity: 0.30;
2816
-  border: none;
2817
-  cursor: pointer;
2818
-  z-index: 5300;
2819
-}
2820
-
2821
-#refreshMsgsConv:hover, #refreshMsgsConvtf:hover {
2822
-  opacity: 1;
2823
-}
2824
-
2825
-#stopAutoRefreshSent {
2826
-  display: none;
2827
-  position: fixed;
2828
-  left: 340px;
2829
-  top: 50.7px;
2830
-  z-index: 5000;
2831
-}
2832
-
2833
-#stopAutoRefreshSentBtn {
2834
-  display: inline-block;
2835
-  position: relative;
2836
-  width: auto;
2837
-  height: auto;
2838
-  vertical-align: top;
2839
-  border: 1px solid #c6cedb;
2840
-  border-radius: 20px;
2841
-  color: #0a559e;
2842
-  font-family: 'Open Sans' !important;
2843
-  font-size: 12px;
2844
-  font-weight: 400;
2845
-  padding: 0px 9px;
2846
-  text-align: center;
2847
-  cursor: pointer;
2848
-}
2849
-
2850
-#stopAutoRefreshSentBtn:hover {
2851
-  border: 1px solid #79a2be;
2852
-  box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
2853
-  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
2854
-  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
2855
-}
2856
-
2857
-.mmstblUrls {
2858
-  color: #09579b;
2859
-  cursor: pointer;
2860
-}
2861
-
2862
-.mmstblUrls:hover {
2863
-  color: #1479d3;
2864
-}
2865
-
2866
-.marksent {
2867
-  background-color: #F2FBFF !important;
2868
-}
2869
-
2870
-.markreceived {
2871
-  background-color: #F2FFF5 !important;
2872
-}
2873
-
2874
-#sentfiltersrow, #recfiltersrow, #grpfiltersrow {
2875
-  display: none;
2876
-  position: sticky;
2877
-  top: 27px;
2878
-  background: #FFFFFF;
2879
-  box-shadow: 0 6px 7px rgba(0, 0, 0, 0.1);
2880
-  z-index: 1000;
2881
-}
2882
-
2883
-#sentSmsTable th, #recSmsTable th, #groupedSmsTable th {
2884
-  position: sticky;
2885
-  top: 27px;
2886
-  z-index: 999;
2887
-  border: 1px solid #f3f3f3;
2888
-  padding: 7px;
2889
-  background-color: #bfe5f2;
2890
-  font-size: 15px;
2891
-  font-weight: bold;
2892
-  text-align: center;
2893
-}
2894
-
2895
-#sentSmsTable td, #recSmsTable td {
2896
-  border: 1px solid #f3f3f3;
2897
-  padding: 5px;
2898
-  white-space: normal;
2899
-}
2900
-
2901
-.datecolsent {
2902
-  text-align: center;
2903
-}
2904
-
2905
-.sentdbidcolumn {
2906
-  text-align: center;
2907
-}
2908
-
2909
-.dbidcolumnrec {
2910
-  width: 50px;
2911
-  text-align: center;
2912
-}
2913
-
2914
-.messagecolumnsent {
2915
-  background: #fffff2;
2916
-  text-align: left;
2917
-  font-weight: 500;
2918
-  width: 260px;
2919
-  word-break: break-word;
2920
-}
2921
-
2922
-.messagecolumnrec {
2923
-  background: #fffff2;
2924
-  text-align: left;
2925
-  font-weight: 500;
2926
-  width: 526px;
2927
-  word-break: break-word;
2928
-}
2929
-
2930
-.messageAuthorName {
2931
-  border: none;
2932
-  border-radius: 20px;
2933
-  padding: 4px 10px;
2934
-  margin: 0px 4px 0px 0px;
2935
-  color: #414141;
2936
-  background-color: #eff9ff;
2937
-}
2938
-
2939
-.msgAuthorNameGrp {
2940
-  border: none;
2941
-  border-radius: 20px;
2942
-  padding: 3px 8px;
2943
-  margin: 0px 4px 0px 0px;
2944
-  color: #616161;
2945
-  background-color: #e8edff !important;
2946
-}
2947
-
2948
-.addNameToPhNb {
2949
-  cursor: pointer;
2950
-  border-radius: 20px;
2951
-}
2952
-
2953
-.listToFromMsgs {
2954
-  display: block;
2955
-  margin: 0 auto;
2956
-  width: 30px;
2957
-  text-align: center;
2958
-  cursor: pointer;
2959
-}
2960
-
2961
-.lstMsgConv {
2962
-  display: block;
2963
-  position: relative;
2964
-  width: 30px;
2965
-  height: auto;
2966
-  text-align: center;
2967
-  margin: 4px auto 0 auto;
2968
-}
2969
-
2970
-.lstMsgConvImg {
2971
-  cursor: pointer;
2972
-  height: auto;
2973
-}
2974
-
2975
-.lstMsgToFromImg {
2976
-  cursor: pointer;
2977
-  height: auto;
2978
-}
2979
-
2980
-.lstMsgToFromImg:hover, .lstMsgConvImg:hover {
2981
-   box-shadow: 0 0 7px rgba(0, 0, 0, 0.25);
2982
-   -webkit-box-shadow: 0 0 7px rgba(0, 0, 0, 0.25);
2983
-   -moz-box-shadow: 0 0 7px rgba(0, 0, 0, 0.25);
2984
-}
2985
-
2986
-.lstMsgToFromImg:active, .lstMsgConvImg:hover {
2987
-   box-shadow: 0 0 9px rgba(0, 0, 0, 0.25);
2988
-   -webkit-box-shadow: 0 0 9px rgba(0, 0, 0, 0.25);
2989
-   -moz-box-shadow: 0 0 9px rgba(0, 0, 0, 0.25);
2990
-}
2991
-
2992
-#loadMoreMsgs, #loadMoreMsgsusr {
2993
-  display: none;
2994
-  width: 180px;
2995
-  height: auto;
2996
-  margin: 1px auto 2px auto;
2997
-  padding: 0px 0px 2px 0px;
2998
-  border: 1px solid #b8d4e6;
2999
-  border-radius: 20px;
3000
-  color: #6c91b2;
3001
-  line-height: normal;
3002
-  text-align: center;
3003
-  font-size: 14.5px;
3004
-  font-weight: 500;
3005
-  cursor: pointer;
3006
-}
3007
-
3008
-#loadMoreMsgs:hover, #loadMoreMsgsusr:hover {
3009
-  color: #3a6c9a;
3010
-  border: 1px solid #95bad3;
3011
-}
3012
-
3013
-#loadMoreMsgs:active, #loadMoreMsgsusr:active {
3014
-  box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3015
-  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3016
-  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3017
-  border: 1px solid #79a2be;
3018
-}
3019
-
3020
-.addNameToPhNb:hover {
3021
-  box-shadow: 0 0 8px rgba(0, 0, 0, 0.23);
3022
-  -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.23);
3023
-  -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.23);
3024
-}
3025
-
3026
-.addNameToPhNb:active {
3027
-  box-shadow: 0 0 12px rgba(0, 0, 0, 0.33);
3028
-  -webkit-box-shadow: 0 0 12px rgba(0, 0, 0, 0.33);
3029
-  -moz-box-shadow: 0 0 12px rgba(0, 0, 0, 0.33);
3030
-}
3031
-
3032
-#recTblOverlay, #alertMsgOverlay {
3033
-  display: block;
3034
-  position: absolute;
3035
-  top: 0;
3036
-  left: 0;
3037
-  width: 100%;
3038
-  height: 100%;
3039
-  background-color: #000000;
3040
-  opacity: 0.09;
3041
-  z-index: 5050;
3042
-}
3043
-
3044
-#disNameWindow, #alertMessage, #alertConfMessage {
3045
-  display: block;
3046
-  position: absolute;
3047
-  width: 338px;
3048
-  height: auto;
3049
-  white-space: pre-wrap;
3050
-  border-radius: 6px;
3051
-  background-color: #ffffff;
3052
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3053
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3054
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3055
-  z-index: 5100;
3056
-}
3057
-
3058
-#alertTextWrap {
3059
-  display: block;
3060
-  text-align: left;
3061
-  font-family: 'Inter';
3062
-  font-size: 15px;
3063
-  margin: 30px 22px 16px 22px;
3064
-  color: #353535;
3065
-  white-space: pre-wrap;
3066
-  word-break: break-word;
3067
-}
3068
-
3069
-#closeDisNmWindow {
3070
-  display: block;
3071
-  position: absolute;
3072
-  width: 12px;
3073
-  height: 12px;
3074
-  right: 8px;
3075
-  top: 10px;
3076
-  padding: 0;
3077
-  background-image: url('../img/closewnd.svg');
3078
-  background-repeat: no-repeat;
3079
-  background-position: center center;
3080
-  cursor: pointer;
3081
-}
3082
-
3083
-#closeFrmMsgWindow, #closeAlertWnd, #closeAlertWndcf {
3084
-  display: block;
3085
-  position: absolute;
3086
-  width: 12px;
3087
-  height: 12px;
3088
-  right: 8px;
3089
-  top: 10px;
3090
-  padding: 0;
3091
-  background-image: url('../img/closewnd.svg');
3092
-  background-repeat: no-repeat;
3093
-  background-position: center center;
3094
-  cursor: pointer;
3095
-}
3096
-
3097
-#sendMsgConvBtn {
3098
-  display: flex;
3099
-  width: 200px;
3100
-  height: 20px;
3101
-  padding: 0;
3102
-  margin: -2px auto 0 auto;
3103
-  color: #ffffff;
3104
-  background: #40c1a3;
3105
-  border: 1px solid #40c1a3;
3106
-  border-radius: 20px;
3107
-  text-align: center;
3108
-  font-weight: 500;
3109
-  cursor: pointer;
3110
-  line-height: normal;
3111
-  justify-content: center;
3112
-  align-items: center;
3113
-}
3114
-
3115
-#sendMsgConvBtn:hover {
3116
-  background-color:  #3bb397 !important;
3117
-  box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3118
-  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3119
-  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3120
-}
3121
-
3122
-#sendMsgConvBtn:active {
3123
-  background-color: #33a087 !important;
3124
-  box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3125
-  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3126
-  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
3127
-}
3128
-
3129
-#saveDispName, #alertOk {
3130
-  display: block;
3131
-  border-radius: 20px !important;
3132
-  padding: 0px 14px !important;
3133
-  margin: 10px auto !important;
3134
-  min-height: 30px !important;
3135
-  height: 30px !important;
3136
-  color: #ffffff !important;
3137
-  background-color: #40c1a3 !important;
3138
-}
3139
-
3140
-#cancelOkWrap {
3141
-  display: block;
3142
-  width: 100%; 
3143
-  margin: 10px auto !important;
3144
-  text-align: center;
3145
-}
3146
-
3147
-#confirmOk, #confirmCancel {
3148
-  display: inline-block;
3149
-  min-width: 76px;
3150
-  border-radius: 20px !important;
3151
-  padding: 0px 14px !important;
3152
-  margin: 0 5px;
3153
-  min-height: 30px !important;
3154
-  height: 30px !important;
3155
-  color: #ffffff !important;
3156
-  background-color: #40c1a3 !important;
3157
-}
3158
-
3159
-#saveDispName:hover, #alertOk:hover, #confirmOk:hover, #confirmCancel:hover {
3160
-  background-color:  #3bb397 !important;
3161
-}
3162
-
3163
-#saveDispName:active, #alertOk:active, #confirmOk:active, #confirmCancel:active {
3164
-  background-color: #33a087 !important;
3165
-}
3166
-
3167
-#sendMsgReply {
3168
-  display: none;
3169
-}
3170
-
3171
-#sendMsgConv {
3172
-  width: 92%;
3173
-  height: auto;
3174
-  margin: 0 auto;
3175
-  border: none;
3176
-}
3177
-
3178
-#sendMsgConv td {
3179
-  background-color: #ffffff;
3180
-  border: none;
3181
-}
3182
-
3183
-#sendMsgConvText {
3184
-  display: inline-block;
3185
-  width: 100%;
3186
-  height: 72px;
3187
-  padding: 3px 5px;
3188
-  color: #000000;
3189
-  text-align: left;
3190
-  font-family: 'Inter';
3191
-  font-size: 15px;
3192
-  border-radius: 6px;
3193
-  resize: none;
3194
-  white-space: pre-wrap;
3195
-  border: 1px solid #dedede;
3196
-  background-color: #ffffff;
3197
-  overflow-y: auto;
3198
-}
3199
-
3200
-#fromPhoneNmbrConv {
3201
-  display: inline-block;
3202
-  width: 50%;
3203
-  height: auto;
3204
-  margin: 6px 0px 2px 10px;
3205
-  font-size: 14.5px;
3206
-  font-weight: 500;
3207
-  color: #222222;
3208
-}
3209
-
3210
-#toPhoneNmbrConv {
3211
-  display: inline-block;
3212
-  width: 50%;
3213
-  height: auto;
3214
-  margin: 6px 0px 2px -20px;
3215
-  font-size: 14.5px;
3216
-  font-weight: 500;
3217
-  color: #222222;
3218
-  text-align: right;
3219
-}
3220
-
3221
-#selectFromNbConv {
3222
-  height: 26px;
3223
-  width: auto;
3224
-  margin: 0;
3225
-  text-align: left;
3226
-  color: #222222;
3227
-  background-color: #ffffff !important;
3228
-  border: 1px solid #d8d8d8;
3229
-}
3230
-
3231
-#listAllMsgsFromTo {
3232
-  display: block;
3233
-  position: absolute;
3234
-  width: 600px;
3235
-  height: 490px;
3236
-  font-family: 'Inter' !important;
3237
-  white-space: pre-wrap;
3238
-  border-radius: 6px;
3239
-  background-color: #ffffff;
3240
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3241
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3242
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3243
-  z-index: 5100;
3244
-}
3245
-
3246
-#listAllMsgsConv {
3247
-  display: block;
3248
-  position: absolute;
3249
-  width: 600px;
3250
-  height: 490px;
3251
-  font-family: 'Inter' !important;
3252
-  white-space: pre-wrap;
3253
-  border-radius: 6px;
3254
-  background-color: #ffffff;
3255
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3256
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3257
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
3258
-  z-index: 5100;
3259
-}
3260
-
3261
-#expandWindowRplCtn {
3262
-  display: block;
3263
-  width: 100%;
3264
-  height: 14px;
3265
-  margin: 4px auto 0 auto;
3266
-  text-align: center;
3267
-}
3268
-
3269
-#expandWindowRpl {
3270
-  cursor: pointer;
3271
-}
3272
-
3273
-#dragDispNmWindow {
3274
-  display: block;
3275
-  position: relative;
3276
-  width: 40px;
3277
-  height: 20px;
3278
-  margin:-3px auto 0px auto;
3279
-  cursor: grab;
3280
-  text-align: center;
3281
-  z-index: 99999;
3282
-}
3283
-
3284
-#draglstMsgmWindow {
3285
-  display: block;
3286
-  position: relative;
3287
-  width: 500px;
3288
-  width: 80%;
3289
-  height: 20px;
3290
-  margin:-3px auto 0px auto;
3291
-  cursor: grab;
3292
-  text-align: center;
3293
-}
3294
-
3295
-#draglstMsgmWindowsc {
3296
-  display: block;
3297
-  position: relative;
3298
-  width: 80%;
3299
-  height: 20px;
3300
-  margin: 8px auto 0 auto;
3301
-  cursor: grab;
3302
-  text-align: center;
3303
-}
3304
-
3305
-#frmMsgLstWrap {
3306
-  display: block;
3307
-  position: relative;
3308
-  width: 560px;
3309
-  height: 400px;
3310
-  margin: 0 auto;
3311
-  overflow-y: auto;
3312
-  overflow-x: hidden;
3313
-}
3314
-
3315
-#frmMsgLstTbl {
3316
-  position: relative;
3317
-  width: 100%;
3318
-  height: 100%;
3319
-}
3320
-
3321
-#frmMsgLstTbl td {
3322
-  text-align: left;
3323
-  vertical-align: top;
3324
-  background-color: #ffffff !important;
3325
-}
3326
-
3327
-.groupedLstNamespn {
3328
-  display: block;
3329
-  position: fixed;
3330
-  width: 130px;
3331
-  height: auto;
3332
-  padding: 0px 0px 0px 4px;
3333
-  overflow-y: auto;
3334
-  white-space: pre-wrap;
3335
-}
3336
-
3337
-#msgListRowCell {
3338
-  display: block;
3339
-  width: 428px;
3340
-  height: auto;
3341
-  min-height: 358px;
3342
-  margin: 0px 0px 0px 130px;
3343
-  padding: 0px 0px 0px 4px;
3344
-  overflow: scroll;
3345
-  white-space: nowrap;
3346
-}
3347
-
3348
-.dispNameListAll {
3349
-  display: block;
3350
-  width: 100%;
3351
-  height: auto;
3352
-  border: 1px solid #c6cedb;
3353
-  border-radius: 20px;
3354
-  margin: 6px 0px 0px 0px;
3355
-  color: #04957b;
3356
-  font-size: 13px;
3357
-  padding: 0px 9px;
3358
-  text-align: center;
3359
-  font-weight: 500;
3360
-  cursor: pointer;
3361
-}
3362
-
3363
-#selectAllChckbx:hover {
3364
-  cursor: pointer;
3365
-}
3366
-
3367
-.indivchckbx:hover {
3368
-  cursor: pointer;
3369
-}
3370
-
3371
-.selectsmsdv {
3372
-  width: 30px;
3373
-  padding: 5px 5px 5px 7px;
3374
-  text-align: center;
3375
-}
3376
-
3377
-#selectalldv {
3378
-  width: 30px;
3379
-  padding: 5px 5px 5px 7px;
3380
-}
3381
-
3382
-.indivfilter {
3383
-  height: 30px;
3384
-  font-weight: bold;
3385
-  padding: 0px;
3386
-}
3387
-
3388
-.selectalldvfilter {
3389
-  border: 1px solid #f3f3f3;
3390
-  padding: 3px;
3391
-  margin: 0px; 
3392
-}
3393
-
3394
-.filterbuttonsrec, .filterbuttonsent {
3395
-  display: block;
3396
-  position: relative;
3397
-  margin: 5px auto !important;
3398
-  border-radius: 3px !important;
3399
-  background-color: #ffffff !important;
3400
-  background-image: url('../img/filter_icon.svg');
3401
-  background-repeat: no-repeat;
3402
-  background-position: center center;
3403
-  cursor: pointer;
3404
-}
3405
-
3406
-#clearrecfilters, #clearsentfilters, #cleargrpfilter {
3407
-  display: inline-block;
3408
-  width: 22px;
3409
-  height: 22px;
3410
-  background-color: #ffffff;
3411
-  background-image: url('../img/clearfilters.svg');
3412
-  background-repeat: no-repeat;
3413
-  background-position: center center;
3414
-  margin: 0px 0px 8px 0px;
3415
-  border: none;
3416
-  cursor: pointer;
3417
-}
3418
-
3419
-#deleterecrows, #deletesentrows {
3420
-  display: inline-block;
3421
-  width: 16px;
3422
-  height: 20px;
3423
-  background-color: #ffffff;
3424
-  background-image: url('../img/garbage.svg');
3425
-  background-repeat: no-repeat;
3426
-  background-position: center center;
3427
-  margin: 0px 0px 4px 0px;
3428
-  border: none;
3429
-  cursor: pointer;
3430
-}
3431
-
3432
-#deleterecrows:active, #deletesentrows:active {
3433
-  background-image: url('../img/garbage_bright.svg');
3434
-}
3435
-
3436
-#toptablerec, #toptablesent, #toptablegrp {
3437
-  display: block;
3438
-  position: sticky;
3439
-  top: 0px;
3440
-  height: 27px;
3441
-  width: 100%;
3442
-  z-index: 1001;
3443
-}
3444
-
3445
-.topbuttonandpage {
3446
-  display: block;
3447
-  position: relative;
3448
-  width: 100%;
3449
-  height: 27px;
3450
-  border-radius: 0px 24px 0px 0px;
3451
-  background: #FFFFFF;
3452
-  z-index: 1001;
3453
-}
3454
-
3455
-#paginationrec, #paginationsent, #paginationgrp {
3456
-  display: block;
3457
-  position: relative;
3458
-  float: right;
3459
-  width: auto;
3460
-  margin: -25px 14px 0px 0px;
3461
-  font-size: 15px;
3462
-  font-weight: 600;
3463
-  color: #0082C9;
3464
-  z-index: 5002;
3465
-}
3466
-
3467
-.arrowDownCl {
3468
-  background-image: url('../img/arrowDown.svg');
3469
-  background-repeat: no-repeat;
3470
-  background-position: center center;
3471
-  z-index: 1010;
3472
-}
3473
-
3474
-.arrowUpCl {
3475
-  background-image: url('../img/arrowUp.svg');
3476
-  background-repeat: no-repeat;
3477
-  background-position: center center;
3478
-  z-index: 1010;   
3479
-}
3480
-
3481
-#recarrow, #sentarrow {
3482
-  display: block;
3483
-  position: relative;
3484
-  float: left;
3485
-  margin: 3.8px 0px 0px 7px;
3486
-  width: 17px;
3487
-  height: 17px;
3488
-  border: none;
3489
-  cursor: pointer;
3490
-}
3491
-
3492
-#totalrecmessages, #totalsentmessages, #totalgrpmessages {
3493
-  display: block;
3494
-  position: relative;
3495
-  padding: 10px 0px 0px 7px;
3496
-  font-size: 14px;
3497
-  font-weight: bold;
3498
-  color: #4cbc86;
3499
-}
3500
-
3501
-.pagenumbers, .pagenumbersbottom, .pagenumbersrec, .pagenumbersbottomrec, .pagenumbersgrp {
3502
-  color: #0082C9;
3503
-}
3504
-
3505
-#dbidtextsent {
3506
-  display: block;
3507
-  margin: auto;
3508
-  width: 95%;
3509
-  padding: 0 3px !important;
3510
-  text-align: center;
3511
-}
3512
-
3513
-#dbidtextrec {
3514
-  display: block;
3515
-  margin: auto;
3516
-  width: 95%;
3517
-  padding: 0 3px !important;
3518
-  text-align: center;
3519
-}
3520
-
3521
-#useridtext {
3522
-  display: block;
3523
-  margin: auto;
3524
-  width: 95%;
3525
-}
3526
-
3527
-#useridtextrec {
3528
-  display: block;
3529
-  margin: auto;
3530
-  width: 95%;
3531
-}
3532
-
3533
-#messageidtext {
3534
-  display: block;
3535
-  margin: auto;
3536
-  width: 95%;
3537
-}
3538
-
3539
-#messageidtextrec {
3540
-  display: block;
3541
-  margin: auto;
3542
-  width: 95%;
3543
-}
3544
-
3545
-#datetext {
3546
-  display: block;
3547
-  margin: auto;
3548
-  width: 95px;
3549
-}
3550
-
3551
-#datetextrec {
3552
-  display: block;
3553
-  margin: auto;
3554
-  width: 95%;
3555
-}
3556
-
3557
-#fromtext {
3558
-  display: block;
3559
-  margin: auto;
3560
-  width: 95%;
3561
-}
3562
-
3563
-#fromtextrec {
3564
-  display: block;
3565
-  margin: auto;
3566
-  width: 95%;
3567
-}
3568
-
3569
-#totext {
3570
-  display: block;
3571
-  margin: auto;
3572
-  width: 95%;
3573
-}
3574
-
3575
-#totextrec {
3576
-  display: block;
3577
-  margin: auto;
3578
-  width: 95%;
3579
-}
3580
-
3581
-#networktext {
3582
-  display: block;
3583
-  margin: auto;
3584
-  width: 95%;
3585
-}
3586
-
3587
-#pricetext {
3588
-  display: block;
3589
-  margin: auto;
3590
-  width: 95%;
3591
-}
3592
-
3593
-#statustext {
3594
-  display: block;
3595
-  margin: auto;
3596
-  width: 95%;
3597
-}
3598
-
3599
-#deliveryrcpttext {
3600
-  display: block;
3601
-  margin: auto;
3602
-  width: 95%;
3603
-}
3604
-
3605
-#messagetext {
3606
-  display: block;
3607
-  margin: auto;
3608
-  width: 95%;
3609
-}
3610
-
3611
-#messagetextrec {
3612
-  display: block;
3613
-  margin: auto;
3614
-  width: 95%;
3615
-}
3616
-
3617
-#databaseidfilter {
3618
-  display: block;
3619
-  margin-left: auto;
3620
-  margin-right: auto;
3621
-}
3622
-
3623
-#sentstatuscolumn {
3624
-  max-width: 160px;
3625
-}
3626
-
3627
-.useridcolrec {
3628
-  width: 124px;
3629
-  background-color: #ffffff;
3630
-  text-align: center;
3631
-}
3632
-
3633
-.messageidcolsent {
3634
-  overflow: visible;
3635
-  word-break: break-all;
3636
-  text-align: center;
3637
-  max-width: 180px;
3638
-}
3639
-
3640
-.messageidcolrec {
3641
-  overflow: visible;
3642
-  word-break: break-all;
3643
-  width: 420px;
3644
-  text-align: center;
3645
-}
3646
-
3647
-.datecolrec {
3648
-  width: 160px;
3649
-  text-align: center;
3650
-}
3651
-
3652
-.fromcolumnrec {
3653
-  width: 140px;
3654
-  text-align: center;
3655
-  background-color: #f2fff5;
3656
-}
3657
-
3658
-.tocolrec {
3659
-  width: 140px;
3660
-  background-color: #f2fbff;
3661
-  text-align: center;
3662
-}
3663
-
3664
-.networkcolumnsent {
3665
-  max-width: 90px;
3666
-  background-color: #ffffff;
3667
-  word-break: break-word;
3668
-  text-align: center;
3669
-}
3670
-
3671
-.networkNmContent {
3672
-  display: none;
3673
-}
3674
-
3675
-.phNetworkImg {
3676
-  cursor: pointer;
3677
-}
3678
-
3679
-.recNetworkImg {
3680
-  cursor: pointer;
3681
-}
3682
-
3683
-.useridcolsent, .pricecolumnsent {
3684
-  background-color: #ffffff;
3685
-  text-align: center;
3686
-}
3687
-
3688
-.statuscolumnsent {
3689
-  background-color: #ffffff;
3690
-  text-align: center;
3691
-  max-width: 200px;
3692
-}
3693
-
3694
-.deliveryrcptcolsent {
3695
-  background-color: #ffffff;
3696
-  text-align: center;
3697
-  max-width: 124px;
3698
-  word-break: break-word;
3699
-}
3700
-
3701
-.tocolumnsent {
3702
-  background-color: #f2fbff;
3703
-  text-align: center;
3704
-}
3705
-
3706
-.fromcolumnsent {
3707
-  background-color: #f2fff5;
3708
-  text-align: center;
3709
-}
3710
-
3711
-.active {
3712
-  color: #c62b71;
3713
-}
3714
-
3715
-#deleteoldmssgs {
3716
-  display: inline-block;
3717
-  position: relative;
3718
-  margin: 10px 0px 10px 1px;
3719
-  font-size: 15px;
3720
-  font-weight: bold;
3721
-}
3722
-
3723
-#deleteoldsms {
3724
-  display: none;
3725
-  background: #e8f6ff;
3726
-  border-radius: 6px;
3727
-  padding: 5px;
3728
-}
3729
-
3730
-#delOldrecSMS, #delOldsentSMS {
3731
-  display: block;
3732
-  background-color: #0082C9;
3733
-  color: #ffffff;
3734
-  margin: 10px 0px 10px 5px;
3735
-  border-radius: 20px;
3736
-  font-family: 'Open Sans';
3737
-  font-size: 14px;
3738
-}
3739
-
3740
-#delOldrecSMS:active, #delOldsentSMS:active {
3741
-  background: #00a2f9;
3742
-}
3743
-
3744
-#delsetrows {
3745
-  display: block;
3746
-  padding: 5px;
3747
-}
3748
-
3749
-.deletesmsolder {
3750
-  display: inline;
3751
-  font-size: 15px;
3752
-  font-weight: bold;
3753
-}
3754
-
3755
-#oldrecSmsInterval, #oldsentSmsInterval {
3756
-  display: inline;
3757
-  width: 60px;
3758
-  height: 25px;
3759
-  padding: 0px 0px 0px 10px;
3760
-  font-family: 'Inter';
3761
-  font-size: 14px;
3762
-  font-weight: 600;
3763
-  border-radius: 20px;
3764
-}
3765
-
3766
-#upArrow {
3767
-  background-image: url("../img/arrow-top.svg");
3768
-  background-repeat: no-repeat;
3769
-  background-color: transparent !important;
3770
-  opacity: 0.30;
3771
-  position: fixed;
3772
-  bottom: 30px;
3773
-  right: 8px;
3774
-  width: 42px;
3775
-  height: 42px;
3776
-  border: none;
3777
-  cursor: pointer;
3778
-  display: none;
3779
-  z-index: 1010;
3780
-}
3781
-
3782
-#upArrow:hover {
3783
-  opacity: 1;
3784
-}
3785
-
3786
-#arrowupWrap {
3787
-  display: block;
3788
-  position: sticky;
3789
-  width: 21px;
3790
-  height: 21px;
3791
-  bottom: 12px;
3792
-  left: 530px;
3793
-}
3794
-
3795
-#upArrowSmall {
3796
-  position: relative;
3797
-  background-image: url("../img/arrow-top-small.svg");
3798
-  background-repeat: no-repeat;
3799
-  background-color: transparent !important;
3800
-  width: 21px;
3801
-  height: 21px;
3802
-  opacity: 0.30;
3803
-  border: none;
3804
-  cursor: pointer;
3805
-  display: none;
3806
-  z-index: 5300;
3807
-}
3808
-
3809
-#upArrowSmall:hover {
3810
-  opacity: 1;
3811
-}
3812
-
3813
-.opensmsfolder {
3814
-  display: block;
3815
-  position: relative;
3816
-  margin: 10px 0px 10px 0px !important;
3817
-  padding: 7px 0 7px 0 !important;
3818
-  width: 100% !important;
3819
-  color: #FFFFFF !important;
3820
-  font-family: 'Open Sans' !important;
3821
-  font-size: 15px !important;
3822
-  background-color: #CB99C5 !important;
3823
-}
3824
-
3825
-.opensmsfolder:hover {
3826
-  border: 2px;
3827
-  background-color: #c18bba !important;
3828
-}
3829
-
3830
-.opensmsfolder:active {
3831
-  background-color: #b777af !important;
3832
-  border: 2px;
3833
-  color: #FFFFFF !important;
3834
-  border-color: #b777af;
3835
-}
3836
-
3837
-.opensmsfolder:focus {
3838
-  background-color: #a3669b !important;
3839
-  border: 2px;
3840
-  border-color: #a3669b;
3841
-}
3842
-
3843
-#save_sms_settings {
3844
-  display: inline-block;
3845
-  border-radius: 8px !important;
3846
-  padding: 0px 14px !important;
3847
-  color: #ffffff !important;
3848
-  background-color: #1e89c2 !important;
3849
-}
3850
-
3851
-#save_sms_settings:hover {
3852
-  background-color: #0369a0 !important;
3853
-}
3854
-
3855
-#save_sms_settings:active {
3856
-  background-color: #025480 !important;
3857
-}
3858
-
3859
-/* Timer for page auto-refresh */
3860
-#refreshTimerSent {
3861
-  display: none;
3862
-  margin: 1.5px 0px 0px 6px;
3863
-}
3864
-
3865
-.arftimer {
3866
-  background: -webkit-linear-gradient(left, #3c76bd 50%, #eee 50%);
3867
-  border-radius: 100%;
3868
-  height: calc(var(--size) * 1px);
3869
-  width: calc(var(--size) * 1px);
3870
-  position: relative;
3871
-  -webkit-animation: time calc(var(--duration) * 1s) steps(1000, start) infinite;
3872
-  -webkit-mask: radial-gradient(transparent 50%,#000 50%);
3873
-  mask: radial-gradient(transparent 50%,#000 50%);
3874
-}
3875
-
3876
-.arfmask {
3877
-  border-radius: 100% 0 0 100% / 50% 0 0 50%;
3878
-  height: 100%;
3879
-  left: 0;
3880
-  position: absolute;
3881
-  top: 0;
3882
-  width: 50%;
3883
-  -webkit-animation: mask calc(var(--duration) * 1s) steps(500, start) infinite;
3884
-  -webkit-transform-origin: 100% 50%;
3885
-}
3886
-
3887
-@-webkit-keyframes time {
3888
-  100% {
3889
-      -webkit-transform: rotate(360deg);
3890
-  }
3891
-}
3892
-
3893
-@-webkit-keyframes mask {
3894
-  0% {
3895
-      background: #eee;
3896
-      -webkit-transform: rotate(0deg);
3897
-  }
3898
-  50% {
3899
-      background: #eee;
3900
-      -webkit-transform: rotate(-180deg);
3901
-  }
3902
-  50.01% {
3903
-      background: #3c76bd;
3904
-      -webkit-transform: rotate(0deg);
3905
-  }
3906
-  100% {
3907
-      background: #3c76bd;
3908
-      -webkit-transform: rotate(-180deg);
3909
-  }
3910
-}
3911
-
3912
-#sms_relentless_adm {
3913
-  font-family: 'Inter';
3914
-}
3915
-
3916
-.arplAuthor, .arplPhoneNmbr, .selectArplMode, .daysInWeek, .startDate, .endDate, .arplText, .restrAuthor {
3917
-  font-family: 'Inter' !important;
3918
-}
3919
-
3920
-.indivfilterrec, .indivfiltersent {
3921
-  font-family: 'Inter';
3922
-  padding: 0 4px !important;
3923
-}
3924
-
3925
-@media only screen and (max-width: 600px) {
3926
-  #convImgGrey {
3927
-    display: none;
3928
-  }
3929
-  #grpdbynamelstcv {
3930
-    right: -130px;
3931
-  }
3932
-  #filterByTagImg, #filterByFlagImg {
3933
-    display: none;
3934
-  }
3935
-  #convDescWindow, #convTagWindow, #convFlagWindow {
3936
-    width: 100vw;
3937
-    left: 0 !important;
3938
-    top: 0 !important;
3939
-  }
3940
-  #listAllMsgsFromTo, #listAllMsgsConv {
3941
-    width: 100vw;
3942
-    height: calc(100vh - 120px);
3943
-    top: 0 !important;
3944
-    left: 0 !important;
3945
-    padding: 0 20px 0 20px;
3946
-  }
3947
-  #frmMsgLstWrap {
3948
-    height: calc(100vh - 232px);
3949
-  }
3950
-  .groupedLstNamespn {
3951
-    margin-top: 24px;
3952
-  }
3953
-  #frmMsgLstTbl {
3954
-    width: 92vw;
3955
-  }
3956
-  #msgListRowCell {
3957
-    width: auto;
3958
-  }
3959
-  #draglstMsgmWindowsc {
3960
-    margin: 6px auto 0 auto;
3961
-  }
3962
-  #fromPhoneNmbrConv {
3963
-    display: block;
3964
-    margin: 6px 0 2px 0;
3965
-  }
3966
-  #toPhoneNmbrConv {
3967
-    display: block;
3968
-    margin-left: 0 !important;
3969
-    text-align: left;
3970
-  }
3971
-  #alertMessage, #alertConfMessage {
3972
-    width: 100vw !important;
3973
-    left: 0 !important;
3974
-    background-color: #fbfbfb;
3975
-  }
3976
-  #disNameWindow {
3977
-    width: 100vw !important;
3978
-    left: 0 !important;
3979
-    top: 0 !important;
3980
-    background-color: #fbfbfb;
3981
-  }
3982
-  #sendMsgReplySec {
3983
-    height: auto;
3984
-  }
3985
-  #fromPhnNmbrCv, #toPhnNmbrCv {   
3986
-    display: block;
3987
-    text-align: left;
3988
-    margin: 0;
3989
-  }
3990
-  #sentSmsTable th, #recSmsTable th, #groupedSmsTable th {
3991
-    top: 0;
3992
-  }
3993
-  #stopAutoRefreshSent {
3994
-    left: auto;
3995
-    right: 2px !important;
3996
-  }
3997
-  #titleFirstRow {
3998
-    margin: 23px auto 0 auto;
3999
-  }
4000
-}
4001
-
4002
-@media only screen and (max-width: 1020px) {
4003
-  #recarrow, #sentarrow {
4004
-    display: block;
4005
-    position: relative;
4006
-    float: left;
4007
-    width: 17px;
4008
-    height: 17px;
4009
-    margin: 3.8px 0px 0px 50px;
4010
-    border: none;
4011
-    cursor: pointer;
4012
-    z-index: 5010;
4013
-  }
4014
-  #stopAutoRefreshSent {
4015
-    display: none;
4016
-    position: fixed;
4017
-    left: 86px;
4018
-    top: 50.7px;
4019
-    z-index: 5000;
4020
-  }
4021
-}
4022
-
4023
-/* Changes for dark themes */
4024
-[data-theme-dark] .srheader,
4025
-[data-theme-dark-highcontrast] .srheader {
4026
-  display: block;
4027
-  position: relative;
4028
-  margin: 0px 0px 7px 0px;
4029
-  color: #fafafa;
4030
-  font-size: 15px;
4031
-  font-weight: 700;
4032
-}
4033
-
4034
-[data-theme-dark] #sendtomultiple,
4035
-[data-theme-dark-highcontrast] #sendtomultiple {
4036
-  display: inline-block;
4037
-  position: relative;
4038
-  margin: 10px 0px 12px 0px;
4039
-  color: #fafafa;
4040
-  font-size: 15px;
4041
-  font-weight: 700;
4042
-}
4043
-
4044
-[data-theme-dark] #entermessage,
4045
-[data-theme-dark-highcontrast] #entermessage {
4046
-  display: block;
4047
-  position: relative;
4048
-  margin: 10px 0px 0px 0px;
4049
-  color: #fafafa;
4050
-  font-size: 15px;
4051
-  font-weight: 700;
4052
-}
4053
-
4054
-[data-theme-dark] #sendmediafl,
4055
-[data-theme-dark-highcontrast] #sendmediafl {
4056
-  display: block;
4057
-  position: relative;
4058
-  margin: 0px 0px 20px 0px;
4059
-  color: #fafafa;
4060
-  font-size: 15px;
4061
-  font-weight: 700;
4062
-}
4063
-
4064
-[data-theme-dark] #deleteoldmssgs,
4065
-[data-theme-dark-highcontrast] #deleteoldmssgs {
4066
-  display: inline-block;
4067
-  position: relative;
4068
-  margin: 10px 0px 10px 1px;
4069
-  color: #fafafa;
4070
-  font-size: 15px;
4071
-  font-weight: 700;
4072
-}
4073
-
4074
-[data-theme-dark] #smsto,
4075
-[data-theme-dark-highcontrast] #smsto {
4076
-  display: block;
4077
-  width: 99%;
4078
-  max-height: 32px;
4079
-  padding: 0px 15px 0px 15px;
4080
-  color: #fafafa;
4081
-  font-family: 'Inter';
4082
-  font-size: 15px;
4083
-  font-weight: 600;
4084
-  border-radius: 20px;
4085
-}
4086
-
4087
-[data-theme-dark] #smstext,
4088
-[data-theme-dark-highcontrast] #smstext {
4089
-  display: inline-block;
4090
-  color: #ffffff;
4091
-  width: 100%;
4092
-  height: 130px;
4093
-  text-align: left;
4094
-  font-family: 'Inter';
4095
-  font-size: 15px;
4096
-  border-radius: 6px;
4097
-  resize: vertical;
4098
-  white-space: pre-wrap;
4099
-}
4100
-
4101
-[data-theme-dark] .arplText,
4102
-[data-theme-dark-highcontrast] .arplText {
4103
-  display: inline-block;
4104
-  color: #fafafa;
4105
-  width: 330px;
4106
-  height: 184px;
4107
-  font-size: 15px;
4108
-  text-align: left;
4109
-  border: 1px solid #000;
4110
-  border-radius: 6px;
4111
-  margin: 0px 1px 0px 0px;
4112
-  resize: vertical;
4113
-  white-space: pre-wrap;
4114
-  overflow: auto;
4115
-}
4116
-
4117
-[data-theme-dark] #oldrecSmsInterval, [data-theme-dark] #oldsentSmsInterval,
4118
-[data-theme-dark-highcontrast] #oldrecSmsInterval, [data-theme-dark-highcontrast] #oldsentSmsInterval {
4119
-  display: inline;
4120
-  width: 60px;
4121
-  height: 25px;
4122
-  padding: 0px 0px 0px 10px;
4123
-  color: #fafafa;
4124
-  font-family: 'Inter';
4125
-  font-size: 14px;
4126
-  font-weight: 600;
4127
-  border-radius: 20px;
4128
-}
4129
-
4130
-[data-theme-dark] .tooltipbalanceid #infobalance,
4131
-[data-theme-dark-highcontrast] .tooltipbalanceid #infobalance {
4132
-  display: block;
4133
-  position: relative;
4134
-  margin: 4px 14px 0px 0px;
4135
-  color: #fafafa;
4136
-  font-size: 21px;
4137
-  font-weight: bold;
4138
-  font-family: 'Open Sans';
4139
-  font-style: italic;
4140
-  z-index: 6;
4141
-}
4142
-
4143
-[data-theme-dark] #infotipid,
4144
-[data-theme-dark-highcontrast] #infotipid {
4145
-  display: block;
4146
-  position: relative;
4147
-  margin: 4px 14px 0px 0px;
4148
-  color: #fafafa;
4149
-  font-size: 19px;
4150
-  font-weight: 700;
4151
-  font-family: 'Open Sans';
4152
-  font-style: italic;
4153
-  z-index: 5;
4154
-}
4155
-
4156
-[data-theme-dark] #inforestrict,
4157
-[data-theme-dark-highcontrast] #inforestrict {
4158
-  display: inline-block;
4159
-  position: relative;
4160
-  margin: -2px 0px 0px 10px;
4161
-  color: #fafafa;
4162
-  font-size: 18px;
4163
-  font-weight: bold;
4164
-  font-family: 'Open Sans';
4165
-  font-style: italic;
4166
-  cursor: pointer;
4167
-}
4168
-
4169
-[data-theme-dark] .fortooltip .texttooltip, [data-theme-dark] .maxmessagelength .texttooltip,
4170
-[data-theme-dark-highcontrast] .fortooltip .texttooltip, [data-theme-dark-highcontrast] .maxmessagelength .texttooltip {
4171
-  font-family: 'Open Sans';
4172
-  font-style: italic;
4173
-  color: #fafafa;
4174
-  font-size: 19px;
4175
-  font-weight: 700;
4176
-  margin: 0px 0px 4px 4px;
4177
-}
4178
-
4179
-[data-theme-dark] #uploadfileforsms,
4180
-[data-theme-dark-highcontrast] #uploadfileforsms {
4181
-  margin-left: 7px;
4182
-  background-color: #434343;
4183
-  border-radius: 3px !important;
4184
-}
4185
-
4186
-[data-theme-dark] #uploadfileformms,
4187
-[data-theme-dark-highcontrast] #uploadfileformms {
4188
-  margin-left: 21px;
4189
-  background-color: #434343;
4190
-  border-radius: 3px !important;
4191
-}
4192
-
4193
-[data-theme-dark] .smsnbformat a,
4194
-[data-theme-dark-highcontrast] .smsnbformat a {
4195
-  color: #cedfff !important;
4196
-}
4197
-
4198
-[data-theme-dark] .smsnbformat font,
4199
-[data-theme-dark-highcontrast] .smsnbformat font {
4200
-  color: #f7547a !important;
4201
-}
4202
-
4203
-[data-theme-dark] .indivfiltersent, [data-theme-dark] .indivfilterrec,
4204
-[data-theme-dark-highcontrast] .indivfiltersent, [data-theme-dark-highcontrast] .indivfilterrec {
4205
-  color: #ffffff !important;
4206
-  padding: 0 4px !important;
4207
-  font-family: 'Inter';
4208
-}
4209
-
4210
-[data-theme-dark] #recSmsTable, [data-theme-dark] #groupedSmsTable, [data-theme-dark] #sentSmsTable,
4211
-[data-theme-dark-highcontrast] #recSmsTable, [data-theme-dark-highcontrast] #groupedSmsTable, [data-theme-dark-highcontrast] #sentSmsTable {
4212
-  color: #000000 !important;
4213
-}
4214
-
4215
-[data-theme-dark] .providerSettings .setlabeltext,
4216
-[data-theme-dark-highcontrast] .providerSettings .setlabeltext {
4217
-  color: #272727;
4218
-}
4219
-
4220
-[data-theme-dark] .providerName,
4221
-[data-theme-dark-highcontrast] .providerName  {
4222
-  font-size: 18px;
4223
-  font-weight: bold;
4224
-  margin-bottom: 20px;
4225
-  color: #272727;
4226
-}
4227
-
4228
-[data-theme-dark] .selectHrMin, 
4229
-[data-theme-dark-highcontrast] .selectHrMin,
4230
-[data-theme-dark] .startDate,
4231
-[data-theme-dark-highcontrast] .startDate,
4232
-[data-theme-dark] .endDate,
4233
-[data-theme-dark-highcontrast] .endDate {
4234
-  color: #ffffff !important;
4235
-}
4236
-
4237
-[data-theme-dark] #infoautoreply, [data-theme-dark] #infoautoreplyst, [data-theme-dark] #infoautoreplypn,
4238
-[data-theme-dark-highcontrast] #infoautoreply, [data-theme-dark-highcontrast] #infoautoreplyst, [data-theme-dark-highcontrast] #infoautoreplypn {
4239
-  color: #ffffff;
4240
-}
4241
-
4242
-[data-theme-dark] .generateUrl,
4243
-[data-theme-dark-highcontrast] .generateUrl {
4244
-  color: #013351 !important;
4245
-  font-family: 'Inter';
4246
-}
4247 0
deleted file mode 100644
... ...
@@ -1,867 +0,0 @@
1
-/**
2
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
3
- *
4
- * @author Double Bastion LLC
5
- *
6
- * @license GNU AGPL version 3 or any later version
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
- * License as published by the Free Software Foundation; either
11
- * version 3 of the License, or any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
- *
18
- * You should have received a copy of the GNU Affero General Public
19
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-$(document).ready(function() {
24
-
25
-  var userid = "<?php p($userId); ?>";
26
-  var ctappdir = 'apps';
27
-
28
-  // Get app directory
29
-  var getappdirurl = OC.generateUrl('/apps/sms_relentless/user/getappdirectory');
30
-
31
-  $.ajax({
32
-     method: 'GET',
33
-     url: getappdirurl + '/' + userid,
34
-     contentType: 'application/json',
35
-     success: function(appdirfdb) {
36
-
37
-                   ctappdir = appdirfdb;
38
-
39
-		  // Get admin settings
40
-		  var baseUrlget = OC.generateUrl('/apps/sms_relentless/user/getadminsettings');
41
-
42
-		  $.ajax({
43
-		     method: 'GET',
44
-		     url: baseUrlget + '/' + userid,
45
-		     contentType: 'application/json',
46
-		     success: function(settingsadm) {
47
-
48
-			  $("#telapi_key").val(settingsadm.telapi_key);
49
-			  $("#tel_pub_key").val(settingsadm.tel_pub_key);
50
-			  $("#telapi_url_rec").val(settingsadm.telapi_url_rec);
51
-			  $("#telapi_url").val(settingsadm.telapi_url);
52
-			  $("#messaging_profile_id").val(settingsadm.messaging_profile_id);
53
-			  $("#nexapi_key").val(settingsadm.nexapi_key);
54
-			  $("#nexapi_secret").val(settingsadm.nexapi_secret);
55
-			  $("#nexapi_url_rec").val(settingsadm.nexapi_url_rec);
56
-			  $("#nexapi_url").val(settingsadm.nexapi_url);
57
-			  $("#twilapi_key").val(settingsadm.twilapi_key);
58
-			  $("#twilapi_secret").val(settingsadm.twilapi_secret);
59
-			  $("#twilapi_url_rec").val(settingsadm.twilapi_url_rec);
60
-			  $("#twilapi_url").val(settingsadm.twilapi_url);
61
-			  $("#flowapi_key").val(settingsadm.flowapi_key);
62
-			  $("#flowapi_secret").val(settingsadm.flowapi_secret);
63
-			  $("#flowapi_url_rec").val(settingsadm.flowapi_url_rec);
64
-			  $("#flowapi_url").val(settingsadm.flowapi_url);
65
-			  $("#tel_sender_name").val(settingsadm.tel_sender_name);
66
-			  $("#nex_sender_name").val(settingsadm.nex_sender_name);
67
-			  $("#twil_sender_name").val(settingsadm.twil_sender_name);
68
-
69
-			  if (settingsadm.show_all_messages == 1) {
70
-			      $("#showallmessages").attr("checked", true);
71
-			  } else {
72
-			      $("#showallmessages").attr("checked", false);
73
-			  }
74
-
75
-			  var crntadmDispName = settingsadm.admdisplayname;
76
-			  var allRestrictions = settingsadm.restrictions;
77
-			  var allGroups = settingsadm.allgroups;
78
-			  var allUsers = settingsadm.allusers;
79
-			  var allGroupswadm = settingsadm.allgroupswadm;
80
-			  var allUserswadm = settingsadm.alluserswadm;
81
-			  var tnxallowedgrp = settingsadm.allowedkeysuse.tnx_groups_allowed;
82
-			  var tnxallowedusr = settingsadm.allowedkeysuse.tnx_users_allowed;
83
-			  var plvallowedgrp = settingsadm.allowedkeysuse.plv_groups_allowed;
84
-			  var plvallowedusr = settingsadm.allowedkeysuse.plv_users_allowed;
85
-			  var twlallowedgrp = settingsadm.allowedkeysuse.twl_groups_allowed;
86
-			  var twlallowedusr = settingsadm.allowedkeysuse.twl_users_allowed;
87
-			  var flrallowedgrp = settingsadm.allowedkeysuse.flr_groups_allowed;
88
-			  var flrallowedusr = settingsadm.allowedkeysuse.flr_users_allowed;
89
-
90
-			  // List all the groups and users allowed to access the API keys, for each provider
91
-			  if (tnxallowedgrp) {
92
-			      var tnxallowedgrparr = tnxallowedgrp.split("|");
93
-			      for (var g = 0; g < tnxallowedgrparr.length; g++) {
94
-				   $("#alwdakeyGrps-tnx").append("<div class='selectedGrps'>"+ tnxallowedgrparr[g] +"<img id='rmvGrp-tnx-"+ tnxallowedgrparr[g] +"' class='removeGroup' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
95
-			      }
96
-			  }
97
-
98
-			  if (tnxallowedusr) {
99
-			      var tnxallowedusrarr = tnxallowedusr.split("|");
100
-			      for (var g = 0; g < tnxallowedusrarr.length; g++) {
101
-				   $("#alwdakeyUsrs-tnx").append("<div class='selectedUsrs'>"+ tnxallowedusrarr[g] +"<img id='rmvUsr-tnx-"+ tnxallowedusrarr[g] +"' class='removeUser' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
102
-			      }
103
-			  }
104
-
105
-			  if (plvallowedgrp) {
106
-			      var plvallowedgrparr = plvallowedgrp.split("|");
107
-			      for (var g = 0; g < plvallowedgrparr.length; g++) {
108
-				   $("#alwdakeyGrps-plv").append("<div class='selectedGrps'>"+ plvallowedgrparr[g] +"<img id='rmvGrp-plv-"+ plvallowedgrparr[g] +"' class='removeGroup' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
109
-			      }
110
-			  }
111
-
112
-			  if (plvallowedusr) {
113
-			      var plvallowedusrarr = plvallowedusr.split("|");
114
-			      for (var g = 0; g < plvallowedusrarr.length; g++) {
115
-				   $("#alwdakeyUsrs-plv").append("<div class='selectedUsrs'>"+ plvallowedusrarr[g] +"<img id='rmvUsr-plv-"+ plvallowedusrarr[g] +"' class='removeUser' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
116
-			      }
117
-			  }
118
-
119
-			  if (twlallowedgrp) {
120
-			      var twlallowedgrparr = twlallowedgrp.split("|");
121
-			      for (var g = 0; g < twlallowedgrparr.length; g++) {
122
-				   $("#alwdakeyGrps-twl").append("<div class='selectedGrps'>"+ twlallowedgrparr[g] +"<img id='rmvGrp-twl-"+ twlallowedgrparr[g] +"' class='removeGroup' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
123
-			      }
124
-			  }
125
-
126
-			  if (twlallowedusr) {
127
-			      var twlallowedusrarr = twlallowedusr.split("|");
128
-			      for (var g = 0; g < twlallowedusrarr.length; g++) {
129
-				   $("#alwdakeyUsrs-twl").append("<div class='selectedUsrs'>"+ twlallowedusrarr[g] +"<img id='rmvUsr-twl-"+ twlallowedusrarr[g] +"' class='removeUser' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
130
-			      }
131
-			  }
132
-
133
-			  if (flrallowedgrp) {
134
-			      var flrallowedgrparr = flrallowedgrp.split("|");
135
-			      for (var g = 0; g < flrallowedgrparr.length; g++) {
136
-				   $("#alwdakeyGrps-flr").append("<div class='selectedGrps'>"+ flrallowedgrparr[g] +"<img id='rmvGrp-flr-"+ flrallowedgrparr[g] +"' class='removeGroup' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
137
-			      }
138
-			  }
139
-
140
-			  if (flrallowedusr) {
141
-			      var flrallowedusrarr = flrallowedusr.split("|");
142
-			      for (var g = 0; g < flrallowedusrarr.length; g++) {
143
-				   $("#alwdakeyUsrs-flr").append("<div class='selectedUsrs'>"+ flrallowedusrarr[g] +"<img id='rmvUsr-flr-"+ flrallowedusrarr[g] +"' class='removeUser' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
144
-			      }
145
-			  }
146
-
147
-
148
-			  // Create a list with all the available groups, excluding the admin group
149
-			  var grpsListItemswadm = "";
150
-			  $.each(allGroupswadm, function(key, value) {
151
-				 grpsListItemswadm += "<div class='groupsList'>"+ value +"</div>";
152
-			  });
153
-
154
-			  // Create a list with all the available users, excluding the admins
155
-			  var usersListItemswadm = "";
156
-			  $.each(allUserswadm, function(key, usrval) {
157
-				 usersListItemswadm += "<div class='usersList'>"+ usrval +"</div>";
158
-			  });
159
-			  
160
-
161
-			  function showListsalwdk() {
162
-
163
-			      // Append the list of available groups to the table of groups and users allowed to use the API keys
164
-			      $('[id^="showakeyGrps-"]').click(function() {
165
-				 var crtid = $(this).attr("id").split("-")[1];
166
-				 $("#grpsadapik-"+ crtid).remove();
167
-				 $("#showakeyGrps-"+ crtid).append("<div id='grpsadapik-"+ crtid +"' class='grpsList'>"+ grpsListItemswadm +"</div>");
168
-				 $("#adminOverlay").remove();
169
-				 $("#app-content").append("<div id='adminOverlay'></div>");
170
-				 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
171
-
172
-				 $("#adminOverlay").click(function() { 
173
-				    $("#adminOverlay").remove();
174
-				    $("#grpsadapik-"+ crtid).remove();
175
-				    $("#usrsadapik-"+ crtid).remove();
176
-				 });
177
-
178
-				 // Select a group
179
-				 $(".groupsList").click(function() {
180
-				    var slctdGrp = $(this).text();
181
-				    $("#grpsadapik-"+ crtid).remove();
182
-				    var addedTxtgrp = $("#alwdakeyGrps-"+ crtid).text();
183
-
184
-				    if (addedTxtgrp.indexOf(slctdGrp) == -1) {
185
-					$("#alwdakeyGrps-"+ crtid).append("<div class='selectedGrps'>"+ slctdGrp +"<img id='rmvGrp-"+ crtid +"-"+ slctdGrp +"' class='removeGroup' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
186
-				    } else { showAlert("That group has already been added!"); }
187
-
188
-				    // Remove a group from list
189
-				    $('[id^="rmvGrp-"]').click(function() {
190
-				       $(this).closest(".selectedGrps").remove();
191
-				    });
192
-				 });
193
-
194
-			      });
195
-
196
-			      // Append the list of available users to the table of groups and users allowed to use the API keys
197
-			      $('[id^="showakeyUsrs-"]').click(function() {
198
-
199
-				 var crtidusr = $(this).attr("id").split("-")[1];
200
-				 $("#usrsadapik-"+ crtidusr).remove();
201
-				 $("#showakeyUsrs-"+ crtidusr).append("<div id='usrsadapik-"+ crtidusr +"' class='usrsList'>"+ usersListItemswadm +"</div>");
202
-				 $("#adminOverlay").remove();
203
-				 $("#app-content").append("<div id='adminOverlay'></div>");
204
-				 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
205
-
206
-				 $("#adminOverlay").click(function() { 
207
-				    $("#adminOverlay").remove(); 
208
-				    $("#grpsadapik-"+ crtidusr).remove();
209
-				    $("#usrsadapik-"+ crtidusr).remove();
210
-				 });
211
-
212
-				 // Select a user
213
-				 $(".usersList").click(function() {
214
-				    var slctdUsr = $(this).text();
215
-				    var addedTxtusr = $("#alwdakeyUsrs-"+ crtidusr).text();
216
-
217
-				    if (addedTxtusr.indexOf(slctdUsr) == -1) {
218
-					$("#alwdakeyUsrs-"+ crtidusr).append("<div class='selectedUsrs'>"+ slctdUsr +"<img id='rmvUsr-"+ crtidusr +"-"+ slctdUsr +"' class='removeUser' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
219
-				    } else { showAlert("That user has already been added!"); }
220
-
221
-				    // Remove a user from list
222
-				    $('[id^="rmvUsr-"]').click(function() {
223
-				       $(this).closest(".selectedUsrs").remove();
224
-				    });
225
-				 });
226
-
227
-			      });
228
-
229
-			      // Remove a group from the list 
230
-			      $('[id^="rmvGrp-"]').click(function() {
231
-				 $(this).closest(".selectedGrps").remove();
232
-			      });
233
-
234
-			      // Remove a user from the list
235
-			      $('[id^="rmvUsr-"]').click(function() {
236
-				 $(this).closest(".selectedUsrs").remove();
237
-			      });
238
-
239
-			  }
240
-			  showListsalwdk();
241
-
242
-
243
-			  // Save the data
244
-			  function saveAlwdRow() {
245
-			     $('[id^="alwdrstsave-"]').unbind("click");
246
-			     $('[id^="alwdrstsave-"]').click(function(event) {
247
-
248
-				 event.preventDefault();
249
-				 var crntprov = $(this).attr("id").replace("alwdrstsave-", "");
250
-				 
251
-				 if ($(this).attr("value") == "Save") {
252
-
253
-				     var selGroups = [];
254
-				     $("#alwdakeyGrps-"+ crntprov +" .selectedGrps").each(function() {
255
-					selGroups.push($(this).text());
256
-				     });
257
-				     if (selGroups.length == 0) { selGroups.push(""); }
258
-
259
-				     var selUsers = [];
260
-				     $("#alwdakeyUsrs-"+ crntprov +" .selectedUsrs").each(function() {
261
-					selUsers.push($(this).text());
262
-				     });
263
-				     if (selUsers.length == 0) { selUsers.push(""); }
264
-
265
-				     // Check if the access key fields have been left empty
266
-				     if (crntprov == 'tnx' && ($("#telapi_key").val().trim() == '' || $("#tel_pub_key").val().trim() == '' || $("#messaging_profile_id").val().trim() == '')) {
267
-					 showAlert("Please first fill in the fields: 'Telnyx API Secret Key', 'Telnyx Account Public Key' and 'Messaging Profile ID'");
268
-					 return;
269
-				     } else if (crntprov == 'plv' && ($("#nexapi_key").val().trim() == '' || $("#nexapi_secret").val().trim() == '')) {
270
-					 showAlert("Please first fill in the fields: 'Plivo Auth ID' and 'Plivo Auth Token'.");
271
-					 return;
272
-				     } else if (crntprov == 'twl' && ($("#twilapi_key").val().trim() == '' || $("#twilapi_secret").val().trim() == '')) {
273
-					 showAlert("Please first fill in the fields: 'Twilio Account SID' and 'Twilio Auth Token'.");
274
-					 return;
275
-				     } else if (crntprov == 'flr' && ($("#flowapi_key").val().trim() == '' || $("#flowapi_secret").val().trim() == '')) {
276
-					 showAlert("Please first fill in the fields: 'Flowroute Access Key' and 'Flowroute Secret Key'.");
277
-					 return;
278
-				     }
279
-
280
-				     var saveAlwdUrl = OC.generateUrl('/apps/sms_relentless/user/updatekeysallowedusers');
281
-
282
-				     var alwddatatosend = { 
283
-					      userId: userid,
284
-					      groups: selGroups,
285
-					      users: selUsers,
286
-					      provider: crntprov
287
-				     };
288
-
289
-				     $.ajax({
290
-					   method: 'PUT',
291
-					   url: saveAlwdUrl + '/' + userid,
292
-					   contentType: 'application/json',
293
-					   data: JSON.stringify(alwddatatosend),
294
-					   success: function(messagesent) {
295
-					                if (messagesent == 'success') {
296
-					                    showAlert('The allowed groups and users have been successfully saved to the database! However, to be able to send and receive messages using the shared keys from above, the allowed users have to generate and save the 2 webhook URLs corresponding to this SMS provider, on their own Settings page.');
297
-					                } else if (messagesent != 'success' && messagesent != 'failure') {
298
-					                    showAlert(messagesent);
299
-					                } else if (messagesent == 'failure') {
300
-					                    showAlert('Error while trying to save the allowed groups and users!');
301
-					                }
302
-					   },
303
-					   error: function() {
304
-							showAlert('Error while attempting to save the allowed groups and users! You can check the Nextcloud log to find more details about this issue.');
305
-					   }
306
-				     });
307
-
308
-				     $(this).attr("value", "Edit");
309
-
310
-				} else {
311
-
312
-				     $("#alwdrstsave-"+ crntprov).attr("value", "Save");
313
-				}
314
-
315
-			     });
316
-			  }
317
-			  saveAlwdRow();
318
-
319
-
320
-
321
-			  // Phone number restrictions
322
-
323
-			  // Create a list with all the available groups
324
-			  var grpsListItems = "";
325
-			  $.each(allGroups, function(key, value) {
326
-				 grpsListItems += "<div class='groupsList'>"+ value +"</div>";
327
-			  });
328
-
329
-			  // Create a list with all the available users
330
-			  var usersListItems = "";
331
-			  $.each(allUsers, function(key, usrval) {
332
-				 usersListItems += "<div class='usersList'>"+ usrval +"</div>";
333
-			  });
334
-
335
-
336
-			  if (allRestrictions.length > 0) {
337
-			      var restrNmb = allRestrictions.length;
338
-			  } else {
339
-			      var restrNmb = 0;
340
-			  }
341
-
342
-
343
-			  // List the access restrictions for groups and users
344
-			  if (restrNmb == 0) {
345
-
346
-			      $("#phoneNmbrRestr").append("<tr><td><input type='text' class='restrAuthor' value='"+ crntadmDispName +"' disabled></td><td><select id='rstphn-"+ restrNmb +"' class='restrPhoneNmbr'></select></td><td><div id='rstgrp-"+ restrNmb +"' class='restrGroups'></div></td><td><div id='showGrps-"+ restrNmb +"' class='showAllGroups'><img src='/" + ctappdir + "/sms_relentless/img/group.svg' style='cursor:pointer' title='Show all groups'></div></td><td><div id='rstusr-"+ restrNmb +"' class='restrUsers'></div></td><td><div id='showUsr-"+ restrNmb +"' class='showAllUsers'><img src='/" + ctappdir + "/sms_relentless/img/user.svg' style='cursor:pointer' title='Show all users'></div></td><td><img id='rmRow-"+ restrNmb +"' class='removeRow' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this row from the database' style='cursor:pointer;margin:6px 7px 0px 6px;'></td><td><input type='submit' id='rstsave-"+ restrNmb +"' class='saveRestrictions' value='Save' title='Save Row' /></td></tr>");
347
-			      $("#phoneNmbrRestr").append("<div><img id='addRestrRow' src='/" + ctappdir + "/sms_relentless/img/add.svg' title='Add Row'></div>");
348
-
349
-			  } else {
350
-
351
-			      for (k = 0; k < restrNmb; k++) {
352
-
353
-				   if (allRestrictions[k].groups) {
354
-				       var groupsfdbpre = allRestrictions[k].groups.split("|");
355
-				       var groupsfdb = "";
356
-				       for (var g = 0; g < groupsfdbpre.length; g++) {
357
-					    groupsfdb += "<div class='selectedGrps'>"+ groupsfdbpre[g] +"<img id='rmvGrp-"+ groupsfdbpre[g] +"' class='removeGroup' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this group'></div>";
358
-				       }
359
-				   } else { var groupsfdb = ""; }
360
-
361
-				   if (allRestrictions[k].users) {
362
-				       var usersfdbpre = allRestrictions[k].users.split("|");
363
-				       var usersfdb = "";
364
-				       for (var u = 0; u < usersfdbpre.length; u++) {
365
-					    usersfdb += "<div class='selectedUsrs'>"+ usersfdbpre[u] +"<img id='rmvUsr-"+ usersfdbpre[u] +"' class='removeUser' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this user'></div>";
366
-				       }
367
-				   } else { var usersfdb = ""; }
368
-
369
-				   $("#phoneNmbrRestr").append("<tr><td><input type='text' class='restrAuthor' value='"+ allRestrictions[k].saved_by_dsplname +"' disabled></td><td><select id='rstphn-"+ k +"' class='restrPhoneNmbr' style='pointer-events:none'><option selected>"+ allRestrictions[k].phone_number +"</option></select></td><td><div id='rstgrp-"+ k +"' class='restrGroups'>"+ groupsfdb +"</div></td><td><div id='showGrps-"+ k +"' class='showAllGroups'><img src='/" + ctappdir + "/sms_relentless/img/group.svg' style='cursor:pointer' title='Show all groups'></div></td><td><div id='rstusr-"+ k +"' class='restrUsers'>"+ usersfdb +"</div></td><td><div id='showUsr-"+ k +"' class='showAllUsers'><img src='/" + ctappdir + "/sms_relentless/img/user.svg' style='cursor:pointer' title='Show all users'></div></td><td><img id='rmRow-"+ k +"' class='removeRow' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this row from the database' style='cursor:pointer;margin:6px 7px 0px 6px;'></td><td><input type='submit' id='rstsave-"+ k +"' class='saveRestrictions' value='Edit' title='Edit Row' /></td></tr>");
370
-			      }
371
-			      $("#phoneNmbrRestr").append("<div><img id='addRestrRow' src='/" + ctappdir + "/sms_relentless/img/add.svg' title='Add Row'></div>");
372
-			  }
373
-
374
-
375
-			  // Get the available phone numbers from all providers associated with the access keys entered on the Settings page
376
-			  $("#phoneNumberTh").addClass('icon-loading');
377
-			  var getnumbersUrl = OC.generateUrl("/apps/sms_relentless/user/getsmsnumbers");
378
-			  var numbersListItems = '';
379
-
380
-			  $.ajax({
381
-				  url: getnumbersUrl + '/' + userid,
382
-				  type: "POST",
383
-				  cache: false,
384
-				  processData: false,
385
-				  contentType: false,
386
-				  success: function(currentnmbrs) {
387
-
388
-					            $("#phoneNumberTh").removeClass('icon-loading');
389
-
390
-						    // Create a list with all the available phone numbers
391
-					            numbersListItems = "<option value='' selected>Select phone number</option>";
392
-
393
-						    $.each(currentnmbrs, function(key, indsmsnmb) {
394
-							   numbersListItems += "<option value='"+ indsmsnmb +"'>"+ indsmsnmb +"</option>";
395
-						    });
396
-
397
-						    if (restrNmb == 0) { var indRow = 0; } else { var indRow = parseInt(restrNmb + 1); }
398
-
399
-						    // Append the list of available phone numbers
400
-						    $("#rstphn-"+ indRow).empty();
401
-						    $("#rstphn-"+ indRow).append(numbersListItems);
402
-			
403
-				  },
404
-				  error: function() {
405
-					            $("#phoneNumberTh").removeClass('icon-loading'); 
406
-					            showAlert("Error while attempting to retrieve the available phone numbers!");
407
-				  }
408
-			  });
409
-
410
-
411
-			  function showLists() {
412
-
413
-			      // Append the list of available groups to the restrictions table
414
-			      $('[id^="showGrps-"]').click(function() {
415
-				 var crtnmbr = $(this).attr("id").replace("showGrps-", "");
416
-				 $("#grpL-"+ crtnmbr).remove();
417
-				 $("#showGrps-"+ crtnmbr).append("<div id='grpL-"+ crtnmbr +"' class='grpsList'>"+ grpsListItems +"</div>");
418
-				 $("#adminOverlay").remove();
419
-				 $("#app-content").append("<div id='adminOverlay'></div>");
420
-				 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
421
-
422
-				 $("#adminOverlay").click(function() { 
423
-				    $("#adminOverlay").remove(); 
424
-				    $("#grpL-"+ crtnmbr).remove(); 
425
-				    $("#usrL-"+ crtnmbr).remove();
426
-				 });
427
-
428
-				 // Select a group
429
-				 $(".groupsList").click(function() {
430
-				    var slctdGrp = $(this).text();
431
-				    $("#grpL-"+ crtnmbr).remove();
432
-				    var addedTxtgrp = $("#rstgrp-"+ crtnmbr).text();
433
-
434
-				    if (addedTxtgrp.indexOf(slctdGrp) == -1) {
435
-					$("#rstgrp-"+ crtnmbr).append("<div class='selectedGrps'>"+ slctdGrp +"<img id='rmvGrp-"+ slctdGrp +"' class='removeGroup' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
436
-				    } else { showAlert("That group has already been added!"); }
437
-
438
-				    // Remove a group from list
439
-				    $('[id^="rmvGrp-"]').click(function() {
440
-				       $(this).closest(".selectedGrps").remove();
441
-				    });
442
-				 });
443
-
444
-			      });
445
-
446
-			      // Append the list of available users to the restrictions table
447
-			      $('[id^="showUsr-"]').click(function() {
448
-
449
-				 var ctusrnmbr = $(this).attr("id").replace("showUsr-", "");
450
-				 $("#usrL-"+ ctusrnmbr).remove();
451
-				 $("#showUsr-"+ ctusrnmbr).append("<div id='usrL-"+ ctusrnmbr +"' class='usrsList'>"+ usersListItems +"</div>");
452
-				 $("#adminOverlay").remove();
453
-				 $("#app-content").append("<div id='adminOverlay'></div>");
454
-				 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
455
-
456
-				 $("#adminOverlay").click(function() { 
457
-				    $("#adminOverlay").remove(); 
458
-				    $("#grpL-"+ ctusrnmbr).remove(); 
459
-				    $("#usrL-"+ ctusrnmbr).remove();
460
-				 });
461
-
462
-				 // Select a user
463
-				 $(".usersList").click(function() {
464
-				    var slctdUsr = $(this).text();
465
-				    var addedTxtusr = $("#rstusr-"+ ctusrnmbr).text();
466
-
467
-				    if (addedTxtusr.indexOf(slctdUsr) == -1) {
468
-					$("#rstusr-"+ ctusrnmbr).append("<div class='selectedUsrs'>"+ slctdUsr +"<img id='rmvUsr-"+ slctdUsr +"' class='removeUser' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
469
-				    } else { showAlert("That user has already been added!"); }
470
-
471
-				    // Remove a user from list
472
-				    $('[id^="rmvUsr-"]').click(function() {
473
-				       $(this).closest(".selectedUsrs").remove();
474
-				    });
475
-				 });
476
-
477
-			      });
478
-
479
-			      // Remove a group from the list 
480
-			      $('[id^="rmvGrp-"]').click(function() {
481
-				 $(this).closest(".selectedGrps").remove();
482
-			      });
483
-
484
-			      // Remove a user from the list
485
-			      $('[id^="rmvUsr-"]').click(function() {
486
-				 $(this).closest(".selectedUsrs").remove();
487
-			      });
488
-
489
-			  }
490
-			  showLists();
491
-
492
-
493
-			  // Save the data
494
-			  function saveRestrRow() {
495
-
496
-			     $('[id^="rstsave-"]').unbind("click");
497
-			     $('[id^="rstsave-"]').click(function(event) {
498
-
499
-				 event.preventDefault();
500
-				 var crntrwnmbr = $(this).attr("id").replace("rstsave-", "");
501
-
502
-				 if ($(this).attr("value") == "Save") {
503
-
504
-				     var phoneNmbr = $("#rstphn-"+ crntrwnmbr).val();
505
-				     var slctdGroups = [];
506
-				     $("#rstgrp-"+ crntrwnmbr +" .selectedGrps").each(function() {
507
-					slctdGroups.push($(this).text());
508
-				     });
509
-				     var slctdUsers = [];
510
-				     $("#rstusr-"+ crntrwnmbr +" .selectedUsrs").each(function() {
511
-					slctdUsers.push($(this).text());
512
-				     });
513
-
514
-				     if (phoneNmbr != '') {
515
-
516
-				       if (slctdGroups.length > 0 || slctdUsers.length > 0) {
517
-
518
-					 var saveRestrUrl = OC.generateUrl('/apps/sms_relentless/user/updatenumberrestrictions');
519
-
520
-					 var datatosend = { 
521
-					      userId: userid,
522
-					      savedByDsplname: crntadmDispName,
523
-					      phoneNumber: phoneNmbr,
524
-					      groups: slctdGroups,
525
-					      users: slctdUsers
526
-					 };
527
-
528
-					 $.ajax({
529
-					   method: 'PUT',
530
-					   url: saveRestrUrl + '/' + userid,
531
-					   contentType: 'application/json',
532
-					   data: JSON.stringify(datatosend),
533
-					   success: function(messagetosend) {
534
-					                if (messagetosend == 'success') {
535
-					                    showAlert('The restrictions have been successfully saved to the database!');
536
-					                } else {
537
-					                    showAlert('Error while trying to save the restrictions!');
538
-					                }
539
-					   },
540
-					   error: function() {
541
-							showAlert('Error while attempting to save the restrictions! You can check the Nextcloud log to find more details about this issue.');
542
-					   }
543
-					 });
544
-
545
-				       } else { showAlert("You must select at least a group or a user in order to restrict access to a phone number."); return; }
546
-
547
-				     } else { showAlert("Please select a phone number!"); return; }
548
-
549
-				     $(this).attr("value", "Edit");
550
-
551
-				} else {
552
-
553
-				     $("#rstsave-"+ crntrwnmbr).attr("value", "Save");
554
-				}
555
-
556
-			     });
557
-			  }
558
-			  saveRestrRow();
559
-
560
-			  // Remove a row
561
-			  function removeRestrRow() {
562
-
563
-			       $('[id^="rmRow-"]').click(function() {
564
-
565
-				  var slctRowRmv = $(this).attr("id").replace("rmRow-", "");
566
-				  var crntPhNmbr = $("#rstphn-"+ slctRowRmv).val();
567
-
568
-				  confirmAlert("Do you really want to remove this row from the database ?");
569
-
570
-				  $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
571
-
572
-				  $("#confirmOk").click(function() {
573
-
574
-				      $("#alertMsgOverlay").remove();
575
-				      $("#alertConfMessage").remove();
576
-
577
-				      var rmvRestrUrl = OC.generateUrl('/apps/sms_relentless/user/removenumberrestrictions');
578
-				      $.ajax({
579
-					   url: rmvRestrUrl + '/' + userid,
580
-					   method: "POST",
581
-					   dataType: "text",
582
-					   data: { phoneNumber: crntPhNmbr },
583
-					   success: function(delresult) {
584
-
585
-					                     if (delresult.indexOf("success") > -1) {
586
-					                         showAlert("The restriction has been removed successfully!");
587
-					                         $("#rstphn-"+ slctRowRmv).closest("tr").remove();
588
-					                     } else {
589
-					                         showAlert("Error while trying to remove restriction data!");
590
-					                     }
591
-					   },
592
-					   error: function() { showAlert("Error while attempting to remove restriction data! You can check the Nextcloud log to find more details about this issue."); }
593
-				       });
594
-				  });
595
-			       });
596
-			  }
597
-			  removeRestrRow();
598
-
599
-			  // Add a new row
600
-			  $("#addRestrRow").click(function() {
601
-			      if ($("#phoneNmbrRestr").find("tr:last-child").find(".restrPhoneNmbr").length > 0) {
602
-				  var lastrstAuth = $("#phoneNmbrRestr").find("tr:last-child").find(".restrPhoneNmbr").attr("id").replace("rstphn-", "");
603
-				  var indRowAdd = parseInt(lastrstAuth + 1);
604
-			      } else { var indRowAdd = 0; }
605
-			      $("#phoneNmbrRestr").append("<tr><td><input type='text' class='restrAuthor' value='"+ crntadmDispName +"' disabled></td><td><select id='rstphn-"+ indRowAdd +"' class='restrPhoneNmbr'>"+ numbersListItems +"</select></td><td><div id='rstgrp-"+ indRowAdd +"' class='restrGroups'></div></td><td><div id='showGrps-"+ indRowAdd +"' class='showAllGroups'><img src='/" + ctappdir + "/sms_relentless/img/group.svg' style='cursor:pointer' title='Show all groups'></div></td><td><div id='rstusr-"+ indRowAdd +"' class='restrUsers'></div></td><td><div id='showUsr-"+ indRowAdd +"' class='showAllUsers'><img src='/" + ctappdir + "/sms_relentless/img/user.svg' style='cursor:pointer' title='Show all users'></div></td><td><img id='rmRow-"+ indRowAdd +"' class='removeRow' src='/" + ctappdir + "/sms_relentless/img/closewnd.svg' title='Remove this row from the database' style='cursor:pointer;margin:6px 7px 0px 6px;'></td><td><input type='submit' id='rstsave-"+ indRowAdd +"' class='saveRestrictions' value='Save' title='Save Row' /></td></tr>");
606
-			      showLists();
607
-			      saveRestrRow();
608
-			      removeRestrRow();
609
-
610
-			      // Check if the same phone number has been already restricted
611
-			      $("#rstphn-"+ indRowAdd).change(function() {
612
-				 var selectedPhNmbr = $("#rstphn-"+ indRowAdd).val();
613
-				 var allPHoneRestr = $("#phoneNmbrRestr").find("tr").find(".restrPhoneNmbr");
614
-				 var phNmbrChck = 0;
615
-				 allPHoneRestr.each(function() {
616
-				    var slctdphnmbr = ($(this).val())? $(this).val() : $(this).text();
617
-				    if (selectedPhNmbr == slctdphnmbr) { phNmbrChck++; }
618
-				 });
619
-
620
-				 if (phNmbrChck == 2) {
621
-				     showAlert("This phone number is already in the list of restricted phone numbers. Please edit its own row, or choose a different phone number to restrict access to.");
622
-				     $(this).val('');
623
-				     return;
624
-				 }
625
-			      });
626
-			  });
627
-
628
-		     },
629
-		     error: function() {
630
-				showAlert('Error while getting the admin settings! You can check the Nextcloud log to find more details about this issue.');
631
-		     }
632
-		  });
633
-
634
-
635
-
636
-		  // Save admin settings
637
-		  function randomStr(strlength) {
638
-			var fintext = "";
639
-			var keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
640
-			for (var i = 0; i < strlength; i++) {
641
-			     fintext += keyspace.charAt(Math.floor(Math.random() * keyspace.length));
642
-			}
643
-			return fintext;
644
-		  }
645
-
646
-		  $("#generate_tel_rcpt").on("click", function(event) {
647
-
648
-		     var teltokenrec = randomStr(70);
649
-		     var telnyxwhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmstel?telrecparam=') + teltokenrec;
650
-
651
-		     $("#telapi_url_rec").val(telnyxwhurlrec);
652
-		  });
653
-
654
-		  $("#copyToClipboardtel").on("click", function(event) {
655
-		     var $tempEl = $("<input>");
656
-		     $("body").append($tempEl);
657
-		     $tempEl.val($("#telapi_url_rec").val()).select();
658
-		     document.execCommand("Copy");
659
-		     $tempEl.remove();
660
-		     showAlert("The link has been copied to your clipboard!");
661
-		  });
662
-
663
-		  $("#generate_tel_delrcpt").on("click", function(event) {
664
-
665
-		     var teltoken = randomStr(70);
666
-		     var telnyxwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliverytel?teldrparam=') + teltoken;
667
-
668
-		     $("#telapi_url").val(telnyxwhurl);
669
-		  });
670
-
671
-		  $("#generate_nex_rcpt").on("click", function(event) {
672
-
673
-		     var plivotokenrec = randomStr(70);
674
-		     var plivowhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmsnex?plivorecparam=') + plivotokenrec;
675
-
676
-		     $("#nexapi_url_rec").val(plivowhurlrec);
677
-		  });
678
-
679
-		  $("#copyToClipboardnex").on("click", function(event) {
680
-		     var $tempElpl = $("<input>");
681
-		     $("body").append($tempElpl);
682
-		     $tempElpl.val($("#nexapi_url_rec").val()).select();
683
-		     document.execCommand("Copy");
684
-		     $tempElpl.remove();
685
-		     showAlert("The link has been copied to your clipboard!");
686
-		  });
687
-
688
-		  $("#generate_nex_delrcpt").on("click", function(event) {
689
-
690
-		     var plivotoken = randomStr(70);
691
-		     var plivodrwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliverynex?plivodrparam=') + plivotoken;
692
-
693
-		     $("#nexapi_url").val(plivodrwhurl);
694
-		  });
695
-
696
-		  $("#generate_twil_rcpt").on("click", function(event) {
697
-
698
-		     var twiltokenrec = randomStr(35);
699
-		     var twilwhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmstwil?twilrecparam=') + twiltokenrec;
700
-
701
-		     $("#twilapi_url_rec").val(twilwhurlrec);
702
-		  });
703
-
704
-		  $("#copyToClipboardtwil").on("click", function(event) {
705
-		     var $tempElpl = $("<input>");
706
-		     $("body").append($tempElpl);
707
-		     $tempElpl.val($("#twilapi_url_rec").val()).select();
708
-		     document.execCommand("Copy");
709
-		     $tempElpl.remove();
710
-		     showAlert("The link has been copied to your clipboard!");
711
-		  });
712
-
713
-		  $("#generate_twil_delrcpt").on("click", function(event) {
714
-
715
-		     var twiltoken = randomStr(35);
716
-		     var twildrwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliverytwil?twildrparam=') + twiltoken;
717
-
718
-		     $("#twilapi_url").val(twildrwhurl);
719
-		  });
720
-
721
-		  $("#generate_flow_rcpt").on("click", function(event) {
722
-
723
-		     var flowtokenrec = randomStr(70);
724
-		     var flowwhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmsflow?flowrecparam=') + flowtokenrec;
725
-
726
-		     $("#flowapi_url_rec").val(flowwhurlrec);
727
-		  });
728
-
729
-		  $("#copyToClipboardflow").on("click", function(event) {
730
-		     var $tempElpl = $("<input>");
731
-		     $("body").append($tempElpl);
732
-		     $tempElpl.val($("#flowapi_url_rec").val()).select();
733
-		     document.execCommand("Copy");
734
-		     $tempElpl.remove();
735
-		     showAlert("The link has been copied to your clipboard!");
736
-		  });
737
-
738
-		  $("#generate_flow_delrcpt").on("click", function(event) {
739
-
740
-		     var flowtoken = randomStr(70);
741
-		     var flowdrwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliveryflow?flowdrparam=') + flowtoken;
742
-
743
-		     $("#flowapi_url").val(flowdrwhurl);
744
-		  });
745
-
746
-		  // Add group icons
747
-		  $(".srGroupImg").each(function() {
748
-		     $(this).attr("src", "/" + ctappdir + "/sms_relentless/img/group.svg");
749
-		  });
750
-
751
-		  // Add user icons
752
-		  $(".srUserImg").each(function() {
753
-		     $(this).attr("src", "/" + ctappdir + "/sms_relentless/img/user.svg");
754
-		  });
755
-
756
-		  $("#save_admin_settings").on("click", function(event) {
757
-
758
-		    event.preventDefault();
759
-		    OC.msg.startAction('#smsr_save_msg', t('sms_relentless', 'Saved'));
760
-
761
-		    var baseUrlsv = OC.generateUrl('/apps/sms_relentless/user/updateadminsettings');
762
-
763
-		    var showallmsgs = 0;
764
-		    if ($("#showallmessages").is(':checked')) {
765
-			showallmsgs = 1;
766
-		    }
767
-
768
-		    var telsenderinit = $("#tel_sender_name").val();
769
-		    var telsenderproc = telsenderinit.replace(/[^A-Za-z 0-9]/g, '');
770
-
771
-		    var nexsenderinit = $("#nex_sender_name").val();
772
-		    var nexsenderproc = nexsenderinit.replace(/[^A-Za-z 0-9]/g, '');
773
-
774
-		    var twilsenderinit = $("#twil_sender_name").val();
775
-		    var twilsenderproc = twilsenderinit.replace(/[^A-Za-z 0-9]/g, '');
776
-
777
-		    var datatosave = {
778
-				      userId: userid,
779
-				      telapiKey: $("#telapi_key").val(),
780
-				      telPubKey: $("#tel_pub_key").val(),
781
-				      telapiUrlRec: $("#telapi_url_rec").val(),
782
-				      telapiUrl: $("#telapi_url").val(),
783
-				      messagingProfileId: $("#messaging_profile_id").val(),
784
-				      nexapiKey: $("#nexapi_key").val(),
785
-				      nexapiSecret: $("#nexapi_secret").val(),
786
-				      nexapiUrlRec: $("#nexapi_url_rec").val(),
787
-				      nexapiUrl: $("#nexapi_url").val(),
788
-				      twilapiKey: $("#twilapi_key").val(),
789
-				      twilapiSecret: $("#twilapi_secret").val(),
790
-				      twilapiUrlRec: $("#twilapi_url_rec").val(),
791
-				      twilapiUrl: $("#twilapi_url").val(),
792
-				      flowapiKey: $("#flowapi_key").val(),
793
-				      flowapiSecret: $("#flowapi_secret").val(),
794
-				      flowapiUrlRec: $("#flowapi_url_rec").val(),
795
-				      flowapiUrl: $("#flowapi_url").val(),
796
-				      telSenderName: telsenderproc,
797
-				      nexSenderName: nexsenderproc,
798
-				      twilSenderName: twilsenderproc,
799
-				      showAllMessages: showallmsgs
800
-		    };
801
-
802
-
803
-		    $.ajax({
804
-		       method: 'PUT',
805
-		       url: baseUrlsv + '/' + userid,
806
-		       contentType: 'application/json',
807
-		       data: JSON.stringify(datatosave),
808
-		       success: function() {
809
-		       },
810
-		       error: function() {
811
-			    showAlert('Error while attempting to save the settings! You can check the Nextcloud log to find more details about this issue.');
812
-		       }
813
-		    });
814
-
815
-		  });
816
-
817
-		  function showAlert(alertText) {
818
-
819
-		     let alertwnd = "<div id='alertMessage'>";
820
-		     alertwnd += "<a id='closeAlertWnd' title='Close this window'></a>";
821
-		     alertwnd += "<div id='alertTextWrap'>"+ alertText +"</div>";
822
-		     alertwnd += "<input type='submit' id='alertOk' value='OK'>";
823
-		     alertwnd += "</div>";
824
-
825
-		     $("#content").append("<div id='alertMsgOverlay'></div>");
826
-		     $("#content").append(alertwnd);
827
-
828
-		     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
829
-		     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
830
-		     $("#alertMessage").css({ "top" : topDist, "left" : leftDist });
831
-
832
-		     $("#closeAlertWnd").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
833
-		     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
834
-		     $("#alertOk").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
835
-		  }
836
-
837
-		  function confirmAlert(alertText) {
838
-
839
-		     $("#alertMsgOverlay").remove();
840
-		     $("#alertConfMessage").remove();
841
-
842
-		     let alertwndcf = "<div id='alertConfMessage'>";
843
-		     alertwndcf += "<a id='closeAlertWndcf' title='Close this window'></a>";
844
-		     alertwndcf += "<div id='alertTextWrap'>"+ alertText +"</div>";
845
-		     alertwndcf += "<div id='cancelOkWrap'><input type='submit' id='confirmCancel' value='Cancel'>";
846
-		     alertwndcf += "<input type='submit' id='confirmOk' value='OK'></div>";
847
-		     alertwndcf += "</div>";
848
-
849
-		     $("#content").append("<div id='alertMsgOverlay'></div>");
850
-		     $("#content").append(alertwndcf);
851
-
852
-		     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
853
-		     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
854
-		     $("#alertConfMessage").css({ "top" : topDist, "left" : leftDist });
855
-
856
-		     $("#closeAlertWndcf").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
857
-		     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
858
-		  }
859
-
860
-
861
-     },
862
-     error: function(appdirfdb) {
863
-                alert("An error occurred while getting the app's directory. You can check the Nextcloud log to find more details about this issue.");
864
-     }
865
-   });
866
-
867
-});
868 0
deleted file mode 100644
... ...
@@ -1,7073 +0,0 @@
1
-/**
2
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
3
- *
4
- * @author Double Bastion LLC
5
- *
6
- * @license GNU AGPL version 3 or any later version
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
- * License as published by the Free Software Foundation; either
11
- * version 3 of the License, or any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
- *
18
- * You should have received a copy of the GNU Affero General Public
19
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-$(document).ready(function() {
24
-
25
-  var userid = "<?php p($userId); ?>";
26
-  var parseddata = null;
27
-  var sentparseddata = null;
28
-  var groupedparsed = null;
29
-  var messagesperpage = 100;
30
-  var newMsgInterval = 5000;
31
-  var archivedConvNmbr = null;
32
-  var newMsgRcd = 0;
33
-  var intervalRfrSent = 0;
34
-  var intervalNmfr = null;
35
-  var ctappdir = 'apps';
36
-
37
-  // Get the app's directory
38
-  var getappdirurl = OC.generateUrl('/apps/sms_relentless/user/getappdirectory');
39
-
40
-  $.ajax({
41
-     method: 'GET',
42
-     url: getappdirurl + '/' + userid,
43
-     contentType: 'application/json',
44
-     success: function(appdirfdb) {
45
-                ctappdir = appdirfdb;
46
-     },
47
-     error: function() {
48
-                alert("An error occurred while getting the app's directory. You can check the Nextcloud log to find more details about this issue.");
49
-     }
50
-  });
51
-
52
-  // Get the number of messages per page and the time interval for checking for new received messages, from the database
53
-  var getNoPerPageUrl = OC.generateUrl("/apps/sms_relentless/user/getmsgsperpgnewmsgarchnb");
54
-
55
-  $.ajax({
56
-        url: getNoPerPageUrl + '/' + userid,
57
-        method: 'GET',
58
-        success: function(mesperpagedb) {
59
-
60
-                 if (mesperpagedb.msgsperpage) { messagesperpage = mesperpagedb.msgsperpage; }
61
-                 if (mesperpagedb.newmsgcheck) { newMsgInterval = mesperpagedb.newmsgcheck * 1000; }
62
-                 if (mesperpagedb.archconvnb == 0 || mesperpagedb.archconvnb) { archivedConvNmbr = mesperpagedb.archconvnb; }
63
-        },
64
-        error: function() {
65
-                 showAlert("Error while getting the number of messages per page. You can check the Nextcloud log to find more details about this issue!");
66
-        }
67
-  });
68
-
69
-  // Get the 'new received message' indicator from the database
70
-  function checkIfNewMessage() {
71
-
72
-        var getNewMsgInd = OC.generateUrl("/apps/sms_relentless/user/getnewmsgindicator");
73
-
74
-        $.ajax({
75
-              url: getNewMsgInd + '/' + userid,
76
-              method: 'GET',
77
-              success: function(newmsgdb) {
78
-                       newMsgRcd = newmsgdb;
79
-                       if (newMsgRcd == 1) { 
80
-
81
-                           if ($("#listAllMsgsFromTo").is(":visible")) { $('#smstables').empty(); setTimeout(function() { $("#refreshMsgsConvtf").click(); }, 500); }
82
-                           if ($("#listAllMsgsConv").is(":visible")) { $('#smstables').empty(); setTimeout(function() { $("#refreshMsgsConv").click(); }, 500); }
83
-                           if ($("#conversationsTable").is(":visible")) {
84
-
85
-                               var archCvId = '';
86
-                               var actCvId = '';
87
-
88
-                               $(".convsListArch").each(function() { 
89
-		                   if ($(this).css('background-color') === "rgb(241, 224, 239)") {
90
-                                       archCvId = $(this).attr("id");
91
-		                   }
92
-                               });
93
-
94
-		               $(".convsListAct").each(function() {
95
-		                   if ($(this).css('background-color') === "rgb(215, 239, 239)") {
96
-                                       actCvId = $(this).attr("id");
97
-		                   }
98
-		               });
99
-
100
-                               $('#smstables').empty();
101
-                               $("#conversationsshow").click();
102
-                               setTimeout(function() { if (actCvId != '') { document.getElementById(actCvId).click(); } else if (archCvId != '') { document.getElementById(actCvId).click(); } }, 800);
103
-
104
-                           } else {
105
-                               $('#smstables').empty();
106
-                               $("#receivedsmstableshow").click();
107
-                           }
108
-                       }
109
-              },
110
-              error: function() {
111
-                           // showAlert("Error while getting the 'new received message' indicator. You can check the Nextcloud log to find more details about this issue!");
112
-              }
113
-        });
114
-  }
115
-
116
-
117
-  // List received messages
118
-  $("#receivedsmstableshow").on("click", function(event) {
119
-
120
-     $('#smstables').empty();
121
-     clearInterval(intervalNmfr);
122
-
123
-     var getReceivedUrl = OC.generateUrl("/apps/sms_relentless/user/getreceivedtable");
124
-
125
-     $('#smstables').addClass('icon-loading');
126
-
127
-     $.ajax({
128
-          url: getReceivedUrl + '/' + userid,
129
-          method: 'GET',
130
-          contentType: 'application/json',
131
-          success: function(datafdb) {
132
-
133
-                var parseddata = datafdb.datarows;
134
-
135
-                $('#smstables').append("<div id='toptablerec'><div class='topbuttonandpage'><span id='recarrow' title='Show/Hide filters and Delete button'></span></div><div id='paginationrec' class='recpages'>Pages </div></div>");
136
-                $('#smstables').append("<table id='recSmsTable'></table>");
137
-
138
-                $('#recSmsTable').append("<tr id='recfiltersrow'><td class='selectalldvfilter'><button id='clearrecfilters' title='Clear all filters.'></button><button id='deleterecrows' title='Permanently delete the selected row(s) from below from the database.'></button></td><td class='selectalldvfilter'><input type='text' id='dbidtextrec' class='indivfilterrec' title='Enter a database ID number to apply the filter.'><input type='submit' id='databaseidfilter' class='filterbuttonsrec' value='' title='Filter rows by the specified database ID.' /></td><td class='selectalldvfilter'><input type='text' id='useridtextrec' class='indivfilterrec' title='Enter a Nextcloud username to apply the filter.' /><input type='submit' id='useridfilter' class='filterbuttonsrec' value='' title='Filter rows by the specified username.' /></td><td class='selectalldvfilter'><input type='text' id='messageidtextrec' class='indivfilterrec' title='Enter a fragment from a message ID to apply the filter.'  /><input type='submit' id='messageidfilter' class='filterbuttonsrec' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='datetextrec' class='indivfilterrec' title='Enter a fragment of a date to apply the filter.'/><input type='submit' id='datefilter' class='filterbuttonsrec' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='fromtextrec' class='indivfilterrec' title='Enter a fragment of a sender&#146s phone number or alphanumeric sender ID, to apply the filter.' /><input type='submit' id='fromfilter' class='filterbuttonsrec' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='totextrec' class='indivfilterrec' value='' title='Enter a fragment of a recipient&#146s phone number to apply the filter.'  /><input type='submit' id='tofilter' class='filterbuttonsrec' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='messagetextrec' class='indivfilterrec' title='Enter a fragment of a message to apply the filter.' /><input type='submit' id='messagefilter' class='filterbuttonsrec' value='' title='Filter rows by the specified string.'/></td></tr>");
139
-                $('#recSmsTable').append("<tr class='receivedrows' id='recheaderrow'><th id='selectalldv' class='selectsmsdv'><input type='checkbox' id='selectAllChckbx' class ='indivchckbx' title='Select all rows from all pages.' /></th><th title='The database ID of each message.'>ID</th><th>User ID</th><th>Message ID</th><th>Date</th><th>From</th><th>To</th><th>Received Message</th></tr>");
140
-
141
-                $('#recfiltersrow').hide();
142
-
143
-                if (datafdb.showdispnm == 1) {
144
-
145
-                    for (var i = 0; i < parseddata.length; i++) {
146
-
147
-                         if (parseddata[i].author_displayname) {
148
-                             var procrcmessage = "<span class='messageAuthorName'>"+ parseddata[i].author_displayname + ":</span>" + parseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/" + ctappdir + "/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
149
-                         } else {
150
-                             var procrcmessage = parseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/" + ctappdir + "/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
151
-                         }
152
-
153
-                         if (parseddata[i].internal_sender == 0) {
154
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'><div id='addDispName-"+ i +"' style='display:block;margin-right:5px;'><img class='addNameToPhNb' src='/" + ctappdir + "/sms_relentless/img/user-grey.svg' title='Associate a Display Name with this phone number'></div>"+ parseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
155
-                         } else {
156
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'>"+ parseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
157
-                         }
158
-
159
-                         var procrecTo = "<div id='toNmbr-"+ i +"'>"+ parseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
160
-
161
-                         $("#recSmsTable").append("<tr id='singlerow_"+ i +"' class='receivedrowsbody'><td class='selectsmsdv'><input type='checkbox' id='selectspec_"+ i +"' class='indivchckbx' /></td><td class='dbidcolumnrec'>"+ parseddata[i].id +"</td><td class='useridcolrec'>"+ parseddata[i].user_id +"</td><td class='messageidcolrec'>"+ parseddata[i].message_id +"</td><td class='datecolrec'>"+ parseddata[i].date +"</td><td class='fromcolumnrec'>"+ procrecFrom +"</td><td class='tocolrec'>"+ procrecTo +"</td><td class='messagecolumnrec'>"+ procrcmessage +"</td></tr>");
162
-                    }
163
-
164
-                } else {
165
-
166
-                    for (var i = 0; i < parseddata.length; i++) {
167
-
168
-                         var procrcmessage = parseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/" + ctappdir + "/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
169
-
170
-                         if (parseddata[i].internal_sender == 0) {
171
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'><div id='addDispName-"+ i +"' style='display:block;margin-right:5px;'><img class='addNameToPhNb' src='/" + ctappdir + "/sms_relentless/img/user-grey.svg' title='Associate a Display Name with this phone number'></div>"+ parseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
172
-                         } else {
173
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'>"+ parseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
174
-                         }
175
-
176
-                         var procrecTo = "<div id='toNmbr-"+ i +"'>"+ parseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
177
-
178
-                         $("#recSmsTable").append("<tr id='singlerow_"+ i +"' class='receivedrowsbody'><td class='selectsmsdv'><input type='checkbox' id='selectspec_"+ i +"' class='indivchckbx' /></td><td class='dbidcolumnrec'>"+ parseddata[i].id +"</td><td class='useridcolrec'>"+ parseddata[i].user_id +"</td><td class='messageidcolrec'>"+ parseddata[i].message_id +"</td><td class='datecolrec'>"+ parseddata[i].date +"</td><td class='fromcolumnrec'>"+ procrecFrom +"</td><td class='tocolrec'>"+ procrecTo +"</td><td class='messagecolumnrec'>"+ procrcmessage +"</td></tr>");
179
-                    }
180
-                }
181
-
182
-                $('#smstables').append("<div id='totalrecmessages'>Total displayed messages: " + parseddata.length + "</div>");
183
-
184
-                $('#smstables').removeClass('icon-loading');
185
-                $('#recarrow').removeClass('arrowUpCl');
186
-                $('#recarrow').addClass('arrowDownCl');
187
-
188
-                // Show the pop-up window that lists all the messages exchanged between the current 2 phone numbers
189
-                function showRecMsgPerConv(phNumberFrom, phNumberTo) {
190
-
191
-                   let allfrmtomsg = "<div id='listAllMsgsConv'>";
192
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='cursor:grab'></div>";
193
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
194
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages exchanged between <span style='color:#04957b'>"+ phNumberFrom +"</span> and <span style='color:#04957b'>"+ phNumberTo +"</span></div>";
195
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
196
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
197
-                   allfrmtomsg += "<tr class='groupedrowsbody'><td><div id='grpdbynamelst' class='groupedLstNamespn'></div></td><td><div id='loadMoreMsgs' title='Click to load older messages.'>Load more messages</div><div id='loadMoreMsgsusr' title='Click to load older messages.'>Load more messages</div><div id='msgListRowCell' class='groupedLstMsgspn'></div><div id='refreshMsgsWrap'><div id='refreshMsgsConv' title='Refresh list of messages'></div></div><div id='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
198
-                   allfrmtomsg += "</table></div>";
199
-                   allfrmtomsg += "<div id='sendMsgReply'><table id='sendMsgConv'><tr><td><div id='fromPhoneNmbrConv'>From: <select id='selectFromNbConv'></select></div><div id='toPhoneNmbrConv'>To: <span id='toNmbrConv' style='color:#04957b'>"+ phNumberFrom +"</span></div></td></tr>";
200
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS.'></textarea></td></tr></table>";
201
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
202
-                   allfrmtomsg += "<div id='expandWindowRplCtn' title='Expand to send a reply'><img id='expandWindowRpl' src='/" + ctappdir + "/sms_relentless/img/arrowDown.svg'></div>";
203
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;cursor:grab;'></div>";
204
-                   allfrmtomsg += "</div>";
205
-
206
-                   $("#content").append("<div id='recTblOverlay'></div>");
207
-                   $("#content").append(allfrmtomsg);
208
-
209
-                   let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
210
-                   let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
211
-                   $("#listAllMsgsConv").css({ "top" : topDist, "left" : leftDist });
212
-
213
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
214
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
215
-
216
-
217
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
218
-                   $("#expandWindowRpl").unbind("click");
219
-	           $("#expandWindowRpl").click(function() {
220
-
221
-	              if ($(this).attr('src') == '/' + ctappdir + '/sms_relentless/img/arrowDown.svg') {
222
-                          $("#sendMsgReply").css("display", "block");
223
-                          if ($(window).width() > 600) {
224
-                              $("#listAllMsgsConv").css("height", "618px");
225
-                          } else {
226
-                              $("#listAllMsgsConv").css("height", parseInt($(window).height() - 32) + "px");
227
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 304) + "px");
228
-                          }
229
-	                  $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowUp.svg');
230
-                          $(this).attr('title', 'Collapse');
231
-
232
-	              } else {
233
-
234
-                          $("#sendMsgReply").css("display", "none");
235
-                          if ($(window).width() > 600) {
236
-                              $("#listAllMsgsConv").css("height", "490px");
237
-                          } else {
238
-                              $("#listAllMsgsConv").css("height", parseInt($(window).height() - 120) + "px");
239
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 232) + "px");
240
-                          }
241
-                          $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowDown.svg');
242
-                          $(this).attr('title', 'Expand to send a reply');
243
-	              }
244
-	           });
245
-
246
-
247
-                   // Send a message from the 'conversation' window
248
-                   $("#sendMsgConvBtn").click(function() {
249
-
250
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
251
-                      var msgToSend = $("#sendMsgConvText").val();
252
-                      var selectedid = $("#selectFromNbConv").val();
253
-                      var toNumber = $("#toNmbrConv").text();
254
-                      var receiversNumbers = [toNumber];
255
-
256
-		      if (selectedid != '') { 
257
-
258
-			  var sendersplit = selectedid.split(":");
259
-			  var providercap = sendersplit[0];
260
-			  var provsec = sendersplit[1];
261
-
262
-			  if (/[a-zA-Z]/.test(provsec)) {
263
-			      var alphanumcheck = true;
264
-			  } else { var alphanumcheck = false; }
265
-
266
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
267
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
268
-			      var selectedsender = "+" + senderproc;
269
-			      var providerUsed = "telnyx";
270
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
271
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
272
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
273
-			      var providerUsed = "plivo";
274
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
275
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
276
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
277
-			      var selectedsender = "+" + senderproc;
278
-			      var providerUsed = "twilio";
279
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
280
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
281
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
282
-			      var selectedsender = "+" + senderproc;
283
-			      var providerUsed = "flowroute";
284
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
285
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
286
-			      var selectedsender = provsec;
287
-			      var providerUsed = "telnyx";
288
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
289
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
290
-			      var selectedsender = provsec;
291
-			      var providerUsed = "plivo";
292
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
293
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
294
-			      var selectedsender = provsec;
295
-			      var providerUsed = "twilio";
296
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
297
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
298
-			      var selectedsender = provsec;
299
-			      var providerUsed = "flowroute";
300
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
301
-			  }
302
-
303
-                          var uploadedtomms = [];
304
-
305
-	                  if (msgToSend != '') {
306
-
307
-				  $.ajax({
308
-				     url: relbaseUrl + '/' + userid,
309
-				     type: "POST",
310
-				     data: {
311
-				           receiversPhoneNbs: receiversNumbers,
312
-				           fromsender: selectedsender,
313
-				           waitinterval: 1000,
314
-				           sentsmstext: msgToSend,
315
-				           ismms: 0,
316
-				           mmsfiles: uploadedtomms
317
-				         },
318
-				     success: function(displayname) {
319
-
320
-                                           var tzdate = new Date();
321
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
322
-                                           var presDatedb = presDatest.split(".")[0];
323
-                                           var presDatesc = presDatedb.split("T");
324
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
325
-                                           var sentMessageStatus = '';
326
-
327
-                                           if (displayname) {
328
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
329
-                                           } else { var msgToSendproc = msgToSend; }
330
-
331
-                                           $("#msgListRowCell").append("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ selectedsender +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ receiversNumbers[0] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ msgToSendproc +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ presDate +"</div><div class='sentMssgStatus'>"+ sentMessageStatus +"</div></div>");
332
-
333
-                                           // Scroll down to the bottom of the window
334
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
335
-
336
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
337
-				     },
338
-				     error: function() {
339
-                                           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
340
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
341
-				     }
342
-				  });
343
-			  } else {
344
-                                  showAlert("Please enter a message in the text box!");
345
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
346
-			  }
347
-		      } else {
348
-                              showAlert("Please choose a Sender ID from the 'From' drop-down list!");
349
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
350
-		      }
351
-                   });
352
-
353
-
354
-	           // Make the window draggable
355
-	           function makeMgrWndDraggable(e) {
356
-
357
-			   window.pmdragging = {};
358
-			   pmdragging.pageX0 = e.pageX;
359
-			   pmdragging.pageY0 = e.pageY;
360
-			   pmdragging.elem = $("#listAllMsgsConv");
361
-			   pmdragging.offset0 = $("#listAllMsgsConv").offset();
362
-
363
-			   function handle_dragging(e) {
364
-			       let left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
365
-			       let top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
366
-			       $(pmdragging.elem).offset({top: top, left: left});
367
-			   }
368
-
369
-			   function handle_mouseup(e) {
370
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
371
-			   }
372
-
373
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
374
-	           }
375
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
376
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
377
-
378
-
379
-                   // Append the available phone numbers to the From drop-down list
380
-                   var availPhoneNmbrs = [];
381
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
382
-                      var crtphnmbr = $(this).attr("value");
383
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
384
-                   });
385
-
386
-                   if (availPhoneNmbrs.length > 0) {
387
-                       var avphopt = "";
388
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
389
-                            if (availPhoneNmbrs[d].indexOf(phNumberTo) === -1) {
390
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
391
-                            } else {
392
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"' selected>"+ availPhoneNmbrs[d] +"</option>";
393
-                            }
394
-                       }
395
-                       $("#selectFromNbConv").append(avphopt);
396
-
397
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
398
-
399
-
400
-                   // Get the messages exchanged between the current 2 phone numbers, from the database
401
-                   function getMsgsForNumbers(phNumberFrom, phNumberTo) {
402
-
403
-			   let getGrpConvUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedforreply");
404
-
405
-			   $('#listAllMsgsConv').addClass('icon-loading');
406
-
407
-			   let totalPhNmbrs = 0;
408
-
409
-			   $.ajax({
410
-				  method: 'POST',
411
-				  url: getGrpConvUrl + '/' + userid,
412
-				  contentType: 'application/json',
413
-		                  data: JSON.stringify({ "phoneNmbrFrom": phNumberFrom, "phoneNmbrTo": phNumberTo }),
414
-				  success: function(groupedperconv) {
415
-
416
-					     $('#listAllMsgsConv').removeClass('icon-loading');
417
-
418
-					     let fromtoNmbrsData = [];
419
-
420
-					     for (let i = 0; i < groupedperconv.length; i++) {
421
-
422
-						     if (groupedperconv[i].author_displayname) {
423
-							 var authordnm = groupedperconv[i].author_displayname;
424
-						     } else { 
425
-							 var authordnm = '';
426
-						     }
427
-
428
-						     var sentfromnmbrarr = groupedperconv[i].from.split(": ");
429
-						     if (sentfromnmbrarr[1]) {
430
-					                 var groupednbfrom = sentfromnmbrarr[1];
431
-                                                     } else {
432
-					                 var groupednbfrom = sentfromnmbrarr[0];
433
-                                                     }
434
-
435
-						     var modmessagerec = '';
436
-						     if (groupedperconv[i].author_displayname) {
437
-							 modmessagerec = "<span class='msgAuthorNameGrp'>"+ groupedperconv[i].author_displayname + ":</span>" + groupedperconv[i].message;
438
-						     } else {
439
-					                 modmessagerec = groupedperconv[i].message;
440
-		                                     }
441
-
442
-						     if (groupedperconv[i].to.indexOf(": ") > -1) {
443
-						         var groupednmbrtopre = groupedperconv[i].to.split(": ");
444
-						         var groupednmbrto = groupednmbrtopre[1];
445
-						     } else { 
446
-						         var groupednmbrto = groupedperconv[i].to;
447
-						     }
448
-
449
-						     fromtoNmbrsData.push({
450
-						               'author_displayname': authordnm,
451
-						               'from': groupednbfrom,
452
-						               'to': groupednmbrto,
453
-						               'message': modmessagerec,
454
-						               'date': groupedperconv[i].date,
455
-						               'status': groupedperconv[i].deliveryreceipt,
456
-						               'table': groupedperconv[i].table
457
-						     });
458
-					     }
459
-
460
-
461
-					     // Remove the duplicates
462
-					     let noDupMsgData = [];
463
-					     $.each(fromtoNmbrsData, function(i, e) {
464
-						    let matchingData = $.grep(noDupMsgData, function(item) {
465
-						            return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
466
-						    });
467
-						    if (matchingData.length === 0) {
468
-							noDupMsgData.push(e);
469
-						    }
470
-					     });
471
-
472
-					     let messagesPerNmbr = {};
473
-					     let msgsNamesPerNmbr = {};
474
-					     let msgsNmbrsNames = {};
475
-
476
-					     let displayNamesarr = [];
477
-					     let convData = [];
478
-
479
-					     for (let n = 0; n < noDupMsgData.length; n++) {
480
-
481
-					          if (noDupMsgData[n]['from'] == phNumberFrom && noDupMsgData[n]['table'] == 'sent') {
482
-
483
-					              convData.push({
484
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
485
-					                             'message': noDupMsgData[n]['message'],
486
-					                             'from': noDupMsgData[n]['from'],
487
-					                             'to': noDupMsgData[n]['to'],
488
-					                             'date': noDupMsgData[n]['date'],
489
-					                             'direction': 'sent_from',
490
-					                             'status': noDupMsgData[n]['status'],
491
-					                             'table': noDupMsgData[n]['table']
492
-					              });
493
-
494
-					          } else if (noDupMsgData[n]['to'] == phNumberFrom && noDupMsgData[n]['table'] == 'sent') {
495
-
496
-					              convData.push({
497
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
498
-					                             'message': noDupMsgData[n]['message'],
499
-					                             'from': noDupMsgData[n]['from'],
500
-					                             'to': noDupMsgData[n]['to'],
501
-					                             'date': noDupMsgData[n]['date'],
502
-					                             'direction': 'sent_to',
503
-					                             'status': noDupMsgData[n]['status'],
504
-					                             'table': noDupMsgData[n]['table']
505
-					              });
506
-
507
-
508
-					          } else if (noDupMsgData[n]['from'] == phNumberFrom && noDupMsgData[n]['table'] == 'received') {
509
-
510
-					              convData.push({
511
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
512
-					                             'message': noDupMsgData[n]['message'],
513
-					                             'from': noDupMsgData[n]['from'],
514
-					                             'to': noDupMsgData[n]['to'],
515
-					                             'date': noDupMsgData[n]['date'],
516
-					                             'direction': 'received_from',
517
-					                             'status': noDupMsgData[n]['status'],
518
-					                             'table': noDupMsgData[n]['table']
519
-					              });
520
-
521
-					          } else if (noDupMsgData[n]['to'] == phNumberFrom && noDupMsgData[n]['table'] == 'received') {
522
-
523
-					              convData.push({
524
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
525
-					                             'message': noDupMsgData[n]['message'],
526
-					                             'from': noDupMsgData[n]['from'],
527
-					                             'to': noDupMsgData[n]['to'],
528
-					                             'date': noDupMsgData[n]['date'],
529
-					                             'direction': 'received_on',
530
-					                             'status': noDupMsgData[n]['status'],
531
-					                             'table': noDupMsgData[n]['table']
532
-					              });
533
-					          }
534
-					     }
535
-
536
-					     // Sort messages by date
537
-					     convData.sort(function(a, b) {
538
-                                                return new Date(b.date) - new Date(a.date);
539
-					     });
540
-
541
-					     // Collect the display names of the users that sent messages from the current numbers
542
-					     let selectedNames = [];
543
-					     let displayNames = '';
544
-					     for (let v = 0; v < convData.length; v++) {
545
-					          if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
546
-					              selectedNames.push(convData[v]['author_displayname']);
547
-					              displayNames += "<div id='diplNm_"+ phNumberFrom +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
548
-					          }
549
-					     }
550
-					     displayNames += "<div id='diplNmAllMsgcv' class='dispNameListAll' title='Show all the messages exchanged between the current 2 phone numbers.'>All messages</div>";
551
-
552
-					     // Store the display names for the current numbers, to be able to see them later
553
-					     let ctPhNumber = phNumberFrom;
554
-					     msgsNamesPerNmbr[ctPhNumber] = displayNames;
555
-
556
-					     // Store the messages sent by each user, to be able to see them later when clicking on the user's name
557
-					     for (let h = 0; h < selectedNames.length; h++) {
558
-
559
-					          let rowMessageArrpn = [];
560
-
561
-					          for (let b = 0; b < convData.length; b++) {
562
-
563
-					               if (selectedNames[h] == convData[b]['author_displayname']) {
564
-
565
-							   if (convData[b]['direction'] == 'sent_from') {
566
-                                                               if (convData[b]['status']) {
567
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
568
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
569
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
570
-                                                                       } else {
571
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
572
-                                                                       }
573
-							           } else {
574
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
575
-							           }
576
-							       } else {
577
-							           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
578
-                                                               }
579
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
580
-							   } else if (convData[b]['direction'] == 'sent_to') {
581
-                                                               if (convData[b]['status']) {
582
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
583
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
584
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
585
-                                                                       } else {
586
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
587
-                                                                       }
588
-							           } else {
589
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
590
-							           }
591
-                                                               } else {
592
-                                                                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
593
-                                                               }
594
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
595
-							   } else if (convData[b]['direction'] == 'received_from') {
596
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
597
-							   } else if (convData[b]['direction'] == 'received_on') {
598
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
599
-					                   }
600
-					               }
601
-					          }
602
-					          let crtNmber = phNumberFrom;
603
-					          let crtName = selectedNames[h];
604
-					          msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
605
-		                                  msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
606
-					     }
607
-
608
-		                             // The number of messages to be loaded by default
609
-		                             let nmbTblDefault = 50;
610
-
611
-		                             // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
612
-		                             if (convData.length > nmbTblDefault) {
613
-		                                 $("#loadMoreMsgs").css("display", "block");
614
-		                                 var nmbToBeLoaded = nmbTblDefault;
615
-		                             } else { var nmbToBeLoaded = convData.length; }
616
-
617
-					     let rowMessageArr = [];
618
-
619
-					     for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
620
-
621
-					          if (convData[m]['direction'] == 'sent_from') {
622
-					              if (convData[m]['status']) {
623
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
624
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
625
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
626
-                                                              } else {
627
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
628
-                                                              }
629
-						          } else {
630
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
631
-						          }
632
-					              } else {
633
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
634
-					              }
635
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
636
-
637
-					          } else if (convData[m]['direction'] == 'sent_to') {
638
-                                                      if (convData[m]['status']) {
639
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
640
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
641
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
642
-                                                              } else {
643
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
644
-                                                              }
645
-						          } else {
646
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
647
-						          }
648
-					              } else {
649
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
650
-					              }
651
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
652
-
653
-					          } else if (convData[m]['direction'] == 'received_from') {
654
-
655
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
656
-
657
-					          } else if (convData[m]['direction'] == 'received_on') {
658
-
659
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
660
-					          }
661
-					     }
662
-
663
-					     let convDataPerNmbr = rowMessageArr.join("");
664
-		                             $("#grpdbynamelst").empty();
665
-		                             $("#grpdbynamelst").append(displayNames);
666
-		                             $("#msgListRowCell").empty();
667
-		                             $("#msgListRowCell").append(convDataPerNmbr);
668
-
669
-					     // Store the messages for the current From number, to be able to see them later
670
-					     let rowMessageArrcpt = [];
671
-					     for (let m = 0; m < convData.length; m++) {
672
-
673
-					          if (convData[m]['direction'] == 'sent_from') {
674
-					              if (convData[m]['status']) {
675
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
676
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
677
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
678
-                                                              } else {
679
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
680
-                                                              }
681
-						          } else {
682
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
683
-						          }
684
-					              } else {
685
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
686
-					              }
687
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
688
-
689
-					          } else if (convData[m]['direction'] == 'sent_to') {
690
-					              if (convData[m]['status']) {
691
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
692
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
693
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
694
-                                                              } else {
695
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
696
-                                                              }
697
-						          } else {
698
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
699
-						          }
700
-					              } else {
701
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
702
-					              }
703
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
704
-
705
-					          } else if (convData[m]['direction'] == 'received_from') {
706
-
707
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
708
-
709
-					          } else if (convData[m]['direction'] == 'received_on') {
710
-
711
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
712
-					          }
713
-					     }
714
-
715
-					     messagesPerNmbr[phNumberFrom] = rowMessageArrcpt;
716
-
717
-		                             // Scroll down to the bottom of the window
718
-	                                     $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
719
-
720
-		                             // Load more messages
721
-		                             let clickNmb = 0;
722
-		                             $("#loadMoreMsgs").click(function() {
723
-
724
-		                                 clickNmb++;
725
-
726
-		                                 var crefnb = (clickNmb + 1) * nmbToBeLoaded;
727
-
728
-		                                 if (crefnb > convData.length) {
729
-		                                     var nmbmsg = convData.length - 1;
730
-		                                     $("#loadMoreMsgs").css("display", "none");
731
-		                                 } else { 
732
-		                                     var nmbmsg = crefnb - 1;
733
-		                                 }
734
-
735
-		                                 let rowMessageArrAdd = [];
736
-
737
-		                                 for (let m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
738
-
739
-					              if (convData[m]['direction'] == 'sent_from') {
740
-					                  if (convData[m]['status']) {
741
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
742
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
743
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
744
-                                                                  } else {
745
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
746
-                                                                  }
747
-						              } else {
748
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
749
-						              }
750
-					                  } else {
751
-					                      let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
752
-					                  }    
753
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
754
-
755
-					              } else if (convData[m]['direction'] == 'sent_to') {
756
-					                  if (convData[m]['status']) {
757
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
758
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
759
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
760
-                                                                  } else {
761
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
762
-                                                                  }
763
-						              } else {
764
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
765
-						              }
766
-					                  } else {
767
-					                      let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
768
-					                  }
769
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
770
-
771
-					              } else if (convData[m]['direction'] == 'received_from') {
772
-
773
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
774
-
775
-					              } else if (convData[m]['direction'] == 'received_on') {
776
-
777
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
778
-					              }
779
-		                                 }
780
-
781
-					         let convDataPerNmbrad = rowMessageArrAdd.join("");
782
-
783
-		                                 let scrlheight = $("#msgListRowCell").height();
784
-		                                 $("#msgListRowCell").prepend(convDataPerNmbrad);
785
-
786
-		                                 $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
787
-
788
-		                             });
789
-
790
-
791
-					     // Show the messages sent by each user whose name is clicked
792
-					     $('[id*="diplNm_"]').click(function() {
793
-
794
-					         let crntNmbr = $(this).attr("id").split("_")[1];
795
-					         let crntDisName = $(this).attr("name");                               
796
-		                                 $("#loadMoreMsgs").css("display", "none");
797
-
798
-		                                 let convDataprn = [];
799
-		                                 $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
800
-		                                        convDataprn.push(item);
801
-		                                 });
802
-
803
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
804
-		                                 if (convDataprn.length > nmbTblDefault) {
805
-		                                     $("#loadMoreMsgsusr").css("display", "block");
806
-		                                     let nmbToBeLoaded = nmbTblDefault;
807
-		                                 } else {
808
-		                                     $("#loadMoreMsgsusr").css("display", "none");
809
-		                                     let nmbToBeLoaded = convDataprn.length;
810
-		                                 }
811
-
812
-					         let rowMessageArrprnst = [];
813
-
814
-					         for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
815
-		                                      rowMessageArrprnst.push(convDataprn[n]);
816
-					         }
817
-
818
-					         let convDataPerNmbrprnst = rowMessageArrprnst.join("");
819
-
820
-		                                 $("#msgListRowCell").empty();
821
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
822
-
823
-		                                 // Scroll down to the bottom of the window
824
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
825
-
826
-		                                 // Load more messages
827
-		                                 let clckNb = 0;
828
-		                                 $("#loadMoreMsgsusr").unbind("click");
829
-		                                 $("#loadMoreMsgsusr").click(function() {
830
-
831
-		                                     clckNb++;
832
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
833
-
834
-		                                     $("#loadMoreMsgs").css("display", "none");
835
-
836
-		                                     if (crefnb > convDataprn.length) {
837
-		                                         var nmbmsg = convDataprn.length - 1;
838
-		                                         $("#loadMoreMsgsusr").css("display", "none");
839
-		                                     } else { 
840
-		                                         var nmbmsg = crefnb - 1;
841
-		                                         $("#loadMoreMsgsusr").css("display", "block");
842
-		                                     }
843
-
844
-		                                     var rowMessageArrAddst = [];
845
-
846
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
847
-
848
-		                                          rowMessageArrAddst.push(convDataprn[q]);
849
-		                                     }
850
-
851
-					             var convDataPerNmbradst = rowMessageArrAddst.join("");
852
-
853
-		                                     var scrlheight = $("#msgListRowCell").height();
854
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
855
-
856
-//		                                     $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
857
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
858
-		                                 });
859
-
860
-
861
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
862
-					         $("#diplNmAllMsgcv").css("color", "#04957b");
863
-					         $(this).css("color", "#1b8efe");
864
-					     });
865
-
866
-
867
-					     // Show again all the messages exchanged between the current two phone numbers
868
-					     $("#diplNmAllMsgcv").click(function() {
869
-
870
-		                                 $("#loadMoreMsgsusr").css("display", "none");
871
-
872
-		                                 let convDataprn = [];
873
-		                                 $.each(messagesPerNmbr[phNumberFrom], function(index, item) {
874
-		                                        convDataprn.push(item);
875
-		                                 });
876
-
877
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
878
-		                                 if (convDataprn.length > nmbTblDefault) {
879
-		                                     $("#loadMoreMsgs").css("display", "block");
880
-		                                     let nmbToBeLoaded = nmbTblDefault;
881
-		                                 } else {
882
-		                                     $("#loadMoreMsgs").css("display", "none");
883
-		                                     let nmbToBeLoaded = convDataprn.length;
884
-		                                 }
885
-
886
-					         let rowMessageArrprnst = [];
887
-
888
-					         for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
889
-		                                      rowMessageArrprnst.push(convDataprn[n]);
890
-					         }
891
-
892
-					         let convDataPerNmbrprnst = rowMessageArrprnst.join("");
893
-
894
-		                                 $("#msgListRowCell").empty();
895
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
896
-
897
-		                                 // Scroll down to the bottom of the window
898
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
899
-
900
-
901
-		                                 // Load more messages
902
-		                                 let clckNb = 0;
903
-		                                 $("#loadMoreMsgs").unbind("click");
904
-		                                 $("#loadMoreMsgs").click(function() {
905
-
906
-		                                     clckNb++;
907
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
908
-
909
-		                                     $("#loadMoreMsgsusr").css("display", "none");
910
-
911
-		                                     if (crefnb > convDataprn.length) {
912
-		                                         var nmbmsg = convDataprn.length - 1;
913
-		                                         $("#loadMoreMsgs").css("display", "none");
914
-		                                     } else {
915
-		                                         var nmbmsg = crefnb - 1;
916
-		                                         $("#loadMoreMsgs").css("display", "block");
917
-		                                     }
918
-
919
-		                                     let rowMessageArrAddst = [];
920
-
921
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
922
-
923
-		                                          rowMessageArrAddst.push(convDataprn[q]);
924
-		                                     }
925
-
926
-					             let convDataPerNmbradst = rowMessageArrAddst.join("");
927
-
928
-		                                     let scrlheight = $("#msgListRowCell").height();
929
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
930
-
931
-//		                                     $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
932
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
933
-		                                 });
934
-
935
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
936
-					         $("#diplNmAllMsgcv").css("color", "#04957b");
937
-					         $(this).css("color", "#04c6a4");
938
-
939
-					     });
940
-
941
-
942
-					     // Show the scroll-up arrow
943
-					     $("#frmMsgLstWrap").scroll(function() {
944
-						if ($(this).scrollTop() > 900) {
945
-						      $('#upArrowSmall').fadeIn();
946
-						} else {
947
-						      $('#upArrowSmall').fadeOut();
948
-						}
949
-					     });
950
-
951
-					     $("#upArrowSmall").unbind("click");
952
-					     $("#upArrowSmall").click(function() {
953
-						$("#frmMsgLstWrap").animate({scrollTop : 0},400);
954
-					     });
955
-
956
-
957
-					     // Download MMS files when clicking on their URLs
958
-					     $('[id^="mmsTblUrl-"]').on('click', function(evt) {
959
-
960
-					        var clckedUrl = $(this).text();
961
-					        var flNamearr = clckedUrl.split("/");
962
-					        var flName = flNamearr.reverse()[0];
963
-
964
-					        confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
965
-
966
-					        $("#confirmOk").click(function() {
967
-
968
-					           $("#alertMsgOverlay").remove();
969
-					           $("#alertConfMessage").remove();
970
-
971
-					           var mmsLink = document.createElement("a");
972
-					           mmsLink.setAttribute('href', clckedUrl);
973
-					           mmsLink.setAttribute('download', flName);
974
-                                                   mmsLink.setAttribute('target', '_blank');
975
-					           document.body.appendChild(mmsLink);
976
-					           mmsLink.click();
977
-					           mmsLink.remove();
978
-					        });
979
-
980
-					        $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
981
-					     });
982
-
983
-				  },
984
-				  error: function() {
985
-		                             showAlert("Error while attempting to get message data from the database!");
986
-					     $('#listAllMsgsConv').removeClass('icon-loading');
987
-				  }
988
-			   });
989
-
990
-                   }
991
-
992
-                   getMsgsForNumbers(phNumberFrom, phNumberTo);
993
-
994
-                   $("#refreshMsgsConv").click(function() { getMsgsForNumbers(phNumberFrom, phNumberTo); setTimeout(function() { $("#diplNmAllMsgcv").click(); }, 1000); });
995
-                }
996
-
997
-                $('[id^="showMsgConv-"]').click(function() {
998
-
999
-                   let ctrwnmbr = $(this).attr("id").replace("showMsgConv-", "");
1000
-                   let phNumberFrom = $("#frmNmbr-"+ ctrwnmbr).text();
1001
-                   let phNumberTo = $("#toNmbr-"+ ctrwnmbr).text().split(": ")[1];
1002
-
1003
-                   showRecMsgPerConv(phNumberFrom, phNumberTo);
1004
-                });
1005
-
1006
-
1007
-                // Show the pop-up window that lists all the messages sent/received to/from a phone number
1008
-                function showMsgPerNmbr(clckPhNumber) {
1009
-
1010
-                   var allfrmtomsg = "<div id='listAllMsgsFromTo'>";
1011
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='cursor:grab'></div>";
1012
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
1013
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages sent/received to/from  <span style='color:#04957b'>"+ clckPhNumber +"</span></div>";
1014
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
1015
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
1016
-                   allfrmtomsg += "<tr class='groupedrowsbody'><td><div id='grpdbynamelst' class='groupedLstNamespn'></div></td><td><div id='loadMoreMsgs' title='Click to load older messages.'>Load more messages</div><div id='loadMoreMsgsusr' title='Click to load older messages.'>Load more messages</div><div id='msgListRowCell' class='groupedLstMsgspn'></div><div id='refreshMsgsWraptf'><div id='refreshMsgsConvtf' title='Refresh list of messages'></div></div><div id='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
1017
-                   allfrmtomsg += "</table></div>";
1018
-                   allfrmtomsg += "<div id='sendMsgReply'><table id='sendMsgConv'><tr><td><div id='fromPhoneNmbrConv'>From: <select id='selectFromNbConv'></select></div><div id='toPhoneNmbrConv'>To: <span id='toNmbrConv' style='color:#04957b'>"+ clckPhNumber +"</span></div></td></tr>";
1019
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS.'></textarea></td></tr></table>";
1020
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
1021
-                   allfrmtomsg += "<div id='expandWindowRplCtn' title='Expand to send a message'><img id='expandWindowRpl' src='/" + ctappdir + "/sms_relentless/img/arrowDown.svg'></div>";
1022
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;cursor:grab'></div>";
1023
-                   allfrmtomsg += "</div>";
1024
-
1025
-                   $("#content").append("<div id='recTblOverlay'></div>");
1026
-                   $("#content").append(allfrmtomsg);
1027
-
1028
-                   var topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
1029
-                   var leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
1030
-                   $("#listAllMsgsFromTo").css({ "top" : topDist, "left" : leftDist });
1031
-
1032
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
1033
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
1034
-
1035
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
1036
-                   $("#expandWindowRpl").unbind("click");
1037
-	           $("#expandWindowRpl").click(function() {
1038
-
1039
-	              if ($(this).attr('src') == '/' + ctappdir + '/sms_relentless/img/arrowDown.svg') {
1040
-                          $("#sendMsgReply").css("display", "block");
1041
-                          if ($(window).width() > 600) {
1042
-                              $("#listAllMsgsFromTo").css("height", "618px");
1043
-                          } else {
1044
-                              $("#listAllMsgsFromTo").css("height", parseInt($(window).height() - 32) + "px");
1045
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 304) + "px");
1046
-                          }
1047
-	                  $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowUp.svg');
1048
-                          $(this).attr('title', 'Collapse');
1049
-
1050
-	              } else {
1051
-
1052
-                          $("#sendMsgReply").css("display", "none");
1053
-                          if ($(window).width() > 600) {
1054
-                              $("#listAllMsgsFromTo").css("height", "490px");
1055
-                          } else {
1056
-                              $("#listAllMsgsFromTo").css("height", parseInt($(window).height() - 120) + "px");
1057
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 232) + "px");
1058
-                          }
1059
-                          $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowDown.svg');
1060
-                          $(this).attr('title', 'Expand to send a reply');
1061
-	              }
1062
-	           });
1063
-
1064
-
1065
-                   // Send a message from the 'conversation' window
1066
-                   $("#sendMsgConvBtn").click(function() {
1067
-
1068
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
1069
-                      var msgToSend = $("#sendMsgConvText").val();
1070
-                      var selectedid = $("#selectFromNbConv").val();
1071
-                      var toNumber = $("#toNmbrConv").text();
1072
-                      var receiversNumbers = [toNumber];
1073
-
1074
-		      if (selectedid != '') { 
1075
-
1076
-			  var sendersplit = selectedid.split(":");
1077
-			  var providercap = sendersplit[0];
1078
-			  var provsec = sendersplit[1];
1079
-
1080
-			  if (/[a-zA-Z]/.test(provsec)) {
1081
-			      var alphanumcheck = true;
1082
-			  } else { var alphanumcheck = false; }
1083
-
1084
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
1085
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
1086
-			      var selectedsender = "+" + senderproc;
1087
-			      var providerUsed = "telnyx";
1088
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
1089
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
1090
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
1091
-			      var providerUsed = "plivo";
1092
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
1093
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
1094
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
1095
-			      var selectedsender = "+" + senderproc;
1096
-			      var providerUsed = "twilio";
1097
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
1098
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
1099
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
1100
-			      var selectedsender = "+" + senderproc;
1101
-			      var providerUsed = "flowroute";
1102
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
1103
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
1104
-			      var selectedsender = provsec;
1105
-			      var providerUsed = "telnyx";
1106
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
1107
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
1108
-			      var selectedsender = provsec;
1109
-			      var providerUsed = "plivo";
1110
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
1111
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
1112
-			      var selectedsender = provsec;
1113
-			      var providerUsed = "twilio";
1114
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
1115
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
1116
-			      var selectedsender = provsec;
1117
-			      var providerUsed = "flowroute";
1118
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
1119
-			  }
1120
-
1121
-                          var uploadedtomms = [];
1122
-
1123
-	                  if (msgToSend != '') {
1124
-
1125
-				  $.ajax({
1126
-				     url: relbaseUrl + '/' + userid,
1127
-				     type: "POST",
1128
-				     data: {
1129
-				           receiversPhoneNbs: receiversNumbers,
1130
-				           fromsender: selectedsender,
1131
-				           waitinterval: 1000,
1132
-				           sentsmstext: msgToSend,
1133
-				           ismms: 0,
1134
-				           mmsfiles: uploadedtomms
1135
-				         },
1136
-				     success: function(displayname) {
1137
-
1138
-                                           var tzdate = new Date();
1139
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
1140
-                                           var presDatedb = presDatest.split(".")[0];
1141
-                                           var presDatesc = presDatedb.split("T");
1142
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
1143
-                                           var sentMessageStatus = '';
1144
-
1145
-                                           if (displayname) {
1146
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
1147
-                                           } else { var msgToSendproc = msgToSend; }
1148
-
1149
-                                           $("#msgListRowCell").append("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ selectedsender +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ receiversNumbers[0] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ msgToSendproc +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ presDate +"</div><div class='sentMssgStatus'>"+ sentMessageStatus +"</div></div>");
1150
-
1151
-                                           // Scroll down to the bottom of the window
1152
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
1153
-
1154
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
1155
-				     },
1156
-				     error: function() {
1157
-                                           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
1158
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
1159
-				     }
1160
-				  });
1161
-			  } else {
1162
-                                  showAlert("Please enter a message in the text box!");
1163
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
1164
-			  }
1165
-		      } else {
1166
-                              showAlert("Please choose a Sender ID from the 'From' drop-down list!");
1167
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
1168
-		      }
1169
-
1170
-                   });
1171
-
1172
-
1173
-	           // Make the window draggable
1174
-	           function makeMgrWndDraggable(e) {
1175
-
1176
-			   window.pmdragging = {};
1177
-			   pmdragging.pageX0 = e.pageX;
1178
-			   pmdragging.pageY0 = e.pageY;
1179
-			   pmdragging.elem = $("#listAllMsgsFromTo");
1180
-			   pmdragging.offset0 = $("#listAllMsgsFromTo").offset();
1181
-
1182
-			   function handle_dragging(e) {
1183
-			       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
1184
-			       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
1185
-			       $(pmdragging.elem).offset({top: top, left: left});
1186
-			   }
1187
-
1188
-			   function handle_mouseup(e) {
1189
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
1190
-			   }
1191
-
1192
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
1193
-	           }
1194
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
1195
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
1196
-
1197
-
1198
-                   // Append the available phone numbers to the From drop-down list
1199
-                   var availPhoneNmbrs = [];
1200
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
1201
-                      var crtphnmbr = $(this).attr("value");
1202
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
1203
-                   });
1204
-
1205
-                   if (availPhoneNmbrs.length > 0) {
1206
-                       var avphopt = "";
1207
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
1208
-                            avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
1209
-                       }
1210
-                       $("#selectFromNbConv").append(avphopt);
1211
-
1212
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
1213
-
1214
-
1215
-                   // Get the sent/received messages for the current phone number, from the database
1216
-                   function getMsgsPerNmbr(clckPhNumber) {
1217
-
1218
-			   var getGroupedPnUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedpernumber");
1219
-
1220
-			   $('#listAllMsgsFromTo').addClass('icon-loading');
1221
-			   var totalPhNmbrs = 0;
1222
-
1223
-			   $.ajax({
1224
-				  method: 'POST',
1225
-				  url: getGroupedPnUrl + '/' + userid,
1226
-				  contentType: 'application/json',
1227
-		                  data: JSON.stringify({ "phoneNumber": clckPhNumber }),
1228
-				  success: function(groupedpernb) {
1229
-
1230
-					     $('#listAllMsgsFromTo').removeClass('icon-loading');
1231
-
1232
-					     var fromtoNmbrsData = [];
1233
-
1234
-					     for (var i = 0; i < groupedpernb.length; i++) {
1235
-
1236
-						     if (groupedpernb[i].author_displayname) {
1237
-							 var authordnm = groupedpernb[i].author_displayname;
1238
-						     } else { 
1239
-							 var authordnm = '';
1240
-						     }
1241
-
1242
-						     var sentfromnmbrarr = groupedpernb[i].from.split(": ");
1243
-						     if (sentfromnmbrarr[1]) {
1244
-							 var groupednbfrom = sentfromnmbrarr[1];
1245
-						     } else {
1246
-							 var groupednbfrom = sentfromnmbrarr[0];
1247
-						     }
1248
-
1249
-						     var modmessagerec = '';
1250
-						     if (groupedpernb[i].author_displayname) {
1251
-							 modmessagerec = "<span class='msgAuthorNameGrp'>"+ groupedpernb[i].author_displayname + ":</span>" + groupedpernb[i].message;
1252
-						     } else {
1253
-					                 modmessagerec = groupedpernb[i].message;
1254
-		                                     }
1255
-
1256
-						     if (groupedpernb[i].to.indexOf(": ") > -1) {
1257
-						         var groupednmbrtopre = groupedpernb[i].to.split(": ");
1258
-						         var groupednmbrto = groupednmbrtopre[1];
1259
-						     } else { 
1260
-						         var groupednmbrto = groupedpernb[i].to;
1261
-						     }
1262
-
1263
-						     fromtoNmbrsData.push({
1264
-						               'author_displayname': authordnm,
1265
-						               'from': groupednbfrom,
1266
-						               'to': groupednmbrto,
1267
-						               'message': modmessagerec,
1268
-						               'date': groupedpernb[i].date,
1269
-						               'status': groupedpernb[i].deliveryreceipt,
1270
-						               'table': groupedpernb[i].table
1271
-						     });
1272
-					     }
1273
-
1274
-
1275
-					     // Remove the duplicates
1276
-					     var noDupMsgData = [];
1277
-					     $.each(fromtoNmbrsData, function(i, e) {
1278
-						    var matchingData = $.grep(noDupMsgData, function(item) {
1279
-						            return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
1280
-						    });
1281
-						    if (matchingData.length === 0) {
1282
-							noDupMsgData.push(e);
1283
-						    }
1284
-					     });
1285
-
1286
-					     var messagesPerNmbr = {};
1287
-					     var msgsNamesPerNmbr = {};
1288
-					     var msgsNmbrsNames = {};
1289
-
1290
-					     var displayNamesarr = [];
1291
-					     var convData = [];
1292
-
1293
-					     for (var n = 0; n < noDupMsgData.length; n++) {
1294
-
1295
-					          if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
1296
-
1297
-					              convData.push({
1298
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
1299
-					                             'message': noDupMsgData[n]['message'],
1300
-					                             'from': noDupMsgData[n]['from'],
1301
-					                             'to': noDupMsgData[n]['to'],
1302
-					                             'date': noDupMsgData[n]['date'],
1303
-					                             'direction': 'sent_from',
1304
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
1305
-					                             'table': noDupMsgData[n]['table']
1306
-					              });
1307
-
1308
-					          } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
1309
-
1310
-					              convData.push({
1311
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
1312
-					                             'message': noDupMsgData[n]['message'],
1313
-					                             'from': noDupMsgData[n]['from'],
1314
-					                             'to': noDupMsgData[n]['to'],
1315
-					                             'date': noDupMsgData[n]['date'],
1316
-					                             'direction': 'sent_to',
1317
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
1318
-					                             'table': noDupMsgData[n]['table']
1319
-					              });
1320
-
1321
-
1322
-					          } else if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
1323
-
1324
-					              convData.push({
1325
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
1326
-					                             'message': noDupMsgData[n]['message'],
1327
-					                             'from': noDupMsgData[n]['from'],
1328
-					                             'to': noDupMsgData[n]['to'],
1329
-					                             'date': noDupMsgData[n]['date'],
1330
-					                             'direction': 'received_from',
1331
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
1332
-					                             'table': noDupMsgData[n]['table']
1333
-					              });
1334
-
1335
-					          } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
1336
-
1337
-					              convData.push({
1338
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
1339
-					                             'message': noDupMsgData[n]['message'],
1340
-					                             'from': noDupMsgData[n]['from'],
1341
-					                             'to': noDupMsgData[n]['to'],
1342
-					                             'date': noDupMsgData[n]['date'],
1343
-					                             'direction': 'received_on',
1344
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
1345
-					                             'table': noDupMsgData[n]['table']
1346
-					              });
1347
-					          }
1348
-					     }
1349
-
1350
-					     // Sort messages by date
1351
-					     convData.sort(function(a, b) {
1352
-                                                return new Date(b.date) - new Date(a.date);
1353
-					     });
1354
-
1355
-					     // Collect the display names of the users that sent messages from the current number
1356
-					     var selectedNames = [];
1357
-					     var displayNames = '';
1358
-					     for (var v = 0; v < convData.length; v++) {
1359
-					          if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
1360
-					              selectedNames.push(convData[v]['author_displayname']);
1361
-					              displayNames += "<div id='diplNm_"+ clckPhNumber +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
1362
-					          }
1363
-					     }
1364
-					     displayNames += "<div id='diplNmAllMsg' class='dispNameListAll' title='Show all the messages for this number.'>"+ clckPhNumber +"</div>";
1365
-
1366
-					     // Store the display names for the current number, to be able to see them later
1367
-					     var ctPhNumber = clckPhNumber;
1368
-					     msgsNamesPerNmbr[ctPhNumber] = displayNames;
1369
-
1370
-					     // Store the messages sent by each user, to be able to see them later when clicking on the user's name
1371
-					     for (var h = 0; h < selectedNames.length; h++) {
1372
-
1373
-					          var rowMessageArrpn = [];
1374
-					          for (var b = 0; b < convData.length; b++) {
1375
-
1376
-					               if (selectedNames[h] == convData[b]['author_displayname']) {
1377
-
1378
-							   if (convData[b]['direction'] == 'sent_from') {
1379
-							       if (convData[b]['status']) {
1380
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
1381
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
1382
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1383
-                                                                       } else {
1384
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1385
-                                                                       }
1386
-							           } else {
1387
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1388
-							           }
1389
-							       } else {
1390
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1391
-							       }
1392
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1393
-							   } else if (convData[b]['direction'] == 'sent_to') {
1394
-							       if (convData[b]['status']) {
1395
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
1396
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
1397
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1398
-                                                                       } else {
1399
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1400
-                                                                       }
1401
-							           } else {
1402
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1403
-							           }
1404
-							       } else {
1405
-							           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1406
-							       }
1407
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1408
-							   } else if (convData[b]['direction'] == 'received_from') {
1409
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
1410
-							   } else if (convData[b]['direction'] == 'received_on') {
1411
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
1412
-					                   }
1413
-					               }
1414
-					          }
1415
-					          var crtNmber = clckPhNumber;
1416
-					          var crtName = selectedNames[h];
1417
-					          msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
1418
-		                                  msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
1419
-					     }
1420
-
1421
-		                             // The number of messages to be loaded by default
1422
-		                             var nmbTblDefault = 50;
1423
-
1424
-		                             // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
1425
-		                             if (convData.length > nmbTblDefault) {
1426
-		                                 $("#loadMoreMsgs").css("display", "block");
1427
-		                                 var nmbToBeLoaded = nmbTblDefault;
1428
-		                             } else { var nmbToBeLoaded = convData.length; }
1429
-
1430
-					     var rowMessageArr = [];
1431
-					     for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
1432
-
1433
-					          if (convData[m]['direction'] == 'sent_from') {
1434
-					              if (convData[m]['status']) {
1435
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
1436
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
1437
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1438
-                                                              } else {
1439
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1440
-                                                              }
1441
-						          } else {
1442
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1443
-						          }
1444
-					              } else {
1445
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1446
-					              }
1447
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1448
-
1449
-					          } else if (convData[m]['direction'] == 'sent_to') {
1450
-					              if (convData[m]['status']) {
1451
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
1452
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
1453
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1454
-                                                              } else {
1455
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1456
-                                                              }
1457
-						          } else {
1458
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1459
-						          }
1460
-					              } else {
1461
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1462
-					              }
1463
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1464
-
1465
-					          } else if (convData[m]['direction'] == 'received_from') {
1466
-
1467
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1468
-
1469
-					          } else if (convData[m]['direction'] == 'received_on') {
1470
-
1471
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1472
-					          }
1473
-					     }
1474
-
1475
-					     var convDataPerNmbr = rowMessageArr.join("");
1476
-
1477
-		                             $("#grpdbynamelst").empty();
1478
-		                             $("#grpdbynamelst").append(displayNames);
1479
-		                             $("#msgListRowCell").empty();
1480
-		                             $("#msgListRowCell").append(convDataPerNmbr);
1481
-
1482
-					     // Store the messages for the current number, to be able to see them later, when clicking on the number
1483
-					     var rowMessageArrcpt = [];
1484
-					     for (var m = 0; m < convData.length; m++) {
1485
-
1486
-					          if (convData[m]['direction'] == 'sent_from') {
1487
-					              if (convData[m]['status']) {
1488
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
1489
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
1490
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1491
-                                                              } else {
1492
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1493
-                                                              }
1494
-						          } else {
1495
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1496
-						          }
1497
-					              } else {
1498
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1499
-					              }
1500
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1501
-
1502
-					          } else if (convData[m]['direction'] == 'sent_to') {
1503
-					              if (convData[m]['status']) {
1504
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
1505
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
1506
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1507
-                                                              } else {
1508
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1509
-                                                              }
1510
-						          } else {
1511
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1512
-						          }
1513
-					              } else {
1514
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1515
-					              }
1516
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1517
-
1518
-					          } else if (convData[m]['direction'] == 'received_from') {
1519
-
1520
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1521
-
1522
-					          } else if (convData[m]['direction'] == 'received_on') {
1523
-
1524
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1525
-					          }
1526
-					     }
1527
-
1528
-					     messagesPerNmbr[clckPhNumber] = rowMessageArrcpt;
1529
-
1530
-		                             // Scroll down to the bottom of the window
1531
-	                                     $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
1532
-
1533
-		                             // Load more messages
1534
-		                             var clickNmb = 0;
1535
-		                             $("#loadMoreMsgs").click(function() {
1536
-
1537
-		                                 clickNmb++;
1538
-
1539
-		                                 var crefnb = (clickNmb + 1) * nmbToBeLoaded;
1540
-
1541
-		                                 if (crefnb > convData.length) {
1542
-		                                     var nmbmsg = convData.length - 1;
1543
-		                                     $("#loadMoreMsgs").css("display", "none");
1544
-		                                 } else { 
1545
-		                                     var nmbmsg = crefnb - 1;
1546
-		                                 }
1547
-
1548
-		                                 var rowMessageArrAdd = [];
1549
-
1550
-		                                 for (var m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
1551
-
1552
-					              if (convData[m]['direction'] == 'sent_from') {
1553
-					                  if (convData[m]['status']) {
1554
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
1555
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
1556
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1557
-                                                                  } else {
1558
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1559
-                                                                  }
1560
-						              } else {
1561
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1562
-						              }
1563
-					                  } else {
1564
-					                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1565
-					                  }
1566
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1567
-
1568
-					              } else if (convData[m]['direction'] == 'sent_to') {
1569
-					                  if (convData[m]['status']) {
1570
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
1571
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
1572
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1573
-                                                                  } else {
1574
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1575
-                                                                  }
1576
-						              } else {
1577
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1578
-						              }
1579
-					                  } else {
1580
-					                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1581
-					                  }
1582
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
1583
-
1584
-					              } else if (convData[m]['direction'] == 'received_from') {
1585
-
1586
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1587
-
1588
-					              } else if (convData[m]['direction'] == 'received_on') {
1589
-
1590
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1591
-					              }
1592
-		                                 }
1593
-
1594
-					         var convDataPerNmbrad = rowMessageArrAdd.join("");
1595
-
1596
-		                                 var scrlheight = $("#msgListRowCell").height();
1597
-		                                 $("#msgListRowCell").prepend(convDataPerNmbrad);
1598
-
1599
-		                                 $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
1600
-		                             });
1601
-
1602
-
1603
-					     // Show the messages sent by each user whose name is clicked
1604
-					     $('[id*="diplNm_"]').click(function() {
1605
-
1606
-					         var crntNmbr = $(this).attr("id").split("_")[1];
1607
-					         var crntDisName = $(this).attr("name");
1608
-		                                 $("#loadMoreMsgs").css("display", "none");
1609
-
1610
-		                                 var convDataprn = [];
1611
-		                                 $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
1612
-		                                        convDataprn.push(item);
1613
-		                                 });
1614
-
1615
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
1616
-		                                 if (convDataprn.length > nmbTblDefault) {
1617
-		                                     $("#loadMoreMsgsusr").css("display", "block");
1618
-		                                     var nmbToBeLoaded = nmbTblDefault;
1619
-		                                 } else {
1620
-		                                     $("#loadMoreMsgsusr").css("display", "none");
1621
-		                                     var nmbToBeLoaded = convDataprn.length;
1622
-		                                 }
1623
-
1624
-					         var rowMessageArrprnst = [];
1625
-
1626
-					         for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
1627
-		                                      rowMessageArrprnst.push(convDataprn[n]);
1628
-					         }
1629
-
1630
-					         var convDataPerNmbrprnst = rowMessageArrprnst.join("");
1631
-
1632
-		                                 $("#msgListRowCell").empty();
1633
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
1634
-
1635
-		                                 // Scroll down to the bottom of the window
1636
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
1637
-
1638
-		                                 // Load more messages
1639
-		                                 var clckNb = 0;
1640
-		                                 $("#loadMoreMsgsusr").unbind("click");
1641
-		                                 $("#loadMoreMsgsusr").click(function() {
1642
-
1643
-		                                     clckNb++;
1644
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
1645
-
1646
-		                                     $("#loadMoreMsgs").css("display", "none");
1647
-
1648
-		                                     if (crefnb > convDataprn.length) {
1649
-		                                         var nmbmsg = convDataprn.length - 1;
1650
-		                                         $("#loadMoreMsgsusr").css("display", "none");
1651
-		                                     } else { 
1652
-		                                         var nmbmsg = crefnb - 1;
1653
-		                                         $("#loadMoreMsgsusr").css("display", "block");
1654
-		                                     }
1655
-
1656
-		                                     var rowMessageArrAddst = [];
1657
-
1658
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
1659
-
1660
-		                                          rowMessageArrAddst.push(convDataprn[q]);
1661
-		                                     }
1662
-
1663
-					             var convDataPerNmbradst = rowMessageArrAddst.join("");
1664
-
1665
-		                                     var scrlheight = $("#msgListRowCell").height();
1666
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
1667
-
1668
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
1669
-		                                 });
1670
-
1671
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
1672
-					         $("#diplNmAllMsg").css("color", "#04957b");
1673
-					         $(this).css("color", "#1b8efe");
1674
-					     });
1675
-
1676
-
1677
-					     // Show again all the messages sent/received to/from the clicked number
1678
-					     $("#diplNmAllMsg").click(function() {
1679
-
1680
-		                                 $("#loadMoreMsgsusr").css("display", "none");
1681
-
1682
-		                                 var convDataprn = [];
1683
-		                                 $.each(messagesPerNmbr[clckPhNumber], function(index, item) {
1684
-		                                        convDataprn.push(item);
1685
-		                                 });
1686
-
1687
-
1688
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
1689
-		                                 if (convDataprn.length > nmbTblDefault) {
1690
-		                                     $("#loadMoreMsgs").css("display", "block");
1691
-		                                     var nmbToBeLoaded = nmbTblDefault;
1692
-		                                 } else {
1693
-		                                     $("#loadMoreMsgs").css("display", "none");
1694
-		                                     var nmbToBeLoaded = convDataprn.length;
1695
-		                                 }
1696
-
1697
-					         var rowMessageArrprnst = [];
1698
-
1699
-					         for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
1700
-		                                      rowMessageArrprnst.push(convDataprn[n]);
1701
-					         }
1702
-
1703
-					         var convDataPerNmbrprnst = rowMessageArrprnst.join("");
1704
-
1705
-		                                 $("#msgListRowCell").empty();
1706
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
1707
-
1708
-		                                 // Scroll down to the bottom of the window
1709
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
1710
-
1711
-
1712
-		                                 // Load more messages
1713
-		                                 var clckNb = 0;
1714
-		                                 $("#loadMoreMsgs").unbind("click");
1715
-		                                 $("#loadMoreMsgs").click(function() {
1716
-
1717
-		                                     clckNb++;
1718
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
1719
-
1720
-		                                     $("#loadMoreMsgsusr").css("display", "none");
1721
-
1722
-		                                     if (crefnb > convDataprn.length) {
1723
-		                                         var nmbmsg = convDataprn.length - 1;
1724
-		                                         $("#loadMoreMsgs").css("display", "none");
1725
-		                                     } else { 
1726
-		                                         var nmbmsg = crefnb - 1;
1727
-		                                         $("#loadMoreMsgs").css("display", "block");
1728
-		                                     }
1729
-
1730
-		                                     var rowMessageArrAddst = [];
1731
-
1732
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
1733
-
1734
-		                                          rowMessageArrAddst.push(convDataprn[q]);
1735
-		                                     }
1736
-
1737
-					             var convDataPerNmbradst = rowMessageArrAddst.join("");
1738
-
1739
-		                                     var scrlheight = $("#msgListRowCell").height();
1740
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
1741
-
1742
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
1743
-		                                 });
1744
-
1745
-
1746
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
1747
-					         $("#diplNmAllMsg").css("color", "#04957b");
1748
-					         $(this).css("color", "#04c6a4");
1749
-
1750
-					     });
1751
-
1752
-
1753
-					     // Show the scroll-up arrow
1754
-					     $("#frmMsgLstWrap").scroll(function() {
1755
-						if ($(this).scrollTop() > 900) {
1756
-						      $('#upArrowSmall').fadeIn();
1757
-						} else {
1758
-						      $('#upArrowSmall').fadeOut();
1759
-						}
1760
-					     });
1761
-
1762
-					     $("#upArrowSmall").unbind("click");
1763
-					     $("#upArrowSmall").click(function() {
1764
-						$("#frmMsgLstWrap").animate({scrollTop : 0},400);
1765
-					     });
1766
-
1767
-
1768
-					     // Download MMS files when clicking on their URLs
1769
-					     $('[id^="mmsTblUrl-"]').on('click', function(evt) {
1770
-
1771
-					        var clckedUrl = $(this).text();
1772
-					        var flNamearr = clckedUrl.split("/");
1773
-					        var flName = flNamearr.reverse()[0];
1774
-
1775
-					        confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
1776
-
1777
-					        $("#confirmOk").click(function() {
1778
-
1779
-					           $("#alertMsgOverlay").remove();
1780
-					           $("#alertConfMessage").remove();
1781
-
1782
-					           var mmsLink = document.createElement("a");
1783
-					           mmsLink.setAttribute('href', clckedUrl);
1784
-					           mmsLink.setAttribute('download', flName);
1785
-                                                   mmsLink.setAttribute('target', '_blank');
1786
-					           document.body.appendChild(mmsLink);
1787
-					           mmsLink.click();
1788
-					           mmsLink.remove();
1789
-					        });
1790
-
1791
-					        $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
1792
-					     });
1793
-
1794
-				  },
1795
-				  error: function() {
1796
-		                             showAlert("Error while attempting to get message data from the database!");
1797
-					     $('#listAllMsgsFromTo').removeClass('icon-loading');
1798
-				  }
1799
-			   });
1800
-
1801
-                   }
1802
-
1803
-                   getMsgsPerNmbr(clckPhNumber);
1804
-
1805
-                   $("#refreshMsgsConvtf").click(function() { getMsgsPerNmbr(clckPhNumber); setTimeout(function() { $("#diplNmAllMsg").click(); }, 1000); });
1806
-                }
1807
-
1808
-                $('[id^="showMsgFrom-"]').click(function() {
1809
-
1810
-                   var ctrwnb = $(this).attr("id").replace("showMsgFrom-", "");
1811
-                   var clckPhNumber = $("#frmNmbr-"+ ctrwnb).text();
1812
-
1813
-                   showMsgPerNmbr(clckPhNumber);
1814
-                })
1815
-
1816
-                $('[id^="showMsgTo-"]').click(function() {
1817
-                   var ctrwnbTo = $(this).attr("id").replace("showMsgTo-", "");
1818
-                   if ($("#toNmbr-"+ ctrwnbTo).text().indexOf(":") > -1) {
1819
-                       var clckPhNbTo = $("#toNmbr-"+ ctrwnbTo).text().split(": ")[1];
1820
-                   } else { var clckPhNbTo = $("#toNmbr-"+ ctrwnbTo).text(); };
1821
-
1822
-                   showMsgPerNmbr(clckPhNbTo);
1823
-                })
1824
-
1825
-                // Show the pop-up window for adding a Display Name to the 'From' numbers of unknown senders
1826
-                $('[id^="addDispName-"]').click(function() {
1827
-
1828
-                   var crrownb = $(this).attr("id").replace("addDispName-", "");
1829
-                   var slctPhoneNb = $("#frmNmbr-"+ crrownb).text();
1830
-
1831
-                   var addDNameWindow = "<div id='disNameWindow'>";
1832
-                   addDNameWindow += "<div id='dragDispNmWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg'></div>";
1833
-                   addDNameWindow += "<a id='closeDisNmWindow' title='Close this window'></a>";
1834
-                   addDNameWindow += "<div style='display:block;text-align:left;margin:14px 22px 0px 22px;color:#353535;font-family:Inter;font-size:15px;font-weight:400;'>If this is an external phone number (the number of a person that doesn't have a Nextcloud account), you can save a Display Name for this number, so that all the messages coming from it will be preceded by the specified Display Name:</div>";
1835
-                   addDNameWindow += "<div style='display:block;text-align:center;color:#49B382;font-family:Inter;font-size:15px;font-weight:600;margin:6px 0px 10px 0px;'>"+ slctPhoneNb +"</div>";
1836
-                   addDNameWindow += "<input type='text' id='saveDispNmText' placeholder='Eg: John Smith' style='display:block;width:80%;height:30px;margin:10px auto;padding:0px 12px;border-radius: 20px;'>";
1837
-                   addDNameWindow += "<input type='submit' id='saveDispName' value='Save'>";
1838
-                   addDNameWindow += "</div>";
1839
-
1840
-                   $("#content").append("<div id='recTblOverlay'></div>");
1841
-                   $("#content").append(addDNameWindow);
1842
-
1843
-                   var topNmDist = parseInt((window.innerHeight / 2).toFixed(2) - 180) +"px";
1844
-                   var leftNmDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
1845
-                   $("#disNameWindow").css({ "top" : topNmDist, "left" : leftNmDist });
1846
-
1847
-                   $("#closeDisNmWindow").click(function() { $("#disNameWindow").remove(); $("#recTblOverlay").remove(); });
1848
-                   $("#recTblOverlay").click(function() { $("#disNameWindow").remove(); $("#recTblOverlay").remove(); });
1849
-
1850
-
1851
-	           // Make the window draggable
1852
-	           function makeMgrWndDraggable(e) {
1853
-
1854
-			   window.pmdragging = {};
1855
-			   pmdragging.pageX0 = e.pageX;
1856
-			   pmdragging.pageY0 = e.pageY;
1857
-			   pmdragging.elem = $("#disNameWindow");
1858
-			   pmdragging.offset0 = $("#disNameWindow").offset();
1859
-
1860
-			   function handle_dragging(e) {
1861
-			       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
1862
-			       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
1863
-			       $(pmdragging.elem).offset({top: top, left: left});
1864
-			   }
1865
-
1866
-			   function handle_mouseup(e) {
1867
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
1868
-			   }
1869
-
1870
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
1871
-	           }
1872
-	           $("#dragDispNmWindow").mousedown(makeMgrWndDraggable);
1873
-
1874
-                   // Save the Display Name
1875
-                   $("#saveDispName").click(function() {
1876
-
1877
-                      var dispNmText = $("#saveDispNmText").val();
1878
-
1879
-                      if (/^[a-zA-Z0-9\s\-\/\.\)\(\']+$/.test(dispNmText) && dispNmText.length < 256) {
1880
-
1881
-                             var saveDispNameUrl = OC.generateUrl("/apps/sms_relentless/user/savedisplayname");
1882
-
1883
-			     $.ajax({
1884
-				  url: saveDispNameUrl + '/' + userid,
1885
-				  method: 'POST',
1886
-				  dataType:'text',
1887
-                                  data: { 
1888
-                                          authorDisplayname: dispNmText,
1889
-                                          from: slctPhoneNb
1890
-                                         },
1891
-				  success: function(respupdname) {
1892
-                                               showAlert(respupdname);
1893
-                                               $("#disNameWindow").remove();
1894
-                                               $("#recTblOverlay").remove();
1895
-                                  },
1896
-				  error: function() {
1897
-                                               showAlert("Error while attempting to save the new Display Name to the database.");
1898
-                                               $("#disNameWindow").remove();
1899
-                                               $("#recTblOverlay").remove();
1900
-                                  }
1901
-			     });
1902
-
1903
-                      } else {
1904
-                              showAlert("The Display Name should contain only letters, numbers, spaces, hyphens (-), slashes (/), periods (.), round brackets (()) and single quotation marks ('), it should not be empty and should have less than 256 characters.");
1905
-                      }
1906
-                   });
1907
-
1908
-                });
1909
-
1910
-
1911
-                // Add pagination
1912
-                var rowsShown = messagesperpage;
1913
-                var rowsTotal = $("#recSmsTable tr").length;
1914
-
1915
-                var numPages = (rowsTotal - 2) / rowsShown;
1916
-
1917
-                for (i = 0; i < numPages; i++) {
1918
-                     var pageNum = i + 1;
1919
-                     $('#paginationrec').append('<a href="#" rel="' + i + '" class="pagenumbersrec">' + pageNum + '</a> ');
1920
-                }
1921
-
1922
-                $('#paginationrec').children(":first").addClass('active');
1923
-
1924
-                $('#paginationrec a:first').addClass('active');
1925
-
1926
-                // Show table page when clicking a page number
1927
-                $('.recpages a').bind('click', function() {
1928
-
1929
-                   $('#paginationrec').children().removeClass('active');
1930
-
1931
-                   $(this).addClass('active');
1932
-
1933
-                   var currentPageNo = $(this).text();
1934
-
1935
-                   $('#paginationrec a').each(function() {
1936
-                       if ($(this).text() == currentPageNo) {
1937
-                           $(this).addClass('active');
1938
-                       }
1939
-                   });
1940
-
1941
-                   // Sort table rows
1942
-		   var rows = $('#recSmsTable tr').get();
1943
-
1944
-		   rows.sort(function(a, b) {
1945
-
1946
-		        var A = parseInt($('td.dbidcolumnrec', a).text());
1947
-		        var B = parseInt($('td.dbidcolumnrec', b).text());
1948
-
1949
-		        if (A < B) {
1950
-		            return -1;
1951
-		        }
1952
-
1953
-		        if (A > B) {
1954
-		            return 1;
1955
-		        }
1956
-
1957
-		        return 0;
1958
-		   });
1959
-
1960
-		   $.each(rows, function(index, row) {
1961
-		      $('#recSmsTable').append(row);
1962
-		   });
1963
-
1964
-                   var currPage = $(this).attr('rel');
1965
-                   var startItem = currPage * rowsShown;
1966
-                   var endItem = startItem + rowsShown;
1967
-
1968
-                   $(".receivedrowsbody").hide().slice(startItem, endItem).css('display', 'table-row');
1969
-
1970
-                   $('#totalrecmessages').remove();
1971
-                   $('#smstables').append("<div id='totalrecmessages'>Total displayed messages: " + parseddata.length + "</div>");
1972
-                });
1973
-
1974
-                $('#paginationrec').children(":last").trigger('click');
1975
-
1976
-                // Select all records
1977
-                $('#selectAllChckbx').change(function() {
1978
-                  if ($(this).is(':checked')) {
1979
-                       $(".indivchckbx").prop("checked", true);
1980
-                  } else {
1981
-                       $(".indivchckbx").prop("checked", false);
1982
-                  }
1983
-                });
1984
-
1985
-                function reorderRecRows() {
1986
-                   var currenttext = $(".filterbuttonsrec").closest('[class="filterbuttonsrec"]').find('[class="indivfilterrec"]').text();
1987
-                   if (currenttext == '') {
1988
-                       $('tr').sort(function (a, b) {
1989
-                          return parseInt($('td.dbidcolumnrec', b).text()) < parseInt($('td.dbidcolumnrec', a).text());
1990
-                       }).appendTo("#recSmsTable");
1991
-                   }
1992
-                }
1993
-
1994
-                // Filter rows
1995
-                $("#databaseidfilter").on("click", function(event) {
1996
-
1997
-                      var databaseId = $("#dbidtextrec").val();
1998
-                      var msgrowsNo = 0;
1999
-
2000
-                      $(".receivedrowsbody").each(function() {
2001
-
2002
-                          var checkrecEmpty1 = 0;
2003
-                          $(".indivfilterrec").not("#dbidtextrec").each(function() {
2004
-                              if ($(this).val() != '') {
2005
-                                  checkrecEmpty1 = 1;
2006
-                              }
2007
-                          });
2008
-
2009
-                          if (checkrecEmpty1 == 0) {
2010
-                              $(this).show();
2011
-                          }
2012
-
2013
-                          if (databaseId != '') {
2014
-                             if ($(this).find('[class="dbidcolumnrec"]').text() == databaseId) {
2015
-                                $("#recSmsTable").append(this);
2016
-                                if ($(this).is(":visible")) { msgrowsNo++; }
2017
-                             } else {
2018
-                                $(this).hide();
2019
-                             }
2020
-                          } else {
2021
-                                $(this).show();
2022
-                                msgrowsNo++;
2023
-                          }
2024
-                      });
2025
-
2026
-                      reorderRecRows();
2027
-                      $('#totalrecmessages').remove();
2028
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
2029
-                });
2030
-
2031
-
2032
-                $("#useridfilter").on("click", function(event) {
2033
-
2034
-                      var useridtxt = $("#useridtextrec").val().toLowerCase();
2035
-                      var msgrowsNo = 0;
2036
-
2037
-                      $(".receivedrowsbody").each(function() {
2038
-
2039
-                          var checkrecEmpty2 = 0;
2040
-                          $(".indivfilterrec").not("#useridtextrec").each(function() {
2041
-                              if ($(this).val() != '') {
2042
-                                  checkrecEmpty2 = 1;
2043
-                              }
2044
-                          });
2045
-
2046
-                          if (checkrecEmpty2 == 0) {
2047
-                              $(this).show();
2048
-                          }
2049
-
2050
-                          if (useridtxt != '') {
2051
-                             var useridfound = $(this).find('[class="useridcolrec"]').text().toLowerCase();
2052
-                             if(useridfound.indexOf(useridtxt) != -1) {
2053
-                                $("#recSmsTable").append(this);
2054
-                                if ($(this).is(":visible")) { msgrowsNo++; }
2055
-                             } else {
2056
-                                $(this).hide();
2057
-                             }
2058
-                          } else {
2059
-                                $(this).show();
2060
-                                msgrowsNo++;
2061
-                          }
2062
-                      });
2063
-
2064
-                      reorderRecRows();
2065
-                      $('#totalrecmessages').remove();
2066
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
2067
-                });
2068
-
2069
-                $("#messageidfilter").on("click", function(event) {
2070
-
2071
-                      var messageidtxt = $("#messageidtextrec").val().toLowerCase();
2072
-                      var msgrowsNo = 0;
2073
-
2074
-                      $(".receivedrowsbody").each(function() {
2075
-
2076
-                          var checkrecEmpty3 = 0;
2077
-                          $(".indivfilterrec").not("#messageidtextrec").each(function() {
2078
-                              if ($(this).val() != '') {
2079
-                                  checkrecEmpty3 = 1;
2080
-                              }
2081
-                          });
2082
-
2083
-                          if (checkrecEmpty3 == 0) {
2084
-                              $(this).show();
2085
-                          }
2086
-
2087
-                          if (messageidtxt != '') {
2088
-                             var foundtdmssgid = $(this).find('[class="messageidcolrec"]').text().toLowerCase();
2089
-                             if (foundtdmssgid.indexOf(messageidtxt) != -1) {
2090
-                                $("#recSmsTable").append(this);
2091
-                                if ($(this).is(":visible")) { msgrowsNo++; }
2092
-                             } else {
2093
-                                $(this).hide();
2094
-                             }
2095
-                          } else {
2096
-                                $(this).show();
2097
-                                msgrowsNo++;
2098
-                          }
2099
-                      });
2100
-
2101
-                      reorderRecRows();
2102
-                      $('#totalrecmessages').remove();
2103
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
2104
-                });
2105
-
2106
-                $("#datefilter").on("click", function(event) {
2107
-
2108
-                      var datetxtvr = $("#datetextrec").val().toLowerCase();
2109
-                      var msgrowsNo = 0;
2110
-
2111
-                      $(".receivedrowsbody").each(function() {
2112
-
2113
-                          var checkrecEmpty4 = 0;
2114
-                          $(".indivfilterrec").not("#datetextrec").each(function() {
2115
-                              if ($(this).val() != '') {
2116
-                                  checkrecEmpty4 = 1;
2117
-                              }
2118
-                          });
2119
-
2120
-                          if (checkrecEmpty4 == 0) {
2121
-                              $(this).show();
2122
-                          }
2123
-
2124
-                          if (datetxtvr != '') {
2125
-                              var founddate = $(this).find('[class="datecolrec"]').text().toLowerCase();
2126
-                              if (founddate.indexOf(datetxtvr) != -1) {
2127
-                                  $("#recSmsTable").append(this);
2128
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
2129
-                              } else {
2130
-                                  $(this).hide();
2131
-                              }
2132
-                          } else {
2133
-                                  $(this).show();
2134
-                                  msgrowsNo++;
2135
-                          }
2136
-                      });
2137
-
2138
-                      reorderRecRows();
2139
-                      $('#totalrecmessages').remove();
2140
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
2141
-                });
2142
-
2143
-                $("#fromfilter").on("click", function(event) {
2144
-
2145
-                      var fromtxtvr = $("#fromtextrec").val().toLowerCase();
2146
-                      var msgrowsNo = 0;
2147
-
2148
-                      $(".receivedrowsbody").each(function() {
2149
-
2150
-                          var checkrecEmpty5 = 0;
2151
-                          $(".indivfilterrec").not("#fromtextrec").each(function() {
2152
-                              if ($(this).val() != '') {
2153
-                                  checkrecEmpty5 = 1;
2154
-                              }
2155
-                          });
2156
-
2157
-                          if (checkrecEmpty5 == 0) {
2158
-                              $(this).show();
2159
-                          }
2160
-
2161
-                          if (fromtxtvr != '') {
2162
-                             var foundfrom = $(this).find('[class="fromcolumnrec"]').text().toLowerCase();
2163
-                             if (foundfrom.indexOf(fromtxtvr) != -1) {
2164
-                                 $("#recSmsTable").append(this);
2165
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
2166
-                             } else {
2167
-                                 $(this).hide();
2168
-                             }
2169
-                          } else {
2170
-                                 $(this).show();
2171
-                                 msgrowsNo++;
2172
-                          }
2173
-                      });
2174
-
2175
-                      reorderRecRows();
2176
-                      $('#totalrecmessages').remove();
2177
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
2178
-                });
2179
-
2180
-                $("#tofilter").on("click", function(event) {
2181
-
2182
-                      var totxtvr = $("#totextrec").val().toLowerCase();
2183
-                      var msgrowsNo = 0;
2184
-
2185
-                      $(".receivedrowsbody").each(function() {
2186
-
2187
-                          var checkrecEmpty6 = 0;
2188
-                          $(".indivfilterrec").not("#totextrec").each(function() {
2189
-                              if ($(this).val() != '') {
2190
-                                  checkrecEmpty6 = 1;
2191
-                              }
2192
-                          });
2193
-
2194
-                          if (checkrecEmpty6 == 0) {
2195
-                              $(this).show();
2196
-                          }
2197
-
2198
-                          if (totxtvr != '') {
2199
-                             var foundto = $(this).find('[class="tocolrec"]').text().toLowerCase();
2200
-                             if (foundto.indexOf(totxtvr) != -1) {
2201
-                                 $("#recSmsTable").append(this);
2202
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
2203
-                             } else {
2204
-                                 $(this).hide();
2205
-                             }
2206
-                          } else {
2207
-                                 $(this).show();
2208
-                                 msgrowsNo++;
2209
-                          }
2210
-                      });
2211
-
2212
-                      reorderRecRows();
2213
-                      $('#totalrecmessages').remove();
2214
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
2215
-                });
2216
-
2217
-                $("#messagefilter").on("click", function(event) {
2218
-
2219
-                      var messagetxtvr = $("#messagetextrec").val().toLowerCase();
2220
-                      var msgrowsNo = 0;
2221
-
2222
-                      $(".receivedrowsbody").each(function() {
2223
-
2224
-                          var checkrecEmpty7 = 0;
2225
-                          $(".indivfilterrec").not("#messagetextrec").each(function() {
2226
-                              if ($(this).val() != '') {
2227
-                                  checkrecEmpty7 = 1;
2228
-                              }
2229
-                          });
2230
-
2231
-                          if (checkrecEmpty7 == 0) {
2232
-                              $(this).show();
2233
-                          }
2234
-
2235
-                          if (messagetxtvr != '') {
2236
-                             var foundmessage = $(this).find('[class="messagecolumnrec"]').text().toLowerCase();
2237
-                             if (foundmessage.indexOf(messagetxtvr) != -1) {
2238
-                                $("#recSmsTable").append(this);
2239
-                                if ($(this).is(":visible")) { msgrowsNo++; }
2240
-                             } else {
2241
-                                $(this).hide();
2242
-                             }
2243
-                          } else {
2244
-                                $(this).show();
2245
-                                msgrowsNo++;
2246
-                          }
2247
-                      });
2248
-
2249
-                      reorderRecRows();
2250
-                      $('#totalrecmessages').remove();
2251
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
2252
-               });
2253
-
2254
-               // Clear all filters
2255
-               $("#clearrecfilters").on("click", function(event) {
2256
-                      $(".receivedrowsbody").each(function() {
2257
-                          $(this).show();
2258
-                      });
2259
-                      $(".indivfilterrec").val("");
2260
-                      $('#totalrecmessages').remove();
2261
-                      $('#smstables').append("<div id='totalrecmessages'>Total displayed messages: " + parseddata.length + "</div>");
2262
-               });
2263
-
2264
-               // Delete selected rows from the database
2265
-               $("#deleterecrows").on("click", function() {
2266
-                  var checkcheckbx = jQuery("#recSmsTable input[type=checkbox]:checked").length;
2267
-                  if (checkcheckbx == 0) {
2268
-                      showAlert("Please select the row(s) to permanently delete from the database !");
2269
-                  } else {
2270
-                          var checkboxIds = [];
2271
-                          $(".receivedrowsbody").each(function() {
2272
-                             var rowcheckbx = $(this).find('input[type="checkbox"]');
2273
-                             if (rowcheckbx.is(":checked")) {
2274
-                                 var dbrowid = $(this).find('[class="dbidcolumnrec"]').text();
2275
-                                 checkboxIds.push(dbrowid);
2276
-                             }
2277
-                          });
2278
-
2279
-		          confirmAlert("Please note that the row(s) you selected will be permanently deleted from the database, without being saved before removal. This action cannot be undone ! If you really want to permanently delete the selected row(s) press 'OK'.");
2280
-
2281
-		          $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
2282
-
2283
-		          $("#confirmOk").click(function() {
2284
-
2285
-		              $("#alertMsgOverlay").remove();
2286
-		              $("#alertConfMessage").remove();
2287
-
2288
-                              var deleterecRowsUrl = OC.generateUrl("/apps/sms_relentless/user/removerecrows");
2289
-                              $('#smstables').addClass('icon-loading');
2290
-
2291
-                              $.ajax({
2292
-                                   url: deleterecRowsUrl + '/' + userid,
2293
-                                   type: "POST",
2294
-                                   data: { "recmessagedbIDs": checkboxIds },
2295
-                                   success: function(delmsgrec) {
2296
-		                              $('#smstables').removeClass('icon-loading');
2297
-                                              if (delmsgrec == "success") {
2298
-                                                  showAlert("The row(s) have been deleted successfully !");
2299
-                                                  $('#receivedsmstableshow').click();
2300
-                                              } else if (delmsgrec == "not allowed") { 
2301
-                                                  showAlert("Only admins can delete messages !");
2302
-                                              } else {
2303
-                                                  showAlert("There was an error while deleting the selected row(s) !");
2304
-                                              }
2305
-                                   },
2306
-                                   error: function() {
2307
-                                              $('#smstables').removeClass('icon-loading');
2308
-                                              showAlert("There was an error while deleting the selected row(s) !");
2309
-                                   }
2310
-                              });
2311
-                          });
2312
-
2313
-                  }
2314
-               });
2315
-
2316
-
2317
-               // Show/Hide filter row
2318
-	       $('#recarrow').on('click', function() {
2319
-	          if ($('#recfiltersrow').is(':visible')) {
2320
-		      $('#recfiltersrow').hide();
2321
-                      $('#recheaderrow').css('top', '0px');
2322
-                      $(this).removeClass('arrowUpCl');
2323
-                      $(this).addClass('arrowDownCl');
2324
-		  } else {
2325
-		      $('#recfiltersrow').show();
2326
-                      $('#recheaderrow').css('top', '158px');
2327
-                      $(this).removeClass('arrowDownCl');
2328
-                      $(this).addClass('arrowUpCl');
2329
-                  }
2330
-               });
2331
-
2332
-               $("#app-content").animate({scrollTop:$("#recSmsTable").prop("scrollHeight")},200);
2333
-
2334
-
2335
-               // Download MMS files when clicking on their URLs
2336
-               $('[id^="mmsTblUrl-"]').on('click', function(evt) {
2337
-
2338
-                  var clckedUrl = $(this).text();
2339
-                  var flNamearr = clckedUrl.split("/");
2340
-                  var flName = flNamearr.reverse()[0];
2341
-
2342
-                  confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
2343
-
2344
-		  $("#confirmOk").click(function() {
2345
-
2346
-                     $("#alertMsgOverlay").remove();
2347
-		     $("#alertConfMessage").remove();
2348
-
2349
-		     var mmsLink = document.createElement("a");
2350
-		     mmsLink.setAttribute('href', clckedUrl);
2351
-		     mmsLink.setAttribute('download', flName);
2352
-		     mmsLink.setAttribute('target', '_blank');
2353
-		     document.body.appendChild(mmsLink);
2354
-		     mmsLink.click();
2355
-		     mmsLink.remove();
2356
-                  });
2357
-
2358
-		  $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
2359
-               });
2360
-
2361
-          },
2362
-          error: function() {
2363
-                      showAlert("Error. You can check the Nextcloud log to find more details about this issue.");
2364
-                      $('#smstables').removeClass('icon-loading');
2365
-          }
2366
-     });
2367
-
2368
-     // Look for the 'new received message' indicator in the database, to know if the received messages list needs to be refreshed
2369
-     intervalNmfr = setInterval(function() { checkIfNewMessage(); }, newMsgInterval);
2370
-
2371
-     $("#stopAutoRefreshSent").css("display", "none");
2372
-
2373
-  });
2374
-
2375
-
2376
-  // List sent messages
2377
-  $("#sentsmstableshow").on("click", function(event) {
2378
-
2379
-     $('#smstables').empty();
2380
-     clearInterval(intervalNmfr);
2381
-
2382
-     var getSentUrl = OC.generateUrl("/apps/sms_relentless/user/getsenttable");
2383
-     $('#smstables').addClass('icon-loading');
2384
-
2385
-     $.ajax({
2386
-          url: getSentUrl + '/' + userid,
2387
-          method: "GET",
2388
-          contentType: 'application/json',
2389
-          success: function(sentdatafdb) {
2390
-
2391
-                var sentparseddata = sentdatafdb.datarows;
2392
-
2393
-                $('#smstables').append("<div id='toptablesent'><div class='topbuttonandpage'><span id='sentarrow' title='Show/Hide filters and Delete button'></span></div><div id='paginationsent' class='pages'>Pages </div></div>");
2394
-                $('#smstables').append("<table id='sentSmsTable'></table>");
2395
-                $('#sentSmsTable').append("<tr id='sentfiltersrow'><td class='selectalldvfilter'><button id='clearsentfilters' title='Clear all filters.'></button><button id='deletesentrows' title='Permanently delete the selected row(s) from below from the database.'></button></td><td class='selectalldvfilter'><input type='text' id='dbidtextsent' class='indivfiltersent' title='Enter a database ID number to apply the filter.'><input type='submit' id='databaseidfilter' class='filterbuttonsent' value='' title='Filter rows by the specified database ID.' /></td><td class='selectalldvfilter'><input type='text' id='useridtext' class='indivfiltersent' title='Enter a Nextcloud username to apply the filter.' /><input type='submit' id='useridfilter' class='filterbuttonsent' value='' title='Filter rows by the specified username.' /></td><td class='selectalldvfilter'><input type='text' id='messageidtext' class='indivfiltersent' title='Enter a fragment from a message ID to apply the filter.'  /><input type='submit' id='messageidfilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='datetext' class='indivfiltersent' title='Enter a fragment of a date to apply the filter.'/><input type='submit' id='datefilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='fromtext' class='indivfiltersent' title='Enter a fragment of a sender&#146s phone number or alphanumeric Sender ID, to apply the filter.' /><input type='submit' id='fromfilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='totext' class='indivfiltersent' value='' title='Enter a fragment of a recipient&#146s phone number to apply the filter.'  /><input type='submit' id='tofilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.' /></td><td class='selectalldvfilter'><input type='text' id='networktext' class='indivfiltersent' title='Enter a fragment of a network number to apply the filter.' /><input type='submit' id='networkfilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.'/></td><td class='selectalldvfilter'><input type='text' id='pricetext' class='indivfiltersent' title='Enter a fragment of a price string to apply the filter.' /><input type='submit' id='pricefilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.'/></td><td class='selectalldvfilter'><input type='text' id='statustext' class='indivfiltersent' title='Enter a fragment of a status to apply the filter.' /><input type='submit' id='statusfilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.'/></td><td class='selectalldvfilter'><input type='text' id='deliveryrcpttext' class='indivfiltersent' title='Enter a fragment of a delivery receit to apply the filter.' /><input type='submit' id='deliveryrecfilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.'/></td><td class='selectalldvfilter'><input type='text' id='messagetext' class='indivfiltersent' title='Enter a fragment of a message to apply the filter.' /><input type='submit' id='messagefilter' class='filterbuttonsent' value='' title='Filter rows by the specified string.'/></td></tr>");
2396
-                $('#sentSmsTable').append("<tr class='sentrows' id='sentheaderrow'><th id='selectalldv' class='selectsmsdv'><input type='checkbox' id='selectAllChckbx' class ='indivchckbx' title='Select all rows from all pages.' /></th><th title='The database ID of each message.'>ID</th><th>User ID</th><th>Message ID</th><th>Date</th><th>From</th><th>To</th><th>Network</th><th title=\"The currency is the currency configured in the client account, on the SMS provider's website.\">Price</th><th id='sentstatuscolumn' title=\"This column generally shows the status received from the recipient's carrier, or any errors generated when attempting to send the message.\">Status</th><th title='Not all delivery receipts guarantee that the target received the message. Some delivery receipts represent successful completion of just one step in the delivery process, such as transmitting the message to another telephony operator.'>Delivery<br>Receit</th><th>Sent Message</th></tr>");
2397
-
2398
-                $('#sentfiltersrow').hide();
2399
-
2400
-                if (sentdatafdb.showdispnm == 1) {
2401
-
2402
-                    for (var i = 0; i < sentparseddata.length; i++) {
2403
-
2404
-                         if (sentparseddata[i].author_displayname) {
2405
-                             var procmessage = "<span class='messageAuthorName'>"+ sentparseddata[i].author_displayname + ":</span>" + sentparseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/" + ctappdir + "/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
2406
-                         } else {
2407
-                             var procmessage = sentparseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/" + ctappdir + "/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
2408
-                         }
2409
-
2410
-                         var procsentFrom = "<div id='frmNmbr-"+ i +"'>"+ sentparseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
2411
-
2412
-                         var procsentTo = "<div id='toNmbr-"+ i +"'>"+ sentparseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
2413
-
2414
-                         $('#sentSmsTable').append("<tr id='singlerow_"+ i +"' class='sentrowsbody'><td class='selectsmsdv'><input type='checkbox' id='selectspec_"+ i +"' class='indivchckbx' /></td><td class='sentdbidcolumn'>"+ sentparseddata[i].id +"</td><td class='useridcolsent'>"+ sentparseddata[i].user_id +"</td><td class='messageidcolsent'>"+ sentparseddata[i].message_id +"</td><td class='datecolsent'>"+ sentparseddata[i].date +"</td><td class='fromcolumnsent'>"+ procsentFrom +"</td><td class='tocolumnsent'>"+ procsentTo +"</td><td class='networkcolumnsent'><div class='networkNmContent'>"+ sentparseddata[i].network +"</div><div id='phNetwork-"+ i +"' class='phNetworkImg' title='Click to see the name of the receiver`s carrier'><img src='/" + ctappdir + "/sms_relentless/img/network.svg' class='recNetworkImg'></div></td><td class='pricecolumnsent'>"+ sentparseddata[i].price +"</td><td class='statuscolumnsent'>"+ sentparseddata[i].status +"</td><td class='deliveryrcptcolsent'>"+ sentparseddata[i].deliveryreceipt +"</td><td class='messagecolumnsent'>"+ procmessage +"</td></tr>");
2415
-                    }
2416
-
2417
-                } else {
2418
-
2419
-                    for (var i = 0; i < sentparseddata.length; i++) {
2420
-
2421
-                         var procmessage = sentparseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/" + ctappdir + "/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
2422
-
2423
-                         var procsentFrom = "<div id='frmNmbr-"+ i +"'>"+ sentparseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
2424
-
2425
-                         var procsentTo = "<div id='toNmbr-"+ i +"'>"+ sentparseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/" + ctappdir + "/sms_relentless/img/list.svg' title='Show all the messages sent/received to/from this phone number, that I am allowed to see.'></div></div>";
2426
-
2427
-                         $('#sentSmsTable').append("<tr id='singlerow_"+ i +"' class='sentrowsbody'><td class='selectsmsdv'><input type='checkbox' id='selectspec_"+ i +"' class='indivchckbx' /></td><td class='sentdbidcolumn'>"+ sentparseddata[i].id +"</td><td class='useridcolsent'>"+ sentparseddata[i].user_id +"</td><td class='messageidcolsent'>"+ sentparseddata[i].message_id +"</td><td class='datecolsent'>"+ sentparseddata[i].date +"</td><td class='fromcolumnsent'>"+ procsentFrom +"</td><td class='tocolumnsent'>"+ procsentTo +"</td><td class='networkcolumnsent'><div class='networkNmContent'>"+ sentparseddata[i].network +"</div><div id='phNetwork-"+ i +"' class='phNetworkImg' title='Click to see the name of the receiver`s carrier'><img src='/" + ctappdir + "/sms_relentless/img/network.svg' class='recNetworkImg'></div></td><td class='pricecolumnsent'>"+ sentparseddata[i].price +"</td><td class='statuscolumnsent'>"+ sentparseddata[i].status +"</td><td class='deliveryrcptcolsent'>"+ sentparseddata[i].deliveryreceipt +"</td><td class='messagecolumnsent'>"+ procmessage +"</td></tr>");
2428
-                    }
2429
-                }
2430
-
2431
-                $('#smstables').append("<div id='totalsentmessages'><span>Total displayed messages: " + sentparseddata.length + "</span></div>");
2432
-
2433
-                $('#smstables').removeClass('icon-loading');
2434
-
2435
-                $('#sentarrow').removeClass('arrowUpCl');
2436
-                $('#sentarrow').addClass('arrowDownCl');
2437
-
2438
-                // Show the name of the carrier's network
2439
-                $('[id^="phNetwork-"]').click(function(){
2440
-                   var ntwrkText = $(this).closest(".networkcolumnsent").find('[class="networkNmContent"]').text();
2441
-                   if (ntwrkText) {
2442
-                       if (/^[0-9\s]*$/.test(ntwrkText)) {
2443
-                           showAlert("The code of the receiver's carrier is:<span style='display:block;text-align:center;font-weight:700;'>"+ ntwrkText +"</span>You can look up the name of the carrier on <a href='https://en.wikipedia.org/wiki/Mobile_country_code#National_operators' style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>this Wikipedia page</a>, taking into account that the first 3 digits specify the mobile country code, while the last 2 or 3 digits specify the mobile network code.");
2444
-                       } else {
2445
-                           showAlert("The name of the receiver's carrier is:<br>"+ ntwrkText);
2446
-                       }
2447
-                   } else { 
2448
-                       showAlert("The name of the receiver's carrier is not known."); 
2449
-                   }
2450
-                });
2451
-
2452
-                // Show the pop-up window that lists all the messages exchanged between the current 2 phone numbers
2453
-                function showSentMsgPerConv(phNumberFrom, phNumberTo) {
2454
-
2455
-                   let allfrmtomsg = "<div id='listAllMsgsConv'>";
2456
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='cursor:grab'></div>";
2457
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
2458
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages exchanged between <span style='color:#04957b'>"+ phNumberFrom +"</span> and <span style='color:#04957b'>"+ phNumberTo +"</span></div>";
2459
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
2460
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
2461
-                   allfrmtomsg += "<tr class='groupedrowsbody'><td><div id='grpdbynamelst' class='groupedLstNamespn'></div></td><td><div id='loadMoreMsgs' title='Click to load older messages.'>Load more messages</div><div id='loadMoreMsgsusr' title='Click to load older messages.'>Load more messages</div><div id='msgListRowCell' class='groupedLstMsgspn'></div><div id='refreshMsgsWrap'><div id='refreshMsgsConv' title='Refresh list of messages'></div></div><div id='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
2462
-                   allfrmtomsg += "</table></div>";
2463
-                   allfrmtomsg += "<div id='sendMsgReply'><table id='sendMsgConv'><tr><td><div id='fromPhoneNmbrConv'>From: <select id='selectFromNbConv'></select></div><div id='toPhoneNmbrConv'>To: <span id='toNmbrConv' style='color:#04957b'>"+ phNumberTo +"</span></div></td></tr>";
2464
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS.'></textarea></td></tr></table>";
2465
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
2466
-                   allfrmtomsg += "<div id='expandWindowRplCtn' title='Expand to send a reply'><img id='expandWindowRpl' src='/" + ctappdir + "/sms_relentless/img/arrowDown.svg'></div>";
2467
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;cursor:grab;'></div>";
2468
-                   allfrmtomsg += "</div>";
2469
-
2470
-                   $("#content").append("<div id='recTblOverlay'></div>");
2471
-                   $("#content").append(allfrmtomsg);
2472
-
2473
-                   let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
2474
-                   let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
2475
-                   $("#listAllMsgsConv").css({ "top" : topDist, "left" : leftDist });
2476
-
2477
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
2478
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
2479
-
2480
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
2481
-                   $("#expandWindowRpl").unbind("click");
2482
-	           $("#expandWindowRpl").click(function() {
2483
-
2484
-	              if ($(this).attr('src') == '/' + ctappdir + '/sms_relentless/img/arrowDown.svg') {
2485
-                          $("#sendMsgReply").css("display", "block");
2486
-                          if ($(window).width() > 600) {
2487
-                              $("#listAllMsgsConv").css("height", "618px");
2488
-                          } else {
2489
-                              $("#listAllMsgsConv").css("height", parseInt($(window).height() - 32) + "px");
2490
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 304) + "px");
2491
-                          }
2492
-	                  $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowUp.svg');
2493
-                          $(this).attr('title', 'Collapse');
2494
-
2495
-	              } else {
2496
-
2497
-                          $("#sendMsgReply").css("display", "none");
2498
-                          if ($(window).width() > 600) {
2499
-                              $("#listAllMsgsConv").css("height", "490px");
2500
-                          } else {
2501
-                              $("#listAllMsgsConv").css("height", parseInt($(window).height() - 120) + "px");
2502
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 232) + "px");
2503
-                          }
2504
-                          $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowDown.svg');
2505
-                          $(this).attr('title', 'Expand to send a reply');
2506
-	              }
2507
-	           });
2508
-
2509
-
2510
-                   // Send a message from the 'conversation' window
2511
-                   $("#sendMsgConvBtn").click(function() {
2512
-
2513
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
2514
-                      var msgToSend = $("#sendMsgConvText").val();
2515
-                      var selectedid = $("#selectFromNbConv").val();
2516
-                      var toNumber = $("#toNmbrConv").text();
2517
-                      var receiversNumbers = [toNumber];
2518
-
2519
-		      if (selectedid != '') { 
2520
-
2521
-			  var sendersplit = selectedid.split(":");
2522
-			  var providercap = sendersplit[0];
2523
-			  var provsec = sendersplit[1];
2524
-
2525
-			  if (/[a-zA-Z]/.test(provsec)) {
2526
-			      var alphanumcheck = true;
2527
-			  } else { var alphanumcheck = false; }
2528
-
2529
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
2530
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2531
-			      var selectedsender = "+" + senderproc;
2532
-			      var providerUsed = "telnyx";
2533
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
2534
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
2535
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
2536
-			      var providerUsed = "plivo";
2537
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
2538
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
2539
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2540
-			      var selectedsender = "+" + senderproc;
2541
-			      var providerUsed = "twilio";
2542
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
2543
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
2544
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2545
-			      var selectedsender = "+" + senderproc;
2546
-			      var providerUsed = "flowroute";
2547
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
2548
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
2549
-			      var selectedsender = provsec;
2550
-			      var providerUsed = "telnyx";
2551
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
2552
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
2553
-			      var selectedsender = provsec;
2554
-			      var providerUsed = "plivo";
2555
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
2556
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
2557
-			      var selectedsender = provsec;
2558
-			      var providerUsed = "twilio";
2559
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
2560
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
2561
-			      var selectedsender = provsec;
2562
-			      var providerUsed = "flowroute";
2563
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
2564
-			  }
2565
-
2566
-                          var uploadedtomms = [];
2567
-
2568
-	                  if (msgToSend != '') {
2569
-
2570
-				  $.ajax({
2571
-				     url: relbaseUrl + '/' + userid,
2572
-				     type: "POST",
2573
-				     data: {
2574
-				           receiversPhoneNbs: receiversNumbers,
2575
-				           fromsender: selectedsender,
2576
-				           waitinterval: 1000,
2577
-				           sentsmstext: msgToSend,
2578
-				           ismms: 0,
2579
-				           mmsfiles: uploadedtomms
2580
-				         },
2581
-				     success: function(displayname) {
2582
-
2583
-                                           var tzdate = new Date();
2584
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
2585
-                                           var presDatedb = presDatest.split(".")[0];
2586
-                                           var presDatesc = presDatedb.split("T");
2587
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
2588
-                                           var sentMessageStatus = '';
2589
-
2590
-                                           if (displayname) {
2591
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
2592
-                                           } else { var msgToSendproc = msgToSend; }
2593
-
2594
-                                           $("#msgListRowCell").append("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ selectedsender +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ receiversNumbers[0] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ msgToSendproc +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ presDate +"</div><div class='sentMssgStatus'>"+ sentMessageStatus +"</div></div>");
2595
-
2596
-                                           // Scroll down to the bottom of the window
2597
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
2598
-
2599
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2600
-				     },
2601
-				     error: function() {
2602
-				           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
2603
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2604
-				     }
2605
-				  });
2606
-			  } else {
2607
-				  showAlert("Please enter a message in the text box!");
2608
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2609
-			  }
2610
-		      } else {
2611
-			      showAlert("Please choose a Sender ID from the 'From' drop-down list!");
2612
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2613
-		      }
2614
-                   });
2615
-
2616
-
2617
-	           // Make the window draggable
2618
-	           function makeMgrWndDraggable(e) {
2619
-
2620
-			   window.pmdragging = {};
2621
-			   pmdragging.pageX0 = e.pageX;
2622
-			   pmdragging.pageY0 = e.pageY;
2623
-			   pmdragging.elem = $("#listAllMsgsConv");
2624
-			   pmdragging.offset0 = $("#listAllMsgsConv").offset();
2625
-
2626
-			   function handle_dragging(e) {
2627
-			       let left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
2628
-			       let top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
2629
-			       $(pmdragging.elem).offset({top: top, left: left});
2630
-			   }
2631
-
2632
-			   function handle_mouseup(e) {
2633
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
2634
-			   }
2635
-
2636
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
2637
-	           }
2638
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
2639
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
2640
-
2641
-
2642
-                   // Append the available phone numbers to the From drop-down list
2643
-                   var availPhoneNmbrs = [];
2644
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
2645
-                      var crtphnmbr = $(this).attr("value");
2646
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
2647
-                   });
2648
-
2649
-                   if (availPhoneNmbrs.length > 0) {
2650
-                       var avphopt = "";
2651
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
2652
-                            if (availPhoneNmbrs[d].indexOf(phNumberFrom) === -1) {
2653
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
2654
-                            } else {
2655
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"' selected>"+ availPhoneNmbrs[d] +"</option>";
2656
-                            }
2657
-                       }
2658
-                       $("#selectFromNbConv").append(avphopt);
2659
-
2660
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
2661
-
2662
-
2663
-                   // Get the messages exchanged between the current 2 phone numbers, from the database
2664
-                   function getMsgsForNumbersSec(phNumberFrom, phNumberTo) {
2665
-
2666
-			   let getGrpConvUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedforreply");
2667
-
2668
-			   $('#listAllMsgsConv').addClass('icon-loading');
2669
-			   let totalPhNmbrs = 0;
2670
-
2671
-			   $.ajax({
2672
-				  method: 'POST',
2673
-				  url: getGrpConvUrl + '/' + userid,
2674
-				  contentType: 'application/json',
2675
-		                  data: JSON.stringify({ "phoneNmbrFrom": phNumberFrom, "phoneNmbrTo": phNumberTo }),
2676
-				  success: function(groupedperconv) {
2677
-
2678
-					     $('#listAllMsgsConv').removeClass('icon-loading');
2679
-
2680
-					     let fromtoNmbrsData = [];
2681
-
2682
-					     for (let i = 0; i < groupedperconv.length; i++) {
2683
-
2684
-						     if (groupedperconv[i].author_displayname) {
2685
-							 var authordnm = groupedperconv[i].author_displayname;
2686
-						     } else { 
2687
-							 var authordnm = '';
2688
-						     }
2689
-
2690
-						     var sentfromnmbrarr = groupedperconv[i].from.split(": ");
2691
-						     if (sentfromnmbrarr[1]) {
2692
-							 var groupednbfrom = sentfromnmbrarr[1];
2693
-						     } else {
2694
-							 var groupednbfrom = sentfromnmbrarr[0];
2695
-						     }
2696
-
2697
-						     var modmessagerec = '';
2698
-						     if (groupedperconv[i].author_displayname) {
2699
-							 modmessagerec = "<span class='msgAuthorNameGrp'>"+ groupedperconv[i].author_displayname + ":</span>" + groupedperconv[i].message;
2700
-						     } else {
2701
-					                 modmessagerec = groupedperconv[i].message;
2702
-		                                     }
2703
-
2704
-						     if (groupedperconv[i].to.indexOf(": ") > -1) {
2705
-						         var groupednmbrtopre = groupedperconv[i].to.split(": ");
2706
-						         var groupednmbrto = groupednmbrtopre[1];
2707
-						     } else { 
2708
-						         var groupednmbrto = groupedperconv[i].to;
2709
-						     }
2710
-
2711
-						     fromtoNmbrsData.push({
2712
-						               'author_displayname': authordnm,
2713
-						               'from': groupednbfrom,
2714
-						               'to': groupednmbrto,
2715
-						               'message': modmessagerec,
2716
-						               'date': groupedperconv[i].date,
2717
-						               'status': groupedperconv[i].deliveryreceipt,
2718
-						               'table': groupedperconv[i].table
2719
-						     });
2720
-					     }
2721
-
2722
-
2723
-					     // Remove the duplicates
2724
-					     let noDupMsgData = [];
2725
-					     $.each(fromtoNmbrsData, function(i, e) {
2726
-						    let matchingData = $.grep(noDupMsgData, function(item) {
2727
-						            return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
2728
-						    });
2729
-						    if (matchingData.length === 0) {
2730
-							noDupMsgData.push(e);
2731
-						    }
2732
-					     });
2733
-
2734
-					     let messagesPerNmbr = {};
2735
-					     let msgsNamesPerNmbr = {};
2736
-					     let msgsNmbrsNames = {};
2737
-
2738
-					     let displayNamesarr = [];
2739
-					     let convData = [];
2740
-
2741
-					     for (let n = 0; n < noDupMsgData.length; n++) {
2742
-
2743
-					          if (noDupMsgData[n]['from'] == phNumberTo && noDupMsgData[n]['table'] == 'sent') {
2744
-
2745
-					              convData.push({
2746
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
2747
-					                             'message': noDupMsgData[n]['message'],
2748
-					                             'from': noDupMsgData[n]['from'],
2749
-					                             'to': noDupMsgData[n]['to'],
2750
-					                             'date': noDupMsgData[n]['date'],
2751
-					                             'direction': 'sent_from',
2752
-					                             'status': noDupMsgData[n]['status'],
2753
-					                             'table': noDupMsgData[n]['table']
2754
-					              });
2755
-
2756
-					          } else if (noDupMsgData[n]['to'] == phNumberTo && noDupMsgData[n]['table'] == 'sent') {
2757
-
2758
-					              convData.push({
2759
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
2760
-					                             'message': noDupMsgData[n]['message'],
2761
-					                             'from': noDupMsgData[n]['from'],
2762
-					                             'to': noDupMsgData[n]['to'],
2763
-					                             'date': noDupMsgData[n]['date'],
2764
-					                             'direction': 'sent_to',
2765
-					                             'status': noDupMsgData[n]['status'],
2766
-					                             'table': noDupMsgData[n]['table']
2767
-					              });
2768
-
2769
-
2770
-					          } else if (noDupMsgData[n]['from'] == phNumberTo && noDupMsgData[n]['table'] == 'received') {
2771
-
2772
-					              convData.push({
2773
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
2774
-					                             'message': noDupMsgData[n]['message'],
2775
-					                             'from': noDupMsgData[n]['from'],
2776
-					                             'to': noDupMsgData[n]['to'],
2777
-					                             'date': noDupMsgData[n]['date'],
2778
-					                             'direction': 'received_from',
2779
-					                             'status': noDupMsgData[n]['status'],
2780
-					                             'table': noDupMsgData[n]['table']
2781
-					              });
2782
-
2783
-					          } else if (noDupMsgData[n]['to'] == phNumberTo && noDupMsgData[n]['table'] == 'received') {
2784
-
2785
-					              convData.push({
2786
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
2787
-					                             'message': noDupMsgData[n]['message'],
2788
-					                             'from': noDupMsgData[n]['from'],
2789
-					                             'to': noDupMsgData[n]['to'],
2790
-					                             'date': noDupMsgData[n]['date'],
2791
-					                             'direction': 'received_on',
2792
-					                             'status': noDupMsgData[n]['status'],
2793
-					                             'table': noDupMsgData[n]['table']
2794
-					              });
2795
-					          }
2796
-					     }
2797
-
2798
-					     // Sort messages by date
2799
-					     convData.sort(function(a, b) {
2800
-                                                return new Date(b.date) - new Date(a.date);
2801
-					     });
2802
-
2803
-					     // Collect the display names of the users that sent messages from the current numbers
2804
-					     let selectedNames = [];
2805
-					     let displayNames = '';
2806
-					     for (let v = 0; v < convData.length; v++) {
2807
-					          if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) {
2808
-					              selectedNames.push(convData[v]['author_displayname']);
2809
-					              displayNames += "<div id='diplNm_"+ phNumberTo +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
2810
-					          }
2811
-					     }
2812
-					     displayNames += "<div id='diplNmAllMsgcv' class='dispNameListAll' title='Show all the messages exchanged between the current 2 phone numbers.'>All messages</div>";
2813
-
2814
-					     // Store the display names for the current numbers, to be able to see them later
2815
-					     let ctPhNumber = phNumberTo;
2816
-					     msgsNamesPerNmbr[ctPhNumber] = displayNames;
2817
-
2818
-					     // Store the messages sent by each user, to be able to see them later when clicking on the user's name
2819
-					     for (let h = 0; h < selectedNames.length; h++) {
2820
-
2821
-					          let rowMessageArrpn = [];
2822
-					          for (let b = 0; b < convData.length; b++) {
2823
-
2824
-					               if (selectedNames[h] == convData[b]['author_displayname']) {
2825
-
2826
-							   if (convData[b]['direction'] == 'sent_from') {
2827
-							       if (convData[b]['status']) {
2828
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
2829
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
2830
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2831
-                                                                       } else {
2832
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2833
-                                                                       }
2834
-							           } else {
2835
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2836
-							           }
2837
-							       } else {
2838
-							           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2839
-							       }
2840
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
2841
-							   } else if (convData[b]['direction'] == 'sent_to') {
2842
-							       if (convData[b]['status']) {
2843
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
2844
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
2845
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2846
-                                                                       } else {
2847
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2848
-                                                                       }
2849
-							           } else {
2850
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2851
-							           }
2852
-							       } else {
2853
-							           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2854
-							       }
2855
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
2856
-							   } else if (convData[b]['direction'] == 'received_from') {
2857
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
2858
-							   } else if (convData[b]['direction'] == 'received_on') {
2859
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
2860
-					                   }
2861
-					               }
2862
-					          }
2863
-					          let crtNmber = phNumberTo;
2864
-					          let crtName = selectedNames[h];
2865
-					          msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
2866
-		                                  msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
2867
-					     }
2868
-
2869
-		                             // The number of messages to be loaded by default
2870
-		                             let nmbTblDefault = 50;
2871
-
2872
-		                             // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
2873
-		                             if (convData.length > nmbTblDefault) {
2874
-		                                 $("#loadMoreMsgs").css("display", "block");
2875
-		                                 var nmbToBeLoaded = nmbTblDefault;
2876
-		                             } else { var nmbToBeLoaded = convData.length; }
2877
-
2878
-					     let rowMessageArr = [];
2879
-					     for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
2880
-
2881
-					          if (convData[m]['direction'] == 'sent_from') {
2882
-					              if (convData[m]['status']) {
2883
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
2884
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
2885
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2886
-                                                              } else {
2887
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2888
-                                                              }
2889
-						          } else {
2890
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2891
-						          }
2892
-					              } else {
2893
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2894
-					              }
2895
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
2896
-
2897
-					          } else if (convData[m]['direction'] == 'sent_to') {
2898
-					              if (convData[m]['status']) {
2899
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
2900
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
2901
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2902
-                                                              } else {
2903
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2904
-                                                              }
2905
-						          } else {
2906
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2907
-						          }
2908
-					              } else {
2909
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2910
-					              }
2911
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
2912
-
2913
-					          } else if (convData[m]['direction'] == 'received_from') {
2914
-
2915
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2916
-
2917
-					          } else if (convData[m]['direction'] == 'received_on') {
2918
-
2919
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2920
-					          }
2921
-					     }
2922
-
2923
-					     let convDataPerNmbr = rowMessageArr.join("");
2924
-
2925
-		                             $("#grpdbynamelst").empty();
2926
-		                             $("#grpdbynamelst").append(displayNames);
2927
-		                             $("#msgListRowCell").empty();
2928
-		                             $("#msgListRowCell").append(convDataPerNmbr);
2929
-
2930
-					     // Store the messages for the current To number, to be able to see them later
2931
-					     let rowMessageArrcpt = [];
2932
-					     for (let m = 0; m < convData.length; m++) {
2933
-
2934
-					          if (convData[m]['direction'] == 'sent_from') {
2935
-					              if (convData[m]['status']) {
2936
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
2937
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
2938
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2939
-                                                              } else {
2940
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2941
-                                                              }
2942
-						          } else {
2943
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2944
-						          }
2945
-					              } else {
2946
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2947
-					              }
2948
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
2949
-
2950
-					          } else if (convData[m]['direction'] == 'sent_to') {
2951
-					              if (convData[m]['status']) {
2952
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
2953
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
2954
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2955
-                                                              } else {
2956
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2957
-                                                              }
2958
-						          } else {
2959
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2960
-						          }
2961
-					              } else {
2962
-					                  let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2963
-					              }
2964
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
2965
-
2966
-					          } else if (convData[m]['direction'] == 'received_from') {
2967
-
2968
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2969
-
2970
-					          } else if (convData[m]['direction'] == 'received_on') {
2971
-
2972
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2973
-					          }
2974
-					     }
2975
-
2976
-					     messagesPerNmbr[phNumberTo] = rowMessageArrcpt;
2977
-
2978
-		                             // Scroll down to the bottom of the window
2979
-		                             $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
2980
-
2981
-		                             // Load more messages
2982
-		                             let clickNmb = 0;
2983
-		                             $("#loadMoreMsgs").click(function() {
2984
-
2985
-		                                 clickNmb++;
2986
-
2987
-		                                 var crefnb = (clickNmb + 1) * nmbToBeLoaded;
2988
-
2989
-		                                 if (crefnb > convData.length) {
2990
-		                                     var nmbmsg = convData.length - 1;
2991
-		                                     $("#loadMoreMsgs").css("display", "none");
2992
-		                                 } else { 
2993
-		                                     var nmbmsg = crefnb - 1;
2994
-		                                 }
2995
-
2996
-		                                 var rowMessageArrAdd = [];
2997
-
2998
-		                                 for (let m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
2999
-
3000
-					              if (convData[m]['direction'] == 'sent_from') {
3001
-					                  if (convData[m]['status']) {
3002
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3003
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
3004
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3005
-                                                                  } else {
3006
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3007
-                                                                  }
3008
-						              } else {
3009
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3010
-						              }
3011
-					                  } else {
3012
-					                          let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3013
-					                  }
3014
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3015
-
3016
-					              } else if (convData[m]['direction'] == 'sent_to') {
3017
-					                  if (convData[m]['status']) {
3018
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3019
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
3020
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3021
-                                                                  } else {
3022
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3023
-                                                                  }
3024
-						              } else {
3025
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3026
-						              }
3027
-					                  } else {
3028
-					                      let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3029
-					                  }
3030
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3031
-
3032
-					              } else if (convData[m]['direction'] == 'received_from') {
3033
-
3034
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3035
-
3036
-					              } else if (convData[m]['direction'] == 'received_on') {
3037
-
3038
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3039
-					              }
3040
-		                                 }
3041
-
3042
-					         let convDataPerNmbrad = rowMessageArrAdd.join("");
3043
-
3044
-		                                 let scrlheight = $("#msgListRowCell").height();
3045
-		                                 $("#msgListRowCell").prepend(convDataPerNmbrad);
3046
-
3047
-		                                 $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
3048
-		                             });
3049
-
3050
-
3051
-					     // Show the messages sent by each user whose name is clicked
3052
-					     $('[id*="diplNm_"]').click(function() {
3053
-
3054
-					         let crntNmbr = $(this).attr("id").split("_")[1];
3055
-					         let crntDisName = $(this).attr("name");                               
3056
-		                                 $("#loadMoreMsgs").css("display", "none");
3057
-
3058
-		                                 let convDataprn = [];
3059
-		                                 $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
3060
-		                                        convDataprn.push(item);
3061
-		                                 });
3062
-
3063
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3064
-		                                 if (convDataprn.length > nmbTblDefault) {
3065
-		                                     $("#loadMoreMsgsusr").css("display", "block");
3066
-		                                     let nmbToBeLoaded = nmbTblDefault;
3067
-		                                 } else {
3068
-		                                     $("#loadMoreMsgsusr").css("display", "none");
3069
-		                                     let nmbToBeLoaded = convDataprn.length;
3070
-		                                 }
3071
-
3072
-					         let rowMessageArrprnst = [];
3073
-
3074
-					         for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
3075
-		                                      rowMessageArrprnst.push(convDataprn[n]);
3076
-					         }
3077
-
3078
-					         let convDataPerNmbrprnst = rowMessageArrprnst.join("");
3079
-
3080
-		                                 $("#msgListRowCell").empty();
3081
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
3082
-
3083
-		                                 // Scroll down to the bottom of the window
3084
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3085
-
3086
-		                                 // Load more messages
3087
-		                                 let clckNb = 0;
3088
-		                                 $("#loadMoreMsgsusr").unbind("click");
3089
-		                                 $("#loadMoreMsgsusr").click(function() {
3090
-
3091
-		                                     clckNb++;
3092
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
3093
-
3094
-		                                     $("#loadMoreMsgs").css("display", "none");
3095
-
3096
-		                                     if (crefnb > convDataprn.length) {
3097
-		                                         var nmbmsg = convDataprn.length - 1;
3098
-		                                         $("#loadMoreMsgsusr").css("display", "none");
3099
-		                                     } else { 
3100
-		                                         var nmbmsg = crefnb - 1;
3101
-		                                         $("#loadMoreMsgsusr").css("display", "block");
3102
-		                                     }
3103
-
3104
-		                                     var rowMessageArrAddst = [];
3105
-
3106
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
3107
-
3108
-		                                          rowMessageArrAddst.push(convDataprn[q]);
3109
-		                                     }
3110
-
3111
-					             var convDataPerNmbradst = rowMessageArrAddst.join("");
3112
-
3113
-		                                     var scrlheight = $("#msgListRowCell").height();
3114
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
3115
-
3116
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
3117
-		                                 });
3118
-
3119
-
3120
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
3121
-					         $("#diplNmAllMsgcv").css("color", "#04957b");
3122
-					         $(this).css("color", "#1b8efe");
3123
-					     });
3124
-
3125
-
3126
-					     // Show again all the messages sent/received to/from the clicked number
3127
-					     $("#diplNmAllMsgcv").click(function() {
3128
-
3129
-		                                 $("#loadMoreMsgsusr").css("display", "none");
3130
-
3131
-		                                 let convDataprn = [];
3132
-		                                 $.each(messagesPerNmbr[phNumberTo], function(index, item) {
3133
-		                                        convDataprn.push(item);
3134
-		                                 });
3135
-
3136
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3137
-		                                 if (convDataprn.length > nmbTblDefault) {
3138
-		                                     $("#loadMoreMsgs").css("display", "block");
3139
-		                                     let nmbToBeLoaded = nmbTblDefault;
3140
-		                                 } else {
3141
-		                                     $("#loadMoreMsgs").css("display", "none");
3142
-		                                     let nmbToBeLoaded = convDataprn.length;
3143
-		                                 }
3144
-
3145
-					         let rowMessageArrprnst = [];
3146
-
3147
-					         for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
3148
-		                                      rowMessageArrprnst.push(convDataprn[n]);
3149
-					         }
3150
-
3151
-					         let convDataPerNmbrprnst = rowMessageArrprnst.join("");
3152
-
3153
-		                                 $("#msgListRowCell").empty();
3154
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
3155
-
3156
-		                                 // Scroll down to the bottom of the window
3157
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3158
-
3159
-
3160
-		                                 // Load more messages
3161
-		                                 let clckNb = 0;
3162
-		                                 $("#loadMoreMsgs").unbind("click");
3163
-		                                 $("#loadMoreMsgs").click(function() {
3164
-
3165
-		                                     clckNb++;
3166
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
3167
-
3168
-		                                     $("#loadMoreMsgsusr").css("display", "none");
3169
-
3170
-		                                     if (crefnb > convDataprn.length) {
3171
-		                                         var nmbmsg = convDataprn.length - 1;
3172
-		                                         $("#loadMoreMsgs").css("display", "none");
3173
-		                                     } else { 
3174
-		                                         var nmbmsg = crefnb - 1;
3175
-		                                         $("#loadMoreMsgs").css("display", "block");
3176
-		                                     }
3177
-
3178
-		                                     var rowMessageArrAddst = [];
3179
-
3180
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
3181
-
3182
-		                                          rowMessageArrAddst.push(convDataprn[q]);
3183
-		                                     }
3184
-
3185
-					             var convDataPerNmbradst = rowMessageArrAddst.join("");
3186
-
3187
-		                                     var scrlheight = $("#msgListRowCell").height();
3188
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
3189
-
3190
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
3191
-		                                 });
3192
-
3193
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
3194
-					         $("#diplNmAllMsgcv").css("color", "#04957b");
3195
-					         $(this).css("color", "#04c6a4");
3196
-					     });
3197
-
3198
-
3199
-					     // Show the scroll-up arrow
3200
-					     $("#frmMsgLstWrap").scroll(function() {
3201
-						if ($(this).scrollTop() > 900) {
3202
-						      $('#upArrowSmall').fadeIn();
3203
-						} else {
3204
-						      $('#upArrowSmall').fadeOut();
3205
-						}
3206
-					     });
3207
-
3208
-					     $("#upArrowSmall").unbind("click");
3209
-					     $("#upArrowSmall").click(function() {
3210
-						$("#frmMsgLstWrap").animate({scrollTop : 0},400);
3211
-					     });
3212
-
3213
-
3214
-					     // Download MMS files when clicking on their URLs
3215
-					     $('[id^="mmsTblUrl-"]').on('click', function(evt) {
3216
-
3217
-					        var clckedUrl = $(this).text();
3218
-					        var flNamearr = clckedUrl.split("/");
3219
-					        var flName = flNamearr.reverse()[0];
3220
-
3221
-					        confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
3222
-
3223
-					        $("#confirmOk").click(function() {
3224
-
3225
-					           $("#alertMsgOverlay").remove();
3226
-					           $("#alertConfMessage").remove();
3227
-
3228
-					           var mmsLink = document.createElement("a");
3229
-					           mmsLink.setAttribute('href', clckedUrl);
3230
-					           mmsLink.setAttribute('download', flName);
3231
-                                                   mmsLink.setAttribute('target', '_blank');
3232
-					           document.body.appendChild(mmsLink);
3233
-					           mmsLink.click();
3234
-					           mmsLink.remove();
3235
-					        });
3236
-
3237
-					        $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
3238
-					     });
3239
-
3240
-				  },
3241
-				  error: function() {
3242
-					     showAlert("Error while attempting to get message data from the database!");
3243
-					     $('#listAllMsgsConv').removeClass('icon-loading');
3244
-				  }
3245
-			   });
3246
-                   }
3247
-
3248
-                   getMsgsForNumbersSec(phNumberFrom, phNumberTo);
3249
-
3250
-                   $("#refreshMsgsConv").click(function() { getMsgsForNumbersSec(phNumberFrom, phNumberTo); setTimeout(function() { $("#diplNmAllMsgcv").click(); }, 1000); });
3251
-                }
3252
-
3253
-                $('[id^="showMsgConv-"]').click(function() {
3254
-
3255
-                   let ctrwnmbr = $(this).attr("id").replace("showMsgConv-", "");
3256
-                   let phNumberFrom = $("#frmNmbr-"+ ctrwnmbr).text().split(": ")[1];
3257
-                   let phNumberTo = $("#toNmbr-"+ ctrwnmbr).text();
3258
-
3259
-                   showSentMsgPerConv(phNumberFrom, phNumberTo);
3260
-                });
3261
-
3262
-
3263
-                // Show the pop-up window that lists all the messages sent/received to/from a phone number
3264
-                function showMsgPerNmbr(clckPhNumber) {
3265
-
3266
-                   var allfrmtomsg = "<div id='listAllMsgsFromTo'>";
3267
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='cursor:grab'></div>";
3268
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
3269
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages sent/received to/from  <span style='color:#04957b'>"+ clckPhNumber +"</span></div>";
3270
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
3271
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
3272
-                   allfrmtomsg += "<tr class='groupedrowsbody'><td><div id='grpdbynamelst' class='groupedLstNamespn'></div></td><td><div id='loadMoreMsgs' title='Click to load older messages.'>Load more messages</div><div id='loadMoreMsgsusr' title='Click to load older messages.'>Load more messages</div><div id='msgListRowCell' class='groupedLstMsgspn'></div><div id='refreshMsgsWraptf'><div id='refreshMsgsConvtf' title='Refresh list of messages'></div></div><div id='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
3273
-                   allfrmtomsg += "</table></div>";
3274
-                   allfrmtomsg += "<div id='sendMsgReply'><table id='sendMsgConv'><tr><td><div id='fromPhoneNmbrConv'>From: <select id='selectFromNbConv'></select></div><div id='toPhoneNmbrConv'>To: <span id='toNmbrConv' style='color:#04957b'>"+ clckPhNumber +"</span></div></td></tr>";
3275
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS.'></textarea></td></tr></table>";
3276
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
3277
-                   allfrmtomsg += "<div id='expandWindowRplCtn' title='Expand to send a message'><img id='expandWindowRpl' src='/" + ctappdir + "/sms_relentless/img/arrowDown.svg'></div>";
3278
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;cursor:grab;'></div>";
3279
-                   allfrmtomsg += "</div>";
3280
-
3281
-                   $("#content").append("<div id='recTblOverlay'></div>");
3282
-                   $("#content").append(allfrmtomsg);
3283
-
3284
-                   var topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
3285
-                   var leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
3286
-                   $("#listAllMsgsFromTo").css({ "top" : topDist, "left" : leftDist });
3287
-
3288
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
3289
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
3290
-
3291
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
3292
-                   $("#expandWindowRpl").unbind("click");
3293
-	           $("#expandWindowRpl").click(function() {
3294
-
3295
-	              if ($(this).attr('src') == '/' + ctappdir + '/sms_relentless/img/arrowDown.svg') {
3296
-                          $("#sendMsgReply").css("display", "block");
3297
-                          if ($(window).width() > 600) {
3298
-                              $("#listAllMsgsFromTo").css("height", "618px");
3299
-                          } else {
3300
-                              $("#listAllMsgsFromTo").css("height", parseInt($(window).height() - 32) + "px");
3301
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 304) + "px");
3302
-                          }
3303
-	                  $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowUp.svg');
3304
-                          $(this).attr('title', 'Collapse');
3305
-
3306
-	              } else {
3307
-
3308
-                          $("#sendMsgReply").css("display", "none");
3309
-                          if ($(window).width() > 600) {
3310
-                              $("#listAllMsgsFromTo").css("height", "490px");
3311
-                          } else {
3312
-                              $("#listAllMsgsFromTo").css("height", parseInt($(window).height() - 120) + "px");
3313
-                              $("#frmMsgLstWrap").css("height", parseInt($(window).height() - 232) + "px");
3314
-                          }
3315
-                          $(this).attr('src', '/' + ctappdir + '/sms_relentless/img/arrowDown.svg');
3316
-                          $(this).attr('title', 'Expand to send a reply');
3317
-	              }
3318
-	           });
3319
-
3320
-
3321
-                   // Send a message from the 'conversation' window
3322
-                   $("#sendMsgConvBtn").click(function() {
3323
-
3324
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
3325
-                      var msgToSend = $("#sendMsgConvText").val();
3326
-                      var selectedid = $("#selectFromNbConv").val();
3327
-                      var toNumber = $("#toNmbrConv").text();
3328
-                      var receiversNumbers = [toNumber];
3329
-
3330
-		      if (selectedid != '') {
3331
-
3332
-			  var sendersplit = selectedid.split(":");
3333
-			  var providercap = sendersplit[0];
3334
-			  var provsec = sendersplit[1];
3335
-
3336
-			  if (/[a-zA-Z]/.test(provsec)) {
3337
-			      var alphanumcheck = true;
3338
-			  } else { var alphanumcheck = false; }
3339
-
3340
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
3341
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
3342
-			      var selectedsender = "+" + senderproc;
3343
-			      var providerUsed = "telnyx";
3344
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
3345
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
3346
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
3347
-			      var providerUsed = "plivo";
3348
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
3349
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
3350
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
3351
-			      var selectedsender = "+" + senderproc;
3352
-			      var providerUsed = "twilio";
3353
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
3354
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
3355
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
3356
-			      var selectedsender = "+" + senderproc;
3357
-			      var providerUsed = "flowroute";
3358
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
3359
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
3360
-			      var selectedsender = provsec;
3361
-			      var providerUsed = "telnyx";
3362
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
3363
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
3364
-			      var selectedsender = provsec;
3365
-			      var providerUsed = "plivo";
3366
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
3367
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
3368
-			      var selectedsender = provsec;
3369
-			      var providerUsed = "twilio";
3370
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
3371
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
3372
-			      var selectedsender = provsec;
3373
-			      var providerUsed = "flowroute";
3374
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
3375
-			  }
3376
-
3377
-                          var uploadedtomms = [];
3378
-
3379
-	                  if (msgToSend != '') {
3380
-
3381
-				  $.ajax({
3382
-				     url: relbaseUrl + '/' + userid,
3383
-				     type: "POST",
3384
-				     data: {
3385
-				           receiversPhoneNbs: receiversNumbers,
3386
-				           fromsender: selectedsender,
3387
-				           waitinterval: 1000,
3388
-				           sentsmstext: msgToSend,
3389
-				           ismms: 0,
3390
-				           mmsfiles: uploadedtomms
3391
-				         },
3392
-				     success: function(displayname) {
3393
-
3394
-                                           var tzdate = new Date();
3395
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
3396
-                                           var presDatedb = presDatest.split(".")[0];
3397
-                                           var presDatesc = presDatedb.split("T");
3398
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
3399
-                                           var sentMessageStatus = '';
3400
-
3401
-                                           if (displayname) {
3402
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
3403
-                                           } else { var msgToSendproc = msgToSend; }
3404
-
3405
-                                           $("#msgListRowCell").append("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ selectedsender +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ receiversNumbers[0] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ msgToSendproc +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ presDate +"</div><div class='sentMssgStatus'>"+ sentMessageStatus +"</div></div>");
3406
-
3407
-                                           // Scroll down to the bottom of the window
3408
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3409
-
3410
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
3411
-				     },
3412
-				     error: function() {
3413
-				           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
3414
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
3415
-				     }
3416
-				  });
3417
-			  } else {
3418
-				  showAlert("Please enter a message in the text box!");
3419
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
3420
-			  }
3421
-		      } else {
3422
-			      showAlert("Please choose a Sender ID from the 'From' drop-down list!");
3423
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
3424
-		      }
3425
-
3426
-                   });
3427
-
3428
-
3429
-	           // Make the window draggable
3430
-	           function makeMgrWndDraggable(e) {
3431
-
3432
-			   window.pmdragging = {};
3433
-			   pmdragging.pageX0 = e.pageX;
3434
-			   pmdragging.pageY0 = e.pageY;
3435
-			   pmdragging.elem = $("#listAllMsgsFromTo");
3436
-			   pmdragging.offset0 = $("#listAllMsgsFromTo").offset();
3437
-
3438
-			   function handle_dragging(e) {
3439
-			       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
3440
-			       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
3441
-			       $(pmdragging.elem).offset({top: top, left: left});
3442
-			   }
3443
-
3444
-			   function handle_mouseup(e) {
3445
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
3446
-			   }
3447
-
3448
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
3449
-	           }
3450
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
3451
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
3452
-
3453
-
3454
-                   // Append the available phone numbers to the From drop-down list
3455
-                   var availPhoneNmbrs = [];
3456
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
3457
-                      var crtphnmbr = $(this).attr("value");
3458
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
3459
-                   });
3460
-
3461
-                   if (availPhoneNmbrs.length > 0) {
3462
-                       var avphopt = "";
3463
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
3464
-                            avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
3465
-                       }
3466
-                       $("#selectFromNbConv").append(avphopt);
3467
-
3468
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
3469
-
3470
-
3471
-                   // Get the sent/received messages for the current phone number, from the database
3472
-                   function getMsgsPerNmbrSec(clckPhNumber) {
3473
-
3474
-			   var getGroupedPnUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedpernumber");
3475
-
3476
-			   $('#listAllMsgsFromTo').addClass('icon-loading');
3477
-			   var totalPhNmbrs = 0;
3478
-
3479
-			   $.ajax({
3480
-				  method: 'POST',
3481
-				  url: getGroupedPnUrl + '/' + userid,
3482
-				  contentType: 'application/json',
3483
-		                  data: JSON.stringify({ "phoneNumber": clckPhNumber }),
3484
-				  success: function(groupedpernb) {
3485
-
3486
-					     $('#listAllMsgsFromTo').removeClass('icon-loading');
3487
-
3488
-					     var fromtoNmbrsData = [];
3489
-
3490
-					     for (var i = 0; i < groupedpernb.length; i++) {
3491
-
3492
-						     if (groupedpernb[i].author_displayname) {
3493
-							 var authordnm = groupedpernb[i].author_displayname;
3494
-						     } else { 
3495
-							 var authordnm = '';
3496
-						     }
3497
-
3498
-						     var sentfromnmbrarr = groupedpernb[i].from.split(": ");
3499
-						     if (sentfromnmbrarr[1]) {
3500
-							 var groupednbfrom = sentfromnmbrarr[1];
3501
-						     } else {
3502
-							 var groupednbfrom = sentfromnmbrarr[0];
3503
-						     }
3504
-
3505
-						     var modmessagesent = '';
3506
-						     if (groupedpernb[i].author_displayname) {
3507
-							 modmessagesent = "<span class='msgAuthorNameGrp'>"+ groupedpernb[i].author_displayname + ":</span>" + groupedpernb[i].message;
3508
-						     } else {
3509
-					                 modmessagesent = groupedpernb[i].message;
3510
-		                                     }
3511
-
3512
-						     if (groupedpernb[i].to.indexOf(": ") > -1) {
3513
-						         var groupednmbrtopre = groupedpernb[i].to.split(": ");
3514
-						         var groupednmbrto = groupednmbrtopre[1];
3515
-						     } else { 
3516
-						         var groupednmbrto = groupedpernb[i].to;
3517
-						     }
3518
-
3519
-						     fromtoNmbrsData.push({
3520
-						               'author_displayname': authordnm,
3521
-						               'from': groupednbfrom,
3522
-						               'to': groupednmbrto,
3523
-						               'message': modmessagesent,
3524
-						               'date': groupedpernb[i].date,
3525
-						               'status': groupedpernb[i].deliveryreceipt,
3526
-						               'table': groupedpernb[i].table
3527
-						     });
3528
-					     }
3529
-
3530
-
3531
-					     // Remove the duplicates
3532
-					     var noDupMsgData = [];
3533
-					     $.each(fromtoNmbrsData, function(i, e) {
3534
-						    var matchingData = $.grep(noDupMsgData, function(item) {
3535
-						            return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
3536
-						    });
3537
-						    if (matchingData.length === 0) {
3538
-							noDupMsgData.push(e);
3539
-						    }
3540
-					     });
3541
-
3542
-					     var messagesPerNmbr = {};
3543
-					     var msgsNamesPerNmbr = {};
3544
-					     var msgsNmbrsNames = {};
3545
-
3546
-					     var displayNamesarr = [];
3547
-					     var convData = [];
3548
-
3549
-					     for (var n = 0; n < noDupMsgData.length; n++) {
3550
-
3551
-					          if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
3552
-
3553
-					              convData.push({
3554
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
3555
-					                             'message': noDupMsgData[n]['message'],
3556
-					                             'from': noDupMsgData[n]['from'],
3557
-					                             'to': noDupMsgData[n]['to'],
3558
-					                             'date': noDupMsgData[n]['date'],
3559
-					                             'direction': 'sent_from',
3560
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
3561
-					                             'table': noDupMsgData[n]['table']
3562
-					              });
3563
-
3564
-					          } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
3565
-
3566
-					              convData.push({
3567
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
3568
-					                             'message': noDupMsgData[n]['message'],
3569
-					                             'from': noDupMsgData[n]['from'],
3570
-					                             'to': noDupMsgData[n]['to'],
3571
-					                             'date': noDupMsgData[n]['date'],
3572
-					                             'direction': 'sent_to',
3573
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
3574
-					                             'table': noDupMsgData[n]['table']
3575
-					              });
3576
-
3577
-
3578
-					          } else if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
3579
-
3580
-					              convData.push({
3581
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
3582
-					                             'message': noDupMsgData[n]['message'],
3583
-					                             'from': noDupMsgData[n]['from'],
3584
-					                             'to': noDupMsgData[n]['to'],
3585
-					                             'date': noDupMsgData[n]['date'],
3586
-					                             'direction': 'received_from',
3587
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
3588
-					                             'table': noDupMsgData[n]['table']
3589
-					              });
3590
-
3591
-					          } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
3592
-
3593
-					              convData.push({
3594
-					                             'author_displayname': noDupMsgData[n]['author_displayname'],
3595
-					                             'message': noDupMsgData[n]['message'],
3596
-					                             'from': noDupMsgData[n]['from'],
3597
-					                             'to': noDupMsgData[n]['to'],
3598
-					                             'date': noDupMsgData[n]['date'],
3599
-					                             'direction': 'received_on',
3600
-					                             'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
3601
-					                             'table': noDupMsgData[n]['table']
3602
-					              });
3603
-					          }
3604
-					     }
3605
-
3606
-					     // Sort messages by date
3607
-					     convData.sort(function(a, b) {
3608
-                                                return new Date(b.date) - new Date(a.date);
3609
-					     });
3610
-
3611
-					     // Collect the display names of the users that sent messages from the current number
3612
-					     var selectedNames = [];
3613
-					     var displayNames = '';
3614
-					     for (var v = 0; v < convData.length; v++) {
3615
-					          if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
3616
-					              selectedNames.push(convData[v]['author_displayname']);
3617
-					              displayNames += "<div id='diplNm_"+ clckPhNumber +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
3618
-					          }
3619
-					     }
3620
-					     displayNames += "<div id='diplNmAllMsg' class='dispNameListAll' title='Show all the messages for this number.'>"+ clckPhNumber +"</div>";
3621
-
3622
-					     // Store the display names for the current number, to be able to see them later
3623
-					     var ctPhNumber = clckPhNumber;
3624
-					     msgsNamesPerNmbr[ctPhNumber] = displayNames;
3625
-
3626
-					     // Store the messages sent by each user, to be able to see them later when clicking on the user's name
3627
-					     for (var h = 0; h < selectedNames.length; h++) {
3628
-
3629
-					          var rowMessageArrpn = [];
3630
-					          for (var b = 0; b < convData.length; b++) {
3631
-
3632
-					               if (selectedNames[h] == convData[b]['author_displayname']) {
3633
-
3634
-							   if (convData[b]['direction'] == 'sent_from') {
3635
-							       if (convData[b]['status']) {
3636
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
3637
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
3638
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3639
-                                                                       } else {
3640
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3641
-                                                                       }
3642
-							           } else {
3643
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3644
-							           }
3645
-							       } else {
3646
-							           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3647
-							       }
3648
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3649
-							   } else if (convData[b]['direction'] == 'sent_to') {
3650
-							       if (convData[b]['status']) {
3651
-							           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
3652
-					                               if (convData[b]['status'].indexOf("undelivered") > -1) {
3653
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3654
-                                                                       } else {
3655
-							                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3656
-                                                                       }
3657
-							           } else {
3658
-							               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3659
-							           }
3660
-							       } else {
3661
-							           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3662
-							       }
3663
-							       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3664
-							   } else if (convData[b]['direction'] == 'received_from') {
3665
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
3666
-							   } else if (convData[b]['direction'] == 'received_on') {
3667
-							       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
3668
-					                   }
3669
-					               }
3670
-					          }
3671
-					          var crtNmber = clckPhNumber;
3672
-					          var crtName = selectedNames[h];
3673
-					          msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
3674
-		                                  msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
3675
-					     }
3676
-
3677
-		                             // The number of messages to be loaded by default
3678
-		                             var nmbTblDefault = 50;
3679
-
3680
-		                             // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3681
-		                             if (convData.length > nmbTblDefault) {
3682
-		                                 $("#loadMoreMsgs").css("display", "block");
3683
-		                                 var nmbToBeLoaded = nmbTblDefault;
3684
-		                             } else { var nmbToBeLoaded = convData.length; }
3685
-
3686
-					     var rowMessageArr = [];
3687
-					     for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
3688
-
3689
-					          if (convData[m]['direction'] == 'sent_from') {
3690
-					              if (convData[m]['status']) {
3691
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3692
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
3693
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3694
-                                                              } else {
3695
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3696
-                                                              }
3697
-						          } else {
3698
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3699
-						          }
3700
-					              } else {
3701
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3702
-					              }    
3703
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3704
-
3705
-					          } else if (convData[m]['direction'] == 'sent_to') {
3706
-					              if (convData[m]['status']) {
3707
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3708
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
3709
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3710
-                                                              } else {
3711
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3712
-                                                              }
3713
-						          } else {
3714
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3715
-						          }
3716
-					              } else {
3717
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3718
-					              }
3719
-					              rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3720
-
3721
-					          } else if (convData[m]['direction'] == 'received_from') {
3722
-
3723
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3724
-
3725
-					          } else if (convData[m]['direction'] == 'received_on') {
3726
-
3727
-						      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3728
-					          }
3729
-					     }
3730
-
3731
-					     var convDataPerNmbr = rowMessageArr.join("");
3732
-		                             $("#grpdbynamelst").empty();
3733
-		                             $("#grpdbynamelst").append(displayNames);
3734
-		                             $("#msgListRowCell").empty();
3735
-		                             $("#msgListRowCell").append(convDataPerNmbr);
3736
-
3737
-					     // Store the messages for the current number, to be able to see them later, when clicking on the number
3738
-					     var rowMessageArrcpt = [];
3739
-					     for (var m = 0; m < convData.length; m++) {
3740
-
3741
-					          if (convData[m]['direction'] == 'sent_from') {
3742
-					              if (convData[m]['status']) {
3743
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3744
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
3745
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3746
-                                                              } else {
3747
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3748
-                                                              }
3749
-						          } else {
3750
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3751
-						          }
3752
-					              } else {
3753
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3754
-					              }
3755
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3756
-
3757
-					          } else if (convData[m]['direction'] == 'sent_to') {
3758
-					              if (convData[m]['status']) {
3759
-						          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3760
-				                              if (convData[m]['status'].indexOf("undelivered") > -1) {
3761
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3762
-                                                              } else {
3763
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3764
-                                                              }
3765
-						          } else {
3766
-						              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3767
-						          }
3768
-					              } else {
3769
-					                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3770
-					              }
3771
-					              rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3772
-
3773
-					          } else if (convData[m]['direction'] == 'received_from') {
3774
-
3775
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3776
-
3777
-					          } else if (convData[m]['direction'] == 'received_on') {
3778
-
3779
-						      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3780
-					          }
3781
-					     }
3782
-
3783
-					     messagesPerNmbr[clckPhNumber] = rowMessageArrcpt;
3784
-
3785
-		                             // Scroll down to the bottom of the window
3786
-		                             $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3787
-
3788
-		                             // Load more messages
3789
-		                             var clickNmb = 0;
3790
-		                             $("#loadMoreMsgs").click(function() {
3791
-
3792
-		                                 clickNmb++;
3793
-
3794
-		                                 var crefnb = (clickNmb + 1) * nmbToBeLoaded;
3795
-
3796
-		                                 if (crefnb > convData.length) {
3797
-		                                     var nmbmsg = convData.length - 1;
3798
-		                                     $("#loadMoreMsgs").css("display", "none");
3799
-		                                 } else { 
3800
-		                                     var nmbmsg = crefnb - 1;
3801
-		                                 }
3802
-
3803
-		                                 var rowMessageArrAdd = [];
3804
-
3805
-		                                 for (var m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
3806
-
3807
-					              if (convData[m]['direction'] == 'sent_from') {
3808
-					                  if (convData[m]['status']) {
3809
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3810
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
3811
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3812
-                                                                  } else {
3813
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3814
-                                                                  }
3815
-						              } else {
3816
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3817
-						              }
3818
-					                  } else {
3819
-					                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3820
-					                  }
3821
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3822
-
3823
-					              } else if (convData[m]['direction'] == 'sent_to') {
3824
-					                  if (convData[m]['status']) {
3825
-						              if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
3826
-				                                  if (convData[m]['status'].indexOf("undelivered") > -1) {
3827
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3828
-                                                                  } else {
3829
-						                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3830
-                                                                  }
3831
-						              } else {
3832
-						                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3833
-						              }
3834
-					                  } else {
3835
-					                      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3836
-					                  }
3837
-					                  rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
3838
-
3839
-					              } else if (convData[m]['direction'] == 'received_from') {
3840
-
3841
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3842
-
3843
-					              } else if (convData[m]['direction'] == 'received_on') {
3844
-
3845
-							  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3846
-					              }
3847
-		                                 }
3848
-
3849
-					         var convDataPerNmbrad = rowMessageArrAdd.join("");
3850
-
3851
-		                                 var scrlheight = $("#msgListRowCell").height();
3852
-		                                 $("#msgListRowCell").prepend(convDataPerNmbrad);
3853
-
3854
-		                                 $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
3855
-		                             });
3856
-
3857
-
3858
-					     // Show the messages sent by each user whose name is clicked
3859
-					     $('[id*="diplNm_"]').click(function() {
3860
-
3861
-					         var crntNmbr = $(this).attr("id").split("_")[1];
3862
-					         var crntDisName = $(this).attr("name");                               
3863
-		                                 $("#loadMoreMsgs").css("display", "none");
3864
-
3865
-		                                 var convDataprn = [];
3866
-		                                 $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
3867
-		                                        convDataprn.push(item);
3868
-		                                 });
3869
-
3870
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3871
-		                                 if (convDataprn.length > nmbTblDefault) {
3872
-		                                     $("#loadMoreMsgsusr").css("display", "block");
3873
-		                                     var nmbToBeLoaded = nmbTblDefault;
3874
-		                                 } else {
3875
-		                                     $("#loadMoreMsgsusr").css("display", "none");
3876
-		                                     var nmbToBeLoaded = convDataprn.length;
3877
-		                                 }
3878
-
3879
-					         var rowMessageArrprnst = [];
3880
-
3881
-					         for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
3882
-		                                      rowMessageArrprnst.push(convDataprn[n]);
3883
-					         }
3884
-
3885
-					         var convDataPerNmbrprnst = rowMessageArrprnst.join("");
3886
-
3887
-		                                 $("#msgListRowCell").empty();
3888
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
3889
-
3890
-		                                 // Scroll down to the bottom of the window
3891
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3892
-
3893
-		                                 // Load more messages
3894
-		                                 var clckNb = 0;
3895
-		                                 $("#loadMoreMsgsusr").unbind("click");
3896
-		                                 $("#loadMoreMsgsusr").click(function() {
3897
-
3898
-		                                     clckNb++;
3899
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
3900
-
3901
-		                                     $("#loadMoreMsgs").css("display", "none");
3902
-
3903
-		                                     if (crefnb > convDataprn.length) {
3904
-		                                         var nmbmsg = convDataprn.length - 1;
3905
-		                                         $("#loadMoreMsgsusr").css("display", "none");
3906
-		                                     } else { 
3907
-		                                         var nmbmsg = crefnb - 1;
3908
-		                                         $("#loadMoreMsgsusr").css("display", "block");
3909
-		                                     }
3910
-
3911
-		                                     var rowMessageArrAddst = [];
3912
-
3913
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
3914
-
3915
-		                                          rowMessageArrAddst.push(convDataprn[q]);
3916
-		                                     }
3917
-
3918
-					             var convDataPerNmbradst = rowMessageArrAddst.join("");
3919
-
3920
-		                                     var scrlheight = $("#msgListRowCell").height();
3921
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
3922
-
3923
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
3924
-		                                 });
3925
-
3926
-
3927
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
3928
-					         $("#diplNmAllMsg").css("color", "#04957b");
3929
-					         $(this).css("color", "#1b8efe");
3930
-					     });
3931
-
3932
-
3933
-					     // Show again all the messages sent/received to/from the clicked number
3934
-					     $("#diplNmAllMsg").click(function() {
3935
-
3936
-		                                 $("#loadMoreMsgsusr").css("display", "none");
3937
-
3938
-		                                 var convDataprn = [];
3939
-		                                 $.each(messagesPerNmbr[clckPhNumber], function(index, item) {
3940
-		                                        convDataprn.push(item);
3941
-		                                 });
3942
-
3943
-		                                 // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3944
-		                                 if (convDataprn.length > nmbTblDefault) {
3945
-		                                     $("#loadMoreMsgs").css("display", "block");
3946
-		                                     var nmbToBeLoaded = nmbTblDefault;
3947
-		                                 } else {
3948
-		                                     $("#loadMoreMsgs").css("display", "none");
3949
-		                                     var nmbToBeLoaded = convDataprn.length;
3950
-		                                 }
3951
-
3952
-					         var rowMessageArrprnst = [];
3953
-
3954
-					         for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
3955
-		                                      rowMessageArrprnst.push(convDataprn[n]);
3956
-					         }
3957
-
3958
-					         var convDataPerNmbrprnst = rowMessageArrprnst.join("");
3959
-
3960
-		                                 $("#msgListRowCell").empty();
3961
-		                                 $("#msgListRowCell").append(convDataPerNmbrprnst);
3962
-
3963
-		                                 // Scroll down to the bottom of the window
3964
-		                                 $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3965
-
3966
-
3967
-		                                 // Load more messages
3968
-		                                 var clckNb = 0;
3969
-		                                 $("#loadMoreMsgs").unbind("click");
3970
-		                                 $("#loadMoreMsgs").click(function() {
3971
-
3972
-		                                     clckNb++;
3973
-		                                     var crefnb = (clckNb + 1) * nmbToBeLoaded;
3974
-
3975
-		                                     $("#loadMoreMsgsusr").css("display", "none");
3976
-
3977
-		                                     if (crefnb > convDataprn.length) {
3978
-		                                         var nmbmsg = convDataprn.length - 1;
3979
-		                                         $("#loadMoreMsgs").css("display", "none");
3980
-		                                     } else {
3981
-		                                         var nmbmsg = crefnb - 1;
3982
-		                                         $("#loadMoreMsgs").css("display", "block");
3983
-		                                     }
3984
-
3985
-		                                     var rowMessageArrAddst = [];
3986
-
3987
-		                                     for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
3988
-
3989
-		                                          rowMessageArrAddst.push(convDataprn[q]);
3990
-		                                     }
3991
-
3992
-					             var convDataPerNmbradst = rowMessageArrAddst.join("");
3993
-
3994
-		                                     var scrlheight = $("#msgListRowCell").height();
3995
-		                                     $("#msgListRowCell").prepend(convDataPerNmbradst);
3996
-
3997
-		                                     $("#frmMsgLstWrap").animate({scrollTop: $("#msgListRowCell").height() - scrlheight}, 0);
3998
-		                                 });
3999
-
4000
-
4001
-					         $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
4002
-					         $("#diplNmAllMsg").css("color", "#04957b");
4003
-					         $(this).css("color", "#04c6a4");
4004
-					     });
4005
-
4006
-
4007
-					     // Show the scroll-up arrow
4008
-					     $("#frmMsgLstWrap").scroll(function() {
4009
-						if ($(this).scrollTop() > 900) {
4010
-						      $('#upArrowSmall').fadeIn();
4011
-						} else {
4012
-						      $('#upArrowSmall').fadeOut();
4013
-						}
4014
-					     });
4015
-
4016
-					     $("#upArrowSmall").unbind("click");
4017
-					     $("#upArrowSmall").click(function() {
4018
-						$("#frmMsgLstWrap").animate({scrollTop : 0},400);
4019
-					     });
4020
-
4021
-
4022
-					     // Download MMS files when clicking on their URLs
4023
-					     $('[id^="mmsTblUrl-"]').on('click', function(evt) {
4024
-
4025
-					        var clckedUrl = $(this).text();
4026
-					        var flNamearr = clckedUrl.split("/");
4027
-					        var flName = flNamearr.reverse()[0];
4028
-
4029
-					        confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
4030
-
4031
-					        $("#confirmOk").click(function() {
4032
-
4033
-					           $("#alertMsgOverlay").remove();
4034
-					           $("#alertConfMessage").remove();
4035
-
4036
-					           var mmsLink = document.createElement("a");
4037
-					           mmsLink.setAttribute('href', clckedUrl);
4038
-					           mmsLink.setAttribute('download', flName);
4039
-                                                   mmsLink.setAttribute('target', '_blank');
4040
-					           document.body.appendChild(mmsLink);
4041
-					           mmsLink.click();
4042
-					           mmsLink.remove();
4043
-					        });
4044
-
4045
-					        $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
4046
-					     });
4047
-
4048
-				  },
4049
-				  error: function() {
4050
-					     showAlert("Error while attempting to get message data from the database!");
4051
-					     $('#listAllMsgsFromTo').removeClass('icon-loading');
4052
-				  }
4053
-			   });
4054
-                   }
4055
-
4056
-                   getMsgsPerNmbrSec(clckPhNumber);
4057
-
4058
-                   $("#refreshMsgsConvtf").click(function() { getMsgsPerNmbrSec(clckPhNumber); setTimeout(function() { $("#diplNmAllMsg").click(); }, 1000); });
4059
-                }
4060
-
4061
-
4062
-                $('[id^="showMsgFrom-"]').click(function() {
4063
-
4064
-                   var ctrwnb = $(this).attr("id").replace("showMsgFrom-", "");
4065
-                   if ($("#frmNmbr-"+ ctrwnb).text().indexOf(":") > -1) {
4066
-                       var clckPhNumber = $("#frmNmbr-"+ ctrwnb).text().split(": ")[1];
4067
-                   } else { var clckPhNumber = $("#frmNmbr-"+ ctrwnb).text(); }
4068
-
4069
-                   showMsgPerNmbr(clckPhNumber);
4070
-                })
4071
-
4072
-                $('[id^="showMsgTo-"]').click(function() {
4073
-                   var ctrwnbTo = $(this).attr("id").replace("showMsgTo-", "");
4074
-                   var clckPhNbTo = $("#toNmbr-"+ ctrwnbTo).text();
4075
-
4076
-                   showMsgPerNmbr(clckPhNbTo);
4077
-                })
4078
-
4079
-
4080
-                // Add pagination
4081
-                var rowsShown = messagesperpage;
4082
-                var rowsTotal = $("#sentSmsTable tr").length;
4083
-                var numPages = (rowsTotal - 2) / rowsShown;
4084
-
4085
-                for (i = 0; i < numPages; i++) {
4086
-                     var pageNum = i + 1;
4087
-                     $('#paginationsent').append('<a href="#" rel="' + i + '" class="pagenumbers">' + pageNum + '</a> ');
4088
-                }
4089
-
4090
-                $('#paginationsent').children(":first").addClass('active');
4091
-
4092
-                $('#paginationsent a:first').addClass('active');
4093
-
4094
-                // Show table page when clicking on page number
4095
-                $('.pages a').bind('click', function () {
4096
-
4097
-                      $('#paginationsent').children().removeClass('active');
4098
-
4099
-                      $(this).addClass('active');
4100
-
4101
-                      var currentsentPgNo = $(this).text();
4102
-
4103
-                      $('#paginationsent a').each(function() {
4104
-                         if ($(this).text() == currentsentPgNo) {
4105
-                             $(this).addClass('active');
4106
-                         }
4107
-                      });
4108
-
4109
-                      // Sort table rows
4110
-		      var rows = $('#sentSmsTable tr').get();
4111
-
4112
-		      rows.sort(function(a, b) {
4113
-
4114
-		           var A = parseInt($('td.sentdbidcolumn', a).text());
4115
-		           var B = parseInt($('td.sentdbidcolumn', b).text());
4116
-
4117
-		           if (A < B) {
4118
-		               return -1;
4119
-		           }
4120
-
4121
-		           if (A > B) {
4122
-		               return 1;
4123
-		           }
4124
-
4125
-		           return 0;
4126
-		      });
4127
-
4128
-		      $.each(rows, function(index, row) {
4129
-		         $('#sentSmsTable').append(row);
4130
-		      });
4131
-
4132
-                      var currPage = $(this).attr('rel');
4133
-                      var startItem = currPage * rowsShown;
4134
-                      var endItem = startItem + rowsShown;
4135
-
4136
-                      $('.sentrowsbody').hide().slice(startItem, endItem).css('display', 'table-row');
4137
-
4138
-                      $('#totalsentmessages').remove();
4139
-                      $('#smstables').append("<div id='totalsentmessages'>Total displayed messages: " + sentparseddata.length + "</div>");
4140
-                });
4141
-
4142
-                $('#paginationsent').children(":last").trigger('click');
4143
-
4144
-                // Select all records
4145
-                $('#selectAllChckbx').change(function() {
4146
-                   if ($(this).is(':checked')) {
4147
-                       $(".indivchckbx").prop("checked", true);
4148
-                   } else {
4149
-                       $(".indivchckbx").prop("checked", false);
4150
-                   }
4151
-                });
4152
-
4153
-                function reorderSentRows() {
4154
-                    var currenttext = $(".filterbuttonsent").closest('[class="filterbuttonsent"]').find('[class="indivfiltersent"]').text();
4155
-                    if (currenttext == '') {
4156
-                        $('tr').sort(function (a, b) {
4157
-                           return parseInt($('td.sentdbidcolumn', b).text()) < parseInt($('td.sentdbidcolumn', a).text());
4158
-                        }).appendTo("#sentSmsTable");
4159
-                    }
4160
-                }
4161
-
4162
-                // Filter rows
4163
-                $("#databaseidfilter").on("click", function(event) {
4164
-
4165
-                       var databaseId = $("#dbidtextsent").val();
4166
-                       var msgrowsNo = 0;
4167
-
4168
-                       $(".sentrowsbody").each(function() {
4169
-
4170
-                          var checkEmpty = 0;
4171
-                          $(".indivfiltersent").not("#dbidtextsent").each(function() {
4172
-                              if ($(this).val() != '') {
4173
-                                  checkEmpty = 1;
4174
-                              }
4175
-                          });
4176
-
4177
-                          if (checkEmpty == 0) {
4178
-                              $(this).show();
4179
-                          }
4180
-
4181
-                          if (databaseId != '') {
4182
-                             if ($(this).find('[class="sentdbidcolumn"]').text() == databaseId) {
4183
-                                 $("#sentSmsTable").append(this);
4184
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
4185
-                             } else {
4186
-                                 $(this).hide();
4187
-                             }
4188
-                          } else {
4189
-                                 $(this).show();
4190
-                                 msgrowsNo++;
4191
-                          }
4192
-                       });
4193
-
4194
-                       reorderSentRows();
4195
-                       $('#totalsentmessages').remove();
4196
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4197
-                });
4198
-
4199
-                $("#useridfilter").on("click", function(event) {
4200
-
4201
-                       var useridtxt = $("#useridtext").val().toLowerCase();
4202
-                       var msgrowsNo = 0;
4203
-
4204
-                       $(".sentrowsbody").each(function() {
4205
-
4206
-                          var checkEmpty1 = 0;
4207
-                          $(".indivfiltersent").not("#useridtext").each(function() {
4208
-                              if ($(this).val() != '') {
4209
-                                  checkEmpty1 = 1;
4210
-                              }
4211
-                          });
4212
-
4213
-                          if (checkEmpty1 == 0) {
4214
-                              $(this).show();
4215
-                          }
4216
-
4217
-                          if (useridtxt != '') {
4218
-                              var founduserid = $(this).find('[class="useridcolsent"]').text().toLowerCase();
4219
-                              if (founduserid.indexOf(useridtxt) != -1) {
4220
-                                  $("#sentSmsTable").append(this);
4221
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4222
-                             } else {
4223
-                                  $(this).hide();
4224
-                             }
4225
-                          } else {
4226
-                                  $(this).show();
4227
-                                  msgrowsNo++;
4228
-                          }
4229
-                       });
4230
-
4231
-                       reorderSentRows();
4232
-                       $('#totalsentmessages').remove();
4233
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4234
-                });
4235
-
4236
-                $("#messageidfilter").on("click", function(event) {
4237
-
4238
-                       var messageidtxt = $("#messageidtext").val().toLowerCase();
4239
-                       var msgrowsNo = 0;
4240
-
4241
-                       $(".sentrowsbody").each(function() {
4242
-
4243
-                          var checkEmpty2 = 0;
4244
-                          $(".indivfiltersent").not("#messageidtext").each(function() {
4245
-                              if ($(this).val() != '') {
4246
-                                  checkEmpty2 = 1;
4247
-                              }
4248
-                          });
4249
-
4250
-                          if (checkEmpty2 == 0) {
4251
-                              $(this).show();
4252
-                          }
4253
-
4254
-                          if (messageidtxt != '') {
4255
-                              var foundtdmssgid = $(this).find('[class="messageidcolsent"]').text().toLowerCase();
4256
-                              if (foundtdmssgid.indexOf(messageidtxt) != -1) {
4257
-                                  $("#sentSmsTable").append(this);
4258
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4259
-                              } else {
4260
-                                  $(this).hide();
4261
-                              }
4262
-                          } else {
4263
-                                  $(this).show();
4264
-                                  msgrowsNo++;
4265
-                          }
4266
-                       });
4267
-
4268
-                       reorderSentRows();
4269
-                       $('#totalsentmessages').remove();
4270
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4271
-                });
4272
-
4273
-                $("#datefilter").on("click", function(event) {
4274
-
4275
-                       var datetxtvr = $("#datetext").val().toLowerCase();
4276
-                       var msgrowsNo = 0;
4277
-
4278
-                       $(".sentrowsbody").each(function() {
4279
-
4280
-                          var checkEmpty3 = 0;
4281
-                          $(".indivfiltersent").not("#datetext").each(function() {
4282
-                              if ($(this).val() != '') {
4283
-                                  checkEmpty3 = 1;
4284
-                              }
4285
-                          });
4286
-
4287
-                          if (checkEmpty3 == 0) {
4288
-                              $(this).show();
4289
-                          }
4290
-
4291
-                          if (datetxtvr != '') {
4292
-                             var founddate = $(this).find('[class="datecolsent"]').text().toLowerCase();
4293
-                             if (founddate.indexOf(datetxtvr) != -1) {
4294
-                                 $("#sentSmsTable").append(this);
4295
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
4296
-                             } else {
4297
-                                 $(this).hide();
4298
-                             }
4299
-                          } else {
4300
-                                 $(this).show();
4301
-                                 msgrowsNo++;
4302
-                          }
4303
-                       });
4304
-
4305
-                       reorderSentRows();
4306
-                       $('#totalsentmessages').remove();
4307
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4308
-                });
4309
-
4310
-                $("#fromfilter").on("click", function(event) {
4311
-
4312
-                       var fromtxtvr = $("#fromtext").val().toLowerCase();
4313
-                       var msgrowsNo = 0;
4314
-
4315
-                       $(".sentrowsbody").each(function() {
4316
-
4317
-                          var checkEmpty4 = 0;
4318
-                          $(".indivfiltersent").not("#fromtext").each(function() {
4319
-                              if ($(this).val() != '') {
4320
-                                  checkEmpty4 = 1;
4321
-                              }
4322
-                          });
4323
-
4324
-                          if (checkEmpty4 == 0) {
4325
-                              $(this).show();
4326
-                          }
4327
-
4328
-                          if (fromtxtvr != '') {
4329
-                             var foundfrom = $(this).find('[class="fromcolumnsent"]').text().toLowerCase();
4330
-                             if (foundfrom.indexOf(fromtxtvr) != -1) {
4331
-                                 $("#sentSmsTable").append(this);
4332
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
4333
-                             } else {
4334
-                                 $(this).hide();
4335
-                             }
4336
-                          } else {
4337
-                                 $(this).show();
4338
-                                 msgrowsNo++;
4339
-                          }
4340
-                       });
4341
-
4342
-                       reorderSentRows();
4343
-                       $('#totalsentmessages').remove();
4344
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4345
-                });
4346
-
4347
-                $("#tofilter").on("click", function(event) {
4348
-
4349
-                      var totxtvr = $("#totext").val().toLowerCase();
4350
-                      var msgrowsNo = 0;
4351
-
4352
-                      $(".sentrowsbody").each(function() {
4353
-
4354
-                          var checkEmpty5 = 0;
4355
-                          $(".indivfiltersent").not("#totext").each(function() {
4356
-                              if ($(this).val() != '') {
4357
-                                  checkEmpty5 = 1;
4358
-                              }
4359
-                          });
4360
-
4361
-                          if (checkEmpty5 == 0) {
4362
-                              $(this).show();
4363
-                          }
4364
-
4365
-                          if (totxtvr != '') {
4366
-                             var foundto = $(this).find('[class="tocolumnsent"]').text().toLowerCase();
4367
-                             if (foundto.indexOf(totxtvr) != -1) {
4368
-                                 $("#sentSmsTable").append(this);
4369
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
4370
-                             } else {
4371
-                                 $(this).hide();
4372
-                             }
4373
-                          } else {
4374
-                                 $(this).show();
4375
-                                 msgrowsNo++;
4376
-                          }
4377
-                      });
4378
-
4379
-                      reorderSentRows();
4380
-                      $('#totalsentmessages').remove();
4381
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4382
-                });
4383
-
4384
-                $("#networkfilter").on("click", function(event) {
4385
-
4386
-                      var networktxtvr = $("#networktext").val().toLowerCase();
4387
-                      var msgrowsNo = 0;
4388
-
4389
-                      $(".sentrowsbody").each(function() {
4390
-
4391
-                          var checkEmpty6 = 0;
4392
-                          $(".indivfiltersent").not("#networktext").each(function() {
4393
-                              if ($(this).val() != '') {
4394
-                                  checkEmpty6 = 1;
4395
-                              }
4396
-                          });
4397
-
4398
-                          if (checkEmpty6 == 0) {
4399
-                              $(this).show();
4400
-                          }
4401
-
4402
-                          if (networktxtvr != '') {
4403
-                              var foundnetwork = $(this).find('[class="networkNmContent"]').text().toLowerCase();
4404
-                              if (foundnetwork.indexOf(networktxtvr) != -1) {
4405
-                                  $("#sentSmsTable").append(this);
4406
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4407
-                              } else {
4408
-                                  $(this).hide();
4409
-                              }
4410
-                          } else {
4411
-                                  $(this).show();
4412
-                                  msgrowsNo++;
4413
-                          }
4414
-                      });
4415
-
4416
-                      reorderSentRows();
4417
-                      $('#totalsentmessages').remove();
4418
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4419
-                });
4420
-
4421
-                $("#pricefilter").on("click", function(event) {
4422
-
4423
-                      var pricetxtvr = $("#pricetext").val().toLowerCase();
4424
-                      var msgrowsNo = 0;
4425
-
4426
-                      $(".sentrowsbody").each(function() {
4427
-
4428
-                          var checkEmpty7 = 0;
4429
-                          $(".indivfiltersent").not("#pricetext").each(function() {
4430
-                              if ($(this).val() != '') {
4431
-                                  checkEmpty7 = 1;
4432
-                              }
4433
-                          });
4434
-
4435
-                          if (checkEmpty7 == 0) {
4436
-                              $(this).show();
4437
-                          }
4438
-
4439
-                          if (pricetxtvr != '') {
4440
-                              var foundprice = $(this).find('[class="pricecolumnsent"]').text().toLowerCase();
4441
-                              if (foundprice.indexOf(pricetxtvr) != -1) {
4442
-                                  $("#sentSmsTable").append(this);
4443
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4444
-                              } else {
4445
-                                  $(this).hide();
4446
-                              }
4447
-                          } else {
4448
-                                  $(this).show();
4449
-                                  msgrowsNo++;
4450
-                          }
4451
-                      });
4452
-
4453
-                      reorderSentRows();
4454
-                      $('#totalsentmessages').remove();
4455
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4456
-                });
4457
-
4458
-                $("#statusfilter").on("click", function(event) {
4459
-
4460
-                      var statustxtvr = $("#statustext").val().toLowerCase();
4461
-                      var msgrowsNo = 0;
4462
-
4463
-                      $(".sentrowsbody").each(function() {
4464
-
4465
-                          var checkEmpty8 = 0;
4466
-                          $(".indivfiltersent").not("#statustext").each(function() {
4467
-                              if ($(this).val() != '') {
4468
-                                  checkEmpty8 = 1;
4469
-                              }
4470
-                          });
4471
-
4472
-                          if (checkEmpty8 == 0) {
4473
-                              $(this).show();
4474
-                          }
4475
-
4476
-                          if (statustxtvr != '') {
4477
-                              var foundstatus = $(this).find('[class="statuscolumnsent"]').text().toLowerCase();
4478
-                              if (foundstatus.indexOf(statustxtvr) != -1) {
4479
-                                  $("#sentSmsTable").append(this);
4480
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4481
-                              } else {
4482
-                                  $(this).hide();
4483
-                              }
4484
-                          } else {
4485
-                                  $(this).show();
4486
-                                  msgrowsNo++;
4487
-                          }
4488
-                      });
4489
-
4490
-                      reorderSentRows();
4491
-                      $('#totalsentmessages').remove();
4492
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4493
-                });
4494
-
4495
-                $("#deliveryrecfilter").on("click", function(event) {
4496
-
4497
-                      var deliverytxtvr = $("#deliveryrcpttext").val().toLowerCase();
4498
-                      var msgrowsNo = 0;
4499
-
4500
-                      $(".sentrowsbody").each(function() {
4501
-
4502
-                          var checkEmpty9 = 0;
4503
-                          $(".indivfiltersent").not("#deliveryrcpttext").each(function() {
4504
-                              if ($(this).val() != '') {
4505
-                                  checkEmpty9 = 1;
4506
-                              }
4507
-                          });
4508
-
4509
-                          if (checkEmpty9 == 0) {
4510
-                              $(this).show();
4511
-                          }
4512
-
4513
-                          if (deliverytxtvr != '') {
4514
-                              var founddeliveryrcpt = $(this).find('[class="deliveryrcptcolsent"]').text().toLowerCase();
4515
-                              if (founddeliveryrcpt.indexOf(deliverytxtvr) != -1) {
4516
-                                  $("#sentSmsTable").append(this);
4517
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4518
-                              } else {
4519
-                                  $(this).hide();
4520
-                              }
4521
-                          } else {
4522
-                                  $(this).show();
4523
-                                  msgrowsNo++;
4524
-                          }
4525
-                      });
4526
-
4527
-                      reorderSentRows();
4528
-                      $('#totalsentmessages').remove();
4529
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4530
-                });
4531
-
4532
-                $("#messagefilter").on("click", function(event) {
4533
-
4534
-                      var messagetxtvr = $("#messagetext").val().toLowerCase();
4535
-                      var msgrowsNo = 0;
4536
-
4537
-                      $(".sentrowsbody").each(function() {
4538
-
4539
-                          var checkEmpty10 = 0;
4540
-                          $(".indivfiltersent").not("#messagetext").each(function() {
4541
-                              if ($(this).val() != '') {
4542
-                                  checkEmpty10 = 1;
4543
-                              }
4544
-                          });
4545
-
4546
-                          if (checkEmpty10 == 0) {
4547
-                              $(this).show();
4548
-                          }
4549
-
4550
-                          if (messagetxtvr != '') {
4551
-                              var foundmessage = $(this).find('[class="messagecolumnsent"]').text().toLowerCase();
4552
-                              if (foundmessage.indexOf(messagetxtvr) != -1) {
4553
-                                  $("#sentSmsTable").append(this);
4554
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4555
-                              } else {
4556
-                                  $(this).hide();
4557
-                              }
4558
-                          } else {
4559
-                                  $(this).show();
4560
-                                  msgrowsNo++;
4561
-                          }
4562
-                      });
4563
-
4564
-                      reorderSentRows();
4565
-                      $('#totalsentmessages').remove();
4566
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4567
-                });
4568
-
4569
-                // Clear all filters
4570
-                $("#clearsentfilters").on("click", function(event) {
4571
-                       $(".sentrowsbody").each(function() {
4572
-                          $(this).show();
4573
-                       });
4574
-                       $(".indivfiltersent").val("");
4575
-                       $('#totalsentmessages').remove();
4576
-                       $('#smstables').append("<div id='totalsentmessages'>Total displayed messages: " + sentparseddata.length + "</div>");
4577
-                });
4578
-
4579
-                // Delete selected rows from the database
4580
-                $("#deletesentrows").on("click", function() {
4581
-
4582
-                   var checkcheckbx = jQuery("#sentSmsTable input[type=checkbox]:checked").length;
4583
-                   if (checkcheckbx == 0) {
4584
-                       showAlert("Please select the row(s) to permanently delete from the database !");
4585
-                   } else {
4586
-                          var sentcheckboxIds = [];
4587
-                          $(".sentrowsbody").each(function() {
4588
-                             var sentrowcheckbx = $(this).find('input[type="checkbox"]');
4589
-                             if (sentrowcheckbx.is(":checked")) {
4590
-                                 var dbrowid = $(this).find('[class="sentdbidcolumn"]').text();
4591
-                                 sentcheckboxIds.push(dbrowid);
4592
-                             }
4593
-                          });
4594
-
4595
-		          confirmAlert("Please note that the row(s) you selected will be permanently deleted from the database, without being saved before removal. This action cannot be undone ! If you really want to permanently delete the selected row(s) press 'OK'.");
4596
-
4597
-		          $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
4598
-
4599
-		          $("#confirmOk").click(function() {
4600
-
4601
-		              $("#alertMsgOverlay").remove();
4602
-		              $("#alertConfMessage").remove();
4603
-
4604
-                              var deletesentRowsUrl = OC.generateUrl("/apps/sms_relentless/user/removesentrows");
4605
-                              $('#smstables').addClass('icon-loading');
4606
-
4607
-                              $.ajax({
4608
-                                   url: deletesentRowsUrl + '/' + userid,
4609
-                                   type: "POST",
4610
-                                   data: { "sentmessagedbIDs": sentcheckboxIds },
4611
-                                   success: function(delmsgsent) {
4612
-				            $('#smstables').removeClass('icon-loading');
4613
-                                            if (delmsgsent == "success") {
4614
-                                                showAlert("The row(s) have been deleted successfully !");
4615
-                                                $('#sentsmstableshow').click();
4616
-                                            } else if (delmsgsent == "not allowed") {
4617
-                                                showAlert("Only admins can delete messages !");
4618
-                                            } else {
4619
-                                                showAlert("There was an error while deleting the selected row(s) !");
4620
-                                            }
4621
-                                   },
4622
-                                   error: function() {
4623
-                                            $('#smstables').removeClass('icon-loading');
4624
-                                            showAlert("There was an error while deleting the selected row(s) !");
4625
-                                   }
4626
-                              });
4627
-                          });
4628
-                    }
4629
-                });
4630
-
4631
-                // Show/Hide filter row
4632
-	        $('#sentarrow').on('click', function() {
4633
-	           if ($('#sentfiltersrow').is(':visible')) {
4634
-		       $('#sentfiltersrow').hide();
4635
-                       $('#sentheaderrow').css('top', '0px');
4636
-                       $(this).removeClass('arrowUpCl');
4637
-                       $(this).addClass('arrowDownCl');
4638
-		   } else {
4639
-		       $('#sentfiltersrow').show();
4640
-                       $('#sentheaderrow').css('top', '158px');
4641
-                       $(this).removeClass('arrowDownCl');
4642
-                       $(this).addClass('arrowUpCl');
4643
-                   }
4644
-                });
4645
-
4646
-                $("#app-content").animate({scrollTop:$("#sentSmsTable").prop("scrollHeight")},200);
4647
-
4648
-
4649
-                // Download MMS files when clicking on their URLs
4650
-                $('[id^="mmsTblUrl-"]').on('click', function(evt) {
4651
-
4652
-                   var clckedUrl = $(this).text();
4653
-                   var flNamearr = clckedUrl.split("/");
4654
-                   var flName = flNamearr.reverse()[0];
4655
-
4656
-                   confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
4657
-
4658
-		   $("#confirmOk").click(function() {
4659
-
4660
-                      $("#alertMsgOverlay").remove();
4661
-		      $("#alertConfMessage").remove();
4662
-
4663
-		      var mmsLink = document.createElement("a");
4664
-		      mmsLink.setAttribute('href', clckedUrl);
4665
-		      mmsLink.setAttribute('download', flName);
4666
-                      mmsLink.setAttribute('target', '_blank');
4667
-		      document.body.appendChild(mmsLink);
4668
-		      mmsLink.click();
4669
-		      mmsLink.remove();
4670
-                   });
4671
-
4672
-		   $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
4673
-                });
4674
-
4675
-          },
4676
-          error: function() {
4677
-                showAlert("Error! You can check the Nextcloud log to find more details about this issue.");
4678
-                $('#smstables').removeClass('icon-loading');
4679
-          }
4680
-     });
4681
-
4682
-     // Look for the 'new received message' indicator in the database, to know if the received messages list needs to be refreshed
4683
-     intervalNmfr = setInterval(function() { checkIfNewMessage(); }, newMsgInterval);
4684
-
4685
-     // Show the auto-refresh button
4686
-     $("#stopAutoRefreshSent").css("display", "inline-block");
4687
-
4688
-  });
4689
-
4690
-
4691
-  // List conversations
4692
-  $("#conversationsshow").on("click", function(event) {
4693
-
4694
-     $('#smstables').empty();
4695
-     $("#stopAutoRefreshSent").css("display", "none");
4696
-     clearInterval(intervalNmfr);
4697
-     $('#smstables').append("<table id='conversationsTable'><tr><td><div id='convArchAndActive'></div></td><td><div id='conversationsText'></div></td></tr></table>");
4698
-     $("#conversationsTable").css({ "width" : $("#smstables").width(), "height" : $("#smstables").height() - 10 });
4699
-     $("#convArchAndActive").css({ "width" : $("#conversationsTable").width() * 0.25, "height" : $("#conversationsTable").height() });
4700
-     $("#conversationsText").css({ "width" : $("#conversationsTable").width() * 0.74, "height" : $("#conversationsTable").height() });
4701
-     $("#conversationsText").append("<div id='convImgGrey'><img src='/" + ctappdir + "/sms_relentless/img/conversations.svg'></div>");
4702
-     $("#convImgGrey").css({ "top" : $("#conversationsTable").height() * 0.5 - 109, "left" : $("#conversationsTable").width() * 0.63 - 144 });
4703
-     $("#convTextHeader").css("width", $("#conversationsTable").width() * 0.74);
4704
-
4705
-     var getConvUrl = OC.generateUrl("/apps/sms_relentless/user/getconversations");
4706
-     $('#smstables').addClass('icon-loading');
4707
-
4708
-     $.ajax({
4709
-          url: getConvUrl + '/' + userid,
4710
-          method: 'GET',
4711
-          contentType: 'application/json',
4712
-          success: function(convdatafdb) {
4713
-
4714
-                     $('#smstables').removeClass('icon-loading');
4715
-                     if (convdatafdb.length == 0) { showAlert("The conversations list is empty. It will be populated after you'll send messages."); }
4716
-
4717
-		     let convArchived = [];
4718
-                     let convActive = [];
4719
-
4720
-		     for (let c = 0; c < convdatafdb.length; c++) {
4721
-                          if (convdatafdb[c]['archived'] == 1) {
4722
-                              convArchived.push({
4723
-                                'conversation_id': convdatafdb[c]['conversation_id'],
4724
-                                'archived': convdatafdb[c]['archived'],
4725
-                                'last_archived': convdatafdb[c]['last_archived'],
4726
-                                'last_unarchived': convdatafdb[c]['last_unarchived'],
4727
-                                'archived_by': convdatafdb[c]['archived_by'],
4728
-                                'unarchived_by': convdatafdb[c]['unarchived_by'],
4729
-                                'last_msg_date': convdatafdb[c]['last_msg_date'],
4730
-                                'last_msg_from': convdatafdb[c]['last_msg_from'],
4731
-                                'last_msg_to': convdatafdb[c]['last_msg_to'],
4732
-                                'last_message': convdatafdb[c]['last_message'],
4733
-                                'lastmsgdisplayname': convdatafdb[c]['lastmsgdisplayname'],
4734
-                                'flagged': convdatafdb[c]['flagged'],
4735
-                                'flagunflagby': convdatafdb[c]['flagunflagby'],
4736
-                                'flagunflagdate': convdatafdb[c]['flagunflagdate'],
4737
-                                'tag': (convdatafdb[c]['tag'] != null)? convdatafdb[c]['tag'] : "",
4738
-                                'taguntagby': convdatafdb[c]['taguntagby'],
4739
-                                'taguntagdate': convdatafdb[c]['taguntagdate'],
4740
-                                'description': (convdatafdb[c]['description'] != null)? convdatafdb[c]['description'] : "",
4741
-                                'descriptionby': convdatafdb[c]['descriptionby'],
4742
-                                'descriptiondate': convdatafdb[c]['descriptiondate']
4743
-                              });
4744
-                          } else {
4745
-                              convActive.push({
4746
-                                'conversation_id': convdatafdb[c]['conversation_id'],
4747
-                                'archived': convdatafdb[c]['archived'],
4748
-                                'last_archived': convdatafdb[c]['last_archived'],
4749
-                                'last_unarchived': convdatafdb[c]['last_unarchived'],
4750
-                                'archived_by': convdatafdb[c]['archived_by'],
4751
-                                'unarchived_by': convdatafdb[c]['unarchived_by'],
4752
-                                'last_msg_date': convdatafdb[c]['last_msg_date'],
4753
-                                'last_msg_from': convdatafdb[c]['last_msg_from'],
4754
-                                'last_msg_to': convdatafdb[c]['last_msg_to'],
4755
-                                'last_message': convdatafdb[c]['last_message'],
4756
-                                'lastmsgdisplayname': convdatafdb[c]['lastmsgdisplayname'],
4757
-                                'flagged': convdatafdb[c]['flagged'],
4758
-                                'flagunflagby': convdatafdb[c]['flagunflagby'],
4759
-                                'flagunflagdate': convdatafdb[c]['flagunflagdate'],
4760
-                                'tag': (convdatafdb[c]['tag'] != null)? convdatafdb[c]['tag'] : "",
4761
-                                'taguntagby': convdatafdb[c]['taguntagby'],
4762
-                                'taguntagdate': convdatafdb[c]['taguntagdate'],
4763
-                                'description': (convdatafdb[c]['description'] != null)? convdatafdb[c]['description'] : "",
4764
-                                'descriptionby': convdatafdb[c]['descriptionby'],
4765
-                                'descriptiondate': convdatafdb[c]['descriptiondate']
4766
-                              });
4767
-                          }
4768
-                     }
4769
-
4770
-                     // Order the array of archived conversations by date
4771
-		     convArchived.sort(function(a, b) {
4772
-                          let c = new Date(a.last_msg_date);
4773
-                          let d = new Date(b.last_msg_date);
4774
-                          return c-d;
4775
-		     });
4776
-
4777
-                     // Order the array of active conversations by date
4778
-		     convActive.sort(function(a, b) {
4779
-                          let c = new Date(a.last_msg_date);
4780
-                          let d = new Date(b.last_msg_date);
4781
-                          return c-d;
4782
-		     });
4783
-
4784
-
4785
-                     // List the conversations 
4786
-                     var taggsArrin = [];
4787
-
4788
-	             if (archivedConvNmbr == 0) {
4789
-	                 // Don't list any archived conversations
4790
-	                 var archivedCvNb = 0;
4791
-
4792
-	             } else if (archivedConvNmbr != 0 && archivedConvNmbr != null) {
4793
-
4794
-                         var archCount = 0;
4795
-	                 let fcnv = (archivedConvNmbr <= convArchived.length)? convArchived.length - archivedConvNmbr : 0;
4796
-	                 for (let s = fcnv; s < convArchived.length; s++) {
4797
-
4798
-	                      var emptyRedFlags = (convArchived[s]['flagged'] == 1)? "cvFlagRed" : "cvFlagEmpty";
4799
-	                      if (convArchived[s]['tag'] != "") { var cvTagTxts = convArchived[s]['tag']; var cvTagAdds = "convTagAdded"; taggsArrin.push(convArchived[s]['tag']); } else { var cvTagTxts = ""; var cvTagAdds = "convTag"; }
4800
-	                      var cvDescAdds = (convArchived[s]['description'] != "")? "convDescAdded" : "convDesc";
4801
-	                      $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ s +"'><div id='archivedImg-"+ s +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[s]['conversation_id'] +"' data-archivedyesno='"+ convArchived[s]['archived'] +"' data-archdispname='"+ convArchived[s]['archived_by'] +"' data-unarchdispname='"+ convArchived[s]['unarchived_by'] +"' data-lastarchived='"+ convArchived[s]['last_archived'] +"' data-lastunarchived='"+ convArchived[s]['last_unarchived'] +"' data-convdescription='"+ convArchived[s]['description'] +"' data-convdescchangeby='"+ convArchived[s]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[s]['descriptiondate'] +"' data-tag='"+ cvTagTxts +"' data-taguntagby='"+ convArchived[s]['taguntagby'] +"' data-taguntagdate='"+ convArchived[s]['taguntagdate'] +"' data-flagged='"+ convArchived[s]['flagged'] +"' data-flagunflagby='"+ convArchived[s]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[s]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ s +"'>From: "+ convArchived[s]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ s +"'>To: "+ convArchived[s]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[s]['lastmsgdisplayname'] +":</span>"+ convArchived[s]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[s]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ s +"' class='"+ cvDescAdds +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ s +"' class='"+ cvTagAdds +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxts +"</div><div id='addArchFlag-"+ s +"' class='"+ emptyRedFlags +"' title='Click to set or remove flag.'></div></div>");
4802
-                              archCount++;
4803
-	                 }
4804
-	                 var archivedCvNb = archCount;
4805
-
4806
-	             } else {
4807
-
4808
-	                 for (let a = 0; a < convArchived.length; a++) {
4809
-
4810
-	                      var emptyRedFlaga = (convArchived[a]['flagged'] == 1)? "cvFlagRed" : "cvFlagEmpty";
4811
-	                      if (convArchived[a]['tag'] != "") { var cvTagTxta = convArchived[a]['tag']; var cvTagAdda = "convTagAdded"; taggsArrin.push(convArchived[a]['tag']); } else { var cvTagTxta = ""; var cvTagAdda = "convTag"; }
4812
-	                      var cvDescAdda = (convArchived[a]['description'] != "")? "convDescAdded" : "convDesc";
4813
-	                      $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ a +"'><div id='archivedImg-"+ a +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[a]['conversation_id'] +"' data-archivedyesno='"+ convArchived[a]['archived'] +"' data-archdispname='"+ convArchived[a]['archived_by'] +"' data-unarchdispname='"+ convArchived[a]['unarchived_by'] +"' data-lastarchived='"+ convArchived[a]['last_archived'] +"' data-lastunarchived='"+ convArchived[a]['last_unarchived'] +"' data-convdescription='"+ convArchived[a]['description'] +"' data-convdescchangeby='"+ convArchived[a]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[a]['descriptiondate'] +"' data-tag='"+ cvTagTxta +"' data-taguntagby='"+ convArchived[a]['taguntagby'] +"' data-taguntagdate='"+ convArchived[a]['taguntagdate'] +"' data-flagged='"+ convArchived[a]['flagged'] +"' data-flagunflagby='"+ convArchived[a]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[a]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ a +"'>From: "+ convArchived[a]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ a +"'>To: "+ convArchived[a]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[a]['lastmsgdisplayname'] +":</span>"+ convArchived[a]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[a]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ a +"' class='"+ cvDescAdda +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ a +"' class='"+ cvTagAdda +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxta +"</div><div id='addArchFlag-"+ a +"' class='"+ emptyRedFlaga +"' title='Click to set or remove flag.'></div></div>");
4814
-	                 }
4815
-	                 var archivedCvNb = convArchived.length;
4816
-	             }
4817
-
4818
-	             for (let t = 0; t < convActive.length; t++) {
4819
-
4820
-	                  var emptyRedFlagt = (convActive[t]['flagged'] == 1)? "cvFlagRed" : "cvFlagEmpty";
4821
-	                  if (convActive[t]['tag'] != "") { var cvTagTxtt = convActive[t]['tag']; var cvTagAddt = "convTagAdded"; taggsArrin.push(convActive[t]['tag']); } else { var cvTagTxtt = ""; var cvTagAddt = "convTag"; }
4822
-	                  var cvDescAddt = (convActive[t]['description'] != "")? "convDescAdded" : "convDesc";
4823
-	                  $("#convArchAndActive").append("<div class='convsListAct convsLst' id='indActConv-"+ t +"'><div id='activeImg-"+ t +"' class='archactImg activeConvImg' data-conversationid='"+ convActive[t]['conversation_id'] +"' data-archivedyesno='"+ convActive[t]['archived'] +"' data-archdispname='"+ convActive[t]['archived_by'] +"' data-unarchdispname='"+ convActive[t]['unarchived_by'] +"' data-lastarchived='"+ convActive[t]['last_archived'] +"' data-lastunarchived='"+ convActive[t]['last_unarchived'] +"' data-convdescription='"+ convActive[t]['description'] +"' data-convdescchangeby='"+ convActive[t]['descriptionby'] +"' data-convdescchangedate='"+ convActive[t]['descriptiondate'] +"' data-tag='"+ cvTagTxtt +"' data-taguntagby='"+ convActive[t]['taguntagby'] +"' data-taguntagdate='"+ convActive[t]['taguntagdate'] +"' data-flagged='"+ convActive[t]['flagged'] +"' data-flagunflagby='"+ convActive[t]['flagunflagby'] +"' data-flagunflagdate='"+ convActive[t]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/active.svg' title='Active conversation'></div><div class='convLastMsgFrom' id='indActCvFrom-"+ t +"'>From: "+ convActive[t]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indActCvTo-"+ t +"'>To: "+ convActive[t]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convActive[t]['lastmsgdisplayname'] +":</span>"+ convActive[t]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Active conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convActive[t]['last_msg_date'] +"</div></div><div id='addActDesc-"+ t +"' class='"+ cvDescAddt +"' title='Click to add or modify description.'></div><div id='addActTag-"+ t +"' class='"+ cvTagAddt +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxtt +"</div><div id='addActFlag-"+ t +"' class='"+ emptyRedFlagt +"' title='Click to set or remove flag.'></div></div>");
4824
-	             }
4825
-
4826
-                     // Remove the duplicates from the tags array
4827
-                     function uniqueElem(value, index, array) { return array.indexOf(value) === index; }
4828
-                     var taggsArr = taggsArrin.filter(uniqueElem);
4829
-
4830
-	             // Add the row that specifies the number of conversations displayed
4831
-	             var totalConvNb = archivedCvNb + convActive.length;
4832
-	             $("#convArchAndActive").append("<div id='totalConvNmbr'>"+ totalConvNb +" conversations displayed (<span id='archivedCvImg' title='Archived conversations'></span>"+ archivedCvNb +"<span id='activeCvImg' title='Active conversations'></span>"+ convActive.length +" )</div>");
4833
-
4834
-
4835
-                     function convListContent() {
4836
-
4837
-		             // Scroll to the bottom of the conversations list
4838
-		             $("#convArchAndActive").animate({scrollTop: $("#convArchAndActive").prop("scrollHeight")}, 200);
4839
-
4840
-		             // Show all the content of the truncated messages when hovering over them
4841
-		             $(".convLastMsg").each(function() {
4842
-		                $(this).on("mouseenter", function() {
4843
-		                  $(this).css("-webkit-line-clamp", "none");
4844
-		                });
4845
-		                $(this).on("mouseleave", function() {
4846
-		                  $(this).css("-webkit-line-clamp", "3");
4847
-		                });
4848
-		             });
4849
-
4850
-		             // Show the pop-up window for adding or modifying the conversation description
4851
-		             $('[id^="addArchDesc-"],[id^="addActDesc-"]').click(function(evt) {
4852
-
4853
-		                evt.stopPropagation();
4854
-		                var conversationId = $(this).closest(".convsLst").find(".archactImg").data("conversationid");
4855
-		                var cvDesc = $(this).closest(".convsLst").find(".archactImg").data("convdescription");
4856
-		                var cvDescChangeBy = $(this).closest(".convsLst").find(".archactImg").data("convdescchangeby");
4857
-		                var cvDescChangeDate = $(this).closest(".convsLst").find(".archactImg").data("convdescchangedate");
4858
-		                var lstmsgFrom = $(this).closest(".convsLst").find(".convLastMsgFrom").text().replace("From: ", "");
4859
-		                var lstmsgTo = $(this).closest(".convsLst").find(".convLastMsgTo").text().replace("To: ", "");;
4860
-
4861
-		                if (cvDescChangeBy) { var convDescTitle = "<span style='font-weight:500'>Description</span> last saved by <span style='font-weight:500;color:#365b8b;'>"+ cvDescChangeBy +"</span> at "+ cvDescChangeDate +":"; } else { var convDescTitle = "Add a description for this conversation:"; }
4862
-		                if (cvDesc) { var convTextContent = cvDesc; } else { var convTextContent = ""; }
4863
-
4864
-		                var addDescWindow = "<div id='convDescWindow'>";
4865
-		                addDescWindow += "<div id='dragDescWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='cursor:grab'></div>";
4866
-		                addDescWindow += "<a id='closeDescWindow' title='Close this window'></a>";
4867
-		                addDescWindow += "<div id='convBetween'>"+ lstmsgFrom +"<div id='btwnNbCvTitle'></div>"+ lstmsgTo +"</div>";
4868
-		                addDescWindow += "<div id='convTitle'>"+ convDescTitle +"</div>";
4869
-		                addDescWindow += "<textarea id='descriptionText' placeholder='Eg: Second conversation with John Smith.' disabled>"+ convTextContent +"</textarea>";
4870
-		                addDescWindow += "<input type='submit' id='saveConvDesc' value='Edit'>";
4871
-		                addDescWindow += "</div>";
4872
-
4873
-		                $("#content").append("<div id='recTblOverlay'></div>");
4874
-		                $("#content").append(addDescWindow);
4875
-
4876
-		                var topNmDist = parseInt((window.innerHeight / 2).toFixed(2) - 180) +"px";
4877
-		                var leftNmDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
4878
-		                $("#convDescWindow").css({ "top" : topNmDist, "left" : leftNmDist });
4879
-
4880
-		                $("#closeDescWindow").click(function() { $("#convDescWindow").remove(); $("#recTblOverlay").remove(); });
4881
-		                $("#recTblOverlay").click(function() { $("#convDescWindow").remove(); $("#recTblOverlay").remove(); });
4882
-
4883
-			        // Make the window draggable
4884
-			        function makeMgrWndDraggable(e) {
4885
-
4886
-				   window.pmdragging = {};
4887
-				   pmdragging.pageX0 = e.pageX;
4888
-				   pmdragging.pageY0 = e.pageY;
4889
-				   pmdragging.elem = $("#convDescWindow");
4890
-				   pmdragging.offset0 = $("#convDescWindow").offset();
4891
-
4892
-				   function handle_dragging(e) {
4893
-				       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
4894
-				       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
4895
-				       $(pmdragging.elem).offset({top: top, left: left});
4896
-				   }
4897
-
4898
-				   function handle_mouseup(e) {
4899
-				       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
4900
-				   }
4901
-
4902
-				   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
4903
-			        }
4904
-			        $("#dragDescWindow").mousedown(makeMgrWndDraggable);
4905
-
4906
-
4907
-		                // Save the description
4908
-		                $("#saveConvDesc").click(function() {
4909
-
4910
-		                   if ($(this).val() == "Save") {
4911
-
4912
-		                       $("#descriptionText").prop("disabled", false);
4913
-		                       $("#descriptionText").css("background-color", "#ffffff");
4914
-		                       var descText = $("#descriptionText").val();
4915
-
4916
-		                       if (/^[a-zA-Z0-9\'\.\,\)\(\/\-\s\r\n]*$/.test(descText)) {
4917
-
4918
-		                            var saveConvDescUrl = OC.generateUrl("/apps/sms_relentless/user/saveconvdescription");
4919
-
4920
-		                            $.ajax({
4921
-					       url: saveConvDescUrl + '/' + userid,
4922
-					       type: 'POST',
4923
-		                               data: { 
4924
-		                                      convDescription: descText,
4925
-		                                      convId: conversationId
4926
-		                                 },
4927
-					       success: function(respupdesc) {
4928
-		                                           showAlert(respupdesc);
4929
-		                                           $("#convDescWindow").remove();
4930
-		                                           $("#recTblOverlay").remove();
4931
-
4932
-		                                           // Refresh the conversations list
4933
-						           var archCvIdsc = '';
4934
-						           var actCvIdsc = '';
4935
-
4936
-						           $(".convsListArch").each(function() { 
4937
-							       if ($(this).css('background-color') === "rgb(241, 224, 239)") {
4938
-						                   archCvIdsc = $(this).attr("id");
4939
-							       }
4940
-						           });
4941
-
4942
-							   $(".convsListAct").each(function() {
4943
-							       if ($(this).css('background-color') === "rgb(215, 239, 239)") {
4944
-						                   actCvIdsc = $(this).attr("id");
4945
-							       }
4946
-							   });
4947
-
4948
-						           $('#smstables').empty();
4949
-						           $("#conversationsshow").click();
4950
-						           setTimeout(function() { if (actCvIdsc != '') { document.getElementById(actCvIdsc).click(); } else if (archCvIdsc != '') { document.getElementById(actCvIdsc).click(); } }, 800);
4951
-		                               },
4952
-					       error: function() {
4953
-		                                           showAlert("Error while attempting to save the conversation description to the database.");
4954
-		                                           $("#convDescWindow").remove();
4955
-		                                           $("#recTblOverlay").remove();
4956
-		                               }
4957
-					    });
4958
-
4959
-		                       } else {
4960
-		                               showAlert("The conversation description must contain only letters, numbers, spaces, commas (,), hyphens (-), slashes (/), periods (.), round brackets (()), single quotation marks ('), new lines, or an empty string.");
4961
-		                       }
4962
-
4963
-		                   } else {
4964
-
4965
-		                       $(this).attr("value", "Save");
4966
-		                       $("#descriptionText").prop("disabled", false);
4967
-		                       $("#descriptionText").css("background-color", "#ffffff");
4968
-		                   }
4969
-		                });
4970
-		             });
4971
-
4972
-
4973
-		             // Show the pop-up window for adding or modifying the conversation tag
4974
-		             $('[id^="addArchTag-"],[id^="addActTag-"]').click(function(ev) {
4975
-
4976
-		                ev.stopPropagation();
4977
-		                var conversationIdt = $(this).closest(".convsLst").find(".archactImg").data("conversationid");
4978
-		                var cvTag = $(this).closest(".convsLst").find(".archactImg").data("tag");
4979
-		                var cvTagChangeBy = $(this).closest(".convsLst").find(".archactImg").data("taguntagby");
4980
-		                var cvTagChangeDate = $(this).closest(".convsLst").find(".archactImg").data("taguntagdate");
4981
-		                var lstmsgFromt = $(this).closest(".convsLst").find(".convLastMsgFrom").text().replace("From: ", "");
4982
-		                var lstmsgTot = $(this).closest(".convsLst").find(".convLastMsgTo").text().replace("To: ", "");;
4983
-
4984
-		                if (cvTagChangeBy) { var convTagTitle = "<span style='font-weight:500'>Tag</span> last saved by <span style='font-weight:500;color:#365b8b;'>"+ cvTagChangeBy +"</span> at "+ cvTagChangeDate +":"; } else { var convTagTitle = "Add a tag to this conversation:"; }
4985
-		                if (cvTag) { var tagTextContent = cvTag; } else { var tagTextContent = ""; }
4986
-
4987
-		                var addTagWindow = "<div id='convTagWindow'>";
4988
-		                addTagWindow += "<div id='dragTagWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='cursor:grab'></div>";
4989
-		                addTagWindow += "<a id='closeTagWindow' title='Close this window'></a>";
4990
-		                addTagWindow += "<div id='convBetween'>"+ lstmsgFromt +"<div id='btwnNbCvTitle'></div>"+ lstmsgTot +"</div>";
4991
-		                addTagWindow += "<div id='convTitle'>"+ convTagTitle +"</div>";
4992
-		                addTagWindow += "<input type='text' id='tagText' placeholder='Eg: urgent' disabled value='"+ tagTextContent +"'>";
4993
-		                addTagWindow += "<input type='submit' id='saveConvTag' value='Edit'>";
4994
-		                addTagWindow += "</div>";
4995
-
4996
-		                $("#content").append("<div id='recTblOverlay'></div>");
4997
-		                $("#content").append(addTagWindow);
4998
-
4999
-		                var topNmDistt = parseInt((window.innerHeight / 2).toFixed(2) - 180) +"px";
5000
-		                var leftNmDistt = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
5001
-		                $("#convTagWindow").css({ "top" : topNmDistt, "left" : leftNmDistt });
5002
-
5003
-		                $("#closeTagWindow").click(function() { $("#convTagWindow").remove(); $("#recTblOverlay").remove(); });
5004
-		                $("#recTblOverlay").click(function() { $("#convTagWindow").remove(); $("#recTblOverlay").remove(); });
5005
-
5006
-			        // Make the window draggable
5007
-			        function makeMgrWndDraggable(e) {
5008
-
5009
-				   window.pmdragging = {};
5010
-				   pmdragging.pageX0 = e.pageX;
5011
-				   pmdragging.pageY0 = e.pageY;
5012
-				   pmdragging.elem = $("#convTagWindow");
5013
-				   pmdragging.offset0 = $("#convTagWindow").offset();
5014
-
5015
-				   function handle_dragging(e) {
5016
-				       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
5017
-				       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
5018
-				       $(pmdragging.elem).offset({top: top, left: left});
5019
-				   }
5020
-
5021
-				   function handle_mouseup(e) {
5022
-				       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
5023
-				   }
5024
-
5025
-				   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
5026
-			        }
5027
-			        $("#dragTagWindow").mousedown(makeMgrWndDraggable);
5028
-
5029
-		                // Save the tag
5030
-		                $("#saveConvTag").click(function() {
5031
-
5032
-		                   if ($(this).val() == "Save") {
5033
-
5034
-		                       $("#tagText").prop("disabled", false);
5035
-		                       $("#tagText").css("background-color", "#ffffff");
5036
-		                       var tagTextCt = $("#tagText").val();
5037
-
5038
-		                       if (tagTextCt.length <= 100) {
5039
-
5040
-		                           if (/^[a-zA-Z0-9\'\.\,\)\(\/\-\s\r\n]*$/.test(tagTextCt)) {
5041
-
5042
-		                                var saveConvTagUrl = OC.generateUrl("/apps/sms_relentless/user/saveconvtag");
5043
-
5044
-		                                $.ajax({
5045
-						   url: saveConvTagUrl + '/' + userid,
5046
-						   type: 'POST',
5047
-		                                   data: { 
5048
-		                                          convTag: tagTextCt,
5049
-		                                          convId: conversationIdt
5050
-		                                          },
5051
-						   success: function(respuptag) {
5052
-		                                               showAlert(respuptag);
5053
-		                                               $("#convTagWindow").remove();
5054
-		                                               $("#recTblOverlay").remove();
5055
-
5056
-		                                               // Refresh the conversations list
5057
-						               var archCvIdsc = '';
5058
-						               var actCvIdsc = '';
5059
-
5060
-						               $(".convsListArch").each(function() { 
5061
-								   if ($(this).css('background-color') === "rgb(241, 224, 239)") {
5062
-						                       archCvIdsc = $(this).attr("id");
5063
-								   }
5064
-						               });
5065
-
5066
-							       $(".convsListAct").each(function() {
5067
-								   if ($(this).css('background-color') === "rgb(215, 239, 239)") {
5068
-						                       actCvIdsc = $(this).attr("id");
5069
-								   }
5070
-							       });
5071
-
5072
-						               $('#smstables').empty();
5073
-						               $("#conversationsshow").click();
5074
-						               setTimeout(function() { if (actCvIdsc != '') { document.getElementById(actCvIdsc).click(); } else if (archCvIdsc != '') { document.getElementById(actCvIdsc).click(); } }, 800);
5075
-		                                   },
5076
-						   error: function() {
5077
-		                                           showAlert("Error while attempting to save the conversation tag to the database.");
5078
-		                                           $("#convTagWindow").remove();
5079
-		                                           $("#recTblOverlay").remove();
5080
-		                                   }
5081
-					        });
5082
-
5083
-		                           } else { showAlert("The conversation tag must contain only letters, numbers, spaces, commas (,), hyphens (-), slashes (/), periods (.), round brackets (()), single quotation marks ('), new lines, or an empty string."); }
5084
-
5085
-		                       } else { showAlert("The conversation tag cannot exceed 100 characters in length."); }
5086
-
5087
-		                   } else {
5088
-
5089
-		                       $(this).attr("value", "Save");
5090
-		                       $("#tagText").prop("disabled", false);
5091
-		                       $("#tagText").css("background-color", "#ffffff");
5092
-		                   }
5093
-		                });
5094
-		             });
5095
-
5096
-
5097
-		             // Show the pop-up window for adding or modifying the conversation flag
5098
-		             $('[id^="addArchFlag-"],[id^="addActFlag-"]').click(function(ev) {
5099
-
5100
-		                ev.stopPropagation();
5101
-		                var conversationIdf = $(this).closest(".convsLst").find(".archactImg").data("conversationid");
5102
-		                var cvFlag = $(this).closest(".convsLst").find(".archactImg").data("flagged");
5103
-		                var cvFlagChangeBy = $(this).closest(".convsLst").find(".archactImg").data("flagunflagby");
5104
-		                var cvFlagChangeDate = $(this).closest(".convsLst").find(".archactImg").data("flagunflagdate");
5105
-		                var lstmsgFromf = $(this).closest(".convsLst").find(".convLastMsgFrom").text().replace("From: ", "");
5106
-		                var lstmsgTof = $(this).closest(".convsLst").find(".convLastMsgTo").text().replace("To: ", "");;
5107
-
5108
-		                if (cvFlag == 1) { var flgSetRem = "set"; } else if (cvFlag == 0) { var flgSetRem = "removed"; } else { var flgSetRem = "modified"; }
5109
-		                if (cvFlagChangeBy) { var convFlagTitle = "<span style='font-weight:500'>Flag</span> last "+ flgSetRem +" by <span style='font-weight:500;color:#365b8b;'>"+ cvFlagChangeBy +"</span> at "+ cvFlagChangeDate +":"; } else { var convFlagTitle = "Set a flag for this conversation:"; }
5110
-
5111
-		                var addFlagWindow = "<div id='convFlagWindow'>";
5112
-		                addFlagWindow += "<div id='dragFlagWindow'><img src='/" + ctappdir + "/sms_relentless/img/dots.svg' style='cursor:grab'></div>";
5113
-		                addFlagWindow += "<a id='closeFlagWindow' title='Close this window'></a>";
5114
-		                addFlagWindow += "<div id='convBetween'>"+ lstmsgFromf +"<div id='btwnNbCvTitle'></div>"+ lstmsgTof +"</div>";
5115
-		                addFlagWindow += "<div id='convTitle'>"+ convFlagTitle +"</div>";
5116
-		                addFlagWindow += "<input type='submit' id='setConvFlag'>";
5117
-		                addFlagWindow += "</div>";
5118
-
5119
-		                $("#content").append("<div id='recTblOverlay'></div>");
5120
-		                $("#content").append(addFlagWindow);
5121
-
5122
-		                if (cvFlag == 1) { $("#setConvFlag").prop("value", "Remove flag"); } else { $("#setConvFlag").prop("value", "Set flag"); }
5123
-
5124
-		                var topNmDistf = parseInt((window.innerHeight / 2).toFixed(2) - 180) +"px";
5125
-		                var leftNmDistf = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
5126
-		                $("#convFlagWindow").css({ "top" : topNmDistf, "left" : leftNmDistf });
5127
-
5128
-		                $("#closeFlagWindow").click(function() { $("#convFlagWindow").remove(); $("#recTblOverlay").remove(); });
5129
-		                $("#recTblOverlay").click(function() { $("#convFlagWindow").remove(); $("#recTblOverlay").remove(); });
5130
-
5131
-			        // Make the window draggable
5132
-			        function makeMgrWndDraggable(e) {
5133
-
5134
-				   window.pmdragging = {};
5135
-				   pmdragging.pageX0 = e.pageX;
5136
-				   pmdragging.pageY0 = e.pageY;
5137
-				   pmdragging.elem = $("#convFlagWindow");
5138
-				   pmdragging.offset0 = $("#convFlagWindow").offset();
5139
-
5140
-				   function handle_dragging(e) {
5141
-				       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
5142
-				       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
5143
-				       $(pmdragging.elem).offset({top: top, left: left});
5144
-				   }
5145
-
5146
-				   function handle_mouseup(e) {
5147
-				       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
5148
-				   }
5149
-
5150
-				   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
5151
-			        }
5152
-			        $("#dragFlagWindow").mousedown(makeMgrWndDraggable);
5153
-
5154
-		                // Save the flag
5155
-		                $("#setConvFlag").click(function() {
5156
-
5157
-		                   if ($(this).val() == "Set flag") { var convFlag = 1; } else { var convFlag = 0; }
5158
-
5159
-		                   var saveConvFlagUrl = OC.generateUrl("/apps/sms_relentless/user/saveconvflag");
5160
-
5161
-		                   $.ajax({
5162
-					   url: saveConvFlagUrl + '/' + userid,
5163
-					   type: 'POST',
5164
-		                           data: { 
5165
-		                                  convFlag: convFlag,
5166
-		                                  convId: conversationIdf
5167
-		                                  },
5168
-					   success: function(respupflag) {
5169
-
5170
-		                                       if (respupflag != "success") { showAlert("Error while trying to save the conversation flag to the database."); }
5171
-
5172
-		                                       $("#convFlagWindow").remove();
5173
-		                                       $("#recTblOverlay").remove();
5174
-
5175
-		                                       // Refresh the conversations list
5176
-					               var archCvIdsc = '';
5177
-					               var actCvIdsc = '';
5178
-
5179
-					               $(".convsListArch").each(function() { 
5180
-							   if ($(this).css('background-color') === "rgb(241, 224, 239)") {
5181
-					                       archCvIdsc = $(this).attr("id");
5182
-							   }
5183
-					               });
5184
-
5185
-						       $(".convsListAct").each(function() {
5186
-							   if ($(this).css('background-color') === "rgb(215, 239, 239)") {
5187
-					                       actCvIdsc = $(this).attr("id");
5188
-							   }
5189
-						       });
5190
-
5191
-					               $('#smstables').empty();
5192
-					               $("#conversationsshow").click();
5193
-					               setTimeout(function() { if (actCvIdsc != '') { document.getElementById(actCvIdsc).click(); } else if (archCvIdsc != '') { document.getElementById(actCvIdsc).click(); } }, 800);
5194
-		                           },
5195
-					   error: function() {
5196
-		                                   showAlert("Error while attempting to save the conversation flag to the database.");
5197
-		                                   $("#convFlagWindow").remove();
5198
-		                                   $("#recTblOverlay").remove();
5199
-		                           }
5200
-				   });
5201
-		                });
5202
-		             });
5203
-
5204
-
5205
-		             // Get the messages exchanged between the current 2 phone numbers, from the database
5206
-		             function getMsgsForNmbrs(phNumberFrom, phNumberTo, conversationId, archivedConv, archivedBy, unarchivedBy, lastArchived, lastUnarchived, flagged, flagunflagby, flagunflagdate, tag, taguntagby, taguntagdate, convdescription, convdescchangeby, convdescchangedate) {
5207
-
5208
-				   let getGrpConvUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedforreply");
5209
-
5210
-				   $('#conversationsText').addClass('icon-loading');
5211
-
5212
-				   let totalPhNmbrs = 0;
5213
-
5214
-				   $.ajax({
5215
-					  method: 'POST',
5216
-					  url: getGrpConvUrl + '/' + userid,
5217
-					  contentType: 'application/json',
5218
-				          data: JSON.stringify({ "phoneNmbrFrom": phNumberFrom, "phoneNmbrTo": phNumberTo }),
5219
-					  success: function(groupedperconv) {
5220
-
5221
-						     $('#conversationsText').removeClass('icon-loading');
5222
-
5223
-						     let fromtoNmbrsData = [];
5224
-
5225
-						     for (let i = 0; i < groupedperconv.length; i++) {
5226
-
5227
-							     if (groupedperconv[i].author_displayname) {
5228
-								 var authordnm = groupedperconv[i].author_displayname;
5229
-							     } else { 
5230
-								 var authordnm = '';
5231
-							     }
5232
-
5233
-							     var sentfromnmbrarr = groupedperconv[i].from.split(": ");
5234
-							     if (sentfromnmbrarr[1]) {
5235
-							         var groupednbfrom = sentfromnmbrarr[1];
5236
-		                                             } else {
5237
-							         var groupednbfrom = sentfromnmbrarr[0];
5238
-		                                             }
5239
-
5240
-							     var modmessagerec = '';
5241
-							     if (groupedperconv[i].author_displayname) {
5242
-								 modmessagerec = "<span class='msgAuthorNameGrp'>"+ groupedperconv[i].author_displayname + ":</span>" + groupedperconv[i].message;
5243
-							     } else {
5244
-							         modmessagerec = groupedperconv[i].message;
5245
-				                             }
5246
-
5247
-							     if (groupedperconv[i].to.indexOf(": ") > -1) {
5248
-								 var groupednmbrtopre = groupedperconv[i].to.split(": ");
5249
-								 var groupednmbrto = groupednmbrtopre[1];
5250
-							     } else { 
5251
-								 var groupednmbrto = groupedperconv[i].to;
5252
-							     }
5253
-
5254
-							     fromtoNmbrsData.push({
5255
-								       'author_displayname': authordnm,
5256
-								       'from': groupednbfrom,
5257
-								       'to': groupednmbrto,
5258
-								       'message': modmessagerec,
5259
-								       'date': groupedperconv[i].date,
5260
-								       'status': groupedperconv[i].deliveryreceipt,
5261
-								       'table': groupedperconv[i].table
5262
-							     });
5263
-						     }
5264
-
5265
-
5266
-						     // Remove the duplicates
5267
-						     let noDupMsgData = [];
5268
-						     $.each(fromtoNmbrsData, function(i, e) {
5269
-							    let matchingData = $.grep(noDupMsgData, function(item) {
5270
-								    return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
5271
-							    });
5272
-							    if (matchingData.length === 0) {
5273
-								noDupMsgData.push(e);
5274
-							    }
5275
-						     });
5276
-
5277
-						     let messagesPerNmbr = {};
5278
-						     let msgsNamesPerNmbr = {};
5279
-						     let msgsNmbrsNames = {};
5280
-
5281
-						     let displayNamesarr = [];
5282
-						     let convData = [];
5283
-
5284
-						     for (let n = 0; n < noDupMsgData.length; n++) {
5285
-
5286
-							  if (noDupMsgData[n]['from'] == phNumberFrom && noDupMsgData[n]['table'] == 'sent') {
5287
-
5288
-							      convData.push({
5289
-							                     'author_displayname': noDupMsgData[n]['author_displayname'],
5290
-							                     'message': noDupMsgData[n]['message'],
5291
-							                     'from': noDupMsgData[n]['from'],
5292
-							                     'to': noDupMsgData[n]['to'],
5293
-							                     'date': noDupMsgData[n]['date'],
5294
-							                     'direction': 'sent_from',
5295
-							                     'status': noDupMsgData[n]['status'],
5296
-							                     'table': noDupMsgData[n]['table']
5297
-							      });
5298
-
5299
-							  } else if (noDupMsgData[n]['to'] == phNumberFrom && noDupMsgData[n]['table'] == 'sent') {
5300
-
5301
-							      convData.push({
5302
-							                     'author_displayname': noDupMsgData[n]['author_displayname'],
5303
-							                     'message': noDupMsgData[n]['message'],
5304
-							                     'from': noDupMsgData[n]['from'],
5305
-							                     'to': noDupMsgData[n]['to'],
5306
-							                     'date': noDupMsgData[n]['date'],
5307
-							                     'direction': 'sent_to',
5308
-							                     'status': noDupMsgData[n]['status'],
5309
-							                     'table': noDupMsgData[n]['table']
5310
-							      });
5311
-
5312
-
5313
-							  } else if (noDupMsgData[n]['from'] == phNumberFrom && noDupMsgData[n]['table'] == 'received') {
5314
-
5315
-							      convData.push({
5316
-							                     'author_displayname': noDupMsgData[n]['author_displayname'],
5317
-							                     'message': noDupMsgData[n]['message'],
5318
-							                     'from': noDupMsgData[n]['from'],
5319
-							                     'to': noDupMsgData[n]['to'],
5320
-							                     'date': noDupMsgData[n]['date'],
5321
-							                     'direction': 'received_from',
5322
-							                     'status': noDupMsgData[n]['status'],
5323
-							                     'table': noDupMsgData[n]['table']
5324
-							      });
5325
-
5326
-							  } else if (noDupMsgData[n]['to'] == phNumberFrom && noDupMsgData[n]['table'] == 'received') {
5327
-
5328
-							      convData.push({
5329
-							                     'author_displayname': noDupMsgData[n]['author_displayname'],
5330
-							                     'message': noDupMsgData[n]['message'],
5331
-							                     'from': noDupMsgData[n]['from'],
5332
-							                     'to': noDupMsgData[n]['to'],
5333
-							                     'date': noDupMsgData[n]['date'],
5334
-							                     'direction': 'received_on',
5335
-							                     'status': noDupMsgData[n]['status'],
5336
-							                     'table': noDupMsgData[n]['table']
5337
-							      });
5338
-							  }
5339
-						     }
5340
-
5341
-						     // Sort messages by date
5342
-						     convData.sort(function(a, b) {
5343
-		                                        return new Date(b.date) - new Date(a.date);
5344
-						     });
5345
-
5346
-						     // Collect the display names of the users that sent messages from the current numbers
5347
-						     let selectedNames = [];
5348
-						     let displayNames = '';
5349
-						     for (let v = 0; v < convData.length; v++) {
5350
-							  if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
5351
-							      selectedNames.push(convData[v]['author_displayname']);
5352
-							      displayNames += "<div id='diplNm_"+ phNumberFrom +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
5353
-							  }
5354
-						     }
5355
-						     displayNames += "<div id='diplNmAllMsgcv' class='dispNameListAll' title='Show all the messages exchanged between the current 2 phone numbers.'>All messages</div>";
5356
-
5357
-						     // Store the display names for the current numbers, to be able to see them later
5358
-						     let ctPhNumber = phNumberFrom;
5359
-						     msgsNamesPerNmbr[ctPhNumber] = displayNames;
5360
-
5361
-						     // Store the messages sent by each user, to be able to see them later when clicking on the user's name
5362
-						     for (let h = 0; h < selectedNames.length; h++) {
5363
-
5364
-							  let rowMessageArrpn = [];
5365
-
5366
-							  for (let b = 0; b < convData.length; b++) {
5367
-
5368
-							       if (selectedNames[h] == convData[b]['author_displayname']) {
5369
-
5370
-								   if (convData[b]['direction'] == 'sent_from') {
5371
-		                                                       if (convData[b]['status']) {
5372
-									   if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
5373
-							                       if (convData[b]['status'].indexOf("undelivered") > -1) {
5374
-									           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5375
-		                                                               } else {
5376
-									           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5377
-		                                                               }
5378
-									   } else {
5379
-									       var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5380
-									   }
5381
-								       } else {
5382
-									   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5383
-		                                                       }
5384
-								       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5385
-								   } else if (convData[b]['direction'] == 'sent_to') {
5386
-		                                                       if (convData[b]['status']) {
5387
-									   if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
5388
-							                       if (convData[b]['status'].indexOf("undelivered") > -1) {
5389
-									           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5390
-		                                                               } else {
5391
-									           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5392
-		                                                               }
5393
-									   } else {
5394
-									       var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5395
-									   }
5396
-		                                                       } else {
5397
-		                                                           var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5398
-		                                                       }
5399
-								       rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5400
-								   } else if (convData[b]['direction'] == 'received_from') {
5401
-								       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
5402
-								   } else if (convData[b]['direction'] == 'received_on') {
5403
-								       rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
5404
-							           }
5405
-							       }
5406
-							  }
5407
-							  let crtNmber = phNumberFrom;
5408
-							  let crtName = selectedNames[h];
5409
-							  msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
5410
-				                          msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
5411
-						     }
5412
-
5413
-				                     // The number of messages to be loaded by default
5414
-				                     var nmbTblDefault = 50;
5415
-
5416
-				                     // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
5417
-				                     if (convData.length > nmbTblDefault) {
5418
-				                         $("#loadMoreMsgs").css("display", "block");
5419
-				                         var nmbToBeLoaded = nmbTblDefault;
5420
-				                     } else { var nmbToBeLoaded = convData.length; }
5421
-
5422
-						     let rowMessageArr = [];
5423
-
5424
-						     for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
5425
-
5426
-							  if (convData[m]['direction'] == 'sent_from') {
5427
-							      if (convData[m]['status']) {
5428
-								  if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
5429
-						                      if (convData[m]['status'].indexOf("undelivered") > -1) {
5430
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5431
-		                                                      } else {
5432
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5433
-		                                                      }
5434
-								  } else {
5435
-								      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5436
-								  }
5437
-							      } else {
5438
-							          let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5439
-							      }
5440
-							      rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5441
-
5442
-							  } else if (convData[m]['direction'] == 'sent_to') {
5443
-		                                              if (convData[m]['status']) {
5444
-								  if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
5445
-						                      if (convData[m]['status'].indexOf("undelivered") > -1) {
5446
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5447
-		                                                      } else {
5448
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5449
-		                                                      }
5450
-								  } else {
5451
-								      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5452
-								  }
5453
-							      } else {
5454
-							          let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5455
-							      }
5456
-							      rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5457
-
5458
-							  } else if (convData[m]['direction'] == 'received_from') {
5459
-
5460
-							      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
5461
-
5462
-							  } else if (convData[m]['direction'] == 'received_on') {
5463
-
5464
-							      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
5465
-							  }
5466
-						     }
5467
-
5468
-						     let convDataPerNmbr = rowMessageArr.join("");
5469
-
5470
-
5471
-		                                     if (archivedConv == 1) {
5472
-		                                         var archiveImg = "unarchiveConv";
5473
-		                                         var archTitle = "Unarchive this conversation.";
5474
-		                                         var removeConvImg = "removeConv";
5475
-		                                         var removeConvTitle = "Permanently delete all the messages in this conversation.";
5476
-		                                         var archornottitle = "Archived Conversation";
5477
-		                                     } else {
5478
-		                                         var archiveImg = "archiveConv";
5479
-		                                         var archTitle = "Archive this conversation.";
5480
-		                                         var removeConvImg = "removeConvGrey";
5481
-		                                         var removeConvTitle = "Only archived conversations can be deleted.";
5482
-		                                         var archornottitle = "Active Conversation";
5483
-		                                     }
5484
-
5485
-		                                     if (archivedBy == null || archivedBy == '') {
5486
-		                                         var lastArchUnarch = "<font style='color:#178e84;font-weight:600;'>Active Conversation</font> | "+ phNumberFrom +"<div id='betweenNmbrs'></div>"+ phNumberTo +"";
5487
-		                                     } else if (archivedConv == 1 && archivedBy && lastArchived) {
5488
-		                                         var lastArchUnarch = "<font style='color:#9e6897;font-weight:600;'>Archived Conversation</font> | "+ phNumberFrom +"<div id='betweenNmbrs'></div>"+ phNumberTo +" | Last archived by <font style='color:#365b8b;font-weight:600;'>"+ archivedBy + "</font> on "+ lastArchived;
5489
-		                                     } else if (archivedConv == 0 && unarchivedBy && lastUnarchived) {
5490
-		                                         var lastArchUnarch = "<font style='color:#178e84;font-weight:600;'>Active Conversation</font> | "+ phNumberFrom +"<div id='betweenNmbrs'></div>"+ phNumberTo +" | Last unarchived by <font style='color:#365b8b;font-weight:600;'>"+ unarchivedBy + "</font> on "+ lastUnarchived;
5491
-		                                     }
5492
-
5493
-		                                     if (convdescription) {
5494
-		                                         var cvDescAdded = "convDescAddedCvt";
5495
-		                                         var cvDescText = convdescription + " (<span style='font-weight:500'>Description</span> last saved by <span style='font-weight:500;color:#365b8b;'>"+ convdescchangeby +"</span> at "+ convdescchangedate +".)"; 
5496
-		                                     } else { 
5497
-		                                         var cvDescAdded = "convDescCvt"; var cvDescText = ""; 
5498
-		                                     }
5499
-
5500
-		                                     if (tag) { 
5501
-		                                         var cvTagAdded = "convTagAddedCvt"; 
5502
-		                                         var cvTagText = "<span style='font-size:14px;font-weight:500;color:#39608a;'>"+ tag + "</span> (<span style='font-weight:500'>Tag</span> last saved by <span style='font-weight:500;color:#365b8b;'>"+ taguntagby +"</span> at "+ taguntagdate +".)"; 
5503
-		                                     } else { 
5504
-		                                         var cvTagAdded = "convTagCvt"; var cvTagText = ""; 
5505
-		                                     }
5506
-
5507
-		                                     if (flagged == 1) { 
5508
-		                                         var cvFlagAdded = "cvFlagRedCvt"; 
5509
-		                                         var cvFlagText = "(<span style='font-weight:500'>Flag</span> last set by <span style='font-weight:500;color:#365b8b;'>"+ flagunflagby +"</span> at "+ flagunflagdate +".)"; 
5510
-		                                     } else if (flagged == 0) { 
5511
-		                                         var cvFlagAdded = "cvFlagEmptyCvt"; 
5512
-		                                         var cvFlagText = "(<span style='font-weight:500'>Flag</span> last removed by <span style='font-weight:500;color:#365b8b;'>"+ flagunflagby +"</span> at "+ flagunflagdate +".)"; 
5513
-		                                     } else { 
5514
-		                                         var cvFlagAdded = "cvFlagEmptyCvt";
5515
-		                                         var cvFlagText = "";
5516
-		                                     }
5517
-
5518
-				                     $("#conversationsText").empty();
5519
-		                                     $("#conversationsText").append("<div id='convTextHeader'><table id='convTextTbl'><tr><td style='width:5% !important'><div id='archUnarchAct' class='"+ archiveImg +"' title='"+ archTitle +"'></div></td><td id='convBarTitle'><div id='titleFirstRow'>"+ lastArchUnarch +"</div><div id='titleSecRow'><div id='titleConvDesc'><div class='"+ cvDescAdded +"' title='Conversation description'></div><div class='cvDescContent'>"+ cvDescText +"</div></div><div id='titleConvTag'><div class='"+ cvTagAdded +"' title='Conversation tag'></div><div class='cvTagContent'>"+ cvTagText +"</div></div><div id='titleConvFlag'><div class='"+ cvFlagAdded +"' title='Conversation flag'></div><div class='cvFlagContent'>"+ cvFlagText +"</div></div><div id='titleConvDelete'><div id='deleteAllMsgConv' title='Permanently delete the entire conversation from the database'></div><div id='deleteMsgsCvText'>Permanently delete from the database all the messages included in this conversation.</div></div></div><div id='expandTitle'><div id='expandTitleImg'></div></div></td><td style='width:5% !important'><div id='convParticipants' class='convPart' title='Show the list with conversation participants.'></div></td></tr></table></div><div id='grpdbynamelstcv'></div><div id='loadMoreMsgs' title='Click to load older messages.'>Load more messages</div><div id='loadMoreMsgsusr' title='Click to load older messages.'>Load more messages</div>");
5520
-		                                     $("#conversationsText").append("<div id='loadMoreMsgs' title='Click to load older messages.'>Load more messages</div><div id='loadMoreMsgsusr' title='Click to load older messages.'>Load more messages</div><div id='convListRowCell'></div>");
5521
-
5522
-		                                     var allmsgconv = "<div id='sendMsgReplySec'><table id='sendMsgConvSec'><tr><td><div id='fromPhnNmbrCv'>From: <select id='selectFromNbConv'></select></div><div id='toPhnNmbrCv'>To: <select id='selectToNbConv'></select></div></td></tr>";
5523
-		                                     allmsgconv += "<tr><td><textarea id='sendMsgConvTextSec' placeholder='Enter a message here, then press Send SMS.'></textarea></td></tr></table>";
5524
-		                                     allmsgconv += "<div id='sendMsgBtnConv'>Send SMS</div></div>";
5525
-		                                     allmsgconv += "<div id='expToSendReply' title='Expand to send a message'><img id='expandWindowRplSec' src='/" + ctappdir + "/sms_relentless/img/arrowDown.svg'></div>";
5526
-
5527
-		                                     $("#conversationsText").append(allmsgconv);
5528
-
5529
-				                     $("#convListRowCell").append(convDataPerNmbr);
5530
-
5531
-				                     if (convData.length > nmbTblDefault) {
5532
-				                         $("#loadMoreMsgs").css("display", "block");
5533
-				                     }
5534
-
5535
-		                                     $("#sendMsgConvSec").css("width", $("#conversationsText").width() - 20);
5536
-		                                     $("#sendMsgConvTextSec").css("width", $("#conversationsText").width() - 20);
5537
-
5538
-		                                     // Expand the conversation title bar to see the conversation details
5539
-		                                     $("#expandTitleImg").click(function() {
5540
-		                                        if ($("#titleSecRow").is(":visible")) {
5541
-		                                            $("#titleSecRow").css("display", "none"); 
5542
-		                                            $("#expandTitleImg").css("background-image", "url('/" + ctappdir + "/sms_relentless/img/arrowDown_small.svg')");
5543
-		                                            $("#expandTitleImg").prop("title", "Expand to see conversation details");
5544
-		                                        } else {
5545
-		                                            $("#titleSecRow").css("display", "block"); 
5546
-		                                            $("#expandTitleImg").css("background-image", "url('/" + ctappdir + "/sms_relentless/img/arrowUp_small.svg')");
5547
-		                                            $("#expandTitleImg").prop("title", "Collapse");
5548
-		                                        }
5549
-		                                     });
5550
-
5551
-		                                     // Delete all the messages in a conversation
5552
-		                                     $("#deleteAllMsgConv").click(function() {
5553
-
5554
-							  confirmAlert("Are you sure that you want to permanently delete from the database all the messages included in this conversation ? This action cannot be undone.");
5555
-
5556
-							  $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); return; });
5557
-
5558
-							  $("#confirmOk").click(function() {
5559
-
5560
-		                                              confirmAlert("Confirm that you want to permanently delete from the database all the messages included in this conversation !");
5561
-
5562
-							      $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); return; });
5563
-
5564
-							      $("#confirmOk").click(function() {
5565
-
5566
-								 $("#alertMsgOverlay").remove();
5567
-								 $("#alertConfMessage").remove();
5568
-
5569
-								 var deleteConvUrl = OC.generateUrl("/apps/sms_relentless/user/removeconvmsgs");
5570
-								 $('#smstables').addClass('icon-loading');
5571
-
5572
-								 $.ajax({
5573
-								      url: deleteConvUrl + '/' + userid,
5574
-								      type: "POST",
5575
-								      data: { "conversationId": conversationId },
5576
-								      success: function(delcvmsgres) {
5577
-						                                 $('#smstables').removeClass('icon-loading');
5578
-								                 if (delcvmsgres == "success") {
5579
-								                     showAlert("The messages included in this conversation have been deleted successfully !");
5580
-								                     $('#conversationsshow').click();
5581
-								                 } else if (delcvmsgres == "not allowed") { 
5582
-								                     showAlert("Only admins can delete messages !");
5583
-								                 } else {
5584
-								                     showAlert("There was an error while deleting the messages included in this conversation !");
5585
-								                 }
5586
-								      },
5587
-								      error: function() {
5588
-								                 $('#smstables').removeClass('icon-loading');
5589
-								                 showAlert("There was an error while attempting to delete the messages included in this conversation !");
5590
-								      }
5591
-								 });
5592
-							      });
5593
-							  });
5594
-		                                     });
5595
-
5596
-
5597
-						     // Expand the reply section when clicking on the arrow, to be able to send replies
5598
-						     $("#expToSendReply").unbind("click");
5599
-						     $("#expToSendReply").click(function() {
5600
-
5601
-							if ($("#expandWindowRplSec").attr('src') == '/' + ctappdir + '/sms_relentless/img/arrowDown.svg') {
5602
-							    $("#sendMsgReplySec").css("display", "block");
5603
-		                                            $("#conversationsText").animate({scrollTop: $("#conversationsText").prop("scrollHeight")}, 100);
5604
-							    $("#expandWindowRplSec").attr('src', '/' + ctappdir + '/sms_relentless/img/arrowUp.svg');
5605
-							    $(this).attr('title', 'Collapse');
5606
-							} else {
5607
-							    $("#sendMsgReplySec").css("display", "none");
5608
-							    $("#expandWindowRplSec").attr('src', '/' + ctappdir + '/sms_relentless/img/arrowDown.svg');
5609
-							    $(this).attr('title', 'Expand to send a reply');
5610
-							}
5611
-						     });
5612
-
5613
-						     // Append the available phone numbers to the From drop-down list
5614
-						     var availPhoneNmbrs = [];
5615
-						     $("#currentsmsnmbrs .optselectsmsnb").each(function() {
5616
-							var crtphnmbr = $(this).attr("value");
5617
-							if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
5618
-						     });
5619
-
5620
-						     if (availPhoneNmbrs.length > 0) {
5621
-		                                         var extcheck = true;
5622
-							 var avphopt = "";
5623
-							 var avphoptto = "";
5624
-							 for (let d = 0; d < availPhoneNmbrs.length; d++) {
5625
-							      if (availPhoneNmbrs[d].indexOf(phNumberTo) === -1) {
5626
-								  avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
5627
-							      } else {
5628
-								  avphopt += "<option value='"+ availPhoneNmbrs[d] +"' selected>"+ availPhoneNmbrs[d] +"</option>";
5629
-		                                                  extcheck = false;
5630
-							      }
5631
-		                                              if (availPhoneNmbrs[d].indexOf("+") > -1) {
5632
-							          avphoptto += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
5633
-		                                              }
5634
-							 }
5635
-
5636
-							 $("#selectFromNbConv").append(avphopt);
5637
-							 if (extcheck) {
5638
-							     avphoptto += "<option value='"+ phNumberTo +"' selected>"+ phNumberTo +"</option>";
5639
-							 } else { avphoptto += "<option value='"+ phNumberFrom +"' selected>"+ phNumberFrom +"</option>"; }
5640
-							 $("#selectToNbConv").append(avphoptto);
5641
-
5642
-		                                         // Warn of beginning/continuing a different conversation if sending the message from/to a number different from the numbers that participate in the conversation
5643
-		                                         $("#selectFromNbConv").change(function() {
5644
-		                                            var selNmbr = $(this).val().split(": ")[1];
5645
-		                                            if (selNmbr != phNumberTo && selNmbr != phNumberFrom) { showAlert("You have selected a phone number that is different from the numbers that participate in this conversation. If you send a message from/to a different number than the 2 numbers that participate in the current conversation, you will begin or continue a different conversation. Thus, your message won't appear in the current conversation, but in a different one."); }
5646
-		                                         });
5647
-
5648
-		                                         $("#selectToNbConv").change(function() {
5649
-		                                            if ($(this).val().indexOf(": ") > -1) {
5650
-		                                                var selNmbrto = $(this).val().split(": ")[1];
5651
-		                                            } else { var selNmbrto = $(this).val(); }
5652
-		                                            if (selNmbrto != phNumberFrom && selNmbrto != phNumberTo) { showAlert("You have selected a phone number that is different from the numbers that participate in this conversation. If you send a message from/to a different number than the 2 numbers that participate in the current conversation, you will begin or continue a different conversation. Thus, your message won't appear in the current conversation, but in a different one."); }
5653
-		                                         });
5654
-
5655
-						     } else { 
5656
-		                                         $("#selectFromNbConv").append("<option value='' selected>No IDs</option>");
5657
-		                                         $("#selectToNbConv").append("<option value='"+ phNumberFrom +"' selected>"+ phNumberFrom +"</option>");
5658
-		                                     }
5659
-
5660
-						     // Send a message from the reply section
5661
-						     $("#sendMsgBtnConv").click(function() {
5662
-
5663
-							$("#sendMsgConvSec,#sendMsgBtnConv").addClass('icon-loading');
5664
-							var msgToSend = $("#sendMsgConvTextSec").val();
5665
-							var selectedid = $("#selectFromNbConv").val();
5666
-							var toNumberinit = $("#selectToNbConv").val().split("+");
5667
-		                                        var toNumber = "+" + toNumberinit[1];
5668
-							var receiversNumbers = [toNumber];
5669
-
5670
-							if (selectedid != '') {
5671
-
5672
-							    var sendersplit = selectedid.split(":");
5673
-							    var providercap = sendersplit[0];
5674
-							    var provsec = sendersplit[1];
5675
-
5676
-							    if (/[a-zA-Z]/.test(provsec)) {
5677
-								var alphanumcheck = true;
5678
-							    } else { var alphanumcheck = false; }
5679
-
5680
-							    if (providercap == 'Tx' && alphanumcheck == false) {  
5681
-								var senderproc = selectedid.replace(/[^0-9]/g, "");
5682
-								var selectedsender = "+" + senderproc;
5683
-								var providerUsed = "telnyx";
5684
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
5685
-							    } else if (providercap == 'Pl' && alphanumcheck == false) {
5686
-								var selectedsender = selectedid.replace(/[^0-9]/g, "");
5687
-								var providerUsed = "plivo";
5688
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
5689
-							    } else if (providercap == 'Tw' && alphanumcheck == false) {  
5690
-								var senderproc = selectedid.replace(/[^0-9]/g, "");
5691
-								var selectedsender = "+" + senderproc;
5692
-								var providerUsed = "twilio";
5693
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
5694
-							    } else if (providercap == 'Fl' && alphanumcheck == false) {  
5695
-								var senderproc = selectedid.replace(/[^0-9]/g, "");
5696
-								var selectedsender = "+" + senderproc;
5697
-								var providerUsed = "flowroute";
5698
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
5699
-							    } else if (providercap == 'Tx' && alphanumcheck == true) {
5700
-								var selectedsender = provsec;
5701
-								var providerUsed = "telnyx";
5702
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
5703
-							    } else if (providercap == 'Pl' && alphanumcheck == true) {
5704
-								var selectedsender = provsec;
5705
-								var providerUsed = "plivo";
5706
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
5707
-							    } else if (providercap == 'Tw' && alphanumcheck == true) {
5708
-								var selectedsender = provsec;
5709
-								var providerUsed = "twilio";
5710
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
5711
-							    } else if (providercap == 'Fl' && alphanumcheck == true) {
5712
-								var selectedsender = provsec;
5713
-								var providerUsed = "flowroute";
5714
-								var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
5715
-							    }
5716
-
5717
-							  var uploadedtomms = [];
5718
-
5719
-							    if (msgToSend != '') {
5720
-
5721
-								  $.ajax({
5722
-								     url: relbaseUrl + '/' + userid,
5723
-								     type: "POST",
5724
-								     data: {
5725
-									   receiversPhoneNbs: receiversNumbers,
5726
-									   fromsender: selectedsender,
5727
-									   waitinterval: 1000,
5728
-									   sentsmstext: msgToSend,
5729
-									   ismms: 0,
5730
-									   mmsfiles: uploadedtomms
5731
-									 },
5732
-								     success: function(displayname) {
5733
-
5734
-								           var tzdate = new Date();
5735
-								           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
5736
-								           var presDatedb = presDatest.split(".")[0];
5737
-								           var presDatesc = presDatedb.split("T");
5738
-								           var presDate = presDatesc[0] +" "+ presDatesc[1];
5739
-								           var sentMessageStatus = '';
5740
-
5741
-								           if (displayname) {
5742
-								               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
5743
-								           } else { var msgToSendproc = msgToSend; }
5744
-
5745
-								           $("#convListRowCell").append("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ selectedsender +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ receiversNumbers[0] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ msgToSendproc +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ presDate +"</div><div class='sentMssgStatus'>"+ sentMessageStatus +"</div></div>");
5746
-
5747
-								           // Scroll down to the bottom of the window
5748
-								           $("#conversationsText").animate({scrollTop:$("#conversationsText").prop("scrollHeight")},200);
5749
-
5750
-								           $("#sendMsgConvSec,#sendMsgBtnConv").removeClass('icon-loading');
5751
-								     },
5752
-								     error: function() {
5753
-									   showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
5754
-									   $("#sendMsgConvSec,#sendMsgBtnConv").removeClass('icon-loading');
5755
-								     }
5756
-								  });
5757
-							    } else {
5758
-								    showAlert("Please enter a message in the text box!");
5759
-								    $("#sendMsgConvSec,#sendMsgBtnConv").removeClass('icon-loading');
5760
-							    }
5761
-							} else {
5762
-								showAlert("Please choose a Sender ID from the 'From' drop-down list!");
5763
-								$("#sendMsgConvSec,#sendMsgBtnConv").removeClass('icon-loading');
5764
-							}
5765
-						     });
5766
-
5767
-
5768
-		                                     // Show the list with conversation participants
5769
-				                     $("#grpdbynamelstcv").empty();
5770
-		                                     $("#grpdbynamelstcv").append("<div style='display:block;position:relative;width:100%;height:0;'><div id='closeConvPart' title='Close the list of conversation participants.'></div></div>");
5771
-				                     $("#grpdbynamelstcv").append(displayNames);
5772
-
5773
-		                                     $("#convParticipants").click(function() { 
5774
-		                                        if ($("#grpdbynamelstcv").is(":visible")) {
5775
-		                                            $("#grpdbynamelstcv").css("display", "none");
5776
-		                                            $("#convParticipants").removeClass("convPartRed");
5777
-		                                            $("#convParticipants").addClass("convPart");
5778
-		                                            $("#convParticipants").prop("title", "Show the list with conversation participants.");
5779
-		                                        } else { 
5780
-		                                            $("#grpdbynamelstcv").css("display", "block");
5781
-		                                            $("#convParticipants").removeClass("convPart");
5782
-		                                            $("#convParticipants").addClass("convPartRed");
5783
-		                                            $("#convParticipants").prop("title", "Close the list with conversation participants.");
5784
-
5785
-				                            $("#closeConvPart").click(function() {
5786
-				                               $("#grpdbynamelstcv").css("display", "none");
5787
-				                               $("#convParticipants").removeClass("convPartRed");
5788
-				                               $("#convParticipants").addClass("convPart");
5789
-				                               $("#convParticipants").prop("title", "Show the list with conversation participants.");
5790
-				                            });
5791
-		                                        }
5792
-		                                     });
5793
-
5794
-
5795
-						     // Store the messages for the current From number, to be able to see them later
5796
-						     let rowMessageArrcpt = [];
5797
-						     for (let m = 0; m < convData.length; m++) {
5798
-
5799
-							  if (convData[m]['direction'] == 'sent_from') {
5800
-							      if (convData[m]['status']) {
5801
-								  if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
5802
-						                      if (convData[m]['status'].indexOf("undelivered") > -1) {
5803
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5804
-		                                                      } else {
5805
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5806
-		                                                      }
5807
-								  } else {
5808
-								      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5809
-								  }
5810
-							      } else {
5811
-							          let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5812
-							      }
5813
-							      rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5814
-
5815
-							  } else if (convData[m]['direction'] == 'sent_to') {
5816
-							      if (convData[m]['status']) {
5817
-								  if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
5818
-						                      if (convData[m]['status'].indexOf("undelivered") > -1) {
5819
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5820
-		                                                      } else {
5821
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5822
-		                                                      }
5823
-								  } else {
5824
-								      var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5825
-								  }
5826
-							      } else {
5827
-							          let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5828
-							      }
5829
-							      rowMessageArrcpt.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5830
-
5831
-							  } else if (convData[m]['direction'] == 'received_from') {
5832
-
5833
-							      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
5834
-
5835
-							  } else if (convData[m]['direction'] == 'received_on') {
5836
-
5837
-							      rowMessageArrcpt.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
5838
-							  }
5839
-						     }
5840
-
5841
-						     messagesPerNmbr[phNumberFrom] = rowMessageArrcpt;
5842
-
5843
-				                     // Scroll down to the bottom of the window
5844
-			                             $("#conversationsText").animate({scrollTop: $("#conversationsText").prop("scrollHeight")},200);
5845
-
5846
-				                     // Load more messages
5847
-				                     var clickNmb = 0;
5848
-		                                     $("#loadMoreMsgs").unbind("click");
5849
-				                     $("#loadMoreMsgs").click(function() {
5850
-
5851
-				                         clickNmb++;
5852
-
5853
-				                         var crefnb = (clickNmb + 1) * nmbToBeLoaded;
5854
-
5855
-				                         if (crefnb > convData.length) {
5856
-				                             var nmbmsg = convData.length - 1;
5857
-				                             $("#loadMoreMsgs").css("display", "none");
5858
-				                         } else { 
5859
-				                             var nmbmsg = crefnb - 1;
5860
-				                         }
5861
-
5862
-				                         let rowMessageArrAdd = [];
5863
-
5864
-				                         for (let m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
5865
-
5866
-							      if (convData[m]['direction'] == 'sent_from') {
5867
-							          if (convData[m]['status']) {
5868
-								      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
5869
-						                          if (convData[m]['status'].indexOf("undelivered") > -1) {
5870
-								              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5871
-		                                                          } else {
5872
-								              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5873
-		                                                          }
5874
-								      } else {
5875
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5876
-								      }
5877
-							          } else {
5878
-							              let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5879
-							          }    
5880
-							          rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5881
-
5882
-							      } else if (convData[m]['direction'] == 'sent_to') {
5883
-							          if (convData[m]['status']) {
5884
-								      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
5885
-						                          if (convData[m]['status'].indexOf("undelivered") > -1) {
5886
-								              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5887
-		                                                          } else {
5888
-								              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
5889
-		                                                          }
5890
-								      } else {
5891
-								          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5892
-								      }
5893
-							          } else {
5894
-							              let sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
5895
-							          }
5896
-							          rowMessageArrAdd.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
5897
-
5898
-							      } else if (convData[m]['direction'] == 'received_from') {
5899
-
5900
-								  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
5901
-
5902
-							      } else if (convData[m]['direction'] == 'received_on') {
5903
-
5904
-								  rowMessageArrAdd.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
5905
-							      }
5906
-				                         }
5907
-
5908
-							 let convDataPerNmbrad = rowMessageArrAdd.join("");
5909
-
5910
-				                         let scrlheight = $("#convListRowCell").height();
5911
-				                         $("#convListRowCell").prepend(convDataPerNmbrad);
5912
-		                                         $("#conversationsText").animate({scrollTop: $("#convListRowCell").height() - scrlheight}, 0);
5913
-
5914
-				                     });
5915
-
5916
-
5917
-						     // Show the messages sent by each user whose name is clicked
5918
-						     $('[id*="diplNm_"]').click(function() {
5919
-
5920
-							 let crntNmbr = $(this).attr("id").split("_")[1];
5921
-							 let crntDisName = $(this).attr("name");                               
5922
-				                         $("#loadMoreMsgs").css("display", "none");
5923
-
5924
-				                         let convDataprn = [];
5925
-				                         $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
5926
-				                                convDataprn.push(item);
5927
-				                         });
5928
-
5929
-				                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
5930
-				                         if (convDataprn.length > nmbTblDefault) {
5931
-				                             $("#loadMoreMsgsusr").css("display", "block");
5932
-				                             let nmbToBeLoaded = nmbTblDefault;
5933
-				                         } else {
5934
-				                             $("#loadMoreMsgsusr").css("display", "none");
5935
-				                             let nmbToBeLoaded = convDataprn.length;
5936
-				                         }
5937
-
5938
-							 let rowMessageArrprnst = [];
5939
-
5940
-							 for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
5941
-				                              rowMessageArrprnst.push(convDataprn[n]);
5942
-							 }
5943
-
5944
-							 let convDataPerNmbrprnst = rowMessageArrprnst.join("");
5945
-
5946
-		                                         $("#convListRowCell").empty();
5947
-		                                         $("#convListRowCell").append(convDataPerNmbrprnst);
5948
-
5949
-				                         // Scroll down to the bottom of the window
5950
-				                         $("#conversationsText").animate({scrollTop: $("#conversationsText").prop("scrollHeight")}, 200);
5951
-
5952
-				                         // Load more messages
5953
-				                         var clckNb = 0;
5954
-				                         $("#loadMoreMsgsusr").unbind("click");
5955
-				                         $("#loadMoreMsgsusr").click(function() {
5956
-
5957
-				                             clckNb++;
5958
-				                             var crefnb = (clckNb + 1) * nmbToBeLoaded;
5959
-
5960
-				                             $("#loadMoreMsgs").css("display", "none");
5961
-
5962
-				                             if (crefnb > convDataprn.length) {
5963
-				                                 var nmbmsg = convDataprn.length - 1;
5964
-				                                 $("#loadMoreMsgsusr").css("display", "none");
5965
-				                             } else { 
5966
-				                                 var nmbmsg = crefnb - 1;
5967
-				                                 $("#loadMoreMsgsusr").css("display", "block");
5968
-				                             }
5969
-
5970
-				                             var rowMessageArrAddst = [];
5971
-
5972
-				                             for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
5973
-
5974
-				                                  rowMessageArrAddst.push(convDataprn[q]);
5975
-				                             }
5976
-
5977
-							     var convDataPerNmbradst = rowMessageArrAddst.join("");
5978
-
5979
-				                             let scrlheight = $("#convListRowCell").height();
5980
-				                             $("#convListRowCell").prepend(convDataPerNmbradst);
5981
-
5982
-		                                             $("#conversationsText").animate({scrollTop: $("#convListRowCell").height() - scrlheight }, 0);
5983
-				                         });
5984
-
5985
-
5986
-							 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
5987
-							 $("#diplNmAllMsgcv").css("color", "#04957b");
5988
-							 $(this).css("color", "#1b8efe");
5989
-						     });
5990
-
5991
-
5992
-						     // Show again all the messages exchanged between the current 2 phone numbers
5993
-						     $("#diplNmAllMsgcv").click(function() {
5994
-
5995
-				                         $("#loadMoreMsgsusr").css("display", "none");
5996
-
5997
-				                         let convDataprn = [];
5998
-				                         $.each(messagesPerNmbr[phNumberFrom], function(index, item) {
5999
-				                                convDataprn.push(item);
6000
-				                         });
6001
-
6002
-				                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
6003
-				                         if (convDataprn.length > nmbTblDefault) {
6004
-				                             $("#loadMoreMsgs").css("display", "block");
6005
-				                             let nmbToBeLoaded = nmbTblDefault;
6006
-				                         } else {
6007
-				                             $("#loadMoreMsgs").css("display", "none");
6008
-				                             let nmbToBeLoaded = convDataprn.length;
6009
-				                         }
6010
-
6011
-							 let rowMessageArrprnst = [];
6012
-
6013
-							 for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
6014
-				                              rowMessageArrprnst.push(convDataprn[n]);
6015
-							 }
6016
-
6017
-							 let convDataPerNmbrprnst = rowMessageArrprnst.join("");
6018
-
6019
-				                         $("#convListRowCell").empty();
6020
-				                         $("#convListRowCell").append(convDataPerNmbrprnst);
6021
-
6022
-				                         // Scroll down to the bottom of the window
6023
-				                         $("#conversationsText").animate({scrollTop: $("#conversationsText").prop("scrollHeight")}, 200);
6024
-
6025
-
6026
-				                         // Load more messages
6027
-				                         let clckNb = 0;
6028
-				                         $("#loadMoreMsgs").unbind("click");
6029
-				                         $("#loadMoreMsgs").click(function() {
6030
-
6031
-				                             clckNb++;
6032
-				                             var crefnb = (clckNb + 1) * nmbToBeLoaded;
6033
-
6034
-				                             $("#loadMoreMsgsusr").css("display", "none");
6035
-
6036
-				                             if (crefnb > convDataprn.length) {
6037
-				                                 var nmbmsg = convDataprn.length - 1;
6038
-				                                 $("#loadMoreMsgs").css("display", "none");
6039
-				                             } else {
6040
-				                                 var nmbmsg = crefnb - 1;
6041
-				                                 $("#loadMoreMsgs").css("display", "block");
6042
-				                             }
6043
-
6044
-				                             let rowMessageArrAddst = [];
6045
-
6046
-				                             for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
6047
-
6048
-				                                  rowMessageArrAddst.push(convDataprn[q]);
6049
-				                             }
6050
-
6051
-							     let convDataPerNmbradst = rowMessageArrAddst.join("");
6052
-
6053
-				                             let scrlheight = $("#convListRowCell").height();
6054
-				                             $("#convListRowCell").prepend(convDataPerNmbradst);
6055
-
6056
-		                                             $("#conversationsText").animate({scrollTop: $("#convListRowCell").height() - scrlheight }, 0);
6057
-
6058
-				                         });
6059
-
6060
-							 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
6061
-							 $("#diplNmAllMsgcv").css("color", "#04957b");
6062
-							 $(this).css("color", "#04c6a4");
6063
-
6064
-						     });
6065
-
6066
-
6067
-						     // Show the scroll-up arrow
6068
-						     $("#conversationsText").scroll(function() {
6069
-							if ($(this).scrollTop() > 900) {
6070
-							      $('#upArrow').fadeIn();
6071
-							} else {
6072
-							      $('#upArrow').fadeOut();
6073
-							}
6074
-						     });
6075
-
6076
-						     $("#upArrow").click(function(e) {
6077
-							$("#conversationsText").animate({scrollTop: 0}, 400);
6078
-						     });
6079
-
6080
-
6081
-						     // Download MMS files when clicking on their URLs
6082
-						     $('[id^="mmsTblUrl-"]').on('click', function(evt) {
6083
-
6084
-							var clckedUrl = $(this).text();
6085
-							var flNamearr = clckedUrl.split("/");
6086
-							var flName = flNamearr.reverse()[0];
6087
-
6088
-							confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
6089
-
6090
-							$("#confirmOk").click(function() {
6091
-
6092
-							   $("#alertMsgOverlay").remove();
6093
-							   $("#alertConfMessage").remove();
6094
-
6095
-							   var mmsLink = document.createElement("a");
6096
-							   mmsLink.setAttribute('href', clckedUrl);
6097
-							   mmsLink.setAttribute('download', flName);
6098
-		                                           mmsLink.setAttribute('target', '_blank');
6099
-							   document.body.appendChild(mmsLink);
6100
-							   mmsLink.click();
6101
-							   mmsLink.remove();
6102
-							});
6103
-
6104
-							$("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
6105
-						     });
6106
-
6107
-
6108
-						     // Archive/Unarchive the current conversation
6109
-						     $("#archUnarchAct").click(function() {
6110
-
6111
-		                                        if (archivedConv == 1) {
6112
-
6113
-							    confirmAlert("Do you really want to <b>unarchive</b> this conversation ?");
6114
-
6115
-							    $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
6116
-
6117
-							    $("#confirmOk").click(function() {
6118
-
6119
-							       $("#alertMsgOverlay").remove();
6120
-							       $("#alertConfMessage").remove();
6121
-
6122
-							       var unarchiveUrl = OC.generateUrl("/apps/sms_relentless/user/unarchiveconv");
6123
-		                                               $('#smstables').addClass('icon-loading');
6124
-
6125
-							       $.ajax({
6126
-								  url: unarchiveUrl + '/' + userid,
6127
-		                                                  type: "POST",
6128
-								  data: { "conversationId": conversationId },
6129
-								  success: function(respunarch) {
6130
-
6131
-								              if (respunarch == "success") {
6132
-
6133
-								                  $('#smstables').removeClass('icon-loading');
6134
-
6135
-		                                                                  // Refresh the conversations list and the current conversation
6136
-										  $('#smstables').empty();
6137
-										  $("#conversationsshow").click();
6138
-
6139
-		                                                                  setTimeout(function() {
6140
-										     $(".convsListAct").each(function() {
6141
-											 if ($(this).find('[id^="activeImg-"]').data("conversationid") == conversationId) {
6142
-											     let actCvIda = $(this).attr("id");
6143
-		                                                                             document.getElementById(actCvIda).click();
6144
-											 }
6145
-										     });
6146
-		                                                                  }, 800);
6147
-
6148
-								              } else {
6149
-								                  showAlert("There was an error while unarchiving the conversation !");
6150
-								              }
6151
-								  },
6152
-								  error: function() {
6153
-								              showAlert("Error while attempting to unarchive the conversation.");
6154
-		                                                              $('#smstables').removeClass('icon-loading');
6155
-								  }
6156
-							       });
6157
-							    });
6158
-
6159
-		                                        } else {
6160
-
6161
-							    confirmAlert("Do you really want to <b>archive</b> this conversation ?");
6162
-
6163
-							    $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
6164
-
6165
-							    $("#confirmOk").click(function() {
6166
-
6167
-							       $("#alertMsgOverlay").remove();
6168
-							       $("#alertConfMessage").remove();
6169
-
6170
-							       var archiveUrl = OC.generateUrl("/apps/sms_relentless/user/archiveconv");
6171
-		                                               $('#smstables').addClass('icon-loading');
6172
-
6173
-							       $.ajax({
6174
-								  url: archiveUrl + '/' + userid,
6175
-		                                                  type: "POST",
6176
-								  data: { "conversationId": conversationId },
6177
-								  success: function(resparch) {
6178
-
6179
-								              if (resparch == "success") {
6180
-
6181
-								                  $('#smstables').removeClass('icon-loading');
6182
-
6183
-		                                                                  // Refresh the conversations list and the current conversation
6184
-										  $('#smstables').empty();
6185
-										  $("#conversationsshow").click();
6186
-
6187
-		                                                                  setTimeout(function() {
6188
-										     $(".convsListArch").each(function() {
6189
-											 if ($(this).find('[id^="archivedImg-"]').data("conversationid") == conversationId) {
6190
-											     let actCvIdb = $(this).attr("id");
6191
-		                                                                             document.getElementById(actCvIdb).click();
6192
-											 }
6193
-										     });
6194
-		                                                                  }, 800);
6195
-
6196
-								              } else {
6197
-								                  showAlert("There was an error while archiving the conversation !");
6198
-								              }
6199
-								  },
6200
-								  error: function() {
6201
-								              showAlert("Error while attempting to archive the conversation.");
6202
-		                                                              $('#smstables').removeClass('icon-loading');
6203
-								  }
6204
-							       });
6205
-							    });
6206
-		                                        }
6207
-						     });
6208
-
6209
-					  },
6210
-					  error: function() {
6211
-				                     showAlert("Error while attempting to get conversation messages from the database!");
6212
-						     $('#listAllMsgsConv').removeClass('icon-loading');
6213
-					  }
6214
-				   });
6215
-		             }
6216
-
6217
-		             $('[id^="indArchConv-"]').click(function() {
6218
-
6219
-		                $(".convsListArch").each(function(){ $(this).css("background-color", "rgb(252, 245, 251)"); });
6220
-		                $(".convsListAct").each(function(){ $(this).css("background-color", "rgb(239, 252, 252)"); });
6221
-		                $(this).css("background-color", "rgb(241, 224, 239)");
6222
-
6223
-		                let crtordnmbr = $(this).attr("id").replace("indArchConv-", "");
6224
-		                let phnNmbrFrom = $("#indArchCvFrom-"+ crtordnmbr).text().split(": ")[1];
6225
-		                let phnNmbrTo = $("#indArchCvTo-"+ crtordnmbr).text().split(": ")[1];
6226
-		                let conversationId = $(this).find('[id^="archivedImg-"]').data("conversationid");
6227
-		                let archivedConv = $(this).find('[id^="archivedImg-"]').data("archivedyesno");
6228
-		                let archivedBy = $(this).find('[id^="archivedImg-"]').data("archdispname");
6229
-		                let unarchivedBy = $(this).find('[id^="archivedImg-"]').data("unarchdispname");
6230
-		                let lastArchived = $(this).find('[id^="archivedImg-"]').data("lastarchived");
6231
-		                let lastUnarchived = $(this).find('[id^="archivedImg-"]').data("lastunarchived");
6232
-		                let flagged = $(this).find('[id^="archivedImg-"]').data("flagged");
6233
-		                let flagunflagby = $(this).find('[id^="archivedImg-"]').data("flagunflagby");
6234
-		                let flagunflagdate = $(this).find('[id^="archivedImg-"]').data("flagunflagdate");
6235
-		                let tag = $(this).find('[id^="archivedImg-"]').data("tag");
6236
-		                let taguntagby = $(this).find('[id^="archivedImg-"]').data("taguntagby");
6237
-		                let taguntagdate = $(this).find('[id^="archivedImg-"]').data("taguntagdate");
6238
-		                let convdescription = $(this).find('[id^="archivedImg-"]').data("convdescription");
6239
-		                let convdescchangeby = $(this).find('[id^="archivedImg-"]').data("convdescchangeby");
6240
-		                let convdescchangedate = $(this).find('[id^="archivedImg-"]').data("convdescchangedate");
6241
-
6242
-		                $("#conversationsText").empty();
6243
-		                getMsgsForNmbrs(phnNmbrFrom, phnNmbrTo, conversationId, archivedConv, archivedBy, unarchivedBy, lastArchived, lastUnarchived, flagged, flagunflagby, flagunflagdate, tag, taguntagby, taguntagdate, convdescription, convdescchangeby, convdescchangedate);
6244
-		             });
6245
-
6246
-		             $('[id^="indActConv-"]').click(function() {
6247
-
6248
-		                $(".convsListArch").each(function(){ $(this).css("background-color", "rgb(252, 245, 251)"); });
6249
-		                $(".convsListAct").each(function(){ $(this).css("background-color", "rgb(239, 252, 252)"); });
6250
-		                $(this).css("background-color", "rgb(215, 239, 239)");
6251
-
6252
-		                let crtordnmbr = $(this).attr("id").replace("indActConv-", "");
6253
-		                let phnNmbrFrom = $("#indActCvFrom-"+ crtordnmbr).text().split(": ")[1];
6254
-		                let phnNmbrTo = $("#indActCvTo-"+ crtordnmbr).text().split(": ")[1];
6255
-		                let conversationId = $(this).find('[id^="activeImg-"]').data("conversationid");
6256
-		                let archivedConv = $(this).find('[id^="activeImg-"]').data("archivedyesno");
6257
-		                let archivedBy = $(this).find('[id^="activeImg-"]').data("archdispname");
6258
-		                let unarchivedBy = $(this).find('[id^="activeImg-"]').data("unarchdispname");
6259
-		                let lastArchived = $(this).find('[id^="activeImg-"]').data("lastarchived");
6260
-		                let lastUnarchived = $(this).find('[id^="activeImg-"]').data("lastunarchived");
6261
-		                let flagged = $(this).find('[id^="activeImg-"]').data("flagged");
6262
-		                let flagunflagby = $(this).find('[id^="activeImg-"]').data("flagunflagby");
6263
-		                let flagunflagdate = $(this).find('[id^="activeImg-"]').data("flagunflagdate");
6264
-		                let tag = $(this).find('[id^="activeImg-"]').data("tag");
6265
-		                let taguntagby = $(this).find('[id^="activeImg-"]').data("taguntagby");
6266
-		                let taguntagdate = $(this).find('[id^="activeImg-"]').data("taguntagdate");
6267
-		                let convdescription = $(this).find('[id^="activeImg-"]').data("convdescription");
6268
-		                let convdescchangeby = $(this).find('[id^="activeImg-"]').data("convdescchangeby");
6269
-		                let convdescchangedate = $(this).find('[id^="activeImg-"]').data("convdescchangedate");
6270
-
6271
-		                $("#conversationsText").empty();
6272
-		                getMsgsForNmbrs(phnNmbrFrom, phnNmbrTo, conversationId, archivedConv, archivedBy, unarchivedBy, lastArchived, lastUnarchived, flagged, flagunflagby, flagunflagdate, tag, taguntagby, taguntagdate, convdescription, convdescchangeby, convdescchangedate);
6273
-		             });
6274
-                     }
6275
-                     convListContent();
6276
-
6277
-                     // Add the filter section
6278
-                     $("#convArchAndActive").prepend("<div id='filterSection' title='Click to show filters'><div id='filterSecImg'></div></div>");
6279
-
6280
-                     // Add the 'Filter by flag' filter
6281
-                     $("#convArchAndActive").prepend("<div id='filterByFlag'><div id='filterByFlagImg'></div><select id='flagFilter'><option value='filterbyflag' selected='selected' disabled=''>Filter by flag</option><option value='flagged'>Flagged</option><option value='unflagged'>Unflagged</option></select><div id='clearFlagFilter' title='Clear all filters'></div></div>");
6282
-
6283
-                     $("#flagFilter").change(function() {
6284
-
6285
-                        var flagSel = $(this).val();
6286
-
6287
-                        $(".convsLst").each(function() { $(this).remove(); });
6288
-                        $("#totalConvNmbr").remove();
6289
-                        $('#tagFilter option[value="filterbytag"]').prop("selected", true);
6290
-                        $("#flagFilter").css("background-color", "#f5f0ff");
6291
-                        $("#tagFilter").css("background-color", "#f0fbff");
6292
-
6293
-                        if (flagSel == "flagged") {
6294
-
6295
-		             if (archivedConvNmbr == 0) {
6296
-		                 // Don't list any archived conversations
6297
-		                 var archivedCvNbf = 0;
6298
-
6299
-		             } else if (archivedConvNmbr != 0 && archivedConvNmbr != null) {
6300
-
6301
-                                 var archInd = 0;
6302
-		                 let fcnv = (archivedConvNmbr <= convArchived.length)? convArchived.length - archivedConvNmbr : 0;
6303
-		                 for (let s = fcnv; s < convArchived.length; s++) {
6304
-
6305
-                                      if (convArchived[s]['flagged'] == 1) {
6306
-		                          var emptyRedFlags = "cvFlagRed";
6307
-		                          if (convArchived[s]['tag'] != "") { var cvTagTxts = convArchived[s]['tag']; var cvTagAdds = "convTagAdded"; } else { var cvTagTxts = ""; var cvTagAdds = "convTag"; }
6308
-		                          var cvDescAdds = (convArchived[s]['description'] != "")? "convDescAdded" : "convDesc";
6309
-		                          $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ s +"'><div id='archivedImg-"+ s +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[s]['conversation_id'] +"' data-archivedyesno='"+ convArchived[s]['archived'] +"' data-archdispname='"+ convArchived[s]['archived_by'] +"' data-unarchdispname='"+ convArchived[s]['unarchived_by'] +"' data-lastarchived='"+ convArchived[s]['last_archived'] +"' data-lastunarchived='"+ convArchived[s]['last_unarchived'] +"' data-convdescription='"+ convArchived[s]['description'] +"' data-convdescchangeby='"+ convArchived[s]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[s]['descriptiondate'] +"' data-tag='"+ cvTagTxts +"' data-taguntagby='"+ convArchived[s]['taguntagby'] +"' data-taguntagdate='"+ convArchived[s]['taguntagdate'] +"' data-flagged='"+ convArchived[s]['flagged'] +"' data-flagunflagby='"+ convArchived[s]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[s]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ s +"'>From: "+ convArchived[s]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ s +"'>To: "+ convArchived[s]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[s]['lastmsgdisplayname'] +":</span>"+ convArchived[s]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[s]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ s +"' class='"+ cvDescAdds +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ s +"' class='"+ cvTagAdds +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxts +"</div><div id='addArchFlag-"+ s +"' class='"+ emptyRedFlags +"' title='Click to set or remove flag.'></div></div>");
6310
-                                          archInd++;
6311
-                                      }
6312
-		                 }
6313
-		                 var archivedCvNbf = archInd;
6314
-
6315
-		             } else {
6316
-
6317
-                                 var archInd = 0;
6318
-		                 for (let a = 0; a < convArchived.length; a++) {
6319
-
6320
-                                      if (convArchived[a]['flagged'] == 1) {
6321
-		                          var emptyRedFlaga = "cvFlagRed";
6322
-		                          if (convArchived[a]['tag'] != "") { var cvTagTxta = convArchived[a]['tag']; var cvTagAdda = "convTagAdded"; } else { var cvTagTxta = ""; var cvTagAdda = "convTag"; }
6323
-		                          var cvDescAdda = (convArchived[a]['description'] != "")? "convDescAdded" : "convDesc";
6324
-		                          $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ a +"'><div id='archivedImg-"+ a +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[a]['conversation_id'] +"' data-archivedyesno='"+ convArchived[a]['archived'] +"' data-archdispname='"+ convArchived[a]['archived_by'] +"' data-unarchdispname='"+ convArchived[a]['unarchived_by'] +"' data-lastarchived='"+ convArchived[a]['last_archived'] +"' data-lastunarchived='"+ convArchived[a]['last_unarchived'] +"' data-convdescription='"+ convArchived[a]['description'] +"' data-convdescchangeby='"+ convArchived[a]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[a]['descriptiondate'] +"' data-tag='"+ cvTagTxta +"' data-taguntagby='"+ convArchived[a]['taguntagby'] +"' data-taguntagdate='"+ convArchived[a]['taguntagdate'] +"' data-flagged='"+ convArchived[a]['flagged'] +"' data-flagunflagby='"+ convArchived[a]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[a]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ a +"'>From: "+ convArchived[a]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ a +"'>To: "+ convArchived[a]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[a]['lastmsgdisplayname'] +":</span>"+ convArchived[a]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[a]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ a +"' class='"+ cvDescAdda +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ a +"' class='"+ cvTagAdda +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxta +"</div><div id='addArchFlag-"+ a +"' class='"+ emptyRedFlaga +"' title='Click to set or remove flag.'></div></div>");
6325
-                                          archInd++;
6326
-                                      }
6327
-		                 }
6328
-		                 var archivedCvNbf = archInd;
6329
-		             }
6330
-
6331
-                             var actInd = 0;
6332
-		             for (let t = 0; t < convActive.length; t++) {
6333
-
6334
-                                  if (convActive[t]['flagged'] == 1) {
6335
-		                      var emptyRedFlagt = "cvFlagRed";
6336
-		                      if (convActive[t]['tag'] != "") { var cvTagTxtt = convActive[t]['tag']; var cvTagAddt = "convTagAdded"; } else { var cvTagTxtt = ""; var cvTagAddt = "convTag"; }
6337
-		                      var cvDescAddt = (convActive[t]['description'] != "")? "convDescAdded" : "convDesc";
6338
-		                      $("#convArchAndActive").append("<div class='convsListAct convsLst' id='indActConv-"+ t +"'><div id='activeImg-"+ t +"' class='archactImg activeConvImg' data-conversationid='"+ convActive[t]['conversation_id'] +"' data-archivedyesno='"+ convActive[t]['archived'] +"' data-archdispname='"+ convActive[t]['archived_by'] +"' data-unarchdispname='"+ convActive[t]['unarchived_by'] +"' data-lastarchived='"+ convActive[t]['last_archived'] +"' data-lastunarchived='"+ convActive[t]['last_unarchived'] +"' data-convdescription='"+ convActive[t]['description'] +"' data-convdescchangeby='"+ convActive[t]['descriptionby'] +"' data-convdescchangedate='"+ convActive[t]['descriptiondate'] +"' data-tag='"+ cvTagTxtt +"' data-taguntagby='"+ convActive[t]['taguntagby'] +"' data-taguntagdate='"+ convActive[t]['taguntagdate'] +"' data-flagged='"+ convActive[t]['flagged'] +"' data-flagunflagby='"+ convActive[t]['flagunflagby'] +"' data-flagunflagdate='"+ convActive[t]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/active.svg' title='Active conversation'></div><div class='convLastMsgFrom' id='indActCvFrom-"+ t +"'>From: "+ convActive[t]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indActCvTo-"+ t +"'>To: "+ convActive[t]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convActive[t]['lastmsgdisplayname'] +":</span>"+ convActive[t]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Active conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convActive[t]['last_msg_date'] +"</div></div><div id='addActDesc-"+ t +"' class='"+ cvDescAddt +"' title='Click to add or modify description.'></div><div id='addActTag-"+ t +"' class='"+ cvTagAddt +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxtt +"</div><div id='addActFlag-"+ t +"' class='"+ emptyRedFlagt +"' title='Click to set or remove flag.'></div></div>");
6339
-                                      actInd++;
6340
-                                  }
6341
-		             }
6342
-
6343
-		             var totalConvNbf = archivedCvNbf + actInd;
6344
-
6345
-                        } else if (flagSel == "unflagged") {
6346
-
6347
-		             if (archivedConvNmbr == 0) {
6348
-		                 // Don't list any archived conversations
6349
-		                 var archivedCvNbf = 0;
6350
-
6351
-		             } else if (archivedConvNmbr != 0 && archivedConvNmbr != null) {
6352
-
6353
-                                 var archInd = 0;
6354
-		                 let fcnv = (archivedConvNmbr <= convArchived.length)? convArchived.length - archivedConvNmbr : 0;
6355
-		                 for (let s = fcnv; s < convArchived.length; s++) {
6356
-
6357
-                                      if (convArchived[s]['flagged'] != 1) {
6358
-		                          var emptyRedFlags = "cvFlagEmpty";
6359
-		                          if (convArchived[s]['tag'] != "") { var cvTagTxts = convArchived[s]['tag']; var cvTagAdds = "convTagAdded"; } else { var cvTagTxts = ""; var cvTagAdds = "convTag"; }
6360
-		                          var cvDescAdds = (convArchived[s]['description'] != "")? "convDescAdded" : "convDesc";
6361
-		                          $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ s +"'><div id='archivedImg-"+ s +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[s]['conversation_id'] +"' data-archivedyesno='"+ convArchived[s]['archived'] +"' data-archdispname='"+ convArchived[s]['archived_by'] +"' data-unarchdispname='"+ convArchived[s]['unarchived_by'] +"' data-lastarchived='"+ convArchived[s]['last_archived'] +"' data-lastunarchived='"+ convArchived[s]['last_unarchived'] +"' data-convdescription='"+ convArchived[s]['description'] +"' data-convdescchangeby='"+ convArchived[s]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[s]['descriptiondate'] +"' data-tag='"+ cvTagTxts +"' data-taguntagby='"+ convArchived[s]['taguntagby'] +"' data-taguntagdate='"+ convArchived[s]['taguntagdate'] +"' data-flagged='"+ convArchived[s]['flagged'] +"' data-flagunflagby='"+ convArchived[s]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[s]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ s +"'>From: "+ convArchived[s]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ s +"'>To: "+ convArchived[s]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[s]['lastmsgdisplayname'] +":</span>"+ convArchived[s]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[s]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ s +"' class='"+ cvDescAdds +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ s +"' class='"+ cvTagAdds +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxts +"</div><div id='addArchFlag-"+ s +"' class='"+ emptyRedFlags +"' title='Click to set or remove flag.'></div></div>");
6362
-                                          archInd++;
6363
-                                      }
6364
-		                 }
6365
-		                 var archivedCvNbf = archInd;
6366
-
6367
-		             } else {
6368
-
6369
-                                 var archInd = 0;
6370
-		                 for (let a = 0; a < convArchived.length; a++) {
6371
-
6372
-                                      if (convArchived[a]['flagged'] != 1) {
6373
-		                          var emptyRedFlaga = "cvFlagEmpty";
6374
-		                          if (convArchived[a]['tag'] != "") { var cvTagTxta = convArchived[a]['tag']; var cvTagAdda = "convTagAdded"; } else { var cvTagTxta = ''; var cvTagAdda = "convTag"; }
6375
-		                          var cvDescAdda = (convArchived[a]['description'] != "")? "convDescAdded" : "convDesc";
6376
-		                          $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ a +"'><div id='archivedImg-"+ a +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[a]['conversation_id'] +"' data-archivedyesno='"+ convArchived[a]['archived'] +"' data-archdispname='"+ convArchived[a]['archived_by'] +"' data-unarchdispname='"+ convArchived[a]['unarchived_by'] +"' data-lastarchived='"+ convArchived[a]['last_archived'] +"' data-lastunarchived='"+ convArchived[a]['last_unarchived'] +"' data-convdescription='"+ convArchived[a]['description'] +"' data-convdescchangeby='"+ convArchived[a]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[a]['descriptiondate'] +"' data-tag='"+ cvTagTxta +"' data-taguntagby='"+ convArchived[a]['taguntagby'] +"' data-taguntagdate='"+ convArchived[a]['taguntagdate'] +"' data-flagged='"+ convArchived[a]['flagged'] +"' data-flagunflagby='"+ convArchived[a]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[a]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ a +"'>From: "+ convArchived[a]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ a +"'>To: "+ convArchived[a]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[a]['lastmsgdisplayname'] +":</span>"+ convArchived[a]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[a]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ a +"' class='"+ cvDescAdda +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ a +"' class='"+ cvTagAdda +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxta +"</div><div id='addArchFlag-"+ a +"' class='"+ emptyRedFlaga +"' title='Click to set or remove flag.'></div></div>");
6377
-                                          archInd++;
6378
-                                      }
6379
-		                 }
6380
-		                 var archivedCvNbf = archInd;
6381
-		             }
6382
-
6383
-                             var actInd = 0;
6384
-		             for (let t = 0; t < convActive.length; t++) {
6385
-
6386
-                                  if (convActive[t]['flagged'] != 1) {
6387
-		                      var emptyRedFlagt = "cvFlagEmpty";
6388
-		                      if (convActive[t]['tag'] != "") { var cvTagTxtt = convActive[t]['tag']; var cvTagAddt = "convTagAdded"; } else { var cvTagTxtt = ""; var cvTagAddt = "convTag"; }
6389
-		                      var cvDescAddt = (convActive[t]['description'] != "")? "convDescAdded" : "convDesc";
6390
-		                      $("#convArchAndActive").append("<div class='convsListAct convsLst' id='indActConv-"+ t +"'><div id='activeImg-"+ t +"' class='archactImg activeConvImg' data-conversationid='"+ convActive[t]['conversation_id'] +"' data-archivedyesno='"+ convActive[t]['archived'] +"' data-archdispname='"+ convActive[t]['archived_by'] +"' data-unarchdispname='"+ convActive[t]['unarchived_by'] +"' data-lastarchived='"+ convActive[t]['last_archived'] +"' data-lastunarchived='"+ convActive[t]['last_unarchived'] +"' data-convdescription='"+ convActive[t]['description'] +"' data-convdescchangeby='"+ convActive[t]['descriptionby'] +"' data-convdescchangedate='"+ convActive[t]['descriptiondate'] +"' data-tag='"+ cvTagTxtt +"' data-taguntagby='"+ convActive[t]['taguntagby'] +"' data-taguntagdate='"+ convActive[t]['taguntagdate'] +"' data-flagged='"+ convActive[t]['flagged'] +"' data-flagunflagby='"+ convActive[t]['flagunflagby'] +"' data-flagunflagdate='"+ convActive[t]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/active.svg' title='Active conversation'></div><div class='convLastMsgFrom' id='indActCvFrom-"+ t +"'>From: "+ convActive[t]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indActCvTo-"+ t +"'>To: "+ convActive[t]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convActive[t]['lastmsgdisplayname'] +":</span>"+ convActive[t]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Active conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convActive[t]['last_msg_date'] +"</div></div><div id='addActDesc-"+ t +"' class='"+ cvDescAddt +"' title='Click to add or modify description.'></div><div id='addActTag-"+ t +"' class='"+ cvTagAddt +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxtt +"</div><div id='addActFlag-"+ t +"' class='"+ emptyRedFlagt +"' title='Click to set or remove flag.'></div></div>");
6391
-                                      actInd++;
6392
-                                  }
6393
-		             }
6394
-
6395
-		             var totalConvNbf = archivedCvNbf + actInd;
6396
-                        }
6397
-
6398
-	                // Add the row that specifies the number of conversations displayed
6399
-	                $("#convArchAndActive").append("<div id='totalConvNmbr'>"+ totalConvNbf +" conversations displayed (<span id='archivedCvImg' title='Archived conversations'></span>"+ archivedCvNbf +"<span id='activeCvImg' title='Active conversations'></span>"+ actInd +" )</div>");
6400
-
6401
-                        convListContent();
6402
-                     });
6403
-
6404
-                     // Clear the flag filter
6405
-                     $("#clearFlagFilter").click(function() { $("#conversationsshow").click(); });
6406
-
6407
-
6408
-                     // Add the 'Filter by tag' filter
6409
-                     var selectTagOpt = "<option value='filterbytag' selected='selected' disabled=''>Filter by tag</option>";
6410
-                     for (let v = 0; v < taggsArr.length; v++) {
6411
-                          selectTagOpt += "<option value='"+ taggsArr[v] +"'>"+ taggsArr[v] +"</option>";
6412
-                     }
6413
-                     selectTagOpt += "<option value=''>--- empty tag ---</option>";
6414
-                     $("#convArchAndActive").prepend("<div id='filterByTag'><div id='filterByTagImg'></div><select id='tagFilter'>"+ selectTagOpt +"</select><div id='clearTagFilter' title='Clear all filters'></div></div>");
6415
-
6416
-                     $("#tagFilter").change(function() {
6417
-
6418
-                        var tagSel = $(this).val();
6419
-
6420
-                        $(".convsLst").each(function() { $(this).remove(); });
6421
-                        $("#totalConvNmbr").remove();
6422
-                        $('#flagFilter option[value="filterbyflag"]').prop("selected", true);
6423
-                        $("#tagFilter").css("background-color", "#f5f0ff");
6424
-                        $("#flagFilter").css("background-color", "#f0fbff");
6425
-
6426
-			if (archivedConvNmbr == 0) {
6427
-		            // Don't list any archived conversations
6428
-		            var archivedCvNbt = 0;
6429
-
6430
-		        } else if (archivedConvNmbr != 0 && archivedConvNmbr != null) {
6431
-
6432
-                                 var archIndt = 0;
6433
-		                 let fcnv = (archivedConvNmbr <= convArchived.length)? convArchived.length - archivedConvNmbr : 0;
6434
-		                 for (let s = fcnv; s < convArchived.length; s++) {
6435
-
6436
-                                      if (String(convArchived[s]['tag']) == tagSel) {
6437
-		                          var emptyRedFlags = (convArchived[s]['flagged'] == 1)? "cvFlagRed" : "cvFlagEmpty";
6438
-		                          if (convArchived[s]['tag'] != "") { var cvTagTxts = convArchived[s]['tag']; var cvTagAdds = "convTagAdded"; } else { var cvTagTxts = ""; var cvTagAdds = "convTag"; }
6439
-		                          var cvDescAdds = (convArchived[s]['description'] != "")? "convDescAdded" : "convDesc";
6440
-		                          $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ s +"'><div id='archivedImg-"+ s +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[s]['conversation_id'] +"' data-archivedyesno='"+ convArchived[s]['archived'] +"' data-archdispname='"+ convArchived[s]['archived_by'] +"' data-unarchdispname='"+ convArchived[s]['unarchived_by'] +"' data-lastarchived='"+ convArchived[s]['last_archived'] +"' data-lastunarchived='"+ convArchived[s]['last_unarchived'] +"' data-convdescription='"+ convArchived[s]['description'] +"' data-convdescchangeby='"+ convArchived[s]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[s]['descriptiondate'] +"' data-tag='"+ cvTagTxts +"' data-taguntagby='"+ convArchived[s]['taguntagby'] +"' data-taguntagdate='"+ convArchived[s]['taguntagdate'] +"' data-flagged='"+ convArchived[s]['flagged'] +"' data-flagunflagby='"+ convArchived[s]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[s]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ s +"'>From: "+ convArchived[s]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ s +"'>To: "+ convArchived[s]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[s]['lastmsgdisplayname'] +":</span>"+ convArchived[s]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[s]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ s +"' class='"+ cvDescAdds +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ s +"' class='"+ cvTagAdds +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxts +"</div><div id='addArchFlag-"+ s +"' class='"+ emptyRedFlags +"' title='Click to set or remove flag.'></div></div>");
6441
-                                          archIndt++;
6442
-                                      }
6443
-		                 }
6444
-		                 var archivedCvNbt = archIndt;
6445
-
6446
-		        } else {
6447
-
6448
-                                 var archIndt = 0;
6449
-		                 for (let a = 0; a < convArchived.length; a++) {
6450
-
6451
-                                      if (String(convArchived[a]['tag']) == tagSel) {
6452
-		                          var emptyRedFlaga = (convArchived[a]['flagged'] == 1)? "cvFlagRed" : "cvFlagEmpty";
6453
-		                          if (convArchived[a]['tag'] != "") { var cvTagTxta = convArchived[a]['tag']; var cvTagAdda = "convTagAdded"; } else { var cvTagTxta = ""; var cvTagAdda = "convTag"; }
6454
-		                          var cvDescAdda = (convArchived[a]['description'] != "")? "convDescAdded" : "convDesc";
6455
-		                          $("#convArchAndActive").append("<div class='convsListArch convsLst' id='indArchConv-"+ a +"'><div id='archivedImg-"+ a +"' class='archactImg archConvImg' data-conversationid='"+ convArchived[a]['conversation_id'] +"' data-archivedyesno='"+ convArchived[a]['archived'] +"' data-archdispname='"+ convArchived[a]['archived_by'] +"' data-unarchdispname='"+ convArchived[a]['unarchived_by'] +"' data-lastarchived='"+ convArchived[a]['last_archived'] +"' data-lastunarchived='"+ convArchived[a]['last_unarchived'] +"' data-convdescription='"+ convArchived[a]['description'] +"' data-convdescchangeby='"+ convArchived[a]['descriptionby'] +"' data-convdescchangedate='"+ convArchived[a]['descriptiondate'] +"' data-tag='"+ cvTagTxta +"' data-taguntagby='"+ convArchived[a]['taguntagby'] +"' data-taguntagdate='"+ convArchived[a]['taguntagdate'] +"' data-flagged='"+ convArchived[a]['flagged'] +"' data-flagunflagby='"+ convArchived[a]['flagunflagby'] +"' data-flagunflagdate='"+ convArchived[a]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/archived.svg' title='Archived conversation'></div><div class='convLastMsgFrom' id='indArchCvFrom-"+ a +"'>From: "+ convArchived[a]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indArchCvTo-"+ a +"'>To: "+ convArchived[a]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convArchived[a]['lastmsgdisplayname'] +":</span>"+ convArchived[a]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Archived conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convArchived[a]['last_msg_date'] +"</div></div><div id='addArchDesc-"+ a +"' class='"+ cvDescAdda +"' title='Click to add or modify description.'></div><div id='addArchTag-"+ a +"' class='"+ cvTagAdda +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxta +"</div><div id='addArchFlag-"+ a +"' class='"+ emptyRedFlaga +"' title='Click to set or remove flag.'></div></div>");
6456
-                                          archIndt++;
6457
-                                      }
6458
-		                 }
6459
-		                 var archivedCvNbt = archIndt;
6460
-		        }
6461
-
6462
-                        var actIndt = 0;
6463
-		        for (let t = 0; t < convActive.length; t++) {
6464
-
6465
-                             if (String(convActive[t]['tag']) == tagSel) {
6466
-		                 var emptyRedFlagt = (convActive[t]['flagged'] == 1)? "cvFlagRed" : "cvFlagEmpty";
6467
-		                 if (convActive[t]['tag'] != "") { var cvTagTxtt = convActive[t]['tag']; var cvTagAddt = "convTagAdded"; } else { var cvTagTxtt = ""; var cvTagAddt = "convTag"; }
6468
-		                 var cvDescAddt = (convActive[t]['description'] != "")? "convDescAdded" : "convDesc";
6469
-		                 $("#convArchAndActive").append("<div class='convsListAct convsLst' id='indActConv-"+ t +"'><div id='activeImg-"+ t +"' class='archactImg activeConvImg' data-conversationid='"+ convActive[t]['conversation_id'] +"' data-archivedyesno='"+ convActive[t]['archived'] +"' data-archdispname='"+ convActive[t]['archived_by'] +"' data-unarchdispname='"+ convActive[t]['unarchived_by'] +"' data-lastarchived='"+ convActive[t]['last_archived'] +"' data-lastunarchived='"+ convActive[t]['last_unarchived'] +"' data-convdescription='"+ convActive[t]['description'] +"' data-convdescchangeby='"+ convActive[t]['descriptionby'] +"' data-convdescchangedate='"+ convActive[t]['descriptiondate'] +"' data-tag='"+ cvTagTxtt +"' data-taguntagby='"+ convActive[t]['taguntagby'] +"' data-taguntagdate='"+ convActive[t]['taguntagdate'] +"' data-flagged='"+ convActive[t]['flagged'] +"' data-flagunflagby='"+ convActive[t]['flagunflagby'] +"' data-flagunflagdate='"+ convActive[t]['flagunflagdate'] +"'><img src='/" + ctappdir + "/sms_relentless/img/active.svg' title='Active conversation'></div><div class='convLastMsgFrom' id='indActCvFrom-"+ t +"'>From: "+ convActive[t]['last_msg_from'] +"</div><div class='convLastMsgTo' id='indActCvTo-"+ t +"'>To: "+ convActive[t]['last_msg_to'] +"</div><div class='convLastMsg'><span class='msgAuthorNameConv'>"+ convActive[t]['lastmsgdisplayname'] +":</span>"+ convActive[t]['last_message'] +"</div><div class='dateSection'><div class='dateClock' title='Last message date. (Active conversations are ordered by the date of the last message.)'></div><div class='convLastMsgDate'>"+ convActive[t]['last_msg_date'] +"</div></div><div id='addActDesc-"+ t +"' class='"+ cvDescAddt +"' title='Click to add or modify description.'></div><div id='addActTag-"+ t +"' class='"+ cvTagAddt +"' title='Click to add or modify tag.'></div><div class='archactTag'>"+ cvTagTxtt +"</div><div id='addActFlag-"+ t +"' class='"+ emptyRedFlagt +"' title='Click to set or remove flag.'></div></div>");
6470
-                                 actIndt++;
6471
-                             }
6472
-		        }
6473
-
6474
-		        var totalConvNbt = archivedCvNbt + actIndt;
6475
-
6476
-	                // Add the row that specifies the number of conversations displayed
6477
-	                $("#convArchAndActive").append("<div id='totalConvNmbr'>"+ totalConvNbt +" conversations displayed (<span id='archivedCvImg' title='Archived conversations'></span>"+ archivedCvNbt +"<span id='activeCvImg' title='Active conversations'></span>"+ actIndt +" )</div>");
6478
-
6479
-                        convListContent();
6480
-                     });
6481
-
6482
-                     // Clear the tag filter
6483
-                     $("#clearTagFilter").click(function() { $("#conversationsshow").click(); });
6484
-
6485
-                     // Show/Hide the filters
6486
-                     $("#filterSection").click(function() {
6487
-                        if ($("#filterByTag").is(":visible")) {
6488
-                            $("#filterByTag,#filterByFlag").css("display", "none");
6489
-                            $("#filterSection").css("background-color", "#f0fbff");
6490
-                            $("#filterSection").prop("title", "Click to show filters");
6491
-                        } else {
6492
-                            $("#filterByTag,#filterByFlag").css("display", "block");
6493
-                            $("#filterSection").css("background-color", "#f0f5ff");
6494
-                            $("#filterSection").prop("title", "Click to hide filters");
6495
-                        }
6496
-                     });
6497
-
6498
-          },
6499
-          error: function() {
6500
-                     showAlert("Error! You can check the Nextcloud log to find more details about this issue.");
6501
-                     $('#smstables').removeClass('icon-loading');
6502
-          }
6503
-     });
6504
-
6505
-     // Look for the 'new received message' indicator in the database, to know if the received messages list needs to be refreshed
6506
-     intervalNmfr = setInterval(function() { checkIfNewMessage(); }, newMsgInterval);
6507
-
6508
-  });
6509
-
6510
-
6511
-  // List grouped messages
6512
-  $("#groupedtableshow").on("click", function(event) {
6513
-
6514
-     $('#smstables').empty();
6515
-     $("#stopAutoRefreshSent").css("display", "none");
6516
-     clearInterval(intervalNmfr);
6517
-
6518
-     var getGroupedUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedtable");
6519
-
6520
-     $('#smstables').addClass('icon-loading');
6521
-     var totalPhNmbrs = 0;
6522
-
6523
-     $.ajax({
6524
-          method: 'GET',
6525
-          url: getGroupedUrl + '/' + userid,
6526
-          contentType: 'application/json',
6527
-          success: function(groupedparsed) {
6528
-
6529
-		        $('#smstables').append("<div id='toptablegrp'><div class='topbuttonandpage'><span id='recarrow' title='Show/Hide filters'></span></div><div id='paginationgrp' class='grppages'>Pages </div></div>");
6530
-		        $('#smstables').append("<table id='groupedSmsTable'></table>");
6531
-
6532
-                        $('#groupedSmsTable').append("<tr id='grpfiltersrow'><td colspan='2'><div id='filterByNumber'></div></td><td><button id='cleargrpfilter' title='Clear the filter'></button></td></tr>");
6533
-                        $('#groupedSmsTable').append("<tr class='groupedmsgrows' id='grpheaderrow'><th>Phone Number</th><th>Senders / Receivers</th><th>Messages</th></tr>");
6534
-
6535
-                        $('#grpfiltersrow').hide();
6536
-
6537
-                        var fromtoNmbrsData = [];
6538
-                        var fromtoNumberArr = [];
6539
-
6540
-		        for (var i = 0; i < groupedparsed.length; i++) {
6541
-
6542
-			     if (groupedparsed[i].author_displayname) {
6543
-			         var authordnm = groupedparsed[i].author_displayname;
6544
-			     } else { 
6545
-			         var authordnm = '';
6546
-			     }
6547
-
6548
-			     var sentfromnmbrarr = groupedparsed[i].from.split(": ");
6549
-                             if (sentfromnmbrarr[1]) {
6550
-			         var groupednbfrom = sentfromnmbrarr[1];
6551
-                             } else {
6552
-			         var groupednbfrom = sentfromnmbrarr[0];
6553
-                             }
6554
-
6555
-                             var modmessage = '';
6556
-                             if (groupedparsed[i].author_displayname) {
6557
-			         modmessage = "<span class='msgAuthorNameGrp'>"+ groupedparsed[i].author_displayname + ":</span>" + groupedparsed[i].message;
6558
-                             } else {
6559
-			         modmessage = groupedparsed[i].message;
6560
-                             }
6561
-
6562
-                             if (groupedparsed[i].to.indexOf(": ") > -1) {
6563
-                                 var groupednmbrtopre = groupedparsed[i].to.split(": ");
6564
-                                 var groupednmbrto = groupednmbrtopre[1];
6565
-                             } else { 
6566
-                                 var groupednmbrto = groupedparsed[i].to;
6567
-                             }
6568
-
6569
-                             fromtoNmbrsData.push({
6570
-                                       'author_displayname': authordnm,
6571
-                                       'from': groupednbfrom,
6572
-                                       'to': groupednmbrto,
6573
-                                       'message': modmessage,
6574
-                                       'date': groupedparsed[i].date,
6575
-                                       'status': groupedparsed[i].deliveryreceipt,
6576
-                                       'table': groupedparsed[i].table
6577
-                             });
6578
-
6579
-                             if (fromtoNumberArr.indexOf(groupednbfrom) == -1) { fromtoNumberArr.push(groupednbfrom); }
6580
-                             if (fromtoNumberArr.indexOf(groupednmbrto) == -1) { fromtoNumberArr.push(groupednmbrto); }
6581
-		        }
6582
-
6583
-                        totalPhNmbrs = fromtoNumberArr.length;
6584
-
6585
-                        // Remove the duplicates
6586
-			var noDupMsgData = [];
6587
-			$.each(fromtoNmbrsData, function(i, e) {
6588
-			    var matchingData = $.grep(noDupMsgData, function(item) {
6589
-                                return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent'
6590
-			    });
6591
-			    if (matchingData.length === 0) {
6592
-				noDupMsgData.push(e);
6593
-			    }
6594
-			});
6595
-
6596
-                        var messagesPerNmbr = {};
6597
-                        var msgsNamesPerNmbr = {};
6598
-                        var msgsNmbrsNames = {};
6599
-
6600
-                        for (var k = 0; k < fromtoNumberArr.length; k++) {
6601
-
6602
-                             var displayNamesarr = [];
6603
-                             var convData = [];
6604
-
6605
-                             for (var n = 0; n < noDupMsgData.length; n++) {
6606
-
6607
-                                  if (noDupMsgData[n]['from'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'sent') {
6608
-
6609
-                                      convData.push({
6610
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
6611
-                                                     'message': noDupMsgData[n]['message'],
6612
-                                                     'from': noDupMsgData[n]['from'],
6613
-                                                     'to': noDupMsgData[n]['to'],
6614
-                                                     'date': noDupMsgData[n]['date'],
6615
-                                                     'direction': 'sent_from',
6616
-                                                     'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
6617
-                                                     'table': noDupMsgData[n]['table']
6618
-                                      });
6619
-
6620
-                                  } else if (noDupMsgData[n]['to'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'sent') {
6621
-
6622
-                                      convData.push({
6623
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
6624
-                                                     'message': noDupMsgData[n]['message'],
6625
-                                                     'from': noDupMsgData[n]['from'],
6626
-                                                     'to': noDupMsgData[n]['to'],
6627
-                                                     'date': noDupMsgData[n]['date'],
6628
-                                                     'direction': 'sent_to',
6629
-                                                     'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
6630
-                                                     'table': noDupMsgData[n]['table']
6631
-                                      });
6632
-
6633
-
6634
-                                  } else if (noDupMsgData[n]['from'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'received') {
6635
-
6636
-                                      convData.push({
6637
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
6638
-                                                     'message': noDupMsgData[n]['message'],
6639
-                                                     'from': noDupMsgData[n]['from'],
6640
-                                                     'to': noDupMsgData[n]['to'],
6641
-                                                     'date': noDupMsgData[n]['date'],
6642
-                                                     'direction': 'received_from',
6643
-                                                     'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
6644
-                                                     'table': noDupMsgData[n]['table']
6645
-                                      });
6646
-
6647
-                                  } else if (noDupMsgData[n]['to'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'received') {
6648
-
6649
-                                      convData.push({
6650
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
6651
-                                                     'message': noDupMsgData[n]['message'],
6652
-                                                     'from': noDupMsgData[n]['from'],
6653
-                                                     'to': noDupMsgData[n]['to'],
6654
-                                                     'date': noDupMsgData[n]['date'],
6655
-                                                     'direction': 'received_on',
6656
-                                                     'status': (noDupMsgData[n]['status'] == null)? "" : noDupMsgData[n]['status'],
6657
-                                                     'table': noDupMsgData[n]['table']
6658
-                                      });
6659
-                                  }
6660
-                             }
6661
-
6662
-                             // Sort messages by date
6663
-		             convData.sort(function(a, b) {
6664
-                                return new Date(a.date) - new Date(b.date);
6665
-		             });
6666
-
6667
-                             // Collect the display names of the users that sent messages from the current number
6668
-                             var selectedNames = [];
6669
-                             var displayNames = '';
6670
-                             for (var v = 0; v < convData.length; v++) {
6671
-                                  if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
6672
-                                      selectedNames.push(convData[v]['author_displayname']);
6673
-                                      displayNames += "<div id='diplNm_"+ fromtoNumberArr[k] +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
6674
-                                  }
6675
-                             }
6676
-
6677
-                             // Store the display names for the current number, to be able to see them later when selecting the number from the drop-down list
6678
-                             var ctPhNumber = fromtoNumberArr[k];
6679
-                             msgsNamesPerNmbr[ctPhNumber] = displayNames;
6680
-
6681
-                             // Store the messages sent by each user, to be able to see them later when clicking on the user's name
6682
-                             for (var h = 0; h < selectedNames.length; h++) {
6683
-
6684
-                                  var rowMessageArrpn = [];
6685
-                                  for (var b = 0; b < convData.length; b++) {
6686
-
6687
-                                       if (selectedNames[h] == convData[b]['author_displayname']) {
6688
-
6689
-		                           if (convData[b]['direction'] == 'sent_from') {
6690
-		                               if (convData[b]['status']) {
6691
-					           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
6692
-			                               if (convData[b]['status'].indexOf("undelivered") > -1) {
6693
-					                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6694
-                                                       } else {
6695
-					                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
6696
-                                                       }
6697
-					           } else {
6698
-					               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6699
-					           }
6700
-		                               } else {
6701
-		                                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6702
-		                               }
6703
-		                               rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
6704
-		                           } else if (convData[b]['direction'] == 'sent_to') {
6705
-		                               if (convData[b]['status']) {
6706
-					           if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1 || convData[b]['status'].indexOf("Retrieved") > -1) {
6707
-			                               if (convData[b]['status'].indexOf("undelivered") > -1) {
6708
-					                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6709
-                                                       } else {
6710
-					                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
6711
-                                                       }
6712
-					           } else {
6713
-					               var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6714
-					           }
6715
-		                               } else {
6716
-		                                   var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6717
-		                               }
6718
-		                               rowMessageArrpn.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
6719
-		                           } else if (convData[b]['direction'] == 'received_from') {
6720
-		                               rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
6721
-		                           } else if (convData[b]['direction'] == 'received_on') {
6722
-		                               rowMessageArrpn.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[b]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[b]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
6723
-                                           }
6724
-                                       }
6725
-                                  }
6726
-                                  var convDataPerNmbrpn = rowMessageArrpn.join("<br>");
6727
-                                  var crtNmber = fromtoNumberArr[k];
6728
-                                  var crtName = selectedNames[h];
6729
-                                  msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
6730
-                                  msgsNmbrsNames[crtNmber][crtName] = convDataPerNmbrpn;
6731
-                             }
6732
-
6733
-                             var rowMessageArr = [];
6734
-                             for (var m = 0; m < convData.length; m++) {
6735
-
6736
-                                  if (convData[m]['direction'] == 'sent_from') {
6737
-                                      if (convData[m]['status']) {
6738
-				          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
6739
-		                              if (convData[m]['status'].indexOf("undelivered") > -1) {
6740
-				                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6741
-                                              } else {
6742
-				                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
6743
-                                              }
6744
-				          } else {
6745
-				              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6746
-				          }
6747
-                                      } else {
6748
-                                          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6749
-                                      }
6750
-                                      rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 6px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
6751
-
6752
-                                  } else if (convData[m]['direction'] == 'sent_to') {
6753
-                                      if (convData[m]['status']) {
6754
-				          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1 || convData[m]['status'].indexOf("Retrieved") > -1) {
6755
-		                              if (convData[m]['status'].indexOf("undelivered") > -1) {
6756
-				                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6757
-                                              } else {
6758
-				                  var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/check.svg' title='`delivery success` received.'>";
6759
-                                              }
6760
-				          } else {
6761
-				              var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6762
-				          }
6763
-                                      } else {
6764
-                                          var sentMsgStatus = "<img src='/" + ctappdir + "/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
6765
-                                      }
6766
-                                      rowMessageArr.push("<div class='groupedSentMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;color:#06866f;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/outgoing.svg' title='Message sent to current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:inline-block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div><div class='sentMssgStatus'>"+ sentMsgStatus +"</div></div>");
6767
-
6768
-                                  } else if (convData[m]['direction'] == 'received_from') {
6769
-
6770
-		                      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received from current number.'></div><div style='display:inline-block;color:#06866f;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#353535;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
6771
-
6772
-                                  } else if (convData[m]['direction'] == 'received_on') {
6773
-
6774
-		                      rowMessageArr.push("<div class='groupedRecMsg'><div style='display:block;margin:0px 0px 6px 0px;'><div style='display:inline-block;margin:0px 12px 0px 3px;'><img src='/" + ctappdir + "/sms_relentless/img/incoming.svg' title='Message received on current number.'></div><div style='display:inline-block;color:#353535;'>From: "+ convData[m]['from'] +"</div><div style='display:inline-block;margin:0px 0px 0px 12px;color:#06866f;'>To: "+ convData[m]['to'] +"</div></div><div style='display:block;font-size:14px;color:#353535;font-weight:500;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
6775
-                                  }
6776
-                             }
6777
-
6778
-                             var convDataPerNmbr = rowMessageArr.join("");
6779
-
6780
-                             var rowPhoneNumber = "<div id='nmbrow_"+ fromtoNumberArr[k] +"' class='phoneNmbrRow'>"+ fromtoNumberArr[k] +"</div>";
6781
-
6782
-		             $("#groupedSmsTable").append("<tr id='singlerow_"+ k +"' class='groupedrowsbody'><td><div class='groupedLstNmbr fixedRowHeight'>"+ rowPhoneNumber +"</div></td><td><div class='groupedLstNames fixedRowHeight'>"+ displayNames +"</div></td><td style='width:100%'><div class='groupedLstMsgs fixedRowHeight'>"+ convDataPerNmbr +"</div></td></tr>");
6783
-                             $("#groupedSmsTable").append("<tr id='expandRow_"+ k +"' class='groupedrowsexp'><td colspan='3'><div style='display:block;width:100%;height:14px;cursor:pointer;'><img class='expandGrpRow' src='/" + ctappdir + "/sms_relentless/img/arrowDown.svg'></div><td></tr>");
6784
-
6785
-                             // Store the messages for the current number, to be able to see them later, when clicking on the number
6786
-                             var ctNmbr = fromtoNumberArr[k];
6787
-                             messagesPerNmbr[ctNmbr] = convDataPerNmbr;
6788
-                        }
6789
-
6790
-
6791
-                        // Add the 'filter by number' drop-down list
6792
-                        var nmbrslst = "<option value='title'>Filter messages by number</option>";
6793
-                        for (var p = 0; p < fromtoNumberArr.length; p++) {
6794
-                             nmbrslst += "<option value='"+ fromtoNumberArr[p] +"'>"+ fromtoNumberArr[p] +"</option>";
6795
-                        }
6796
-                        $("#filterByNumber").append("<select id='selectListedNmbrs'>"+ nmbrslst +"</select>");
6797
-
6798
-
6799
-                        $("#selectListedNmbrs").change(function() {
6800
-
6801
-                          var selectedNmbr = $(this).val();
6802
-
6803
-                          if (selectedNmbr != "title") {
6804
-
6805
-                              $(".groupedrowsbody,.groupedrowsexp").each(function() { $(this).hide(); });
6806
-		              $("#groupedSmsTable").append("<tr id='singlerowfl_"+ fromtoNumberArr.indexOf(selectedNmbr) +"' class='groupedrowsbody'><td><div class='groupedLstNmbr fixedRowHeight'><div id='nmbrow_"+ selectedNmbr +"' style='font-size:15px;font-weight:500;color:#06866f;cursor:pointer;'>"+ selectedNmbr +"</div></div></td><td><div class='groupedLstNames fixedRowHeight'>"+ msgsNamesPerNmbr[selectedNmbr] +"</div></td><td style='width:100%'><div class='groupedLstMsgs fixedRowHeight'>"+ messagesPerNmbr[selectedNmbr] +"</div></td></tr>");
6807
-                              $("#groupedSmsTable").append("<tr id='expandRowfl_"+ fromtoNumberArr.indexOf(selectedNmbr) +"' class='groupedrowsexp'><td colspan='3'><div style='display:block;width:100%;height:14px;cursor:pointer;'><img class='expandGrpRow' src='/" + ctappdir + "/sms_relentless/img/arrowDown.svg'></div><td></tr>");
6808
-
6809
-
6810
-                               // Show the messages sent by each user whose name is listed for the phone number of the current row
6811
-                               $('[id*="diplNm_"]').click(function() {
6812
-
6813
-                                  var crntNmbr = $(this).attr("id").split("_")[1];
6814
-                                  var crntDisName = $(this).attr("name");                        
6815
-                                  var clsmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
6816
-                                  clsmsgcell.empty();
6817
-                                  clsmsgcell.html(msgsNmbrsNames[crntNmbr][crntDisName]);
6818
-
6819
-                                  $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
6820
-                                  $(this).css("color", "#1483f0");
6821
-                                  $("#nmbrow_"+ selectedNmbr).css("color", "#06866f");
6822
-                                  $(".groupedLstNmbr").each(function () { $(this).css("color", "#06866f"); });
6823
-                               });
6824
-
6825
-
6826
-		               // Show all the messages sent to/from the clicked number
6827
-		               $('[id*="nmbrow_"]').click(function() {
6828
-		                  var rwNmbr = $(this).attr("id").replace("nmbrow_", "");
6829
-		                  var rowmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
6830
-		                  rowmsgcell.empty();
6831
-		                  rowmsgcell.html(messagesPerNmbr[rwNmbr]);
6832
-
6833
-		                  $(".phoneNmbrRow").each(function() { $(this).css("color", "#06866f"); });
6834
-		                  $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
6835
-		                  $(this).css("color", "#08b899");
6836
-		               });
6837
-
6838
-
6839
-		               // Expand the rows to see all the messages
6840
-		               $('[id^="expandRowfl_"]').click(function() {
6841
-		                   var idnumbrfl = $(this).attr("id").replace("expandRowfl_", "");
6842
-		                   var crntExpandfl = $(this).find(".expandGrpRow");
6843
-
6844
-		                   if (crntExpandfl.attr('src') == '/' + ctappdir + '/sms_relentless/img/arrowDown.svg') {
6845
-                                       $("#singlerowfl_"+ idnumbrfl).find(".fixedRowHeight").removeClass("fixedRowHeight");
6846
-		                       crntExpandfl.attr('src', '/' + ctappdir + '/sms_relentless/img/arrowUp.svg');
6847
-		                   } else {
6848
-                                       $("#singlerowfl_"+ idnumbrfl).find(".groupedLstNmbr,.groupedLstNames,.groupedLstMsgs").addClass("fixedRowHeight");
6849
-                                       crntExpandfl.attr('src', '/' + ctappdir + '/sms_relentless/img/arrowDown.svg'); 
6850
-		                   }
6851
-		               });
6852
-
6853
-		               $('#totalgrpmessages').remove();
6854
-		               $('#smstables').append("<div id='totalgrpmessages'>Total displayed phone numbers: 1</div>");
6855
-                           }
6856
-                        });
6857
-
6858
-                        // Clear the 'filter by number' filter
6859
-                        $("#cleargrpfilter").click(function() {
6860
-                               $('[id^="singlerowfl_"]').remove();
6861
-                               $('[id^="expandRowfl_"]').remove();
6862
-                               $(".groupedrowsbody,.groupedrowsexp").each(function() { $(this).show(); });
6863
-                               $("#selectListedNmbrs").val("title");
6864
-		               $('#totalgrpmessages').remove();
6865
-		               $('#smstables').append("<div id='totalgrpmessages'>Total displayed phone numbers: "+ totalPhNmbrs +"</div>");
6866
-                        });
6867
-
6868
-                        // Show the messages sent by each user whose name is listed for the phone number on the current row
6869
-                        $('[id*="diplNm_"]').click(function() {
6870
-
6871
-                           var crntNmbr = $(this).attr("id").split("_")[1];
6872
-                           var crntDisName = $(this).attr("name");                               
6873
-                           var clsmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
6874
-                           clsmsgcell.empty();
6875
-                           clsmsgcell.html(msgsNmbrsNames[crntNmbr][crntDisName]);
6876
-
6877
-                           $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
6878
-                           $(this).css("color", "#1483f0");
6879
-                        });
6880
-
6881
-                        // Show all the messages sent to/from the clicked number
6882
-                        $('[id*="nmbrow_"]').click(function() {
6883
-                           var rwNmbr = $(this).attr("id").replace("nmbrow_", "");
6884
-                           var rowmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
6885
-                           rowmsgcell.empty();
6886
-                           rowmsgcell.html(messagesPerNmbr[rwNmbr]);
6887
-
6888
-                           $(".phoneNmbrRow").each(function() { $(this).css("color", "#06866f"); });
6889
-                           $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
6890
-                           $(this).css("color", "#08b899");
6891
-                        });
6892
-
6893
-
6894
-		        $('#smstables').removeClass('icon-loading');
6895
-		        $('#recarrow').removeClass('arrowUpCl');
6896
-		        $('#recarrow').addClass('arrowDownCl');
6897
-
6898
-                        // Expand the rows to see all the messages
6899
-                        $('[id^="expandRow_"]').click(function() {
6900
-                            var idnumbr = $(this).attr("id").replace("expandRow_", "");
6901
-                            var crntExpand = $(this).find(".expandGrpRow");
6902
-
6903
-                            if (crntExpand.attr('src') == '/' + ctappdir + '/sms_relentless/img/arrowDown.svg') {
6904
-                                $("#singlerow_"+ idnumbr).find(".fixedRowHeight").removeClass("fixedRowHeight");
6905
-                                crntExpand.attr('src', '/' + ctappdir + '/sms_relentless/img/arrowUp.svg');
6906
-                            } else {
6907
-                                $("#singlerow_"+ idnumbr).find(".groupedLstNmbr,.groupedLstNames,.groupedLstMsgs").addClass("fixedRowHeight");
6908
-                                crntExpand.attr('src', '/' + ctappdir + '/sms_relentless/img/arrowDown.svg'); 
6909
-                            }
6910
-                        });
6911
-
6912
-
6913
-		        // Add pagination
6914
-		        var rowsShowngrp = messagesperpage;
6915
-		        var rowsTotalgrp = $("#groupedSmsTable tr").length;
6916
-
6917
-		        var numPagesgrp = ((rowsTotalgrp - 2) / rowsShowngrp) / 2;
6918
-
6919
-		        for (i = 0; i < numPagesgrp; i++) {
6920
-		             var pageNumgrp = i + 1;
6921
-		             $('#paginationgrp').append('<a href="#" rel="' + i + '" class="pagenumbersgrp">' + pageNumgrp + '</a> ');
6922
-		        }
6923
-
6924
-		        $('#paginationgrp').children(":first").addClass('active');
6925
-
6926
-		        $(".groupedrowsbody,.groupedrowsexp").hide();
6927
-
6928
-		        $('#paginationgrp a:first').addClass('active');
6929
-
6930
-		        // Show table page when clicking a page number
6931
-		        $('.grppages a').bind('click', function() {
6932
-
6933
-		           $('#paginationgrp').children().removeClass('active');
6934
-
6935
-		           $(this).addClass('active');
6936
-
6937
-		           var currentPageNogrp = $(this).text();
6938
-
6939
-		           $('#paginationgrp a').each(function() {
6940
-		               if ($(this).text() == currentPageNogrp) {
6941
-		                   $(this).addClass('active');
6942
-		               }
6943
-		           });
6944
-
6945
-		           var currPagegrp = $(this).attr('rel');
6946
-		           var startItemgrp = currPagegrp * rowsShowngrp;
6947
-		           var endItemgrp = startItemgrp + rowsShowngrp;
6948
-
6949
-		           $(".groupedrowsbody").hide().slice(startItemgrp, endItemgrp).css('display', 'table-row');
6950
-		           $(".groupedrowsexp").hide().slice(startItemgrp, endItemgrp).css('display', 'table-row');
6951
-
6952
-		           $('#totalgrpmessages').remove();
6953
-		           $('#smstables').append("<div id='totalgrpmessages'>Total displayed phone numbers: " + totalPhNmbrs + "</div>");
6954
-		        });
6955
-
6956
-                        $('#paginationgrp').children(":last").trigger('click');
6957
-
6958
-
6959
-		        // Show/Hide filter row
6960
-		        $('#recarrow').on('click', function() {
6961
-			   if ($('#grpfiltersrow').is(':visible')) {
6962
-			       $('#grpfiltersrow').hide();
6963
-		               $('#grpheaderrow').css('top', '0px');
6964
-		               $(this).removeClass('arrowUpCl');
6965
-		               $(this).addClass('arrowDownCl');
6966
-			   } else {
6967
-			       $('#grpfiltersrow').show();
6968
-		               $('#grpheaderrow').css('top', '158px');
6969
-		               $(this).removeClass('arrowDownCl');
6970
-		               $(this).addClass('arrowUpCl');
6971
-		           }
6972
-		        });
6973
-
6974
-
6975
-		        // Download MMS files when clicking on their URLs
6976
-		        $('[id^="mmsTblUrl-"]').on('click', function(evt) {
6977
-
6978
-		           var clckedUrl = $(this).text();
6979
-		           var flNamearr = clckedUrl.split("/");
6980
-		           var flName = flNamearr.reverse()[0];
6981
-
6982
-		           confirmAlert("Download this file only if you trust the sender and the domain of the URL.");
6983
-
6984
-			   $("#confirmOk").click(function() {
6985
-
6986
-		              $("#alertMsgOverlay").remove();
6987
-			      $("#alertConfMessage").remove();
6988
-
6989
-			      var mmsLink = document.createElement("a");
6990
-			      mmsLink.setAttribute('href', clckedUrl);
6991
-			      mmsLink.setAttribute('download', flName);
6992
-                              mmsLink.setAttribute('target', '_blank');
6993
-			      document.body.appendChild(mmsLink);
6994
-			      mmsLink.click();
6995
-			      mmsLink.remove();
6996
-		           });
6997
-
6998
-			   $("#confirmCancel").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
6999
-		        });
7000
-
7001
-          },
7002
-          error: function() {
7003
-
7004
-                        showAlert("Error while attempting to get the messages from the database.");
7005
-                        $('#smstables').removeClass('icon-loading');
7006
-          }
7007
-     });
7008
-  });
7009
-
7010
-
7011
-  function showAlert(alertText) {
7012
-
7013
-     let alertwnd = "<div id='alertMessage'>";
7014
-     alertwnd += "<a id='closeAlertWnd' title='Close this window'></a>";
7015
-     alertwnd += "<div id='alertTextWrap'>"+ alertText +"</div>";
7016
-     alertwnd += "<input type='submit' id='alertOk' value='OK'>";
7017
-     alertwnd += "</div>";
7018
-
7019
-     $("#content").append("<div id='alertMsgOverlay'></div>");
7020
-     $("#content").append(alertwnd);
7021
-
7022
-     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
7023
-     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
7024
-     $("#alertMessage").css({ "top" : topDist, "left" : leftDist });
7025
-
7026
-     $("#closeAlertWnd").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
7027
-     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
7028
-     $("#alertOk").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
7029
-  }
7030
-
7031
-  function confirmAlert(alertText) {
7032
-
7033
-     $("#alertMsgOverlay").remove();
7034
-     $("#alertConfMessage").remove();
7035
-
7036
-     let alertwndcf = "<div id='alertConfMessage'>";
7037
-     alertwndcf += "<a id='closeAlertWndcf' title='Close this window'></a>";
7038
-     alertwndcf += "<div id='alertTextWrap'>"+ alertText +"</div>";
7039
-     alertwndcf += "<div id='cancelOkWrap'><input type='submit' id='confirmCancel' value='Cancel'>";
7040
-     alertwndcf += "<input type='submit' id='confirmOk' value='OK'></div>";
7041
-     alertwndcf += "</div>";
7042
-
7043
-     $("#content").append("<div id='alertMsgOverlay'></div>");
7044
-     $("#content").append(alertwndcf);
7045
-
7046
-     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
7047
-     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
7048
-     $("#alertConfMessage").css({ "top" : topDist, "left" : leftDist });
7049
-
7050
-     $("#closeAlertWndcf").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
7051
-     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertConfMessage").remove(); });
7052
-  }
7053
-
7054
-
7055
-  // Append the auto-refresh button that refreshes the 'Sent SMS Messages' page
7056
-  $("#app-content").append("<div id='stopAutoRefreshSent'><div id='stopAutoRefreshSentBtn'>Start auto refresh</div><div id='refreshTimerSent' class='arftimer' style='--duration: 15;--size: 24;'><div class='arfmask'></div></div></div>");
7057
-
7058
-  $("#stopAutoRefreshSentBtn").click(function() {
7059
-     if ($("#stopAutoRefreshSentBtn").text() == "Stop auto refresh") {
7060
-         clearInterval(intervalRfrSent);
7061
-         $("#stopAutoRefreshSentBtn").text("Start auto refresh");
7062
-         $("#stopAutoRefreshSentBtn").css("color", "#0a559e");
7063
-         $("#refreshTimerSent").css("display", "none");
7064
-     } else {
7065
-         clearInterval(intervalRfrSent);
7066
-         intervalRfrSent = setInterval(function() { $("#sentsmstableshow").click(); }, 15000);
7067
-         $("#stopAutoRefreshSentBtn").text("Stop auto refresh");
7068
-         $("#stopAutoRefreshSentBtn").css("color", "#04957b");
7069
-         $("#refreshTimerSent").css("display", "inline-block");
7070
-     }
7071
-  });
7072
-
7073
-});
7074 0
deleted file mode 100644
... ...
@@ -1,1436 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-namespace OCA\SMSRelentless\Controller;
27
-
28
-use OCP\AppFramework\ApiController;
29
-use OCP\IRequest;
30
-use OCA\SMSRelentless\Service\SmsrelentlessService;
31
-use OCP\AppFramework\Http\DataResponse;
32
-use OCP\AppFramework\OCSController;
33
-use OCP\IUserSession;
34
-use OCP\IConfig;
35
-use \DateTime;
36
-use OCP\AppFramework\Controller;
37
-use OCP\Files\IAppData;
38
-use OCP\AppFramework\App;
39
-use OCP\Files\NotPermittedException;
40
-use \ReflectionClass;
41
-use OCP\Notification\INotification;
42
-use OCP\Notification\IManager;
43
-use OCP\IDBConnection;
44
-use OCP\IUserManager;
45
-use Plivo\RestClient;
46
-use Plivo\Util\signatureValidation;
47
-
48
-
49
-class AuthorApiController extends ApiController {
50
-
51
-    private $service;
52
-    private $userId;
53
-    private $config;
54
-    private $connection;
55
-    private $userManager;
56
-    private $manager;
57
-
58
-    public function __construct($appName, IRequest $request, SmsrelentlessService $service, $userId, IConfig $config, IDBConnection $connection, IUserManager $userManager, IManager $manager) {
59
-        parent::__construct(
60
-            $appName,
61
-            $request,
62
-            'PUT, POST, GET, DELETE, PATCH',
63
-            'Authorization, Content-Type, Accept',
64
-            1728000);
65
-
66
-        $this->service = $service;
67
-        $this->userId = $userId;
68
-        $this->config = $config;
69
-        $this->connection = $connection;
70
-        $this->userManager = $userManager;
71
-	$this->manager = $manager;
72
-    }
73
-
74
-
75
-    /**
76
-     * @NoAdminRequired
77
-     */
78
-    public function object_to_array($obj) {
79
-       if(is_object($obj)) $obj = (array)$this->dismount($obj);
80
-       if(is_array($obj)) {
81
-          $new = array();
82
-          foreach($obj as $key => $val) {
83
-              $new[$key] = $this->object_to_array($val);
84
-          }
85
-       }
86
-       else $new = $obj;
87
-       return $new;
88
-    }
89
-
90
-
91
-    /**
92
-     * @NoAdminRequired
93
-     */
94
-    public function dismount($object) {
95
-       $reflectionClass = new ReflectionClass(get_class($object));
96
-       $array = array();
97
-       foreach ($reflectionClass->getProperties() as $property) {
98
-          $property->setAccessible(true);
99
-          $array[$property->getName()] = $property->getValue($object);
100
-          $property->setAccessible(false);
101
-       }
102
-       return $array;
103
-    }
104
-
105
-
106
-    /**
107
-     * @NoAdminRequired
108
-     */
109
-    public function verifyHeader($receiveddata, $signature_header, $timestamp, $public_key = '', $tolerance = null ) {
110
-        // Typecast timestamp to int for comparisons
111
-        $timestamp = (int)$timestamp;
112
-
113
-        // Check if timestamp is within tolerance
114
-        if (($tolerance > 0) && (\abs(\time() - $timestamp) > $tolerance)) {
115
-             return false;
116
-        } else {
117
-
118
-            // Convert base64 string to bytes for sodium crypto functions
119
-            $public_key_bytes = base64_decode($public_key);
120
-            $signature_header_bytes = base64_decode($signature_header);
121
-
122
-            // Construct a message to test against the signature header using the timestamp and payload
123
-            $constructed_string = $timestamp . '|' . $receiveddata;
124
-
125
-            if (!\sodium_crypto_sign_verify_detached($signature_header_bytes, $constructed_string, $public_key_bytes)) {
126
-                return false;
127
-            } else {
128
-                return true;
129
-            }
130
-        }
131
-    }
132
-
133
-
134
-    /**
135
-     * @NoAdminRequired
136
-     * @NoCSRFRequired
137
-     * @PublicPage
138
-     */
139
-    public function recdeliveryreptel() {
140
-
141
-       $request = file_get_contents("php://input");
142
-       $recdata = json_decode($request, TRUE);
143
-
144
-       $delsmswebhookurl = $recdata["data"]["payload"]["webhook_url"];
145
-       $ncuserfortelnyxdel = $this->service->getuserbyteldelrwhurl($delsmswebhookurl);
146
-
147
-       if ($ncuserfortelnyxdel != '' && $ncuserfortelnyxdel != null && $ncuserfortelnyxdel != 'undefined') {
148
-
149
-	       $messageid = $recdata["data"]["payload"]["id"];
150
-
151
-	       $network = $recdata["data"]["payload"]["to"][0]["carrier"];
152
-	       $messageprice = $recdata["data"]["payload"]["cost"]["amount"];
153
-	       $deliverystatus = $recdata["data"]["payload"]["to"][0]["status"];
154
-
155
-	       $goterrorinit = $recdata["data"]["payload"]["errors"];
156
-
157
-	       if (!empty($goterrorinit)) {
158
-		   $retrievedtitle = $recdata["data"]["payload"]["errors"][0]["title"];
159
-		   $retrievedcode = $recdata["data"]["payload"]["errors"][0]["code"];
160
-		   $messagestatus = "(Error " . $retrievedcode . ") " . $retrievedtitle;
161
-	       } else {
162
-		   $messagestatus = "Success ! The message has been successfully accepted for delivery.";
163
-	       }
164
-
165
-	       return $this->service->updatedeliverystatustel($ncuserfortelnyxdel, $messageid, $network, $messageprice, $messagestatus, $deliverystatus); 
166
-
167
-       } else { return "access denied"; }
168
-
169
-    }
170
-
171
-
172
-    /**
173
-     * @NoAdminRequired
174
-     * @NoCSRFRequired
175
-     * @PublicPage
176
-     */
177
-    public function recdeliveryrepnex() {
178
-
179
-       $plivodrurl = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
180
-
181
-       $ncuserforplivodel = $this->service->getuserbyplivodelrwhurl($plivodrurl);
182
-
183
-       if ($ncuserforplivodel != '' && $ncuserforplivodel != null && $ncuserforplivodel != 'undefined') {
184
-
185
-	       $networkcode = "";
186
-	       $mStatus = ""; 
187
-
188
-	       if (isset($_REQUEST["MessageUUID"])) { $messageid = $_REQUEST["MessageUUID"]; } else { $messageid = ''; }
189
-	       if (isset($_REQUEST["MCC"]) && isset($_REQUEST["MNC"])) { $networkcode = $_REQUEST["MCC"] . " " . $_REQUEST["MNC"]; } else { $networkcode = ''; }
190
-	       if (isset($_REQUEST["TotalAmount"])) { $messageprice = $_REQUEST["TotalAmount"]; } else { $messageprice = ''; }
191
-	       if (isset($_REQUEST["ErrorCode"]) && $_REQUEST["ErrorCode"] == "") {
192
-                   $mStatus = "Success ! The message has been successfully accepted for delivery.";
193
-               } elseif (isset($_REQUEST["ErrorCode"]) && $_REQUEST["ErrorCode"] != "") {
194
-                   $mStatus = "Error " . $_REQUEST["ErrorCode"]; 
195
-               } else { $mStatus = ''; }
196
-
197
-	       if (isset($_REQUEST["Status"])) { $deliverystatus = $_REQUEST["Status"]; }
198
-
199
-	       return $this->service->updatedeliverystatusnex($ncuserforplivodel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus);
200
-
201
-       } else { return "access denied"; }
202
-
203
-    }
204
-
205
-
206
-    /**
207
-     * @NoAdminRequired
208
-     * @NoCSRFRequired
209
-     * @PublicPage
210
-     */
211
-    public function recdeliveryreptwil() {
212
-
213
-       $twildrurl = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
214
-
215
-       $ncuserfortwildel = $this->service->getuserbytwildelrwhurl($twildrurl);
216
-
217
-       if ($ncuserfortwildel != '' && $ncuserfortwildel != null && $ncuserfortwildel != 'undefined') {
218
-
219
-           $messageid = $_REQUEST["SmsSid"];
220
-
221
-           if ($messageid != null) {
222
-
223
-               $credentialstw = $this->service->getapicredentials($ncuserfortwildel);
224
-               $sidtw = $credentialstw[15];
225
-               $tokentw = $credentialstw[16];
226
-               $msdetails = json_decode(file_get_contents("https://".$sidtw.":".$tokentw."@api.twilio.com/2010-04-01/Accounts/".$sidtw."/Messages/".$messageid.".json"));
227
-               $errorMessage = $msdetails->error_message;
228
-               $errorCode = $msdetails->error_code;
229
-               $deliverystatus = $msdetails->status;
230
-
231
-               if ($errorCode == null) { 
232
-                   $mStatus = 'Success ! The message has been successfully accepted for delivery.'; 
233
-               } else { $mStatus = 'Error ' . $errorCode . '. '. ($errorMessage != '') ? 'Message: '. $errorMessage : ''; }
234
-
235
-               $messagepricepre = $msdetails->price;
236
-
237
-               if ($messagepricepre) {
238
-                   $messageprice = str_replace("-", "", $messagepricepre);
239
-               } else { $messageprice = ""; }
240
-
241
-               $networkcode = '';
242
-
243
-	       return $this->service->updatedeliverystatustwil($ncuserfortwildel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus);
244
-
245
-           } else { exit(); }
246
-
247
-       } else { exit(); }
248
-
249
-    }
250
-
251
-
252
-    /**
253
-     * @NoAdminRequired
254
-     * @NoCSRFRequired
255
-     * @PublicPage
256
-     */
257
-    public function recdeliveryrepflow() {
258
-
259
-       $flowdrurl = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
260
-
261
-       $ncuserforflowdel = $this->service->getuserbyflowdelrwhurl($flowdrurl);
262
-
263
-       if ($ncuserforflowdel != '' && $ncuserforflowdel != null && $ncuserforflowdel != 'undefined') {
264
-
265
-           $receivereq = file_get_contents('php://input');
266
-           $recmdec = json_decode($receivereq, true);
267
-           $recmsid = $recmdec['data']['id'];
268
-
269
-           $smsapicredfl = $this->service->getapicredentials($ncuserforflowdel);
270
-           $flowapikey = $smsapicredfl[20];
271
-           $flowapisecret = $smsapicredfl[21];
272
-
273
-           $getmsdetails = json_decode(file_get_contents("https://".$flowapikey.":".$flowapisecret."@api.flowroute.com/v2.1/messages/".$recmsid.""), true);
274
-           $messagepriceflinit = $getmsdetails['data']['attributes']['amount_display'];
275
-           $messagepricefl = str_replace("$", "", $messagepriceflinit);
276
-
277
-           $mdeliveryflinit = $getmsdetails['data']['attributes']['delivery_receipts'][0]['status'];
278
-
279
-           if ($mdeliveryflinit != 'message buffered') {
280
-               if ($mdeliveryflinit == 'Ok') {
281
-                   $messagedeliveryfl = "Issues";
282
-               } else { $messagedeliveryfl = $mdeliveryflinit; }
283
-           } else { $messagedeliveryfl = 'delivered'; }
284
-
285
-           $messagestatuscode = $getmsdetails['data']['attributes']['delivery_receipts'][0]['status_code'];
286
-           $messagestatusdescr = $getmsdetails['data']['attributes']['delivery_receipts'][0]['status_code_description'];
287
-
288
-           if ($messagestatuscode != '') { 
289
-               $messagestatusfl = (($messagestatusdescr != '') ? $messagestatusdescr . ". " : "") . "Status code: " . $messagestatuscode; 
290
-           } else { $messagestatusfl = "There were issues with message delivery."; }
291
-
292
-           $networkcodefl = '';
293
-
294
-           return $this->service->updatedeliverystatusflow($ncuserforflowdel, $recmsid, $networkcodefl, $messagepricefl,  $messagestatusfl, $messagedeliveryfl);
295
-
296
-       } else { return "access denied"; }
297
-
298
-    }
299
-
300
-
301
-    /**
302
-     * @NoAdminRequired
303
-     * @NoCSRFRequired
304
-     * @PublicPage
305
-     */
306
-    public function receivesmstel() {
307
-
308
-       $signature = $_SERVER['HTTP_TELNYX_SIGNATURE_ED25519'];
309
-       $timestamp = $_SERVER['HTTP_TELNYX_TIMESTAMP'];
310
-
311
-       $receivereq = file_get_contents('php://input');
312
-
313
-       $recmesdata = json_decode($receivereq, TRUE);
314
-
315
-       $recsmswebhookurl = $recmesdata["data"]["payload"]["webhook_url"];
316
-
317
-       $ncuserfortelnyx = $this->service->getuserbytelrecwhurl($recsmswebhookurl);
318
-
319
-       $txcredentials = $this->service->getapicredentials($ncuserfortelnyx);
320
-
321
-       $telpubkey = $txcredentials[1];
322
-       $telnyxkey = $txcredentials[0];
323
-       $teldelrecurl = $txcredentials[3];
324
-       $messagingprofid = $txcredentials[4];
325
-
326
-       // Verify message signature
327
-       $signatureverify = $this->verifyHeader($receivereq, $signature, $timestamp, $telpubkey, $tolerance = 30);
328
-
329
-       if ($signatureverify) {
330
-
331
-          if ($ncuserfortelnyx != '' && $ncuserfortelnyx != null && $ncuserfortelnyx != 'undefined') {
332
-
333
-	       $messageid = $recmesdata["data"]["payload"]["id"];
334
-
335
-	       $messagedate = date("Y-m-d H:i:s");
336
-
337
-	       $messagefrom = $recmesdata["data"]["payload"]["from"]["phone_number"];
338
-
339
-	       $messageto = "Telnyx: " . $recmesdata["data"]["payload"]["to"][0]["phone_number"];
340
-
341
-               $messagetopr = $recmesdata["data"]["payload"]["to"][0]["phone_number"];
342
-
343
-               $messagetoprtx = "Tx: " . $messagetopr;
344
-
345
-               // Check if the message is a MMS
346
-               if ($recmesdata["data"]["payload"]['type'] == 'MMS') {
347
-
348
-                   $includedFilestx = '';
349
-
350
-                   foreach ($recmesdata["data"]["payload"]['media'] as $telkey => $telvalue) {
351
-                        if (is_array($telvalue)) {
352
-                            foreach ($telvalue as $telkeysec => $telvaluesec) {
353
-                                if ($telkeysec == "url") {
354
-                                    $includedFilestx .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $telvaluesec . "</div><br><br>";
355
-                                }
356
-                            }
357
-                        }
358
-                   }
359
-
360
-                   $messagetexttel = $recmesdata["data"]["payload"]["text"] . "<br><br><br></b>--- The files included in the MMS follow. Download them only if you trust the sender and the domains of the URLs ---<br><br><br>" . $includedFilestx;
361
-                   $ismmstel = 1;
362
-               } else {
363
-                   $messagetexttel = $recmesdata["data"]["payload"]["text"];
364
-                   $ismmstel = 0;
365
-               }
366
-
367
-	       $recmessagearr = [$messageid, $messagedate, $messagefrom, $messageto, $messagetexttel];
368
-
369
-	       $this->service->insertrecsms($ncuserfortelnyx, $recmessagearr);
370
-
371
-
372
-               // Check if there is any auto-reply configured for the receiving number
373
-	       $telgetarpl = $this->connection->prepare('SELECT `phone_number`, `days_of_week`, `daily_start`, `daily_end`, `vacation_start`, `vacation_end`, `message_text` FROM 
374
-                                                        `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
375
-	       $telgetarplres = $telgetarpl->execute([$messagetoprtx]);
376
-	       $telarpldata = $telgetarplres->fetch();
377
-	       $telgetarplres->closeCursor();
378
-
379
-               if ($telarpldata) {
380
-
381
-                   $autoreplytext = $telarpldata['message_text'];
382
-
383
-                   // Get the Display Name of the current user
384
-                   $crtuser = $this->userManager->get($ncuserfortelnyx);
385
-                   $displaynm = $crtuser->getDisplayName();
386
-
387
-                   // Check if the auto-reply is in 'daily mode'
388
-                   if ($telarpldata['days_of_week']) {
389
-
390
-                       // Check if the auto-reply should be sent 
391
-                       $daysofweekarrinit = explode(",", $telarpldata['days_of_week']);
392
-
393
-                       $daysofweekarr = [];
394
-                       $fulldays = [];
395
-                       foreach ($daysofweekarrinit as $crtday) {
396
-                           if (strpos($crtday, "full") !== false) {
397
-                               $fulldays[] = $crtday;
398
-                           } else {
399
-                               $daysofweekarr[] = $crtday;
400
-                           }
401
-                       }
402
-
403
-                       $dailystart = $telarpldata['daily_start'];
404
-                       $dailyend = $telarpldata['daily_end'];
405
-
406
-                       $crntdate = date("Y-m-d");
407
-                       $crntDayNumber = date('N', strtotime($crntdate));
408
-
409
-                       if (in_array($crntDayNumber, $daysofweekarr)) {
410
-
411
-                           $crntimehrmin = date("H:i");
412
-                           $crntdatefmt = new DateTime($crntimehrmin);
413
-                           $startdatefmt = new DateTime($dailystart);
414
-                           $enddatefmt = new DateTime($dailyend);
415
-
416
-                           if ($crntdatefmt >= $startdatefmt && $enddatefmt > $crntdatefmt) {
417
-                               // OK
418
-                           } else {
419
-
420
-	                       // Send the auto-reply
421
-		               \Telnyx\Telnyx::setApiKey($telnyxkey);
422
-		               $messagedate = date("Y-m-d H:i:s");
423
-		               $message = \Telnyx\Message::Create(["from" => $messagetopr, "to" => $messagefrom, "text" => $autoreplytext, "webhook_url" => $teldelrecurl]);
424
-
425
-		               // Insert the sent SMS in the 'sms_relent_sent' table
426
-		               $messageid = $message['id'];
427
-		               $messagefromtx = "Telnyx: " . $messagetopr;
428
-		               $messagetotx = $messagefrom;
429
-		               $messagenetwork = null;
430
-		               $messageprice = null;
431
-		               $messagestatus = $message['to'][0]['status'];
432
-		               $messagedelivery = null;
433
-
434
-		               $sentmessagearr = [$messageid, $messagedate, $messagefromtx, $messagetotx, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $autoreplytext];
435
-
436
-		               $this->service->insertsentsms($ncuserfortelnyx, $displaynm, $sentmessagearr);
437
-                           }
438
-                       }
439
-
440
-                       if (in_array($crntDayNumber . "(full)", $fulldays)) {
441
-
442
-	                       // Send the auto-reply
443
-		               \Telnyx\Telnyx::setApiKey($telnyxkey);
444
-		               $messagedate = date("Y-m-d H:i:s");
445
-		               $message = \Telnyx\Message::Create(["from" => $messagetopr, "to" => $messagefrom, "text" => $autoreplytext, "webhook_url" => $teldelrecurl]);
446
-
447
-		               // Insert the sent SMS in the 'sms_relent_sent' table
448
-		               $messageid = $message['id'];
449
-		               $messagefromtx = "Telnyx: " . $messagetopr;
450
-		               $messagetotx = $messagefrom;
451
-		               $messagenetwork = null;
452
-		               $messageprice = null;
453
-		               $messagestatus = $message['to'][0]['status'];
454
-		               $messagedelivery = null;
455
-
456
-		               $sentmessagearr = [$messageid, $messagedate, $messagefromtx, $messagetotx, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $autoreplytext];
457
-
458
-		               $this->service->insertsentsms($ncuserfortelnyx, $displaynm, $sentmessagearr);
459
-                       }
460
-
461
-                   } elseif ($telarpldata['vacation_start'] && $telarpldata['vacation_end']) {
462
-
463
-                             $vacationstart = $telarpldata['vacation_start'];
464
-                             $vacationend = $telarpldata['vacation_end'];
465
-
466
-                             $crntimeymd = date("Y-m-d H:i:s");
467
-                             $crntdatevcfmt = new DateTime($crntimeymd);
468
-                             $startdatevcfmt = new DateTime($vacationstart);
469
-                             $enddatefvcmt = new DateTime($vacationend);
470
-
471
-                             if ($startdatevcfmt <= $crntdatevcfmt && $crntdatevcfmt <= $enddatefvcmt) {
472
-
473
-			         // Send the auto-reply
474
-			         \Telnyx\Telnyx::setApiKey($telnyxkey);
475
-			         $messagedate = date("Y-m-d H:i:s");
476
-			         $message = \Telnyx\Message::Create(["from" => $messagetopr, "to" => $messagefrom, "text" => $autoreplytext, "webhook_url" => $teldelrecurl]);
477
-
478
-			         // Insert the sent SMS in the 'sms_relent_sent' table
479
-			         $messageid = $message['id'];
480
-			         $messagefromtx = "Telnyx: " . $messagetopr;
481
-			         $messagetotx = $messagefrom;
482
-			         $messagenetwork = null;
483
-			         $messageprice = null;
484
-			         $messagestatus = $message['to'][0]['status'];
485
-			         $messagedelivery = null;
486
-
487
-			         $sentmessagearr = [$messageid, $messagedate, $messagefromtx, $messagetotx, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $autoreplytext];
488
-
489
-			         $this->service->insertsentsms($ncuserfortelnyx, $displaynm, $sentmessagearr);
490
-                           }
491
-
492
-                   }
493
-               }
494
-
495
-
496
-	       // Send notifications
497
-               $nameofhost = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
498
-
499
-	       $telsmsapicred = $this->service->getapicredentials($ncuserfortelnyx);
500
-	       $telnotify = $telsmsapicred[12];
501
-	       $emailaddress = $telsmsapicred[13];
502
-	       $includemessageinemail = $telsmsapicred[14];
503
-
504
-               if ($ismmstel == 0) { $smsormmstel = "SMS"; } else { $smsormmstel = "MMS"; }
505
-
506
-	       if ($telnotify != 0 ) {
507
-
508
-                   $allalloweduserstx = $this->service->getallowedusers($ncuserfortelnyx);
509
-
510
-                   foreach ($allalloweduserstx as $alusrkeytx => $specusrnametx) {
511
-
512
-		            $notificationtx = $this->manager->createNotification();
513
-		            $notificationtx->setApp('sms_relentless')
514
-			          ->setUser($specusrnametx)
515
-			          ->setDateTime(new \DateTime())
516
-			          ->setObject('sms_relentless', '11')
517
-			          ->setSubject('New SMS Message');
518
-		            $this->manager->notify($notificationtx);
519
-                   }
520
-	       }
521
-
522
-	       if ($emailaddress != '') {
523
-
524
-		   $gmtind = "UTC " . date('P');
525
-		   $smsdateinit = date("Y-m-d  H:i:s");
526
-		   $smsdate = $smsdateinit . " " . $gmtind;
527
-
528
-		   $subject = "New ". $smsormmstel ." message received";
529
-
530
-                   $messagetextnltel = str_replace("\n", "<br>", $messagetexttel);
531
-
532
-		   if ($includemessageinemail == 0) {
533
-		       $message = "Hello, <br><br> You have received a new message on ".$smsdate." .<br> You can check the new message by going to 'SMS Relentless' > 'Received SMS Messages'. <br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '" . $nameofhost . "' <br>";
534
-		   } else {
535
-		       $message = "Hello, <br><br> You have received a new message on ".$smsdate." :<br><br><br> Message ID: ".$messageid." <br> Message Date: ".$messagedate." <br> From: ".$messagefrom." <br> To: ".$messageto."<br> Message Text: <br><br><b>".$messagetextnltel."</b><br><br>____________<br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '".$nameofhost."' <br>";
536
-		   }
537
-
538
-                   $messagefin = chunk_split(base64_encode($message));
539
-
540
-		   $headers = "MIME-Version: 1.0" . "\r\n";
541
-		   $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
542
-                   $headers .= "Content-Transfer-Encoding: base64" . "\r\n";
543
-
544
-		   // Set the email sender
545
-		   $headers .= "From: " . $emailaddress . "\r\n";
546
-		   $headers .= "Reply-To: " . $emailaddress . "\r\n";
547
-
548
-		   mail($emailaddress, $subject, $messagefin, $headers);
549
-	       }
550
-
551
-	       return http_response_code(200);
552
-
553
-          } else { return "access denied"; }
554
-
555
-       } else { return "access denied"; }
556
-
557
-    }
558
-
559
-
560
-    /**
561
-     * @NoAdminRequired
562
-     * @NoCSRFRequired
563
-     * @PublicPage
564
-     */
565
-    public function receivesmsnex() {
566
-
567
-       $plivosignature = $_SERVER['HTTP_X_PLIVO_SIGNATURE_V2'];
568
-       $plivononce = $_SERVER["HTTP_X_PLIVO_SIGNATURE_V2_NONCE"];
569
-
570
-       $plivorecurl = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
571
-
572
-       $ncuserforplivo = $this->service->getuserbyplivorecwhurl($plivorecurl);
573
-
574
-       $smsapicred = $this->service->getapicredentials($ncuserforplivo);
575
-
576
-       $plivoapikey = $smsapicred[5];
577
-       $plivoauthtoken = $smsapicred[6];
578
-       $plivowhdelrcpt = $smsapicred[8];
579
-
580
-       $baseplivourlinit = explode("?", $plivorecurl);  
581
-       $baseplivoURI = $baseplivourlinit[0];
582
-
583
-       // Verify message signature
584
-       $SigValidation = new signatureValidation();
585
-       $signverify = $SigValidation->validateSignature($baseplivoURI, $plivononce, $plivosignature, $plivoauthtoken);
586
-
587
-       if ($signverify) {
588
-
589
-              if ($ncuserforplivo != '' && $ncuserforplivo != null && $ncuserforplivo != 'undefined') {
590
-
591
-	          $messageid = $_REQUEST["MessageUUID"];
592
-
593
-	          $messagedate = date("Y-m-d H:i:s");
594
-
595
-	          $messagefrom = "+" . $_REQUEST['From'];
596
-	          $messageto = "Plivo: +" . $_REQUEST['To'];
597
-	          $messagetoprpl = "Pl: +" . $_REQUEST['To'];
598
-                  $messagetoplsp = "+" . $_REQUEST['To'];
599
-
600
-                  // Check if the message is a MMS
601
-                  if ($_REQUEST['Type'] == 'mms') {
602
-
603
-                      $includedFilespl = '';
604
-                      foreach ($_REQUEST as $plkey => $plvalue) {
605
-
606
-			   if (strpos($plkey, "Media") !== false && $plkey != "MediaCount") {
607
-                               $includedFilespl .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $plvalue . "</div><br><br>";
608
-			   }
609
-                      }
610
-
611
-                      $messagetextpl = $_REQUEST['Body'] . "<br><br><br></b>--- The files included in the MMS follow. Download them only if you trust the sender and the domains of the URLs ---<br><br><br>" . $includedFilespl;
612
-                      $ismmspl = 1;
613
-                  } else {
614
-                      $messagetextpl = $_REQUEST['Text'];
615
-                      $ismmspl = 0;
616
-                  }
617
-
618
-	          $recmessagearr = [$messageid, $messagedate, $messagefrom, $messageto, $messagetextpl];
619
-
620
-                  $this->service->insertrecsms($ncuserforplivo, $recmessagearr);
621
-
622
-
623
-                  // Check if there is any auto-reply configured for the receiving number
624
-	          $plgetarpl = $this->connection->prepare('SELECT `phone_number`, `days_of_week`, `daily_start`, `daily_end`, `vacation_start`, `vacation_end`, `message_text` FROM 
625
-                                                          `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
626
-	          $plgetarplres = $plgetarpl->execute([$messagetoprpl]);
627
-	          $plarpldata = $plgetarplres->fetch();
628
-	          $plgetarplres->closeCursor();
629
-
630
-                  if ($plarpldata) {
631
-
632
-                      $autoreplytext = $plarpldata['message_text'];
633
-
634
-                      // Get the Display Name of the current user
635
-                      $crtuser = $this->userManager->get($ncuserforplivo);
636
-                      $displaynm = $crtuser->getDisplayName();
637
-
638
-                      // Check if the auto-reply is in 'daily mode'
639
-                      if ($plarpldata['days_of_week']) {
640
-
641
-                          // Check if the auto-reply should be sent 
642
-                          $daysofweekarrinit = explode(",", $plarpldata['days_of_week']);
643
-
644
-                          $daysofweekarr = [];
645
-                          $fulldays = [];
646
-                          foreach ($daysofweekarrinit as $crtday) {
647
-                              if (strpos($crtday, "full") !== false) {
648
-                                  $fulldays[] = $crtday;
649
-                              } else {
650
-                                  $daysofweekarr[] = $crtday;
651
-                              }
652
-                          }
653
-
654
-                          $dailystart = $plarpldata['daily_start'];
655
-                          $dailyend = $plarpldata['daily_end'];
656
-
657
-                          $crntdate = date("Y-m-d");
658
-                          $crntDayNumber = date('N', strtotime($crntdate));
659
-
660
-                          if (in_array($crntDayNumber, $daysofweekarr)) {
661
-
662
-                              $crntimehrmin = date("H:i");
663
-                              $crntdatefmt = new DateTime($crntimehrmin);
664
-                              $startdatefmt = new DateTime($dailystart);
665
-                              $enddatefmt = new DateTime($dailyend);
666
-
667
-                              if ($crntdatefmt >= $startdatefmt && $enddatefmt > $crntdatefmt) {
668
-                                  // OK
669
-                              } else {
670
-
671
-                                  // Send the auto-reply
672
-		                  $client = new RestClient($plivoapikey, $plivoauthtoken);
673
-                                  $messagedatepl = date("Y-m-d H:i:s");
674
-		                  $response = $client->messages->create($messagetoplsp,[$messagefrom],$autoreplytext,["url" => $plivowhdelrcpt]);
675
-			          $messageidinit = $response->getmessageUuid(0);
676
-		                  $messageid = $messageidinit[0];
677
-
678
-		                  if (property_exists($response, 'error')) { 
679
-		                      $messagestatus = "Error: " . $response->error;
680
-		                  } else { $messagestatus = 'The message has been accepted for delivery.'; }
681
-
682
-                                  $messagefrompl = $messageto;
683
-			          $messagetopl = $messagefrom;
684
-			          $messagenetwork = '';
685
-			          $messageprice = '';
686
-
687
-			          $messagedelivery = '';
688
-
689
-			          $sentmessagearr = [$messageid, $messagedatepl, $messagefrompl, $messagetopl, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $autoreplytext];
690
-
691
-			          $this->service->insertsentsms($ncuserforplivo, $displaynm, $sentmessagearr);
692
-                              }
693
-                          }
694
-
695
-                          if (in_array($crntDayNumber, $fulldays)) {
696
-
697
-                                  // Send the auto-reply
698
-		                  $client = new RestClient($plivoapikey, $plivoauthtoken);
699
-                                  $messagedatepl = date("Y-m-d H:i:s");
700
-		                  $response = $client->messages->create($messagetoplsp,[$messagefrom],$autoreplytext,["url" => $plivowhdelrcpt]);
701
-			          $messageidinit = $response->getmessageUuid(0);
702
-		                  $messageid = $messageidinit[0];
703
-
704
-		                  if (property_exists($response, 'error')) { 
705
-		                      $messagestatus = "Error: " . $response->error;
706
-		                  } else { $messagestatus = 'The message has been accepted for delivery.'; }
707
-
708
-                                  $messagefrompl = $messageto;
709
-			          $messagetopl = $messagefrom;
710
-			          $messagenetwork = '';
711
-			          $messageprice = '';
712
-
713
-			          $messagedelivery = '';
714
-
715
-			          $sentmessagearr = [$messageid, $messagedatepl, $messagefrompl, $messagetopl, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $autoreplytext];
716
-
717
-			          $this->service->insertsentsms($ncuserforplivo, $displaynm, $sentmessagearr);
718
-                          }
719
-
720
-                      } elseif ($plarpldata['vacation_start'] && $plarpldata['vacation_end']) {
721
-
722
-                             $vacationstart = $plarpldata['vacation_start'];
723
-                             $vacationend = $plarpldata['vacation_end'];
724
-
725
-                             $crntimeymd = date("Y-m-d H:i:s");
726
-                             $crntdatevcfmt = new DateTime($crntimeymd);
727
-                             $startdatevcfmt = new DateTime($vacationstart);
728
-                             $enddatefvcmt = new DateTime($vacationend);
729
-
730
-                             if ($startdatevcfmt <= $crntdatevcfmt && $crntdatevcfmt <= $enddatefvcmt) {
731
-
732
-		                 $client = new RestClient($plivoapikey, $plivoauthtoken);
733
-                                 $messagedatepl = date("Y-m-d H:i:s");
734
-		                 $response = $client->messages->create($messagetoplsp,[$messagefrom],$autoreplytext,["url" => $plivowhdelrcpt]);
735
-
736
-			         $messageidinit = $response->getmessageUuid(0);
737
-		                 $messageid = $messageidinit[0];
738
-
739
-		                 if (property_exists($response, 'error')) { 
740
-		                     $messagestatus = "Error: " . $response->error;
741
-		                 } else { $messagestatus = 'The message has been accepted for delivery.'; }
742
-
743
-                                 $messagefrompl = $messageto;
744
-			         $messagetopl = $messagefrom;
745
-			         $messagenetwork = '';
746
-			         $messageprice = '';
747
-
748
-			         $messagedelivery = '';
749
-
750
-			         $sentmessagearr = [$messageid, $messagedatepl, $messagefrompl, $messagetopl, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $autoreplytext];
751
-
752
-			         $this->service->insertsentsms($ncuserforplivo, $displaynm, $sentmessagearr);
753
-                             }
754
-
755
-                      }
756
-                  }
757
-
758
-
759
-	          // Send notifications
760
-                  $nameofhost = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
761
-
762
-	          $nextnotify = $smsapicred[12];
763
-	          $emailaddress = $smsapicred[13];
764
-	          $includemessageinemail = $smsapicred[14];
765
-
766
-                  if ($ismmspl == 0) { $smsormmspl = "SMS"; } else { $smsormmspl = "MMS"; }
767
-
768
-	          if ($nextnotify != 0 ) {
769
-
770
-                      $allalloweduserspl = $this->service->getallowedusers($ncuserforplivo);
771
-
772
-                      foreach ($allalloweduserspl as $alusrkeypl => $specusrnamepl) {
773
-
774
-		               $notificationpl = $this->manager->createNotification();
775
-		               $notificationpl->setApp('sms_relentless')
776
-			                      ->setUser($specusrnamepl)
777
-			                      ->setDateTime(new \DateTime())
778
-			                      ->setObject('sms_relentless', '11')
779
-			                      ->setSubject('New SMS Message');
780
-		               $this->manager->notify($notificationpl);
781
-                      }
782
-	          }
783
-
784
-	          if ($emailaddress != '') {
785
-
786
-		      $gmtind = "UTC " . date('P');
787
-		      $smsdateinit = date("Y-m-d  H:i:s");
788
-		      $smsdate = $smsdateinit . " " . $gmtind;
789
-
790
-		      $subject = "New ". $smsormmspl ." message received";
791
-
792
-                      $messagetextnlpl = str_replace("\n", "<br>", $messagetextpl);
793
-
794
-		      if ($includemessageinemail == 0) {
795
-		          $message = "Hello, <br><br> You have received a new message on ".$smsdate." .<br> You can check the new message by going to 'SMS Relentless' > 'Received SMS Messages'. <br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '".$nameofhost."' <br>";
796
-		      } else {
797
-		          $message = "Hello, <br><br> You have received a new message on ".$smsdate." :<br><br><br> Message ID: ".$messageid." <br> Message Date: ".$messagedate." <br> From: ".$messagefrom." <br> To: ".$messageto."<br> Message Text: <br><br><b>".$messagetextnlpl."</b><br><br>____________<br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '".$nameofhost."' <br>";
798
-		      }
799
-
800
-                      $messagefin = chunk_split(base64_encode($message));
801
-
802
-		      $headers = "MIME-Version: 1.0" . "\r\n";
803
-		      $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
804
-                      $headers .= "Content-Transfer-Encoding: base64" . "\r\n";
805
-
806
-		      // Set the email sender
807
-		      $headers .= "From: " . $emailaddress . "\r\n";
808
-		      $headers .= "Reply-To: " . $emailaddress . "\r\n";
809
-
810
-		      mail($emailaddress, $subject, $messagefin, $headers);
811
-	          }
812
-
813
-	          return http_response_code(200);
814
-
815
-              } else { return "access denied"; }
816
-
817
-       } else { return "access denied"; }
818
-    }
819
-
820
-
821
-    /**
822
-     * @NoAdminRequired
823
-     * @NoCSRFRequired
824
-     * @PublicPage
825
-     */
826
-    public function receivesmstwil() {
827
-
828
-       $twilsig = $_SERVER['HTTP_X_TWILIO_SIGNATURE'];
829
-
830
-       $basepath = $this->config->getSystemValue('overwrite.cli.url');
831
-       $twilrecprm = $_GET["twilrecparam"];
832
-       $twilrecurl = $basepath . "/apps/sms_relentless/api/recsmstwil?twilrecparam=" . $twilrecprm;
833
-
834
-       $ncuserfortwil = $this->service->getuserbytwilrecwhurl($twilrecurl);
835
-
836
-       $smsapicred = $this->service->getapicredentials($ncuserfortwil);
837
-       $apikeyTw = $smsapicred[15];
838
-       $authTokenTw = $smsapicred[16];
839
-       $apidelrecurltw = $smsapicred[18];
840
-
841
-       $postVars = $_POST;
842
-       ksort($postVars);
843
-
844
-       $compurlpart = '';
845
-
846
-       foreach ($postVars as $twilkey => $twilvalue) {
847
-                $compurlpart .= $twilkey . $twilvalue;
848
-       }
849
-
850
-       $compURL1 = $basepath . "/apps/sms_relentless/api/recsmstwil?twilrecparam=" . $twilrecprm . $compurlpart;
851
-       $compURL2 = $basepath . "/apps/sms_relentless/api/recsmstwil?twilrecparam=" . $twilrecprm . "&twilrecparam=" . $twilrecprm . $compurlpart;
852
-       $computedsig1 = base64_encode(hash_hmac('sha1', $compURL1, $authTokenTw, true));
853
-       $computedsig2 = base64_encode(hash_hmac('sha1', $compURL2, $authTokenTw, true));
854
-
855
-       // Verify message signature
856
-       if (strcmp($computedsig1, $twilsig) == 0 || strcmp($computedsig2, $twilsig) == 0) {
857
-
858
-           if ($ncuserfortwil) {
859
-
860
-	       $messageid = $_POST['MessageSid'];
861
-
862
-	       $messagedate = date("Y-m-d H:i:s");
863
-
864
-	       $messagefrom = $_POST['From'];
865
-
866
-	       $messageto = "Twilio: " . $_POST['To'];
867
-
868
-	       $messagetoprtw = $_POST['To'];
869
-
870
-	       $messagetotwls = "Tw: " . $_POST['To'];
871
-
872
-               // Check if the new message is a MMS
873
-               if ($_POST['NumMedia'] != 0) {
874
-
875
-                   $includedFilestw = '';
876
-                   foreach ($_POST as $twkey => $twvalue) {
877
-
878
-			if (strpos($twkey, "MediaUrl") !== false) {
879
-
880
-                            $includedFilestw .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $twvalue . "</div><br><br>";
881
-			}
882
-                   }
883
-                   $messagetexttw = $_POST['Body'] . "<br><br><br></b>--- The files included in the MMS follow. Download them only if you trust the sender and the domains of the URLs ---<br><br><br>" . $includedFilestw;
884
-                   $ismmstw = 1;
885
-
886
-               } else {
887
-                   $messagetexttw = $_POST['Body'];
888
-                   $ismmstw = 0;
889
-               }
890
-
891
-	       $recmessagearr = [$messageid, $messagedate, $messagefrom, $messageto, $messagetexttw];
892
-
893
-	       $this->service->insertrecsms($ncuserfortwil, $recmessagearr);
894
-
895
-
896
-               // Check if there is any auto-reply configured for the receiving number
897
-	       $twilgetarpl = $this->connection->prepare('SELECT `phone_number`, `days_of_week`, `daily_start`, `daily_end`, `vacation_start`, `vacation_end`, `message_text` FROM 
898
-                                                         `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
899
-	       $twilgetarplres = $twilgetarpl->execute([$messagetotwls]);
900
-	       $twilarpldata = $twilgetarplres->fetch();
901
-	       $twilgetarplres->closeCursor();
902
-
903
-               if ($twilarpldata) {
904
-
905
-                   $autoreplytext = $twilarpldata['message_text'];
906
-
907
-                   // Get the Display Name of the current user
908
-                   $crtuser = $this->userManager->get($ncuserfortwil);
909
-                   $displaynm = $crtuser->getDisplayName();
910
-
911
-                   // Check if the auto-reply is in 'daily mode'
912
-                   if ($twilarpldata['days_of_week']) {
913
-
914
-                       // Check if the auto-reply should be sent 
915
-                       $daysofweekarrinit = explode(",", $twilarpldata['days_of_week']);
916
-
917
-                       $daysofweekarr = [];
918
-                       $fulldays = [];
919
-                       foreach ($daysofweekarrinit as $crtday) {
920
-                           if (strpos($crtday, "full") !== false) {
921
-                               $fulldays[] = str_replace("(full)", "", $crtday);
922
-                           } else {
923
-                               $daysofweekarr[] = $crtday;
924
-                           }
925
-                       }
926
-
927
-                       $dailystart = $twilarpldata['daily_start'];
928
-                       $dailyend = $twilarpldata['daily_end'];
929
-
930
-                       $crntdate = date("Y-m-d");
931
-                       $crntDayNumber = date('N', strtotime($crntdate));
932
-
933
-                       if (in_array($crntDayNumber, $daysofweekarr)) {
934
-
935
-                           $crntimehrmin = date("H:i");
936
-                           $crntdatefmt = new DateTime($crntimehrmin);
937
-                           $startdatefmt = new DateTime($dailystart);
938
-                           $enddatefmt = new DateTime($dailyend);
939
-
940
-                           if ($crntdatefmt >= $startdatefmt && $enddatefmt > $crntdatefmt) {
941
-                               // OK
942
-                           } else {
943
-
944
-			       $datatoposttw = [["To" => $messagefrom, "From" => $messagetoprtw, "Body" => $autoreplytext, "StatusCallback" => $apidelrecurltw]];
945
-
946
-			       $postedsendingfl = implode('&', array_map('http_build_query', $datatoposttw));
947
-			       $messagedatetw = date("Y-m-d H:i:s");
948
-
949
-			       $chtw = curl_init();
950
-			       curl_setopt($chtw, CURLOPT_URL, 'https://api.twilio.com/2010-04-01/Accounts/' . $apikeyTw . '/Messages.json');
951
-			       curl_setopt($chtw, CURLOPT_TIMEOUT, 300);
952
-			       curl_setopt($chtw, CURLOPT_RETURNTRANSFER, 1);
953
-			       curl_setopt($chtw, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
954
-			       curl_setopt($chtw, CURLOPT_USERPWD, "$apikeyTw:$authTokenTw");
955
-			       curl_setopt($chtw, CURLOPT_POST, 1);
956
-			       curl_setopt($chtw, CURLOPT_POSTFIELDS, $postedsendingfl);
957
-
958
-			       $resulttw = curl_exec ($chtw);
959
-			       $statusCodetw = curl_getinfo($chtw, CURLINFO_HTTP_CODE);
960
-			       curl_close ($chtw);
961
-
962
-			       $decresulttw = json_decode($resulttw);
963
-
964
-			       if ($resulttw) {
965
-				   $messageidtw = $decresulttw->sid;
966
-			       } else { $messageidtw = ''; }
967
-
968
-			       if (in_array($statusCodetw, [200, 201, 202, 203, 204, 205, 206])) {
969
-				   $messagestatustw = 'The message has been accepted for delivery.';
970
-			       } else {
971
-				   $messagestatustw = 'An error occurred while trying to send the message.';
972
-			       }
973
-
974
-			       $messagenetworktw = '';
975
-			       $messagepricetw = '';
976
-			       $messagedeliverytw = '';
977
-
978
-			       $sentmessagearr = [$messageidtw, $messagedatetw, $messageto, $messagefrom, $messagenetworktw, $messagepricetw, $messagestatustw, $messagedeliverytw, $autoreplytext];
979
-
980
-			       $this->service->insertsentsms($ncuserfortwil, $displaynm, $sentmessagearr);
981
-                           }
982
-                       }
983
-
984
-                       if (in_array($crntDayNumber, $fulldays)) {
985
-
986
-			       $datatoposttw = [["To" => $messagefrom, "From" => $messagetoprtw, "Body" => $autoreplytext, "StatusCallback" => $apidelrecurltw]];
987
-
988
-			       $postedsendingfl = implode('&', array_map('http_build_query', $datatoposttw));
989
-			       $messagedatetw = date("Y-m-d H:i:s");
990
-
991
-			       $chtw = curl_init();
992
-			       curl_setopt($chtw, CURLOPT_URL, 'https://api.twilio.com/2010-04-01/Accounts/' . $apikeyTw . '/Messages.json');
993
-			       curl_setopt($chtw, CURLOPT_TIMEOUT, 300);
994
-			       curl_setopt($chtw, CURLOPT_RETURNTRANSFER, 1);
995
-			       curl_setopt($chtw, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
996
-			       curl_setopt($chtw, CURLOPT_USERPWD, "$apikeyTw:$authTokenTw");
997
-			       curl_setopt($chtw, CURLOPT_POST, 1);
998
-			       curl_setopt($chtw, CURLOPT_POSTFIELDS, $postedsendingfl);
999
-
1000
-			       $resulttw = curl_exec ($chtw);
1001
-			       $statusCodetw = curl_getinfo($chtw, CURLINFO_HTTP_CODE);
1002
-			       curl_close ($chtw);
1003
-
1004
-			       $decresulttw = json_decode($resulttw);
1005
-
1006
-			       if ($resulttw) {
1007
-				   $messageidtw = $decresulttw->sid;
1008
-			       } else { $messageidtw = ''; }
1009
-
1010
-			       if (in_array($statusCodetw, [200, 201, 202, 203, 204, 205, 206])) {
1011
-				   $messagestatustw = 'The message has been accepted for delivery.';
1012
-			       } else {
1013
-				   $messagestatustw = 'An error occurred while trying to send the message.';
1014
-			       }
1015
-
1016
-			       $messagenetworktw = '';
1017
-			       $messagepricetw = '';
1018
-			       $messagedeliverytw = '';
1019
-
1020
-			       $sentmessagearr = [$messageidtw, $messagedatetw, $messageto, $messagefrom, $messagenetworktw, $messagepricetw, $messagestatustw, $messagedeliverytw, $autoreplytext];
1021
-
1022
-			       $this->service->insertsentsms($ncuserfortwil, $displaynm, $sentmessagearr);
1023
-                       }
1024
-
1025
-                   } elseif ($twilarpldata['vacation_start'] && $twilarpldata['vacation_end']) {
1026
-
1027
-                             $vacationstart = $twilarpldata['vacation_start'];
1028
-                             $vacationend = $twilarpldata['vacation_end'];
1029
-
1030
-                             $crntimeymd = date("Y-m-d H:i:s");
1031
-                             $crntdatevcfmt = new DateTime($crntimeymd);
1032
-                             $startdatevcfmt = new DateTime($vacationstart);
1033
-                             $enddatefvcmt = new DateTime($vacationend);
1034
-
1035
-                             if ($startdatevcfmt <= $crntdatevcfmt && $crntdatevcfmt <= $enddatefvcmt) {
1036
-
1037
-			         $datatoposttw = [["To" => $messagefrom, "From" => $messagetoprtw, "Body" => $autoreplytext, "StatusCallback" => $apidelrecurltw]];
1038
-
1039
-			         $postedsendingfl = implode('&', array_map('http_build_query', $datatoposttw));
1040
-			         $messagedatetw = date("Y-m-d H:i:s");
1041
-
1042
-			         $chtw = curl_init();
1043
-			         curl_setopt($chtw, CURLOPT_URL, 'https://api.twilio.com/2010-04-01/Accounts/' . $apikeyTw . '/Messages.json');
1044
-			         curl_setopt($chtw, CURLOPT_TIMEOUT, 300);
1045
-			         curl_setopt($chtw, CURLOPT_RETURNTRANSFER, 1);
1046
-			         curl_setopt($chtw, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
1047
-			         curl_setopt($chtw, CURLOPT_USERPWD, "$apikeyTw:$authTokenTw");
1048
-			         curl_setopt($chtw, CURLOPT_POST, 1);
1049
-			         curl_setopt($chtw, CURLOPT_POSTFIELDS, $postedsendingfl);
1050
-
1051
-			         $resulttw = curl_exec ($chtw);
1052
-			         $statusCodetw = curl_getinfo($chtw, CURLINFO_HTTP_CODE);
1053
-			         curl_close ($chtw);
1054
-
1055
-			         $decresulttw = json_decode($resulttw);
1056
-
1057
-			         if ($resulttw) {
1058
-				     $messageidtw = $decresulttw->sid;
1059
-			         } else { $messageidtw = ''; }
1060
-
1061
-			         if (in_array($statusCodetw, [200, 201, 202, 203, 204, 205, 206])) {
1062
-				     $messagestatustw = 'The message has been accepted for delivery.';
1063
-			         } else {
1064
-				     $messagestatustw = 'An error occurred while trying to send the message.';
1065
-			         }
1066
-
1067
-			         $messagenetworktw = '';
1068
-			         $messagepricetw = '';
1069
-			         $messagedeliverytw = '';
1070
-
1071
-			         $sentmessagearr = [$messageidtw, $messagedatetw, $messageto, $messagefrom, $messagenetworktw, $messagepricetw, $messagestatustw, $messagedeliverytw, $autoreplytext];
1072
-
1073
-			         $this->service->insertsentsms($ncuserfortwil, $displaynm, $sentmessagearr);
1074
-                             }
1075
-
1076
-                   }
1077
-               }
1078
-
1079
-
1080
-	       // Send notifications
1081
-               $nameofhost = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
1082
-
1083
-	       $twilnotify = $smsapicred[12];
1084
-	       $emailaddress = $smsapicred[13];
1085
-	       $includemessageinemail = $smsapicred[14];
1086
-
1087
-               if ($ismmstw == 0) { $smsormmstw = "SMS"; } else { $smsormmstw = "MMS"; }
1088
-
1089
-	       if ($twilnotify != 0 ) {
1090
-
1091
-                   $allalloweduserstw = $this->service->getallowedusers($ncuserfortwil);
1092
-
1093
-                   foreach ($allalloweduserstw as $alusrkeytw => $specusrnametw) {
1094
-
1095
-	                    $notificationtw = $this->manager->createNotification();
1096
-		            $notificationtw->setApp('sms_relentless')
1097
-			                   ->setUser($specusrnametw)
1098
-			                   ->setDateTime(new \DateTime())
1099
-			                   ->setObject('sms_relentless', '11')
1100
-			                   ->setSubject('New SMS Message');
1101
-		            $this->manager->notify($notificationtw);
1102
-                   }
1103
-	       }
1104
-
1105
-	       if ($emailaddress != '') {
1106
-
1107
-		   $gmtind = "UTC " . date('P');
1108
-		   $smsdateinit = date("Y-m-d  H:i:s");
1109
-		   $smsdate = $smsdateinit . " " . $gmtind;
1110
-
1111
-		   $subject = "New ". $smsormmstw ." message received";
1112
-
1113
-                   $messagetextnltw = str_replace("\n", "<br>", $messagetexttw);
1114
-
1115
-		   if ($includemessageinemail == 0) {
1116
-		       $message = "Hello, <br><br> You have received a new message on ".$smsdate." .<br> You can check the new message by going to 'SMS Relentless' > 'Received SMS Messages'. <br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '".$nameofhost."' <br>";
1117
-		   } else {
1118
-		       $message = "Hello, <br><br> You have received a new message on ".$smsdate." :<br><br><br> Message ID: ".$messageid." <br> Message Date: ".$messagedate." <br> From: ".$messagefrom." <br> To: ".$messageto."<br> Message Text: <br><br><b>".$messagetextnltw."</b><br><br>____________<br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '".$nameofhost."' <br>";
1119
-		   }
1120
-
1121
-                   $messagefin = chunk_split(base64_encode($message));
1122
-
1123
-		   $headers = "MIME-Version: 1.0" . "\r\n";
1124
-		   $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
1125
-                   $headers .= "Content-Transfer-Encoding: base64" . "\r\n";
1126
-
1127
-		   // Set the email sender
1128
-		   $headers .= "From: " . $emailaddress . "\r\n";
1129
-		   $headers .= "Reply-To: " . $emailaddress . "\r\n";
1130
-
1131
-		   mail($emailaddress, $subject, $messagefin, $headers);
1132
-	       }
1133
-
1134
-               exit();
1135
-
1136
-           } else { exit(); }
1137
-
1138
-       } else { exit(); }
1139
-
1140
-    }
1141
-
1142
-
1143
-    /**
1144
-     * @NoAdminRequired
1145
-     * @NoCSRFRequired
1146
-     * @PublicPage
1147
-     */
1148
-    public function receivesmsflow() {
1149
-
1150
-       $flowdrurl = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
1151
-
1152
-       $receivesms = file_get_contents('php://input');
1153
-       $recsmsarr = json_decode($receivesms, true);
1154
-
1155
-       $ncuserforflowrec = $this->service->getuserbyflowrecwhurl($flowdrurl);
1156
-
1157
-       if ($ncuserforflowrec != '' && $ncuserforflowrec != null && $ncuserforflowrec != 'undefined') {
1158
-
1159
-           $messageidfl = $recsmsarr['data']['id'];
1160
-
1161
-           $messagedatefl = date("Y-m-d H:i:s");
1162
-
1163
-           $messagefromflpre = $recsmsarr['data']['attributes']['from'];
1164
-           if (substr($messagefromflpre, 0, 1) == '+') { $messagefromfl = $messagefromflpre; } else { $messagefromfl = '+' . $messagefromflpre; }
1165
-
1166
-           $messagetofl = "Flowroute: +" . $recsmsarr['data']['attributes']['to'];
1167
-           $messagetoprsl = "+" . $recsmsarr['data']['attributes']['to'];
1168
-           $messagetoprfl = "Fl: +" . $recsmsarr['data']['attributes']['to'];
1169
-
1170
-           // Check if the message is a MMS
1171
-           if ($recsmsarr['data']['attributes']['is_mms'] == true) {
1172
-
1173
-               $includedFilesfl = '';
1174
-               for ($k = 0; $k < count($recsmsarr['included']); $k++) {
1175
-
1176
-                    $includedFilesfl .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $recsmsarr['included'][$k]['attributes']['url'] . "</div><br><br>";
1177
-               }
1178
-               $messagetextfl = $recsmsarr['data']['attributes']['body'] . "<br><br><br></b>--- The files included in the MMS follow. Download them only if you trust the sender and the domains of the URLs ---<br><br><br>" . $includedFilesfl;
1179
-               $ismmsfl = 1;
1180
-           } else {
1181
-               $messagetextfl = $recsmsarr['data']['attributes']['body'];
1182
-               $ismmsfl = 0;
1183
-           }
1184
-
1185
-           $recmessagearr = [$messageidfl, $messagedatefl, $messagefromfl, $messagetofl, $messagetextfl];
1186
-
1187
-           $this->service->insertrecsms($ncuserforflowrec, $recmessagearr);
1188
-
1189
-           $flsmsapicred = $this->service->getapicredentials($ncuserforflowrec);
1190
-	   $flownotify = $flsmsapicred[12];
1191
-	   $emailaddress = $flsmsapicred[13];
1192
-	   $includemessageinemail = $flsmsapicred[14];
1193
-           $flowapikey = $flsmsapicred[20];
1194
-           $flowapisecret = $flsmsapicred[21];
1195
-           $flowdelrecurl = $flsmsapicred[23];
1196
-
1197
-
1198
-           // Check if there is any auto-reply configured for the receiving number
1199
-	   $flgetarpl = $this->connection->prepare('SELECT `phone_number`, `days_of_week`, `daily_start`, `daily_end`, `vacation_start`, `vacation_end`, `message_text` FROM 
1200
-                                                   `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
1201
-	   $flgetarplres = $flgetarpl->execute([$messagetoprfl]);
1202
-	   $flarpldata = $flgetarplres->fetch();
1203
-	   $flgetarplres->closeCursor();
1204
-
1205
-           if ($flarpldata) {
1206
-
1207
-               $autoreplytext = $flarpldata['message_text'];
1208
-
1209
-               // Get the Display Name of the current user
1210
-               $crtuser = $this->userManager->get($ncuserforflowrec);
1211
-               $displaynm = $crtuser->getDisplayName();
1212
-
1213
-               // Check if the auto-reply is in 'daily mode'
1214
-               if ($flarpldata['days_of_week']) {
1215
-
1216
-                   // Check if the auto-reply should be sent 
1217
-                   $daysofweekarrinit = explode(",", $flarpldata['days_of_week']);
1218
-
1219
-                   $daysofweekarr = [];
1220
-                   $fulldays = [];
1221
-                   foreach ($daysofweekarrinit as $crtday) {
1222
-                       if (strpos($crtday, "full") !== false) {
1223
-                           $fulldays[] = str_replace("(full)", "", $crtday);
1224
-                       } else {
1225
-                           $daysofweekarr[] = $crtday;
1226
-                       }
1227
-                   }
1228
-
1229
-                   $dailystart = $flarpldata['daily_start'];
1230
-                   $dailyend = $flarpldata['daily_end'];
1231
-
1232
-                   $crntdate = date("Y-m-d");
1233
-                   $crntDayNumber = date('N', strtotime($crntdate));
1234
-
1235
-                   if (in_array($crntDayNumber, $daysofweekarr)) {
1236
-
1237
-                       $crntimehrmin = date("H:i");
1238
-                       $crntdatefmt = new DateTime($crntimehrmin);
1239
-                       $startdatefmt = new DateTime($dailystart);
1240
-                       $enddatefmt = new DateTime($dailyend);
1241
-
1242
-                       if ($crntdatefmt >= $startdatefmt && $enddatefmt > $crntdatefmt) {
1243
-                           // OK
1244
-                       } else {
1245
-
1246
-                           // Send the auto-reply
1247
-		           $postedparamsfl = json_encode(["to" => $messagefromfl, "from" => $messagetoprsl, "body" => $autoreplytext, "dlr_callback" => $flowdelrecurl]);
1248
-		           $messagedatefl = date("Y-m-d H:i:s");
1249
-
1250
-		           $chfl = curl_init();
1251
-		           curl_setopt($chfl, CURLOPT_URL, 'https://' . $flowapikey . ':' . $flowapisecret . '@api.flowroute.com/v2.1/messages');
1252
-		           curl_setopt($chfl, CURLOPT_HTTPHEADER, array("Content-Type: application/vnd.api+json"));
1253
-		           curl_setopt($chfl, CURLOPT_TIMEOUT, 300);
1254
-		           curl_setopt($chfl, CURLOPT_RETURNTRANSFER, 1);
1255
-		           curl_setopt($chfl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
1256
-		           curl_setopt($chfl, CURLOPT_POST, 1);
1257
-		           curl_setopt($chfl, CURLOPT_POSTFIELDS, $postedparamsfl);
1258
-		           $resultfl = curl_exec ($chfl);
1259
-		           $statusCode = curl_getinfo($chfl, CURLINFO_HTTP_CODE);
1260
-		           curl_close ($chfl);
1261
-
1262
-		           $decresultfl = json_decode($resultfl);
1263
-
1264
-		           if ($resultfl) {
1265
-		               $messageidfl = $decresultfl->data->id;
1266
-		           } else { $messageidfl = ''; }
1267
-
1268
-		           if (in_array($statusCode, [200, 201, 202, 203, 204, 205, 206])) {
1269
-		               $messagestatusfl = 'The message has been accepted for delivery.'; 
1270
-		           } else { 
1271
-		               $messagestatusfl = 'An error occurred while trying to send the message.'; 
1272
-		           }
1273
-
1274
-		           $messagefromflow = "Flowroute: " . $messagetoprsl;
1275
-                           $messagetoflow = $messagefromfl;
1276
-		           $messagenetworkfl = '';
1277
-		           $messagepricefl = '';
1278
-		           $messagedeliveryfl = '';
1279
-
1280
-		           $sentmessagearr = [$messageidfl, $messagedatefl, $messagefromflow, $messagetoflow, $messagenetworkfl, $messagepricefl, $messagestatusfl, $messagedeliveryfl, $autoreplytext];
1281
-
1282
-		           $this->service->insertsentsms($ncuserforflowrec, $displaynm, $sentmessagearr);
1283
-                       }
1284
-                   }
1285
-
1286
-                   if (in_array($crntDayNumber, $fulldays)) {
1287
-
1288
-                           // Send the auto-reply
1289
-		           $postedparamsfl = json_encode(["to" => $messagefromfl, "from" => $messagetoprsl, "body" => $autoreplytext, "dlr_callback" => $flowdelrecurl]);
1290
-		           $messagedatefl = date("Y-m-d H:i:s");
1291
-
1292
-		           $chfl = curl_init();
1293
-		           curl_setopt($chfl, CURLOPT_URL, 'https://' . $flowapikey . ':' . $flowapisecret . '@api.flowroute.com/v2.1/messages');
1294
-		           curl_setopt($chfl, CURLOPT_HTTPHEADER, array("Content-Type: application/vnd.api+json"));
1295
-		           curl_setopt($chfl, CURLOPT_TIMEOUT, 300);
1296
-		           curl_setopt($chfl, CURLOPT_RETURNTRANSFER, 1);
1297
-		           curl_setopt($chfl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
1298
-		           curl_setopt($chfl, CURLOPT_POST, 1);
1299
-		           curl_setopt($chfl, CURLOPT_POSTFIELDS, $postedparamsfl);
1300
-		           $resultfl = curl_exec ($chfl);
1301
-		           $statusCode = curl_getinfo($chfl, CURLINFO_HTTP_CODE);
1302
-		           curl_close ($chfl);
1303
-
1304
-		           $decresultfl = json_decode($resultfl);
1305
-
1306
-		           if ($resultfl) {
1307
-		               $messageidfl = $decresultfl->data->id;
1308
-		           } else { $messageidfl = ''; }
1309
-
1310
-		           if (in_array($statusCode, [200, 201, 202, 203, 204, 205, 206])) {
1311
-		               $messagestatusfl = 'The message has been accepted for delivery.'; 
1312
-		           } else { 
1313
-		               $messagestatusfl = 'An error occurred while trying to send the message.'; 
1314
-		           }
1315
-
1316
-		           $messagefromflow = "Flowroute: " . $messagetoprsl;
1317
-                           $messagetoflow = $messagefromfl;
1318
-		           $messagenetworkfl = '';
1319
-		           $messagepricefl = '';
1320
-		           $messagedeliveryfl = '';
1321
-
1322
-		           $sentmessagearr = [$messageidfl, $messagedatefl, $messagefromflow, $messagetoflow, $messagenetworkfl, $messagepricefl, $messagestatusfl, $messagedeliveryfl, $autoreplytext];
1323
-
1324
-		           $this->service->insertsentsms($ncuserforflowrec, $displaynm, $sentmessagearr);
1325
-                   }
1326
-
1327
-               } elseif ($flarpldata['vacation_start'] && $flarpldata['vacation_end']) {
1328
-
1329
-                         $vacationstart = $flarpldata['vacation_start'];
1330
-                         $vacationend = $flarpldata['vacation_end'];
1331
-
1332
-                         $crntimeymd = date("Y-m-d H:i:s");
1333
-                         $crntdatevcfmt = new DateTime($crntimeymd);
1334
-                         $startdatevcfmt = new DateTime($vacationstart);
1335
-                         $enddatefvcmt = new DateTime($vacationend);
1336
-
1337
-                         if ($startdatevcfmt <= $crntdatevcfmt && $crntdatevcfmt <= $enddatefvcmt) {
1338
-
1339
-		             $postedparamsfl = json_encode(["to" => $messagefromfl, "from" => $messagetoprsl, "body" => $autoreplytext, "dlr_callback" => $flowdelrecurl]);
1340
-		             $messagedatefl = date("Y-m-d H:i:s");
1341
-
1342
-		             $chfl = curl_init();
1343
-		             curl_setopt($chfl, CURLOPT_URL, 'https://' . $flowapikey . ':' . $flowapisecret . '@api.flowroute.com/v2.1/messages');
1344
-		             curl_setopt($chfl, CURLOPT_HTTPHEADER, array("Content-Type: application/vnd.api+json"));
1345
-		             curl_setopt($chfl, CURLOPT_TIMEOUT, 300);
1346
-		             curl_setopt($chfl, CURLOPT_RETURNTRANSFER, 1);
1347
-		             curl_setopt($chfl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
1348
-		             curl_setopt($chfl, CURLOPT_POST, 1);
1349
-		             curl_setopt($chfl, CURLOPT_POSTFIELDS, $postedparamsfl);
1350
-		             $resultfl = curl_exec ($chfl);
1351
-		             $statusCode = curl_getinfo($chfl, CURLINFO_HTTP_CODE);
1352
-		             curl_close ($chfl);
1353
-
1354
-		             $decresultfl = json_decode($resultfl);
1355
-
1356
-		             if ($resultfl) {
1357
-		                 $messageidfl = $decresultfl->data->id;
1358
-		             } else { $messageidfl = ''; }
1359
-
1360
-		             if (in_array($statusCode, [200, 201, 202, 203, 204, 205, 206])) {
1361
-		                 $messagestatusfl = 'The message has been accepted for delivery.'; 
1362
-		             } else { 
1363
-		                 $messagestatusfl = 'An error occurred while trying to send the message.'; 
1364
-		             }
1365
-
1366
-		             $messagefromflow = "Flowroute: " . $messagetoprsl;
1367
-                             $messagetoflow = $messagefromfl;
1368
-		             $messagenetworkfl = '';
1369
-		             $messagepricefl = '';
1370
-		             $messagedeliveryfl = '';
1371
-
1372
-		             $sentmessagearr = [$messageidfl, $messagedatefl, $messagefromflow, $messagetoflow, $messagenetworkfl, $messagepricefl, $messagestatusfl, $messagedeliveryfl, $autoreplytext];
1373
-
1374
-		             $this->service->insertsentsms($ncuserforflowrec, $displaynm, $sentmessagearr);
1375
-                         }
1376
-
1377
-               }
1378
-           }
1379
-
1380
-
1381
-	   // Send notifications
1382
-           $nameofhost = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
1383
-
1384
-           if ($ismmsfl == 0) { $smsormmsfl = "SMS"; } else { $smsormmsfl = "MMS"; }
1385
-
1386
-	   if ($flownotify != 0 ) {
1387
-
1388
-               $allallowedusersfl = $this->service->getallowedusers($ncuserforflowrec);
1389
-
1390
-               foreach ($allallowedusersfl as $alusrkeyfl => $specusrnamefl) {
1391
-
1392
-	                $notificationfl = $this->manager->createNotification();
1393
-	                $notificationfl->setApp('sms_relentless')
1394
-		                       ->setUser($specusrnamefl)
1395
-			               ->setDateTime(new \DateTime())
1396
-			               ->setObject('sms_relentless', '11')
1397
-			               ->setSubject('New SMS Message');
1398
-	                $this->manager->notify($notificationfl);
1399
-               }
1400
-	   }
1401
-
1402
-	   if ($emailaddress != '') {
1403
-
1404
-	       $gmtind = "UTC " . date('P');
1405
-	       $smsdateinit = date("Y-m-d  H:i:s");
1406
-	       $smsdate = $smsdateinit . " " . $gmtind;
1407
-
1408
-	       $subject = "New ". $smsormmsfl ." message received";
1409
-
1410
-               $messagetextnlfl = str_replace("\n", "<br>", $messagetextfl);
1411
-
1412
-	       if ($includemessageinemail == 0) {
1413
-	           $message = "Hello, <br><br> You have received a new message on ".$smsdate." .<br> You can check the new message by going to 'SMS Relentless' > 'Received SMS Messages'. <br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '".$nameofhost."' <br>";
1414
-	       } else {
1415
-	           $message = "Hello, <br><br> You have received a new message on ".$smsdate." :<br><br><br> Message ID: ".$messageidfl." <br> Message Date: ".$messagedatefl." <br> From: ".$messagefromfl." <br> To: ".$messagetofl."<br> Message Text: <br><br><b>".$messagetextnlfl."</b><br><br>____________<br><br> Yours, <br> SMS Relentless <br> An SMS application for Nextcloud <br> Host: '".$nameofhost."' <br>";
1416
-	       }
1417
-
1418
-               $messagefin = chunk_split(base64_encode($message));
1419
-
1420
-	       $headers = "MIME-Version: 1.0" . "\r\n";
1421
-	       $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
1422
-               $headers .= "Content-Transfer-Encoding: base64" . "\r\n";
1423
-
1424
-	       // Set the email sender
1425
-	       $headers .= "From: " . $emailaddress . "\r\n";
1426
-	       $headers .= "Reply-To: " . $emailaddress . "\r\n";
1427
-
1428
-	       mail($emailaddress, $subject, $messagefin, $headers);
1429
-	   }
1430
-
1431
-           return http_response_code(200);
1432
-
1433
-       } else { return "access denied"; }
1434
-
1435
-    }
1436
-}
1437 0
deleted file mode 100644
... ...
@@ -1,1220 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-namespace OCA\SMSRelentless\Controller;
27
-
28
-use OCP\IRequest;
29
-use OCP\AppFramework\Controller;
30
-use OCA\SMSRelentless\Service\SmsrelentlessService;
31
-use OCP\AppFramework\App;
32
-use OC\Http\Client\Client;
33
-use OCP\Files\SimpleFS\ISimpleFile;
34
-use OCP\Files\SimpleFS\ISimpleFolder;
35
-use OCP\IL10N;
36
-use OCP\Files\Folder;
37
-use OCP\IConfig;
38
-use OC\Files\Filesystem;
39
-use OC\Files\View;
40
-use \ReflectionClass;
41
-use \FilesystemIterator;
42
-use \DateTime;
43
-use \DateInterval;
44
-use OCP\AppFramework\Http\DataResponse;
45
-use OCP\Files\NotFoundException;
46
-use OCP\Files\NotPermittedException;
47
-use Plivo\RestClient;
48
-use OCP\Share\IManager;
49
-use OCP\Constants;
50
-use OCP\IGroupManager;
51
-use OCP\IDBConnection;
52
-use OCP\IUserManager;
53
-use OC\URLGenerator;
54
-
55
-class SmsrelentlessController extends Controller {
56
-
57
-    private $service;
58
-    private $config;
59
-    private $userId;
60
-    private $folder;
61
-    private $filesystem;
62
-    private $view;
63
-    private $shareManager;
64
-    private $groupManager;
65
-    private $connection;
66
-    private $userManager;
67
-    private $urlGenerator;
68
-
69
-    public function __construct($appName, IRequest $request, SmsrelentlessService $service, IConfig $config, $userId, Folder $folder, Filesystem $filesystem, View $view, IManager $shareManager, IGroupManager $groupManager, IDBConnection $connection, IUserManager $userManager, URLGenerator $urlGenerator) {
70
-        parent::__construct($appName, $request);
71
-        $this->service = $service;
72
-        $this->config = $config;
73
-        $this->userId = $userId;
74
-        $this->folder = $folder;
75
-        $this->filesystem = $filesystem;
76
-        $this->view = $view;
77
-	$this->shareManager = $shareManager;
78
-        $this->groupManager = $groupManager;
79
-        $this->connection = $connection;
80
-        $this->userManager = $userManager;
81
-        $this->urlGenerator = $urlGenerator;
82
-    }
83
-
84
-
85
-    /**
86
-     * @NoAdminRequired
87
-     */
88
-    public function object_to_array($obj) {
89
-        if (is_object($obj)) $obj = (array)$this->dismount($obj);
90
-        if (is_array($obj)) {
91
-           $new = array();
92
-           foreach($obj as $key => $val) {
93
-               $new[$key] = $this->object_to_array($val);
94
-           }
95
-        }
96
-        else $new = $obj;
97
-        return $new;
98
-    }
99
-
100
-
101
-    /**
102
-     * @NoAdminRequired
103
-     */
104
-    public function dismount($object) {
105
-        $reflectionClass = new ReflectionClass(get_class($object));
106
-        $array = array();
107
-        foreach ($reflectionClass->getProperties() as $property) {
108
-           $property->setAccessible(true);
109
-           $array[$property->getName()] = $property->getValue($object);
110
-           $property->setAccessible(false);
111
-        }
112
-        return $array;
113
-    }
114
-
115
-
116
-    /**
117
-     * @NoAdminRequired
118
-     */
119
-    public function getappdirectory($userId) {
120
-        $apprelpath = $this->urlGenerator->linkTo('sms_relentless', 'COPYING.txt');
121
-        $apprelpatharr = explode("/", $apprelpath);
122
-        $currentappdir = $apprelpatharr[1];
123
-        return $currentappdir;
124
-    }
125
-
126
-
127
-    /**
128
-     * @NoAdminRequired
129
-     */
130
-    public function getbalancetel($userId) {
131
-
132
-        $telsmsapicred = $this->service->getapicredentials($this->userId);
133
-
134
-        $telapikey = $telsmsapicred[0];
135
-        $ch = curl_init();
136
-        $headerstel = array("Content-Type: application/json", "Accept: application/json", "Authorization: Bearer ".$telapikey);
137
-
138
-        curl_setopt($ch, CURLOPT_URL, "https://api.telnyx.com/v2/balance");
139
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
140
-        curl_setopt($ch, CURLOPT_HTTPHEADER, $headerstel);
141
-        $responsetel = curl_exec($ch);
142
-        $recdatatel = json_decode($responsetel, TRUE);
143
-        $telbalresponse = $recdatatel['data']['balance'];
144
-        $currentbalancetel = round(floatval($telbalresponse), 3);
145
-        curl_close($ch);
146
-
147
-        return $currentbalancetel;
148
-    }
149
-
150
-
151
-    /**
152
-     * @NoAdminRequired
153
-     */
154
-    public function getbalancenex($userId) {
155
-
156
-        $smsapicred = $this->service->getapicredentials($this->userId);
157
-        $smsapikey = $smsapicred[5];
158
-        $smsapisecret = $smsapicred[6];
159
-
160
-        if ($smsapikey == '' || $smsapisecret == '') {
161
-            $currentbalancenex = "N/A";
162
-        } else {
163
-            $getmesdata = "https://".$smsapikey.":".$smsapisecret."@api.plivo.com/v1/Account/".$smsapikey."/";
164
-            $mesdata = file_get_contents($getmesdata);
165
-            $datainit = json_decode($mesdata);
166
-            $balancenex = $datainit->cash_credits;
167
-            $currentbalancenex = round(floatval($balancenex), 3);
168
-        }
169
-        return $currentbalancenex;
170
-    }
171
-
172
-
173
-    /**
174
-     * @NoAdminRequired
175
-     */
176
-    public function getbalancetwil($userId) {
177
-
178
-        $smsapicred = $this->service->getapicredentials($this->userId);
179
-        $smsapisid = $smsapicred[15];
180
-        $smsapitoken = $smsapicred[16];
181
-
182
-        if ($smsapisid == '' || $smsapitoken == '') {
183
-            $currentbalancetwil = "N/A";
184
-        } else {
185
-
186
-            $twilbalance = json_decode(file_get_contents("https://".$smsapisid.":".$smsapitoken."@api.twilio.com/2010-04-01/Accounts/".$smsapisid."/Balance.json"));
187
-            $balancetwil = $twilbalance->balance;
188
-
189
-            $currentbalancetwil = round(floatval($balancetwil), 3);
190
-        }
191
-        return $currentbalancetwil;
192
-    }
193
-
194
-
195
-    /**
196
-     * @NoAdminRequired
197
-     */
198
-    public function getbalanceflow($userId) {
199
-
200
-        $currentbalanceflow = 'n/a';
201
-        return $currentbalanceflow;
202
-    }
203
-
204
-
205
-    /**
206
-     * @NoAdminRequired
207
-     */
208
-    public function getsmsnumbers($userId) {
209
-
210
-        return $this->service->getsmsnumbers($this->userId);
211
-    }
212
-
213
-
214
-    /**
215
-     * @NoAdminRequired
216
-     */
217
-    public function refreshavailablenumbers($userId) {
218
-
219
-        return $this->service->refreshavailablenumbers($this->userId);
220
-    }
221
-
222
-
223
-    /**
224
-     * @NoAdminRequired
225
-     */
226
-    public function cleantempdir($userId) {
227
-
228
-        // Create the temporary folder if it doesn't exist
229
-        if ($this->folder->nodeExists('SMS_Relentless/temp_files') == false) {
230
-            $this->folder->newFolder('SMS_Relentless/temp_files');
231
-        }
232
-        $datadir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/';
233
-        $targetdir = $datadir . $this->userId . "/files/SMS_Relentless/temp_files";
234
-        $fileSystemIterator = new FilesystemIterator($targetdir);
235
-
236
-        $dirfiles = [];
237
-        foreach ($fileSystemIterator as $fileInfo) {
238
-                 $dirfiles[] = $fileInfo->getFilename();
239
-        }
240
-
241
-        foreach ($dirfiles as $key => $indfile) {
242
-                 $thisuserroot = $this->view->getRoot();
243
-                 $tempfile = $thisuserroot . "/SMS_Relentless/temp_files/" . $indfile;
244
-                 $removetmpfile = $this->filesystem->unlink($tempfile);
245
-        }
246
-     }
247
-
248
-
249
-    /**
250
-     * @NoAdminRequired
251
-     */
252
-    public function cleanmultrecdir($userId) {
253
-
254
-        // Create the temporary folder if it doesn't exist
255
-        if ($this->folder->nodeExists('SMS_Relentless/multiple_recipients') == false) {
256
-            $this->folder->newFolder('SMS_Relentless/multiple_recipients');
257
-        }
258
-        $datadirmrc = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/';
259
-        $targetdirmrc = $datadirmrc . $this->userId . "/files/SMS_Relentless/multiple_recipients";
260
-        $fileSystemIteratormrc = new FilesystemIterator($targetdirmrc);
261
-
262
-        $dirfilesmrc = [];
263
-        foreach ($fileSystemIteratormrc as $fileInfomrc){
264
-                 $dirfilesmrc[] = $fileInfomrc->getFilename();
265
-        }
266
-
267
-        foreach ($dirfilesmrc as $mreckey => $mrecfile) {
268
-                 $thisuserrootmrc = $this->view->getRoot();
269
-                 $mrectempfile = $thisuserrootmrc . "/SMS_Relentless/multiple_recipients/" . $mrecfile;
270
-                 $removemrectmpfile = $this->filesystem->unlink($mrectempfile);
271
-        }
272
-     }
273
-
274
-
275
-    /**
276
-     * @NoAdminRequired
277
-     */
278
-    public function uploadNumbersFile($userId, $uploadfileforsms) {
279
-
280
-        // Create the temporary folder if it doesn't exist
281
-        if ($this->folder->nodeExists('SMS_Relentless/multiple_recipients') == false) {
282
-            $this->folder->newFolder('SMS_Relentless/multiple_recipients');
283
-        }
284
-
285
-        // First delete any file that has been previously uploaded
286
-        $datadir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/';
287
-        $targetdir = $datadir . $this->userId . "/files/SMS_Relentless/multiple_recipients";
288
-        $fileSystemIterator = new FilesystemIterator($targetdir);
289
-
290
-        $dirfiles = [];
291
-        foreach ($fileSystemIterator as $fileInfo){
292
-                 $dirfiles[] = $fileInfo->getFilename();
293
-        }
294
-
295
-        foreach ($dirfiles as $key => $indfile) {
296
-                 $thisuserroot = $this->view->getRoot();
297
-                 $tempfile = $thisuserroot . "/SMS_Relentless/multiple_recipients/" . $indfile;
298
-                 $removetmpfile = $this->filesystem->unlink($tempfile);
299
-        }
300
-
301
-        // Upload the new file
302
-        $fileContent = file_get_contents($_FILES['uploadfileforsms']['tmp_name']);
303
-        $fileName = $_FILES['uploadfileforsms']['name'];
304
-
305
-        $userroot = $this->view->getRoot();
306
-        $targetfile = $userroot . "/SMS_Relentless/multiple_recipients/" . $fileName;
307
-
308
-        $target = $this->folder->newFile($targetfile);
309
-        $target->putContent($fileContent);
310
-
311
-        // Extract the phone numbers from the file
312
-        $numberarraysec = str_replace(array(";", "|", "\r\n", "\r", "\n", "\t"), ",", $fileContent);
313
-        $numberarraytert = preg_replace("/[^0-9,]/", "", $numberarraysec);
314
-        $numberarrayfourth = explode(",", $numberarraytert);
315
-        $numberarrayfifth = array_filter(array_map('trim', $numberarrayfourth));
316
-        $numberarray = array_unique($numberarrayfifth);
317
-
318
-        return $numberarray;
319
-    }
320
-
321
-
322
-    /**
323
-     * @NoAdminRequired
324
-     */
325
-    public function uploadfile($uploadfileformms) {
326
-
327
-           $fileContent = file_get_contents($_FILES['uploadfileformms']['tmp_name']);
328
-           $fileName = $_FILES['uploadfileformms']['name'];
329
-           $fileSizeinit = $_FILES['uploadfileformms']['size'];
330
-           $fileSize = $fileSizeinit / 1024;
331
-
332
-           if ($this->folder->nodeExists('SMS_Relentless/temp_files') == false) {
333
-               $this->folder->newFolder('SMS_Relentless/temp_files');
334
-           }
335
-
336
-           $userroot = $this->view->getRoot();
337
-           $targetfile = $userroot . "/SMS_Relentless/temp_files/" . $fileName;
338
-
339
-           $target = $this->folder->newFile($targetfile);
340
-           $target->putContent($fileContent);
341
-
342
-           // Get the cumulative files size of the uploaded files
343
-           $datadir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/';
344
-           $targetdir = $datadir . $this->userId . "/files/SMS_Relentless/temp_files";
345
-
346
-           $fileSystemIterator = new FilesystemIterator($targetdir);
347
-
348
-           $dirfiles = [];
349
-           foreach ($fileSystemIterator as $fileInfo){
350
-                    $dirfiles[] = $fileInfo->getFilename();
351
-           }
352
-
353
-           $totalflsizeinit = 0;
354
-           foreach ($dirfiles as $key => $indfile) {
355
-                    $fileSizeinit = $this->filesystem->filesize($userroot . "/SMS_Relentless/temp_files/" . $indfile);
356
-                    $mbSize = round($fileSizeinit / 1024, 4);
357
-                    $totalflsizeinit += $mbSize;
358
-           }
359
-
360
-           $totalflsize = round($totalflsizeinit, 4);
361
-
362
-           return $totalflsize;
363
-    }
364
-
365
-
366
-    /**
367
-     * @NoAdminRequired
368
-     */
369
-    public function pickfile($path) {
370
-
371
-           if ($this->folder->nodeExists('SMS_Relentless/temp_files') == false) {
372
-               $this->folder->newFolder('SMS_Relentless/temp_files');
373
-           }
374
-
375
-           $datadir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/';
376
-
377
-           $fltgt = $datadir . $this->userId . "/files" . $path;
378
-
379
-           $fileContent = file_get_contents($fltgt);
380
-
381
-           $pkfilesize = round(filesize($fltgt) / 1024, 4);
382
-
383
-           $patharr = explode("/", $path);
384
-
385
-           $revarr = array_reverse($patharr);
386
-
387
-           $relflpath = "/SMS_Relentless/temp_files/" . $revarr[0]; 
388
-
389
-           $target = $this->folder->newFile($relflpath);
390
-
391
-           $target->putContent($fileContent);
392
-
393
-           // Get the cumulative files size of the uploaded files
394
-           $targetdir = $datadir . $this->userId . "/files/SMS_Relentless/temp_files";
395
-
396
-           $fileSystemIterator = new FilesystemIterator($targetdir);
397
-
398
-           $dirfiles = [];
399
-           foreach ($fileSystemIterator as $fileInfo) {
400
-                    $dirfiles[] = $fileInfo->getFilename();
401
-           }
402
-
403
-           $totalflsizeinit = 0;
404
-
405
-           foreach ($dirfiles as $key => $indfile) {
406
-
407
-                    $fileSizeinit = $this->filesystem->filesize("/SMS_Relentless/temp_files/" . $indfile);
408
-                    $mbSize = round($fileSizeinit / 1024, 4);
409
-                    $totalflsizeinit += $mbSize;
410
-           }
411
-
412
-           $totalflsize = round($totalflsizeinit, 4);
413
-
414
-           $pickresult = [$totalflsize, $pkfilesize];
415
-
416
-           return $pickresult;
417
-    }
418
-
419
-
420
-    /**
421
-     * @NoAdminRequired
422
-     */
423
-    public function removeupfile($removedfilename) {
424
-
425
-           $tmpfl = "/" . $this->userId . "/files/SMS_Relentless/temp_files/" . $removedfilename;
426
-
427
-           $removefile = $this->view->unlink($tmpfl);
428
-
429
-           // Get the cumulative files size of the uploaded files
430
-           $datadir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/';
431
-           $targetdir = $datadir . $this->userId . "/files/SMS_Relentless/temp_files";
432
-           $fileSystemIterator = new FilesystemIterator($targetdir);
433
-
434
-           $dirfiles = [];
435
-           foreach ($fileSystemIterator as $fileInfo){
436
-                    $dirfiles[] = $fileInfo->getFilename();
437
-           }
438
-
439
-           $totalflsizeinit = 0;
440
-
441
-           foreach ($dirfiles as $key => $indfile) {
442
-                    $fileSizeinit = $this->filesystem->filesize("/SMS_Relentless/temp_files/" . $indfile);
443
-                    $mbSize = round($fileSizeinit / 1024, 4);
444
-                    $totalflsizeinit += $mbSize;
445
-           }
446
-
447
-           $totalflsize = round($totalflsizeinit, 4);
448
-
449
-           return $totalflsize;
450
-    }
451
-
452
-
453
-    /**
454
-     * @NoAdminRequired
455
-     */
456
-    public function sendsmstel($userId, $receiversPhoneNbs, $fromsender, $waitinterval, $sentsmstext, $ismms, $mmsfiles) {
457
-
458
-         $telsmsapicred = $this->service->getapicredentials($this->userId);
459
-         $telnyxkey = $telsmsapicred[0];
460
-         $teldelrecurl = $telsmsapicred[3];
461
-         $messagingprofid = $telsmsapicred[4];
462
-         $addDisplName = $telsmsapicred[24];
463
-
464
-         // Get the Display Name of the current user
465
-         $crtuser = $this->userManager->get($this->userId);
466
-         $displayname = $crtuser->getDisplayName();
467
-
468
-         if ($addDisplName == 1) {
469
-             $sentsmstext = $displayname . ": " . $sentsmstext;
470
-         }
471
-
472
-         \Telnyx\Telnyx::setApiKey($telnyxkey);
473
-
474
-         $microinterval = $waitinterval * 1000;
475
-
476
-         foreach ($receiversPhoneNbs as $keytel => $tonumber) {
477
-
478
-             usleep($microinterval);
479
-
480
-             $messagedate = date("Y-m-d H:i:s");
481
-
482
-             if ($ismms == 0) {
483
-
484
-                 if (preg_match('/[A-Za-z]+/', $fromsender)) {
485
-                     $message = \Telnyx\Message::Create(["from" => $fromsender, "to" => $tonumber, "text" => $sentsmstext, "webhook_url" => $teldelrecurl, "messaging_profile_id" => $messagingprofid]);
486
-                 } else {
487
-                     $message = \Telnyx\Message::Create(["from" => $fromsender, "to" => $tonumber, "text" => $sentsmstext, "webhook_url" => $teldelrecurl]);
488
-                 }
489
-
490
-                 $messagetexttel = $sentsmstext;
491
-
492
-             } else {
493
-
494
-                 $mediaURLarr = [];
495
-                 $includedMediaFiles = '';
496
-
497
-                 for ($p = 0; $p < count($mmsfiles); $p++ ) {
498
-
499
-                      $userroot = $this->view->getRoot();
500
-                      $filetoshare = $userroot . "/SMS_Relentless/temp_files/".$mmsfiles[$p]."";
501
-
502
-                      $flsharetarget = $this->folder->newFile($filetoshare);
503
-
504
-	              $share = $this->shareManager->newShare();
505
-	              $share->setNode($flsharetarget);
506
-	              $share->setPermissions(Constants::PERMISSION_READ);
507
-	              $share->setShareType(\OC\Share\Constants::SHARE_TYPE_LINK);
508
-	              $share->setSharedBy($this->userId);
509
-                      $expirydate = DateTime::createFromFormat('Y-m-d H:i:s', $messagedate);
510
-                      $expirydate->add(new \DateInterval('P1D'));
511
-                      $share->setExpirationDate($expirydate);
512
-                      $shared = $this->shareManager->createShare($share);
513
-                      $shareToken = $shared->getToken();
514
-
515
-                      $hostnm = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
516
-
517
-                      $mediaURLarr[] = $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p];
518
-
519
-                      $includedMediaFiles .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p] . "</div><br><br>";
520
-                 }
521
-
522
-                 if (preg_match('/[A-Za-z]+/', $fromsender)) {
523
-                     $message = \Telnyx\Message::Create(["from" => $fromsender, "to" => $tonumber, "text" => $sentsmstext, "webhook_url" => $teldelrecurl, "messaging_profile_id" => $messagingprofid, "subject" => "MMS", "media_urls" => $mediaURLarr]);
524
-                 } else {
525
-                     $message = \Telnyx\Message::Create(["from" => $fromsender, "to" => $tonumber, "text" => $sentsmstext, "webhook_url" => $teldelrecurl, "subject" => "MMS", "media_urls" => $mediaURLarr]);
526
-                 }
527
-
528
-                 $messagetexttel = $sentsmstext . "<br><br><br>--- File(s) included in MMS ---<br><br>" . $includedMediaFiles;
529
-             }
530
-
531
-             $messageid = $message['id'];
532
-             $messagefrom = "Telnyx: " . $fromsender;
533
-             $messageto = $tonumber;
534
-             $messagenetwork = null;
535
-             $messageprice = null;
536
-             $messagestatus = $message['to'][0]['status'];
537
-             $messagedelivery = null;
538
-
539
-             $sentmessagearr = [$messageid, $messagedate, $messagefrom, $messageto, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $messagetexttel];
540
-
541
-             $this->service->insertsentsms($this->userId, $displayname, $sentmessagearr);
542
-         }
543
-         return $displayname;
544
-    }
545
-
546
-
547
-    /**
548
-     * @NoAdminRequired
549
-     */
550
-    public function sendsmsnex($userId, $receiversPhoneNbs, $fromsender, $waitinterval, $sentsmstext, $ismms, $mmsfiles) {
551
-
552
-         $plsmsapicred = $this->service->getapicredentials($this->userId);
553
-
554
-         $smsapikey = $plsmsapicred[5];
555
-         $smsapisecret = $plsmsapicred[6];
556
-         $smsapideliveryrecurl = $plsmsapicred[8];
557
-         $addDisplName = $plsmsapicred[24];
558
-
559
-         // Get the Display Name of the current user
560
-         $crtuser = $this->userManager->get($this->userId);
561
-         $displayname = $crtuser->getDisplayName();
562
-
563
-         if ($addDisplName == 1) {
564
-             $sentsmstext = $displayname . ": " . $sentsmstext;
565
-         }
566
-
567
-         $microinterval = $waitinterval * 1000;
568
-
569
-         foreach ($receiversPhoneNbs as $keynex => $tonumber) {
570
-
571
-             usleep($microinterval);
572
-
573
-             $messagedatepl = date("Y-m-d H:i:s");
574
-
575
-             if ($ismms == 0) {
576
-
577
-                 $client = new RestClient($smsapikey, $smsapisecret);
578
-                 $response = $client->messages->create($fromsender,[$tonumber],$sentsmstext,["url" => $smsapideliveryrecurl]);
579
-                 $messagetextpl = $sentsmstext;
580
-	         $messageidinit = $response->getmessageUuid(0);
581
-                 $messageid = $messageidinit[0];
582
-
583
-                 if (property_exists($response, 'error')) { 
584
-                     $messagestatus = "Error: " . $response->error;
585
-                 } else { $messagestatus = 'The message has been accepted for delivery.'; }
586
-
587
-             } else {
588
-
589
-                 $mediaURLarr = [];
590
-                 $includedMediaFiles = '';
591
-
592
-                 for ($p = 0; $p < count($mmsfiles); $p++ ) {
593
-
594
-                      $userroot = $this->view->getRoot();
595
-                      $filetoshare = $userroot . "/SMS_Relentless/temp_files/".$mmsfiles[$p]."";
596
-
597
-                      $flsharetarget = $this->folder->newFile($filetoshare);
598
-
599
-	              $share = $this->shareManager->newShare();
600
-	              $share->setNode($flsharetarget);
601
-	              $share->setPermissions(Constants::PERMISSION_READ);
602
-	              $share->setShareType(\OC\Share\Constants::SHARE_TYPE_LINK);
603
-	              $share->setSharedBy($this->userId);
604
-                      $expirydate = DateTime::createFromFormat('Y-m-d H:i:s', $messagedatepl);
605
-                      $expirydate->add(new \DateInterval('P1D'));
606
-                      $share->setExpirationDate($expirydate);
607
-                      $shared = $this->shareManager->createShare($share);
608
-                      $shareToken = $shared->getToken();
609
-
610
-                      $hostnm = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
611
-
612
-                      $mediaURLarr[] = $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p];
613
-
614
-                      $includedMediaFiles .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p] . "</div><br><br>";
615
-                 }
616
-
617
-		 $datatosendpl = ["src" => $fromsender, "dst" => $tonumber, "text" => $sentsmstext, "url" => $smsapideliveryrecurl, "type" => "mms", "media_urls" => $mediaURLarr];
618
-		 $postedparamspl = json_encode($datatosendpl);
619
-
620
-		 $chpl = curl_init();
621
-		 curl_setopt($chpl, CURLOPT_URL, 'https://'.$smsapikey.':'.$smsapisecret.'@api.plivo.com/v1/Account/'.$smsapikey.'/Message/');
622
-		 curl_setopt($chpl, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
623
-		 curl_setopt($chpl, CURLOPT_TIMEOUT, 300);
624
-		 curl_setopt($chpl, CURLOPT_RETURNTRANSFER, 1);
625
-		 curl_setopt($chpl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
626
-		 curl_setopt($chpl, CURLOPT_POST, 1);
627
-		 curl_setopt($chpl, CURLOPT_POSTFIELDS, $postedparamspl);
628
-		 $resultpl = curl_exec ($chpl);
629
-		 $statusCodepl = curl_getinfo($chpl, CURLINFO_HTTP_CODE);
630
-		 curl_close ($chpl);
631
-
632
-		 $decresultpl = json_decode($resultpl);
633
-
634
-                 if ($decresultpl) {
635
-                     if (property_exists($decresultpl, 'message_uuid')) {
636
-                         $messageidinit = $decresultpl->message_uuid;
637
-                         $messageid = $messageidinit[0];
638
-                     } else { $messageid = 'n/a'; }
639
-                 } else { $messageid = 'n/a'; }
640
-
641
-	         if (in_array($statusCodepl, [200, 201, 202, 203, 204, 205, 206])) {
642
-
643
-                     if (property_exists($decresultpl, 'error')) {
644
-                         $messagestatus = "Error: " . $decresultpl->error;
645
-                     } else { $messagestatus = 'The message has been accepted for delivery.'; }
646
-
647
-                 } else { $messagestatus = 'An error occurred while trying to send the message.'; }
648
-
649
-                 $messagetextpl = $sentsmstext . "<br><br><br>--- File(s) included in MMS ---<br><br>" . $includedMediaFiles;
650
-             }
651
-
652
-             if (preg_match('/[A-Za-z]+/', $fromsender)) {
653
-                 $messagefrom = "Plivo: " . $fromsender;
654
-             } else { $messagefrom = "Plivo: +" . $fromsender; }
655
-
656
-             $messageto = $tonumber;
657
-             $messagenetwork = '';
658
-             $messageprice = '';
659
-
660
-             $messagedelivery = '';
661
-
662
-             $sentmessagearr = [$messageid, $messagedatepl, $messagefrom, $messageto, $messagenetwork, $messageprice, $messagestatus, $messagedelivery, $messagetextpl];
663
-
664
-             $this->service->insertsentsms($this->userId, $displayname, $sentmessagearr);
665
-         }
666
-         return $displayname;
667
-    }
668
-
669
-
670
-    /**
671
-     * @NoAdminRequired
672
-     */
673
-    public function sendsmstwil($userId, $receiversPhoneNbs, $fromsender, $waitinterval, $sentsmstext, $ismms, $mmsfiles) {
674
-
675
-         $twsmsapicred = $this->service->getapicredentials($this->userId);
676
-
677
-         $sid = $twsmsapicred[15];
678
-         $token = $twsmsapicred[16];
679
-         $smsapirecurltw = $twsmsapicred[18];
680
-         $addDisplName = $twsmsapicred[24];
681
-
682
-         // Get the Display Name of the current user
683
-         $crtuser = $this->userManager->get($this->userId);
684
-         $displayname = $crtuser->getDisplayName();
685
-
686
-         if ($addDisplName == 1) {
687
-             $sentsmstext = $displayname . ": " . $sentsmstext;
688
-         }
689
-
690
-         $microinterval = $waitinterval * 1000;
691
-
692
-         foreach ($receiversPhoneNbs as $keytwil => $tonumbertw) {
693
-
694
-             usleep($microinterval);
695
-
696
-             $messagedatetw = date("Y-m-d H:i:s");
697
-
698
-             if ($ismms == 0) {
699
-
700
-                 $datatoposttw = [["To" => $tonumbertw, "From" => $fromsender, "Body" => $sentsmstext, "StatusCallback" => $smsapirecurltw]];
701
-                 $sentsmstextfintw = $sentsmstext;
702
-
703
-             } else {
704
-
705
-                 $mediaURLs = [];
706
-                 $includedMediaFiles = '';
707
-
708
-                 for ($p = 0; $p < count($mmsfiles); $p++ ) {
709
-
710
-                      $userroot = $this->view->getRoot();
711
-                      $filetoshare = $userroot . "/SMS_Relentless/temp_files/".$mmsfiles[$p]."";
712
-
713
-                      $flsharetarget = $this->folder->newFile($filetoshare);
714
-
715
-	              $share = $this->shareManager->newShare();
716
-	              $share->setNode($flsharetarget);
717
-	              $share->setPermissions(Constants::PERMISSION_READ);
718
-	              $share->setShareType(\OC\Share\Constants::SHARE_TYPE_LINK);
719
-	              $share->setSharedBy($this->userId);
720
-                      $expirydate = DateTime::createFromFormat('Y-m-d H:i:s', $messagedatetw);
721
-                      $expirydate->add(new \DateInterval('P1D'));
722
-                      $share->setExpirationDate($expirydate);
723
-                      $shared = $this->shareManager->createShare($share);
724
-                      $shareToken = $shared->getToken();
725
-
726
-                      $hostnm = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
727
-
728
-                      $mediaURLs[] = $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p];
729
-
730
-                      $includedMediaFiles .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p] . "</div><br><br>";
731
-                 }
732
-
733
-                 $datatoposttw = [["To" => $tonumbertw, "From" => $fromsender, "Body" => $sentsmstext, "StatusCallback" => $smsapirecurltw]];
734
-
735
-                 for ($m = 0; $m < count($mediaURLs); $m++) {
736
-                      array_push($datatoposttw, ["MediaUrl" => $mediaURLs[$m]]);
737
-                 }
738
-
739
-                 $sentsmstextfintw = $sentsmstext . "<br><br><br>--- File(s) included in MMS ---<br><br>" . $includedMediaFiles;
740
-             }
741
-
742
-             $postedsendingfl = implode('&', array_map('http_build_query', $datatoposttw));
743
-
744
-	     $chtw = curl_init();
745
-	     curl_setopt($chtw, CURLOPT_URL, 'https://api.twilio.com/2010-04-01/Accounts/'.$sid.'/Messages.json');
746
-	     curl_setopt($chtw, CURLOPT_TIMEOUT, 300);
747
-	     curl_setopt($chtw, CURLOPT_RETURNTRANSFER, 1);
748
-	     curl_setopt($chtw, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
749
-             curl_setopt($chtw, CURLOPT_USERPWD, "$sid:$token");
750
-	     curl_setopt($chtw, CURLOPT_POST, 1);
751
-             curl_setopt($chtw, CURLOPT_POSTFIELDS, $postedsendingfl);
752
-
753
-	     $resulttw = curl_exec ($chtw);
754
-	     $statusCodetw = curl_getinfo($chtw, CURLINFO_HTTP_CODE);
755
-	     curl_close ($chtw);
756
-
757
-             $decresulttw = json_decode($resulttw);
758
-
759
-             if ($decresulttw) {
760
-                 if (property_exists($decresulttw, 'sid')) { $messageidtw = $decresulttw->sid; } else { $messageidtw = 'n/a'; }
761
-             } else { $messageidtw = 'n/a'; }
762
-
763
-	     if (in_array($statusCodetw, [200, 201, 202, 203, 204, 205, 206])) {
764
-                 $messagestatustw = 'The message has been accepted for delivery.';
765
-             } else {
766
-                 $messagestatustw = 'An error occurred while trying to send the message.';
767
-             }
768
-
769
-             if (preg_match('/[A-Za-z]+/', $fromsender)) {
770
-                 $messagefromtw = "Twilio: " . $fromsender;
771
-             } else { $messagefromtw = "Twilio: " . $fromsender; }
772
-
773
-             $messagenetworktw = '';
774
-             $messagepricetw = '';
775
-             $messagedeliverytw = '';
776
-
777
-             $sentmessagearr = [$messageidtw, $messagedatetw, $messagefromtw, $tonumbertw, $messagenetworktw, $messagepricetw, $messagestatustw, $messagedeliverytw, $sentsmstextfintw];
778
-
779
-             $this->service->insertsentsms($this->userId, $displayname, $sentmessagearr);
780
-         }
781
-         return $displayname;
782
-    }
783
-
784
-
785
-    /**
786
-     * @NoAdminRequired
787
-     */
788
-    public function sendsmsflow($userId, $receiversPhoneNbs, $fromsender, $waitinterval, $sentsmstext, $ismms, $mmsfiles) {
789
-
790
-         $flsmsapicred = $this->service->getapicredentials($this->userId);
791
-
792
-         $flowapikey = $flsmsapicred[20];
793
-         $flowapisecret = $flsmsapicred[21];
794
-         $flowdelrecurl = $flsmsapicred[23];
795
-         $addDisplName = $flsmsapicred[24];
796
-
797
-         // Get the Display Name of the current user
798
-         $crtuser = $this->userManager->get($this->userId);
799
-         $displayname = $crtuser->getDisplayName();
800
-
801
-         if ($addDisplName == 1) {
802
-             $sentsmstext = $displayname . ": " . $sentsmstext;
803
-         }
804
-
805
-         $sentsmstextproc = str_replace('"','\\"', $sentsmstext);
806
-
807
-         $microinterval = $waitinterval * 1000;
808
-
809
-         foreach ($receiversPhoneNbs as $keyflow => $tonumberfl) {
810
-
811
-             usleep($microinterval);
812
-
813
-             $messagedatefl = date("Y-m-d H:i:s");
814
-
815
-             if ($ismms == 0) {
816
-
817
-                 $messagetextfinfl = $sentsmstext;
818
-                 $postedparamsfl = json_encode(["to" => $tonumberfl, "from" => $fromsender, "body" => $sentsmstextproc, "dlr_callback" => $flowdelrecurl]);
819
-
820
-             } else {
821
-
822
-		 $mediaurlsarr = [];
823
-		 $includedMediaFiles = '';
824
-
825
-		 for ($p = 0; $p < count($mmsfiles); $p++ ) {
826
-
827
-		      $userroot = $this->view->getRoot();
828
-		      $filetoshare = $userroot . "/SMS_Relentless/temp_files/".$mmsfiles[$p]."";
829
-
830
-		      $flsharetarget = $this->folder->newFile($filetoshare);
831
-
832
-		      $share = $this->shareManager->newShare();
833
-		      $share->setNode($flsharetarget);
834
-		      $share->setPermissions(Constants::PERMISSION_READ);
835
-		      $share->setShareType(\OC\Share\Constants::SHARE_TYPE_LINK);
836
-		      $share->setSharedBy($this->userId);
837
-                      $expirydate = DateTime::createFromFormat('Y-m-d H:i:s', $messagedatefl);
838
-                      $expirydate->add(new \DateInterval('P1D'));
839
-                      $share->setExpirationDate($expirydate);
840
-		      $shared = $this->shareManager->createShare($share);
841
-		      $shareToken = $shared->getToken();
842
-
843
-                      $hostnm = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];
844
-
845
-		      $mediaurlsarr[] = $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p];
846
-
847
-                      $includedMediaFiles .= "<div id='mmsTblUrl-" . mt_rand(1, 10000) . "' class='mmstblUrls' title='Download this file only if you trust the sender and the domain of the URL.'>" . $hostnm . "/s/" . $shareToken . "/download/" . $mmsfiles[$p] . "</div><br><br>";
848
-		 }
849
-
850
-                 $messagetextfinfl = $sentsmstext . "<br><br><br>--- File(s) included in MMS ---<br><br>" . $includedMediaFiles;
851
-
852
-                 $postedparamsfl = json_encode(["to" => $tonumberfl, "from" => $fromsender, "body" => $sentsmstextproc, "dlr_callback" => $flowdelrecurl, "media_urls" => $mediaurlsarr]);
853
-             }
854
-
855
-	     $chfl = curl_init();
856
-	     curl_setopt($chfl, CURLOPT_URL, 'https://'.$flowapikey.':'.$flowapisecret.'@api.flowroute.com/v2.1/messages');
857
-	     curl_setopt($chfl, CURLOPT_HTTPHEADER, array("Content-Type: application/vnd.api+json"));
858
-	     curl_setopt($chfl, CURLOPT_TIMEOUT, 300);
859
-	     curl_setopt($chfl, CURLOPT_RETURNTRANSFER, 1);
860
-	     curl_setopt($chfl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
861
-	     curl_setopt($chfl, CURLOPT_POST, 1);
862
-             curl_setopt($chfl, CURLOPT_POSTFIELDS, $postedparamsfl);
863
-	     $resultfl = curl_exec ($chfl);
864
-	     $statusCode = curl_getinfo($chfl, CURLINFO_HTTP_CODE);
865
-	     curl_close ($chfl);
866
-
867
-             $decresultfl = json_decode($resultfl);
868
-
869
-             if ($decresultfl) {
870
-                 if (property_exists($decresultfl, 'data')) { 
871
-                     $messageidfl = $decresultfl->data->id;
872
-                 } else { $messageidfl = 'n/a'; }
873
-             } else { $messageidfl = 'n/a'; }
874
-
875
-	     if (in_array($statusCode, [200, 201, 202, 203, 204, 205, 206])) {
876
-                 $messagestatusfl = 'The message has been accepted for delivery.'; 
877
-             } else { 
878
-                 $messagestatusfl = 'An error occurred while trying to send the message.'; 
879
-             }
880
-
881
-             if (preg_match('/[A-Za-z]+/', $fromsender)) {
882
-                 $messagefromfl = "Flowroute: " . $fromsender;
883
-             } else { $messagefromfl = "Flowroute: " . $fromsender; }
884
-
885
-             $messagetofl = $tonumberfl;
886
-             $messagenetworkfl = '';
887
-             $messagepricefl = '';
888
-             $messagedeliveryfl = '';
889
-
890
-             $sentmessagearr = [$messageidfl, $messagedatefl, $messagefromfl, $messagetofl, $messagenetworkfl, $messagepricefl, $messagestatusfl, $messagedeliveryfl, $messagetextfinfl];
891
-
892
-             $this->service->insertsentsms($this->userId, $displayname, $sentmessagearr);
893
-         }
894
-         return $displayname;
895
-    }
896
-
897
-
898
-    /**
899
-     * @NoAdminRequired
900
-     */
901
-    public function saveoldrecrows($userId, $oldrecRows) {
902
-
903
-           // Create the folder for removed messages if it doesn't exist
904
-           if ($this->folder->nodeExists('SMS_Relentless/removed_received_messages') == false) {
905
-               $this->folder->newFolder('SMS_Relentless/removed_received_messages');
906
-           }
907
-           $savecheck = 0;
908
-
909
-           if (count($oldrecRows) > 1) {
910
-               $msfileContent = implode("", $oldrecRows);
911
-
912
-               $delrowsdate = date("Y-m-d_H-i-s");
913
-               $msfileName = "Received_Messages_Deleted_On_" . $delrowsdate . ".csv";
914
-
915
-               $userroot = $this->view->getRoot();
916
-               $targetfile = $userroot . "/SMS_Relentless/removed_received_messages/" . $msfileName;
917
-
918
-               $target = $this->folder->newFile($targetfile);
919
-               $target->putContent($msfileContent);
920
-
921
-               if ($this->filesystem->file_get_contents($targetfile) != '') {
922
-                   $savecheck = 1;
923
-               }
924
-           }
925
-
926
-           return $savecheck;
927
-    }
928
-
929
-
930
-    /**
931
-     * @NoAdminRequired
932
-     */
933
-    public function saveoldsentrows($userId, $oldsentRows) {
934
-
935
-           // Create the folder for removed messages if it doesn't exist
936
-           if ($this->folder->nodeExists('SMS_Relentless/removed_sent_messages') == false) {
937
-               $this->folder->newFolder('SMS_Relentless/removed_sent_messages');
938
-           }
939
-           $savesentcheck = 0;
940
-
941
-           if (count($oldsentRows) > 1) {
942
-               $sntfileContent = implode("", $oldsentRows);
943
-
944
-               $delsentrowsdate = date("Y-m-d_H-i-s");
945
-               $sntfileName = "Sent_Messages_Deleted_On_" . $delsentrowsdate . ".csv";
946
-
947
-               $userroot = $this->view->getRoot();
948
-               $snttargetfile = $userroot . "/SMS_Relentless/removed_sent_messages/" . $sntfileName;
949
-
950
-               $snttarget = $this->folder->newFile($snttargetfile);
951
-               $snttarget->putContent($sntfileContent);
952
-
953
-               if ($this->filesystem->file_get_contents($snttargetfile) != '') {
954
-                   $savesentcheck = 1;
955
-               }
956
-           }
957
-
958
-           return $savesentcheck;
959
-    }
960
-
961
-
962
-    /**
963
-     * @NoAdminRequired
964
-     */
965
-    public function getreceivedtable($userId) {
966
-           return $this->service->getreceivedtable($this->userId);
967
-    }
968
-
969
-    /**
970
-     * @NoAdminRequired
971
-     */
972
-    public function getreceivedtablefordel($userId) {
973
-           return $this->service->getreceivedtablefordel($this->userId);
974
-    }
975
-
976
-    /**
977
-     * @NoAdminRequired
978
-     */
979
-    public function removerecrows($userId, $recmessagedbIDs) {
980
-           return $this->service->removerecrows($this->userId, $recmessagedbIDs);
981
-    }
982
-
983
-    /**
984
-     * @NoAdminRequired
985
-     */
986
-    public function getsenttable($userId) {
987
-           return $this->service->getsenttable($this->userId);
988
-    }
989
-
990
-    /**
991
-     * @NoAdminRequired
992
-     */
993
-    public function getsenttablefordel($userId) {
994
-           return $this->service->getsenttablefordel($this->userId);
995
-    }
996
-
997
-    /**
998
-     * @NoAdminRequired
999
-     */
1000
-    public function removesentrows($userId, $sentmessagedbIDs) {
1001
-           return $this->service->removesentrows($this->userId, $sentmessagedbIDs);
1002
-    }
1003
-
1004
-    /**
1005
-     * @NoAdminRequired
1006
-     */
1007
-    public function getconversations($userId) {
1008
-           return $this->service->getconversations($this->userId);
1009
-    }
1010
-
1011
-    /**
1012
-     * @NoAdminRequired
1013
-     */
1014
-    public function archiveconv($userId, $conversationId) {
1015
-
1016
-           // Get the Display Name of the current user
1017
-           $crtusergt = $this->userManager->get($this->userId);
1018
-           $userDspNameArch = $crtusergt->getDisplayName();
1019
-
1020
-           return $this->service->archiveconv($this->userId, $userDspNameArch, $conversationId);
1021
-    }
1022
-
1023
-    /**
1024
-     * @NoAdminRequired
1025
-     */
1026
-    public function unarchiveconv($userId, $conversationId) {
1027
-
1028
-           // Get the Display Name of the current user
1029
-           $crtusergtun = $this->userManager->get($this->userId);
1030
-           $userDspNameUnarch = $crtusergtun->getDisplayName();
1031
-
1032
-           return $this->service->unarchiveconv($this->userId, $userDspNameUnarch, $conversationId);
1033
-    }
1034
-
1035
-    /**
1036
-     * @NoAdminRequired
1037
-     */
1038
-    public function saveconvdescription($userId, $convDescription, $convId) {
1039
-
1040
-           // Get the Display Name of the current user
1041
-           $crtuserdesc = $this->userManager->get($this->userId);
1042
-           $userDspNameDesc = $crtuserdesc->getDisplayName();
1043
-
1044
-           return $this->service->saveconvdescription($this->userId, $userDspNameDesc, $convDescription, $convId);
1045
-    }
1046
-
1047
-    /**
1048
-     * @NoAdminRequired
1049
-     */
1050
-    public function saveconvtag($userId, $convTag, $convId) {
1051
-
1052
-           // Get the Display Name of the current user
1053
-           $crtusertag = $this->userManager->get($this->userId);
1054
-           $userDspNameTag = $crtusertag->getDisplayName();
1055
-
1056
-           return $this->service->saveconvtag($this->userId, $userDspNameTag, $convTag, $convId);
1057
-    }
1058
-
1059
-    /**
1060
-     * @NoAdminRequired
1061
-     */
1062
-    public function saveconvflag($userId, $convFlag, $convId) {
1063
-
1064
-           // Get the Display Name of the current user
1065
-           $crtuserflag = $this->userManager->get($this->userId);
1066
-           $userDspNameFlag = $crtuserflag->getDisplayName();
1067
-
1068
-           return $this->service->saveconvflag($this->userId, $userDspNameFlag, $convFlag, $convId);
1069
-    }
1070
-
1071
-    /**
1072
-     * @NoAdminRequired
1073
-     */
1074
-    public function removeconvmsgs($userId, $conversationId) {
1075
-           return $this->service->removeconvmsgs($this->userId, $conversationId);
1076
-    }
1077
-
1078
-    /**
1079
-     * @NoAdminRequired
1080
-     */
1081
-    public function getgroupedtable($userId) {
1082
-           return $this->service->getgroupedtable($this->userId);
1083
-    }
1084
-
1085
-    /**
1086
-     * @NoAdminRequired
1087
-     */
1088
-    public function savedisplayname($userId, $authorDisplayname, $from) {
1089
-           return $this->service->savedisplayname($this->userId, $authorDisplayname, $from);
1090
-    }
1091
-
1092
-    /**
1093
-     * @NoAdminRequired
1094
-     */
1095
-    public function getmsgsperpgnewmsgarchnb($userId) {
1096
-           return $this->service->getmsgsperpgnewmsgarchnb($this->userId);
1097
-    }
1098
-
1099
-    /**
1100
-     * @NoAdminRequired
1101
-     */
1102
-    public function getnewmsgindicator($userId) {
1103
-           return $this->service->getnewmsgindicator($this->userId);
1104
-    }
1105
-
1106
-    /**
1107
-     * @NoAdminRequired
1108
-     */
1109
-    public function getdelrecsettings($userId) {
1110
-           return $this->service->getdelrecsettings($this->userId);
1111
-    }
1112
-
1113
-    public function updatenumberrestrictions($userId, $savedByDsplname, $phoneNumber, $groups, $users) {
1114
-           return $this->service->updatenumberrestrictions($this->userId, $savedByDsplname, $phoneNumber, $groups, $users);
1115
-    }
1116
-
1117
-    public function updatekeysallowedusers($userId, $groups, $users, $provider) {
1118
-           return $this->service->updatekeysallowedusers($this->userId, $groups, $users, $provider);
1119
-    }
1120
-
1121
-    public function removenumberrestrictions($userId, $phoneNumber) {
1122
-           return $this->service->removenumberrestrictions($this->userId, $phoneNumber);
1123
-    }
1124
-
1125
-    /**
1126
-     * @NoAdminRequired
1127
-     */
1128
-    public function updateautoreplies($userId, $savedByDsplname, $phoneNumber, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText) {
1129
-           return $this->service->updateautoreplies($this->userId, $savedByDsplname, $phoneNumber, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText);
1130
-    }
1131
-
1132
-    /**
1133
-     * @NoAdminRequired
1134
-     */
1135
-    public function removeautoreplies($userId, $phoneNumber) {
1136
-           return $this->service->removeautoreplies($this->userId, $phoneNumber);
1137
-    }
1138
-
1139
-    /**
1140
-     * @NoAdminRequired
1141
-     */
1142
-    public function getsettings($userId) {
1143
-           return $this->service->getsettings($this->userId);
1144
-    }
1145
-
1146
-    public function getadminsettings($userId) {
1147
-           return $this->service->getadminsettings($this->userId);
1148
-    }
1149
-
1150
-    /**
1151
-     * @NoAdminRequired
1152
-     */
1153
-    public function getautoreplyconf($userId) {
1154
-
1155
-           // Get the available phone numbers for the current user (the restricted phone numbers are excluded)
1156
-           $availphonenmbrs = $this->getsmsnumbers($this->userId);
1157
-
1158
-           // Get the display name of the current user
1159
-           $usrid = $this->userId;
1160
-           $getusrdnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
1161
-	   $getusrdnmres = $getusrdnm->execute([$usrid, 'displayname']);
1162
-	   $getusrdnmdata = $getusrdnmres->fetch();
1163
-	   $userDisplayNm = $getusrdnmdata['value'];
1164
-	   $getusrdnmres->closeCursor();
1165
-
1166
-           // Get the auto-replies for the available phone numbers
1167
-           $getautorpl = $this->connection->prepare('SELECT `saved_by_dsplname`, `phone_number`, `days_of_week`, `daily_start`, `daily_end`, `vacation_start`, `vacation_end`, 
1168
-                                                    `message_text` FROM `*PREFIX*sms_relent_autorply`');
1169
-	   $getautorplres = $getautorpl->execute();
1170
-           $autorplconf = [];
1171
-	   while ($acdatausrdnadm = $getautorplres->fetch()) {
1172
-                  $autorplconf[] = $acdatausrdnadm;
1173
-           }
1174
-	   $getautorplres->closeCursor();
1175
-
1176
-           if ($autorplconf) {
1177
-
1178
-               $autoreplyconf = [];
1179
-               foreach ($autorplconf as $arkey => $arvalue) {
1180
-                        if (in_array($arvalue['phone_number'], $availphonenmbrs)) {
1181
-                            $autoreplyconf[] = $arvalue;
1182
-                        }
1183
-               }
1184
-
1185
-           } else { $autoreplyconf = ''; }
1186
-
1187
-           $autoreplyfdb = ['userdisplayname' => $userDisplayNm, 'phonenumbers' => $availphonenmbrs, 'autoreplies' => $autoreplyconf];
1188
-
1189
-           return $autoreplyfdb;
1190
-    }
1191
-
1192
-    /**
1193
-     * @NoAdminRequired
1194
-     */
1195
-    public function getgroupedpernumber($userId, $phoneNumber) {
1196
-           return $this->service->getgroupedpernumber($this->userId, $phoneNumber);
1197
-    }
1198
-
1199
-    /**
1200
-     * @NoAdminRequired
1201
-     */
1202
-    public function getgroupedforreply($userId, $phoneNmbrFrom, $phoneNmbrTo) {
1203
-           return $this->service->getgroupedforreply($this->userId, $phoneNmbrFrom, $phoneNmbrTo);
1204
-    }
1205
-
1206
-    /**
1207
-     * @NoAdminRequired
1208
-     */
1209
-    public function updatesettings($userId, $telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr) {
1210
-           return $this->service->updatesettings($this->userId, $telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr);
1211
-    }
1212
-
1213
-    public function updateadminsettings($userId, $telapiKey, $telPubKey, $telapiUrlRec, $telapiUrl, $messagingProfileId, $nexapiKey, $nexapiSecret, $nexapiUrlRec, $nexapiUrl, $telSenderName, $nexSenderName, $twilapiKey, $twilapiSecret, $twilapiUrlRec, $twilapiUrl, $twilSenderName, $flowapiKey, $flowapiSecret, $flowapiUrlRec, $flowapiUrl, $showAllMessages) {
1214
-           return $this->service->updateadminsettings($this->userId, $telapiKey, $telPubKey, $telapiUrlRec, $telapiUrl, $messagingProfileId, $nexapiKey, $nexapiSecret, $nexapiUrlRec, $nexapiUrl, $telSenderName, $nexSenderName, $twilapiKey, $twilapiSecret, $twilapiUrlRec, $twilapiUrl, $twilSenderName, $flowapiKey, $flowapiSecret, $flowapiUrlRec, $flowapiUrl, $showAllMessages);
1215
-    }
1216
-
1217
-    public function updatepersadmnsettings($userId, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr) {
1218
-           return $this->service->updatepersadmnsettings($this->userId, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr);
1219
-    }
1220
-}
1221 0
deleted file mode 100644
... ...
@@ -1,4875 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-namespace OCA\SMSRelentless\Service;
27
-
28
-use OCP\IDBConnection;
29
-use OCP\Security\ICrypto;
30
-use OCP\AppFramework\ApiController;
31
-use OCP\AppFramework\Controller;
32
-use OCP\IRequest;
33
-use OCP\IGroupManager;
34
-use \ReflectionClass;
35
-
36
-class SmsrelentlessService {
37
-
38
-     private $connection;
39
-     private $crypto;
40
-     private $groupManager;
41
-
42
-     public function __construct(IDBConnection $connection, ICrypto $crypto, IGroupManager $groupManager) {
43
-
44
-                $this->connection = $connection;
45
-                $this->crypto = $crypto;
46
-                $this->groupManager = $groupManager;
47
-     }
48
-
49
-
50
-     /**
51
-      * @NoAdminRequired
52
-      *
53
-      */
54
-     public function insertrecsms($userId, $recmessagearr) {
55
-
56
-            $authorDisplayNm = '';
57
-            $internalSender = 0;
58
-
59
-            // Search for the associated Display Name in the previous messages sent from the same phone number, in the 'sms_relent_sent' table
60
-            $recmsgfromprc = '%' . $recmessagearr[2];
61
-            $getdspnmst = $this->connection->prepare('SELECT `from`, `author_displayname` FROM `*PREFIX*sms_relent_sent` WHERE `from` LIKE ?');
62
-            $getdspnmstres = $getdspnmst->execute([$recmsgfromprc]);
63
-
64
-            $dispnamearr = [];
65
-            while ($dspnmstfetched = $getdspnmstres->fetch()) {
66
-                   $dispnamearr[] = $dspnmstfetched['author_displayname'];
67
-            }
68
-	    $getdspnmstres->closeCursor();
69
-
70
-            if ($dispnamearr) {
71
-                $descdspnmarr = array_reverse($dispnamearr);
72
-                $authorDisplayNm = $descdspnmarr[0];
73
-                $internalSender = 1;
74
-            } else { $authorDisplayNm = ''; $internalSender = 0; }
75
-
76
-
77
-            if (!$authorDisplayNm) {
78
-
79
-                // Search for the associated Display Name in the previous messages coming from the same phone number, in the 'sms_relent_received' table
80
-                $getdspnm = $this->connection->prepare('SELECT `from`, `author_displayname` FROM `*PREFIX*sms_relent_received` WHERE `from` = ?');
81
-                $getdspnmres = $getdspnm->execute([$recmessagearr[2]]);
82
-
83
-                $dspnmearr = [];
84
-                while ($dspnmfetched = $getdspnmres->fetch()) {
85
-                       if ($dspnmfetched['author_displayname']) {
86
-                           $dspnmearr[] = $dspnmfetched['author_displayname'];
87
-                       }
88
-                }
89
-	        $getdspnmres->closeCursor();
90
-
91
-                if ($dspnmearr) {
92
-                    $descdisplaynmarr = array_reverse($dspnmearr);
93
-                    $authorDisplayNm = $descdisplaynmarr[0];
94
-                    $internalSender = 0;
95
-                } else { $authorDisplayNm = ''; $internalSender = 0; }
96
-            }
97
-
98
-            // Search for the conversation ID in the 'sms_relent_conv' table
99
-            $convExists = 0;
100
-            $archivedConv = 0;
101
-            $tophnumberarr = explode(": ", $recmessagearr[3]);
102
-            $tophnumber = $tophnumberarr[1];
103
-            $getconvid = $this->connection->prepare('SELECT `conversation_id`, `archived`, `last_msg_from`, `last_msg_to` FROM `*PREFIX*sms_relent_conv` WHERE 
104
-                                                   (`last_msg_from` = ? AND `last_msg_to` = ?) OR (`last_msg_from` = ? AND `last_msg_to` = ?)');
105
-            $getconvres = $getconvid->execute([$recmessagearr[2], $tophnumber, $tophnumber, $recmessagearr[2]]);
106
-            $convfetched = $getconvres->fetch();
107
-            $getconvres->closeCursor();
108
-
109
-            if ($convfetched) {
110
-                $conversationId = $convfetched['conversation_id'];
111
-                $convExists = 1;
112
-                $archivedConv = $convfetched['archived'];
113
-            } else {
114
-                // Create a conversation ID
115
-	        $keypassin = substr(sha1((string) mt_rand()), 0, 32);
116
-	        $keysaltin = openssl_random_pseudo_bytes(24);
117
-	        $keyLengthin = 64;
118
-	        $iterationin = 50;
119
-	        $generated_keyin = openssl_pbkdf2($keypassin, $keysaltin, $keyLengthin, $iterationin, 'sha256');
120
-	        $conversationId = bin2hex($generated_keyin);
121
-            }
122
-
123
-
124
-            // Insert the received message in the 'sms_relent_received' table
125
-            $escapedmessagepre = $recmessagearr[4];
126
-            $escapedmessage = nl2br($escapedmessagepre);
127
-
128
-            $sql = $this->connection->prepare('
129
-				INSERT INTO `*PREFIX*sms_relent_received`
130
-					(`user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`, `conversation_id`)
131
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
132
-			  ');
133
-	    $sql->execute([$userId, $recmessagearr[0], $recmessagearr[1], $recmessagearr[2], $recmessagearr[3], $escapedmessage, $authorDisplayNm, $internalSender, $conversationId]);
134
-
135
-
136
-            // Update or insert data in the 'sms_relent_conv' table
137
-            $archivedornot = 0;
138
-            $lastUnarchived = date("Y-m-d H:i:s");
139
-            $lastMsgDate = $lastUnarchived;
140
-            $lastMsgFrom = $recmessagearr[2];
141
-            $lastMsgToArr = explode(": ", $recmessagearr[3]);
142
-            $lastMsgTo = $lastMsgToArr[1];
143
-
144
-            if ($convExists == 1) {
145
-
146
-                if ($archivedConv == 1) {
147
-
148
-	            $sqlupdatecv = $this->connection->prepare('
149
-			        UPDATE `*PREFIX*sms_relent_conv`
150
-			        SET `archived` = ?, `last_unarchived` = ?, `unarchived_by` = ?, `last_msg_date` = ?, `last_msg_from` = ?, `last_msg_to` = ?, `last_message` = ?, `lastmsgdisplayname` = ?
151
-	                        WHERE `conversation_id` = ?');
152
-	            $updatecvRes = $sqlupdatecv->execute([$archivedornot, $lastUnarchived, $authorDisplayNm, $lastMsgDate, $lastMsgFrom, $lastMsgTo, $escapedmessage, $authorDisplayNm, $conversationId]);
153
-	            $updatecvRes->closeCursor();
154
-
155
-                } else {
156
-
157
-	            $sqlupdatecv = $this->connection->prepare('
158
-			        UPDATE `*PREFIX*sms_relent_conv`
159
-			        SET `archived` = ?, `last_msg_date` = ?, `last_msg_from` = ?, `last_msg_to` = ?, `last_message` = ?, `lastmsgdisplayname` = ?
160
-	                        WHERE `conversation_id` = ?');
161
-	            $updatecvRes = $sqlupdatecv->execute([$archivedornot, $lastMsgDate, $lastMsgFrom, $lastMsgTo, $escapedmessage, $authorDisplayNm, $conversationId]);
162
-	            $updatecvRes->closeCursor();
163
-                }
164
-
165
-            } else {
166
-
167
-                    $sqlinscv = $this->connection->prepare('
168
-				INSERT INTO `*PREFIX*sms_relent_conv`
169
-					(`conversation_id`, `archived`, `last_msg_date`, `last_msg_from`, `last_msg_to`, `last_message`, `lastmsgdisplayname`)
170
-				VALUES (?, ?, ?, ?, ?, ?, ?)
171
-			        ');
172
-	            $sqlinscv->execute([$conversationId, $archivedornot, $lastMsgDate, $lastMsgFrom, $lastMsgTo, $escapedmessage, $authorDisplayNm]);
173
-            }
174
-
175
-            // Save a 'new message received' indicator in the 'sms_relent_settings' table, for the (admin) user who received the message
176
-            $newMessageRcd = 1;
177
-	    $sqlupdatenm = $this->connection->prepare('
178
-			UPDATE `*PREFIX*sms_relent_settings`
179
-			SET `new_message_rcd` = ?
180
-	                WHERE `user_id` = ?');
181
-	    $updatenmRes = $sqlupdatenm->execute([$newMessageRcd, $userId]);
182
-	    $updatenmRes->closeCursor();
183
-
184
-
185
-            // Save a 'new message received' indicator in the 'sms_relent_settings' table, for the non-admin users with whom the admin receiving the message shared his API keys
186
-
187
-            // Get the groups and users that were allowed access to the API keys
188
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
189
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
190
-                                                   WHERE `user_id` = ?');
191
-            $getgrpsres = $getgrps->execute([$userId]);
192
-            $getgrpsusr = $getgrpsres->fetch();
193
-            $getgrpsres->closeCursor();
194
-
195
-            if ($getgrpsusr) {
196
-
197
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
198
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
199
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
200
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
201
-
202
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
203
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
204
-
205
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
206
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
207
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
208
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
209
-
210
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
211
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
212
-
213
-            } else {
214
-                $allwdusersunq = [];
215
-                $allwdgroupsunq = [];
216
-            }
217
-
218
-            // Get the username for each Display Name of the allowed users
219
-            $allwdusersfnl = [];
220
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
221
-
222
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
223
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
224
-		         $acdatausrname = $getacdatausrnmres->fetch();
225
-                         if ($acdatausrname) {
226
-                             $allwdusersfnl[] = $acdatausrname['uid'];
227
-                         }
228
-                         $getacdatausrnmres->closeCursor();
229
-            }
230
-
231
-            // Get the users from all the allowed groups
232
-            $allwdusersgrpmlt = [];
233
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
234
-
235
-                     // Get all the users that belong to the current group, if the current group is different from 'admin'
236
-                     if ($prgrpvalue != 'admin') {
237
-
238
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
239
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
240
-
241
-		         while ($getusrname = $getusringroupres->fetch()) {
242
-                                $allwdusersgrpmlt[] = $getusrname['uid'];
243
-                         }
244
-		         $getusringroupres->closeCursor();
245
-                     }
246
-            }
247
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
248
-            
249
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
250
-            $allusruniquest = array_unique($allusr);
251
-
252
-            foreach ($allusruniquest as $alwdk => $allwdusr) {
253
-		     $newMsgRcd = 1;
254
-		     $sqlupdatenmsc = $this->connection->prepare('
255
-				UPDATE `*PREFIX*sms_relent_settings`
256
-				SET `new_message_rcd` = ?
257
-			        WHERE `user_id` = ?');
258
-		     $updatenmResc = $sqlupdatenmsc->execute([$newMsgRcd, $allwdusr]);
259
-		     $updatenmResc->closeCursor();
260
-            }
261
-     }
262
-
263
-
264
-     /**
265
-      * @NoAdminRequired
266
-      *
267
-      */
268
-     public function insertsentsms($userId, $displayname, $sentmessagearr) {
269
-
270
-//            $msgsentfrompre = explode("+", $sentmessagearr[2]);
271
-//            $msgsentfrom = "+" . $msgsentfrompre[1];
272
-
273
-            // Search for the conversation ID in the 'sms_relent_conv' table
274
-            $convExistssc = 0;
275
-            $archivedConvsc = 0;
276
-            $fromphnumberarr = explode(": ", $sentmessagearr[2]);
277
-            $fromphnumber = $fromphnumberarr[1];
278
-            $getconvidsc = $this->connection->prepare('SELECT `conversation_id`, `archived`, `last_msg_from`, `last_msg_to` FROM `*PREFIX*sms_relent_conv` WHERE 
279
-                                                     (`last_msg_from` = ? AND `last_msg_to` = ?) OR (`last_msg_from` = ? AND `last_msg_to` = ?)');
280
-            $getconvressc = $getconvidsc->execute([$fromphnumber, $sentmessagearr[3], $sentmessagearr[3], $fromphnumber]);
281
-            $convfetchedsc = $getconvressc->fetch();
282
-            $getconvressc->closeCursor();
283
-
284
-            if ($convfetchedsc) {
285
-                $conversationIdsc = $convfetchedsc['conversation_id'];
286
-                $convExistssc = 1;
287
-                $archivedConvsc = $convfetchedsc['archived'];
288
-            } else {
289
-                // Create a conversation ID
290
-	        $keypassinsc = substr(sha1((string) mt_rand()), 0, 32);
291
-	        $keysaltinsc = openssl_random_pseudo_bytes(24);
292
-	        $keyLengthinsc = 64;
293
-	        $iterationinsc = 50;
294
-	        $generated_keyinsc = openssl_pbkdf2($keypassinsc, $keysaltinsc, $keyLengthinsc, $iterationinsc, 'sha256');
295
-	        $conversationIdsc = bin2hex($generated_keyinsc);
296
-            }
297
-
298
-            // Insert the sent message in the 'sms_relent_sent' table
299
-            $textwithnl = nl2br($sentmessagearr[8]);
300
-            $sql = $this->connection->prepare('
301
-				INSERT INTO `*PREFIX*sms_relent_sent`
302
-					(`user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`, `conversation_id`)
303
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
304
-			  ');
305
-	    $sql->execute([$userId, $sentmessagearr[0], $sentmessagearr[1], $sentmessagearr[2], $sentmessagearr[3], $sentmessagearr[4], $sentmessagearr[5], $sentmessagearr[6], 
306
-                           $sentmessagearr[7], $textwithnl, $displayname, $conversationIdsc]);
307
-
308
-
309
-            // Update or insert data in the 'sms_relent_conv' table
310
-            $archivedornotsc = 0;
311
-            $lastUnarchivedsc = date("Y-m-d H:i:s");
312
-            $lastMsgDatesc = $lastUnarchivedsc;
313
-            $lastMsgFromArrsc = explode(": ", $sentmessagearr[2]);
314
-            $lastMsgFromsc = $lastMsgFromArrsc[1];
315
-            $lastMsgTosc = $sentmessagearr[3];
316
-
317
-            if ($convExistssc == 1) {
318
-
319
-                if ($archivedConvsc == 1) {
320
-
321
-	            $sqlupdatecvsc = $this->connection->prepare('
322
-			        UPDATE `*PREFIX*sms_relent_conv`
323
-			        SET `archived` = ?, `last_unarchived` = ?, `unarchived_by` = ?, `last_msg_date` = ?, `last_msg_from` = ?, `last_msg_to` = ?, `last_message` = ?, `lastmsgdisplayname` = ?
324
-	                        WHERE `conversation_id` = ?');
325
-	            $updatecvRessc = $sqlupdatecvsc->execute([$archivedornotsc, $lastUnarchivedsc, $displayname, $lastMsgDatesc, $lastMsgFromsc, $lastMsgTosc, $textwithnl, 
326
-                                                              $displayname, $conversationIdsc]);
327
-	            $updatecvRessc->closeCursor();
328
-
329
-                } else {
330
-
331
-	            $sqlupdatecvsc = $this->connection->prepare('
332
-			        UPDATE `*PREFIX*sms_relent_conv`
333
-			        SET `archived` = ?, `last_msg_date` = ?, `last_msg_from` = ?, `last_msg_to` = ?, `last_message` = ?, `lastmsgdisplayname` = ?
334
-	                        WHERE `conversation_id` = ?');
335
-	            $updatecvRessc = $sqlupdatecvsc->execute([$archivedornotsc, $lastMsgDatesc, $lastMsgFromsc, $lastMsgTosc, $textwithnl, $displayname, $conversationIdsc]);
336
-	            $updatecvRessc->closeCursor();
337
-                }
338
-
339
-            } else {
340
-
341
-                    $sqlinscvsc = $this->connection->prepare('
342
-				INSERT INTO `*PREFIX*sms_relent_conv`
343
-					(`conversation_id`, `archived`, `last_msg_date`, `last_msg_from`, `last_msg_to`, `last_message`, `lastmsgdisplayname`)
344
-				VALUES (?, ?, ?, ?, ?, ?, ?)
345
-			        ');
346
-	            $sqlinscvsc->execute([$conversationIdsc, $archivedornotsc, $lastMsgDatesc, $lastMsgFromsc, $lastMsgTosc, $textwithnl, $displayname]);
347
-            }
348
-     }
349
-
350
-
351
-     /**
352
-      * @NoAdminRequired
353
-      *
354
-      */
355
-     public function updatedeliverystatustel($ncuserfortelnyxdel, $messageid, $network, $messageprice, $messagestatus, $deliverystatus) {
356
-
357
-	    $sqlupdateds = $this->connection->prepare('
358
-			UPDATE `*PREFIX*sms_relent_sent`
359
-			SET `price` = ?, `status` = ?, `deliveryreceipt` = ?, `network` = ?
360
-                        WHERE `message_id` = ? AND `user_id` = ? ');
361
-	    $updateRes = $sqlupdateds->execute([$messageprice, $messagestatus, $deliverystatus, $network, $messageid, $ncuserfortelnyxdel]);
362
-	    $updateRes->closeCursor();
363
-     }
364
-
365
-
366
-     /**
367
-      * @NoAdminRequired
368
-      *
369
-      */
370
-     public function updatedeliverystatusnex($ncuserforplivodel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus) {
371
-
372
-	    $sqlupdatedspl = $this->connection->prepare('
373
-			UPDATE `*PREFIX*sms_relent_sent`
374
-			SET `price` = ?, `deliveryreceipt` = ?, `status` = ?, `network` = ?
375
-                        WHERE `message_id` = ? AND `user_id` = ? ');
376
-	    $updateResdspl = $sqlupdatedspl->execute([$messageprice, $deliverystatus, $mStatus, $networkcode, $messageid, $ncuserforplivodel]);
377
-	    $updateResdspl->closeCursor();
378
-     }
379
-
380
-
381
-     /**
382
-      * @NoAdminRequired
383
-      *
384
-      */
385
-     public function updatedeliverystatustwil($ncuserfortwildel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus) {
386
-
387
-	    $sqlupdatedstw = $this->connection->prepare('
388
-			UPDATE `*PREFIX*sms_relent_sent`
389
-			SET `price` = ?, `deliveryreceipt` = ?, `status` = ?, `network` = ?
390
-                        WHERE `message_id` = ? AND `user_id` = ? ');
391
-	    $updateResdstw = $sqlupdatedstw->execute([$messageprice, $deliverystatus, $mStatus, $networkcode, $messageid, $ncuserfortwildel]);
392
-	    $updateResdstw->closeCursor();
393
-     }
394
-
395
-
396
-     /**
397
-      * @NoAdminRequired
398
-      *
399
-      */
400
-     public function updatedeliverystatusflow($ncuserforflowdel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus) {
401
-
402
-	    $sqlupdatedsfl = $this->connection->prepare('
403
-			UPDATE `*PREFIX*sms_relent_sent`
404
-			SET `price` = ?, `deliveryreceipt` = ?, `status` = ?, `network` = ?
405
-                        WHERE `message_id` = ? AND `user_id` = ? ');
406
-	    $updateResdsfl = $sqlupdatedsfl->execute([$messageprice, $deliverystatus, $mStatus, $networkcode, $messageid, $ncuserforflowdel]);
407
-	    $updateResdsfl->closeCursor();
408
-     }
409
-
410
-
411
-     /**
412
-      * @NoAdminRequired
413
-      */
414
-     public function getreceivedtable($userId) {
415
-
416
-        // Get the user's preferences from the settings
417
-        $getgamcheckrc = $this->connection->prepare('
418
-		       SELECT `user_id`, `show_all_messages`, `show_display_names`
419
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
420
-        $getgamcheckrcres = $getgamcheckrc->execute([$userId]);
421
-        $getcrgamsrcpref = $getgamcheckrcres->fetch();
422
-        $crgamsrcpref = $getcrgamsrcpref['show_all_messages'];
423
-        $crdnmsrcpref = $getcrgamsrcpref['show_display_names'];
424
-        $getgamcheckrcres->closeCursor();
425
-
426
-
427
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
428
-        if ($crgamsrcpref == 1 && $this->groupManager->isAdmin($userId)) {
429
-
430
-            // Get the groups and users that were allowed access to the API keys
431
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
432
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
433
-                                                   WHERE `user_id` = ?');
434
-            $getgrpsres = $getgrps->execute([$userId]);
435
-            $getgrpsusr = $getgrpsres->fetch();
436
-            $getgrpsres->closeCursor();
437
-
438
-            if ($getgrpsusr) {
439
-
440
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
441
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
442
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
443
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
444
-
445
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
446
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
447
-
448
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
449
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
450
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
451
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
452
-
453
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
454
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
455
-
456
-            } else {
457
-                $allwdusersunq = [];
458
-                $allwdgroupsunq = [];
459
-            }
460
-
461
-            // Get the username for each Display Name of the allowed users
462
-            $allwdusersfnl = [];
463
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
464
-
465
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
466
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
467
-		         $acdatausrname = $getacdatausrnmres->fetch();
468
-                         if ($acdatausrname) {
469
-                             $allwdusersfnl[] = $acdatausrname['uid'];
470
-                         }
471
-                         $getacdatausrnmres->closeCursor();
472
-            }
473
-
474
-            // Get the users from all the allowed groups
475
-            $allwdusersgrpmlt = [];
476
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
477
-
478
-                     // Get all the users that belong to the current group, if the current group is different from 'admin'
479
-                     if ($prgrpvalue != 'admin') {
480
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
481
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
482
-
483
-		         while ($getusrname = $getusringroupres->fetch()) {
484
-
485
-                                $allwdusersgrpmlt[] = $getusrname['uid'];
486
-                         }
487
-		         $getusringroupres->closeCursor();
488
-                     }
489
-            }
490
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
491
-            
492
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
493
-            $allusruniquest = array_unique($allusr);
494
-
495
-            if ($allusruniquest) {
496
-                array_unshift($allusruniquest, $userId);
497
-                $allusruniquerc = $allusruniquest;
498
-            } else { $allusruniquerc = [$userId]; }
499
-
500
-            $procardatarcsec = "'" . implode("','", $allusruniquerc) . "'";
501
-
502
-        }
503
-
504
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
505
-        if ($crgamsrcpref == 1 && $this->groupManager->isAdmin($userId)) {
506
-
507
-            if ($crdnmsrcpref == 1) {
508
-
509
-                $rcresult = $this->connection->executeQuery("
510
-                                   SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
511
-			           FROM `*PREFIX*sms_relent_received` 
512
-                                   WHERE `user_id` IN (" . $procardatarcsec . ")");
513
-
514
-            } else {
515
-
516
-                $rcresult = $this->connection->executeQuery("
517
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
518
-			FROM `*PREFIX*sms_relent_received` 
519
-                        WHERE `user_id` IN (" . $procardatarcsec . ")");
520
-            }
521
-
522
-        // If the user is an admin and he wants to see only his messages
523
-        } elseif ($crgamsrcpref == 0 && $this->groupManager->isAdmin($userId)) {
524
-
525
-            if ($crdnmsrcpref == 1) {
526
-	        $getrectable = $this->connection->prepare('
527
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
528
-			FROM `*PREFIX*sms_relent_received` 
529
-                        WHERE `user_id` = ?');
530
-	        $rcresult = $getrectable->execute([$userId]);
531
-            } else {
532
-	        $getrectable = $this->connection->prepare('
533
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
534
-			FROM `*PREFIX*sms_relent_received` 
535
-                        WHERE `user_id` = ?');
536
-	        $rcresult = $getrectable->execute([$userId]);
537
-            }
538
-
539
-        // If the user is not an admin 
540
-        } elseif (!$this->groupManager->isAdmin($userId)) {
541
-
542
-	    // Get the Display Name of the current user
543
-	    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
544
-	    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
545
-	    $acdatausrdnadm = $getacdatadnres->fetch();
546
-	    $cruserdname = $acdatausrdnadm['value'];
547
-	    $getacdatadnres->closeCursor();
548
-
549
-            // Get the groups to which the current user belongs
550
-            $getusrgrp = $this->connection->prepare('
551
-	          SELECT `gid`, `uid`
552
-	          FROM  `*PREFIX*group_user`
553
-                  WHERE `uid` = ?');
554
-            $getusrgrpres = $getusrgrp->execute([$userId]);
555
-
556
-            $usergrps = [];
557
-            while ($fetchedgrps = $getusrgrpres->fetch()) {
558
-                   $usergrps[] = $fetchedgrps['gid'];
559
-            }
560
-            $getusrgrpres->closeCursor();
561
-
562
-            // Get the restrictions from the 'sms_relent_restrict' table
563
-            $getrestr = $this->connection->prepare('
564
-		       SELECT `phone_number`, `groups`, `users`
565
-		       FROM  `*PREFIX*sms_relent_restrict`');
566
-            $getrestrres = $getrestr->execute();
567
-
568
-            $restrdata = [];
569
-            while ($restrfetched = $getrestrres->fetch()) {
570
-                   $restrdata[] = $restrfetched;
571
-            }
572
-            $getrestrres->closeCursor();
573
-
574
-            // Get the phone numbers that the user is allowed/not allowed to use
575
-            if ($restrdata) {
576
-
577
-                $restrPhoneNmbrs = [];
578
-                $allowedPhoneNmbrs = [];
579
-                foreach ($restrdata as $rskey => $rsvalue) {
580
-
581
-                         $chck = 0;
582
-                         $restrgrparr = explode("|", $rsvalue['groups']);
583
-                         foreach ($restrgrparr as $rkey => $rvalue) {
584
-                                  if ($rvalue) {
585
-                                      if (strpos(implode("|", $usergrps), $rvalue) !== false) { $chck++; }
586
-                                  }
587
-                         }
588
-                         if (strpos($rsvalue['users'], $cruserdname) !== false) { $chck++; }
589
-
590
-                         if ($chck == 0) {
591
-                             $restrPhoneNmbrs[] = $rsvalue['phone_number'];
592
-                         }
593
-                }
594
-
595
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
596
-
597
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
598
-			 $crphnmbr = explode(": ", $apnvalue);
599
-			 if ($crphnmbr[0] == 'Tx') {
600
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
601
-			 } elseif ($crphnmbr[0] == 'Pl') {
602
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
603
-			 } elseif ($crphnmbr[0] == 'Tw') {
604
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
605
-			 } elseif ($crphnmbr[0] == 'Fl') {
606
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
607
-			 }
608
-		}
609
-
610
-                $procalwduid = $allowedPhoneNmbrs;
611
-                $procalwduidsec = "'" . implode("','", $procalwduid) . "'";
612
-
613
-                if ($crdnmsrcpref == 1) {
614
-
615
-                    if ($procalwduidsec != "''") {
616
-
617
-                        $rcresult = $this->connection->executeQuery("
618
-			                   SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
619
-			                   FROM `*PREFIX*sms_relent_received`
620
-			                   WHERE `user_id` = '$userId' OR `to` IN (" . $procalwduidsec . ")");
621
-
622
-                    } else {
623
-
624
-	                $getrectable = $this->connection->prepare('
625
-			    SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
626
-			    FROM `*PREFIX*sms_relent_received`
627
-			    WHERE `user_id` = ?');
628
-	                $rcresult = $getrectable->execute([$userId]);
629
-                    }
630
-
631
-                } else {
632
-
633
-                    if ($procalwduidsec) {
634
-
635
-                        $rcresult = $this->connection->executeQuery("
636
-			    SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
637
-			    FROM `*PREFIX*sms_relent_received`
638
-			    WHERE `user_id` = '$userId' OR `to` IN (" . $procalwduidsec . ")");
639
-                    } else {
640
-	                $getrectable = $this->connection->prepare('
641
-			    SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
642
-			    FROM `*PREFIX*sms_relent_received`
643
-			    WHERE `user_id` = ?');
644
-	                $rcresult = $getrectable->execute([$userId]);
645
-                    }
646
-                }
647
-
648
-            } else {
649
-
650
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
651
-
652
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
653
-			 $crphnmbr = explode(": ", $apnvalue);
654
-			 if ($crphnmbr[0] == 'Tx') {
655
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
656
-			 } elseif ($crphnmbr[0] == 'Pl') {
657
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
658
-			 } elseif ($crphnmbr[0] == 'Tw') {
659
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
660
-			 } elseif ($crphnmbr[0] == 'Fl') {
661
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
662
-			 }
663
-		}
664
-
665
-                $procalwduid = $allowedPhoneNmbrs;
666
-                $procalwduidsec = "'" . implode("','", $procalwduid) . "'";
667
-
668
-                if ($crdnmsrcpref == 1) {
669
-
670
-                    if ($procalwduidsec != "''") {
671
-
672
-                        $rcresult = $this->connection->executeQuery("
673
-			                   SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
674
-			                   FROM `*PREFIX*sms_relent_received`
675
-			                   WHERE `user_id` = '$userId' OR `to` IN (" . $procalwduidsec . ")");
676
-
677
-                    } else {
678
-
679
-	                $getrectable = $this->connection->prepare('
680
-			    SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
681
-			    FROM `*PREFIX*sms_relent_received`
682
-			    WHERE `user_id` = ?');
683
-	                $rcresult = $getrectable->execute([$userId]);
684
-                    }
685
-
686
-                } else {
687
-
688
-                    if ($procalwduidsec) {
689
-
690
-                        $rcresult = $this->connection->executeQuery("
691
-			    SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
692
-			    FROM `*PREFIX*sms_relent_received`
693
-			    WHERE `user_id` = '$userId' OR `to` IN (" . $procalwduidsec . ")");
694
-                    } else {
695
-	                $getrectable = $this->connection->prepare('
696
-			    SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
697
-			    FROM `*PREFIX*sms_relent_received`
698
-			    WHERE `user_id` = ?');
699
-	                $rcresult = $getrectable->execute([$userId]);
700
-                    }
701
-                }
702
-            }
703
-        }
704
-
705
-        $recdatatable = [];
706
-        while ($rowfetched = $rcresult->fetch()) {
707
-               $recdatatable[] = $rowfetched;
708
-        }
709
-	$rcresult->closeCursor();
710
-
711
-        $recdatafromdb = $recdatatable;
712
-
713
-
714
-        if ($this->groupManager->isAdmin($userId)) {
715
-
716
-              $recdatafdb = ['datarows' => $recdatafromdb, 'showdispnm' => $crdnmsrcpref];
717
-              return $recdatafdb;
718
-
719
-        } else {
720
-
721
-            if ($restrdata) {
722
-
723
-                // Clean the 'not allowed' phone numbers from tags
724
-                $restrPhfin = [];
725
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
726
-
727
-                    $restrpharr = explode(": ", $phvalue);
728
-                    $restrPhfin[] = $restrpharr[1];
729
-                }
730
-
731
-                // Assemble the array of message rows that excludes the rows for the 'not allowed' phone numbers
732
-                foreach ($recdatafromdb as $mdkey => $mdvalue) {
733
-
734
-                    if (str_contains($mdvalue['to'], "+")) {
735
-                        $fromnmbrarr = explode("+", $mdvalue['to']);
736
-                        if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
737
-                            unset($recdatafromdb[$mdkey]);
738
-                        }
739
-                    } else {
740
-                        $tonmbrarr = explode(": ", $mdvalue['to']);
741
-                        if (count($tonmbrarr) == 2) {
742
-                            $tonmbrtbcmprd = $tonmbrarr[1];
743
-                        } else {
744
-                            $tonmbrtbcmprd = $tonmbrarr[0];
745
-                        }
746
-                        if (in_array($tonmbrtbcmprd, $restrPhfin)) {
747
-                            unset($recdatafromdb[$mdkey]);
748
-                        }
749
-                    }
750
-                }
751
-
752
-                $recdatafdbproc = array_values($recdatafromdb);
753
-
754
-                $recdataproc = ['datarows' => $recdatafdbproc, 'showdispnm' => $crdnmsrcpref];
755
-                return $recdataproc;
756
-
757
-            } else {
758
-
759
-                $recdatafdb = ['datarows' => $recdatafromdb, 'showdispnm' => $crdnmsrcpref];
760
-                return $recdatafdb;
761
-            }
762
-        }
763
-     }
764
-
765
-
766
-     /**
767
-      * @NoAdminRequired
768
-      */
769
-     public function getreceivedtablefordel($userId) {
770
-
771
-        if ($this->groupManager->isAdmin($userId)) {
772
-
773
-            $getrecfordl = $this->connection->prepare('
774
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
775
-			FROM  `*PREFIX*sms_relent_received`
776
-			WHERE `user_id` = ?');
777
-	    $resultdl = $getrecfordl->execute([$userId]);
778
-
779
-            $recdatatable = [];
780
-            while ($rowfetched = $resultdl->fetch()) {
781
-                   $recdatatable[] = $rowfetched;
782
-            }
783
-            $resultdl->closeCursor();
784
-
785
-            $recdatafromdb = $recdatatable;
786
-
787
-            return $recdatafromdb;
788
-
789
-        } else { return "not permitted"; }
790
-     }
791
-
792
-
793
-     /**
794
-      * @NoAdminRequired
795
-      */
796
-     public function removerecrows($userId, $recmessagedbIDs) {
797
-
798
-        if ($this->groupManager->isAdmin($userId)) {
799
-
800
-            foreach ($recmessagedbIDs as $key => $rowtodel) {
801
-		     $query = $this->connection->prepare('
802
-		           DELETE FROM `*PREFIX*sms_relent_received`
803
-		           WHERE `id` = ?');
804
-		     $deleteResult = $query->execute([$rowtodel]);
805
-		     $deleteResult->closeCursor();
806
-            }
807
-
808
-	    $sqlupdate = $this->connection->prepare('
809
-                      SET @resetrec = 0;
810
-		      UPDATE `*PREFIX*sms_relent_received`
811
-		      SET `id` = @resetrec := @resetrec + 1;
812
-                      ALTER TABLE `*PREFIX*sms_relent_received` auto_increment=1;');
813
-	    $updateRes = $sqlupdate->execute();
814
-	    $updateRes->closeCursor();
815
-
816
-            return "success";
817
-
818
-        } else { return "not allowed"; }
819
-     }
820
-
821
-
822
-     /**
823
-      * @NoAdminRequired
824
-      */
825
-     public function getsenttable($userId) {
826
-
827
-        // Get the user's preferences from the settings
828
-        $getgamcheck = $this->connection->prepare('
829
-		       SELECT `user_id`, `show_all_messages`, `show_display_names`
830
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
831
-        $getgamcheckres = $getgamcheck->execute([$userId]);
832
-        $getcrgamspref = $getgamcheckres->fetch();
833
-        $crgamspref = $getcrgamspref['show_all_messages'];
834
-        $crdnamespref = $getcrgamspref['show_display_names'];
835
-        $getgamcheckres->closeCursor();
836
-
837
-
838
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
839
-        if ($crgamspref == 1 && $this->groupManager->isAdmin($userId)) {
840
-
841
-            // Get the groups and users that were allowed access to the API keys
842
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
843
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
844
-                                                   WHERE `user_id` = ?');
845
-            $getgrpsres = $getgrps->execute([$userId]);
846
-            $getgrpsusr = $getgrpsres->fetch();
847
-            $getgrpsres->closeCursor();
848
-
849
-            if ($getgrpsusr) {
850
-
851
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
852
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
853
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
854
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
855
-
856
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
857
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
858
-
859
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
860
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
861
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
862
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
863
-
864
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
865
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
866
-
867
-            } else {
868
-                $allwdusersunq = [];
869
-                $allwdgroupsunq = [];
870
-            }
871
-
872
-            // Get the username for each Display Name of the allowed users
873
-            $allwdusersfnl = [];
874
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
875
-
876
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
877
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
878
-		         $acdatausrname = $getacdatausrnmres->fetch();
879
-                         if ($acdatausrname) {
880
-                             $allwdusersfnl[] = $acdatausrname['uid'];
881
-                         }
882
-                         $getacdatausrnmres->closeCursor();
883
-            }
884
-
885
-            // Get the users from all the allowed groups
886
-            $allwdusersgrpmlt = [];
887
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
888
-
889
-                     // Get all the users that belong to the current group, if the current group is different from 'admin'
890
-                     if ($prgrpvalue != 'admin') {
891
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
892
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
893
-
894
-		         while ($getusrname = $getusringroupres->fetch()) {
895
-
896
-                                $allwdusersgrpmlt[] = $getusrname['uid'];
897
-                         }
898
-		         $getusringroupres->closeCursor();
899
-                     }
900
-            }
901
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
902
-            
903
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
904
-            $allusruniquest = array_unique($allusr);
905
-
906
-            if ($allusruniquest) {
907
-                array_unshift($allusruniquest, $userId);
908
-                $allusrunique = $allusruniquest;
909
-            } else { $allusrunique = [$userId]; }
910
-
911
-            $allusruniquesec = "'" . implode("','", $allusrunique) . "'";
912
-        }
913
-
914
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
915
-        if ($crgamspref == 1 && $this->groupManager->isAdmin($userId)) {
916
-
917
-            if ($crdnamespref == 1) {
918
-
919
-                $resultsent = $this->connection->executeQuery("
920
-                       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
921
-		       FROM  `*PREFIX*sms_relent_sent` 
922
-                       WHERE `user_id` IN (" . $allusruniquesec . ")");
923
-            } else {
924
-
925
-                $resultsent = $this->connection->executeQuery("
926
-                       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`
927
-		       FROM  `*PREFIX*sms_relent_sent`
928
-                       WHERE `user_id` IN (" . $allusruniquesec . ")");
929
-            }
930
-
931
-        // If the user is an admin and he wants to see only his messages
932
-        } elseif ($crgamspref == 0 && $this->groupManager->isAdmin($userId)) {
933
-
934
-            if ($crdnamespref == 1) {
935
-                $getsenttbl = $this->connection->prepare('
936
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
937
-		       FROM  `*PREFIX*sms_relent_sent` 
938
-                       WHERE `user_id` = ?');
939
-                $resultsent = $getsenttbl->execute([$userId]);
940
-            } else {
941
-                $getsenttbl = $this->connection->prepare('
942
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`
943
-		       FROM  `*PREFIX*sms_relent_sent` 
944
-                       WHERE `user_id` = ?');
945
-                $resultsent = $getsenttbl->execute([$userId]);
946
-            }
947
-
948
-        // If the user is not an admin 
949
-        } elseif (!$this->groupManager->isAdmin($userId)) {
950
-
951
-	    // Get the Display Name of the current user
952
-	    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
953
-	    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
954
-	    $acdatausrdnadm = $getacdatadnres->fetch();
955
-	    $cruserdname = $acdatausrdnadm['value'];
956
-	    $getacdatadnres->closeCursor();
957
-
958
-            // Get the groups to which the current user belongs
959
-            $getusrgrp = $this->connection->prepare('
960
-	          SELECT `gid`, `uid`
961
-	          FROM  `*PREFIX*group_user`
962
-                  WHERE `uid` = ?');
963
-            $getusrgrpres = $getusrgrp->execute([$userId]);
964
-
965
-            $usergrps = [];
966
-            while ($fetchedgrps = $getusrgrpres->fetch()) {
967
-                   $usergrps[] = $fetchedgrps['gid'];
968
-            }
969
-            $getusrgrpres->closeCursor();
970
-
971
-            // Get the restrictions from the 'sms_relent_restrict' table
972
-            $getrestr = $this->connection->prepare('
973
-		       SELECT `phone_number`, `groups`, `users`
974
-		       FROM  `*PREFIX*sms_relent_restrict`');
975
-            $getrestrres = $getrestr->execute();
976
-
977
-            $restrdata = [];
978
-            while ($restrfetched = $getrestrres->fetch()) {
979
-                   $restrdata[] = $restrfetched;
980
-            }
981
-            $getrestrres->closeCursor();
982
-
983
-            // Get the phone numbers that the user is allowed/not allowed to use
984
-            if ($restrdata) {
985
-
986
-                $restrPhoneNmbrs = [];
987
-                $allowedPhoneNmbrs = [];
988
-                foreach ($restrdata as $rskey => $rsvalue) {
989
-
990
-                         $chck = 0;
991
-                         $restrgrparr = explode("|", $rsvalue['groups']);
992
-                         foreach ($restrgrparr as $rkey => $rvalue) {
993
-                                  if ($rvalue) {
994
-                                      if (strpos(implode("|", $usergrps), $rvalue) !== false) { $chck++; }
995
-                                  }
996
-                         }
997
-                         if (strpos($rsvalue['users'], $cruserdname) !== false) { $chck++; }
998
-
999
-                         if ($chck == 0) { 
1000
-                             $restrPhoneNmbrs[] = $rsvalue['phone_number']; 
1001
-                         }
1002
-                }
1003
-
1004
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
1005
-
1006
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
1007
-			 $crphnmbr = explode(": ", $apnvalue);
1008
-			 if ($crphnmbr[0] == 'Tx') {
1009
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
1010
-			 } elseif ($crphnmbr[0] == 'Pl') {
1011
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
1012
-			 } elseif ($crphnmbr[0] == 'Tw') {
1013
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
1014
-			 } elseif ($crphnmbr[0] == 'Fl') {
1015
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
1016
-			 }
1017
-		}
1018
-
1019
-                $procalwduid = $allowedPhoneNmbrs;
1020
-                $procalwduidsec = "'" . implode("','", $procalwduid) . "'";
1021
-
1022
-                if ($crdnamespref == 1) {
1023
-                    if ($procalwduidsec != "''") {
1024
-
1025
-                        $resultsent = $this->connection->executeQuery("
1026
-		            SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
1027
-		            FROM `*PREFIX*sms_relent_sent`
1028
-			    WHERE `user_id` = '$userId' OR `from` IN (" . $procalwduidsec . ")");
1029
-                    } else {
1030
-	                $getsenttbl = $this->connection->prepare('
1031
-		            SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
1032
-		            FROM `*PREFIX*sms_relent_sent`
1033
-			    WHERE `user_id` = ?');
1034
-	                $resultsent = $getsenttbl->execute([$userId]);
1035
-                    }
1036
-                } else {
1037
-                    if ($procalwduidsec != "''") {
1038
-
1039
-                        $resultsent = $this->connection->executeQuery("
1040
-		            SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`
1041
-		            FROM `*PREFIX*sms_relent_sent`
1042
-			    WHERE `user_id` = '$userId' OR `from` IN (" . $procalwduidsec . ")");
1043
-
1044
-                    } else {
1045
-	                $getsenttbl = $this->connection->prepare('
1046
-		            SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`
1047
-		            FROM `*PREFIX*sms_relent_sent`
1048
-			    WHERE `user_id` = ?');
1049
-	                $resultsent = $getsenttbl->execute([$userId]);
1050
-                    }
1051
-                }
1052
-
1053
-            } else {
1054
-
1055
-                if ($crdnamespref == 1) {
1056
-                    $getsenttbl = $this->connection->prepare('
1057
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
1058
-		       FROM `*PREFIX*sms_relent_sent`
1059
-		       WHERE `user_id` = ?');
1060
-                    $resultsent = $getsenttbl->execute([$userId]);
1061
-                } else {
1062
-                    $getsenttbl = $this->connection->prepare('
1063
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`
1064
-		       FROM `*PREFIX*sms_relent_sent`
1065
-		       WHERE `user_id` = ?');
1066
-                    $resultsent = $getsenttbl->execute([$userId]);
1067
-                }
1068
-            }
1069
-        }
1070
-
1071
-
1072
-        $sentdatatable = [];
1073
-        while ($rowfetched = $resultsent->fetch()){
1074
-               $sentdatatable[] = $rowfetched;
1075
-        }
1076
-        $resultsent->closeCursor();
1077
-
1078
-        $sentdatafromdb = $sentdatatable;
1079
-
1080
-
1081
-        if ($this->groupManager->isAdmin($userId)) {
1082
-
1083
-            $sentdatafdb = ['datarows' => $sentdatafromdb, 'showdispnm' => $crdnamespref];
1084
-            return $sentdatafdb;
1085
-
1086
-        } else {
1087
-
1088
-            if ($restrdata) {
1089
-
1090
-                // Clean the phone numbers from tags
1091
-                $restrPhfin = [];
1092
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
1093
-
1094
-                    $restrpharr = explode(": ", $phvalue);
1095
-                    $restrPhfin[] = $restrpharr[1];
1096
-                }
1097
-
1098
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
1099
-                foreach ($sentdatafromdb as $smdkey => $smdvalue) {
1100
-
1101
-                    if (str_contains($smdvalue['from'], "+")) {
1102
-                        $fromnmbrarr = explode("+", $smdvalue['from']);
1103
-                        if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1104
-                            unset($sentdatafromdb[$smdkey]);
1105
-                        }
1106
-                    } else {
1107
-                        $frmnmbrarr = explode(": ", $smdvalue['from']);
1108
-                        if (count($frmnmbrarr) == 2) {
1109
-                            $nmbtbcmprd = $frmnmbrarr[1];
1110
-                        } else { 
1111
-                            $nmbtbcmprd = $frmnmbrarr[0];
1112
-                        }
1113
-
1114
-                        if (in_array($nmbtbcmprd, $restrPhfin)) {
1115
-                            unset($sentdatafromdb[$smdkey]);
1116
-                        }
1117
-                    }
1118
-                }
1119
-
1120
-                $sentdatadbproc = array_values($sentdatafromdb);
1121
-
1122
-                $sentdatafdb = ['datarows' => $sentdatadbproc, 'showdispnm' => $crdnamespref];
1123
-                return $sentdatafdb;
1124
-
1125
-            } else {
1126
-
1127
-                $sentdatafdb = ['datarows' => $sentdatafromdb, 'showdispnm' => $crdnamespref];
1128
-                return $sentdatafdb;
1129
-            }
1130
-        }
1131
-     }
1132
-
1133
-
1134
-     /**
1135
-      * @NoAdminRequired
1136
-      */
1137
-     public function getsenttablefordel($userId) {
1138
-
1139
-        if ($this->groupManager->isAdmin($userId)) {
1140
-
1141
-            $getsenttbldel = $this->connection->prepare('
1142
-		          SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
1143
-		          FROM  `*PREFIX*sms_relent_sent`
1144
-		          WHERE `user_id` = ?');
1145
-            $resultsentdl = $getsenttbldel->execute([$userId]);
1146
-
1147
-            $sentdatatable = [];
1148
-            while ($rowfetched = $resultsentdl->fetch()){
1149
-                   $sentdatatable[] = $rowfetched;
1150
-            }
1151
-            $resultsentdl->closeCursor();
1152
-
1153
-            $sentdatafromdb = $sentdatatable;
1154
-
1155
-            return $sentdatafromdb;
1156
-
1157
-        } else { return "not permitted"; }
1158
-     }
1159
-
1160
-
1161
-     /**
1162
-      * @NoAdminRequired
1163
-      */
1164
-     public function removesentrows($userId, $sentmessagedbIDs) {
1165
-
1166
-        if ($this->groupManager->isAdmin($userId)) {
1167
-
1168
-            foreach ($sentmessagedbIDs as $key => $sentrowtodel) {
1169
-		     $query = $this->connection->prepare('
1170
-		           DELETE FROM `*PREFIX*sms_relent_sent`
1171
-		           WHERE `id` = ?');
1172
-		     $deleteResult = $query->execute([$sentrowtodel]);
1173
-		     $deleteResult->closeCursor();
1174
-            }
1175
-
1176
-	    $sqlupdate = $this->connection->prepare('
1177
-                      SET @resetsent = 0;
1178
-		      UPDATE `*PREFIX*sms_relent_sent`
1179
-		      SET `id` = @resetsent := @resetsent + 1;
1180
-                      ALTER TABLE `*PREFIX*sms_relent_sent` auto_increment=1;');
1181
-	    $updateRes = $sqlupdate->execute();
1182
-	    $updateRes->closeCursor();
1183
-
1184
-            return "success";
1185
-
1186
-        } else { return "not allowed"; }
1187
-     }
1188
-
1189
-
1190
-     /**
1191
-      * @NoAdminRequired
1192
-      */
1193
-     public function getconversations($userId) {
1194
-
1195
-        // Get the phone numbers that the current user has access to
1196
-        $getnumberscv = $this->connection->prepare('SELECT `user_id`, `available_numbers` FROM `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
1197
-	$getcrtusrnocv = $getnumberscv->execute([$userId]);
1198
-        $getusrnmbrscv = $getcrtusrnocv->fetch();
1199
-        $getcrtusrnocv->closeCursor();
1200
-
1201
-        if ($getusrnmbrscv['available_numbers']) {
1202
-
1203
-            $retrievednmbrArr = explode("|", $getusrnmbrscv['available_numbers']);
1204
-            $retrievednmbrpr = array_filter($retrievednmbrArr);
1205
-            $retrievednmbrsfin = [];
1206
-
1207
-            foreach ($retrievednmbrpr as $convKey => $convValue) {
1208
-                     $retrnmbrex = explode(": ", $convValue);
1209
-                     $retrievednmbrsfin[] = $retrnmbrex[1]; 
1210
-            }
1211
-            $retrievednmbrsimp = "'" . implode("','", $retrievednmbrsfin) . "'";
1212
-
1213
-            // Get the conversation data from the 'sms_relent_conv' table
1214
-            $getconvdata = $this->connection->executeQuery("SELECT `conversation_id`, `archived`, `last_archived`, `last_unarchived`, `archived_by`, `unarchived_by`, `last_msg_date`, 
1215
-                                                           `last_msg_from`, `last_msg_to`, `last_message`, `lastmsgdisplayname`, `flagged`, `flagunflagby`, `flagunflagdate`, `tag`,
1216
-                                                           `taguntagby`, `taguntagdate`, `description`, `descriptionby`, `descriptiondate` FROM `*PREFIX*sms_relent_conv` WHERE 
1217
-                                                           `last_msg_from` IN (" . $retrievednmbrsimp . ") OR `last_msg_to` IN (" . $retrievednmbrsimp . ")");
1218
-
1219
-            $convdatafdb = [];
1220
-            while ($convdatafetched = $getconvdata->fetch()) {
1221
-                   $convdatafdb[] = $convdatafetched;
1222
-            }   
1223
-            $getconvdata->closeCursor();
1224
-
1225
-        } else { $convdatafdb = []; }
1226
-
1227
-        return $convdatafdb;
1228
-     }
1229
-
1230
-
1231
-     /**
1232
-      * @NoAdminRequired
1233
-      */
1234
-     public function archiveconv($userId, $userDspNameArch, $conversationId) {
1235
-
1236
-        $archivedyn = 1;
1237
-        $dateArchived = date("Y-m-d H:i:s");
1238
-        $sqlarchive = $this->connection->prepare('
1239
-		        UPDATE `*PREFIX*sms_relent_conv`
1240
-		        SET `archived` = ?, `last_archived` = ?, `archived_by` = ?
1241
-                        WHERE `conversation_id` = ?');
1242
-        $archiveRes = $sqlarchive->execute([$archivedyn, $dateArchived, $userDspNameArch, $conversationId]);
1243
-        $archiveRes->closeCursor();
1244
-        if ($archiveRes) { return "success"; } else { return "error"; }
1245
-     }
1246
-
1247
-
1248
-     /**
1249
-      * @NoAdminRequired
1250
-      */
1251
-     public function unarchiveconv($userId, $userDspNameUnarch, $conversationIdUn) {
1252
-
1253
-        $archivedynun = 0;
1254
-        $dateUnarchived = date("Y-m-d H:i:s");
1255
-        $sqlarchiveun = $this->connection->prepare('
1256
-		        UPDATE `*PREFIX*sms_relent_conv`
1257
-		        SET `archived` = ?, `last_unarchived` = ?, `unarchived_by` = ?
1258
-                        WHERE `conversation_id` = ?');
1259
-        $archiveResun = $sqlarchiveun->execute([$archivedynun, $dateUnarchived, $userDspNameUnarch, $conversationIdUn]);
1260
-        $archiveResun->closeCursor();
1261
-        if ($archiveResun) { return "success"; } else { return "error"; }
1262
-     }
1263
-
1264
-
1265
-     /**
1266
-      * @NoAdminRequired
1267
-      */
1268
-     public function saveconvdescription($userId, $userDspNameDesc, $convDescription, $convId) {
1269
-
1270
-            $dateDescSaved = date("Y-m-d H:i:s");
1271
-	    $updatedesc = $this->connection->prepare('
1272
-			UPDATE `*PREFIX*sms_relent_conv`
1273
-			SET `description` = ?, `descriptionby` = ?, `descriptiondate` = ?
1274
-                        WHERE `conversation_id` = ?');
1275
-	    $updatedescres = $updatedesc->execute([$convDescription, $userDspNameDesc, $dateDescSaved, $convId]);
1276
-
1277
-            if ($updatedescres) {
1278
-                return $respupdesc = "The conversation description has been saved successfully.";
1279
-            } else {
1280
-                return $respupdesc = "Error while trying to save the conversation description to the database.";
1281
-            }
1282
-	    $updatedescres->closeCursor();
1283
-     }
1284
-
1285
-
1286
-     /**
1287
-      * @NoAdminRequired
1288
-      */
1289
-     public function saveconvtag($userId, $userDspNameTag, $convTag, $convId) {
1290
-
1291
-            $dateTagSaved = date("Y-m-d H:i:s");
1292
-	    $updatetag = $this->connection->prepare('
1293
-			UPDATE `*PREFIX*sms_relent_conv`
1294
-			SET `tag` = ?, `taguntagby` = ?, `taguntagdate` = ?
1295
-                        WHERE `conversation_id` = ?');
1296
-	    $updatetagres = $updatetag->execute([$convTag, $userDspNameTag, $dateTagSaved, $convId]);
1297
-
1298
-            if ($updatetagres) {
1299
-                return $respuptag = "The conversation tag has been saved successfully.";
1300
-            } else {
1301
-                return $respuptag = "Error while trying to save the conversation tag to the database.";
1302
-            }
1303
-	    $updatetagres->closeCursor();
1304
-     }
1305
-
1306
-
1307
-     /**
1308
-      * @NoAdminRequired
1309
-      */
1310
-     public function saveconvflag($userId, $userDspNameFlag, $convFlag, $convId) {
1311
-
1312
-            $dateFlagSaved = date("Y-m-d H:i:s");
1313
-	    $updateflag = $this->connection->prepare('
1314
-			UPDATE `*PREFIX*sms_relent_conv`
1315
-			SET `flagged` = ?, `flagunflagby` = ?, `flagunflagdate` = ?
1316
-                        WHERE `conversation_id` = ?');
1317
-	    $updateflagres = $updateflag->execute([$convFlag, $userDspNameFlag, $dateFlagSaved, $convId]);
1318
-
1319
-            if ($updateflagres) {
1320
-                return $respupflag = "success";
1321
-            } else {
1322
-                return $respupflag = "failure";
1323
-            }
1324
-	    $updateflagres->closeCursor();
1325
-     }
1326
-
1327
-
1328
-     /**
1329
-      * @NoAdminRequired
1330
-      */
1331
-     public function removeconvmsgs($userId, $conversationId) {
1332
-
1333
-        if ($this->groupManager->isAdmin($userId)) {
1334
-
1335
-            // Delete all the messages included in the conversation with the given conversation ID, from the 'sms_relent_received' table
1336
-            $convmsgdelrec = $this->connection->prepare('
1337
-		           DELETE FROM `*PREFIX*sms_relent_received`
1338
-		           WHERE `conversation_id` = ?');
1339
-            $convmsgdelrecres = $convmsgdelrec->execute([$conversationId]);
1340
-	    $convmsgdelrecres->closeCursor();
1341
-
1342
-	    $sqlupdaterec = $this->connection->prepare('
1343
-                           SET @resetrec = 0;
1344
-		           UPDATE `*PREFIX*sms_relent_received`
1345
-		           SET `id` = @resetrec := @resetrec + 1;
1346
-                           ALTER TABLE `*PREFIX*sms_relent_received` auto_increment=1;');
1347
-	    $updaterecRes = $sqlupdaterec->execute();
1348
-	    $updaterecRes->closeCursor();
1349
-
1350
-            // Delete all the messages included in the conversation with the given conversation ID, from the 'sms_relent_sent' table
1351
-            $convmsgdelsent = $this->connection->prepare('
1352
-		           DELETE FROM `*PREFIX*sms_relent_sent`
1353
-		           WHERE `conversation_id` = ?');
1354
-            $convmsgdelsentres = $convmsgdelsent->execute([$conversationId]);
1355
-	    $convmsgdelsentres->closeCursor();
1356
-
1357
-	    $sqlupdatesent = $this->connection->prepare('
1358
-                           SET @resetsent = 0;
1359
-		           UPDATE `*PREFIX*sms_relent_sent`
1360
-		           SET `id` = @resetsent := @resetsent + 1;
1361
-                           ALTER TABLE `*PREFIX*sms_relent_sent` auto_increment=1;');
1362
-	    $updatesentRes = $sqlupdatesent->execute();
1363
-	    $updatesentRes->closeCursor();
1364
-
1365
-            // Delete the row with the given conversation ID from the 'sms_relent_conv' table
1366
-            $convmsgdel = $this->connection->prepare('
1367
-		           DELETE FROM `*PREFIX*sms_relent_conv`
1368
-		           WHERE `conversation_id` = ?');
1369
-            $convmsgdelres = $convmsgdel->execute([$conversationId]);
1370
-	    $convmsgdelres->closeCursor();
1371
-
1372
-	    $sqlupdateconv = $this->connection->prepare('
1373
-                           SET @resetconv = 0;
1374
-		           UPDATE `*PREFIX*sms_relent_conv`
1375
-		           SET `id` = @resetconv := @resetconv + 1;
1376
-                           ALTER TABLE `*PREFIX*sms_relent_conv` auto_increment=1;');
1377
-	    $updateconvRes = $sqlupdateconv->execute();
1378
-	    $updateconvRes->closeCursor();
1379
-
1380
-            return "success";
1381
-
1382
-        } else { return "not allowed"; }
1383
-     }
1384
-
1385
-
1386
-     /**
1387
-      * @NoAdminRequired
1388
-      */
1389
-     public function getgroupedtable($userId) {
1390
-
1391
-
1392
-        // Get the user's preferences from the settings
1393
-        $getpref = $this->connection->prepare('
1394
-		       SELECT `user_id`, `show_all_messages`
1395
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
1396
-        $getprefres = $getpref->execute([$userId]);
1397
-        $getprefresdata = $getprefres->fetch();
1398
-        $crsampref = $getprefresdata['show_all_messages'];
1399
-        $getprefres->closeCursor();
1400
-
1401
-
1402
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
1403
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1404
-
1405
-            // Get the groups and users that were allowed access to the API keys
1406
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
1407
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
1408
-                                                   WHERE `user_id` = ?');
1409
-            $getgrpsres = $getgrps->execute([$userId]);
1410
-            $getgrpsusr = $getgrpsres->fetch();
1411
-            $getgrpsres->closeCursor();
1412
-
1413
-            if ($getgrpsusr) {
1414
-
1415
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
1416
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
1417
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
1418
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
1419
-
1420
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
1421
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
1422
-
1423
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
1424
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
1425
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
1426
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
1427
-
1428
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
1429
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
1430
-
1431
-            } else {
1432
-                $allwdusersunq = [];
1433
-                $allwdgroupsunq = [];
1434
-            }
1435
-
1436
-            // Get the username for each Display Name of the allowed users
1437
-            $allwdusersfnl = [];
1438
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
1439
-
1440
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
1441
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
1442
-		         $acdatausrname = $getacdatausrnmres->fetch();
1443
-                         if ($acdatausrname) {
1444
-                             $allwdusersfnl[] = $acdatausrname['uid'];
1445
-                         }
1446
-                         $getacdatausrnmres->closeCursor();
1447
-            }
1448
-
1449
-            // Get the users from all the allowed groups
1450
-            $allwdusersgrpmlt = [];
1451
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
1452
-
1453
-                     // Get all the users that belong to the current group, if the current group is different from 'admin'
1454
-                     if ($prgrpvalue != 'admin') {
1455
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
1456
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
1457
-
1458
-		         while ($getusrname = $getusringroupres->fetch()) {
1459
-
1460
-                                $allwdusersgrpmlt[] = $getusrname['uid'];
1461
-                         }
1462
-		         $getusringroupres->closeCursor();
1463
-                     }
1464
-            }
1465
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
1466
-            
1467
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
1468
-            $allusruniquest = array_unique($allusr);
1469
-
1470
-            if ($allusruniquest) {
1471
-                array_unshift($allusruniquest, $userId);
1472
-                $allusruniquegr = $allusruniquest;
1473
-            } else { $allusruniquegr = [$userId]; }
1474
-
1475
-            $allusruniquegrsec = "'" . implode("','", $allusruniquegr) . "'";
1476
-        }
1477
-
1478
-        // Get received messages
1479
-
1480
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
1481
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1482
-
1483
-            $getrecmsgsres = $this->connection->executeQuery("
1484
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1485
-			FROM `*PREFIX*sms_relent_received` WHERE `user_id` IN (" . $allusruniquegrsec . ")");
1486
-
1487
-        // If the user is an admin and he wants to see only his messages
1488
-        } elseif ($crsampref == 0 && $this->groupManager->isAdmin($userId)) {
1489
-
1490
-            $getrecmsgs = $this->connection->prepare('
1491
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1492
-			FROM `*PREFIX*sms_relent_received` WHERE `user_id` = ?');
1493
-	    $getrecmsgsres = $getrecmsgs->execute([$userId]);
1494
-
1495
-        // If the user is not an admin 
1496
-        } elseif (!$this->groupManager->isAdmin($userId)) {
1497
-
1498
-	    // Get the Display Name of the current user
1499
-	    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
1500
-	    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
1501
-	    $acdatausrdnadm = $getacdatadnres->fetch();
1502
-	    $cruserdname = $acdatausrdnadm['value'];
1503
-	    $getacdatadnres->closeCursor();
1504
-
1505
-            // Get the groups to which the current user belongs
1506
-            $getusrgrp = $this->connection->prepare('
1507
-	          SELECT `gid`, `uid`
1508
-	          FROM  `*PREFIX*group_user`
1509
-                  WHERE `uid` = ?');
1510
-            $getusrgrpres = $getusrgrp->execute([$userId]);
1511
-
1512
-            $usergrps = [];
1513
-            while ($fetchedgrps = $getusrgrpres->fetch()) {
1514
-                   $usergrps[] = $fetchedgrps['gid'];
1515
-            }
1516
-            $getusrgrpres->closeCursor();
1517
-
1518
-            // Get the restrictions from the 'sms_relent_restrict' table
1519
-            $getrestr = $this->connection->prepare('
1520
-		       SELECT `phone_number`, `groups`, `users`
1521
-		       FROM  `*PREFIX*sms_relent_restrict`');
1522
-            $getrestrres = $getrestr->execute();
1523
-
1524
-            $restrdata = [];
1525
-            while ($restrfetched = $getrestrres->fetch()) {
1526
-                   $restrdata[] = $restrfetched;
1527
-            }
1528
-            $getrestrres->closeCursor();
1529
-
1530
-            // Get the phone numbers that the user is allowed/not allowed to use
1531
-            if ($restrdata) {
1532
-
1533
-                $restrPhoneNmbrs = [];
1534
-                $allowedPhoneNmbrs = [];
1535
-                foreach ($restrdata as $rskey => $rsvalue) {
1536
-
1537
-                         $chck = 0;
1538
-                         $restrgrparr = explode("|", $rsvalue['groups']);
1539
-                         foreach ($restrgrparr as $rkey => $rvalue) {
1540
-                                  if ($rvalue) {
1541
-                                      if (strpos(implode("|", $usergrps), $rvalue) !== false) { $chck++; }
1542
-                                  }
1543
-                         }
1544
-                         if (strpos($rsvalue['users'], $cruserdname) !== false) { $chck++; }
1545
-
1546
-                         if ($chck == 0) { 
1547
-                             $restrPhoneNmbrs[] = $rsvalue['phone_number']; 
1548
-                         }
1549
-                }
1550
-
1551
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
1552
-
1553
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
1554
-			 $crphnmbr = explode(": ", $apnvalue);
1555
-			 if ($crphnmbr[0] == 'Tx') {
1556
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
1557
-			 } elseif ($crphnmbr[0] == 'Pl') {
1558
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
1559
-			 } elseif ($crphnmbr[0] == 'Tw') {
1560
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
1561
-			 } elseif ($crphnmbr[0] == 'Fl') {
1562
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
1563
-			 }
1564
-		}
1565
-
1566
-                $procalwduid = $allowedPhoneNmbrs;
1567
-                $procalwduidsec = "'" . implode("','", $procalwduid) . "'";
1568
-
1569
-                if ($procalwduidsec != "''") {
1570
-
1571
-                    $getrecmsgsres = $this->connection->executeQuery("
1572
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1573
-			FROM `*PREFIX*sms_relent_received`
1574
-			WHERE `user_id` = '$userId' OR `to` IN (" . $procalwduidsec . ")");
1575
-
1576
-                } else {
1577
-	            $getrectable = $this->connection->prepare('
1578
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1579
-			FROM `*PREFIX*sms_relent_received`
1580
-			WHERE `user_id` = ?');
1581
-	            $getrecmsgsres = $getrectable->execute([$userId]);
1582
-                }
1583
-
1584
-            } else {
1585
-
1586
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
1587
-
1588
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
1589
-			 $crphnmbr = explode(": ", $apnvalue);
1590
-			 if ($crphnmbr[0] == 'Tx') {
1591
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
1592
-			 } elseif ($crphnmbr[0] == 'Pl') {
1593
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
1594
-			 } elseif ($crphnmbr[0] == 'Tw') {
1595
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
1596
-			 } elseif ($crphnmbr[0] == 'Fl') {
1597
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
1598
-			 }
1599
-		}
1600
-
1601
-                $procalwduid = $allowedPhoneNmbrs;
1602
-                $procalwduidsec = "'" . implode("','", $procalwduid) . "'";
1603
-
1604
-                if ($procalwduidsec != "''") {
1605
-
1606
-                    $getrecmsgsres = $this->connection->executeQuery("
1607
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1608
-			FROM `*PREFIX*sms_relent_received`
1609
-			WHERE `user_id` = '$userId' OR `to` IN (" . $procalwduidsec . ")");
1610
-
1611
-                } else {
1612
-	            $getrectable = $this->connection->prepare('
1613
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1614
-			FROM `*PREFIX*sms_relent_received`
1615
-			WHERE `user_id` = ?');
1616
-	            $getrecmsgsres = $getrectable->execute([$userId]);
1617
-                }
1618
-            }
1619
-        }
1620
-
1621
-        $recmsgs = [];
1622
-        while ($rcrowsfetch = $getrecmsgsres->fetch()) {
1623
-               $rcrowsfetch['deliveryreceipt'] = '';
1624
-               $rcrowsfetch['table'] = 'received';
1625
-               $recmsgs[] = $rcrowsfetch;
1626
-        }
1627
-	$getrecmsgsres->closeCursor();
1628
-
1629
-
1630
-        // Get sent messages
1631
-
1632
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
1633
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1634
-
1635
-            $getsentmsgsres = $this->connection->executeQuery("
1636
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1637
-		       FROM  `*PREFIX*sms_relent_sent` 
1638
-                       WHERE `user_id` IN (" . $allusruniquegrsec . ")");
1639
-
1640
-        // If the user is an admin and he wants to see only his messages
1641
-        } elseif ($crsampref == 0 && $this->groupManager->isAdmin($userId)) {
1642
-
1643
-            $getsentmsgs = $this->connection->prepare('
1644
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1645
-		       FROM  `*PREFIX*sms_relent_sent`
1646
-		       WHERE `user_id` = ?');
1647
-            $getsentmsgsres = $getsentmsgs->execute([$userId]);
1648
-
1649
-        // If the user is not an admin 
1650
-        } elseif (!$this->groupManager->isAdmin($userId)) {
1651
-
1652
-            if ($restrdata) {
1653
-                if ($procalwduidsec != "''") {
1654
-
1655
-	            $getsentmsgsres = $this->connection->executeQuery("
1656
-		        SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1657
-		        FROM  `*PREFIX*sms_relent_sent`
1658
-			WHERE `user_id` = '$userId' OR `from` IN (" . $procalwduidsec . ")");
1659
-
1660
-                } else {
1661
-                    $getsentmsgs = $this->connection->prepare('
1662
-		        SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1663
-		        FROM  `*PREFIX*sms_relent_sent`
1664
-			WHERE `user_id` = ?');
1665
-	            $getsentmsgsres = $getsentmsgs->execute([$userId]);
1666
-                }
1667
-
1668
-            } else {
1669
-
1670
-                $getsentmsgs = $this->connection->prepare('
1671
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1672
-		       FROM  `*PREFIX*sms_relent_sent`
1673
-		       WHERE `user_id` = ?');
1674
-                $getsentmsgsres = $getsentmsgs->execute([$userId]);
1675
-            }
1676
-        }
1677
-
1678
-
1679
-        $sentmsgs = [];
1680
-        while ($rowfetchedsmsg = $getsentmsgsres->fetch()) {
1681
-               $rowfetchedsmsg['table'] = 'sent';
1682
-               $sentmsgs[] = $rowfetchedsmsg;
1683
-        }
1684
-        $getsentmsgsres->closeCursor();
1685
-
1686
-        $groupedfromdb = array_merge($recmsgs, $sentmsgs);
1687
-
1688
-        if ($this->groupManager->isAdmin($userId)) {
1689
-
1690
-            return $groupedfromdb;
1691
-
1692
-        } else {
1693
-
1694
-            if ($restrdata) {
1695
-
1696
-                // Clean the phone numbers from tags
1697
-                $restrPhfin = [];
1698
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
1699
-
1700
-                    $restrpharr = explode(": ", $phvalue);
1701
-                    $restrPhfin[] = $restrpharr[1];
1702
-                }
1703
-
1704
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
1705
-                foreach ($groupedfromdb as $gmdkey => $gmdvalue) {
1706
-
1707
-                         if ($gmdvalue['table'] == 'sent') {
1708
-
1709
-                             if (str_contains($gmdvalue['from'], "+")) {
1710
-                                 $fromnmbrarr = explode("+", $gmdvalue['from']);
1711
-                                 if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1712
-                                     unset($groupedfromdb[$gmdkey]);
1713
-                                 }
1714
-                             } else {
1715
-                                 $frmnmbrarr = explode(": ", $gmdvalue['from']);
1716
-                                 if (count($frmnmbrarr) == 2) {
1717
-                                     $nmbtbcmprd = $frmnmbrarr[1];
1718
-                                 } else { 
1719
-                                     $nmbtbcmprd = $frmnmbrarr[0];
1720
-                                 }
1721
-                                 if (in_array($nmbtbcmprd, $restrPhfin)) {
1722
-                                     unset($groupedfromdb[$gmdkey]);
1723
-                                 }
1724
-                             }
1725
-
1726
-                         } elseif ($gmdvalue['table'] == 'received') {
1727
-
1728
-                             if (str_contains($gmdvalue['to'], "+")) {
1729
-                                 $fromnmbrarr = explode("+", $gmdvalue['to']);
1730
-                                 if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1731
-                                     unset($groupedfromdb[$gmdkey]);
1732
-                                 }
1733
-                             } else {
1734
-                                 $tonmbrarr = explode(": ", $gmdvalue['to']);
1735
-                                 if (count($tonmbrarr) == 2) {
1736
-                                     $tonmbrtbcmprd = $tonmbrarr[1];
1737
-                                 } else {
1738
-                                     $tonmbrtbcmprd = $tonmbrarr[0];
1739
-                                 }
1740
-                                 if (in_array($tonmbrtbcmprd, $restrPhfin)) {
1741
-                                     unset($groupedfromdb[$gmdkey]);
1742
-                                 }
1743
-                             }
1744
-                         }
1745
-
1746
-                }
1747
-
1748
-                $groupedfdbproc = array_values($groupedfromdb);
1749
-
1750
-                return $groupedfdbproc;
1751
-
1752
-            } else { return $groupedfromdb; }
1753
-        }
1754
-     }
1755
-
1756
-
1757
-     /**
1758
-      * @NoAdminRequired
1759
-      */
1760
-     public function getgroupedpernumber($userId, $phoneNumber) {
1761
-
1762
-        $phoneNumberpr = "%" . $phoneNumber;
1763
-
1764
-        // Get the user's preferences from the settings
1765
-        $getpref = $this->connection->prepare('
1766
-		       SELECT `user_id`, `show_all_messages`
1767
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
1768
-        $getprefres = $getpref->execute([$userId]);
1769
-        $getprefresdata = $getprefres->fetch();
1770
-        $crsampref = $getprefresdata['show_all_messages'];
1771
-        $getprefres->closeCursor();
1772
-
1773
-
1774
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
1775
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1776
-
1777
-            // Get the groups and users that were allowed access to the API keys
1778
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
1779
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
1780
-                                                   WHERE `user_id` = ?');
1781
-            $getgrpsres = $getgrps->execute([$userId]);
1782
-            $getgrpsusr = $getgrpsres->fetch();
1783
-            $getgrpsres->closeCursor();
1784
-
1785
-            if ($getgrpsusr) {
1786
-
1787
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
1788
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
1789
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
1790
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
1791
-
1792
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
1793
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
1794
-
1795
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
1796
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
1797
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
1798
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
1799
-
1800
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
1801
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
1802
-
1803
-            } else {
1804
-                $allwdusersunq = [];
1805
-                $allwdgroupsunq = [];
1806
-            }
1807
-
1808
-            // Get the username for each Display Name of the allowed users
1809
-            $allwdusersfnl = [];
1810
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
1811
-
1812
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
1813
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
1814
-		         $acdatausrname = $getacdatausrnmres->fetch();
1815
-                         if ($acdatausrname) {
1816
-                             $allwdusersfnl[] = $acdatausrname['uid'];
1817
-                         }
1818
-                         $getacdatausrnmres->closeCursor();
1819
-            }
1820
-
1821
-            // Get the users from all the allowed groups
1822
-            $allwdusersgrpmlt = [];
1823
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
1824
-
1825
-                     // Get all the users that belong to the current group, if the current group is different from 'admin'
1826
-                     if ($prgrpvalue != 'admin') {
1827
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
1828
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
1829
-
1830
-		         while ($getusrname = $getusringroupres->fetch()) {
1831
-
1832
-                                $allwdusersgrpmlt[] = $getusrname['uid'];
1833
-                         }
1834
-		         $getusringroupres->closeCursor();
1835
-                     }
1836
-            }
1837
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
1838
-            
1839
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
1840
-            $allusruniquest = array_unique($allusr);
1841
-
1842
-            if ($allusruniquest) {
1843
-                array_unshift($allusruniquest, $userId);
1844
-                $allusruniquepn = $allusruniquest;
1845
-            } else { $allusruniquepn = [$userId]; }
1846
-
1847
-            $allusruniquepnst = $allusruniquepn;
1848
-
1849
-            $procardatapn = "'" . implode("','", $allusruniquepn) . "'";
1850
-
1851
-            array_unshift($allusruniquepn, $phoneNumber, $phoneNumberpr);
1852
-            $allusruniquead = $allusruniquepn;
1853
-
1854
-            array_unshift($allusruniquepnst, $phoneNumberpr, $phoneNumber);
1855
-            $allusruniqueadst = $allusruniquepnst;
1856
-        }
1857
-
1858
-
1859
-        // Get received messages
1860
-
1861
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
1862
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1863
-
1864
-	    $getrecmsgsres = $this->connection->executeQuery("
1865
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1866
-			FROM `*PREFIX*sms_relent_received` 
1867
-                        WHERE (`from` = '$phoneNumber' OR `to` LIKE '$phoneNumberpr') AND `user_id` IN (" . $procardatapn . ")");
1868
-
1869
-        // If the user is an admin and he wants to see only his messages
1870
-        } elseif ($crsampref == 0 && $this->groupManager->isAdmin($userId)) {
1871
-
1872
-            $getrecmsgs = $this->connection->prepare('
1873
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1874
-			FROM `*PREFIX*sms_relent_received` 
1875
-                        WHERE `user_id` = ? AND (`from` = ? OR `to` LIKE ?)');
1876
-	    $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNumber, $phoneNumberpr]);
1877
-
1878
-        // If the user is not an admin 
1879
-        } elseif (!$this->groupManager->isAdmin($userId)) {
1880
-
1881
-	    // Get the Display Name of the current user
1882
-	    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
1883
-	    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
1884
-	    $acdatausrdnadm = $getacdatadnres->fetch();
1885
-	    $cruserdname = $acdatausrdnadm['value'];
1886
-	    $getacdatadnres->closeCursor();
1887
-
1888
-            // Get the groups to which the current user belongs
1889
-            $getusrgrp = $this->connection->prepare('
1890
-	          SELECT `gid`, `uid`
1891
-	          FROM  `*PREFIX*group_user`
1892
-                  WHERE `uid` = ?');
1893
-            $getusrgrpres = $getusrgrp->execute([$userId]);
1894
-
1895
-            $usergrps = [];
1896
-            while ($fetchedgrps = $getusrgrpres->fetch()) {
1897
-                   $usergrps[] = $fetchedgrps['gid'];
1898
-            }
1899
-            $getusrgrpres->closeCursor();
1900
-
1901
-            // Get the restrictions from the 'sms_relent_restrict' table
1902
-            $getrestr = $this->connection->prepare('
1903
-		       SELECT `phone_number`, `groups`, `users`
1904
-		       FROM  `*PREFIX*sms_relent_restrict`');
1905
-            $getrestrres = $getrestr->execute();
1906
-
1907
-            $restrdata = [];
1908
-            while ($restrfetched = $getrestrres->fetch()) {
1909
-                   $restrdata[] = $restrfetched;
1910
-            }
1911
-            $getrestrres->closeCursor();
1912
-
1913
-            // Get the phone numbers that the user is allowed/not allowed to use
1914
-            if ($restrdata) {
1915
-
1916
-                $restrPhoneNmbrs = [];
1917
-                $allowedPhoneNmbrs = [];
1918
-                foreach ($restrdata as $rskey => $rsvalue) {
1919
-
1920
-                         $chck = 0;
1921
-                         $restrgrparr = explode("|", $rsvalue['groups']);
1922
-                         foreach ($restrgrparr as $rkey => $rvalue) {
1923
-                                  if ($rvalue) {
1924
-                                      if (strpos(implode("|", $usergrps), $rvalue) !== false) { $chck++; }
1925
-                                  }
1926
-                         }
1927
-                         if (strpos($rsvalue['users'], $cruserdname) !== false) { $chck++; }
1928
-
1929
-                         if ($chck == 0) { 
1930
-                             $restrPhoneNmbrs[] = $rsvalue['phone_number']; 
1931
-                         }
1932
-                }
1933
-
1934
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
1935
-
1936
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
1937
-			 $crphnmbr = explode(": ", $apnvalue);
1938
-			 if ($crphnmbr[0] == 'Tx') {
1939
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
1940
-			 } elseif ($crphnmbr[0] == 'Pl') {
1941
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
1942
-			 } elseif ($crphnmbr[0] == 'Tw') {
1943
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
1944
-			 } elseif ($crphnmbr[0] == 'Fl') {
1945
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
1946
-			 }
1947
-		}
1948
-
1949
-                $allowedPhoneNmbrscp = $allowedPhoneNmbrs;
1950
-
1951
-                $procalwdphnmbrs = "'" . implode("','", $allowedPhoneNmbrs) . "'";
1952
-
1953
-                if ($procalwdphnmbrs != "''") {
1954
-
1955
-	            $getrecmsgsres = $this->connection->executeQuery("
1956
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1957
-			FROM `*PREFIX*sms_relent_received`
1958
-			WHERE (`user_id` = '$userId' OR `to` IN (" . $procalwdphnmbrs . ")) AND (`from` = '$phoneNumber' OR `to` LIKE '$phoneNumberpr')");
1959
-
1960
-                } else {
1961
-	            $getrecmsgs = $this->connection->prepare('
1962
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1963
-			FROM `*PREFIX*sms_relent_received`
1964
-			WHERE `user_id` = ? AND (`from` = ? OR `to` LIKE ?)');
1965
-	            $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNumber, $phoneNumberpr]);
1966
-                }
1967
-
1968
-            } else {
1969
-
1970
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
1971
-
1972
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
1973
-			 $crphnmbr = explode(": ", $apnvalue);
1974
-			 if ($crphnmbr[0] == 'Tx') {
1975
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
1976
-			 } elseif ($crphnmbr[0] == 'Pl') {
1977
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
1978
-			 } elseif ($crphnmbr[0] == 'Tw') {
1979
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
1980
-			 } elseif ($crphnmbr[0] == 'Fl') {
1981
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
1982
-			 }
1983
-		}
1984
-
1985
-                $allowedPhoneNmbrscp = $allowedPhoneNmbrs;
1986
-
1987
-                $procalwdphnmbrs = "'" . implode("','", $allowedPhoneNmbrs) . "'";
1988
-
1989
-                if ($procalwdphnmbrs != "''") {
1990
-
1991
-	            $getrecmsgsres = $this->connection->executeQuery("
1992
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1993
-			FROM `*PREFIX*sms_relent_received`
1994
-			WHERE (`user_id` = '$userId' OR `to` IN (" . $procalwdphnmbrs . ")) AND (`from` = '$phoneNumber' OR `to` LIKE '$phoneNumberpr')");
1995
-
1996
-                } else {
1997
-	            $getrecmsgs = $this->connection->prepare('
1998
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1999
-			FROM `*PREFIX*sms_relent_received`
2000
-			WHERE `user_id` = ? AND (`from` = ? OR `to` LIKE ?)');
2001
-	            $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNumber, $phoneNumberpr]);
2002
-                }
2003
-            }
2004
-        }
2005
-
2006
-
2007
-        $recmsgs = [];
2008
-        while ($rcrowsfetch = $getrecmsgsres->fetch()) {
2009
-               $rcrowsfetch['deliveryreceipt'] = '';
2010
-               $rcrowsfetch['table'] = 'received';
2011
-               $recmsgs[] = $rcrowsfetch;
2012
-        }
2013
-	$getrecmsgsres->closeCursor();
2014
-
2015
-
2016
-        // Get sent messages
2017
-
2018
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
2019
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
2020
-
2021
-            $getsentmsgsres = $this->connection->executeQuery("
2022
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2023
-		       FROM  `*PREFIX*sms_relent_sent` 
2024
-                       WHERE (`from` LIKE '$phoneNumberpr' OR `to` = '$phoneNumber') AND `user_id` IN (" . $procardatapn . ")");
2025
-
2026
-        // If the user is an admin and he wants to see only his messages
2027
-        } elseif ($crsampref == 0 && $this->groupManager->isAdmin($userId)) {
2028
-
2029
-            $getsentmsgs = $this->connection->prepare('
2030
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2031
-		       FROM  `*PREFIX*sms_relent_sent`
2032
-		       WHERE `user_id` = ? AND (`from` LIKE ? OR `to` = ?)');
2033
-            $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNumberpr, $phoneNumber]);
2034
-
2035
-
2036
-        // If the user is not an admin 
2037
-        } elseif (!$this->groupManager->isAdmin($userId)) {
2038
-
2039
-            if ($restrdata) {
2040
-                if ($procalwdphnmbrs != "''") {
2041
-
2042
-                    $getsentmsgsres = $this->connection->executeQuery("
2043
-		        SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2044
-		        FROM  `*PREFIX*sms_relent_sent`
2045
-			WHERE (`user_id` = '$userId' OR `from` IN (" . $procalwdphnmbrs . ")) AND (`from` LIKE '$phoneNumberpr' OR `to` = '$phoneNumber')");
2046
-
2047
-                } else {
2048
-                    $getsentmsgs = $this->connection->prepare('
2049
-		        SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2050
-		        FROM  `*PREFIX*sms_relent_sent`
2051
-			WHERE `user_id` = ? AND (`from` LIKE ? OR `to` = ?)');
2052
-	            $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNumberpr, $phoneNumber]);
2053
-                }
2054
-
2055
-            } else {
2056
-
2057
-                $getsentmsgs = $this->connection->prepare('
2058
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2059
-		       FROM  `*PREFIX*sms_relent_sent`
2060
-		       WHERE `user_id` = ? AND (`from` LIKE ? OR `to` = ?)');
2061
-                $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNumberpr, $phoneNumber]);
2062
-            }
2063
-        }
2064
-
2065
-        $sentmsgs = [];
2066
-        while ($rowfetchedsmsg = $getsentmsgsres->fetch()) {
2067
-               $rowfetchedsmsg['table'] = 'sent';
2068
-               $sentmsgs[] = $rowfetchedsmsg;
2069
-        }
2070
-        $getsentmsgsres->closeCursor();
2071
-
2072
-        $groupedpernb = array_merge($recmsgs, $sentmsgs);
2073
-
2074
-        if ($this->groupManager->isAdmin($userId)) {
2075
-
2076
-            return $groupedpernb;
2077
-
2078
-        } else {
2079
-
2080
-            if ($restrdata) {
2081
-
2082
-                // Clean the phone numbers from tags
2083
-                $restrPhfin = [];
2084
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
2085
-
2086
-                    $restrpharr = explode(": ", $phvalue);
2087
-                    $restrPhfin[] = $restrpharr[1];
2088
-                }
2089
-
2090
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
2091
-                foreach ($groupedpernb as $gmdkey => $gmdvalue) {
2092
-
2093
-                         if ($gmdvalue['table'] == 'sent') {
2094
-
2095
-                             if (str_contains($gmdvalue['from'], "+")) {
2096
-                                 $fromnmbrarr = explode("+", $gmdvalue['from']);
2097
-                                 if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
2098
-                                     unset($groupedpernb[$gmdkey]);
2099
-                                 }
2100
-                             } else {
2101
-                                 $frmnmbrarr = explode(": ", $gmdvalue['from']);
2102
-                                 if (count($frmnmbrarr) == 2) {
2103
-                                     $nmbtbcmprd = $frmnmbrarr[1];
2104
-                                 } else { 
2105
-                                     $nmbtbcmprd = $frmnmbrarr[0];
2106
-                                 }
2107
-                                 if (in_array($nmbtbcmprd, $restrPhfin)) {
2108
-                                     unset($groupedpernb[$gmdkey]);
2109
-                                 }
2110
-                             }
2111
-
2112
-                         } elseif ($gmdvalue['table'] == 'received') {
2113
-
2114
-                             if (str_contains($gmdvalue['to'], "+")) {
2115
-                                 $fromnmbrarr = explode("+", $gmdvalue['to']);
2116
-                                 if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
2117
-                                     unset($groupedpernb[$gmdkey]);
2118
-                                 }
2119
-                             } else {
2120
-                                 $tonmbrarr = explode(": ", $gmdvalue['to']);
2121
-                                 if (count($tonmbrarr) == 2) {
2122
-                                     $tonmbrtbcmprd = $tonmbrarr[1];
2123
-                                 } else {
2124
-                                     $tonmbrtbcmprd = $tonmbrarr[0];
2125
-                                 }
2126
-                                 if (in_array($tonmbrtbcmprd, $restrPhfin)) {
2127
-                                     unset($groupedpernb[$gmdkey]);
2128
-                                 }
2129
-                             }
2130
-                         }
2131
-
2132
-                }
2133
-
2134
-                $groupedpernbprc = array_values($groupedpernb);
2135
-
2136
-                return $groupedpernbprc;
2137
-
2138
-            } else { return $groupedpernb; }
2139
-        }
2140
-     }
2141
-
2142
-
2143
-     /**
2144
-      * @NoAdminRequired
2145
-      */
2146
-     public function getgroupedforreply($userId, $phoneNmbrFrom, $phoneNmbrTo) {
2147
-
2148
-        $phoneNmbrFrompr = "%" . $phoneNmbrFrom;
2149
-        $phoneNmbrTopr = "%" . $phoneNmbrTo;
2150
-
2151
-        // Get the user's preferences from the settings
2152
-        $getpref = $this->connection->prepare('
2153
-		       SELECT `user_id`, `show_all_messages`
2154
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
2155
-        $getprefres = $getpref->execute([$userId]);
2156
-        $getprefresdata = $getprefres->fetch();
2157
-        $crsampref = $getprefresdata['show_all_messages'];
2158
-        $getprefres->closeCursor();
2159
-
2160
-
2161
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
2162
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
2163
-
2164
-            // Get the groups and users that were allowed access to the API keys
2165
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
2166
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
2167
-                                                   WHERE `user_id` = ?');
2168
-            $getgrpsres = $getgrps->execute([$userId]);
2169
-            $getgrpsusr = $getgrpsres->fetch();
2170
-            $getgrpsres->closeCursor();
2171
-
2172
-            if ($getgrpsusr) {
2173
-
2174
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
2175
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
2176
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
2177
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
2178
-
2179
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
2180
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
2181
-
2182
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
2183
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
2184
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
2185
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
2186
-
2187
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
2188
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
2189
-
2190
-            } else {
2191
-                $allwdusersunq = [];
2192
-                $allwdgroupsunq = [];
2193
-            }
2194
-
2195
-            // Get the username for each Display Name of the allowed users
2196
-            $allwdusersfnl = [];
2197
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
2198
-
2199
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
2200
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
2201
-		         $acdatausrname = $getacdatausrnmres->fetch();
2202
-                         if ($acdatausrname) {
2203
-                             $allwdusersfnl[] = $acdatausrname['uid'];
2204
-                         }
2205
-                         $getacdatausrnmres->closeCursor();
2206
-            }
2207
-
2208
-            // Get the users from all the allowed groups
2209
-            $allwdusersgrpmlt = [];
2210
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
2211
-
2212
-                     // Get all the users that belong to the current group, if the current group is different from 'admin'
2213
-                     if ($prgrpvalue != 'admin') {
2214
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2215
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
2216
-
2217
-		         while ($getusrname = $getusringroupres->fetch()) {
2218
-
2219
-                                $allwdusersgrpmlt[] = $getusrname['uid'];
2220
-                         }
2221
-		         $getusringroupres->closeCursor();
2222
-                     }
2223
-            }
2224
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
2225
-            
2226
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
2227
-            $allusruniquest = array_unique($allusr);
2228
-
2229
-            if ($allusruniquest) {
2230
-                array_unshift($allusruniquest, $userId);
2231
-                $allusruniquerp = $allusruniquest;
2232
-            } else { $allusruniquerp = [$userId]; }
2233
-
2234
-            $allusruniquerpst = $allusruniquerp;
2235
-
2236
-            $procardatarp = "'" . implode("','", $allusruniquerp) . "'";
2237
-        }
2238
-
2239
-
2240
-        // Get received messages
2241
-
2242
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
2243
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
2244
-
2245
-            $getrecmsgsres = $this->connection->executeQuery("
2246
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
2247
-			FROM `*PREFIX*sms_relent_received` 
2248
-                        WHERE ((`from` = '$phoneNmbrFrom' AND `to` LIKE '$phoneNmbrTopr') OR (`from` = '$phoneNmbrTo' AND `to` LIKE '$phoneNmbrFrompr')) AND 
2249
-                        `user_id` IN (" . $procardatarp . ")");
2250
-
2251
-        // If the user is an admin and he wants to see only his messages
2252
-        } elseif ($crsampref == 0 && $this->groupManager->isAdmin($userId)) {
2253
-
2254
-            $getrecmsgs = $this->connection->prepare('
2255
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
2256
-			FROM  `*PREFIX*sms_relent_received`
2257
-			WHERE `user_id` = ? AND ((`from` = ? AND `to` LIKE ?) OR (`from` = ? AND `to` LIKE ?))');
2258
-	    $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNmbrFrom, $phoneNmbrTopr, $phoneNmbrTo, $phoneNmbrFrompr]);
2259
-
2260
-        // If the user is not an admin 
2261
-        } elseif (!$this->groupManager->isAdmin($userId)) {
2262
-
2263
-	    // Get the Display Name of the current user
2264
-	    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
2265
-	    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
2266
-	    $acdatausrdnadm = $getacdatadnres->fetch();
2267
-	    $cruserdname = $acdatausrdnadm['value'];
2268
-	    $getacdatadnres->closeCursor();
2269
-
2270
-            // Get the groups to which the current user belongs
2271
-            $getusrgrp = $this->connection->prepare('
2272
-	          SELECT `gid`, `uid`
2273
-	          FROM  `*PREFIX*group_user`
2274
-                  WHERE `uid` = ?');
2275
-            $getusrgrpres = $getusrgrp->execute([$userId]);
2276
-
2277
-            $usergrps = [];
2278
-            while ($fetchedgrps = $getusrgrpres->fetch()) {
2279
-                   $usergrps[] = $fetchedgrps['gid'];
2280
-            }
2281
-            $getusrgrpres->closeCursor();
2282
-
2283
-            // Get the restrictions from the 'sms_relent_restrict' table
2284
-            $getrestr = $this->connection->prepare('
2285
-		       SELECT `phone_number`, `groups`, `users`
2286
-		       FROM  `*PREFIX*sms_relent_restrict`');
2287
-            $getrestrres = $getrestr->execute();
2288
-
2289
-            $restrdata = [];
2290
-            while ($restrfetched = $getrestrres->fetch()) {
2291
-                   $restrdata[] = $restrfetched;
2292
-            }
2293
-            $getrestrres->closeCursor();
2294
-
2295
-            // Get the phone numbers that the user is allowed/not allowed to use
2296
-            if ($restrdata) {
2297
-
2298
-                $restrPhoneNmbrs = [];
2299
-                $allowedPhoneNmbrs = [];
2300
-                foreach ($restrdata as $rskey => $rsvalue) {
2301
-
2302
-                         $chck = 0;
2303
-                         $restrgrparr = explode("|", $rsvalue['groups']);
2304
-                         foreach ($restrgrparr as $rkey => $rvalue) {
2305
-                                  if ($rvalue) {
2306
-                                      if (strpos(implode("|", $usergrps), $rvalue) !== false) { $chck++; }
2307
-                                  }
2308
-                         }
2309
-                         if (strpos($rsvalue['users'], $cruserdname) !== false) { $chck++; }
2310
-
2311
-                         if ($chck == 0) { 
2312
-                             $restrPhoneNmbrs[] = $rsvalue['phone_number']; 
2313
-                         }
2314
-                }
2315
-
2316
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
2317
-
2318
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
2319
-			 $crphnmbr = explode(": ", $apnvalue);
2320
-			 if ($crphnmbr[0] == 'Tx') {
2321
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
2322
-			 } elseif ($crphnmbr[0] == 'Pl') {
2323
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
2324
-			 } elseif ($crphnmbr[0] == 'Tw') {
2325
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
2326
-			 } elseif ($crphnmbr[0] == 'Fl') {
2327
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
2328
-			 }
2329
-		}
2330
-
2331
-                $allowedPhoneNmbrscpr = $allowedPhoneNmbrs;
2332
-
2333
-                $procalwdphnmbrs = "'" . implode("','", $allowedPhoneNmbrs) . "'";
2334
-
2335
-                if ($procalwdphnmbrs != "''") {
2336
-
2337
-                    $getrecmsgsres = $this->connection->executeQuery("
2338
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
2339
-			FROM `*PREFIX*sms_relent_received`
2340
-			WHERE (`user_id` = '$userId' OR `to` IN (" . $procalwdphnmbrs . ")) AND ((`from` = '$phoneNmbrFrom' AND `to` LIKE '$phoneNmbrTopr') OR (`from` = '$phoneNmbrTo' 
2341
-                                AND `to` LIKE '$phoneNmbrFrompr'))");
2342
-
2343
-                } else {
2344
-	            $getrecmsgs = $this->connection->prepare('
2345
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
2346
-			FROM `*PREFIX*sms_relent_received`
2347
-			WHERE `user_id` = ? AND ((`from` = ? AND `to` LIKE ?) OR (`from` = ? AND `to` LIKE ?))');
2348
-	            $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNmbrFrom, $phoneNmbrTopr, $phoneNmbrTo, $phoneNmbrFrompr]);
2349
-                }
2350
-
2351
-            } else {
2352
-
2353
-		$allowedPhNmbrs = $this->getsmsnumbers($userId);
2354
-
2355
-		foreach ($allowedPhNmbrs as $apnkey => $apnvalue) {
2356
-			 $crphnmbr = explode(": ", $apnvalue);
2357
-			 if ($crphnmbr[0] == 'Tx') {
2358
-			     $allowedPhoneNmbrs[] = 'Telnyx: ' . $crphnmbr[1];
2359
-			 } elseif ($crphnmbr[0] == 'Pl') {
2360
-			     $allowedPhoneNmbrs[] = 'Plivo: ' . $crphnmbr[1];
2361
-			 } elseif ($crphnmbr[0] == 'Tw') {
2362
-			     $allowedPhoneNmbrs[] = 'Twilio: ' . $crphnmbr[1];
2363
-			 } elseif ($crphnmbr[0] == 'Fl') {
2364
-			     $allowedPhoneNmbrs[] = 'Flowroute: ' . $crphnmbr[1];
2365
-			 }
2366
-		}
2367
-
2368
-                $allowedPhoneNmbrscpr = $allowedPhoneNmbrs;
2369
-
2370
-                $procalwdphnmbrs = "'" . implode("','", $allowedPhoneNmbrs) . "'";
2371
-
2372
-                if ($procalwdphnmbrs != "''") {
2373
-
2374
-                    $getrecmsgsres = $this->connection->executeQuery("
2375
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
2376
-			FROM `*PREFIX*sms_relent_received`
2377
-			WHERE (`user_id` = '$userId' OR `to` IN (" . $procalwdphnmbrs . ")) AND ((`from` = '$phoneNmbrFrom' AND `to` LIKE '$phoneNmbrTopr') OR (`from` = '$phoneNmbrTo' 
2378
-                                AND `to` LIKE '$phoneNmbrFrompr'))");
2379
-
2380
-                } else {
2381
-	            $getrecmsgs = $this->connection->prepare('
2382
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
2383
-			FROM `*PREFIX*sms_relent_received`
2384
-			WHERE `user_id` = ? AND ((`from` = ? AND `to` LIKE ?) OR (`from` = ? AND `to` LIKE ?))');
2385
-	            $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNmbrFrom, $phoneNmbrTopr, $phoneNmbrTo, $phoneNmbrFrompr]);
2386
-                }
2387
-            }
2388
-        }
2389
-
2390
-        $recmsgs = [];
2391
-        while ($rcrowsfetch = $getrecmsgsres->fetch()) {
2392
-               $rcrowsfetch['deliveryreceipt'] = '';
2393
-               $rcrowsfetch['table'] = 'received';
2394
-               $recmsgs[] = $rcrowsfetch;
2395
-        }
2396
-	$getrecmsgsres->closeCursor();
2397
-
2398
-
2399
-        // Get sent messages
2400
-
2401
-        // If the user is an admin and he wants to see his messages and the messages of all the users with whom he shares his API keys
2402
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
2403
-
2404
-            $getsentmsgsres = $this->connection->executeQuery("
2405
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2406
-		       FROM  `*PREFIX*sms_relent_sent` 
2407
-                       WHERE ((`from` LIKE '$phoneNmbrFrompr' AND `to` = '$phoneNmbrTo') OR (`from` LIKE '$phoneNmbrTopr' AND `to` = '$phoneNmbrFrom')) AND `user_id` IN 
2408
-                       (" . $procardatarp . ")");
2409
-
2410
-        // If the user is an admin and he wants to see only his messages
2411
-        } elseif ($crsampref == 0 && $this->groupManager->isAdmin($userId)) {
2412
-
2413
-            $getsentmsgs = $this->connection->prepare('
2414
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2415
-		       FROM `*PREFIX*sms_relent_sent`
2416
-		       WHERE `user_id` = ? AND ((`from` LIKE ? AND `to` = ?) OR (`from` LIKE ? AND `to` = ?))');
2417
-            $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNmbrFrompr, $phoneNmbrTo, $phoneNmbrTopr, $phoneNmbrFrom]);
2418
-
2419
-        // If the user is not an admin
2420
-        } elseif (!$this->groupManager->isAdmin($userId)) {
2421
-
2422
-            if ($restrdata) {
2423
-                if ($procalwdphnmbrs != "''") {
2424
-
2425
-	            $getsentmsgsres = $this->connection->executeQuery("
2426
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2427
-		       FROM `*PREFIX*sms_relent_sent`
2428
-		       WHERE (`user_id` = '$userId' OR `from` IN (" . $procalwdphnmbrs . ")) AND ((`from` LIKE '$phoneNmbrFrompr' AND `to` = '$phoneNmbrTo') OR 
2429
-                       (`from` LIKE '$phoneNmbrTopr' AND `to` = '$phoneNmbrFrom'))");
2430
-
2431
-                } else {
2432
-                    $getsentmsgs = $this->connection->prepare('
2433
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2434
-		       FROM `*PREFIX*sms_relent_sent`
2435
-		       WHERE `user_id` = ? AND ((`from` LIKE ? AND `to` = ?) OR (`from` LIKE ? AND `to` = ?))');
2436
-	            $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNmbrFrompr, $phoneNmbrTo, $phoneNmbrTopr, $phoneNmbrFrom]);
2437
-                }
2438
-
2439
-            } else {
2440
-
2441
-                $getsentmsgs = $this->connection->prepare('
2442
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
2443
-		       FROM `*PREFIX*sms_relent_sent`
2444
-		       WHERE `user_id` = ? AND ((`from` LIKE ? AND `to` = ?) OR (`from` LIKE ? AND `to` = ?))');
2445
-                $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNmbrFrompr, $phoneNmbrTo, $phoneNmbrTopr, $phoneNmbrFrom]);
2446
-            }
2447
-        }
2448
-
2449
-        $sentmsgs = [];
2450
-        while ($rowfetchedsmsg = $getsentmsgsres->fetch()) {
2451
-               $rowfetchedsmsg['table'] = 'sent';
2452
-               $sentmsgs[] = $rowfetchedsmsg;
2453
-        }
2454
-        $getsentmsgsres->closeCursor();
2455
-
2456
-        $groupedpernb = array_merge($recmsgs, $sentmsgs);
2457
-
2458
-        if ($this->groupManager->isAdmin($userId)) {
2459
-
2460
-            return $groupedpernb;
2461
-
2462
-        } else {
2463
-
2464
-            if ($restrdata) {
2465
-
2466
-                // Clean the phone numbers from tags
2467
-                $restrPhfin = [];
2468
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
2469
-
2470
-                    $restrpharr = explode(": ", $phvalue);
2471
-                    $restrPhfin[] = $restrpharr[1];
2472
-                }
2473
-
2474
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
2475
-                foreach ($groupedpernb as $gmdkey => $gmdvalue) {
2476
-
2477
-                         if ($gmdvalue['table'] == 'sent') {
2478
-
2479
-                             if (str_contains($gmdvalue['from'], "+")) {
2480
-                                 $fromnmbrarr = explode("+", $gmdvalue['from']);
2481
-                                 if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
2482
-                                     unset($groupedpernb[$gmdkey]);
2483
-                                 }
2484
-                             } else {
2485
-                                 $frmnmbrarr = explode(": ", $gmdvalue['from']);
2486
-                                 if (count($frmnmbrarr) == 2) {
2487
-                                     $nmbtbcmprd = $frmnmbrarr[1];
2488
-                                 } else { 
2489
-                                     $nmbtbcmprd = $frmnmbrarr[0];
2490
-                                 }
2491
-                                 if (in_array($nmbtbcmprd, $restrPhfin)) {
2492
-                                     unset($groupedpernb[$gmdkey]);
2493
-                                 }
2494
-                             }
2495
-
2496
-                         } elseif ($gmdvalue['table'] == 'received') {
2497
-
2498
-                             if (str_contains($gmdvalue['to'], "+")) {
2499
-                                 $fromnmbrarr = explode("+", $gmdvalue['to']);
2500
-                                 if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
2501
-                                     unset($groupedpernb[$gmdkey]);
2502
-                                 }
2503
-                             } else {
2504
-                                 $tonmbrarr = explode(": ", $gmdvalue['to']);
2505
-                                 if (count($tonmbrarr) == 2) {
2506
-                                     $tonmbrtbcmprd = $tonmbrarr[1];
2507
-                                 } else {
2508
-                                     $tonmbrtbcmprd = $tonmbrarr[0];
2509
-                                 }
2510
-                                 if (in_array($tonmbrtbcmprd, $restrPhfin)) {
2511
-                                     unset($groupedpernb[$gmdkey]);
2512
-                                 }
2513
-                             }
2514
-                         }
2515
-
2516
-                }
2517
-
2518
-                $groupedperconv = array_values($groupedpernb);
2519
-
2520
-                return $groupedperconv;
2521
-
2522
-            } else { return $groupedpernb; }
2523
-        }
2524
-     }
2525
-
2526
-
2527
-
2528
-     /**
2529
-      * @NoAdminRequired
2530
-      */
2531
-     public function savedisplayname($userId, $authorDisplayname, $from) {
2532
-
2533
-        if ($this->groupManager->isAdmin($userId)) {
2534
-
2535
-	    $updatedispnm = $this->connection->prepare('
2536
-			UPDATE `*PREFIX*sms_relent_received`
2537
-			SET `author_displayname` = ?
2538
-                        WHERE `from` = ?');
2539
-	    $updatedispnmres = $updatedispnm->execute([$authorDisplayname, $from]);
2540
-
2541
-            if ($updatedispnmres) {
2542
-                return $respupdname = "The new Display Name has been saved. If on the Settings page, the option 'Add the display name of the message author, before each message' is checked, when you refresh the page you will see the new Display Name before the messages.";
2543
-            } else {
2544
-                return $respupdname = "Error while trying to save the new Display Name to the database.";
2545
-            }
2546
-	    $updatedispnmres->closeCursor();
2547
-
2548
-        } else { return $respupdname = "Only admins can save Display Names for phone numbers that are not associated with Nextcloud users."; }
2549
-     }
2550
-
2551
-     /**
2552
-      * @NoAdminRequired
2553
-      */
2554
-     public function getmsgsperpgnewmsgarchnb($userId) {
2555
-
2556
-        $sqlmpp = $this->connection->prepare('
2557
-	       SELECT `user_id`, `messagesperpage`, `msg_check_interval`, `archived_conv_nmbr`
2558
-               FROM `*PREFIX*sms_relent_settings`
2559
-               WHERE `user_id` = ?');
2560
-	$result = $sqlmpp->execute([$userId]);
2561
-        $mesppdata = $result->fetch();
2562
-        $result->closeCursor();
2563
-        if ($mesppdata) {
2564
-            $mesperpagedb = ['msgsperpage' => $mesppdata['messagesperpage'], 'newmsgcheck' => $mesppdata['msg_check_interval'], 'archconvnb' => $mesppdata['archived_conv_nmbr'] ];
2565
-            return $mesperpagedb;
2566
-        }
2567
-     }
2568
-
2569
-     /**
2570
-      * @NoAdminRequired
2571
-      */
2572
-     public function getnewmsgindicator($userId) {
2573
-
2574
-        $sqlnmsg = $this->connection->prepare('
2575
-	       SELECT `user_id`, `new_message_rcd` 
2576
-               FROM `*PREFIX*sms_relent_settings`
2577
-               WHERE `user_id` = ?');
2578
-	$resultnmsg = $sqlnmsg->execute([$userId]);
2579
-        $nmsgdata = $resultnmsg->fetch();
2580
-        $resultnmsg->closeCursor();
2581
-
2582
-        if ($nmsgdata) {
2583
-            $newmsgdb = $nmsgdata['new_message_rcd'];
2584
-
2585
-            if ($newmsgdb == 1) {
2586
-                // Change the 'new message received' indicator to 0 in the 'sms_relent_settings' table, for the current user
2587
-                $newMsgRcd = 0;
2588
-	        $sqlupdnmsc = $this->connection->prepare('
2589
-			UPDATE `*PREFIX*sms_relent_settings`
2590
-			SET `new_message_rcd` = ?
2591
-	                WHERE `user_id` = ?');
2592
-	        $updatenmRcd = $sqlupdnmsc->execute([$newMsgRcd, $userId]);
2593
-	        $updatenmRcd->closeCursor();
2594
-            }
2595
-
2596
-            return $newmsgdb;
2597
-        }
2598
-     }
2599
-
2600
-     /**
2601
-      * @NoAdminRequired
2602
-      */
2603
-     public function getsettings($userId) {
2604
-
2605
-        $getsettings = $this->connection->prepare('
2606
-                    SELECT `id`, `user_id`, `telapi_url_rec`, `telapi_url`, `nexapi_url_rec`, `nexapi_url`, `twilapi_url_rec`, `twilapi_url`, `flowapi_url_rec`, `flowapi_url`, 
2607
-                           `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `show_display_names`, `add_display_names`, `msg_check_interval`, `archived_conv_nmbr`                           
2608
-		    FROM  `*PREFIX*sms_relent_settings`
2609
-		    WHERE `user_id` = ?');
2610
-        $resultsettings = $getsettings->execute([$userId]);
2611
-
2612
-        $settingsfromdb = $resultsettings->fetch();
2613
-
2614
-        $resultsettings->closeCursor();
2615
-
2616
-        if ($settingsfromdb) {
2617
-
2618
-            if ($this->groupManager->isAdmin($userId)) { $adminreguser = 'admin'; } else { $adminreguser = 'reguser'; }
2619
-            $settingsfromdb['adminornot'] = $adminreguser;
2620
-
2621
-            return $settingsfromdb;
2622
-        }
2623
-
2624
-     }
2625
-
2626
-
2627
-     public function updatenumberrestrictions($userId, $savedByDsplname, $phoneNumber, $groups, $users) {
2628
-
2629
-        if ($this->groupManager->isAdmin($userId)) {
2630
-
2631
-            $groupsproc = implode("|", $groups);
2632
-            $usersproc = implode("|", $users);
2633
-
2634
-            // Get the restrictions for the current number from the 'sms_relent_restrict' table
2635
-            $getrestr = $this->connection->prepare('SELECT `user_id`, `saved_by_dsplname`, `phone_number`, `groups`, `users` FROM `*PREFIX*sms_relent_restrict` WHERE
2636
-                                                   `phone_number` = ?');
2637
-            $getrestrresult = $getrestr->execute([$phoneNumber]);
2638
-            $crntrestr = $getrestrresult->fetch();
2639
-            $getrestrresult->closeCursor();
2640
-
2641
-            if ($getrestrresult && !$crntrestr) {
2642
-
2643
-	        $insertphrestr = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_restrict` (`user_id`, `saved_by_dsplname`, `phone_number`, `groups`, `users`) VALUES
2644
-                                                             (?, ?, ?, ?, ?)');
2645
-	        if ($insertphrestr->execute([$userId, $savedByDsplname, $phoneNumber, $groupsproc, $usersproc])) { $messagetosend = 'success'; } else { $messagetosend = 'failure'; }  
2646
-         
2647
-            } elseif ($getrestrresult && $crntrestr) {
2648
-
2649
-	        $updatephrestr = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_restrict` SET `user_id` = ?, `saved_by_dsplname` = ?, `groups` = ?, `users` = ? WHERE 
2650
-                                                            `phone_number` = ?');
2651
-	        if ($admupdatephonerestr = $updatephrestr->execute([$userId, $savedByDsplname, $groupsproc, $usersproc, $phoneNumber])) { 
2652
-                    $messagetosend = 'success';
2653
-                } else { 
2654
-                    $messagetosend = 'failure'; 
2655
-                }
2656
-
2657
-	        $admupdatephonerestr->closeCursor();
2658
-            }
2659
-            return $messagetosend;
2660
-        }
2661
-     }
2662
-
2663
-
2664
-     private function updateusercredentials($userId, $usersarr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, $plivoapisecret, $plivosendernm, 
2665
-                                            $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret) {
2666
-
2667
-        $msgtosend = 'success';
2668
-
2669
-        foreach ($usersarr as $usrkey => $usrvalue) {
2670
-
2671
-            $getusrset = $this->connection->prepare('SELECT `user_id` FROM `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
2672
-	    $getusrsetres = $getusrset->execute([$usrvalue]);
2673
-	    $getcrunmdata = $getusrsetres->fetch();
2674
-	    $getusrsetres->closeCursor();
2675
-
2676
-            if ($getcrunmdata) {
2677
-
2678
-                if ($provider == "tnx") {
2679
-
2680
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `telapi_key` = ?, `tel_pub_key` = ?, `messaging_profile_id` = ?,
2681
-                                                           `tel_sender_name` = ? WHERE `user_id` = ?');
2682
-                    if ($upusrsetres = $upusrset->execute([$telapiKey, $telpubKey, $telmsgprofid, $telsendername, $usrvalue])) {
2683
-                        $msgtosend = 'success';
2684
-                    } else { $msgtosend = 'failure'; }
2685
-                    $upusrsetres->closeCursor();
2686
-
2687
-                } elseif ($provider == "plv") {
2688
-
2689
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `nexapi_key` = ?, `nexapi_secret` = ?, `nex_sender_name` = ?
2690
-                                                            WHERE `user_id` = ?');
2691
-                    if ($upusrsetres = $upusrset->execute([$plivoapikey, $plivoapisecret, $plivosendernm, $usrvalue])) {
2692
-                        $msgtosend = 'success';
2693
-                    } else { $msgtosend = 'failure'; }
2694
-                    $upusrsetres->closeCursor();
2695
-
2696
-                } elseif ($provider == "twl") {
2697
-
2698
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `twilapi_key` = ?, `twilapi_secret` = ?, `twil_sender_name` = ?
2699
-                                                            WHERE `user_id` = ?');
2700
-                    if ($upusrsetres = $upusrset->execute([$twilapikey, $twilapisecret, $twilsendernm, $usrvalue])) {
2701
-                        $msgtosend = 'success';
2702
-                    } else { $msgtosend = 'failure'; }
2703
-                    $upusrsetres->closeCursor();
2704
-
2705
-                } elseif ($provider == "flr") {
2706
-
2707
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `flowapi_key` = ?, `flowapi_secret` = ? WHERE `user_id` = ?');
2708
-                    if ($upusrsetres = $upusrset->execute([$flowapikey, $flowapisecret, $usrvalue])) {
2709
-                        $msgtosend = 'success';
2710
-                    } else { $msgtosend = 'failure'; }
2711
-                    $upusrsetres->closeCursor();
2712
-                }
2713
-
2714
-            } else {
2715
-
2716
-                $emptfld = "";
2717
-
2718
-                if ($provider == "tnx") {
2719
-
2720
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
2721
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
2722
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `tel_sender_name`) 
2723
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
2724
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, 
2725
-                                                           $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $telsendername])) {
2726
-                        $msgtosend = 'success';
2727
-                    } else { $msgtosend = 'failure'; }
2728
-                    $upusrsetres->closeCursor();
2729
-
2730
-                } elseif ($provider == "plv") {
2731
-
2732
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
2733
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
2734
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `nex_sender_name`)
2735
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
2736
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $plivoapikey, $plivoapisecret, $emptfld, $emptfld, 
2737
-                                                           $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $plivosendernm])) {
2738
-                        $msgtosend = 'success';
2739
-                    } else { $msgtosend = 'failure'; }
2740
-                    $upusrsetres->closeCursor();
2741
-
2742
-                } elseif ($provider == "twl") {
2743
-
2744
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
2745
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
2746
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `twil_sender_name`)
2747
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
2748
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $plivoapikey, $plivoapisecret, $emptfld, $emptfld, 
2749
-                                                           $twilapikey, $twilapisecret, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $twilsendernm])) {
2750
-                        $msgtosend = 'success';
2751
-                    } else { $msgtosend = 'failure'; }
2752
-                    $upusrsetres->closeCursor();
2753
-
2754
-                } elseif ($provider == "flr") {
2755
-
2756
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
2757
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
2758
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`)
2759
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
2760
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $plivoapikey, $plivoapisecret, $emptfld, $emptfld, 
2761
-                                                           $twilapikey, $twilapisecret, $emptfld, $emptfld, $flowapikey, $flowapisecret, $emptfld, $emptfld])) {
2762
-                        $msgtosend = 'success';
2763
-                    } else { $msgtosend = 'failure'; }
2764
-                    $upusrsetres->closeCursor();
2765
-                }
2766
-
2767
-            }                 
2768
-        }
2769
-
2770
-        return $msgtosend;
2771
-     }
2772
-
2773
-
2774
-     private function removeusercredentials($userId, $usersarr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, $plivoapisecret, $plivosendernm, 
2775
-                                            $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret) {
2776
-
2777
-        $msgtosend = 'success';
2778
-
2779
-        foreach ($usersarr as $usrkey => $usrvalue) {
2780
-
2781
-                $emptyfld = "";
2782
-
2783
-                if ($provider == "tnx") {
2784
-
2785
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `telapi_key` = ?, `tel_pub_key` = ?, `messaging_profile_id` = ?,
2786
-                                                           `tel_sender_name` = ? WHERE `user_id` = ?');
2787
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $emptyfld, $emptyfld, $usrvalue])) {
2788
-                        $msgtosend = 'success';
2789
-                    } else { $msgtosend = 'failure'; }
2790
-                    $upusrsetres->closeCursor();
2791
-
2792
-                } elseif ($provider == "plv") {
2793
-
2794
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `nexapi_key` = ?, `nexapi_secret` = ?, `nex_sender_name` = ?
2795
-                                                            WHERE `user_id` = ?');
2796
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $emptyfld, $usrvalue])) {
2797
-                        $msgtosend = 'success';
2798
-                    } else { $msgtosend = 'failure'; }
2799
-                    $upusrsetres->closeCursor();
2800
-
2801
-                } elseif ($provider == "twl") {
2802
-
2803
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `twilapi_key` = ?, `twilapi_secret` = ?, `twil_sender_name` = ?
2804
-                                                            WHERE `user_id` = ?');
2805
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $emptyfld, $usrvalue])) {
2806
-                        $msgtosend = 'success';
2807
-                    } else { $msgtosend = 'failure'; }
2808
-                    $upusrsetres->closeCursor();
2809
-
2810
-                } elseif ($provider == "flr") {
2811
-
2812
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `flowapi_key` = ?, `flowapi_secret` = ? WHERE `user_id` = ?');
2813
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $usrvalue])) {
2814
-                        $msgtosend = 'success';
2815
-                    } else { $msgtosend = 'failure'; }
2816
-                    $upusrsetres->closeCursor();
2817
-                }
2818
-        }
2819
-
2820
-        return $msgtosend;
2821
-     }
2822
-
2823
-
2824
-     public function updatekeysallowedusers($userId, $groups, $users, $provider) {
2825
-
2826
-       if ($this->groupManager->isAdmin($userId)) {
2827
-
2828
-          $msgtosend = 'success';
2829
-
2830
-          // Get the users that belong to the 'admin' group
2831
-          $getadmn = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2832
-          $getadmnres = $getadmn->execute(['admin']);
2833
-
2834
-          $usersadmin = [];
2835
-          while ($getadmnusrs = $getadmnres->fetch()) {
2836
-                 $usersadmin[] = $getadmnusrs['uid'];
2837
-          }
2838
-          $getadmnres->closeCursor();
2839
-          
2840
-          // Get the API keys and alphanumeric sender IDs for the current admin, from the 'sms_relent_settings' table
2841
-          $getadmset = $this->connection->prepare('SELECT `user_id`, `telapi_key`, `tel_pub_key`, `messaging_profile_id`, `tel_sender_name`, `nexapi_key`, `nexapi_secret`,
2842
-                                                  `nex_sender_name`, `twilapi_key`, `twilapi_secret`, `twil_sender_name`, `flowapi_key`, `flowapi_secret` 
2843
-                                                   FROM `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
2844
-	  $getadmsetres = $getadmset->execute([$userId]);
2845
-	  $getcradmdata = $getadmsetres->fetch();
2846
-          $telapiKey = $getcradmdata['telapi_key'];
2847
-          $telpubKey = $getcradmdata['tel_pub_key'];
2848
-          $telmsgprofid = $getcradmdata['messaging_profile_id'];
2849
-          $telsendername = $getcradmdata['tel_sender_name'];
2850
-          $plivoapikey = $getcradmdata['nexapi_key'];
2851
-          $plivoapisecret = $getcradmdata['nexapi_secret'];
2852
-          $plivosendernm = $getcradmdata['nex_sender_name'];
2853
-          $twilapikey = $getcradmdata['twilapi_key'];
2854
-          $twilapisecret = $getcradmdata['twilapi_secret'];
2855
-          $twilsendernm = $getcradmdata['twil_sender_name'];
2856
-          $flowapikey = $getcradmdata['flowapi_key'];
2857
-          $flowapisecret = $getcradmdata['flowapi_secret'];
2858
-	  $getadmsetres->closeCursor();
2859
-
2860
-          if ($getcradmdata) {
2861
-
2862
-            if ($provider == "tnx") {
2863
-
2864
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed` FROM `*PREFIX*sms_relent_subac`');
2865
-                $getalwdres = $getalwd->execute();
2866
-
2867
-                $upchck = 0;
2868
-                $seldataarr = [];
2869
-                $groupsPerProvider = '';
2870
-                $usersPerProvider = '';
2871
-                while ($crntrestr = $getalwdres->fetch()) {
2872
-                       if ($crntrestr['user_id'] != $userId) {
2873
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['tnx_groups_allowed'], 'usersallowed' => $crntrestr['tnx_users_allowed']];
2874
-                       } else {
2875
-                           $upchck++;
2876
-                           $groupsPerProvider = $crntrestr['tnx_groups_allowed'];
2877
-                           $usersPerProvider = $crntrestr['tnx_users_allowed'];
2878
-                       }
2879
-                }
2880
-                $getalwdres->closeCursor();
2881
-
2882
-
2883
-            } elseif ($provider == "plv") {
2884
-
2885
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `plv_groups_allowed`, `plv_users_allowed` FROM `*PREFIX*sms_relent_subac`');
2886
-                $getalwdres = $getalwd->execute();
2887
-
2888
-                $upchck = 0;
2889
-                $seldataarr = [];
2890
-                $groupsPerProvider = '';
2891
-                $usersPerProvider = '';
2892
-                while ($crntrestr = $getalwdres->fetch()) {
2893
-                       if ($crntrestr['user_id'] != $userId) {
2894
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['plv_groups_allowed'], 'usersallowed' => $crntrestr['plv_users_allowed']];
2895
-                       } else {
2896
-                           $upchck++;
2897
-                           $groupsPerProvider = $crntrestr['plv_groups_allowed'];
2898
-                           $usersPerProvider = $crntrestr['plv_users_allowed'];
2899
-                       }
2900
-                }
2901
-                $getalwdres->closeCursor();
2902
-
2903
-            } elseif ($provider == "twl") {
2904
-
2905
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `twl_groups_allowed`, `twl_users_allowed` FROM `*PREFIX*sms_relent_subac`');
2906
-                $getalwdres = $getalwd->execute();
2907
-
2908
-                $upchck = 0;
2909
-                $seldataarr = [];
2910
-                $groupsPerProvider = '';
2911
-                $usersPerProvider = '';
2912
-                while ($crntrestr = $getalwdres->fetch()) {
2913
-                       if ($crntrestr['user_id'] != $userId) {
2914
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['twl_groups_allowed'], 'usersallowed' => $crntrestr['twl_users_allowed']];
2915
-                       } else {
2916
-                           $upchck++;
2917
-                           $groupsPerProvider = $crntrestr['twl_groups_allowed'];
2918
-                           $usersPerProvider = $crntrestr['twl_users_allowed'];
2919
-                       }
2920
-                }
2921
-                $getalwdres->closeCursor();
2922
-
2923
-            } elseif ($provider == "flr") {
2924
-
2925
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`');
2926
-                $getalwdres = $getalwd->execute();
2927
-
2928
-                $upchck = 0;
2929
-                $seldataarr = [];
2930
-                $groupsPerProvider = '';
2931
-                $usersPerProvider = '';
2932
-                while ($crntrestr = $getalwdres->fetch()) {
2933
-                       if ($crntrestr['user_id'] != $userId) {
2934
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['flr_groups_allowed'], 'usersallowed' => $crntrestr['flr_users_allowed']];
2935
-                       } else {
2936
-                           $upchck++;
2937
-                           $groupsPerProvider = $crntrestr['flr_groups_allowed'];
2938
-                           $usersPerProvider = $crntrestr['flr_users_allowed'];
2939
-                       }
2940
-                }
2941
-                $getalwdres->closeCursor();
2942
-
2943
-            }
2944
-
2945
-
2946
-            if ($seldataarr) {
2947
-
2948
-                // Check if any of the current users are among the already saved ones (for the same provider)
2949
-                $usrchck = 0;
2950
-                $usrmsgarr = [];
2951
-                foreach ($users as $ukey => $uvalue) {
2952
-                         if ($uvalue != '') {
2953
-                             for ($j = 0; $j < count($seldataarr); $j++) {
2954
-                                  if (str_contains($seldataarr[$j]['usersallowed'], $uvalue)) {
2955
-                                      $usrchck++;
2956
-                                      $usrmsgarr[] = "The admin " . $seldataarr[$j]['userid'] . " has already allowed the user " . $uvalue . " to access his API keys for this provider.";
2957
-                                  }
2958
-                             }
2959
-                         }
2960
-                }
2961
-
2962
-                // Check if any of the current groups are among the already saved ones (for the same provider)
2963
-                $grchck = 0;
2964
-                $grmsgarr = [];
2965
-                foreach ($groups as $gkey => $gvalue) {
2966
-                         if ($gvalue != '') {
2967
-                             for ($k = 0; $k < count($seldataarr); $k++) {
2968
-                                  if (str_contains($seldataarr[$k]['groupsallowed'], $gvalue)) {
2969
-                                      $grchck++;
2970
-                                      $grmsgarr[] = "The admin " . $seldataarr[$k]['userid'] . " has already allowed the group " . $gvalue . " to access his API keys for this provider.";
2971
-                                  }
2972
-                             }
2973
-                         }
2974
-                }
2975
-
2976
-                if ($usrchck == 0 && $grchck == 0) {
2977
-
2978
-
2979
-                    // Remove the previously saved API keys for each user in the specified groups, for the current provider
2980
-                    if ($groupsPerProvider != '') {
2981
-
2982
-                        $groupsPerProvarr = explode("|", $groupsPerProvider);
2983
-                        foreach ($groupsPerProvarr as $prgrkey => $prgrvalue) {
2984
-
2985
-                                 if ($prgrvalue != "admin" && $prgrvalue != '') {
2986
-
2987
-                                     // Get all the users that belong to the group
2988
-	                             $getusringrp = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2989
-			             $getusringrpres = $getusringrp->execute([$prgrvalue]);
2990
-
2991
-                                     $usersingroup = [];
2992
-			             while ($getusrnm = $getusringrpres->fetch()) {
2993
-                                            if ($getusrnm['uid'] != $userId) {
2994
-
2995
-		                                // Ensure the current user is not an admin
2996
-                                                if (!in_array($getusrnm['uid'], $usersadmin)) {
2997
-                                                     $usersingroup[] = $getusrnm['uid'];
2998
-                                                }
2999
-                                            }
3000
-                                     }
3001
-			             $getusringrpres->closeCursor();
3002
-
3003
-                                     if ($usersingroup) {
3004
-                                         $msgtosend = $this->removeusercredentials($userId, $usersingroup, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3005
-                                                                               $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3006
-                                     }
3007
-                                 }
3008
-
3009
-                        }
3010
-                    }
3011
-
3012
-
3013
-                    // Remove the previously saved API keys for each user, for the current provider
3014
-                    if ($usersPerProvider != '') {
3015
-
3016
-                        $usersPerProvarr = explode("|", $usersPerProvider);
3017
-                        if ($usersPerProvarr) {
3018
-
3019
-                            $ctusernamearrpr = [];
3020
-                            foreach ($usersPerProvarr as $usrKeypr => $usrValuepr) {
3021
-
3022
-		                 // Get the username for this Display Name
3023
-		                 $getacdataunmpr = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
3024
-		                 $getacdataunmprres = $getacdataunmpr->execute(['displayname', $usrValuepr]);
3025
-		                 $acdatausrnamepr = $getacdataunmprres->fetch();
3026
-                                 if ($acdatausrnamepr['uid'] != $userId) {
3027
-
3028
-		                     // Ensure the current user is not an admin
3029
-                                     if (!in_array($acdatausrnamepr['uid'], $usersadmin)) {
3030
-                                          $ctusernamearrpr[] = $acdatausrnamepr['uid'];
3031
-                                     }
3032
-
3033
-                                 }
3034
-		                 $getacdataunmprres->closeCursor();
3035
-                            }
3036
-
3037
-                            $msgtosend = $this->removeusercredentials($userId, $ctusernamearrpr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey,
3038
-                                                                      $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3039
-                        }
3040
-                    }
3041
-
3042
-
3043
-                    // Insert the provider's API keys for the allowed users
3044
-                    if ($users) {
3045
-
3046
-                        $ctusernamearruid = [];
3047
-                        $ctusernamearr = [];
3048
-                        foreach ($users as $usrKey => $usrValue) {
3049
-                             if ($usrValue != '') {
3050
-		                 // Get the username for this Display Name
3051
-		                 $getacdataunm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
3052
-		                 $getacdataunmres = $getacdataunm->execute(['displayname', $usrValue]);
3053
-		                 $acdatausrname = $getacdataunmres->fetch();
3054
-                                 if ($acdatausrname['uid'] != $userId) {
3055
-
3056
-		                     // Ensure the current user is not an admin
3057
-                                     if (!in_array($acdatausrname['uid'], $usersadmin)) {
3058
-                                         $ctusernamearruid[] = $acdatausrname['uid'];
3059
-                                         $ctusernamearr[] = $usrValue;
3060
-                                     }
3061
-
3062
-                                 }
3063
-		                 $getacdataunmres->closeCursor();
3064
-                             }
3065
-                        }
3066
-
3067
-
3068
-                        // Insert/update the allowed users in the 'sms_relent_subac' table
3069
-                        $usersalwdrs = implode("|", $ctusernamearr);
3070
-
3071
-                        if ($upchck == 0) {
3072
-
3073
-		            if ($provider == "tnx") {
3074
-
3075
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_users_allowed`) VALUES (?, ?)');
3076
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3077
-                                $upchck++;
3078
-
3079
-		            } elseif ($provider == "plv") {
3080
-
3081
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_users_allowed`) VALUES (?, ?)');
3082
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
3083
-                                $upchck++;
3084
-
3085
-		            } elseif ($provider == "twl") {
3086
-
3087
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_users_allowed`) VALUES (?, ?)');
3088
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
3089
-                                $upchck++;
3090
-
3091
-		            } elseif ($provider == "flr") {
3092
-
3093
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_users_allowed`) VALUES (?, ?)');
3094
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3095
-                                $upchck++;
3096
-		            }
3097
-
3098
-                        } else {
3099
-
3100
-		            if ($provider == "tnx") {
3101
-
3102
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_users_allowed` = ? WHERE `user_id` = ?');
3103
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3104
-
3105
-		            } elseif ($provider == "plv") {
3106
-
3107
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_users_allowed` = ? WHERE `user_id` = ?');
3108
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3109
-
3110
-		            } elseif ($provider == "twl") {
3111
-
3112
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_users_allowed` = ? WHERE `user_id` = ?');
3113
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3114
-
3115
-		            } elseif ($provider == "flr") {
3116
-
3117
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_users_allowed` = ? WHERE `user_id` = ?');
3118
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3119
-		            }
3120
-                        }
3121
-
3122
-                        $datalwdres->closeCursor();
3123
-
3124
-
3125
-                        // Insert/update the credentials in the 'sms_relent_settings' table, for each allowed user
3126
-                        $msgtosend = $this->updateusercredentials($userId, $ctusernamearruid, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3127
-                                                                  $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3128
-                    }
3129
-
3130
-                    // Insert the provider's API keys for the allowed groups
3131
-                    if ($groups) {
3132
-
3133
-                        $allwdgrps = [];
3134
-                        foreach ($groups as $groupkey => $groupvalue) {
3135
-
3136
-                                 if ($groupvalue != "admin" && $groupvalue != '') {
3137
-
3138
-                                     $allwdgrps[] = $groupvalue;
3139
-
3140
-                                     // Get all the users that belong to the group
3141
-			             $getacdusr = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
3142
-			             $getacdusrres = $getacdusr->execute([$groupvalue]);
3143
-
3144
-                                     $usersingrp = [];
3145
-			             while ($getacdusrnm = $getacdusrres->fetch()) {
3146
-                                            if ($getacdusrnm['uid'] != $userId) {
3147
-
3148
-		                                // Ensure the current user is not an admin
3149
-                                                if (!in_array($getacdusrnm['uid'], $usersadmin)) {
3150
-                                                     $usersingrp[] = $getacdusrnm['uid'];
3151
-                                                }
3152
-                                            }
3153
-                                     }
3154
-			             $getacdusrres->closeCursor();
3155
-
3156
-                                     // Insert the provider's API keys for each user of the allowed groups
3157
-                                     if ($usersingrp) {
3158
-                                         $msgtosend = $this->updateusercredentials($userId, $usersingrp, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3159
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3160
-                                     }
3161
-                                 }
3162
-
3163
-
3164
-		                // Insert/update the allowed groups in the 'sms_relent_subac' table
3165
-		                $groupsalwdrs = implode("|", $allwdgrps);
3166
-
3167
-		                if ($upchck == 0) {
3168
-
3169
-				    if ($provider == "tnx") {
3170
-
3171
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_groups_allowed`) VALUES (?, ?)');
3172
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3173
-                                        $upchck++;
3174
-
3175
-				    } elseif ($provider == "plv") {
3176
-
3177
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_groups_allowed`) VALUES (?, ?)');
3178
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3179
-                                        $upchck++;
3180
-
3181
-				    } elseif ($provider == "twl") {
3182
-
3183
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_groups_allowed`) VALUES (?, ?)');
3184
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3185
-                                        $upchck++;
3186
-
3187
-				    } elseif ($provider == "flr") {
3188
-
3189
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_groups_allowed`) VALUES (?, ?)');
3190
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3191
-                                        $upchck++;
3192
-				    }
3193
-
3194
-		                } else {
3195
-
3196
-				    if ($provider == "tnx") {
3197
-
3198
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_groups_allowed` = ? WHERE `user_id` = ?');
3199
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3200
-
3201
-				    } elseif ($provider == "plv") {
3202
-
3203
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_groups_allowed` = ? WHERE `user_id` = ?');
3204
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3205
-
3206
-				    } elseif ($provider == "twl") {
3207
-
3208
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_groups_allowed` = ? WHERE `user_id` = ?');
3209
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3210
-
3211
-				    } elseif ($provider == "flr") {
3212
-
3213
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_groups_allowed` = ? WHERE `user_id` = ?');
3214
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3215
-				    }
3216
-		                }
3217
-
3218
-		                $datalwdres->closeCursor();
3219
-                        }
3220
-
3221
-                    }
3222
-
3223
-                } else {
3224
-
3225
-                        if ($grmsgarr) {
3226
-                            $grppart = implode(" ", $grmsgarr) . " A group cannot be allowed access to 2 different sets of API keys for the same SMS provider.";
3227
-                        } else { $grppart = ''; }
3228
-
3229
-                        if ($usrmsgarr) {
3230
-                            $usrpart = implode(" ", $usrmsgarr) . " A user cannot be allowed access to 2 different sets of API keys for the same SMS provider.";
3231
-                        } else { $usrpart = ''; }
3232
-
3233
-                    $msgtosend = $grppart . $usrpart;
3234
-                }
3235
-
3236
-
3237
-            } else {
3238
-
3239
-                if ($upchck == 0) {
3240
-
3241
-                    // Insert the provider's API keys for the allowed users
3242
-                    if ($users) {
3243
-
3244
-                        $ctusernamearruid = [];
3245
-                        $ctusernamearr = [];
3246
-                        foreach ($users as $usrKey => $usrValue) {
3247
-                             if ($usrValue != '') {
3248
-		                 // Get the username for this Display Name
3249
-		                 $getacdataunm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
3250
-		                 $getacdataunmres = $getacdataunm->execute(['displayname', $usrValue]);
3251
-		                 $acdatausrname = $getacdataunmres->fetch();
3252
-                                 if ($acdatausrname['uid'] != $userId) {
3253
-
3254
-		                     // Ensure the current user is not an admin
3255
-                                     if (!in_array($acdatausrname['uid'], $usersadmin)) {
3256
-                                         $ctusernamearruid[] = $acdatausrname['uid'];
3257
-                                         $ctusernamearr[] = $usrValue;
3258
-                                     }
3259
-
3260
-                                 }
3261
-		                 $getacdataunmres->closeCursor();
3262
-                             }
3263
-                        }
3264
-
3265
-
3266
-                        // Insert the allowed users into the 'sms_relent_subac' table
3267
-                        $usersalwdrs = implode("|", $ctusernamearr);
3268
-
3269
-		        if ($provider == "tnx") {
3270
-
3271
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_users_allowed`) VALUES (?, ?)');
3272
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
3273
-                            $upchck++;
3274
-
3275
-		        } elseif ($provider == "plv") {
3276
-
3277
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_users_allowed`) VALUES (?, ?)');
3278
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3279
-                            $upchck++;
3280
-
3281
-		        } elseif ($provider == "twl") {
3282
-
3283
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_users_allowed`) VALUES (?, ?)');
3284
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3285
-                            $upchck++;
3286
-
3287
-		        } elseif ($provider == "flr") {
3288
-
3289
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_users_allowed`) VALUES (?, ?)');
3290
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3291
-                            $upchck++;
3292
-		        }
3293
-
3294
-                        $datalwdres->closeCursor();
3295
-
3296
-
3297
-                        // Insert/update the credentials in the 'sms_relent_settings' table, for each allowed user
3298
-                        $msgtosend = $this->updateusercredentials($userId, $ctusernamearruid, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3299
-                                                                  $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3300
-                    }
3301
-
3302
-                    // Insert the provider's API keys for the allowed groups
3303
-                    if ($groups) {
3304
-
3305
-                        $allwdgrps = [];
3306
-                        foreach ($groups as $groupkey => $groupvalue) {
3307
-
3308
-                                 if ($groupvalue != "admin" && $groupvalue != '') {
3309
-
3310
-                                     $allwdgrps[] = $groupvalue;
3311
-
3312
-                                     // Get all the users that belong to the group
3313
-			             $getacdusr = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
3314
-			             $getacdusrres = $getacdusr->execute([$groupvalue]);
3315
-
3316
-                                     $usersingrp = [];
3317
-			             while ($getacdusrnm = $getacdusrres->fetch()) {
3318
-                                            if ($getacdusrnm['uid'] != $userId) {
3319
-
3320
-		                                // Ensure the current user is not an admin
3321
-                                                if (!in_array($getacdusrnm['uid'], $usersadmin)) {
3322
-                                                     $usersingrp[] = $getacdusrnm['uid'];
3323
-                                                }
3324
-                                            }
3325
-                                     }
3326
-			             $getacdusrres->closeCursor();
3327
-
3328
-                                     // Insert the provider's API keys for each user of the allowed groups
3329
-                                     if ($usersingrp) {
3330
-                                         $msgtosend = $this->updateusercredentials($userId, $usersingrp, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3331
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3332
-                                     }
3333
-                                 }
3334
-
3335
-
3336
-		                // Insert the allowed groups into the 'sms_relent_subac' table
3337
-		                $groupsalwdrs = implode("|", $allwdgrps);
3338
-
3339
-                                if ($upchck == 0) {
3340
-
3341
-				    if ($provider == "tnx") {
3342
-
3343
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_groups_allowed`) VALUES (?, ?)');
3344
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
3345
-
3346
-				    } elseif ($provider == "plv") {
3347
-
3348
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_groups_allowed`) VALUES (?, ?)');
3349
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
3350
-
3351
-				    } elseif ($provider == "twl") {
3352
-
3353
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_groups_allowed`) VALUES (?, ?)');
3354
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
3355
-
3356
-				    } elseif ($provider == "flr") {
3357
-
3358
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_groups_allowed`) VALUES (?, ?)');
3359
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
3360
-				    }
3361
-
3362
-                                } else {
3363
-
3364
-				    if ($provider == "tnx") {
3365
-
3366
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_groups_allowed` = ? WHERE `user_id` = ?');
3367
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3368
-
3369
-				    } elseif ($provider == "plv") {
3370
-
3371
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_groups_allowed` = ? WHERE `user_id` = ?');
3372
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3373
-
3374
-				    } elseif ($provider == "twl") {
3375
-
3376
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_groups_allowed` = ? WHERE `user_id` = ?');
3377
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3378
-
3379
-				    } elseif ($provider == "flr") {
3380
-
3381
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_groups_allowed` = ? WHERE `user_id` = ?');
3382
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3383
-				    }
3384
-
3385
-                                }
3386
-
3387
-		                $datalwdres->closeCursor();
3388
-                        }
3389
-
3390
-                    }
3391
-
3392
-                } else {
3393
-
3394
-                    // Remove the previously saved API keys for each user in the specified groups, for the current provider
3395
-                    if ($groupsPerProvider != '') {
3396
-
3397
-                        $groupsPerProvarr = explode("|", $groupsPerProvider);
3398
-                        foreach ($groupsPerProvarr as $prgrkey => $prgrvalue) {
3399
-
3400
-                                 if ($prgrvalue != "admin" && $prgrvalue != '') {
3401
-
3402
-                                     // Get all the users that belong to the group
3403
-	                             $getusringrp = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
3404
-			             $getusringrpres = $getusringrp->execute([$prgrvalue]);
3405
-
3406
-                                     $usersingroup = [];
3407
-			             while ($getusrnm = $getusringrpres->fetch()) {
3408
-                                            if ($getusrnm['uid'] != $userId) {
3409
-
3410
-		                                // Ensure the current user is not an admin
3411
-                                                if (!in_array($getusrnm['uid'], $usersadmin)) {
3412
-                                                     $usersingroup[] = $getusrnm['uid'];
3413
-                                                }
3414
-                                            }
3415
-                                     }
3416
-			             $getusringrpres->closeCursor();
3417
-
3418
-                                     if ($usersingroup) {
3419
-                                         $msgtosend = $this->removeusercredentials($userId, $usersingroup, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3420
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3421
-                                     }
3422
-                                 }
3423
-
3424
-                        }
3425
-                    }
3426
-
3427
-
3428
-                    // Remove the previously saved API keys for each user, for the current provider
3429
-                    if ($usersPerProvider != '') {
3430
-
3431
-                        $usersPerProvarr = explode("|", $usersPerProvider);
3432
-                        if ($usersPerProvarr) {
3433
-
3434
-                            $ctusernamearrpr = [];
3435
-                            foreach ($usersPerProvarr as $usrKeypr => $usrValuepr) {
3436
-
3437
-		                 // Get the username for this Display Name
3438
-		                 $getacdataunmpr = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
3439
-		                 $getacdataunmprres = $getacdataunmpr->execute(['displayname', $usrValuepr]);
3440
-		                 $acdatausrnamepr = $getacdataunmprres->fetch();
3441
-                                 if ($acdatausrnamepr['uid'] != $userId) {
3442
-
3443
-		                     // Ensure the current user is not an admin
3444
-                                     if (!in_array($acdatausrnamepr['uid'], $usersadmin)) {
3445
-                                          $ctusernamearrpr[] = $acdatausrnamepr['uid'];
3446
-                                     }
3447
-
3448
-                                 }
3449
-		                 $getacdataunmprres->closeCursor();
3450
-                            }
3451
-
3452
-                            $msgtosend = $this->removeusercredentials($userId, $ctusernamearrpr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey,
3453
-                                                                      $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3454
-                        }
3455
-                    }
3456
-
3457
-
3458
-
3459
-                    // Insert the provider's API keys for the allowed users
3460
-                    if ($users) {
3461
-
3462
-                        $ctusernamearruid = [];
3463
-                        $ctusernamearr = [];
3464
-                        foreach ($users as $usrKey => $usrValue) {
3465
-                             if ($usrValue != '') {
3466
-		                 // Get the username for this Display Name
3467
-		                 $getacdataunm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
3468
-		                 $getacdataunmres = $getacdataunm->execute(['displayname', $usrValue]);
3469
-		                 $acdatausrname = $getacdataunmres->fetch();
3470
-                                 if ($acdatausrname['uid'] != $userId) {
3471
-
3472
-		                     // Ensure the current user is not an admin
3473
-                                     if (!in_array($acdatausrname['uid'], $usersadmin)) {
3474
-                                         $ctusernamearruid[] = $acdatausrname['uid'];
3475
-                                         $ctusernamearr[] = $usrValue;
3476
-
3477
-                                     }
3478
-
3479
-                                 }
3480
-		                 $getacdataunmres->closeCursor();
3481
-                             }
3482
-                        }
3483
-
3484
-
3485
-                        // Update the allowed users in the 'sms_relent_subac' table
3486
-                        $usersalwdrs = implode("|", $ctusernamearr);
3487
-
3488
-		        if ($provider == "tnx") {
3489
-
3490
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_users_allowed` = ? WHERE `user_id` = ?');
3491
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3492
-
3493
-		        } elseif ($provider == "plv") {
3494
-
3495
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_users_allowed` = ? WHERE `user_id` = ?');
3496
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3497
-
3498
-		        } elseif ($provider == "twl") {
3499
-
3500
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_users_allowed` = ? WHERE `user_id` = ?');
3501
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3502
-
3503
-		        } elseif ($provider == "flr") {
3504
-
3505
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_users_allowed` = ? WHERE `user_id` = ?');
3506
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3507
-		        }
3508
-
3509
-                        $datalwdres->closeCursor();
3510
-
3511
-
3512
-                        // Insert/update the credentials in the 'sms_relent_settings' table, for each allowed user
3513
-                        $msgtosend = $this->updateusercredentials($userId, $ctusernamearruid, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3514
-                                                                  $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3515
-                    }
3516
-
3517
-                    // Insert the provider's API keys for the allowed groups
3518
-                    if ($groups) {
3519
-
3520
-                        $allwdgrps = [];
3521
-                        foreach ($groups as $groupkey => $groupvalue) {
3522
-
3523
-                                 if ($groupvalue != "admin" && $groupvalue != '') {
3524
-
3525
-                                     $allwdgrps[] = $groupvalue;
3526
-
3527
-                                     // Get all the users that belong to the group
3528
-			             $getacdusr = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
3529
-			             $getacdusrres = $getacdusr->execute([$groupvalue]);
3530
-
3531
-                                     $usersingrp = [];
3532
-			             while ($getacdusrnm = $getacdusrres->fetch()) {
3533
-                                            if ($getacdusrnm['uid'] != $userId) {
3534
-
3535
-		                                // Ensure the current user is not an admin
3536
-                                                if (!in_array($getacdusrnm['uid'], $usersadmin)) {
3537
-                                                     $usersingrp[] = $getacdusrnm['uid'];
3538
-                                                }
3539
-                                            }
3540
-                                     }
3541
-			             $getacdusrres->closeCursor();
3542
-
3543
-                                     // Insert the provider's API keys for each user of the allowed groups
3544
-                                     if ($usersingrp) {
3545
-                                         $msgtosend = $this->updateusercredentials($userId, $usersingrp, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
3546
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
3547
-                                     }
3548
-                                 }
3549
-
3550
-
3551
-		                 // Update the allowed groups in the 'sms_relent_subac' table
3552
-		                 $groupsalwdrs = implode("|", $allwdgrps);
3553
-
3554
-				 if ($provider == "tnx") {
3555
-
3556
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_groups_allowed` = ? WHERE `user_id` = ?');
3557
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3558
-
3559
-				 } elseif ($provider == "plv") {
3560
-
3561
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_groups_allowed` = ? WHERE `user_id` = ?');
3562
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3563
-
3564
-				 } elseif ($provider == "twl") {
3565
-
3566
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_groups_allowed` = ? WHERE `user_id` = ?');
3567
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3568
-
3569
-				 } elseif ($provider == "flr") {
3570
-
3571
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_groups_allowed` = ? WHERE `user_id` = ?');
3572
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
3573
-				 }
3574
-
3575
-		                 $datalwdres->closeCursor();
3576
-                        }
3577
-
3578
-                    }
3579
-
3580
-                }
3581
-
3582
-            }
3583
-
3584
-          } else { $msgtosend = "You have to save your credentials first, by clicking the 'Save' button at the bottom of this page, and then share your API keys with other users."; }
3585
-
3586
-          return $msgtosend;
3587
-       }
3588
-     }
3589
-
3590
-
3591
-     public function removenumberrestrictions($userId, $phoneNumber) {
3592
-
3593
-        if ($this->groupManager->isAdmin($userId)) {
3594
-
3595
-                // Remove the restrictions for the given phone number
3596
-		$delrstr = $this->connection->prepare('
3597
-		       DELETE FROM `*PREFIX*sms_relent_restrict`
3598
-		       WHERE `phone_number` = ?');
3599
-                if ($delrstrres = $delrstr->execute([$phoneNumber])) { $delresult = "success"; } else { $delresult = "failure"; }
3600
-		$delrstrres->closeCursor();
3601
-
3602
-	        $updateind = $this->connection->prepare('
3603
-                       SET @resetrec = 0;
3604
-		       UPDATE `*PREFIX*sms_relent_restrict`
3605
-		       SET `id` = @resetrec := @resetrec + 1;
3606
-                       ALTER TABLE `*PREFIX*sms_relent_restrict` auto_increment=1;');
3607
-	        $updateindres = $updateind->execute();
3608
-	        $updateindres->closeCursor();
3609
-
3610
-                return $delresult;
3611
-        }
3612
-     }
3613
-
3614
-
3615
-    /**
3616
-     * @NoAdminRequired
3617
-     */
3618
-    public function updateautoreplies($userId, $savedByDsplname, $phoneNumber, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText) {
3619
-
3620
-        // Get the auto-reply for the current number from the 'sms_relent_autorply' table
3621
-        $getarpl = $this->connection->prepare('SELECT `user_id`, `saved_by_dsplname`, `phone_number`, `days_of_week`, `daily_start`, `daily_end`, `vacation_start`,
3622
-                                              `vacation_end`, `message_text` FROM `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
3623
-        $getarplresult = $getarpl->execute([$phoneNumber]);
3624
-        $crntarpl = $getarplresult->fetch();
3625
-        $getarplresult->closeCursor();
3626
-
3627
-        if ($getarplresult && !$crntarpl) {
3628
-
3629
-	    $insertpharpl = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_autorply` (`user_id`, `saved_by_dsplname`, `phone_number`, `days_of_week`, 
3630
-                                                       `daily_start`, `daily_end`, `vacation_start`, `vacation_end`, `message_text`) VALUES
3631
-                                                        (?, ?, ?, ?, ?, ?, ?, ?, ?)');
3632
-	    if ($insertpharpl->execute([$userId, $savedByDsplname, $phoneNumber, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText])) { 
3633
-                $messagetosend = 'success'; 
3634
-            } else { 
3635
-                $messagetosend = 'failure'; 
3636
-            }
3637
-         
3638
-        } elseif ($getarplresult && $crntarpl) {
3639
-
3640
-            if ($this->groupManager->isAdmin($userId)) {
3641
-
3642
-                $updatepharpl = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_autorply` SET `user_id` = ?, `saved_by_dsplname` = ?, `days_of_week` = ?, `daily_start` = ?,
3643
-                                                           `daily_end` = ?, `vacation_start` = ?, `vacation_end` = ?, `message_text` = ?  WHERE `phone_number` = ?');
3644
-	        if ($updatephnmbrarpl = $updatepharpl->execute([$userId, $savedByDsplname, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText,
3645
-                                                                $phoneNumber])) { 
3646
-                    $messagetosend = 'success';
3647
-                } else { 
3648
-                    $messagetosend = 'failure'; 
3649
-                }
3650
-	        $updatephnmbrarpl->closeCursor();
3651
-
3652
-            } else {
3653
-
3654
-                // Check if the current user is the author of the existing version of the auto-reply
3655
-                if ($userId == $crntarpl['user_id']) {
3656
-
3657
-                    $updatepharpl = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_autorply` SET `user_id` = ?, `saved_by_dsplname` = ?, `days_of_week` = ?, `daily_start` = ?,
3658
-                                                               `daily_end` = ?, `vacation_start` = ?, `vacation_end` = ?, `message_text` = ?  WHERE `phone_number` = ?');
3659
-	            if ($updatephnmbrarpl = $updatepharpl->execute([$userId, $savedByDsplname, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText,
3660
-                                                                    $phoneNumber])) { 
3661
-                        $messagetosend = 'success';
3662
-                    } else { 
3663
-                        $messagetosend = 'failure'; 
3664
-                    }
3665
-	            $updatephnmbrarpl->closeCursor();
3666
-
3667
-                } else { $messagetosend = 'not allowed'; }
3668
-            }
3669
-        }
3670
-
3671
-        return $messagetosend;
3672
-    }
3673
-
3674
-
3675
-    /**
3676
-     * @NoAdminRequired
3677
-     */
3678
-    public function removeautoreplies($userId, $phoneNumber) {
3679
-
3680
-        if ($this->groupManager->isAdmin($userId)) {
3681
-
3682
-                // Remove the auto-reply for the given phone number
3683
-		$delarpl = $this->connection->prepare('
3684
-		       DELETE FROM `*PREFIX*sms_relent_autorply`
3685
-		       WHERE `phone_number` = ?');
3686
-                if ($delarplres = $delarpl->execute([$phoneNumber])) { $delarplresult = "success"; } else { $delarplresult = "failure"; }
3687
-		$delarplres->closeCursor();
3688
-
3689
-	        $updateindarpl = $this->connection->prepare('
3690
-                       SET @resetarpl = 0;
3691
-		       UPDATE `*PREFIX*sms_relent_autorply`
3692
-		       SET `id` = @resetarpl := @resetarpl + 1;
3693
-                       ALTER TABLE `*PREFIX*sms_relent_autorply` auto_increment=1;');
3694
-	        $updateindarplres = $updateindarpl->execute();
3695
-	        $updateindarplres->closeCursor();
3696
-
3697
-                return $delarplresult;
3698
-
3699
-        } else {
3700
-                // Get the author of the auto-reply for the given phone number
3701
-		$getarplusr = $this->connection->prepare('SELECT `user_id`, `phone_number` FROM `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
3702
-		$getarplusrres = $getarplusr->execute([$phoneNumber]);
3703
-		$crntarpldata = $getarplusrres->fetch();
3704
-                $crntarpluser = $crntarpldata['user_id'];
3705
-		$getarplusrres->closeCursor();
3706
-
3707
-                // If the author of the auto-reply is the current user, allow the removal
3708
-                if ($crntarpluser == $userId) {
3709
-
3710
-                    // Remove the auto-reply for the given phone number
3711
-		    $delarpl = $this->connection->prepare('
3712
-		           DELETE FROM `*PREFIX*sms_relent_autorply`
3713
-		           WHERE `phone_number` = ?');
3714
-                    if ($delarplres = $delarpl->execute([$phoneNumber])) { $delarplresult = "success"; } else { $delarplresult = "failure"; }
3715
-		    $delarplres->closeCursor();
3716
-
3717
-	            $updateindarpl = $this->connection->prepare('
3718
-                           SET @resetarpl = 0;
3719
-		           UPDATE `*PREFIX*sms_relent_autorply`
3720
-		           SET `id` = @resetarpl := @resetarpl + 1;
3721
-                           ALTER TABLE `*PREFIX*sms_relent_autorply` auto_increment=1;');
3722
-	            $updateindarplres = $updateindarpl->execute();
3723
-	            $updateindarplres->closeCursor();
3724
-
3725
-                    return $delarplresult;
3726
-
3727
-                } else { 
3728
-                    return $delarplresult = 'not allowed';
3729
-                }
3730
-        }
3731
-    }
3732
-
3733
-
3734
-    public function getadminsettings($userId) {
3735
-
3736
-        if ($this->groupManager->isAdmin($userId)) {
3737
-
3738
-
3739
-	    $getsettings = $this->connection->prepare('
3740
-                            SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
3741
-                                   `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
3742
-                                   `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
3743
-                                   `show_all_messages`
3744
-			    FROM  `*PREFIX*sms_relent_settings`
3745
-			    WHERE `user_id` = ?');
3746
-
3747
-	    $resultsettings = $getsettings->execute([$userId]);
3748
-
3749
-            $settingsadm = $resultsettings->fetch();
3750
-
3751
-	    $resultsettings->closeCursor();
3752
-
3753
-	    if ($settingsadm) {
3754
-
3755
-		    if ($settingsadm['telapi_key'] != '') {
3756
-
3757
-		        // Send a placeholder to the browser, instead of the real API key
3758
-		        $settingsadm['telapi_key'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
3759
-		    }
3760
-		    if ($settingsadm['tel_pub_key'] != '') {
3761
-		        $settingsadm['tel_pub_key'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
3762
-		    }
3763
-		    if ($settingsadm['messaging_profile_id'] != '') {
3764
-		        $settingsadm['messaging_profile_id'] = "%20%20%20%20%20%20%20%20%20%20%20%20";
3765
-		    }
3766
-		    if ($settingsadm['nexapi_key'] != '') {
3767
-		        $settingsadm['nexapi_key'] = "%20%20%20%20%20%20%20%20%20";
3768
-		    }
3769
-		    if ($settingsadm['nexapi_secret'] != '') {
3770
-		        $settingsadm['nexapi_secret'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
3771
-		    }
3772
-		    if ($settingsadm['twilapi_key'] != '') {
3773
-		        $settingsadm['twilapi_key'] = "%20%20%20%20%20%20%20%20%20";
3774
-		    }
3775
-		    if ($settingsadm['twilapi_secret'] != '') {
3776
-		        $settingsadm['twilapi_secret'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
3777
-		    }
3778
-		    if ($settingsadm['flowapi_key'] != '') {
3779
-		        $settingsadm['flowapi_key'] = "%20%20%20%20%20%20%20%20%20";
3780
-		    }
3781
-		    if ($settingsadm['flowapi_secret'] != '') {
3782
-		        $settingsadm['flowapi_secret'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
3783
-		    }
3784
-
3785
-
3786
-		    // Get the Display Name of the current admin
3787
-		    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
3788
-		    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
3789
-		    $acdatausrdnadm = $getacdatadnres->fetch();
3790
-		    $cruserdname = $acdatausrdnadm['value'];
3791
-		    $getacdatadnres->closeCursor();
3792
-
3793
-		    // Get all the restrictions on phone numbers
3794
-		    $getrestr = $this->connection->prepare('SELECT `saved_by_dsplname`, `phone_number`, `groups`, `users` FROM `*PREFIX*sms_relent_restrict`');
3795
-		    $getrestres = $getrestr->execute();
3796
-
3797
-		    $restrictedArr = [];
3798
-		    while ($restrfetched = $getrestres->fetch()) {
3799
-		           $restrictedArr[] = $restrfetched;
3800
-		    }
3801
-		    $getrestres->closeCursor();
3802
-
3803
-		    if ($restrictedArr) { $restrictedUsers = $restrictedArr; } else { $restrictedUsers = ''; }
3804
-
3805
-
3806
-		    // Get the name of all the groups
3807
-		    $getgroups = $this->connection->prepare('SELECT `gid`, `displayname` FROM `*PREFIX*groups`');
3808
-		    $getgroupsres = $getgroups->execute();
3809
-
3810
-		    $groupsArr = [];
3811
-                    $allgroupswadmarr = [];
3812
-		    while ($groupsfetched = $getgroupsres->fetch()) {
3813
-
3814
-		           $groupsArr[] = $groupsfetched['gid'];
3815
-                           if ($groupsfetched['gid'] != 'admin') { $allgroupswadmarr[] = $groupsfetched['gid']; }
3816
-		    }
3817
-		    $getgroupsres->closeCursor();
3818
-
3819
-		    if ($groupsArr) { $allgroups = $groupsArr; } else { $allgroups = ''; }
3820
-                    if ($allgroupswadmarr) { $allgroupswadm = $allgroupswadmarr; } else { $allgroupswadm = ''; }
3821
-
3822
-		    // Get the users that belong to the 'admin' group
3823
-		    $getadmnsc = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
3824
-		    $getadmnscres = $getadmnsc->execute(['admin']);
3825
-
3826
-		    $usersadminsc = [];
3827
-		    while ($getadmnusrsc = $getadmnscres->fetch()) {
3828
-		           $usersadminsc[] = $getadmnusrsc['uid'];
3829
-		    }
3830
-		    $getadmnscres->closeCursor();
3831
-
3832
-
3833
-		    // Get the display name of all the users
3834
-		    $getusers = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ?');
3835
-		    $getusersres = $getusers->execute(['displayname']);
3836
-
3837
-		    $usersArr = [];
3838
-                    $alluserswadmarr = [];
3839
-		    while ($usersfetched = $getusersres->fetch()) {
3840
-
3841
-		           $usersArr[] = $usersfetched['value'];
3842
-                           if (!in_array($usersfetched['uid'], $usersadminsc)) { $alluserswadmarr[] = $usersfetched['value']; }
3843
-		    }
3844
-		    $getusersres->closeCursor();
3845
-
3846
-		    if ($usersArr) { $allusers = $usersArr; } else { $allusers = ''; }
3847
-                    if ($alluserswadmarr) { $alluserswadm = $alluserswadmarr; } else { $alluserswadm = ''; }
3848
-
3849
-                    // Get the groups and users that are allowed to use the API Keys, for each provider
3850
-                    $getalwdall = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
3851
-                                                             `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
3852
-                                                              WHERE `user_id` = ?');
3853
-                    $getalwdallres = $getalwdall->execute([$userId]);
3854
-                    $crtdtrow = $getalwdallres->fetch();
3855
-                    if ($crtdtrow) {
3856
-                        $allowedgrps = ['tnx_groups_allowed' => $crtdtrow['tnx_groups_allowed'], 'tnx_users_allowed' => $crtdtrow['tnx_users_allowed'], 
3857
-                                        'plv_groups_allowed' => $crtdtrow['plv_groups_allowed'], 'plv_users_allowed' => $crtdtrow['plv_users_allowed'],
3858
-                                        'twl_groups_allowed' => $crtdtrow['twl_groups_allowed'], 'twl_users_allowed' => $crtdtrow['twl_users_allowed'],
3859
-                                        'flr_groups_allowed' => $crtdtrow['flr_groups_allowed'], 'flr_users_allowed' => $crtdtrow['flr_users_allowed']];
3860
-                        $getalwdallres->closeCursor();
3861
-                    } else { $allowedgrps = []; }
3862
-
3863
-
3864
-                    $settingsadm['admdisplayname'] = $cruserdname;
3865
-                    $settingsadm['restrictions'] = $restrictedUsers;
3866
-                    $settingsadm['allgroups'] = $allgroups;
3867
-                    $settingsadm['allusers'] = $allusers;
3868
-                    $settingsadm['allgroupswadm'] = $allgroupswadm;
3869
-                    $settingsadm['alluserswadm'] = $alluserswadm;  
3870
-                    $settingsadm['allowedkeysuse'] = $allowedgrps;
3871
-
3872
-		    return $settingsadm;
3873
-	    }
3874
-        }
3875
-     }
3876
-
3877
-
3878
-     /**
3879
-      * @NoAdminRequired
3880
-      *
3881
-      */
3882
-     public function updatesettings($userId, $telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, 
3883
-                                    $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr) {
3884
-        $upsettings = $this->connection->prepare('
3885
-                        SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
3886
-                           `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
3887
-                           `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
3888
-                           `show_all_messages`, `show_display_names`, `add_display_names`, `available_numbers`, `msg_check_interval`, `new_message_rcd`, `archived_conv_nmbr`
3889
-		        FROM  `*PREFIX*sms_relent_settings`
3890
-		        WHERE `user_id` = ?');
3891
-
3892
-        $resultstng = $upsettings->execute([$userId]);
3893
-
3894
-        $rowup = $resultstng->fetch();
3895
-
3896
-        $resultstng->closeCursor();
3897
-
3898
-        if ($resultstng && !$rowup) {
3899
-
3900
-	    $sql = $this->connection->prepare('
3901
-				INSERT INTO `*PREFIX*sms_relent_settings`
3902
-					(`user_id`, `telapi_url_rec`, `telapi_url`, `nexapi_url_rec`, `nexapi_url`, `twilapi_url_rec`, `twilapi_url`, `flowapi_url_rec`, `flowapi_url`, 
3903
-                                         `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `show_display_names`, `add_display_names`, `msg_check_interval`, 
3904
-                                         `archived_conv_nmbr`)
3905
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
3906
-			');
3907
-	    $sql->execute([$userId, $telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, $getNotify, 
3908
-                           $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr]);
3909
-
3910
-        } elseif ($resultstng && $rowup) {
3911
-
3912
-	    $sqlupdatedb = $this->connection->prepare('
3913
-			UPDATE `*PREFIX*sms_relent_settings`
3914
-			SET `telapi_url_rec` = ?, `telapi_url` = ?, `nexapi_url_rec` = ?, `nexapi_url` = ?, `twilapi_url_rec` = ?, `twilapi_url` = ?, `flowapi_url_rec` = ?, 
3915
-                            `flowapi_url` = ?, `messagesperpage` = ?, `get_notify` = ?, `notification_email` = ?, `getsmsinemail` = ?, `show_display_names` = ?, `add_display_names` = ?,
3916
-                            `msg_check_interval` = ?, `archived_conv_nmbr` = ?
3917
-	                WHERE `user_id` = ?');
3918
-	    $updateRes = $sqlupdatedb->execute([$telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, 
3919
-                                                $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr, $userId]);
3920
-	    $updateRes->closeCursor();
3921
-
3922
-	}
3923
-     }
3924
-
3925
-
3926
-     public function updateadminsettings($userId, $telapiKey, $telPubKey, $telapiUrlRec, $telapiUrl, $messagingProfileId, $nexapiKey, $nexapiSecret, $nexapiUrlRec, $nexapiUrl,
3927
-                                         $telSenderName, $nexSenderName, $twilapiKey, $twilapiSecret, $twilapiUrlRec, $twilapiUrl, $twilSenderName, $flowapiKey, $flowapiSecret, 
3928
-                                         $flowapiUrlRec, $flowapiUrl, $showAllMessages) {
3929
-
3930
-        if ($this->groupManager->isAdmin($userId)) {
3931
-
3932
-            $upsettings = $this->connection->prepare('
3933
-                        SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
3934
-                           `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
3935
-                           `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
3936
-                           `show_all_messages`, `show_display_names`, `add_display_names`
3937
-		        FROM  `*PREFIX*sms_relent_settings`
3938
-		        WHERE `user_id` = ?');
3939
-
3940
-            $resultstng = $upsettings->execute([$userId]);
3941
-
3942
-            $rowup = $resultstng->fetch();
3943
-
3944
-            $resultstng->closeCursor();
3945
-
3946
-            if ($resultstng && !$rowup) {
3947
-
3948
-	        if ($telapiKey != '') {
3949
-	            $telapikeystrenc = $this->crypto->encrypt($telapiKey);             
3950
-	        } else { $telapikeystrenc = ''; }
3951
-
3952
-	        if ($telPubKey != '') {
3953
-	            $telpubkeystrenc =  $this->crypto->encrypt($telPubKey);             
3954
-	        } else { $telpubkeystrenc = ''; }
3955
-
3956
-	        if ($messagingProfileId != '') {
3957
-	            $messagingprofenc = $this->crypto->encrypt($messagingProfileId);             
3958
-	        } else { $messagingprofenc = ''; }
3959
-
3960
-	        if ($nexapiKey != '') {
3961
-	            $nexapikeystrenc = $this->crypto->encrypt($nexapiKey);             
3962
-	        } else { $nexapikeystrenc = ''; }
3963
-
3964
-	        if ($nexapiSecret != '') {
3965
-	            $nexapisecretstrenc = $this->crypto->encrypt($nexapiSecret);             
3966
-	        } else { $nexapisecretstrenc = ''; }
3967
-
3968
-	        if ($twilapiKey != '') {
3969
-	            $twilapikeystrenc = $this->crypto->encrypt($twilapiKey);             
3970
-	        } else { $twilapikeystrenc = ''; }
3971
-
3972
-	        if ($twilapiSecret != '') {
3973
-	            $twilapisecretstrenc = $this->crypto->encrypt($twilapiSecret);             
3974
-	        } else { $twilapisecretstrenc = ''; }
3975
-
3976
-	        if ($flowapiKey != '') {
3977
-	            $flowapikeystrenc = $this->crypto->encrypt($flowapiKey);             
3978
-	        } else { $flowapikeystrenc = ''; }
3979
-
3980
-	        if ($flowapiSecret != '') {
3981
-	            $flowapisecretstrenc = $this->crypto->encrypt($flowapiSecret);             
3982
-	        } else { $flowapisecretstrenc = ''; }
3983
-
3984
-
3985
-	        $sql = $this->connection->prepare('
3986
-				INSERT INTO `*PREFIX*sms_relent_settings`
3987
-					(`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, 
3988
-	                                 `nexapi_url`, `tel_sender_name`, `nex_sender_name`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `twil_sender_name`, 
3989
-                                         `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `show_all_messages`)
3990
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
3991
-			');
3992
-	        $sql->execute([$userId, $telapikeystrenc, $telpubkeystrenc, $telapiUrlRec, $telapiUrl, $messagingprofenc, $nexapikeystrenc, $nexapisecretstrenc, $nexapiUrlRec, 
3993
-                               $nexapiUrl, $telSenderName, $nexSenderName, $twilapikeystrenc, $twilapisecretstrenc, $twilapiUrlRec, $twilapiUrl, $twilSenderName, $flowapikeystrenc, 
3994
-                               $flowapisecretstrenc, $flowapiUrlRec, $flowapiUrl, $showAllMessages]);
3995
-
3996
-            } elseif ($resultstng && $rowup) {
3997
-
3998
-	        // Check if the value of the field is the placeholder or an empty string
3999
-	        if ($telapiKey != '' && $telapiKey != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4000
-	            $telapikeystrenc = $this->crypto->encrypt($telapiKey);                
4001
-	        } elseif ($telapiKey == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4002
-	            $telapikeystrenc = $rowup['telapi_key'];
4003
-	        } elseif ($telapiKey == '') {
4004
-	            $telapikeystrenc = '';
4005
-	        }
4006
-
4007
-	        if ($telPubKey != '' && $telPubKey != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4008
-	            $telpubkeystrenc = $this->crypto->encrypt($telPubKey);                
4009
-	        } elseif ($telPubKey == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4010
-	            $telpubkeystrenc = $rowup['tel_pub_key'];
4011
-	        } elseif ($telPubKey == '') {
4012
-	            $telpubkeystrenc = '';
4013
-	        }
4014
-
4015
-	        if ($messagingProfileId != '' && $messagingProfileId != "%20%20%20%20%20%20%20%20%20%20%20%20") {
4016
-	            $messagingprofenc = $this->crypto->encrypt($messagingProfileId);                
4017
-	        } elseif ($messagingProfileId == "%20%20%20%20%20%20%20%20%20%20%20%20") {
4018
-	            $messagingprofenc = $rowup['messaging_profile_id'];
4019
-	        } elseif ($messagingProfileId == '') {
4020
-	            $messagingprofenc = '';
4021
-	        }
4022
-
4023
-	        if ($nexapiKey != '' && $nexapiKey != "%20%20%20%20%20%20%20%20%20") {
4024
-	            $nexapikeystrenc = $this->crypto->encrypt($nexapiKey);                
4025
-	        } elseif ($nexapiKey == "%20%20%20%20%20%20%20%20%20") {
4026
-	            $nexapikeystrenc = $rowup['nexapi_key'];
4027
-	        } elseif ($nexapiKey == '') {
4028
-	            $nexapikeystrenc = '';
4029
-	        }
4030
-
4031
-	        if ($twilapiKey != '' && $twilapiKey != "%20%20%20%20%20%20%20%20%20") {
4032
-	            $twilapikeystrenc = $this->crypto->encrypt($twilapiKey);                
4033
-	        } elseif ($twilapiKey == "%20%20%20%20%20%20%20%20%20") {
4034
-	            $twilapikeystrenc = $rowup['twilapi_key'];
4035
-	        } elseif ($twilapiKey == '') {
4036
-	            $twilapikeystrenc = '';
4037
-	        }
4038
-
4039
-	        if ($flowapiKey != '' && $flowapiKey != "%20%20%20%20%20%20%20%20%20") {
4040
-	            $flowapikeystrenc = $this->crypto->encrypt($flowapiKey);                
4041
-	        } elseif ($flowapiKey == "%20%20%20%20%20%20%20%20%20") {
4042
-	            $flowapikeystrenc = $rowup['flowapi_key'];
4043
-	        } elseif ($flowapiKey == '') {
4044
-	            $flowapikeystrenc = '';
4045
-	        }
4046
-
4047
-	        if ($nexapiSecret != '' && $nexapiSecret != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4048
-	            $nexapisecretstrenc = $this->crypto->encrypt($nexapiSecret);                
4049
-	        } elseif ($nexapiSecret == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4050
-	            $nexapisecretstrenc = $rowup['nexapi_secret'];
4051
-	        } elseif ($nexapiSecret == '') {
4052
-	            $nexapisecretstrenc = '';
4053
-	        }
4054
-
4055
-	        if ($twilapiSecret != '' && $twilapiSecret != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4056
-	            $twilapisecretstrenc = $this->crypto->encrypt($twilapiSecret);                
4057
-	        } elseif ($twilapiSecret == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4058
-	            $twilapisecretstrenc = $rowup['twilapi_secret'];
4059
-	        } elseif ($twilapiSecret == '') {
4060
-	            $twilapisecretstrenc = '';
4061
-	        }
4062
-
4063
-	        if ($flowapiSecret != '' && $flowapiSecret != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4064
-	            $flowapisecretstrenc = $this->crypto->encrypt($flowapiSecret);                
4065
-	        } elseif ($flowapiSecret == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
4066
-	            $flowapisecretstrenc = $rowup['flowapi_secret'];
4067
-	        } elseif ($flowapiSecret == '') {
4068
-	            $flowapisecretstrenc = '';
4069
-	        }
4070
-
4071
-	        $sqlupdatedb = $this->connection->prepare('
4072
-			UPDATE `*PREFIX*sms_relent_settings`
4073
-			SET `telapi_key` = ?, `tel_pub_key` = ?, `telapi_url_rec` = ?, `telapi_url` = ?, `messaging_profile_id` = ?, `nexapi_key` = ?, `nexapi_secret` = ?,
4074
-	                    `nexapi_url_rec` = ?, `nexapi_url` = ?, `tel_sender_name` = ?, `nex_sender_name` = ?, `twilapi_key` = ?, `twilapi_secret` = ?, `twilapi_url_rec` = ?, `twilapi_url` = ?, `twil_sender_name` = ?, `flowapi_key` = ?, 
4075
-	                    `flowapi_secret` = ?, `flowapi_url_rec` = ?, `flowapi_url` = ?, `show_all_messages` = ?
4076
-	                WHERE `user_id` = ?');
4077
-	        $updateRes = $sqlupdatedb->execute([$telapikeystrenc, $telpubkeystrenc, $telapiUrlRec, $telapiUrl, $messagingprofenc, $nexapikeystrenc, $nexapisecretstrenc, 
4078
-                                                    $nexapiUrlRec, $nexapiUrl, $telSenderName, $nexSenderName, $twilapikeystrenc, $twilapisecretstrenc, $twilapiUrlRec, $twilapiUrl, 
4079
-                                                    $twilSenderName, $flowapikeystrenc, $flowapisecretstrenc, $flowapiUrlRec, $flowapiUrl, $showAllMessages, $userId]);
4080
-	        $updateRes->closeCursor();
4081
-
4082
-	    }
4083
-        }
4084
-     }
4085
-
4086
-
4087
-     public function updatepersadmnsettings($userId, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, 
4088
-                                            $archivedConvNmbr) {
4089
-
4090
-        if ($this->groupManager->isAdmin($userId)) {
4091
-
4092
-            $upsettings = $this->connection->prepare('
4093
-                        SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
4094
-                           `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
4095
-                           `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
4096
-                           `show_all_messages`, `show_display_names`, `add_display_names`, `available_numbers`, `msg_check_interval`, `new_message_rcd`, `archived_conv_nmbr`
4097
-		        FROM  `*PREFIX*sms_relent_settings`
4098
-		        WHERE `user_id` = ?');
4099
-
4100
-            $resultstng = $upsettings->execute([$userId]);
4101
-
4102
-            $rowup = $resultstng->fetch();
4103
-
4104
-            $resultstng->closeCursor();
4105
-
4106
-            if ($resultstng && !$rowup) {
4107
-
4108
-	        $sql = $this->connection->prepare('
4109
-				INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `show_display_names`,
4110
-                                `add_display_names`, `msg_check_interval`, `archived_conv_nmbr`)
4111
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
4112
-	        $sql->execute([$userId, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr]);
4113
-
4114
-            } elseif ($resultstng && $rowup) {
4115
-
4116
-	        $sqlupdatedb = $this->connection->prepare('
4117
-			UPDATE `*PREFIX*sms_relent_settings`
4118
-			SET `messagesperpage` = ?, `get_notify` = ?, `notification_email` = ?, `getsmsinemail` = ?, `show_display_names` = ?, `add_display_names` = ?, 
4119
-                            `msg_check_interval` = ?, `archived_conv_nmbr` = ?
4120
-	                WHERE `user_id` = ?');
4121
-	        $updateRes = $sqlupdatedb->execute([$messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $addDisplayNames, $msgCheckInterval, $archivedConvNmbr, $userId]);
4122
-	        $updateRes->closeCursor();
4123
-            }
4124
-        }
4125
-     }
4126
-
4127
-
4128
-     /**
4129
-      * @NoAdminRequired
4130
-      */
4131
-     public function getapicredentials($userId) {
4132
-
4133
-        $sqlcr = $this->connection->prepare('
4134
-              SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`,
4135
-                     `tel_sender_name`, `nex_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, 
4136
-                     `twilapi_url`, `twil_sender_name`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `add_display_names` FROM `*PREFIX*sms_relent_settings`
4137
-	      WHERE `user_id` = ?');
4138
-	$resultcr = $sqlcr->execute([$userId]);
4139
-        $settingsfrdb = $resultcr->fetch();
4140
-        $resultcr->closeCursor();
4141
-
4142
-        if (($settingsfrdb['telapi_key'] != '') && ($settingsfrdb['telapi_key'] != 'undefined') && ($settingsfrdb['telapi_key'] != null)) { 
4143
-             $telapikeystrdec = $this->crypto->decrypt($settingsfrdb['telapi_key']); 
4144
-        } else { $telapikeystrdec = ''; }
4145
-
4146
-        if (($settingsfrdb['tel_pub_key'] != '') && ($settingsfrdb['tel_pub_key'] != 'undefined') && ($settingsfrdb['tel_pub_key'] != null)) {
4147
-             $telpubkeystrdec = $this->crypto->decrypt($settingsfrdb['tel_pub_key']); 
4148
-        } else { $telpubkeystrdec = ''; }
4149
-
4150
-        $telapiurlrec = $settingsfrdb['telapi_url_rec'];
4151
-        $telapiurlstr = $settingsfrdb['telapi_url'];
4152
-
4153
-        if (($settingsfrdb['messaging_profile_id'] != '') && ($settingsfrdb['messaging_profile_id'] != 'undefined') && ($settingsfrdb['messaging_profile_id'] != null)) {
4154
-             $messagingprofid = $this->crypto->decrypt($settingsfrdb['messaging_profile_id']); 
4155
-        } else { $messagingprofid = ''; }
4156
-
4157
-        if (($settingsfrdb['nexapi_key'] != '') && ($settingsfrdb['nexapi_key'] != 'undefined') && ($settingsfrdb['nexapi_key'] != null)) { 
4158
-             $nexapikeystr = $this->crypto->decrypt($settingsfrdb['nexapi_key']); 
4159
-        } else { $nexapikeystr = ''; }
4160
-
4161
-        if (($settingsfrdb['nexapi_secret'] != '') && ($settingsfrdb['nexapi_secret'] != 'undefined') && ($settingsfrdb['nexapi_secret'] != null)) { 
4162
-             $nexapisecretstr = $this->crypto->decrypt($settingsfrdb['nexapi_secret']); 
4163
-        } else { $nexapisecretstr = ''; }
4164
-
4165
-        if (($settingsfrdb['twilapi_key'] != '') && ($settingsfrdb['twilapi_key'] != 'undefined') && ($settingsfrdb['twilapi_key'] != null)) { 
4166
-             $twilapikeystr = $this->crypto->decrypt($settingsfrdb['twilapi_key']); 
4167
-        } else { $twilapikeystr = ''; }
4168
-
4169
-        if (($settingsfrdb['twilapi_secret'] != '') && ($settingsfrdb['twilapi_secret'] != 'undefined') && ($settingsfrdb['twilapi_secret'] != null)) { 
4170
-             $twilapisecretstr = $this->crypto->decrypt($settingsfrdb['twilapi_secret']); 
4171
-        } else { $twilapisecretstr = ''; }
4172
-
4173
-        if (($settingsfrdb['flowapi_key'] != '') && ($settingsfrdb['flowapi_key'] != 'undefined') && ($settingsfrdb['flowapi_key'] != null)) { 
4174
-             $flowapikeystr = $this->crypto->decrypt($settingsfrdb['flowapi_key']); 
4175
-        } else { $flowapikeystr = ''; }
4176
-
4177
-        if (($settingsfrdb['flowapi_secret'] != '') && ($settingsfrdb['flowapi_secret'] != 'undefined') && ($settingsfrdb['flowapi_secret'] != null)) { 
4178
-             $flowapisecretstr = $this->crypto->decrypt($settingsfrdb['flowapi_secret']); 
4179
-        } else { $flowapisecretstr = ''; }
4180
-
4181
-        $nexapiurlrecsms = $settingsfrdb['nexapi_url_rec'];
4182
-        $nexapiurldelrcpt = $settingsfrdb['nexapi_url'];
4183
-        $twilapiurlrecsms = $settingsfrdb['twilapi_url_rec'];
4184
-        $twilapiurldelrcpt = $settingsfrdb['twilapi_url'];
4185
-        $flowapiurlrecsms = $settingsfrdb['flowapi_url_rec'];
4186
-        $flowapiurldelrcpt = $settingsfrdb['flowapi_url'];
4187
-        $gettelsendername = $settingsfrdb['tel_sender_name'];
4188
-        $getnexsendername = $settingsfrdb['nex_sender_name'];
4189
-        $gettwilsendername = $settingsfrdb['twil_sender_name'];
4190
-        $getmessagesperpage = $settingsfrdb['messagesperpage'];
4191
-        $getnotification = $settingsfrdb['get_notify'];
4192
-        $notifyemail = $settingsfrdb['notification_email'];
4193
-        $includesmsinemail = $settingsfrdb['getsmsinemail'];
4194
-        $includeDisplNames = $settingsfrdb['add_display_names'];
4195
-
4196
-        return [$telapikeystrdec, $telpubkeystrdec, $telapiurlrec, $telapiurlstr, $messagingprofid, $nexapikeystr, $nexapisecretstr, $nexapiurlrecsms, $nexapiurldelrcpt,
4197
-                $gettelsendername, $getnexsendername, $getmessagesperpage, $getnotification, $notifyemail, $includesmsinemail, $twilapikeystr, $twilapisecretstr, $twilapiurlrecsms, 
4198
-                $twilapiurldelrcpt, $gettwilsendername, $flowapikeystr, $flowapisecretstr, $flowapiurlrecsms, $flowapiurldelrcpt, $includeDisplNames];
4199
-     }
4200
-
4201
-     /**
4202
-      * @NoAdminRequired
4203
-      */
4204
-     public function getuserbytelrecwhurl($recsmswebhookurl) {
4205
-
4206
-        $sqlrec = $this->connection->prepare('SELECT `user_id`, `telapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `telapi_url_rec` = ?');
4207
-	$result = $sqlrec->execute([$recsmswebhookurl]);
4208
-        $datafromdb = $result->fetch();
4209
-        $result->closeCursor();
4210
-        $ncusertelrec = $datafromdb['user_id'];
4211
-
4212
-        return $ncusertelrec;
4213
-     }
4214
-
4215
-     /**
4216
-      * @NoAdminRequired
4217
-      */
4218
-     public function getuserbyteldelrwhurl($delsmswebhookurl) {
4219
-
4220
-        $sqldel = $this->connection->prepare('SELECT `user_id`, `telapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `telapi_url` = ?');
4221
-	$ressqldel = $sqldel->execute([$delsmswebhookurl]);
4222
-        $datafromdbdel = $ressqldel->fetch();
4223
-        $ressqldel->closeCursor();
4224
-        $ncuserteldel = $datafromdbdel['user_id'];
4225
-
4226
-        return $ncuserteldel;
4227
-     }
4228
-
4229
-     /**
4230
-      * @NoAdminRequired
4231
-      */
4232
-     public function getuserbyplivorecwhurl($plivorecurl) {
4233
-
4234
-        $sqlrecpl = $this->connection->prepare('SELECT `user_id`, `nexapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `nexapi_url_rec` = ?');
4235
-	$plresrecsql = $sqlrecpl->execute([$plivorecurl]);
4236
-        $pldatafromdb = $plresrecsql->fetch();
4237
-        $plresrecsql->closeCursor();
4238
-        $ncuserplrec = $pldatafromdb['user_id'];
4239
-
4240
-        return $ncuserplrec;
4241
-     }
4242
-
4243
-     /**
4244
-      * @NoAdminRequired
4245
-      */
4246
-     public function getuserbyplivodelrwhurl($plivodrurl) {
4247
-
4248
-        $sqldrpl = $this->connection->prepare('SELECT `user_id`, `nexapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `nexapi_url` = ?');
4249
-	$ressqldelrec = $sqldrpl->execute([$plivodrurl]);
4250
-        $datafromdbdr = $ressqldelrec->fetch();
4251
-        $ressqldelrec->closeCursor();
4252
-        $ncuserplivodel = $datafromdbdr['user_id'];
4253
-
4254
-        return $ncuserplivodel;
4255
-     }
4256
-
4257
-     /**
4258
-      * @NoAdminRequired
4259
-      */
4260
-     public function getuserbytwilrecwhurl($twilrecurl) {
4261
-
4262
-        $sqlrectw = $this->connection->prepare('SELECT `user_id`, `twilapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `twilapi_url_rec` = ?');
4263
-	$twresrecsql = $sqlrectw->execute([$twilrecurl]);
4264
-        $twdatafromdb = $twresrecsql->fetch();
4265
-        $twresrecsql->closeCursor();
4266
-        $ncusertwrec = $twdatafromdb['user_id'];
4267
-
4268
-        return $ncusertwrec;
4269
-     }
4270
-
4271
-     /**
4272
-      * @NoAdminRequired
4273
-      */
4274
-     public function getuserbytwildelrwhurl($twildrurl) {
4275
-
4276
-        $sqldrtw = $this->connection->prepare('SELECT `user_id`, `twilapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `twilapi_url` = ?');
4277
-	$ressqldelrectw = $sqldrtw->execute([$twildrurl]);
4278
-        $datafromdbdrtw = $ressqldelrectw->fetch();
4279
-        $ressqldelrectw->closeCursor();
4280
-        $ncusertwildel = $datafromdbdrtw['user_id'];
4281
-
4282
-        return $ncusertwildel;
4283
-     }
4284
-
4285
-     /**
4286
-      * @NoAdminRequired
4287
-      */
4288
-     public function getuserbyflowrecwhurl($flowrecurl) {
4289
-
4290
-        $sqlrecfl = $this->connection->prepare('SELECT `user_id`, `flowapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `flowapi_url_rec` = ?');
4291
-	$flresrecsql = $sqlrecfl->execute([$flowrecurl]);
4292
-        $fldatafromdb = $flresrecsql->fetch();
4293
-        $flresrecsql->closeCursor();
4294
-        $ncuserflrec = $fldatafromdb['user_id'];
4295
-
4296
-        return $ncuserflrec;
4297
-     }
4298
-
4299
-     /**
4300
-      * @NoAdminRequired
4301
-      */
4302
-     public function getuserbyflowdelrwhurl($flowdrurl) {
4303
-
4304
-        $sqldrfl = $this->connection->prepare('SELECT `user_id`, `flowapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `flowapi_url` = ?');
4305
-	$ressqldelrecfl = $sqldrfl->execute([$flowdrurl]);
4306
-        $datafromdbdrfl = $ressqldelrecfl->fetch();
4307
-        $ressqldelrecfl->closeCursor();
4308
-        $ncuserflowdel = $datafromdbdrfl['user_id'];
4309
-
4310
-        return $ncuserflowdel;
4311
-     }
4312
-
4313
-
4314
-    /**
4315
-     * @NoAdminRequired
4316
-     */
4317
-    public function object_to_array($obj) {
4318
-        if (is_object($obj)) $obj = (array)$this->dismount($obj);
4319
-        if (is_array($obj)) {
4320
-           $new = array();
4321
-           foreach($obj as $key => $val) {
4322
-               $new[$key] = $this->object_to_array($val);
4323
-           }
4324
-        }
4325
-        else $new = $obj;
4326
-        return $new;
4327
-    }
4328
-
4329
-
4330
-    /**
4331
-     * @NoAdminRequired
4332
-     */
4333
-    public function dismount($object) {
4334
-        $reflectionClass = new ReflectionClass(get_class($object));
4335
-        $array = array();
4336
-        foreach ($reflectionClass->getProperties() as $property) {
4337
-           $property->setAccessible(true);
4338
-           $array[$property->getName()] = $property->getValue($object);
4339
-           $property->setAccessible(false);
4340
-        }
4341
-        return $array;
4342
-    }
4343
-
4344
-
4345
-    /**
4346
-     * @NoAdminRequired
4347
-     */
4348
-    public function getallowedusers($userId) {
4349
-
4350
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
4351
-        if ($this->groupManager->isAdmin($userId)) {
4352
-
4353
-            // Get the groups and users that were allowed access to the API keys
4354
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
4355
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
4356
-                                                   WHERE `user_id` = ?');
4357
-            $getgrpsres = $getgrps->execute([$userId]);
4358
-            $getgrpsusr = $getgrpsres->fetch();
4359
-            $getgrpsres->closeCursor();
4360
-
4361
-            if ($getgrpsusr) {
4362
-
4363
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
4364
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
4365
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
4366
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
4367
-
4368
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
4369
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
4370
-
4371
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
4372
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
4373
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
4374
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
4375
-
4376
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
4377
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
4378
-
4379
-            } else {
4380
-                $allwdusersunq = [];
4381
-                $allwdgroupsunq = [];
4382
-            }
4383
-
4384
-            // Get the username for each Display Name of the allowed users
4385
-            $allwdusersfnl = [];
4386
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
4387
-
4388
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
4389
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
4390
-		         $acdatausrname = $getacdatausrnmres->fetch();
4391
-                         if ($acdatausrname) {
4392
-                             $allwdusersfnl[] = $acdatausrname['uid'];
4393
-                         }
4394
-                         $getacdatausrnmres->closeCursor();
4395
-            }
4396
-
4397
-            // Get the users from all the allowed groups
4398
-            $allwdusersgrpmlt = [];
4399
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
4400
-
4401
-                     // Get all the users that belong to the current group, if the current group is different from 'admin'
4402
-                     if ($prgrpvalue != 'admin') {
4403
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
4404
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
4405
-
4406
-		         while ($getusrname = $getusringroupres->fetch()) {
4407
-
4408
-                                $allwdusersgrpmlt[] = $getusrname['uid'];
4409
-                         }
4410
-		         $getusringroupres->closeCursor();
4411
-                     }
4412
-            }
4413
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
4414
-            
4415
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
4416
-            $allusruniquest = array_unique($allusr);
4417
-
4418
-            if ($allusruniquest) {
4419
-                array_unshift($allusruniquest, $userId);
4420
-                $allusruniquerc = $allusruniquest;
4421
-            } else { $allusruniquerc = [$userId]; }
4422
-
4423
-            return $allusruniquerc;
4424
-
4425
-        } else { return [$userId]; }
4426
-    }
4427
-
4428
-
4429
-    /**
4430
-     * @NoAdminRequired
4431
-     */
4432
-    public function getsmsnumbers($userId) {
4433
-
4434
-        // Check if there are any saved phone numbers for the current user
4435
-        $getnumbers = $this->connection->prepare('SELECT `user_id`, `available_numbers` FROM `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
4436
-	$getcrtusrno = $getnumbers->execute([$userId]);
4437
-        $getusrnmbrs = $getcrtusrno->fetch();
4438
-        $getcrtusrno->closeCursor();
4439
-
4440
-        if ($getusrnmbrs['available_numbers']) {
4441
-
4442
-            $retrievednmbrs = $getusrnmbrs['available_numbers'];
4443
-            $getnmbrsarr = explode("|", $retrievednmbrs);
4444
-            $numbersforuser = array_filter($getnmbrsarr);
4445
-            return $numbersforuser;
4446
-
4447
-        // Get the available phone numbers for the current user from the SMS providers
4448
-        } else {
4449
-
4450
-            $smsapicred = $this->getapicredentials($userId);
4451
-
4452
-            $telnyxkey = $smsapicred[0];
4453
-
4454
-            $nexapikey = $smsapicred[5];
4455
-            $nexapisecret = $smsapicred[6];
4456
-
4457
-            $twilapikey = $smsapicred[15];
4458
-            $twilapisecret = $smsapicred[16];
4459
-
4460
-            $flowapikey = $smsapicred[20];
4461
-            $flowapisecret = $smsapicred[21];
4462
-
4463
-            $telsendernameinit = $smsapicred[9];
4464
-            $nexsendernameinit = $smsapicred[10];
4465
-            $twilsendernameinit = $smsapicred[19];
4466
-
4467
-            if ($telsendernameinit) {
4468
-                $telsendername = "Tx: " . $telsendernameinit;
4469
-                $telsenderarr = [0 => $telsendername];
4470
-            } else { $telsenderarr = []; }
4471
-
4472
-            if ($nexsendernameinit) {
4473
-                $nexsendername = "Pl: " . $nexsendernameinit;
4474
-                $nexsenderarr = [0 => $nexsendername];
4475
-            } else { $nexsenderarr = []; }
4476
-
4477
-            if ($twilsendernameinit) {
4478
-                $twilsendername = "Tw: " . $twilsendernameinit;
4479
-                $twilsenderarr = [0 => $twilsendername];
4480
-            } else { $twilsenderarr = []; }
4481
-
4482
-            // Get Telnyx phone numbers
4483
-            if ($telnyxkey != '') {
4484
-
4485
-               \Telnyx\Telnyx::setApiKey($telnyxkey);
4486
-               $telnumbers = \Telnyx\MessagingPhoneNumber::All();
4487
-
4488
-               $telnumbersarr = $this->object_to_array($telnumbers);
4489
-               $telnmbrs = [];
4490
-
4491
-               foreach ($telnumbersarr['_originalValues'] as $nmbkey => $nmbvalue) {
4492
-                   if (is_int($nmbkey)) {
4493
-                       foreach ($nmbvalue as $nkey => $nvalue) {
4494
-                           if ($nkey == 'phone_number' && $nvalue) {
4495
-                               $telnmbrs[] = "Tx: " . $nvalue;
4496
-                           }
4497
-                       }
4498
-                   }
4499
-               }
4500
-
4501
-            } else { $telnmbrs = []; }
4502
-
4503
-            // Get Plivo phone numbers
4504
-            if ($nexapikey != '' && $nexapisecret != '') {
4505
-
4506
-               $getacdata = "https://".$nexapikey.":".$nexapisecret."@api.plivo.com/v1/Account/".$nexapikey."/Number/";
4507
-               $acdata = file_get_contents($getacdata);
4508
-               $datainit = json_decode($acdata, true);
4509
-
4510
-               $findata = $this->object_to_array($datainit);
4511
-
4512
-               $nexcurrentnmbrs = [];
4513
-
4514
-               foreach ($findata['objects'] as $smskey => $smsvalue) {
4515
-                       if (is_array($smsvalue)) {
4516
-                             foreach ($smsvalue as $smskey2 => $smsvalue2) {
4517
-                                   if ($smskey2 == 'number' && $smsvalue2) {
4518
-                                       $nexcurrentnmbrs[] = "Pl: +" . $smsvalue2;
4519
-                                   }
4520
-                             }
4521
-                       }
4522
-               }
4523
-
4524
-            } else { $nexcurrentnmbrs = []; }
4525
-
4526
-            // Get Twilio phone numbers
4527
-            if ($twilapikey != '' && $twilapisecret != '') {
4528
-
4529
-                $twilnumbers = json_decode(file_get_contents("https://".$twilapikey.":".$twilapisecret."@api.twilio.com/2010-04-01/Accounts/".$twilapikey."/IncomingPhoneNumbers.json"), true);
4530
-                $twilactivenmbrs = $twilnumbers['incoming_phone_numbers'];
4531
-
4532
-                $twilcurrentnmbrs = [];
4533
-                foreach ($twilactivenmbrs as $twnbkey => $twnbvalue) {
4534
-                     if (is_array($twnbvalue)) {
4535
-                         foreach ($twnbvalue as $twfkey => $twfvalue) {
4536
-                              if ($twfkey == 'phone_number' && $twfvalue) {
4537
-                                  $twilcurrentnmbrs[] = "Tw: " . $twfvalue;
4538
-                              }
4539
-                         }
4540
-                     }
4541
-                }
4542
-
4543
-            } else { $twilcurrentnmbrs = []; }
4544
-
4545
-            // Get Flowroute phone numbers
4546
-            if ($flowapikey != '' && $flowapisecret != '') {
4547
-
4548
-                $flnbrsresult = json_decode(file_get_contents("https://".$flowapikey.":".$flowapisecret."@api.flowroute.com/v2/numbers"));
4549
-                $flnbrsarr = $flnbrsresult->data;
4550
-                $flowcurrentnmbrs = [];
4551
-                foreach ($flnbrsarr as $flkey => $flitem) {
4552
-                         if ($flitem->id) {
4553
-                             $flowcurrentnmbrs[] = "Fl: +" . $flitem->id;
4554
-                         }
4555
-                }
4556
-
4557
-            } else { $flowcurrentnmbrs = []; }
4558
-
4559
-            $currentnmbrs = array_merge($telnmbrs, $nexcurrentnmbrs, $twilcurrentnmbrs, $flowcurrentnmbrs, $telsenderarr, $nexsenderarr, $twilsenderarr);
4560
-
4561
-            if ($this->groupManager->isAdmin($userId)) {
4562
-
4563
-                // Save the available phone numbers for the current user
4564
-                $availablenmbrs = implode("|", $currentnmbrs);
4565
-                $savephno = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `available_numbers` = ? WHERE `user_id` = ?');
4566
-                $upusrphnmbrs = $savephno->execute([$availablenmbrs, $userId]);
4567
-	        $upusrphnmbrs->closeCursor();
4568
-
4569
-                return $currentnmbrs;
4570
-
4571
-            } else {
4572
-
4573
-                // Get the restrictions from the 'sms_relent_restrict' table
4574
-                $getrestr = $this->connection->prepare('
4575
-		            SELECT `phone_number`, `groups`, `users` FROM `*PREFIX*sms_relent_restrict`');
4576
-                $getrestrres = $getrestr->execute();
4577
-
4578
-                $restrdata = [];
4579
-                while ($restrfetched = $getrestrres->fetch()) {
4580
-                       $restrdata[] = $restrfetched;
4581
-                }
4582
-                $getrestrres->closeCursor();
4583
-
4584
-                if ($restrdata) {
4585
-
4586
-                    // Get the groups to which the current user belongs
4587
-                    $getusrgrp = $this->connection->prepare('
4588
-		                 SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `uid` = ?');
4589
-                    $getusrgrpres = $getusrgrp->execute([$userId]);
4590
-
4591
-                    $usergrps = [];
4592
-                    while ($fetchedgrps = $getusrgrpres->fetch()) {
4593
-                           $usergrps[] = $fetchedgrps['gid'];
4594
-                    }
4595
-                    $getusrgrpres->closeCursor();
4596
-                    $ctusergroups = implode("|", $usergrps);
4597
-
4598
-		    // Get the Display Name of the current user
4599
-		    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
4600
-		    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
4601
-		    $acdatausrdnadm = $getacdatadnres->fetch();
4602
-		    $cruserdname = $acdatausrdnadm['value'];
4603
-		    $getacdatadnres->closeCursor();
4604
-
4605
-                    // Get the phone numbers that are not allowed for the current user
4606
-                    $restrPhoneNb = [];
4607
-                    foreach ($restrdata as $rskey => $rsvalue) {
4608
-
4609
-                        $chck = 0;
4610
-                        if ($rsvalue['groups']) {
4611
-                            $restrgrparr = explode("|", $rsvalue['groups']);
4612
-
4613
-                            foreach ($restrgrparr as $grkey => $grvalue) {
4614
-                                     if (str_contains($ctusergroups, $grvalue)) { $chck++; }
4615
-                            }
4616
-                        }
4617
-
4618
-                        if ($rsvalue['users']) {
4619
-                            $usrnmstr = $rsvalue['users'];
4620
-                            if (str_contains($usrnmstr, $cruserdname)) { $chck++; }
4621
-                        }
4622
-
4623
-                        if ($chck == 0) { $restrPhoneNb[] = $rsvalue['phone_number']; }
4624
-                    }
4625
-
4626
-                    $restrPhoneNmbrs = array_unique($restrPhoneNb);
4627
-
4628
-                    // Assemble the array of phone numbers that the current user is allowed to use
4629
-                    for ($k = 0; $k < count($currentnmbrs); $k++) {
4630
-
4631
-                        if (in_array($currentnmbrs[$k], $restrPhoneNmbrs)) {
4632
-                            unset($currentnmbrs[$k]);
4633
-                        }
4634
-                    }
4635
-
4636
-                    $currentnmbrsrstr = array_values($currentnmbrs);
4637
-
4638
-                    // Save the available phone numbers for the current user
4639
-                    $availablenmbrs = implode("|", $currentnmbrsrstr);
4640
-                    $savephno = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `available_numbers` = ? WHERE `user_id` = ?');
4641
-                    $upusrphnmbrs = $savephno->execute([$availablenmbrs, $userId]);
4642
-	            $upusrphnmbrs->closeCursor();
4643
-
4644
-                    return $currentnmbrsrstr;
4645
-
4646
-                } else {
4647
-
4648
-                    // Save the available phone numbers for the current user
4649
-                    $availablenmbrs = implode("|", $currentnmbrs);
4650
-                    $savephno = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `available_numbers` = ? WHERE `user_id` = ?');
4651
-                    $upusrphnmbrs = $savephno->execute([$availablenmbrs, $userId]);
4652
-	            $upusrphnmbrs->closeCursor();
4653
-
4654
-                    return $currentnmbrs; 
4655
-                }
4656
-            }
4657
-        }
4658
-    }
4659
-
4660
-
4661
-    /**
4662
-     * @NoAdminRequired
4663
-     */
4664
-    public function refreshavailablenumbers($userId) {
4665
-
4666
-        $smsapicred = $this->getapicredentials($userId);
4667
-
4668
-        $telnyxkey = $smsapicred[0];
4669
-
4670
-        $nexapikey = $smsapicred[5];
4671
-        $nexapisecret = $smsapicred[6];
4672
-
4673
-        $twilapikey = $smsapicred[15];
4674
-        $twilapisecret = $smsapicred[16];
4675
-
4676
-        $flowapikey = $smsapicred[20];
4677
-        $flowapisecret = $smsapicred[21];
4678
-
4679
-        $telsendernameinit = $smsapicred[9];
4680
-        $nexsendernameinit = $smsapicred[10];
4681
-        $twilsendernameinit = $smsapicred[19];
4682
-
4683
-        if ($telsendernameinit) {
4684
-            $telsendername = "Tx: " . $telsendernameinit;
4685
-            $telsenderarr = [0 => $telsendername];
4686
-        } else { $telsenderarr = []; }
4687
-
4688
-        if ($nexsendernameinit) {
4689
-            $nexsendername = "Pl: " . $nexsendernameinit;
4690
-            $nexsenderarr = [0 => $nexsendername];
4691
-        } else { $nexsenderarr = []; }
4692
-
4693
-        if ($twilsendernameinit) {
4694
-            $twilsendername = "Tw: " . $twilsendernameinit;
4695
-            $twilsenderarr = [0 => $twilsendername];
4696
-        } else { $twilsenderarr = []; }
4697
-
4698
-        // Get Telnyx phone numbers
4699
-        if ($telnyxkey != '') {
4700
-
4701
-           \Telnyx\Telnyx::setApiKey($telnyxkey);
4702
-           $telnumbers = \Telnyx\MessagingPhoneNumber::All();
4703
-
4704
-           $telnumbersarr = $this->object_to_array($telnumbers);
4705
-           $telnmbrs = [];
4706
-
4707
-           foreach ($telnumbersarr['_originalValues'] as $nmbkey => $nmbvalue) {
4708
-              if (is_int($nmbkey)) {
4709
-                 foreach ($nmbvalue as $nkey => $nvalue) {
4710
-                    if ($nkey == 'phone_number' && $nvalue) {
4711
-                       $telnmbrs[] = "Tx: " . $nvalue;
4712
-                    }
4713
-                 }
4714
-              }
4715
-           }
4716
-
4717
-        } else { $telnmbrs = []; }
4718
-
4719
-        // Get Plivo phone numbers
4720
-        if ($nexapikey != '' && $nexapisecret != '') {
4721
-
4722
-           $getacdata = "https://".$nexapikey.":".$nexapisecret."@api.plivo.com/v1/Account/".$nexapikey."/Number/";
4723
-           $acdata = file_get_contents($getacdata);
4724
-           $datainit = json_decode($acdata, true);
4725
-
4726
-           $findata = $this->object_to_array($datainit);
4727
-
4728
-           $nexcurrentnmbrs = [];
4729
-
4730
-           foreach ($findata['objects'] as $smskey => $smsvalue) {
4731
-                   if (is_array($smsvalue)) {
4732
-                         foreach ($smsvalue as $smskey2 => $smsvalue2) {
4733
-                               if ($smskey2 == 'number' && $smsvalue2) {
4734
-                                   $nexcurrentnmbrs[] = "Pl: +" . $smsvalue2;
4735
-                               }
4736
-                         }
4737
-                   }
4738
-           }
4739
-
4740
-        } else { $nexcurrentnmbrs = []; }
4741
-
4742
-        // Get Twilio phone numbers
4743
-        if ($twilapikey != '' && $twilapisecret != '') {
4744
-
4745
-            $twilnumbers = json_decode(file_get_contents("https://".$twilapikey.":".$twilapisecret."@api.twilio.com/2010-04-01/Accounts/".$twilapikey."/IncomingPhoneNumbers.json"), true);
4746
-            $twilactivenmbrs = $twilnumbers['incoming_phone_numbers'];
4747
-
4748
-            $twilcurrentnmbrs = [];
4749
-            foreach ($twilactivenmbrs as $twnbkey => $twnbvalue) {
4750
-                 if (is_array($twnbvalue)) {
4751
-                     foreach ($twnbvalue as $twfkey => $twfvalue) {
4752
-                          if ($twfkey == 'phone_number' && $twfvalue) {
4753
-                              $twilcurrentnmbrs[] = "Tw: " . $twfvalue;
4754
-                          }
4755
-                     }
4756
-                 }
4757
-            }
4758
-
4759
-        } else { $twilcurrentnmbrs = []; }
4760
-
4761
-        // Get Flowroute phone numbers
4762
-        if ($flowapikey != '' && $flowapisecret != '') {
4763
-
4764
-            $flnbrsresult = json_decode(file_get_contents("https://".$flowapikey.":".$flowapisecret."@api.flowroute.com/v2/numbers"));
4765
-            $flnbrsarr = $flnbrsresult->data;
4766
-            $flowcurrentnmbrs = [];
4767
-            foreach ($flnbrsarr as $flkey => $flitem) {
4768
-                     if ($flitem->id) {
4769
-                         $flowcurrentnmbrs[] = "Fl: +" . $flitem->id;
4770
-                     }
4771
-            }
4772
-
4773
-        } else { $flowcurrentnmbrs = []; }
4774
-
4775
-        $currentnmbrs = array_merge($telnmbrs, $nexcurrentnmbrs, $twilcurrentnmbrs, $flowcurrentnmbrs, $telsenderarr, $nexsenderarr, $twilsenderarr);
4776
-
4777
-
4778
-        if ($this->groupManager->isAdmin($userId)) {
4779
-
4780
-            // Save the available phone numbers for the current user
4781
-            $availablenmbrs = implode("|", $currentnmbrs);
4782
-            $savephno = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `available_numbers` = ? WHERE `user_id` = ?');
4783
-            $upusrphnmbrs = $savephno->execute([$availablenmbrs, $userId]);
4784
-	    $upusrphnmbrs->closeCursor();
4785
-
4786
-            return $currentnmbrs;
4787
-
4788
-        } else {
4789
-
4790
-            // Get the restrictions from the 'sms_relent_restrict' table
4791
-            $getrestr = $this->connection->prepare('
4792
-		       SELECT `phone_number`, `groups`, `users` FROM `*PREFIX*sms_relent_restrict`');
4793
-            $getrestrres = $getrestr->execute();
4794
-
4795
-            $restrdata = [];
4796
-            while ($restrfetched = $getrestrres->fetch()) {
4797
-                   $restrdata[] = $restrfetched;
4798
-            }
4799
-            $getrestrres->closeCursor();
4800
-
4801
-            if ($restrdata) {
4802
-
4803
-                // Get the groups to which the current user belongs
4804
-                $getusrgrp = $this->connection->prepare('
4805
-		       SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `uid` = ?');
4806
-                $getusrgrpres = $getusrgrp->execute([$userId]);
4807
-
4808
-                $usergrps = [];
4809
-                while ($fetchedgrps = $getusrgrpres->fetch()) {
4810
-                       $usergrps[] = $fetchedgrps['gid'];
4811
-                }
4812
-                $getusrgrpres->closeCursor();
4813
-                $ctusergroups = implode("|", $usergrps);
4814
-
4815
-		// Get the Display Name of the current user
4816
-		$getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
4817
-		$getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
4818
-		$acdatausrdnadm = $getacdatadnres->fetch();
4819
-		$cruserdname = $acdatausrdnadm['value'];
4820
-		$getacdatadnres->closeCursor();
4821
-
4822
-                // Get the phone numbers that are not allowed for the current user
4823
-                $restrPhoneNb = [];
4824
-                foreach ($restrdata as $rskey => $rsvalue) {
4825
-
4826
-                        $chck = 0;
4827
-                        if ($rsvalue['groups']) {
4828
-                            $restrgrparr = explode("|", $rsvalue['groups']);
4829
-
4830
-                            foreach ($restrgrparr as $grkey => $grvalue) {
4831
-                                     if (str_contains($ctusergroups, $grvalue)) { $chck++; }
4832
-                            }
4833
-                        }
4834
-
4835
-                        if ($rsvalue['users']) {
4836
-                            $usrnmstr = $rsvalue['users'];
4837
-                            if (str_contains($usrnmstr, $cruserdname)) { $chck++; }
4838
-                        }
4839
-
4840
-                        if ($chck == 0) { $restrPhoneNb[] = $rsvalue['phone_number']; }
4841
-                }
4842
-
4843
-                $restrPhoneNmbrs = array_unique($restrPhoneNb);
4844
-
4845
-                // Assemble the array of phone numbers that the current user is allowed to use
4846
-                for ($k = 0; $k < count($currentnmbrs); $k++) {
4847
-
4848
-                    if (in_array($currentnmbrs[$k], $restrPhoneNmbrs)) {
4849
-                        unset($currentnmbrs[$k]);
4850
-                    }
4851
-                }
4852
-
4853
-                $currentnmbrsrstr = array_values($currentnmbrs);
4854
-
4855
-                // Save the available phone numbers for the current user
4856
-                $availablenmbrs = implode("|", $currentnmbrsrstr);
4857
-                $savephno = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `available_numbers` = ? WHERE `user_id` = ?');
4858
-                $upusrphnmbrs = $savephno->execute([$availablenmbrs, $userId]);
4859
-	        $upusrphnmbrs->closeCursor();
4860
-
4861
-                return $currentnmbrsrstr;
4862
-
4863
-            } else {
4864
-
4865
-                // Save the available phone numbers for the current user
4866
-                $availablenmbrs = implode("|", $currentnmbrs);
4867
-                $savephno = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `available_numbers` = ? WHERE `user_id` = ?');
4868
-                $upusrphnmbrs = $savephno->execute([$availablenmbrs, $userId]);
4869
-	        $upusrphnmbrs->closeCursor();
4870
-
4871
-                return $currentnmbrs; 
4872
-            }
4873
-        }
4874
-    }
4875
-}
4876 0
deleted file mode 100644
... ...
@@ -1,299 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'adminsettings');
27
-style('sms_relentless', 'style');
28
-
29
-?>
30
-
31
-<div id="sms_relentless_adm">
32
-
33
-        <div class="section">
34
-           <h2><?php p($l->t('SMS Relentless'));?></h2>
35
-           <p id="settings-dscr"><h3><?php p($l->t('Enter your credentials and options in the fields from below. As SMS service provider you can use Telnyx, Plivo, Twilio or 
36
-               Flowroute, or all of them:')); ?></h3></p><br>
37
-           <div class="sms_followupsection">
38
-
39
-                <form id="admin_conf" action="#" >
40
-
41
-                   <div class="providerSettings">
42
-                   <p class="providerName">Telnyx Settings</p>
43
-                   <p><label for="telapi_key" class="setlabeltext"><b>Telnyx API Secret Key</b> (Log in to Telnyx, then, on the 'Home' page, in the 'API Keys' section from the upper 
44
-                          right corner, click on 'Manage Keys'. If you already have an API key, just copy it by clicking the 'Copy to clipboard' icon. Otherwise, to create an API key, 
45
-                          click the 'Create API Key' button, on the pop up message click 'Create', then enter it in the field from below.):</label></p>
46
-                   <input type="password" class="smsr_textbox" id="telapi_key" name="telapi_key" autocomplete="false"
47
-                          placeholder="e.g. d6f172ce92e4f2 ..." /><br>
48
-
49
-                   <p><label for="tel_pub_key" class="setlabeltext"><b>Telnyx Account Public Key</b> (While logged in to Telnyx, on the 'Home' page, in the 'API Keys' section from the 
50
-                          upper right corner, click on 'Manage Keys', then click on 'Public Key' on the upper bar, then copy the key from the 'Key' field and enter it in the field from 
51
-                          below.):</label></p>
52
-                   <input type="password" class="smsr_textbox" id="tel_pub_key" name="tel_pub_key" autocomplete="false"
53
-                          placeholder="e.g. KLCnMsTSp8utW3RRHx0FiXxbf5BxK2Y5q8mMTCn0jgv=" /><br>
54
-
55
-                   <p><label for="messaging_profile_id" class="setlabeltext"><b>Messaging Profile ID</b> (While logged in to Telnyx, click on 'Messaging', then on 'Programmable 
56
-                       Messaging' on the left panel, click on the name of the messaging profile that you want to use, then under 'Profile ID' you will find the messaging profile ID. 
57
-                       Copy it and enter it in the field from below.):
58
-                   </label></p>
59
-                   <input type="password" class="smsr_textbox" id="messaging_profile_id" name="messaging_profile_id" autocomplete="false"
60
-                          placeholder="e.g. 9d4f47b6-26c9-d25c-c2f5 ..." /><br>
61
-
62
-                   <p><label for="telapi_url_rec" class="setlabeltext"><b>Telnyx webhook URL for incoming SMS/MMS</b> (You have to first generate and then copy this URL into your Telnyx
63
-                       account, so that Telnyx knows where to deliver the SMS/MMS messages received by your Telnyx phone number(s). First generate the URL by pressing the button from
64
-                       below, copy it, then, in your Telnyx account click on 'Messaging' then on 'Programmable Messaging' on the left panel, click on the name of the messaging profile 
65
-                       that you associated with your phone number(s), then, under 'Inbound Settings', enter the webhook URL generated here in the field 'Send a webhook to this URL' and 
66
-                       click the 'Save' button. Don't forget to also click the 'Save' button at the bottom of this page after entering all the credentials, to save all the settings to 
67
-                       the database.)</label></p>
68
-                   <input type="button" id="generate_tel_rcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for incoming SMS/MMS')) ?>" />
69
-                   <input type="text" class="smsr_textboxspec" id="telapi_url_rec" name="telapi_url_rec" autocomplete="false" />
70
-                   <span id="copyToClipboardtel" class="icon icon-clippy" title="Copy to clipboard"></span><br><br>
71
-
72
-                   <p><label for="telapi_url" class="setlabeltext"><b>Telnyx webhook URL for delivery receipts</b> (This URL will be included by SMS Relentless in message sending 
73
-                       requests, so that Telnyx will know where to send the delivery receipts. Just generate it by pressing the button from below.
74
-                       You don't have to enter this URL into your Telnyx account. Don't forget to click the 'Save' button at the bottom of this page after entering all the credentials, 
75
-                       to save all the settings to the database.)</label></p>
76
-                   <input type="button" id="generate_tel_delrcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for delivery receipts')) ?>" />
77
-                   <input type="text" id="telapi_url" name="telapi_url" autocomplete="false" /><br><br>
78
-
79
-                   <p><label for="tel_sender_name" class="setlabeltext"><b>Telnyx alphanumeric Sender ID</b> (If you intend to use an alphanumeric Sender ID, enter an alphanumeric 
80
-                          sequence of up to 11 characters in the range of a-z, A-Z, 0-9 and space. In certain countries there are regulations that accept only shorter alphanumeric 
81
-                          Sender IDs, such as up to 6 characters. You cannot send SMS/MMS messages with alphanumeric Sender IDs to USA or Canada. There are even 
82
-                          <a href="https://support.plivo.com/hc/en-us/articles/360041448032" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> that require
83
-                          preregistration of alphanumeric Sender IDs. Before sending SMS/MMS messages to a country, it's recommended to read the
84
-                          <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank"
85
-                          rel="noreferrer noopener">country specific features and restrictions.</a> Some carriers won't accept messages with an alphanumeric Sender ID): </label></p>
86
-                   <input type="text" class="smsr_textbox" id="tel_sender_name" name="tel_sender_name" autocomplete="false"
87
-                          placeholder="e.g. Smart Inc" /><br><br>
88
-
89
-                   <p><label for="tnxKeysAccessTbl" class="setlabeltext"><b>Allow the following groups and non-admin users to send and receive messages using the Telnyx API Secret Key, 
90
-                          Public Key, messaging profile ID and alphanumeric Sender ID mentioned above (to be able to use them properly, the users with whom these credentials are shared 
91
-                          will have to access their app Settings page, generate the two webhook URLs for Telnyx by clicking the corresponding 'Generate new webhook URL ...' buttons, and
92
-                          then click the 'Save' button at the bottom of that page):</b></label></p><br>
93
-
94
-                   <table id="tnxKeysAccessTbl">
95
-
96
-                      <tr><th>Groups Allowed</th><th style="max-width: 40px !important"></th><th>Users Allowed</th><th style="max-width: 40px !important"></th><th></th></tr>
97
-                      <tr><td><div id="alwdakeyGrps-tnx" class="alwdKeysGroups"></div></td><td><div id="showakeyGrps-tnx" class="showAllGroupsak">
98
-                      <img class="srGroupImg" style="cursor:pointer" title="Show all groups"></div></td><td><div id="alwdakeyUsrs-tnx" class="alwdKeysUsers"></div>
99
-                      </td><td><div id="showakeyUsrs-tnx" class="showAllUsersak"><img class="srUserImg" style="cursor:pointer" title="Show all users"></div></td>
100
-                      <td><input type="submit" id="alwdrstsave-tnx" class="savealwdKeys" value="Edit" title="Edit Row" /></td></tr>
101
-
102
-                   </table><br>
103
-
104
-                   </div><br><br><br>
105
-
106
-                   <div class="providerSettings">
107
-                   <p class="providerName">Plivo Settings</p>
108
-                   <p><label for="nexapi_key" class="setlabeltext"><b>Plivo Auth ID</b> (Log in to Plivo. On the first page, which is the Overview page, under Account, copy the 'Auth ID'
109
-                          and enter it in the field from below.):</label></p>
110
-                   <input type="password" class="smsr_textbox" id="nexapi_key" name="nexapi_key" autocomplete="false"
111
-                          placeholder="e.g. r5g974cb92e4t1 ...'" /><br>
112
-
113
-                   <p><label for="nexapi_secret" class="setlabeltext"><b>Plivo Auth Token</b> (While logged in to Plivo, on the Overview page, under Account, copy the 'Auth Token' and
114
-                          enter it in the field from below.):</label></p>
115
-                   <input type="password" class="smsr_textbox" id="nexapi_secret" name="nexapi_secret" autocomplete="false"
116
-                          placeholder="e.g. k6f489d8awn4p9 ..." /><br>
117
-
118
-                   <p><label for="nexapi_url_rec" class="setlabeltext"><b>Plivo webhook URL for incoming SMS/MMS</b> (You have to first generate and then copy this URL into your Plivo
119
-                       account, so that Plivo knows where to deliver the SMS/MMS messages received by your Plivo phone number(s). First generate the URL by pressing the button from
120
-                       below, copy it, then, in your Plivo account click on 'Messaging' on the left vertical bar, click on 'Applications', then, under 'Application name' click on
121
-                       'Inbound SMS Messages', next, under 'Message', enter the webhook URL generated here in the field 'Message URL' and select 'POST' next to it, then click the
122
-                       'Update Application' button. Don't forget to also click the 'Save' button at the bottom of this page after entering all the credentials, to save all the settings 
123
-                       to the database.)</label></p>
124
-                   <input type="button" id="generate_nex_rcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for incoming SMS/MMS')) ?>" />
125
-                   <input type="text" class="smsr_textboxspec" id="nexapi_url_rec" name="nexapi_url_rec" autocomplete="false" />
126
-                   <span id="copyToClipboardnex" class="icon icon-clippy" title="Copy to clipboard"></span><br><br>
127
-
128
-                   <p><label for="nexapi_url" class="setlabeltext"><b>Plivo webhook URL for delivery receipts</b> (This URL will be included by SMS Relentless in message sending 
129
-                       requests, so that Plivo will know where to send the delivery receipts. Just generate it by pressing the button from below.
130
-                       You don't have to enter this URL into your Plivo account. Don't forget to click the 'Save' button at the bottom of this page after entering all the credentials, 
131
-                       to save all the settings to the database.)</label></p>
132
-                   <input type="button" id="generate_nex_delrcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for delivery receipts')) ?>" />
133
-                   <input type="text" id="nexapi_url" name="nexapi_url" autocomplete="false" /><br><br>
134
-
135
-                   <p><label for="nex_sender_name" class="setlabeltext"><b>Plivo alphanumeric Sender ID:</b> (If you intend to use an alphanumeric Sender ID, enter an alphanumeric 
136
-                          sequence of up to 11 characters in the range of a-z, A-Z, 0-9 and space. In certain countries there are regulations that accept only shorter alphanumeric 
137
-                          Sender IDs, such as up to 6 characters. You cannot send SMS/MMS messages with alphanumeric Sender IDs to USA or Canada. There are even 
138
-                          <a href="https://support.plivo.com/hc/en-us/articles/360041448032" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> that require
139
-                          preregistration of alphanumeric Sender IDs. Before sending SMS/MMS messages to a country, it's recommended to read the
140
-                          <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank"
141
-                          rel="noreferrer noopener">country specific features and restrictions.</a> Some carriers won't accept messages with an alphanumeric Sender ID): </label></p>
142
-                   <input type="text" class="smsr_textbox" id="nex_sender_name" name="nex_sender_name" autocomplete="false"
143
-                          placeholder="e.g. Global Inc" /><br><br>
144
-
145
-                   <p><label for="plvKeysAccessTbl" class="setlabeltext"><b>Allow the following groups and non-admin users to send and receive messages using the Plivo Auth ID, Auth 
146
-                          Token and alphanumeric Sender ID mentioned above (to be able to use them properly, the users with whom these credentials are shared will have to access their 
147
-                          app Settings page, generate the two webhook URLs for Plivo by clicking the corresponding 'Generate new webhook URL ...' buttons, and then click the 'Save' 
148
-                          button at the bottom of that page):</b></label></p><br>
149
-
150
-                   <table id="plvKeysAccessTbl">
151
-
152
-                      <tr><th>Groups Allowed</th><th style="max-width: 40px !important"></th><th>Users Allowed</th><th style="max-width: 40px !important"></th></th><th></tr>
153
-                      <tr><td><div id="alwdakeyGrps-plv" class="alwdKeysGroups"></div></td><td><div id="showakeyGrps-plv" class="showAllGroupsak">
154
-                      <img class="srGroupImg" style="cursor:pointer" title="Show all groups"></div></td><td><div id="alwdakeyUsrs-plv" class="alwdKeysUsers"></div>
155
-                      </td><td><div id="showakeyUsrs-plv" class="showAllUsersak"><img class="srUserImg" style="cursor:pointer" title="Show all users"></div></td>
156
-                      <td><input type="submit" id="alwdrstsave-plv" class="savealwdKeys" value="Edit" title="Edit Row" /></td></tr>
157
-
158
-                   </table><br>
159
-
160
-                   </div><br><br><br>
161
-
162
-                   <div class="providerSettings">
163
-                   <p class="providerName">Twilio Settings</p>
164
-                   <p><label for="twilapi_key" class="setlabeltext"><b>Twilio Account SID</b> (Log in to Twilio. On the first page, under Account Info, copy the 'Account SID'
165
-                          and enter it in the field from below.):</label></p>
166
-                   <input type="password" class="smsr_textbox" id="twilapi_key" name="twilapi_key" autocomplete="false"
167
-                          placeholder="e.g. r5g974cb92e4t1 ..." /><br>
168
-
169
-                   <p><label for="twilapi_secret" class="setlabeltext"><b>Twilio Auth Token</b> (While logged in to Twilio, on the first page, under Account Info, copy the 'Auth Token'
170
-                          and enter it in the field from below.):</label></p>
171
-                   <input type="password" class="smsr_textbox" id="twilapi_secret" name="twilapi_secret" autocomplete="false"
172
-                          placeholder="e.g. k6f489d8awn4p9 ..." /><br>
173
-
174
-                   <p><label for="twilapi_url_rec" class="setlabeltext"><b>Twilio webhook URL for incoming SMS/MMS</b> (You have to first generate and then copy this URL into your 
175
-                       Twilio account, so that Twilio knows where to deliver the SMS/MMS messages received by your Twilio phone number(s). First generate the URL by pressing the button 
176
-                       from below, copy it, then, in your Twilio account click on 'Phone Numbers' on the left panel > 'Manage' > 'Active numbers', click on the phone number you want to 
177
-                       use for SMS/MMS, scroll down to the 'Messaging' section, then under 'A MESSAGE COMES IN' select 'Webhook', then paste in the webhook URL that you have just 
178
-                       generated and select 'HTTP POST' as the request type. Enter the same data under 'PRIMARY HANDLER FAILS', then click the 'Save' button. If you have multiple 
179
-                       SMS/MMS enabled phone numbers, do the same for each number. Don't forget to also click the 'Save' button at the bottom of this page after entering all the 
180
-                       credentials, to save all the settings to the database.)</label></p>
181
-                   <input type="button" id="generate_twil_rcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for incoming SMS/MMS')) ?>" />
182
-                   <input type="text" class="smsr_textboxspec" id="twilapi_url_rec" name="twilapi_url_rec" autocomplete="false" />
183
-                   <span id="copyToClipboardtwil" class="icon icon-clippy" title="Copy to clipboard"></span><br><br>
184
-
185
-                   <p><label for="twilapi_url" class="setlabeltext"><b>Twilio webhook URL for delivery receipts</b> (This URL will be included by SMS Relentless in message sending 
186
-                       requests, so that Twilio will know where to send the delivery receipts. Just generate it by pressing the button from below.
187
-                       You don't have to enter this URL into your Twilio account. Don't forget to click the 'Save' button at the bottom of this page after entering all the credentials, 
188
-                       to save all the settings to the database.)</label></p>
189
-                   <input type="button" id="generate_twil_delrcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for delivery receipts')) ?>" />
190
-                   <input type="text" id="twilapi_url" name="twilapi_url" autocomplete="false" /><br><br>
191
-
192
-                   <p><label for="twil_sender_name" class="setlabeltext"><b>Twilio alphanumeric Sender ID:</b> (If you intend to use an alphanumeric Sender ID, enter an alphanumeric 
193
-                          sequence of up to 11 characters in the range of a-z, A-Z, 0-9 and space. In certain countries there are regulations that accept only shorter alphanumeric 
194
-                          Sender IDs, such as up to 6 characters. You cannot send SMS/MMS messages with alphanumeric Sender IDs to USA or Canada. There are even 
195
-                          <a href="https://support.plivo.com/hc/en-us/articles/360041448032" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> that require
196
-                          preregistration of alphanumeric Sender IDs. Before sending SMS/MMS messages to a country, it's recommended to read the
197
-                          <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank"
198
-                          rel="noreferrer noopener">country specific features and restrictions.</a> Some carriers won't accept messages with an alphanumeric Sender ID): </label></p>
199
-                   <input type="text" class="smsr_textbox" id="twil_sender_name" name="twil_sender_name" autocomplete="false"
200
-                          placeholder="e.g. Global Inc" /><br><br>
201
-
202
-                   <p><label for="twlKeysAccessTbl" class="setlabeltext"><b>Allow the following groups and non-admin users to send and receive messages using the Twilio Account SID, 
203
-                          Auth Token and alphanumeric Sender ID mentioned above (to be able to use them properly, the users with whom these credentials are shared will have to access 
204
-                          their app Settings page, generate the two webhook URLs for Twilio by clicking the corresponding 'Generate new webhook URL ...' buttons, and then click the 
205
-                          'Save' button at the bottom of that page):</b></label></p><br>
206
-
207
-                   <table id="twlKeysAccessTbl">
208
-
209
-                      <tr><th>Groups Allowed</th><th style="max-width: 40px !important"></th><th>Users Allowed</th><th style="max-width: 40px !important"></th></th><th></tr>
210
-                      <tr><td><div id="alwdakeyGrps-twl" class="alwdKeysGroups"></div></td><td><div id="showakeyGrps-twl" class="showAllGroupsak">
211
-                          <img class="srGroupImg" style="cursor:pointer" title="Show all groups"></div></td>
212
-                          <td><div id="alwdakeyUsrs-twl" class="alwdKeysUsers"></div></td><td><div id="showakeyUsrs-twl" class="showAllUsersak">
213
-                          <img class="srUserImg" style="cursor:pointer" title="Show all users"></div></td>
214
-                          <td><input type="submit" id="alwdrstsave-twl" class="savealwdKeys" value="Edit" title="Edit Row" /></td></tr>
215
-
216
-                   </table><br>
217
-
218
-                   </div><br><br><br>
219
-
220
-                   <div class="providerSettings">
221
-                   <p class="providerName">Flowroute Settings</p>
222
-                   <p><label for="flowapi_key" class="setlabeltext"><b>Flowroute Access Key</b> (Log in to Flowroute. On the left panel, click on 'Preferences', then on the 'API Control'
223
-                          tab. Scroll down to the 'API Keys' section. If you already have a pair of keys listed in that section, just copy the Access Key to the field from below. If you
224
-                          haven't created any keys yet, to create a key pair, under 'Add new API Key', in the 'Name' field, enter a name for the new key pair. In the 'Description' field 
225
-                          enter a short description, then click 'Add new'. A new pair of keys will be created and you will be prompted to copy the Secret Key. After you copy the Secret 
226
-                          Key to a safe location, copy the Access Key that has just been created to the field from below.):</label></p>
227
-                   <input type="password" class="smsr_textbox" id="flowapi_key" name="flowapi_key" autocomplete="false"
228
-                          placeholder="e.g. r5g974cb92e4t1 ..." /><br>
229
-
230
-                   <p><label for="flowapi_secret" class="setlabeltext"><b>Flowroute Secret Key</b> (Enter the Secret Key created earlier and copied to a safe place, in the field from 
231
-                          below.):</label></p>
232
-                   <input type="password" class="smsr_textbox" id="flowapi_secret" name="flowapi_secret" autocomplete="false"
233
-                          placeholder="e.g. k6f489d8awn4p9 ..." /><br>
234
-
235
-                   <p><label for="flowapi_url_rec" class="setlabeltext"><b>Flowroute webhook URL for incoming SMS/MMS</b> (You have to first generate and then copy this URL into your 
236
-                          Flowroute account, so that Flowroute knows where to deliver the SMS/MMS messages received by your Flowroute phone number(s). First generate the URL by pressing 
237
-                          the button from below, copy it, then, in your Flowroute account click on 'Preferences' on the left panel, then click on the 'API Control tab', turn on the 'SMS' 
238
-                          switch and in the field that shows up enter the URL that you have just generated. Click 'Save URL'. If you have an MMS enabled phone number, turn on the 'MMS' 
239
-                          switch, enter the same URL in the URL field and save it. Also, under 'SMS Webhook Version' choose 'v2.1'. Don't forget to also click the 'Save' button at the 
240
-                          bottom of this page after entering all the credentials, to save all the settings to the database.)</label></p>
241
-                   <input type="button" id="generate_flow_rcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for incoming SMS/MMS')) ?>" />
242
-                   <input type="text" class="smsr_textboxspec" id="flowapi_url_rec" name="flowapi_url_rec" autocomplete="false" />
243
-                   <span id="copyToClipboardflow" class="icon icon-clippy" title="Copy to clipboard"></span><br><br>
244
-
245
-                   <p><label for="flowapi_url" class="setlabeltext"><b>Flowroute webhook URL for delivery receipts</b> (This URL will be included by SMS Relentless in message sending 
246
-                          requests, so that Flowroute will know where to send the delivery receipts. Just generate it by pressing the button from below. You don't have to enter this URL 
247
-                          into your Flowroute account. Don't forget to click the 'Save' button at the bottom of this page after entering all the credentials, to save all the settings 
248
-                          to the database.)</label></p>
249
-                   <input type="button" id="generate_flow_delrcpt" class="generateUrl" value="<?php p($l->t('Generate new webhook URL for delivery receipts')) ?>" />
250
-                   <input type="text" id="flowapi_url" name="flowapi_url" autocomplete="false" /><br><br>
251
-                   <span style='color:#272727'>Flowroute only supports sending/receiving SMS/MMS messages within USA and Canada and it doesn't support Alphanumeric Sender IDs.</span><br><br>
252
-
253
-                   <p><label for="flrKeysAccessTbl" class="setlabeltext"><b>Allow the following groups and non-admin users to send and receive messages using the Flowroute Access Key 
254
-                          and Secret Key mentioned above (to be able to use them properly, the users with whom these credentials are shared will have to access their app Settings page, 
255
-                          generate the two webhook URLs for Flowroute by clicking the corresponding 'Generate new webhook URL ...' buttons, and then click the 'Save' button at the 
256
-                          bottom of that page):</b></label></p><br>
257
-
258
-                   <table id="flrKeysAccessTbl">
259
-
260
-                      <tr><th>Groups Allowed</th><th style="max-width: 40px !important"></th><th>Users Allowed</th><th style="max-width: 40px !important"></th></th><th></tr>
261
-                      <tr><td><div id="alwdakeyGrps-flr" class="alwdKeysGroups"></div></td><td><div id="showakeyGrps-flr" class="showAllGroupsak">
262
-                      <img class="srGroupImg" style="cursor:pointer" title="Show all groups"></div></td><td>
263
-                      <div id="alwdakeyUsrs-flr" class="alwdKeysUsers"></div></td><td><div id="showakeyUsrs-flr" class="showAllUsersak">
264
-                      <img class="srUserImg" style="cursor:pointer" title="Show all users"></div></td>
265
-                      <td><input type="submit" id="alwdrstsave-flr" class="savealwdKeys" value="Edit" title="Edit Row" /></td></tr>
266
-
267
-                   </table><br>
268
-
269
-                   </div><br><br><br>
270
-
271
-
272
-                   <p><label for="showallmessages" class="setlabeltext"><b>In my message tables, list not only my messages but also the messages of all the Nextcloud users 
273
-                   with whom I share the access keys mentioned above:</b></label></p>
274
-                   <input type="checkbox" class="sms_rel_checkbox" id="showallmessages" name="showallmessages" autocomplete="false" /><br>
275
-
276
-                   <p><div class="setlabeltext"><b>Restrict access to the following phone numbers:</b><div class="tooltiprestrict">
277
-                        <div id="inforestrict">i</div><div class="restricttooltext">After you allow non-admin users to use your API keys for a provider, to send and
278
-                        receive messages, they will be able to see and use all the phone numbers associated with those API keys. However, if you restrict shared phone 
279
-                        numbers to specific non-admin users, they will be able to see and use only those numbers and won't be able to see and use the other numbers 
280
-                        associated with those shared API keys.</div></div></p><br>
281
-
282
-                   <table id="phoneNmbrRestr">
283
-
284
-                      <tr><th>Restriction Author</th><th id="phoneNumberTh">Phone Number</th><th>Groups Allowed</th><th style="max-width: 40px !important"></th><th>Users Allowed</th>
285
-                      <th style="max-width: 40px !important"></th><th></th><th></th></tr>
286
-
287
-                   </table><br>
288
-
289
-                   <input type="hidden" id="user_id" name="user_id" />
290
-
291
-                   <input id="save_admin_settings" type="submit" value="<?php p($l->t('Save')) ?>" />
292
-
293
-                   <span id="smsr_save_msg"></span>
294
-
295
-               </form>
296
-           </div>
297
-        </div>
298
-</div>
299
-