Browse code

removed CHANGELOG.txt appinfo/info.xml appinfo/signature.json css/style.css img/closewnd.svg ...

DoubleBastionAdmin authored on 23/05/2023 18:50:19
Showing 15 changed files
1 1
deleted file mode 100644
... ...
@@ -1,101 +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 0
deleted file mode 100644
... ...
@@ -1,90 +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 or Plivo or Twilio or Flowroute is needed. The 'libcurl' PHP library has to be installed on the server. Detailed instructions 
10
-on how to configure and use this application can be found on the 'Admin documentation' page.
11
-
12
-### Features:
13
-
14
-* 🚀 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.
15
-
16
-* 📑 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.
17
-
18
-* 🖼️  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.
19
-
20
-* 📔 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.
21
-
22
-* 💻 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.
23
-
24
-* 👤 The Display Name of Nextcloud users can be prepended to their messages, so that the origin of the messages is much clearer.
25
-
26
-* ⚠️  Admins can restrict the use of specific phone numbers to specific groups or users.
27
-
28
-* ✉️  Auto-replies in 'daily mode' and 'vacation mode' can be configured for any controlled phone number.
29
-
30
-* 🔏 SMS/MMS messages coming from Telnyx, Plivo and Twilio are checked for authenticity by verifying the SMS provider's signature.
31
-
32
-* 📧 Users receive notifications in Nextcloud and (optionally) emails when new SMS/MMS messages arrive.
33
-
34
-* 📄 Each sent message receives a delivery receipt displayed in the Sent SMS Messages table.
35
-
36
-* 📱 It works 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. 
37
-
38
-* 💵 It allows checking the current Telnyx/Plivo/Twilio balance by selecting the provider on the left panel.
39
-
40
-* 💰 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.
41
-
42
-* 💸 Low prices per SMS: starting from $0.0060 per sent message and $0.0040 per received message (Telnyx), or $0.0070 per sent message and $0 per received message (Plivo), or $0.0099 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.
43
-
44
-We have no affiliation with Telnyx, Plivo, Twilio or Flowroute.
45
-
46
-### Documentation
47
-
48
-* [Admin documentation](https://www.doublebastion.com/install-nextcloud/#install-sms-relentless)
49
-
50
-### Donations
51
-
52
-* 🎁 [Donate](https://www.doublebastion.com/donations/)
53
-
54
-    ]]></description>
55
-    <version>1.2.0</version>
56
-    <licence>AGPL</licence>
57
-    <author mail="contact@doublebastion.com">Double Bastion LLC</author>
58
-    <namespace>SMSRelentless</namespace>
59
-	<documentation>
60
-		<admin>https://www.doublebastion.com/install-nextcloud/#install-sms-relentless</admin>
61
-	</documentation>
62
-    <category>office</category>
63
-    <category>organization</category>
64
-
65
-    <website>https://www.doublebastion.com/sms-relentless/</website>
66
-    <bugs>https://git.doublebastion.com/sms-relentless/issues/develop</bugs>
67
-    <repository>https://git.doublebastion.com/sms-relentless/develop/</repository>
68
-
69
-    <screenshot>https://git.doublebastion.com/sms-relentless/raw/develop/img/sms_relentless_screenshot.png</screenshot>
70
-
71
-    <dependencies>
72
-            <nextcloud min-version="25" max-version="26" />
73
-    </dependencies>
74
-
75
-    <navigations>
76
-        <navigation>
77
-            <name>SMS Relentless</name>
78
-            <route>sms_relentless.page.index</route>
79
-            <order>102</order>
80
-            <icon>../img/sms_relentless.svg</icon>
81
-        </navigation>
82
-    </navigations>
83
-
84
-    <settings>
85
-            <personal>OCA\SMSRelentless\Settings\Personal</personal>
86
-            <personal-section>OCA\SMSRelentless\Settings\PersonalSection</personal-section>
87
-            <admin>OCA\SMSRelentless\Settings\Admin</admin>
88
-    	    <admin-section>OCA\SMSRelentless\Settings\AdminSection</admin-section>
89
-    </settings>
90
-</info>
91 0
deleted file mode 100644
... ...
@@ -1,855 +0,0 @@
1
-{
2
-    "hashes": {
3
-        "CHANGELOG.txt": "6fcb4f771a5a96d9ca1b9359705539a24c08be033993dc062d4efa43887867c7021ae8eb064fbf6a82314212c770ba139ac12a46cc04ba6f3c61abbb7c42272c",
4
-        "COPYING.txt": "a0a86214ea153fb07ff35ceec0848dd1703eae22de036a825efc8394e50f65e3044832f3b49cf7e45a39edc470bdf738abc36a3a78ca7df3a6e73c14eaef94a8",
5
-        "Contributors.txt": "8ab4ea9b8c38e4d115af6ca08e8e27592198b763982bd166b67f38ee0b9f2b7e093cd58ce0927ae38ee3bc015b129add2ffeb3967288c804da493241bc67ba9b",
6
-        "README.md": "1303375a0e275dee4117b365e323d5b918a916d28460d202dd3990d1d07d1ca4c88136e0aa05d1222894a37339072f05a9d8c8cc32dd91ae85a703cfb48b9dc4",
7
-        "appinfo\/info.xml": "2b553279914f21b7d194674aab314f94ae1341c51aa93c737738e53a64e8c22e4719c6928110fa09e396d468373e895170c142b41a42238369a325abdc133318",
8
-        "appinfo\/routes.php": "201af4a964d75ace65e4d46aff122afa72390d324b5cab798158985e13234f6f92f6c7320970dc55cd8f64735f07612e107acd8e2574960afb93fe308fa8b5fa",
9
-        "css\/style.css": "3c0dc4ce6c4033e3c96b09902561adfa86cd38c36c27d3cacc51656cf98316b0b00d93170714e85b5737691b0c2e9ce4bfeaf2c9e5c3bc79e8ef5c20de19b07d",
10
-        "img\/add.svg": "5711a740d20d8243b4fa9a52783689af96b3b01af6e422ec6a9f0aca16db068869a5a302e6960168d9c90e2dc0a69eed851d69e7f1bf33684304cf861f990604",
11
-        "img\/arrow-top-small.svg": "3fba2fbf3a27f4d6b44d1c94da2260d025bbe682a3db18c21b9aa548f4878609770cdaa2e5c24e8b5cd97249647187b7499ab18bcd843ae7ee145def41561bbf",
12
-        "img\/arrow-top.svg": "389b15b7bfa8c90a79cd80958d1150538ddd0aeed875eae3a498b9bee8da3e63752fbc6c073cf58405fc35633a9b786e34b3ca1f6d234af685277aa8d439e1a6",
13
-        "img\/arrowDown.svg": "6fb30b189e848b26369238f7446eb1533327a4e99c70b699c10bb03088eeb7d47393f18d4f16bc03edb945f36cf13b96f05b763dba821c0b04b209cd81624103",
14
-        "img\/arrowUp.svg": "4f6a413d836635fd7e2e4d5846ee257c9a13e80624468e444ec906febfcf07a1c84f48d29cce730f29729cc8fbbbd3dab490e2192e5beb2707a6a4b1036bfd76",
15
-        "img\/check.svg": "aff77744fbd4e8eef8d91fd9e128e9e8be2830a93db9ba8d8a8277e78c8610d6ea5ec9678b3dfd2b8f2b4f8970dc40c4111e7af5011b0873bf461f5fbdeeaa88",
16
-        "img\/clearfilters.svg": "f554eff67f4c1440eb3865ea98b00bcde1f27361ae5888dfa7db1ed95d074915aaba0f6aed3f70d6d7c4cb5ca592dbc3f3175f958708e54830f895e8b652b499",
17
-        "img\/closewnd.svg": "003108d36657da07a9a6fd815bdf8e5ee299c905dc1acde7c50145a73cb7b080cd3017181c579874df83207e7b2d5d3104329b71ef6bd61a19b995fcc1413a54",
18
-        "img\/dots.svg": "e4a46301c4b70f3820be8d6906ccec273a96edaaab44d7c133bb58f5499f2fc6381f2029c27d0393e3d31e1cf10bc55ee98f05347fa6af3533cc74290d9bb909",
19
-        "img\/filter_icon.svg": "5258d0d0e3677c10a8ae5d8cc37318855e5a6d5071d5a61ee6d29aad7109292502d60571f2c5ae716295dd8f93a327c060ec7c65f2f9cbfee4b85086682a385e",
20
-        "img\/garbage.svg": "b76cde0659b7f127a810406d2b734f03871e3a7c8bc53acb723c2a97fa6ca0801a26cfebd4ceaa28d2ad237a67a222e00aafaecaf7e749cc8e8f93ae35a4c4f3",
21
-        "img\/garbage_bright.svg": "45bbad63a659b6add876294f8aebda1cf03790b0c253ba442f04fd9677c1a35795eb823dbb92bbf38066e8cdf89fb34671763dabbcdad4722aba3ffcaa21581b",
22
-        "img\/group.svg": "fbc10073fb9f5ac1780ccad2c61586512a922359b48ff76194bc5be2711ba99efcf9ce42a694e4cf1209dc78cf2bd077e12f98590c1fe1123260a23419cd256f",
23
-        "img\/incoming.svg": "c8f6e4c7e55c7fff5c74a87fe14e9f404fe5954a546949f148fd60cae7dd2e9165e883c34f1a3eb5500c12ae2bf281ab1607e04c4b75bd6322571ccf7e6ccc25",
24
-        "img\/list.svg": "2364a4ad93d0e4c85345a293f4f6b0e4135cbfb8b7b5e1ecd81d08affd0e0441439f9cd9e60da77eaa53052ef20cec20b49263e387b500c1fb4a3607b081e73f",
25
-        "img\/nextcloud_logo.svg": "4e0d3f0c371d668d83d443e5b1f69f0eedcc759092601d8fe8710dd97b16fd53aa3f9667bba7f305dc3aacfbc14e29b09b78da8b7bf6f41dcb83f5b16473991e",
26
-        "img\/nextcloud_logo_bright.svg": "aeab941556e29f9537508171583bb3309372866122c150c887c21d6a567c5aa06d2653db67c7151b064d4e2fa25f1fc63df21c786ede02ca5f40f12e5c1bad26",
27
-        "img\/outgoing.svg": "b5be7538df66570991b975b1fdca452144fdc27a14521dfb2ae4d0393d0f3b8abb6837458892e04adbdec0182ee3fd25ae33c6792457154dc2cab6e35bd6eb9e",
28
-        "img\/question.svg": "c2bb43256a2b8c43997dd6b40a2db8c811e3a2a28a0ebc11c8e87d71c21b8cfea3367a39730e6675ca77c9ec6e9adb4bab65cee474c02276f905b4477e28b1bf",
29
-        "img\/refresh_logo.svg": "a95a19645bbde5e2146a3ec669950bc6029bfc6104886552eaeb4746733657ecbe4f9199e676ee2e9852ef0c5adb612d93e300e3fa9713fc611e1f8e7c1d5183",
30
-        "img\/reply.svg": "7e78973c9ef21f69c5138b036192a889350ba4333df42c3e343ab34ecc497574a601d5c6e2275846c9fd2adc525e209c006e9a957dff5d0c53fe1a69ee557e09",
31
-        "img\/sms_relentless.svg": "010ad7cee20f3a256a24bee2482b6798f042a3992c7df5d56ba803cca93552c3cda2a68d1772e67143ce45207b89d397e34ba6909f6b8515134db64e2c5497eb",
32
-        "img\/sms_relentless_dark.svg": "cbe97fe9fe636790ea0b415035cd78321ff53ec93ab1276d4ef609555592fa13d09b2037c20e06bbb9024fcfcc0ebb806c89572b08adcfe4ee9d06c6466b685a",
33
-        "img\/sms_relentless_delete_old_messages.png": "077c74a6f138ed1c46ee9426c0c0573bbee12b71c85ae0cb3ebba1ea040b4f88099405d1074a49496050f092e47af03feac9afb85ed1a2480d74d9f07716d287",
34
-        "img\/sms_relentless_filter_messages_by_date_and_keyword.png": "a014a100ec4be4e5d2e09b8d8afc85125fc3f5fdd4379c8338c209a08cfc65a547b1ebbebe6dcc81d05b68081a66982a31f85bf7f7b6c66f441e679743f65814",
35
-        "img\/sms_relentless_grey.svg": "ffac810d151f22067a4ce4985b6c84ec6f6bbf7f1c0a8711ad4a374b838251d3681edfa8439e18c1fcb78160fcdfa20d4f08527a594c5080938aa611991acb2e",
36
-        "img\/sms_relentless_logo.png": "bcc8bc7301aa9c4811ee875b5deb4ed21d9c7eca187970643962f0ae11a7483adc5257e26b307c41644dfef63ec82c4e61a221f133c62827e1d4418928c253c5",
37
-        "img\/sms_relentless_mms_sending.png": "063dcd7d06eced6be8a33c00abd9605ec196c3962c526212990760ee5f157fac0f9778d50d84ff5593a01ea0cdc15d5e848dbe39af47d082909e671f45832bef",
38
-        "img\/sms_relentless_received.png": "1161fbf9e9351510edf200ae89f36730af1c1410cda4186f631d15797e2e484e384898eae1dd97d2904a4d6272f551bb25071a01ecaae101acefb32f855e6f50",
39
-        "img\/sms_relentless_screenshot.png": "5bddd3148637473bd5d0b551df701094c8983e1a7706d753697df1bcec27029b88ef92146c7bc9213914dcdfce65eeaf6eb49d9aa95ce4d6e7f6317f4d9324ab",
40
-        "img\/sms_relentless_send_mass_sms.png": "f8043b8d2dd53058c28552ef96e637072337d1c751930f3418ba8ea7a394507246f35ed98f8123ff1e9e6598babbafdc5b893dbedc0624a2d9c5c1184c6ad60e",
41
-        "img\/sms_relentless_send_sms.png": "0a028ba48f0b86d820dd2fc13327c9069665a327f461310847286bc6ae085fbb7337162b27125b2d42fd7136a30c9dc7f6866501912647899aa0cc7ae676f706",
42
-        "img\/sms_relentless_sent.png": "7aef983c66793540b102f6879151449ad0da60751d89eae68ffeec7b20ac6e84a1d92388fb808d10dbf63f7bedb68c888dda509ea2ecd7715ca8f264e05a470f",
43
-        "img\/user-grey.svg": "1128d96d0a4281591140149de57924e014a1d709ab97d351100c901569bbabc8c8834caf1a5932408b7918997547c323b8b9f4f410e1f03a4eeb89045bd95ff8",
44
-        "img\/user.svg": "d69cf4ee448f7ba5d46fcee24895e8705c297f078d943ecee1ea242b470c5e89318a5eb077c81e9c2a656f903c4e869298cc2935cf05a4a5f79e295dbf86df60",
45
-        "js\/adminsettings.js": "f3a33ae4868ac3a31fb6826a6230353261d34c5f5fe8fee5e4105c386ed0bea6afa2e00654b2832277a3e93a30bad7df8fe8481549848b14e7ed217276b15451",
46
-        "js\/arrowup.js": "819fd1975011e2819502cbe5bd006204122d5e73560f6f7fabe9c9f14c7086206e54c8b51e3b005820a1e2d9d29c9254ce2c1c8687285efc8daf3d667e51e738",
47
-        "js\/deleteoldsms.js": "6547807830490a9e581d5b69b545f2fff5b4d3eb5916d38ca28f78c4dce26765cabf92a1803d25316dbd8af4e9d641ba92423a69bf9edb82b893a4f9f1266599",
48
-        "js\/sendsms.js": "7a445453d7204a8b9b2e988953eb27136633802acd7079e70abf6c4776ae0e109d7a66f85bed67ba44d2eef3f1ad9632ffb2ea151563f4303a4352116ab899e5",
49
-        "js\/settings.js": "02cdba4222c79e93179f096430ed1c4c3422f87a394b64ea55e703d44c7ce72f120bd73810c940a1cc4b1dff0adca419452ae884d8da93ae96bbeb0bcd80fa55",
50
-        "js\/showsmstables.js": "c141ff4680118e3eb16e17ea25408538e5e882d9cb4c765f6ae64c44c7c1d23e540c843e6cdb0acf31a407e15391bb28c2ea77e03cc7acf797ec45fd7b233f00",
51
-        "js\/tiff.min.js": "c35f67b587aab62db7a3de662779a7b3264d70f5f856142cae88eadd1b477e474977f2b8c5ab31c16be002cb7ca9b52282e6de533b6fd79a02e6d33815919cb4",
52
-        "l10n\/en_GB.js": "30be5a195908c731891e456c699053a5b9675e5c21bcfbe6f2091f467dab6bf0dff3ea167b9f96e7c6b492d74709d5c732a5eabdbec30c129607b0990773609e",
53
-        "l10n\/en_GB.json": "7f1567f247b9b4ad32dd836903f34ae02cb93c26b34e7eec509ddd1a6e320d64be2d907796017c379afd7a9fd75c9ed5bd00187e93da4100132beed5c16ca74b",
54
-        "lib\/AppConfig.php": "c52269913ee80151397520bbebe4f0c725526910ce18f8717ba1c8016a5f4dcdc9a6f9350bc56c8a6b607ea342ee0cbe0f65afd9f03c31902190c008f41c9672",
55
-        "lib\/AppInfo\/Application.php": "7e5ff3a817b1d46e8b05e2453c34450c5629c25b5c3955593b36a22e5ff0a6a67a197665d476f7904c3dc8712105687153954c22a12f597828247a56a80f509b",
56
-        "lib\/Controller\/AuthorApiController.php": "d019b31f73493f7bec44a7e87d56255c79204b9d03376fc3492a7639b32eb7a9a5ec040fea82cd74f54f3ae0dba8389ee487f0f3a05a0c57a4380eab69595210",
57
-        "lib\/Controller\/PageController.php": "07da5883ea41b3f7993a3e358a03a3db592a30fa81ea1ed0f26a234fcc3824a243316b76824fb9a24f40304ae945c48118dd4bed1f0d2f6993e479ab2c1dcab6",
58
-        "lib\/Controller\/SmsrelentlessController.php": "ed7b3db597923fcf1a1cdd207a505612aa9c7bde2e95d2136231c529c6eb71554bbf323570b44c915e832846951d1ed4b5f713a8ef2baac88a3a34d5cbdaa2bf",
59
-        "lib\/Migration\/Version100Date20211106192148.php": "96b9793edf72598c0330aed9f0c6c27ebf02287bd84b6b7a0285fc784bdf6442b560bc5dd2e55b464bb384a24831ae17d7ea144b0896d9b11cb82a27fbf602ff",
60
-        "lib\/Migration\/Version106Date20220813144231.php": "33f1f2953e038350e37c670462cc79fa48ab3a72b595f5fce970fdcc6d7eefa3401722da4cc532c7114d0c8aab7fbf0281afb374a695d5c1c1b311c30f64c9b8",
61
-        "lib\/Migration\/Version108Date20220823132408.php": "5d94388496cd88cec1dbbe67a2e9d6ae6fd5db7ed42d4bc737710d3c51ad4d8ad29d53a62739e05e2986e2d4c96374f4660a53dd7b7808d30e44e5c605105971",
62
-        "lib\/Migration\/Version114Date20221202011625.php": "920ee001204afad537bf2b7dbdb7c78e95b4ad0c79f5f693bd56347a1df91045cd83348f99e2ad714df2a735cf1a1d85aeb385c675ef6e90eed26f18b0b7d344",
63
-        "lib\/Migration\/Version116Date20230508212745.php": "7cc4838013bafbab43ee9521448c5fd2a29ad6d9b00a7f9bb102aa3aa83dd499e05ba209f2b477884aea4d06ad6357b639634445c426fa8ec79a0d242e0f4e14",
64
-        "lib\/Migration\/Version117Date20230509183517.php": "2b84c41956e085dbfc3c94fcd4e53a8536158b071ce7881001cc13ddb4467d38b15a0e83eaa54c8dcb8482196d16b5da90e9b389116eb667659ee85699d49d30",
65
-        "lib\/Migration\/Version118Date20230509194216.php": "a8c43ea3f4b417601400f0c3591952bd4ab0f5d2c21c3ebd9090f2c47899468a49e5dccf8529fdae449717f19cf3b6e1d716871a9bcc00fab8c7a3f6e44a8b64",
66
-        "lib\/Migration\/Version120Date20230520072431.php": "7f6cedaa0d2c83c4bfdc0f230adff3471958db8703851f1e978fcfa0d16be182b699eda9378a47af9922ed533a7e91b5563f9c169b80b790755885a68b866f12",
67
-        "lib\/Service\/SmsrelentlessService.php": "4bc54a44bd7d0e544d3bf5a7ea196764bc7660336b765c4ff42028f05364682684087cfab74990f4d50874b92889352e32884e3f55f60f1ab6d55dae8ec40dd8",
68
-        "lib\/Settings\/Admin.php": "e4e5f6e8fc5748b11c90b676326dc228fbc52fe1f77a07e7b7460c6dbf2a8013b5e0b0f9084aac3f941478ae6ae75c47be17df3d229d8a998363b9a1d289f405",
69
-        "lib\/Settings\/AdminSection.php": "1c8fb26e8347d67c69af385b0aa33be2764135a4672b872b6c6d41bef3eac6733ca2796c393c8ff334ff56accd7ed4d4c38ca50baff2360d8d8be02b9f8a7c08",
70
-        "lib\/Settings\/Personal.php": "db6fc80342c865841edcae7d2cce5e50d04473a9ac47e26c2daabce493bbb1bbb922bbe9eb7353d759965506dbf1b4c99ce8e9c93f5c43769e1064cba19f95dd",
71
-        "lib\/Settings\/PersonalSection.php": "e65e1a8939e3818e7cd295ce86581a603b1e2fedb732ce51ed1fce62cb61ebae9b93742b1d923f08e14cdc6bd5cf2818d47917321e0aa1736932830c05a81682",
72
-        "providers\/Flowroute\/readme.txt": "25f08fea0f30105e850dbf07bb7a9351e47883640dd87d26981cf50f02ab5af8ef59dbd1fbe5e4127c0e019e13ce036f9414401b9d3f3a924c4125c291e53446",
73
-        "providers\/Plivo\/composer.json": "2d8def5ce9444d4bfe4ff32e008e6aeec924efd40e0cb61f3a72585fc4cf89e7b62970e796d56ebdd5d2f6378f39d3ad540ffdd02c31e2c4daae9b760482619e",
74
-        "providers\/Plivo\/composer.lock": "d9a2b89de334156eaded5ca4cdaee9b53c05e5d78584faf000a141692225a1bf6a1dd9ea6259bee2158ca7669c4000b3c366703fcd1f55a835278aa9f653c7c1",
75
-        "providers\/Plivo\/vendor\/autoload.php": "597387bcc320be22e8b0060c456fc745d8e3fbb06cd1cfbdf093b0ee52aa30cb7e4c31d6d8c38450f52387c0cd5f9d0483e3976611d96f391f5651b71d2095fc",
76
-        "providers\/Plivo\/vendor\/composer\/ClassLoader.php": "2b6fa585122ace1ba816410acbd8372cb75329917aae6363dbad48e396cca581452616e1386a2e445a8fbb0e461b988279103f4f89adf704bce7726f761abf0e",
77
-        "providers\/Plivo\/vendor\/composer\/InstalledVersions.php": "62b61a5303337c975905fa55addb6b1157034fecaa5fb3b5bad251ef7fa1b1ba840308f64fd2e1244d2098b7f87431e35939a153298530cdbd82f81b99cabaa2",
78
-        "providers\/Plivo\/vendor\/composer\/LICENSE": "f3bb64009f41a425df5a9bbab53490f0eb9b74fa8d6aaa2f57efb928edc4ffff330260666edeaa04a91fed708c3663371cf01b284f3a08d6698aaef7a23f355a",
79
-        "providers\/Plivo\/vendor\/composer\/autoload_classmap.php": "1844f7843fdaabef42d1d9e4c09f92f51a5ad45b26d44b34a2aa9202a183489239a0f5ee6502f302b169ccfa3a4bea7308771ca02d3bad96095b5b2194a65377",
80
-        "providers\/Plivo\/vendor\/composer\/autoload_files.php": "c0eaa5b28b83539deb67f24a98ebff5ac0483f9117a72d5cbba02e26f1f18cd4c93ebc23786047ee61eeef11961c55ae6cd4d4096a16f18a19d2af49a47820bb",
81
-        "providers\/Plivo\/vendor\/composer\/autoload_namespaces.php": "0ac6bde683c053d62b7024686ecced083ca1a326d5346a248b1a058ac74a5af71d515d311ce76df799a518027f734b80b9e7f6e8022a9556c0f24ce90240d822",
82
-        "providers\/Plivo\/vendor\/composer\/autoload_psr4.php": "91bffab80b2ba961f206bf3008a7380f81b7cac7b09afe4bcd2d4787d8b4c839ffe2a67442e04010918631b1c76b66304e7d7bce76371e741b444f2ef527355f",
83
-        "providers\/Plivo\/vendor\/composer\/autoload_real.php": "2ff5b7a817e3acbf585fe506b11345f6f3ab0f21c0ee96c67037f09de6130126d4c0e728ea22508192787a451322369197610726f96f32a12f91b7e48cee86a1",
84
-        "providers\/Plivo\/vendor\/composer\/autoload_static.php": "4fdf5e58875a6dc6bab4aafefd254cf3504f78feecdeda5fb431a56f84b37d2cf8fab8e233ecaadc2667f1be492ded264423f3200e1095aa507172b0dad3f60b",
85
-        "providers\/Plivo\/vendor\/composer\/installed.json": "0365a8c8cb376a0b3ca8cdf63147012435d2488c5ab585db3f9e0d926b588887992c1c8cfe07ac187f5f72afa9a3db936c6885d443db444147d7c87ff0f3084b",
86
-        "providers\/Plivo\/vendor\/composer\/installed.php": "923c151f9cca2fe9489aa4cfe04053d20e1923dfb388cc6aea2486557d77284fe6d9d2a77a7acd94496237465f03b712166a2f2f5837ab13bbb7f0aed8d52552",
87
-        "providers\/Plivo\/vendor\/composer\/platform_check.php": "49e79f2c7c1c32796dfef02f64feda4fc8fc5aa05197465fba579997d332cb9dfcad3511efbb34a32a2b2c8d8901be4ca39867026b2471fb17999ba840c3c340",
88
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/LICENSE": "6f6cbdccc57476f5386f5336c1efa105b4116760a329ae2fedb30fabe1f34f7c1a3073e7f711e07284c8b57b3b8ab6dcb38ba8d71f6835ac024ad524ad658f94",
89
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/README.md": "8f3226941b2d676aa31b66f5a38f6fa78a4073ec7ea6d6a3aaf0209072cbc8df2ebee65f64460e350f499f8448542443f9859db75f927fcbe70f1f59384e1a70",
90
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/composer.json": "82e17e8f606504476175a3c5116bff37c3d58faf5fbd9590cc4047f787b6aae79a84c660bf2e8dca453b998926dec84e6d5bca5d81b6817e09d99c6774cd04e3",
91
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/BeforeValidException.php": "8aac5fb14b6d94bcf048a1cd4935af09c25183e74eaad8f2db19902f1f017a33261707b12be8080d5a662bd01d997d4d5805cfcdf3127f447feb6ec6b971f563",
92
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/ExpiredException.php": "7cf0ec0dd02717f5152abf5c01979526fbb89f04c01802915745097c8606e432b41a4de5bf92b7cd1543b37a939ce8e133b7622f29cc48798c321654dfb94a3a",
93
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/JWK.php": "3f134e7503b44f882a92a699dc4cbb4d7415bb93526438e4395cbe877ab2da700d3ef7a8c037d7d2ffabb84e20165f93e338bb32c2bad9426e63708da4f842e3",
94
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/JWT.php": "9e5e21477b0495c3cc6fdff79d9b6acc136c0187d732cfa4ea438d9802be4642c2fe0e76b288238fa29bb0a8e37e31d57546d548519436dc49de467cfa704ed1",
95
-        "providers\/Plivo\/vendor\/firebase\/php-jwt\/src\/SignatureInvalidException.php": "0c00a3a08bf4fc2eb675fe8ad3d8cb732a82a8f88d37dba5e510ec798a49342b8089098dfae1f1ef1906e62a4b8e465fb7b4c6d17c9c0d8e66ba33ab271e5c88",
96
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/CHANGELOG.md": "f99b50bf2d30b8e842d2db14a28068364b330b402db7bb1fe87fd4e1e3a9009edb05a519a4c35be68ba99c4c334680ff52ff0bebb84ab99de8814959d34e9c90",
97
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/LICENSE": "ed4199d68a412c0515450194549bac0c6a6d838b3950c036bff6c97457fade76fc914d11bf008321b3e2622ef0a3c14da0bee2f109529cfa5a5fdc11fc6452ae",
98
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/README.md": "dcb463420d7da1805c5cc020988f60c15fc5623a2493556ba4bba63d431c21f0584c1e65f27bf0a4c7962074aacf40d763981f878a10e12327cff9b89204ae57",
99
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/UPGRADING.md": "4f2540329c6e06bc0f05a574b0ce5d77ac3f7fa4032371665dce41a766cd28ee12a0b7803ca507faf005f6a3ec5107a60978b69a4fede8bc562333b736576f55",
100
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/composer.json": "8746b3c8b0fcf0ede926b6a60b4d34e7a3e0e9664aef67b34e7e238c25179d22ce599e8c4a580e9f3d73122a0c9b373b87526874c947878ab339e662b03c150d",
101
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/BodySummarizer.php": "649dbacf3be500e6171769c18b1eec1888bfe831dcef8464ebce4461d5fd337c60a200d3c89f9bd7c2714c0567e5e220b31ec2970e7a013f914123824ea324a8",
102
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/BodySummarizerInterface.php": "d0a1271ad03136dca5752c0dfaa7fa678c6fb03890be828780201cd9fbdc8169ff4fd7c17867cf82ef1672ecf0e9f871f682ade1a8ff37e7b84d24c572e1b962",
103
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Client.php": "8fc98c3490398476a81f660a0dda38306acedaab2f662f762881c11f98bab8b5194ea6c05477bfb2676848f54229087df8fac0e6aacec6499f2313e09b940ea4",
104
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/ClientInterface.php": "d1ab53fbb1b6695e6537050421b3a749a7b34b3184015da449a1c76987fd6944bcc1c4cca7247b98b338926af89fa477f9be4897e6316cefb2c1656520c3ea2d",
105
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/ClientTrait.php": "ec1e95b2f1c56e4443c6fcf695ede88e02f1129b7027287f968a0ef2f7debb7533ce2371a27b5ee07f78818786b0a6d1b3d2f8ce28f44f4a8f7e275bbd1b6727",
106
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/CookieJar.php": "3fa0964d59cbba956bb47fe103f02e4707a2a6ebe5a60dd5c33f59402a090b6f0110c2795b52f961f6ddf338567382e1248f1e27bf2d0e2033a43efd15e2705c",
107
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/CookieJarInterface.php": "a3c6b9138e285d6c6b7521dc7059a04e1c80bc0de7a925c93ecde6c95cb7fadab91ee05e9594d6b891872a557a1b98fc6717ca1d1d46e00992c9cdcdb934a71a",
108
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/FileCookieJar.php": "35111b9229059f54b537baec960b8480d5e3caf2961ca3e7e45de3fa5ad5bd0b0a91c2c4231f6386a4966bf9d97aa308a7e444000dae9b21f8c58b6832dee68b",
109
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/SessionCookieJar.php": "9cf11d2908913a7555e9e190e6a4ffb0f0e26ddb3d141faeb0e7bafaa6f0b3259119ce6febb6d01b5a7f5a3193f72a099f08ea45b5955bdc7120bfd4857879a6",
110
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Cookie\/SetCookie.php": "7d6c4c14c9d652c27da23923cb577fa999e24f81c1b82f13fa329da3eda3373ba7a832b72d793d924fda9d6a3a02cb39db97e49e17feab3ecc93f395e614d44b",
111
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/BadResponseException.php": "4b7a572e9796b8043d56dc6650709e59bde237b3bacab1206b807485cc850ec99dde86892696d73121c345f1c88a9d2e879dc91be2cd438defe2609e521011b4",
112
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/ClientException.php": "0011418b0cd07eff70f99645a008c30e9a6a90b9ec396e8cf70ffc281140054bf313eba40d97ed34b59e04e5fd6712330d34268353493d112b8029c1c42e5046",
113
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/ConnectException.php": "bca929720f3f8f4484899b18b40f5d4d40ebc4105b316679a9349b97200c74ad2ae6408e2362b4639bcc4a3150fe63ca1e08bc1b159c51744d76466c41203c83",
114
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/GuzzleException.php": "444ae2d2847cc99d9a3895e2d23f0abe59bf0eae279809f7a4983e34098ee0a0ad7408d251df821c4029621060aff1ea0dc890615535ea4368e5796151a767cb",
115
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/InvalidArgumentException.php": "2647ca6c297960b01b29435db7522ece3a997def6b3af71e26113abd43ca4493501c130e7767b845db0e723f9955164ce33664d49bd67a45bd29d270a66e0e3b",
116
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/RequestException.php": "b0b3163e4eb96ace90c03faf9406b89ae21c7cd5fcabe78035d5d9e1e7ba0ff72bcf31b877ce2d5cd38e940cf0ead52659c3637dfa3567745fb46a11cc9de31a",
117
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/ServerException.php": "9cab599fd913d8f0bb1b8f448932ae0b5c5b1cd7d83fc4e1e4c13fec29b0a849a5385a6c40183b8dc58404ed020227b9ea4483ac89d135c6c82e4c7985604044",
118
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/TooManyRedirectsException.php": "99c4e6f908a5dc03939ca083232cf48cecd742616e00839ae25ca173ec458e6da10be2690b98588b76e0f3c24ee7f35c09ed5c848f9348c639c414aecedf6c2d",
119
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Exception\/TransferException.php": "665600a8617328454b70a43fbb72c81ea196584dc22e10324b3c861974aa55ff5867b30b86a65123f1bd4fece75049a9f6c4bfeef5410a9f29913d350358178b",
120
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php": "1dd7a848ab73a8db9354fa2f0461a995320ccb677b29464812a484730a85f405d8b6c9b39783881b299328cb8f99e67b9d959b00672bf60a4559b136fdae8119",
121
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactoryInterface.php": "0d063ee120e0ff6042a58d29b109bf6573494d427e20184a4d448ef31fe0cb0cedd60bb47c7289d5f6e1027413a28f9f57921823605d4f11086da5c9be8c0902",
122
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlHandler.php": "ae0388a0146bd0cfff1c597570f58acec92876d3d01298e1988dabc717ffd76895b45359cafd7bbc62ca1fb5e7e96fdab70697a2cb469c8c5d0298aef12e44e9",
123
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/CurlMultiHandler.php": "d03d4a374657d671554d06e5622eef0d1b06d0a39a9167ec6f894ee28af31defe1d4306f937376cf5997c1421643e08e757880e45a1c9c10959c967022160f96",
124
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/EasyHandle.php": "7438c054921687fcc4bea6ef6b49aae15651a95cced2cf73ffe46bb15abdf924afdd4784e8d2121ca851934fafce69d3661f1a792e6f2352cc5f5c1803ace3de",
125
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/MockHandler.php": "0d8e2e43e0b8079f20de6b86c241afdc83bb5bcdc5a91ac47084ffdf2a3904a79e5db6fbafa4715785ded8fb90dd8fc418aa05bc0fa8c52220555720f81e827e",
126
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php": "9caf11da430da351eff6e9be0a1e8e029bce41283a6d8215e2215d6abbd3f021018564d1e6717f65f280703d5e4dab78a2b522042d63c5a9cfd019b0bb0aa4f9",
127
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Handler\/StreamHandler.php": "e45738ddf123fa57df229fccc94622b9a2ad5dd9bf6f65d24756239b587937bac9b7a37220e65c55f2abbd7159bc16ac785893d4aac5c192e6422af4fc4f1222",
128
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/HandlerStack.php": "900b9df966c3c1f3aadc45bd42a81e8ab153c74d0eb90cb3c8b2f9d46115353f45e5bcaf0eaba1281ab98dffb3d136a0c0fa0058fe73d906eebb741b273c150a",
129
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/MessageFormatter.php": "99460bb55080cbc7e08eb6f1b3c8abc71c38cd5d6e04422bdf8144ca554e7d7de29fc5d5dbf7aab5f7440c4ec9d779d684f8194f90139a1ece1bb086f14e3cc5",
130
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/MessageFormatterInterface.php": "609462659ab00682e7fdd1bb56aed5ad3cf54a2ee3b641623175b9dca0136b4e1cbd3cb0541526ed86d05174a18a9333ba52a9e50f4c05ece55cdc636815e385",
131
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Middleware.php": "42fea3a5bff7eb363a7af1f85a21a9322aee8d7e343295209815739f8bbd5dc372f14e3e8c5454f7650a3b9d802ca25fa069d64fa16b0f5d4d48c3d626ba3527",
132
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Pool.php": "a6d17779976754d7c16127680ae32f8e45ed54c3ef4a2a6364a1e4100ce732b8494b2848977ba6b2bf6fd296d7a54b30a2f021cba5a88ddd0d1e0f3a3712b9cd",
133
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php": "268182133f0e484b56fa23193d20def23166eeabcc2fd9626b17cbc20188d76549adaa4c768df695b787d31b2eb26a5316f0a3531ad3ed022aaddf0574fc2ac8",
134
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php": "38bbd75b92a6764b0502cea113e222d5cce7abe53c7ea0c01e441fbbb6b0514f2f54388ff14d459ed611925eaf9b48c0aee1b1fb41892d07d1b260734a1d2afb",
135
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/RequestOptions.php": "239e524c17dadb296efbd8b9ba82b94ddfcd90c83377fe4bf2890dae5dbc62f58032205274575f14bb2e745112ee59bb559936b992d9a227dec00f5b2e32c03d",
136
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/RetryMiddleware.php": "01236bb2265c0761148ccdda7d3668c10f9539119bcdcc36f10d077ca32013ca0169938d6f4bd0703018f38fac53b2bd34e873a07d8e5287c26fb64b7284dfe8",
137
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/TransferStats.php": "4fe882f7f801ba55a3934e00d81aef09edd092eadef498f3bb424f7f32dc8d568940806a9d8e80b1b6c768cffd41ecf0814a0bb366195b2400f08a8e310a8c19",
138
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/Utils.php": "c3e52199a0a1755f52b6902b78d008de10e33ff8b93242a709d7a12e8c05c1c2c09c2874439606f0f3ce6b353bbe3b8ac385a236307b428fbccc078e1959c7c1",
139
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/functions.php": "f45c62cbff0de0255f4f149ee3e93c52bdae44492d43c9314a48d8a793ef028f8a8f704a2b28c5b84491687c3b682e9f85c4ea61bf63de56c6cc6a4ba8081ae8",
140
-        "providers\/Plivo\/vendor\/guzzlehttp\/guzzle\/src\/functions_include.php": "058a92f735b5848dc18be383478bd1659a0b578beba1dce5a1ef3b7a0b6b5f643e2f222dd72ed09ec72e8a5c5c9fae9757979f7c4016c5654bcce9d7dfd42d37",
141
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/.php_cs.dist": "4d42019074dff2a1a5bebfa51568de254e5128b88ad309bbed5e8348ef213035cf3a4da66ae6753354a0dcf6ccc0001bfafa2453028bffb3548f2ede26c30177",
142
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/CHANGELOG.md": "0c021cdbfea029de4a20511445e64d0d6c35400025f1361cc913754adce9b2dc16efeac12cbdd489ffcbb76e95f91108dcc557fb9dfdacc99e5bb98f20b55b43",
143
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/LICENSE": "9699a00cb2c5ebf932515e1232b83f79c944f8100881df096de09e25222fa01173bf24d9e083db7d9605d1e4f5dfa14c726aed52c0fc2499643714a9e64c4cc5",
144
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/Makefile": "a350f48cbb68a05cd07f787522193851f9cdc6b2643e34eb502fe261387d97e5ceb8499a22b20ff2fec5d7352ff239a952fa3b129ba3407fae871683d65e9bbe",
145
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/README.md": "1ea705deca28d726cc65d0f55db886545b9f5309ccc085bb482f627a0ddb5f8609d6635f65686e3e26b9a23cb8bf03b3e8d02a26d25eaf8195dc6c2cc93be0bf",
146
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/composer.json": "74a66451bfa422f886266ff300b4ca5f7b0ed62199293635671718caced457f6eab5b8c9467f24e999762f56368fb35742dc0adaa35a233d32c72783112a6c50",
147
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/phpstan-baseline.neon": "916bcb7d298578dfc4770a3c49ee558eef9a20dbff8e3d097506379c8680917b08a8f96f2b59d96b1b56b1ccf4a5478c868a2da504a1935956db70f51528494f",
148
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/phpstan.neon.dist": "ddfcf700a47b916ed1072c979f13d6d51327c9bc389c49ad264ba23279b01151b90aaeef0a81a13eafd40115d407ceaf471c20a61b47f1b4796f8adf3c1ad218",
149
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/psalm.xml": "52c09c8b7daf6d90db16a5ce50b7a8ce15c1ffa02265fd1d4b117cf717331475245bfd4f2dc45d3990d67333988a11081e13ebf783bca8854a1df9c1b0cc9cfa",
150
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/AggregateException.php": "97b6e46aa16ad26a2b714129b83d933cba02ec7afcda514ef67c5027cf5b9b93a5d7cbc72560307adf294179a4d7b86a6da9caa835bcf5be17e398501bb88fba",
151
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/CancellationException.php": "b958ade84fa4e6c7a7efed66dfb6a7f83b9743a9ac6581276eb99bcab667ebcdfea92a9bb114d086c5831d26abf7f6ec3e03254067e2b29abaec995e28cbce8d",
152
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Coroutine.php": "d1c789e47536cf8c9db52acf791bc6de0d61790856a78f0cf6a9c98a1628d2c42cdf9e5e94e05fea802a099bd3ae3c65b790f2fb5a342bd130654c4cfb4fcf07",
153
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Create.php": "a3651bfb1f458675c58397460c8534c2819404fc89422467f119de4cd80147177e462a9965bde6a75e74e4354c3c6935cebe1891e6a53a1bb26383f22e9dbccc",
154
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Each.php": "e57ea03f69e1680b56676ca1057e8defe7eaefeffb456b636f3cb32295eb6be36073c7a9a621f656c40d5661c0fbfaa3a632961d82ec7f116ab7fb5aa9db196a",
155
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/EachPromise.php": "c7d79757cca80b7352ffd12a6743a515255e4a89764f65067035b16fe39c09b6dabb833aec3fad3cb741aefd778f620202caf79e98b86095c6b252f4e555bbcd",
156
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/FulfilledPromise.php": "952eac7f7cc150394dedb72ac97e624db8156ecd41c8afc382ed0cf8e4c2c6c94879b7ddf6ff76608c6a95ef30ee136f44fa03ab9f5ce4b7fa01bcd0c7e7574f",
157
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Is.php": "894b3c475b5a828e442745507fae4b35bf394fc9fc93905258f9736a67112c321b1f3e353f8f3fb84e8778bff67bd9d27a6fd5ab6dab3218a30d82b8fd14ae0a",
158
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Promise.php": "bbfba94124c36b87941e1548162708a5543f156d64a8f465f78397a02bdc34c764b60f73d5e77a3a2e48727f4cbd91f60b9c1cd47c0fe205994c4ffdadb99c5c",
159
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/PromiseInterface.php": "8d8d1d9e04d75ceb6d3e656794fa93170a3b1f9c2dd3b53ba6b4dd3e599f880599cab0b1ec15eaedc1b26d09d6c535dc9fe92802ea8ab1ed5927ee8cda7cb9b3",
160
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/PromisorInterface.php": "1058176a68078d02c288528673176648e38d2b8093e67b0984d73ebc710c0bda7019689303b1f064726cbbfc9382e733443e9d5443a77715ba40bb798ac79e04",
161
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/RejectedPromise.php": "53914a46ca238b8d079333f9c71180aed015a77bf765cd2793790dde21fa7fcf67dcedc5c797a1d7caa06d788bd9631628712861b1185f3cef9aa63260aff0cd",
162
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/RejectionException.php": "6dae5e0b0b47538e5c94a3d4890623e3ec41be8198a1d00ca84d77f32b9d074cae13e25ea90e2af614e802aa28271def466e5ab623c187df49425cdfc5bc05f3",
163
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/TaskQueue.php": "431a73762758dd08406a41587115a11e61f921cc01997ea71efd803b2e3882b9cb7f6d89694e06ecd2992f2bffa38ba55d631dba7fabfce3b84d68dd4913a02f",
164
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/TaskQueueInterface.php": "f0b2b36ffb75337c590f82d3d7d19a4caa4eecd6003c0bec7ef935604dfe35f4e960f49da7115b3b3cf65c61d04bdf258310ae1b4f4b6cff4eb09f52626adc11",
165
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/Utils.php": "9bb1eebf4d0f43bc47cda6f70f08b3fde962355075bb87d40ec75d41b552c262a79023a72e2e8d776b6d0db1ef1d412e398ae16d96476aa5c72afbdab9d5a9fc",
166
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/functions.php": "b756c2bce2557e9c6b8db2ebfb026354418c93f54169d1e9249478532bb02e1062c30e14060a3bae195098c74deb4f7580943aca944a162615c44139acfa7861",
167
-        "providers\/Plivo\/vendor\/guzzlehttp\/promises\/src\/functions_include.php": "17063296fca8aa655e7d5267abcf04051cd58fab5a7ff02530e1becb5002306252d5ec55c82461cc51f62c881c51dd80da53ed9d90640b6d0dd56d5e8f819022",
168
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/CHANGELOG.md": "0540da857957565d77741b846932c739e0883751660d561b2a0990a7cec8188573c2d31400cf9f125d1b6eab482455d19f30a8363354341e3c54088a0c418e7a",
169
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/LICENSE": "5d25479f1c9c0b802e2944e029d7011f9b9d3f7b37f7c12eb77321ba448414f79b0b254c0846d2e5e1b8826bed85d7c377803a4ad5d5afb288f220c761822043",
170
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/README.md": "b9759cedfe2199b2477e95fc0770f35ed6a4a18c6e6b4b4e30a20f75945505dcc76834e20e61e3aed90fd790c677536bb43f593de8a68558a200000eca8d0bdc",
171
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/composer.json": "27ad0b2937068e201fd0312a7dcfba706a8a318ca4e09d80f29611803bfb28d48433ba5f2b452da8bd76fdfe2b9f073f81f2e2cd6fc3e4223b20637408f6c836",
172
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/AppendStream.php": "d94d352d6f640589e84fe2aae0bd20880c4d6e897a29a47d4dffe6aed4d852fd5df274db2e68124c7f15b84d6f4fc684873fd03d003db39caa61b024b053e396",
173
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/BufferStream.php": "eee7de67e107fb33e8f97949743726a30e8201fd874490fc93870a410b1e0e3a059b75dda972b3a844b8c739b9b768a73d65c61bf8030589d0d787aa26f70e8e",
174
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/CachingStream.php": "e9b1e3d5e2bfae610677b9d216643be7b2e8b97cf661bc5c67631f994df0dc88a9a9ac7bb9dd68fcfd2ed343cadbbae227a8a46baa3b732733497e24f1338be7",
175
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/DroppingStream.php": "63db37354a2eba98b768f0929ee9a4ffbce1647a79cc9aee5e994cb693e53cfdb9f7a0fc4c32b68b46c64b39438b1c53a30532f5f8fb442f07062a6b4861e39e",
176
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/FnStream.php": "bd25e2ca8ea196a5e876c5b9d01c6f2a27b206f7ba05d047cb46476c52191a594f1280c7435b6429e4ea411fe5fc01a2388e213df26d27c5ae5094a0d0f2d619",
177
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Header.php": "27014466522ffca93b4a3da6e96a5e8501f11691f7642a2e5091f3d0c1b146789ea41fd7fa1e3948f264926e7b764b557b1b564a95a7b5cd56c17c8ddfb6b7d1",
178
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/InflateStream.php": "e19b69eb2f1d2f8782f7285414095ea810f746d02a447badef5ec7185623235f17f5689682b185ba124e71a19b0dcf3d36b64894d183e25edf27f1d1e34c1c0f",
179
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/LazyOpenStream.php": "8c262a2c574767d61a9eb084d6848bef77d047601ec5688a90fbc012d5349d9b4ea188444fe509c8ffbcbf6ecdfd839a461505ed3746b6e1c5283860f7fd4a2d",
180
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/LimitStream.php": "81a43b1ec261207c1a52faac2c5099a429e43083bbe0c9099f447859d2ea12a45d30e7f0b5a994696084b3c59401bc28564685c432644caf6a9d8b9669404c91",
181
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Message.php": "4e9b857c226b57e2d2faea27643d6f213bba65bf158889a528fd684cf1acce6f480805d04da39a32fbd25be9fc51c4f1a3c1bbc9e92f3707fcf33a120b2aa256",
182
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/MessageTrait.php": "367bacfe383be2caeb0064fe80e5f6b138050dd4189bb65ff82d8f86d0b1b604090b61a2473d7e80c733c395cb893fa9eb2dad0a63a353c19da32e940a1de01a",
183
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/MimeType.php": "98467f19beca7d4239963d4d91a7896d44539c13a5c694c4aa8ec68f3b57031367d1cddff19fb51c389393cd1402a574c9afdc448766c8807228d726796d2e9c",
184
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/MultipartStream.php": "5bbb8f71ad1f2f421eac8c0d40c3a18372516e8ab8f2bb3f917871bec9aef0eafbef930902084aa3ca64a8ae930edb1f2befe1e6b49dec387ea239c5c475c099",
185
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/NoSeekStream.php": "f003ec01ce15f5dd56200396a84a2c94a1b134d320230983ef91efb1abc770827018894a1b8d1f3a68c2aa481e8f0bfbaec4c568d0b0fe251a61f76ee22efa38",
186
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/PumpStream.php": "15192b83cabf910107b30bde59197618e524aece85f9d396dcd8459174fe50a1cb82de51e5225b8e6ea64fbeec7b4d94f035bba2ed893efebb660105021fc98d",
187
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Query.php": "8ace1f141c08396103431803ed35e1bf247fdf7f7c7b727ca63e58a1cfdd7e353a6c266c8a7bdbb863e5d290414ea630bbe37f55f275cc5a5b946b794ce01740",
188
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Request.php": "e0582b7b304fddcd81a214bd8ecd4db301479eddec3084b18b822f5e22fbc9d1fe3f3d2f6ba52959619dfbd0e98db304b2400e67675fca41f470ca6126085da2",
189
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Response.php": "32524250d58fba5c152472ed37160a9aba92c586c9b2a6bc55f97134e490636189bc8708fd8ca4145478a5bb20ea51b5bc417fa8d61ab08fab3479a04c4506e2",
190
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Rfc7230.php": "beb2f85fd643c3cdb3c92b401c4df1385bc6fcddf7dfbfbed88396611438720a1b86ecb9b913472ca8edf1bd9782a3692b2138195fb366ac1b8a7f1b0b81d390",
191
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/ServerRequest.php": "f3fead87c83ce2f73b2890ec79cc620f319c59ebc41a041e4b70b38bb1e412c928fd7ff0f10d96fffed841cdc1ef2874d5ddb0e7cfbbad3ffa81ce7484365c05",
192
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Stream.php": "7d108ed410ba89cad35637f837d97f7ef53c43a4666d0502e3e7dc4aad06e7bc365f311961d2bb8768faf9d9c6d64d09e080aa9bc65638084a127e7a563acbbb",
193
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/StreamDecoratorTrait.php": "e1b90e1d97a4a1ed1eb1552bcaa9011f79733167b7e5e3f2af8cfdc54adf0d64a414ed630ec74418020fd8ecc7c75e43db6bbe0fdb9ec6d3ea928bd3bb3f4561",
194
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/StreamWrapper.php": "7ed1833a91a1f56b743172192b7ce4399928b261eddba6bdcdde958bbeedeadcaadff4fe5b3913dad0e4b2cd9346f47b43849cc65bbdb839c9d9e4b586638eef",
195
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/UploadedFile.php": "a66f1119bd7327a19315456f17ac2d3ecb40e564705d41047a91a02b431efcde1eab2750b2f354fd2f5c10c1ec1b5968e84e758d51210f011dafa8df5fb35c0c",
196
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Uri.php": "fc5c81c97687dcd34ebd18c6714479eb6b4d1c7d58963bf7f1f732eae98a04b094dd9c99d58f4bff265b2faf0629a456c391ab5b96534c927420f51a95dda637",
197
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/UriNormalizer.php": "8992ef486358f43df4a9567a6a232ad76883d9c7cacdc94707343e5465c857a4385739f66d0024136df94c59e60a5ccbf1850634a55f2cc1f56adddc717434e0",
198
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/UriResolver.php": "46e4c0ed24579ad9a0cf467141fda7dce6dd3a3d3281a1606261f322462d1b19bca413f3c5590b7ad42fda1fc57e60ba86d121b5af0c5b5a2ea21bbdf07f44fa",
199
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/Utils.php": "be75312627f929b2ac94cd6d12972816a13660a40d25cf87f6fc7fb7af416316ba8988656147a16becfa8120ce2a484c84d9f399b43dea2cd3c7ed916f7d8302",
200
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/functions.php": "f31604b89969730b482cd03a13b1356ff9b91324eeaa9ec45a45f86be2bd52a8209cec55aa878d5875a3c82fadd86848d558789d0072e853505d644f0a2603ab",
201
-        "providers\/Plivo\/vendor\/guzzlehttp\/psr7\/src\/functions_include.php": "5b85d1438039f778c454f67bfd3ff2933d06b1aa4bbf9dc516e385bd36cd749f7001de6278c5a1b4e3c5a7d280876d4d35337f87a0dcc6e521ccc20a3ddad1bb",
202
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/AUTHORS.md": "bd202fc574c862a7c3d4a27653605b6fa377823744a793a7848ddaa7001166fd645d6047892d79c8488786d82fee785b87b19e9af1d04512503eb195bd300aad",
203
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/CHANGELOG.md": "ef87f930b797ba0b32dec670491e021b5c881f6986624c1906d8f910e8393b37e6d7f5eb9f860c1bb8447ce61a206bca80db4b2279c57bb064a28be3d83690fd",
204
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/Jenkinsfile": "98d95e7185d040e9aea6e75118ec17ac34e38e17f8ad5a38d869ea02c0c9de5dd79d208a78da23ccb87444df7b7de827b314469027ee7573cc51423521786320",
205
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/LICENSE.txt": "0974968907abaaf61b640ece98a502e3c677b7cf734ccc82cb522b3e166c50eaccb189b4d31b03bdfe8e61a97b3ce06917a7ff5c7c60887e2ae944f909fb6e72",
206
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/README.md": "ddaea1367057ed09023311b6ce37938985c188fbbcb6867c6c3ddfbdb984b954e42fd6450d1e5cfe10374ddc4448f9b96d6130d465983d634ddb3c0b01a276a4",
207
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/ci\/config.yml": "d50e43de2ba68261ae35625f8ce984903baffc3c6535d31a7fb3c5efddd08f71cf0ec3aaf22ee9e17e93852dd99284b653b343a053ba50a45cf6716033131e3f",
208
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/composer.json": "c6b4f35c928d33d62b48139a8be5d85868fdcd0716380865f8dbe0f5a708600ad7dffb3ba510a45bf4a8002f7e1fbefb1c835de7e3e2d9b7c1cbddf9fa2b565d",
209
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Examples\/JWT.php": "ee8052cfd45be4eac77df60902c518a14bf2df07ae7218322493a8e2d115280b87c65f9637ca766a63d82dce36c7c78e894984dc83031a9b7a8d5a6345d38214",
210
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Examples\/Phlo.php": "f9d6482c51987aaa3d7f0db59cd45030e17284262681866999309205161094d96a55a39dd2898d0b7980074d764e1bde6cb6ad1f50be8a40cc9d557431c1bf91",
211
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Examples\/SSML.php": "932a827eedcd81956c275529815a2f7542636b0cb887fcf182648e8f972006f6ba8ea4a763b3de48aac989f26a5e44752c7d3a62df256ee2b6a1c922de677e14",
212
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Authentication\/BasicAuth.php": "42c036c38225556834ad5cb916db0c4783c7127909053ef623e7f71aa51c9fc968b9523fe5dcdaebee769cecdb0c4c76215116cbf5959b268c8792fa96754531",
213
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/BaseClient.php": "029f2be5a3c7734b5030b4fa96e0d7c0c1252bb7b30b9f001a78abaa646d6d3821a127859e5d170ea5e3c7f5c86d06112f28152c5cb2315f94dbccd318f9e5e0",
214
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoAuthenticationException.php": "7ee7458999adea1ab1722358f669467cb35265eb616ef2eb16e6bc3d42a7f3c2fcb0b42655df8f4f21127bfecded765bcb479a6923dbf1a184e00f6e26321ab4",
215
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoNotFoundException.php": "bf54dd70534e988c27d5e7d17bf8edf9dc65191b77677d9ffbf95ae3bd019f1ba368065e82440e04f9a0d7045cd62b5915943273b5d8d72ba01676ebf2975edb",
216
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoRequestException.php": "6655a36e42e700283235b84889088e378bab6861ae98ea99c20bde017ed39b83dc743e5c166e8129b9910a434b119578b23523fdfd5e9e1dcf3d57c5cf9375ef",
217
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoResponseException.php": "4f18628f90b1c5142446f0e394d5071a91995baec240344a1afa47687ae463cdc3dd18a79008813077a3511c1b00dff7a8715d26990afcb6f9726598c96822f3",
218
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoRestException.php": "758babb40ea45fb50dafe5231605196214736f014860618af9ca7161157255cdf20c5b0bf534f6f6b30a4f9bf612b5ff5edd2f7adc45553ef12555354f82c15a",
219
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoServerException.php": "b2b8f6d1d03a720885ce5718b1c80bc75c7f483f72a1d2d2313b98a37e152ca78bb688f7923f025563517a52de7e915325cf86e463a2083c30ca2473446b91c6",
220
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoValidationException.php": "5faec3f351037d6affa710c10f733c57a7919cb04820f93ef0c19f75b2f2b2b8ae1a0d004c216673977539b713ca31475f233fdd21698a390319364d2b9a4ba3",
221
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Exceptions\/PlivoXMLException.php": "a66429863ac7caad7e0d77f7a1fc105fea0a45e7eecb753e64bfd5a76c89b5eb06e4228bd63a78134090774458a646e10a11417855d3e72b2a6fd75aa754c625",
222
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Http\/PlivoRequest.php": "3fa26ce55e1b201dbe78e4bf3615f8c38d9e6c4e96e5b3673f6cf7985bc4055b88f227677273189381bd29076ae5e8baba6c0cef4bd612f2ff8fbd2847b6c129",
223
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Http\/PlivoResponse.php": "3f9f1ce15ef75db2e028f198d1bb337c37f31fa6dc7e5b985ad589f6a4dd7d873e3dae968b80f5e1eb6056b4bd00e1a4df4d54242206861302f9d6263d177bbe",
224
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/HttpClients\/HttpClientsFactory.php": "a9fbd6c007260fc2169648c9c764ff7b5988af0874b21211f8e85e8a995897d597cbc0c9fce4ec5c8d60a901ea05c5a8cd70684c2302ea17bff528ac674ea578",
225
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/HttpClients\/PlivoGuzzleHttpClient.php": "dc661dc489b30bfa98e0d75f04147d164ad953e7dc51326a20fa94846fe30afff07ce92958c27a9bce9fd15371543852c0be4c24031cf382b54403a0901189ce",
226
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/HttpClients\/PlivoHttpClientInterface.php": "61a18efcb4383bea7598ad9167ffe49a73e295d2ed3229c015f9a5ea08b00362005df1388cf6846f1c331b123b187290a1651341c76ce2cd4233926c927b6e9c",
227
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/MessageClient.php": "f96e09d05b71a2e0b6675300132634f5664026bbb84472a1e7ca5f72b679390170ed5aa0d4e21a4dd1bc646cf0267f0f9240c931657f7cca9b2bdea501586d26",
228
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/Account.php": "22bf526a376e6045fe9045ef4eaef52c769ceb8a7c3ef11902e66acdbb673fa521f70f446e6724155c8499cc700a6cf4f4d435ed06d81baab69f638cb15651ef",
229
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/AccountInterface.php": "5093f51c3803de918f3a500f1754f47a3dbf990008804c07e543da253a22641b96ca2ae5faa7e6800cfa10a41f7d407e5d29e9907c0970a9183a8795be9f7543",
230
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/Address\/Address.php": "7ba3e1e7e136d43989fa0449b29882d78fcea39cb764e54228c7a4a899d5ce4db2deae9d9ff9ed5cc53a8af72f98c55914c10be3dbb7b9a354b8a06e17cce829",
231
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Account\/Address\/AddressInterface.php": "36182073184f67cb024e0c020307d4d74c8b5c65e3ac7affcb76e189c91af9750c318404d8ba3a5a6e104d64459c59c80d7a944395796f0f5aaad18d43d93720",
232
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/Application.php": "9431715557954e8ac1cc340f3f568a6eddd6e00a0ff0356154b2778b118f620d0afad3979e79eef0a583b313256fdd018516cc8128a441dc667b39668b6f506b",
233
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/ApplicationCreateResponse.php": "cb1167e6057eb71e102d55ad2ac3cc2c7aa2a757b317cc97d8d08dc400548d4ac56379653583d53185ee8ab37c4dd189b66af011bc9a32baae55991922c41466",
234
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/ApplicationInterface.php": "77af1063e341dacee15504837264b8140ffa3e8f537b9eb0b102e8f6d184deefab6a08ff7f771965c31d6c84333de9963b2e998bd0389bd0517479d5ee150d3f",
235
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Application\/ApplicationList.php": "0840ebcf3a0d9688cc68a82f11484339d8dadc9d1a50787ee11b3849a361a421f30417ad4322633c53633b4cf58ff7980de6ef87471fc88b16d090f127763450",
236
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/Call.php": "8e0a3bd97abbb7b9d03e22a4eca6eac4989653c43facff064a374f6787698bcc91320352d105f66aa3f31cc0d70902c8cef0f9264062ec4bf4e5cba6d07549ec",
237
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallCreateResponse.php": "a3a07958282fc5a6e7b99978427e2361e8828a63c06a940159a7fbb356ab9621a899e6e2a25c27d445fb92ac34b63d8e5a8b6f0782b7f20c7d9f4308306903ee",
238
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallInterface.php": "9aa42eadb3b1c06c802d46f1a11b17acf59e0c78ae65b6c9039b4afd9fe53f171cd8023be738a359128afef545a6fddd43bc039d94b014d122e9714f9591ab71",
239
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallList.php": "9883c38a74497c496cbf7c4a837051cb6bfa0ed0b9ca9298f8908e7195a000196f7c79b4846417c64af0aeddb6327e45ad4b36352a28e8300c977e21db0fbd0e",
240
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallLive.php": "14fc226091078fd069998fe41625d086407e0c22455dde078284f9a3e8fb34fbcac0b75484c5350b437387dc203db7690d9fe1f02aeb09da2d5c57f7b2ffa651",
241
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallQueued.php": "64552d83e5911b11202ae4a965bcd7c408643c446566c3d09aebb0bd02fac0dca41477988aae62e91bfb42913900f1eeae9d20693c6bc29651e2734b06cf18da",
242
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Call\/CallRecording.php": "d23438ea994b0ab936c3917d77ae9bb38bc9ca14dff4c5c120a0f583db46891af3bde1a8c3f55d15bacae99723e510184c14c60eb6d3d411d46aa90c5c8acfa8",
243
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/CallFeedback\/CallFeedbackCreateResponse.php": "cff0c47988bfee02787a2d73df6b3165749844c1a93b1fb91e87e80582bd28c8c7efe101fcd532bdab62886eadc6354924eea81278da5037ad9d3ee5d8dc8f29",
244
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/CallFeedback\/CallFeedbackInterface.php": "7860708568f488bd0832e626123f4bb5ab986fa5d54f305d4744503ceb4e919857b78a02b766e7241d324a77d86592f60f26d1ed78955f5550bd0fcc7bbabcab",
245
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/Conference.php": "8b97d6c9abee836cce410fa1216fdb5aa8a4df0c8543a75c2415bb31a5ee2d87531d5d162b218660a33cdc30539861cb09d85a780feab2d5321d0e8ce06194cc",
246
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/ConferenceInterface.php": "34f563cac4a75ca234e4517cb4678998461011440f30f9d81895adfdbb2e1960009114773ac30901dfbd2596d327554fd335057de66516b656f7a96446f4b06b",
247
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/ConferenceMember.php": "1a880200a2988394ed0436702f805ce60762be1774e1d156f38e45be39cc72203fd4f04411a521ceba8fa9647cb00f6d1bc6d94798b66f12175fc68d88c51dcb",
248
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Conference\/ConferenceRecording.php": "1c3239209726556971c2cccc812ce5bb5a3fc8c7a0e4f3ef520e037acde32d9659dea1dc5d3803e1f7cfd39e945a1680983bdeba8cf62459fc168f0df731adab",
249
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Endpoint\/Endpoint.php": "4c9a87fd6042a3eb486af5dc899d1e4c0948de5ebb1467cc85704030947e2588e79d23407ff662a21b097fb46a05925c3df29dd6e2a038555cf44844342cb206",
250
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Endpoint\/EndpointCreateReponse.php": "f77356f3ca29ef7163e47530004a5d79c1da73e922b17333a89512e39c7d3cc842b161d9dcbc745075f6a6c7ae27b7f7cf85f56a6d5bb796b87db4efbb8425ae",
251
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Endpoint\/EndpointInterface.php": "09914bc8e8eeca2812a4dc07469137011eec1dd77b99e3aefc8d5b8f4675b8f221bc54e37417f6c45b07896b84bed953f8c85831f9e7cc7b85b7293142b60fff",
252
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Lookup\/LookupInterface.php": "040b0a2c01ca3c0c02c2c8450b47e8d1847ab7158014ae161ce971e330712d14d389cd746a353707d2bd2667dc604e55c662af8eb15796cfc613f285e170ed15",
253
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Media\/Media.php": "72b83f02669ec7b942dd898a74c22e909cd9b058ea2e903e92ef4dd9e985305311d53c30a0c54a3f0c210433aeb7b8bd04a4b3a768c853aa73ee4dad9c621a56",
254
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Media\/MediaInterface.php": "1cda06754bd1ba503a8405561594f9d3cd5befee2cc6d9cee98542886c71601bd8744899e7ede346df6b90552f05a9eadeec4cb4d11fdab3269de88170cae961",
255
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/Message.php": "54ae356246cc911258552001390f10f701929afa24801b2bc6cde72484c915e2e738a03d04aee90908003efb3b4b3cc8106f92d7ff87d2119e8a350f7aeab54e",
256
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/MessageCreateResponse.php": "75495f459ecf577e2e0c2f8c075d569f36df80c5c828fd1d6b84a001de2c3d032add50b5ef08177d5c68014fccbc939c8ff89ce6c884ac0c1b64f4301d81cc5e",
257
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/MessageInterface.php": "e96af121fd4a851e4c1f27297c602a5e6862e0ac54974aedb19248f017f2d98386ea9b495ef6cb775aacafa7b51b6117665c803356442786142c15e86066ef41",
258
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Message\/MessageList.php": "baacdb72ec116be9a14b8e7e55d6c40cfd8b04c5bd1b0d93d5c9919ccba2591105e03dee96effee29e95ab7b7e58e45569760ae825351c1891877dd96853254e",
259
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Number\/Number.php": "1bf8e1b1844ccced8d8068a80ae45b6904f59b0fa0e7d6a7c5b43adda906859ec11d709a501f560aac3f8315176e9260ba4796aa9cbbd637431ec94f0ec0c668",
260
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Number\/NumberInterface.php": "e633bf2e705735759f6e27f9e747e3e05e839484b57672e2da405b7e2d8615653fa828f8295a442d13f5b64645fd009ba6cd923f0c163f2070710c7df57a1a70",
261
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/ConferenceBridge\/ConferenceBridge.php": "3da97309ccefdb15596bab5180d386e2a78cf938823225820f5b206d8d8f366209dcf96bd139cd0364729c8b733612ae067d03e1e29aef472c4dc82527d3002f",
262
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/ConferenceBridge\/ConferenceBridgeMember.php": "9ee728dc1f37fc183fd4890ca5d213bb1f47899d2379a16009de7ae32b75b459444a1a329357faff349909ee89843ac5798c75699fb2b8d939501f61dc09b564",
263
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/MultiiPartyCall\/MultiPartyCall.php": "d13d863ee416714a697600882f33b88a8bc9de8d5603149fa199f787d7d904d55aaa6646cfdb3d71caa99e4e95d7e352199e8b54230d3c64cfb81924f1b603f9",
264
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/MultiiPartyCall\/MultiPartyCallMember.php": "6e8f1c6a1177d0c933352bc2d8bd54c989db7679f2feb893f430e9e634c446d033d01a82ea740185b1926734f285facdb3d99b18ffcefe83be723fc08b50fc12",
265
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Node\/NodeClass.php": "b8a08dfe16a42c08ea66d141b3b4471caffd2bbf89fa4b360a1b16a7072ea29d538792c16b93f1e3f1a1a01d564acf1a40906c32482c4cef0ef42f1647e483d8",
266
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Node\/NodeMember.php": "e13f76753f278f07e8778f1d0ad64c9ff401633423ab2476700ad0711ea5534f7caa871b5e10fbb26096feca64471205082f9ba45de607e7ce71eccda0e7db91",
267
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Phlo.php": "da8e7b69e9290d876b6ebe6778c09ab68f47f13cb22438ac92d6eb880b7fe72ffcc68c681cbb9be074e36f3ce4afefc69680e7a3493d3046a04ca9ec432d7a99",
268
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/PhloRestClient.php": "5f3b9bb5e3f7dd96572f1dc71531caeb0b14b21ba7c291561c1ebb040c3ded22bfc0dbd9030843cfeda8b4f83e69d86ed9db2b3b7d0cc8b311ec64000f3b935c",
269
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PHLO\/Phlorunner.php": "c1f3764aa4a4c14a33614bc7cdaa05043d268b24f88cb2312bec3596e5e7e5286e9d0429edb8583b640723784b28ebf69df691d5e4ec53b7d7912252832c3ed9",
270
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PhoneNumber\/PhoneNumber.php": "57bb602a9f511dd39c7143c50a9ca6537bd83f398eeb6f198feec689877a9a423d9cfb0645c4d20eaf30490ae6b6ebb91fbf1d00ce633a2007333ddd6273b032",
271
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PhoneNumber\/PhoneNumberBuyResponse.php": "6929f9a7447425d76afae60b91de8d6a5a42a1e7864871dc73a40199181d5af8be9f645185ce1e796e75440d138cd0f69ef86ef404879d74b58107ce32824b6b",
272
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/PhoneNumber\/PhoneNumberInterface.php": "3720a8056618a019c64de2e4e05e99e0b30cf48de07117e75172b8ba02f2b2c60a1e0b12c3cc07b3f5ba8aeee2e747c3eed43b5bf589c29c7236b47b5ce75747",
273
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Numberpool.php": "a774de315b1d34a61c9b9af9b21b8fd1f624b48bcdbc7ed1302ed25cc21093e05ce1533c0ce4788ad36ab28792878321a99b941cf9e1a8ec7fa2f2ab1d16f872",
274
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Numbers.php": "f62f6534b223fa353f2363e38fb1069c3d10544a4cae2efeaff30019c0cfec7de2b4b9f551cfc16bf26fa1dfb916f6d916f9cd1d1357f8cf6f7cc84815812237",
275
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Powerpack.php": "895da995fc1445bb6f7458c3904c918d8ba8e8db75e94e558f04ab8355058bf82d881d7c282fd8e03acf723c232f3081733a9ace2bef1da42c3e9f4de452d2cb",
276
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/PowerpackInterface.php": "e09a8e4e67ece27935a81730b7587bf29afe72ff9aac57b6c0efa6fdbc4b7cf4c91d60bdcc506a2c0b86f7a4cf7df70c38135e295504417d39024a4671b3cd33",
277
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Shortcode.php": "afd1a0a277918a55fabfc2b46460ab6a8740ac68e1d7b9a0180d88229d7a93269305765fdc362c02cc2996ff7c3d8c95417bc90bb74e44f9c2cf12f023f45b08",
278
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Powerpack\/Tollfree.php": "0c63aaf33046375a8d7c0f9c7c092ca1041f553b1987ad5e2944630dd23f865785e06205b0711c215468630455d8c2264c0b141fee5cbdb4bf9430e6ef90527d",
279
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Inbound.php": "285fd073a2fbf84c533af3c0e60b369689592882364413a1879691a025655bf4bdc40831d13d96c59ec7a8827233e92d478c14d1d648df885c75fbe3d054351b",
280
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Local.php": "5140df58e671179a4edbfa82fcb7b7277e440706406200255ade35177e9a715c3340f5920c4a57c351b6e222f7bb1ef20b207d0830c487bd14b9fa713d3d8c4f",
281
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Message.php": "ae4e8bbe3a668748ba57bfa571cabcd97932d6cb7a8a63ea04689863ccf75a63e0aa867fad60c39e263cc685521a8465b46f730014933dcdc941ebf152fc437b",
282
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Outbound.php": "7656989e6b1da4e4887f8443304e422ad2aa01c9c05aea5b5245b4f3edc333935be4f573fc5105e13cf03ba6ed0ee0ea323cc76c833846bc5cfa01f3a0f33763",
283
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/OutboundNetwork.php": "900ae54c0c0aa0f85af4f02da252a34907999bcd311e9e39ef8d8e27a16fc6c8bbde5d5f6460af6b8e68cf584419ccd7fbc4de177cb827cabb5ae9b2c896494e",
284
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/PhoneNumbers.php": "cb51001dfd504ac52dfd39e2a0fcd01686de42e78464c76767f99fbc7884cc2d6e304cedd72e66dde42852f72cd833dc49dc1e92fe1487b2682648432e7979fa",
285
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Pricing.php": "5d197bd5eef109ba3d877f6de48f8567f135466adf1d811d32908d8d4fa7c8961592733d6bdbaa4f646c3d25a31c8098768dff183d192617b2c1726e8f41c447",
286
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/PricingInterface.php": "dc940fc2f0338348b06fefb22caa65b98fbfd37063621fb4e4f1e23c5dfe21149e2e648c1a32b09012b34c5bd622fe28126bd33ba1255c6ae3c370dabce6ee97",
287
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Tollfree.php": "ad733c0d904ecfd646e79a3b6bb3ade270f99df5e6353bd6c8695322a71238fae107a55d33167063dc2e4b1b905273bb0631f051d06cbfcf5d01c94e9252fbdb",
288
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Pricing\/Voice.php": "ab645548152bfd840951e981c0d18aad23d613afefd4453af077a6055f902d6bea6a0bcc805288f130da6686d8419913e86422cae35b57c1087eea3371b7e799",
289
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Recording\/Recording.php": "def8da050e24afea59514b4fda360ecd1d80a49df2013b258e3d78304d6eb2ccbe21ff1ac50a851079234a1460d0f2750da8fb59c9ff184e8ba1f1becdfffe6c",
290
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Recording\/RecordingInterface.php": "1953832ff8be0a6801f306632f3ca3bc46f067d08662b8ca6d53e29d53507a48750bdd891d2d0164c029f675b8c4c1dfa6765c9abf328578838b428dcea22615",
291
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/Resource.php": "b8a8f583217c43c3eceedcb8f047efa1569bfe5f440fcf4f252f1a8402f484e18abff63229521f89697c1f7df21a2ff919488fcd9df42b5aaf7a160a50f0c62a",
292
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResourceInterface.php": "85bde5b0479b85aefa79139d36192ac334e3deb3a07353b7b1b0cea1180a050a92dcb563ef4a968b6436f60ac990fc5c1322ba3ee6f4ffd41d2997d604653b6b",
293
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResourceList.php": "71fc010407c57d77f5b31105f6e645d04347d961c3c81eef6cacc7b8dd475d86bd228c5ea5dd5976ce34d025b0753083b5361a47cde5d5daf0507678762106fe",
294
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResponseDelete.php": "3acf13bc2797c0ed58c78abac46ae2822a67b9c9194b3c9864738516847618c0033fe12c5a62d9dcb7d110ffd4264c534fded370d04a2960a2da32059fecaa8e",
295
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/ResponseUpdate.php": "4db3ee43405d0a456dbc23801c2c0d71676c3f88ac7c4161395ad275e7fd0dc6b53aee99a882706da4f14fc6c35844d54143a7fa3b6597a5a25d59ed67e0e6bc",
296
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccount.php": "b39e628ab06827320f3dcb47d3ea55d459af1a133430e8e51e8e6aed5216c31b54498c836cfd2a5c5f2d9cda4bcac03ac476bd8ae81c3ee2c7865ddfcd359dfb",
297
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccountCreateResponse.php": "3b92a7ef8da848a7a5d7b79436ae557657e97141ecb2bad076e69d495d78f94f6e9c68464dd7e790d64dc563428e4567a1baf96df1f8bc97cfdcb946e60e94ce",
298
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccountInterface.php": "a4cec509ce127faf30261cf75555a2905c6e551223b4b90949251f0822dc20d7b97efadbcb6bb189cc9302acffed8106ceab79628a7531c161f4f713d6a26c4e",
299
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Resources\/SubAccount\/SubAccountList.php": "228e0fc0fc27fb523c9d2d9e62de77a5deb3bb2a29c10d91d7c59b6cf36b3e12b8b1935a69fb0ceda72c4008b2a04436e6aa3f84740edf265d0f647eed7c52d4",
300
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/RestClient.php": "91f01799f98c6d65e1a0a8025668fb0c9f5fa4b77d44e86790b34599c2b9045cbce2cb3a5dcd93a1fa8523cb688d9f2b895d7d5f2377f64f2e33ce68e621dd82",
301
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/ArrayOperations.php": "04a84eb09d1ba33c3414dfc74d1c4b31c3149dc8e3a038912be632673a92e693da8e531a987c5ce747aa11fe01bf65bc05ac91924ccbb8f157c15c62f8ce9694",
302
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/jwt.php": "61ef00cfe10afee4047149729431595a9e21d44b25de3e8808014312a869110bc22898552fd9216cda6906c91de2b3ef9d723ff0d4e18020d1b7f5d1050fe810",
303
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/signatureValidation.php": "2bf40afd282bd8711459cff1b366510ea253508349adca2f64ad101b6c4e3e20bf405194b9e421ea7cad5b738716624127969de5497e16e3647872e0b3bfc6a6",
304
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Util\/v3SignatureValidation.php": "d70083f5ecd20fc41035462a2a27e04a9367d9b7b13e6bad5579dde4556ff187b8ecdfa17b2c07a0fcf88cce0141baf7dccfaad85a17aa2fd1a7afe7998d1037",
305
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/Version.php": "365ed59af02f30183af840aafe55b67b682919cbb3d662f860baf1defaede8a67fccc5a7f087209494239466f356fc83f612faa02f9f03a301f5ffc66b52bd09",
306
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Break.php": "89a669d486a72465efc2c6128deb6760dd86c9fb69cd8c0f57c209d10eb74067efb50bc6f0e68e2d1c9c2f39862ef3fa03a35c65b7395aea6ca963a013869658",
307
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Conference.php": "bf673327e263996b05a0b45e323168e3d44b27a65efb8a8acb0eccb0276360c1a0391f08edc34ac617aa079c6c2b1f45eba6142446a7ae2286e23f337819caef",
308
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Cont.php": "45ed9435166f1b72dc5ee98afaf3547ae646d16d41677ce5409a6005ccb9ff23743e4c528385a1e0a8f5570eb7ec9374433f609bb8cdcbdfe756842f1005c52f",
309
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/DTMF.php": "14c619e3f01d6dee2dbbe9b718c6c64458a97bf70ae333455aa45c9cce91e4bab693f5265de0099c9cef2334a5310bb85e3374c5f0cde9b93c3051cdf5b57a4f",
310
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Dial.php": "5370d1f1a1ca8420560fa204d295558ba9aeb626fb7149ee06e12acf7f4b7d079307f329f91594e138847a2b3dd9e3f3e9a9e6e774a3c1095c3201ab249e9c03",
311
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Element.php": "4913c3c78365a85eb5c90aa721b0e1cf535c00d5815f509e336ce635cf47a9d9aed1346ff0cbc875eabae65190be2875d0820312a6a5c90c6df3acfa23bc80c0",
312
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Emphasis.php": "d6fda7993f909d3a1a50441ef74003811252d68a33ec2da63d3551236a005952d3b6c7e2bcdf5d9c85d33bee2a9255dbc2b95988cbe0e115b42eeb667d58ca38",
313
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/GetDigits.php": "e41a4e05fd55fec82a24cb2a545db122000251abc0986715a4d5866dc64604ac340c59cf0a30a35ffeeaf17713eed730a7705f32aa20aa3b14ffea368cdddfe2",
314
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/GetInput.php": "cb11a5e0311d3b8938f7d94462d24c5d4b8a2ea4d733943253ffcf36aaa648cd3a4337d732799f382526e0e2b2059dd1489e9ac7fc5ae478eb1db07b3830a711",
315
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Hangup.php": "6a7ac35846ffaf61d8de286929bdce05974799b26b17f4d61e68b6f740cff49bc4a0b72899d1150ae03d72e4f8c4dc7cac491872e76be0aec6b1a665446a9226",
316
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Lang.php": "c16c3db519373df61712fb1748f91785d79ba0fcd7e85a32cff1d17ae89768cbc10b3c4cbceab380fa9762cc1b6948d8fa56054d78185f8c9c1d6c60a012f527",
317
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Message.php": "541a76d5dc1e25633d7bf67c83d1fa123820296b4755e7e48aca094040ba0c2acc6215eb29176551516941b8e8225e6084fbf89892893557e12f678cbe2abb86",
318
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Number.php": "82569de717d895eca9c4270a3fc48022e666e59e6d6c74dffe4982a8db1f6031d80c51863226c750cef5db111f0de940878baaafb352153bd0d053f716c43fe2",
319
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/P.php": "d8bc0f70c13af91549bf4c37ce4c95b6683590ac9c9a3006bf2a4dc02d85ea63a33d0d8fce4a6465f25e0f86b35994d98e7bf75c07e30737305a7f2707ceb444",
320
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Phoneme.php": "9bce52123dcc7451f21ecb2e155884479b7530715d78d175cd616da86198151481632af22cfc19f9c70a4cf0f29f3262f335982fc9988e4aa3a435cd74f14c59",
321
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Play.php": "9b25a9f3a6149ad856c4aa008c405192bf2804432d83d3a572cf066dbb151b8298272b0a9185bb26a5faa51c03d069aed172ddb135d4dff3fb99af9fe982ded5",
322
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/PlivoXML.php": "03c37815022f4b4e7ea917f69b5516c3bb5499e68b65ed1b50f7427d9827de1e84037745d25b420c1f81ab829f51ae752b126943005c82b06a668c8ff895e923",
323
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/PreAnswer.php": "f66f22bedaae6dce341d650d5ded5007d867361c570162a642e0a15f5fd6e90b49a4c8fac2d3a1cb5fea446c75e30834a1106a3acd1ac02a87b5a7df7c1d5af2",
324
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Prosody.php": "12c8b634b226bad4ec0a7dea7b8249959943bc5ab0e71f75fd42afbf6d1413834563c38430e9348bde2cdf1059f266a2ef59fb7a8f6187ecec135ee9d5dede4b",
325
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Record.php": "070470af5650220e0556baa6b109684e1abceb6e80af620ec750f0c691824249121e1c6aef6cc1c91bebb45b76ea9db24f9cadbdbab8857b367ba2521d1cd001",
326
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Redirect.php": "34e09e0b208c4dde1c4b53c451b09f23985c8f74737e73f4675053494cfc81b14920afd6620ff161877c4e1b7b6e7381cf3f824a2b06508d84299aa4e0e45690",
327
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Response.php": "8db3a9e823e3c11b8377829c783d93f0b7cf98afc6d837e514803b478a7887d6602bae6efac9dae6a2e7683d8409c23f78c463185754fd7916845aec23e42c58",
328
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/S.php": "d0dc3f3bcc818d107fd8e4be38718587edf610e3f840d7e6763ce8fef51a1e96de3b49076995802aac9edc7d8a976ef024a1d45ef634599a56d13c56a8ba73de",
329
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/SayAs.php": "46c8fff6a9dbb36df1bb14d0c4247569e00ce77b37730d7f8fe6fc4a404a632ae70e48c774f40c4ac0e19b10ecca7c09686c7d5a6fc7d5311edcba657177b6db",
330
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Speak.php": "d18aafc18ac404a85d18627ddc66d2810ba1061f8e0d3d3634d5f5258b239a139649a8cf479367dc026929010288a291aa1144aec2415a2de6083040b8a4a96f",
331
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Sub.php": "9d34d26e76074e65fc01a3a477ac176027b1ceb5dca2fff450111bd2cfc0027c7f7338777b494728ae2617a27075888ea699d4226b60049c4fec633d42cff8d5",
332
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/User.php": "2dab0ac6bb38d9216c1b39b81ce20f1a2af1d385c90ea13aa566176eeb288f8ce80e11048209abf8c38151207137cc86b754b7784cc478dcfa1f567fcf929520",
333
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/W.php": "798d6f10e6d07a54b29916216dbb2382f25bbf2f96e15906f842cd2ae4aee22b8f3e56535264b1da6d40835d5b9da6a9f4346303f7602c9562587b29fa419f3b",
334
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/src\/Plivo\/XML\/Wait.php": "99e6e66fb4d2a81f0419ac823be64ea8c81e6ffc8313934b41d6189519d053b54b5e95dbc7b869dc979b72b551b5654dcd6eef0540c3b01eb900716e97d52dd9",
335
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/BaseTestCase.php": "662140921fab3f1e7be65bef2d063673900eb3c41de8ddf68320de194e254ec3fbba3322790812c258698af81da35277cbdfc0d2fc957fd5f68956e7db2ceac2",
336
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/accountGetResponse.json": "1ee7d7e260e8678fa70fa47206ac7c4645e9d698da7017ab05fb56266710e34bce48b19d3c65541a084be28cfe918e81fd52073064071daba77355af2eddbbf2",
337
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/accountModifyResponse.json": "ef0e777d38b4605ab58d951f26e975566b61a26ebe5710b9c8c7588aae799c68cf76dc5860f44aaa666864f3fc1f74185b5eba888c1dfa8c2004fb8baf6d859a",
338
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationCreateResponse.json": "19336630707d50a021e3dd3cbcd8a229f9f6123211e27fdba211494bc40e9b9fc5573ef328806bf00b937106e7c894ef96a98080f6003d91cdec67f50196849d",
339
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationGetResponse.json": "26a3aee28fa9219455b0c7a54d47eaf1ee7e9fb526185d1598d5611246c1ad7b0cb1abb05b12d21189463955e25d2da906cf5b04f1bd4c3b826d44de47c0d56d",
340
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationListResponse.json": "b363791ef3276030677b53f555a42deb02a9873cb5b21e17aee9176d425ed38c562da7fc162cf5771f0bd259b46d615ded3799f34f6fef590e2df97180ebd228",
341
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/applicationModifyResponse.json": "742b49b7f428a281b1189fd5f23811931f2d6c71fa271ead086b6acfac63bafed22b86f2e460fcea35d8bdd46786c5db83707f35c7a855efbb92e51ec01a4859",
342
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/break.xml": "6707a46a4316a9f23104a23e4ce9c79f8b4f969639c08f5196a9aa94ba3abd4a1972a29d6131e563a685732e8cb0a4fc90a76f2d0ff5b72637fba2f974abecd3",
343
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callCreateResponse.json": "513446e1e7fb97b30b86dad2119bc9fe73e70f01f4976ac40e57e41e7d96a2faf978fc72fe2ff49e3326fdef8e17cb4da24bf665be81089aad1232716e42e114",
344
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callGetResponse.json": "2958c05e7fe02f5f6f2f8834b34050599df05c6f5751fde2fb038853383683e78b2b33b9534bf8da38770173e08ea9c7015d7b2d4f270efddcaedffd77ce661a",
345
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callListResponse.json": "b2b35a27aaff76dafc6f5a42b6ff515e56ea9d7c196670613b97c2b4c0b7f2dfc3ba7ca705b2618f3851e1db554268018c7c2bb658e94b66493576048c54ab49",
346
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/callUpdateResponse.json": "06be7ca7ccaf82f24f23e8c33382d372ba639662283023a9b6ef555fa24d273efd845ab27fd423dd4267d66a8df24604f96113aa3bb8f8dcfa49e713f3d71bbf",
347
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceDeleteAllResponse.json": "6722c7663c8877f4bd5d417638d5a0fde3db7cd2ba1880dc66a7ce9ad25a14de60b4942d84647cc21c0b12211227161349109162ef3eafc2a9607c2645d3c93a",
348
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceDeleteResponse.json": "9a8baf62bab7971a89490d637633a3d498d4442bb11ca29486d21a3dde432ca6c0cb36d236bbc94859efac83b2e56d33442a13a4395f4b026dfece2103ca790d",
349
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceGetResponse.json": "950fb7d6e6e120ce670da43937ab4ce9e7a7df5296848cb52261f5f854bd89d47f26d76f89929adc59bdadbc8d0e77de79f29edc5d6e6b4b73aff1a0c126bd43",
350
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceListResponse.json": "9f5635d9e0988b03c2bffa8457962cb6870a39d4354ec6c065b58949850b188d2829fcd3db1761ec42a4bed30ee3704b6c353d2b9372742cd6d8b00bff273dc3",
351
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberDeafCreateResponse.json": "b39ae8d7a1de7d5732afdc00da955a91850b855f6463b143b5837023dd8281b450fa79635a3fc729b5b198c6af5cb57f9c6797c8eb56daf72b7c7131196fb4da",
352
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberDeleteResponse.json": "ec18404f82674de8b7ca25eaf95074cefef51b13b038de14dc9ed5f2664c6e6c5c87d3f7a08eeab3926869e171ac26d1647ba1cca03253085a194cb0fbe16975",
353
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberKickCreateResponse.json": "9f924beac462c4ad9f42a705f7bfde5aafe5e73563b07e98ac9db42e95d3c657f5c4ba0d6ea64b01e2e061563fec41d53f8ae8fbd7f5e08857a903c948019e1c",
354
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberMuteCreateResponse.json": "c3f1c38b6c8295b28d531c446199454fd7422d00e3cf71fdd318a821edca4afba444f8cea38175c0853b34dcda5dcc2c6317a9f3103e16474fb36c43241a52de",
355
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberPlayCreateResponse.json": "ac345d15512ca5debe0a20092d8a4bba1f725a581799a632bbdccea771f1b6094b6df3362120a29c1d9109cd8ca8857447c3be08436fa94a5a4304725b75ef4d",
356
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberPlayDeleteResponse.json": "10b6ab89ba98b9d6d08dba8637971ca9260757c318a4842521c7d2bb2a1b967498453aee4cef6fd964cf2e614c25364f543412a0a88b877154b3faa9f18ab3ca",
357
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberSpeakCreateResponse.json": "b2b01526d4838a72c816ad9c6ca7f9cb473a89818d4444b48aefc269d0173fc9eeed1e2473667517280c18315d67a548f41937ab4b7d26f2edd4d0e13486aff7",
358
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceMemberSpeakDeleteResponse.json": "d42658e98680911d21be32033be208b53071e3ee2c514a86809ef4d06cc138ca0a74d9b2e546c54b51c66f3aa891cf0ba3b4db9a6a07e7f06ed37bfb39ef3a6f",
359
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/conferenceRecordCreateResponse.json": "c9d8570ab20fea79181b1416cdc44b8e9f8b18b06ad446a0929ecbec53a6bb3d66ddc8609a2baff92d8ddf9bb68b802ac4eb3d62e958d2cdc1485711a6286ed8",
360
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/contSpeak.xml": "1115d194144f96d3b4ba895d45268e346e7e56bd308b4b7c58bf62712380908bb71d5250323bfa6d13b8d25e64a86580437f7ac1f2c63896965e3c13909c240d",
361
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/defaultSpeak.xml": "2449ff96f102465168a4551ddac6ff85bc680370b423d46ee10b345c128755560e0bf48c070081e8045839503450c0f8b443fe0b33b455410ad5dfd639a6adb0",
362
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/emphasisSpeak.xml": "1ae7422578c6921013c5dd65650f0c1efa50512824b429334cc150ee6872dd2a7981a125b07a8023e360d8a881a32333de24f1b595c95a339507dfb29732af83",
363
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointCreateResponse.json": "e0cd43507839270c51117e48fdf3158e67662c1bdf9c8c964b57a13c15517ab7c83483855764b763f63bfee011bb893c20eca7e7a0b3b8872bbb1f26228ed720",
364
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointGetResponse.json": "05359131cc3ed432c1b29f3766d019be556f58e5e7f7b502d866d0057c04917ad7011bea5afd7ca8f2814dc75c45a52930d48464f7fd740ae94b45d0a07d3627",
365
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointListResponse.json": "d6488ec5e6277af9a34629d901a211e37c9a522107f84ea77f861c417345ddfa409d7de389ae69b719997600a0495289bcde64791ef07c257f75bdef4fa8006e",
366
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/endpointUpdateResponse.json": "3f20870d3ef78c57407bd42cd424775a7014473d891020bfc41fd78c9187acc3d7fc2a2d7a137eb5bf9e8741525db9aec853889b11d2d3ff508f7fb16a4bfc88",
367
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/langSpeak.xml": "1eb16f6028ee00a12e677560ec9b3ca4921deb2d6da15b3686c43f506e9a13ab0cf811d71e942e1f225989f3a486ee39b4949d17d8692ac0a50574845491cc8f",
368
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallDtmfCreateResponse.json": "f30ceb762f24445068ff4a688935a84cb64840310bd518806c1259ec26fd60da6a8be9f11c9c0882d08c857058944cf1c69c95035517716dba322a1a865435f2",
369
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallGetResponse.json": "339633aa5d9cd2aea4a86dc48dd8c63ea8c0c56d5cc0f4513bcd2d66df425ce4b74b246a8c39d6cb0dcde75a8c01d4ec8347e69342649ac27599a79a72fafd9e",
370
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallListGetResponse.json": "7e8efa8df76422d6a9bb0133c81d96b9ed932f7f529644a109b35e9f8f301b3a548e8e7f6a9213e301f25e914b98c3855160ca7e0d6f0283e947cd6fc95c5ed8",
371
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallPlayCreateResponse.json": "4cf2ddd4f3087fdcdf772219c5ed84ffe1dc027208540059bc532961b6c4cad382bce98dec481e0245c99e288c9523e8f33ae7c3c35316c8130f49f81db40604",
372
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallRecordCreateResponse.json": "02f2c4c88fc63e5585f6e5988d5f615488507a7d7eba442430753a60f0cc2763c38abf905042c9ae0f7d017dc50caf67f269267972b5a7fdd4fe7675572589a6",
373
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallSpeakCreateResponse.json": "ef69736cd0199704894c2fd938e4f84768b09a6b9d2f334ef0a83b1750db0bf0eab538471fead4397b49ffa8e86011da111e867d5d8b3532bf3f4250958d6146",
374
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/liveCallSpeakDeleteResponse.json": "63a9fda757cfbe1a338c42f19532609e8607f3c2c8a317ec8e5aa2a164b0e9f9a652129bbf7fbf9fe05c38a0f68138ba10b4d256f48dda1fa292c18f2b717d3b",
375
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/lookupGetResponse.json": "6b2dd461ce651012160ed88d092de0859ff1cc132c57091a1064b5745b83cd6e5144e8204b6810da7bb675eca802fff54fa298f03be6ef858c59058acd24e640",
376
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mediaGetResponse.json": "251c9d7226411a160031776b1c7039d7e7f3d715ad7bb89131353611a2509a570656b8e29577e505102cf588ba50cab34b3b74351dd33e2a99333676d48b7aaf",
377
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mediaListResponse.json": "1512baf046701056ae6b5ef06a1e6405cd62a27d4b82f5b38ed2b2ef6faddfd147b6d57074d04d77cc14325d50d7908c0446acd4a5a0355e9dd9316f80b0f448",
378
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mediaResponse.json": "329e01ec90033528ca170704dc7a3de8f5d004a609fda5abaee4ad610b1559464a97b423ca27248f49fa3696f12ce6c1b3ef69ba198ae57877927ff78257231f",
379
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/messageGetResponse.json": "10494dc350e9a659083f44802a899a893e67fd82acdc506210c827642e27bb4ca1fca7c00a73a7aa20900ead392b9983ae719c6a9aaeeb0ff9f9b9e02539ca4b",
380
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/messageListResponse.json": "5751782fdb135ac45cec47687b7bcb10d4e2c4c8ae88461baca0eb6f0f81b8144aca9b610cc6ef7f3cffd4b5dc2ddac08247e74608166d147bafb1a9ecd4b834",
381
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/messageSendResponse.json": "ae5ef8b7e2a5db03fc5c04e96cef35b3f819f1670cce72e0e729b57de018bd6ffc254e00f20fa7c662eea100f78bb1824f0080275ac270f7e1229566683fc62a",
382
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/mmsmediaListResponse.json": "fa4d1e3885b6c84d72c9f9a4a414de7d1ae1d574db325cd773600c7a17f83fcbe2a84c0daa8fc690d5f5d95431b1ffe5097c17279593ccb4155d5f99b1a853c6",
383
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberCreateResponse.json": "e7acbc2aac3a716dd50e27de2e8937e27fe70da7dfcce17561f4d81a2de53e8cdfb5a695255e1ac65c8c49e4b894722e7ecc9297b9d040dadff97d1cb61ea414",
384
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberGetResponse.json": "261a85df87eb4ebd1d310575e8f33d94f74c30f5ba3aef1ed47654f7569ebe4310019c5dd317a8c6e2b015a1ac3f72455118e0878d688817580b18b747d6dda4",
385
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberListResponse.json": "134543e58c07917a79e0498e85466b9cbb1c97a0e3087473463419bc6c178bc278ca75e148f885eead7f6b1074063256fa61745c57a0dec4ac060c4b03afc499",
386
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberUpdateResponse.json": "e7acbc2aac3a716dd50e27de2e8937e27fe70da7dfcce17561f4d81a2de53e8cdfb5a695255e1ac65c8c49e4b894722e7ecc9297b9d040dadff97d1cb61ea414",
387
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberpoolListResponse.json": "961fe25a8fe8c35dee1b0608a24d741b6ab91f2104a9f2af2080279d6cbe4e631416d7b3d8e3772715e376a603cb740d652435a0f2d7971e64e00eb44e7cd518",
388
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/numberpoolResponse.json": "c725314dd96d000028683c175528d15657c046cb421add91a927472c235ae5c1ee1aab060aa0eec56b6c717138623684f827a2de50bdbec1017e7bff937b437f",
389
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/pSpeak.xml": "1e49af0752b825db21fc50126642fde3f39dd8b63cec3db00c3df92ca38935d58b8752ad14928278b98ef23421d0926d624b6aae948f9473398d25e2d087b963",
390
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/paramBreak.xml": "1202da39615a87758a5fd85096a4d98f6c2726d705ef0b1086cfc66cd0f456b15e3f79d9850e1bb8b99e9114e41b3ca19ee4fd269a42c002c205de005c72ceef",
391
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/phoneNumberCreateResponse.json": "a1dd38958ee69b5036aaa1c86cc730802dc2d7612eb1de9266f9a6651f6f067cf9a42d44c736bf85d1f40048f01f99fa05ccb3fb26baf3875e3bea98fbb9bbd8",
392
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/phoneNumberListResponse.json": "f2c263fdf122dfcf98289f6cd9276cd8c22fe4ff5bffca19b3509800d07909664e9ddfa3e145da04c06dfc6c5227a39868d17ca947e55b65a9cb18a6faadfe57",
393
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/phonemeSpeak.xml": "30620187252e4a92154e06e611a2cda1ca881a0d85b1c6c36e3c713734c0be9ce79bb9ad38a11e040cff437c5676c01638eecbacc5b50a20e0adb506565a9475",
394
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/powerpackDeleteResponse.json": "f170bba1b0b6bb42c88bc74353ea4db09b82f07f5a2166f693d0579e5b7d6beacb8cf11e39cff546345333b14752456212584e284c2c360cc673d009fd2aa018",
395
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/powerpackListResponse.json": "0cf4f36945bf4f73377a6688f99bb3efb0c35924ca9278bd777ecd0081c3f667d45de4a34f7101588b7a7b3b20179d18a393dcc468ed88df8eb53b5e2463d7c1",
396
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/powerpackResponse.json": "4318b75a2ac1642f6ee33fc62f18765a5142aa52e0353082a9d38cbc7660e40f24e1665a59c723ba90ba9a86edb4cd4a396bb9a0c00cebf6d5944e0ba84e7919",
397
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/pricingGetResponse.json": "25a616f338c147cb22228535abafa9c1439f663230d1fc5109af24f4f11a637c5d0cfdbfbf3b2762b87d0b4693f14223254e431f3b8ab1f518b32ea884e2d1fd",
398
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/prosodySpeak.xml": "0529a04b9ebbfc245e7d50bce1177e3eea9f0f6ede900e9fd3a447f86078ca86fe8c9911fad4645494cc784394194c5e6b63141a2a9125a1ecdde2cbe8bd7c86",
399
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/recordingGetResponse.json": "bdf9cd97b6c687685b9c37a0921bcba910dfc811abe416be7b17fefbf857c3ee1233e987570eb444d168edd660c26acb55377f60b8aa0a898f0c9af1743edc81",
400
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/recordingListResponse.json": "2d831eb418cd0de8a0d63da8a2ed133005a3e15e4e021c3451a737c45f42e5753ca5143204acf2f8bdf6ee91cf1ee8b04ee960f942ae0e62bfc3583ab44a1dbb",
401
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/sSpeak.xml": "b81f50357fb60ad968d8e949aed15c7544abed0a45c26c5bdcd4b166fa1d9bf74f57137fcfd378fec345e1fb2281ac38c30b2a3150cc6fcdc13581ea29379796",
402
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/sayAsSpeak.xml": "84e2d4a310c8d1fccc5be4be4cab026e1dde129ed2e18ab4fedcd50512cee91a52cf437606cc936c474cbfa508a105f36272edb6bcae29388f2a75bcb354de6b",
403
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/shortcodeListResponse.json": "449e0c165ad81254715b4521e5f4d39b0a6d1ecd583bf337e8b85ba40550a0942c04a8e33b69e5327a275fca4e42e31dd1719f100c8d6e459939a3696ede1a71",
404
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/shortcodeResponse.json": "867e2309b5c912c9dac5b06929a835b578b0dd3391c43f6e0d454adccf997060e1e5013051b394a94d44af3e5cfea67a88f4376088a376a031d6fde5fafa09be",
405
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/speak.xml": "a781afeb86ed31833e74d834de6d9834783264ec43678fe3e70a7f963e97a9dfd05dcb5ae75f51fdeec1d5d8d299d8c476454307a23efb830022a477500c02f2",
406
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subSpeak.xml": "06ff8e0c15b36727265d9f80c736a1781438c04445e91bd563b73a1f9ed4b501458f7e3ec22607dcd96e9f95da6e6d874c39381ca061a768c2b664a1b4bfc504",
407
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountCreateResponse.json": "7fb28239b065aab21f14d158e51ab6bfff6b10de97ca558da02adb639fd15e99343ca54277d0e0b0dc6be11c01abe6517fcc2f0e862d5a3538342f86bea87994",
408
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountGetResponse.json": "929de7e767657a691c8bf34be8abe52990835f9787114256bca7a1fd6016b34798d36e2318ad3d4a2a8931986d8034e2310e4b4247fa38a84314658402aa3bc3",
409
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountListResponse.json": "c57bcf1f52d302550eacbe5492bbb1cc17bd399d03b6c83971bebd83fa8be975e97859063a2115edfed47f622adfb413d5c28d6cc180710211bce192d867052c",
410
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/subaccountModifyResponse.json": "a06022b797598bdabfd7029128d9ebc9934784edf77175292c17b60152e7464938f78ddb8ab2883e0da22fdf94e584d0fe8d766c40228bc0a564e6ce76c39365",
411
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/uploadmedia.json": "35f19877904dd5eacf97183a286db18153002e37159f6e007c9c70644843d73963e9293a5e64c1854665821e36592f5ca11289d2ece86fafb3ddc4b8b758dc4f",
412
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Mocks\/wSpeak.xml": "05cdd9418d049dc33432e02bc305b10635daf3bda936c695c4136bc4bb8167ac63e6ae809202a566e5a1488d8543c06fd9c52f869b03a474bfc3db560769c00b",
413
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/AccountTest.php": "8a98fbb165ab60db8a7423252e78d9db1da922dc2e1de9ef5cde32488c04380ab01e8fe53f4f542c602b28e574966adf58385456388fb4aff543dc04467de668",
414
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/ApplicationTest.php": "e23381682056702928ea1c587bf8241f71743e4349cb30b621f2c843711c108c0811689c953ecd52515b2c780c50c134f959e4ef77ad2c0dd65dfccfa8c79c2c",
415
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/CallTest.php": "7aa7df68b91782de7a8ff67ce4bdce917de03ce4800da2d6c103f0d1297fc26c09effbbb7ead06d70566398b8679c54246213c4babefca43976c289b8bdb895c",
416
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/ConferenceTest.php": "3d1149c50cc760ec57de791d7a1eb46a5210c113fe91e1756dc642d2d94b333067c9c3c5ff9d0c90d9ad8981963394d332287b57b84c634c8e4008ec5cb2356c",
417
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/EndpointTest.php": "aae4c23a72674a9d4da6261986147a3b3a1c5e4da03d2efe7f4ec21336e03d352ddc0f7e47dab3c9b4063a170d37e0eebeba649ecd1159d85a3c5553789c51b1",
418
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/LookupTest.php": "c436483d9ad54681ed44ef7a6b44d4899d06b7b421be27d2a076aa4bbef23a5d160d5098c60d5c380a8e66ebf8245c917074edf6a7b682d056f9f60e082de032",
419
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/MediaTest.php": "a6ea3f17046c123698c0b8fc1e7cfca6665159166dd53b51d1b5a7700373527c7346a90e67a382f4df26ed3f92209790c3ca93c0c3d3b653d424e17a1fed9f17",
420
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/MessageTest.php": "9749cc39c4acb64b49150958745f19952ffeab648abf06ae839eccf8eb9a6c66bea62e7d8fa398dc48a79bdc97ee063df934ba827632faf88f4aca01e5432181",
421
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/NumberTest.php": "9123fe40158482d314279a729e4c5c0eecf3733884ea39df16de986e775e93e90b8d9c7ad35fbde8f3d4cde3e02b33c70ebe87cbb27039615de8213cc27aad47",
422
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/PhoneNumberTest.php": "4b52dd78392c66e1d1803a278ab98bb03e4bfe5275e28b043e4f672357125b4373acece1c2c5668081be021a683acd2796e6ba5ff2646baf3435dda1d6de7667",
423
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/PowerpackTest.php": "52a3c6967c93b1b996abb3fe7e40ebaec915e58e715c6943b0f5ebd945c8a59023184dd1339cd044d2f3ef1a0041a61559a41a3832bfc222332fd85bca8371c9",
424
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/PricingTest.php": "91a088d32f726c2eb49160363f7a77d351f3f65d43a9282cbea646310e2d01a33d22a2adff9ce5795f949bd205c0b6e77571f0a231265514704f42bdefbc51bf",
425
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/RecordingTest.php": "353008dcfc66ae09e915787634877d598930e60fff3f1e6eec0aa5590881f66d78ebd79aa1ba2b2a20409e4b9372eef9ab28406c9fd29f95ca6c773d8c83fa63",
426
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/Resources\/SubAccountTest.php": "6dd803629402c6f7b8d923753477f6c03d6cfbd50aa59fcd63556527cdbc3d932557b318cf8c7a9f5a9d3ff8ff143ef15f31256e488fa8c35cd62bf80ae04d5a",
427
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/TestClient.php": "8917a380e2cc030228dbb37a7a3aaedd2cd624d8102eee1fc3469a9838f31f7ee734a40cd45e510d63bf4c1526da4bb3af8d45bd4ebd4382cc9fd5bc2ba178c1",
428
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/UtilTest.php": "6a66cd73b0cd403f64f8a4752381964bbac7507b4449e81c9aaa64d61db244128c604a8995327dd8e8ccc8a30cee7a3a57fc617b845ebe65a65ac38125ca7394",
429
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/BreakTest.php": "740c84bc38e7044f5138e3816b72c6a94bca3accb592733421578a6eee2080bc6721d85cefeb8b6f1db751e2056fbf722e0dae61d260b089dd803e72cd9cc0d7",
430
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/ContSpeakTest.php": "f3b641231907bf807c5c09b65a13409ea054b0116b9b36f5bbcc2bfa651592ae1f4707be5780c37c5b9f1516044a9f524f4ca829cd0b5387a6a32526ba11cc94",
431
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/EmphasisTest.php": "b76b6d0eee048b44965f87fa6f59614e64d885864ef3ff0aa2310746d76304fb5ac6cc6d0c714e7560e5472e018fd0183cf9a918d3e4ee5415723314d7d219e6",
432
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/LangTest.php": "1a4ef409ded7d9c7abd8c63994dd3e221b16bd1fcca8133ce43e04b300a28468cea68e430098393acafb78e537e37b0574644735cb84fd08e33dbd828e2fb071",
433
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/PTest.php": "9084715ad9065f1a926e8dfdabc5816b16a385dd5cd74f16f6fdfd1aef043b7d344d9cdac4b9dc43df85e8e63f329909553e20b86d995d9eb6d25d716fc5fd1b",
434
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/PhonemeTest.php": "f85a3119f95615c3d3e16c0a4c1d2aec7b2191629b60de276cedb769b23e11546fc27fff57e329c1ac6cb52868208d29f88d1412b452932b573d88cee9fbd68c",
435
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/ProsodyTest.php": "5aecbb6cb41b0269b0895e580bf87dae24703c3116dd39774c11d52406635f4167bf55ed0b950cb4d8af9138c03361161527c7f0e08867053034d8aea1fb1daa",
436
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/STest.php": "55343bd191ba9b88fdafcc409c1685224cd6673225c1ecdc006d4c3643d9e4f71fde0a07ead3f1bfda80bed486f09a7fdf42e16cf3d4fe66f592bb72397320bf",
437
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/SayAsTest.php": "005fb0efa4803847719d9e7d52438ada0026b3860d7143fa4deb96a80826ff0f8608b3dd9302617547dd36cdee5293ec25570dd6513cd81a921ff483379574ab",
438
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/SpeakTest.php": "cc92de5d0f5df6de17b121249074752bb191265335a6e50dcc4739fe525cc9d0014c187a7d15cd0c1226c56360277469ba10da72dc56dde01f478acc510a8dad",
439
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/SubTest.php": "5c113371cb363691313226362512772facc38c30afdc32e96976aa309d6ac33aa32bab7d4ba674cd566182641048434dc65cf1403f25ea4adfdf6c6793db2fc9",
440
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XML\/WTest.php": "f7cb4983bde61290a90fac15c009ff1780b02fb81c8568d0e8a1f40fab97dc1ec2245cd477b5ec669c6f54e56bcf7351e38c09caac7255756174baf4070c9284",
441
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/XmlTest.php": "58317dda536a0383749d695ee8cce6f73d6ab413984673d46b10d9299e5a70c6cc464051e986b75c849286787a8fb23ef15e8bdf6bbc9a27e1c0cadf46a1bcd3",
442
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/bootstrap.php": "fb1c83cc2a11ffef9903eaf721f4cbcda4767f70368be33a0980aec4e5b515fa8258750f6e19fca0eff6843d0294de9c35b8e95af0e62f51a94442be0099720d",
443
-        "providers\/Plivo\/vendor\/plivo\/plivo-php\/tests\/phpunit.xml": "74191aa62aebbcf797167fc2bfb6bb304cb3d309287a73919caa1c43c188dcef47a1f1905e56143952e4b342ef183a84887dacd6976c18e58025582d5f672035",
444
-        "providers\/Plivo\/vendor\/psr\/http-client\/CHANGELOG.md": "82bb81ca074204aff5d95ac5d3edfa9c85569c8b9114f809e3e2f9525a6046a1276187ca42f638ed428311631791f60e6dace74cd60d77f1af0a41e9f76ab2ac",
445
-        "providers\/Plivo\/vendor\/psr\/http-client\/LICENSE": "3e0ee70fc857b6dda26ef2eafa55ef09384d82bb2f85b4289abcd94a60201c698eb477dcf03a73858b2cbb9efcf00affa199e848344b84dd4a4c135601e886ce",
446
-        "providers\/Plivo\/vendor\/psr\/http-client\/README.md": "a8fc38f5744eb4c1f14f5016b02108319b7cceea7fb3219f57f0604a2e92778fa9be6f1e340003b095f70c962aff0b49ccfb0264b26eecb8fa7782667e62cf3a",
447
-        "providers\/Plivo\/vendor\/psr\/http-client\/composer.json": "b767c510e3dc28fc5c8c0debf4e5627f4897940d41ced88cb0c85284c2e0765f49305997407e84d87154a4d9e14045e6c50fd86163d3d7452294af8b7bc36ccf",
448
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/ClientExceptionInterface.php": "33aededf573747615cbf7b8bc6aa10faea7762c903a0cc98bc43803043f9bad58460f09f7301814c22e95f2a6d0269388d8ca899ab76fcf0f2bd8d82aea5d9c3",
449
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/ClientInterface.php": "11b1cee24748c4ed1a41681b1b6e43e865e08150be14452de885daaca737f4029d65e8381632a23910789d3cf5e9f9d02f4999aad62e4e8c80a2fda9ac96a4ed",
450
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/NetworkExceptionInterface.php": "6d3d81d18a51f451e8a1b74a16b3ac8ce6c5642013a2d1375ce6718090de5369779f9d6f594675aeeb7bc3f55a11f1b9396036354c4e9ae0c90183ff369fd65e",
451
-        "providers\/Plivo\/vendor\/psr\/http-client\/src\/RequestExceptionInterface.php": "46391124b679cd54538ce5ae6b05d7fcfb6b9ef7680f33c8771f94b38075a366788293b757ccc674060d615783476e1151d0ab8a5f2a10e24578c9b46cc1433f",
452
-        "providers\/Plivo\/vendor\/psr\/http-message\/CHANGELOG.md": "5567e49c016bd259491fd13a96e5b88629fe67ccaa0d75f7aa7c54096edd663fc743930eeade981a041cf7524d9f65104718c129fa36a200397d30c0e5d2c954",
453
-        "providers\/Plivo\/vendor\/psr\/http-message\/LICENSE": "22ef0ac33682fbed60a5274a5b25991308decbb45c6ed45fb3222cc045bb9e552fa7310b1ab6f38329b63f53a02c25e7bc5e955ad23c5bb2366b417563cb71de",
454
-        "providers\/Plivo\/vendor\/psr\/http-message\/README.md": "d58ab57a3e35e51848c3c21313836c88eaca950eb5b716878ba950ad2389bdd84b24a5fd8e6b19ce3ff04b07d879b5206b0f26d5e3a63a5be19beac0e9ccc1de",
455
-        "providers\/Plivo\/vendor\/psr\/http-message\/composer.json": "4f074821b6fb7074c418bed0fb6232677a0cf6ae5ddf24694e14bd5aa7fb3610a645f2221fd024e7c4bfe3e95501421455dcfbbbb38468e9db442b8cde9471a7",
456
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/MessageInterface.php": "b79e96e691ad169d4d70420953ccb5933301ce7cedc17d4eaba859dbd56719008198fd201e3be1606ea5dbc78b559f1d86ba17b73ab7e843f0c2f0b49564147f",
457
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/RequestInterface.php": "f54aefad46987c6b4880d5f09f7e99909e6e2a99f9d305d1f73e4de58b43493179149912352869e50fc46e057f50c78ba7ed5df6280a7c0347f3d7c36afcbfe4",
458
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/ResponseInterface.php": "69d177fb504f47ca0181ab35e2155cacf16e77535d07bf4eb4d790e1ddbc7a133f3de21eff936a3e75acb704c936ee2f2b12b2cf3516464222c3d60ea9760488",
459
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/ServerRequestInterface.php": "ea36ff66e8bd962e468fb2bc832e70f7bbd81f92dc0e607cd69092b737609d565f3e254a2d54fb3588f5302315f62e53c6eefe9299ba4b6f1f53ba8feffa815c",
460
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/StreamInterface.php": "11ab8a9d07beea1f1633f8f6cabb2a463ff288555f2fb8a4cc0b99404d8580493018557a0f2674feef653be51f6fb8d9aa3ad8e6dede0391cadb7bb49f96f781",
461
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/UploadedFileInterface.php": "65da733a08d80c5490fec8e69c7b56a47efc522e720a2ddcc673bd74c0e21f5fad4d522ad47da4942d25d139b5392e0882de32b7fe5a5697b86f40fd96ff0f8e",
462
-        "providers\/Plivo\/vendor\/psr\/http-message\/src\/UriInterface.php": "0d46735005331a3489e3ef4c8229307320de44b0443ff74d238cf8f3962d83e99316da9435259d479b48477d33e8713dd3d1a1859264c22f2a53b43cd6adae2c",
463
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/LICENSE": "ba7ad111dab105773d8a75d20024b48c4222cba6f7836b7b608fddf34f367cd218302829a1926a675bfd22660f4562b0e9a679d15b41162412924ebcc1a4e557",
464
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/README.md": "48ce2def80836640ced369db92da9f9e943b319849cc89441023bc260edd6919c710d08c91fbdf04864c6e08bf89e60a397f5e814b3e9699b48df574f5799522",
465
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/composer.json": "495b111d0e0b4f4496ccaec984dc89c897f189a67d840c09b0cf17034629e1c896c37c4ddb1afdceb7d5a188dd0d90405ce34aad409d3b7722169628411d3ca4",
466
-        "providers\/Plivo\/vendor\/ralouphie\/getallheaders\/src\/getallheaders.php": "a61a5f91f21a68108c7e9c8eef22282e4b1b6f6f14ff997c5f47c83f39acd08ec60f4b9d25d306d67fdc68ec57c7f71a44a1f63ebf7c25b40ad61fa1cb4e58a6",
467
-        "providers\/Telnyx\/CHANGELOG.md": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
468
-        "providers\/Telnyx\/LICENSE": "8756122099aea86ddf6f176a480c0454f2be6dd278e475bd6be7d7ab3d572162f1bd44c9f623e52e53514cb15336be6e84a5eafc8e2a347b481ab5799ebd6e17",
469
-        "providers\/Telnyx\/README.md": "321748e1de717ff62ccd3fb2c10fbed8ce92a66271f2047c83be8929f965c179cd163e429175b44893ae30addef3623f96659b98528a405a585f7afc7394e866",
470
-        "providers\/Telnyx\/VERSION": "7558cccb74c98362a480e1c0ae17e711de8e5d6cd10f508a31395105c0efb22cdea79aa6f9f6f890837d519acafc2cb3c429d3ab17a283e1992e5aca5053e25b",
471
-        "providers\/Telnyx\/build.php": "485d76b827a54d8455550e8a8f8d14862f9444381da251e66c2bb8ceaf2106a554c1cd339666b1260450749d0244d6b9ba0c6d0a2220ab2411aa4041fc83f8ad",
472
-        "providers\/Telnyx\/composer.json": "7ab90dcc0b5854786b213e5f2ee8c8030b21f65b2f8d0f74a3aa6d771ca1054ae5e1ba58ad6684dd1234e7eb7244be537cdb0a6888172cffcdaefcc7f5908dd5",
473
-        "providers\/Telnyx\/composer.lock": "1e4b665caeb711f94b1e7f0ce6388e91ada9973159c1230d4e60f0dcfd44ba9af2dd236e6acaa27564e91b4a89dde817d5a73cad8682aa9cb93b203f467c6be0",
474
-        "providers\/Telnyx\/data\/ca-certificates.crt": "66816e077ee99ceb9535a472e6bbf4f0e48ca838099c8a97c7baf3297fcada9a43016ea1ded63a455ee56a8f18501417a0f744fc17b215bb599cafd76b754518",
475
-        "providers\/Telnyx\/docker-compose.yml": "1fe4c651e406095f0ff1bfc196406d473184bf53cf80f7c67dc79f1aa94b26db74174e0e9bc47adc95eb2a5f6eb950255c4a5cf44ccb7029ba712df3be9e6384",
476
-        "providers\/Telnyx\/docker\/Dockerfile": "a63d1fabd8c19fef37b90922aa4bb21fbd1094635666cf2a3a4db47009888bfd3f1ad5c34c05184e2ccc8f581971f6dae91c1ff137730821422cd482c39e9390",
477
-        "providers\/Telnyx\/docker\/entrypoint.sh": "2bf3911c365a271fc52d17a0aac1687abf52e5286a5d52cd34367e18651dcfd6ef1f791b54105b7742f5d691564ddca3c05a9ba4ce8edfbc68fe919e0bdf6c1e",
478
-        "providers\/Telnyx\/init.php": "e590e355286b775423b39dd23b5aa0d3383d8a85ed2d1346802e0c487cb834154b4ba1b0ca41ae112ba81cf5afbcc9133db8747e08565c00fa3b0ea04fa7ccbd",
479
-        "providers\/Telnyx\/lib\/AlphanumericSenderID.php": "c6f7d381cd9901af59d67c66fbe6ace0729c77ac2b2962ce41351ed076cb39c9049aeeb72ba0e3933ebce4ab8a936b86a7e21d30a1c07b2b08cad9da2abcda1e",
480
-        "providers\/Telnyx\/lib\/ApiOperations\/All.php": "5caeaf5bede40fa19422387d224255ed534a866638b22a7a832111cada5496764bc0434cb1aa7365e1d4e0a8ad55545bb05a42a17ae5f2b361ed42c12166a229",
481
-        "providers\/Telnyx\/lib\/ApiOperations\/Create.php": "811f9227ecc5acb172e8e7120541227de0bc22cbf66a41490b743b3e49647a38889d5cfa5d64139b602572f0fcc0fbb96e3971c78801ed9acf7b50db2ab7499c",
482
-        "providers\/Telnyx\/lib\/ApiOperations\/Delete.php": "4c03010d81be8014694e366cf93244dd2f73dfb38fe8a1f3066b6ce179b999967de5a9d3e3140b3076d0dbbeccea329ac750ebb93915ced1e44891ab589f0c7f",
483
-        "providers\/Telnyx\/lib\/ApiOperations\/NestedResource.php": "390efb020ed7c101b32379716bc2111e83273e2a7092da61623f85295c67ad1f6ac2fda617ec91eb28d02ed52a86db9992ee044356f3d96aff2e3474b16da601",
484
-        "providers\/Telnyx\/lib\/ApiOperations\/Request.php": "5b947c7171a05a754fce9c5bcb81f93c1614db086fd4ceef9be1a57977f8bfa7311af0a60a2879d8cb9380c64ddbf7c991738e5b5a4e4b2feb5d88e25c822f3d",
485
-        "providers\/Telnyx\/lib\/ApiOperations\/Retrieve.php": "d2a5aed1aaab9421f2f2b41f69047a70bdea46082e118cd94e087f4082865313d7c67aa037fac194063c53b06d9dccbfa5e65582a9adbbcaaa2982396cbda01c",
486
-        "providers\/Telnyx\/lib\/ApiOperations\/Update.php": "a102e823a46dca1eea6c0bd67b4b7c63bdc0d074c97b42a830de18006782309d3c5f77103b32e82c778f670aade73d3c31f49da49682d9ac204560bd868cd526",
487
-        "providers\/Telnyx\/lib\/ApiRequestor.php": "617ebb71c97dbd896ad736a4e1235f784ea7b89dd73a980a2b259820e3dde0ae935fa532d1fc8e0d9e14a63f843e880e074319bab2f9c519c1ec19467f80bbd7",
488
-        "providers\/Telnyx\/lib\/ApiResource.php": "40b33a633cfba6c4efd4035bb668720a802c2b86538a36bae2f56b8cb1025b87f204732b9ed4f731cb9293de3d69e753e2e55a4f17980b75c2d91c572329c6a9",
489
-        "providers\/Telnyx\/lib\/ApiResponse.php": "0d292d053a85224f4ac839f54253decab0eec5ae9861ca95314e98cad0fec2d2f0a7e712a8ec433adb302b6702d69262c8866b20fd08d67b2d18571965bf6789",
490
-        "providers\/Telnyx\/lib\/AvailablePhoneNumber.php": "7c82ca4fa28264c4fdd910c71741270657e52cdbc760343339bbb7c1d5980d27b7af476f7e1bd431926d428dba685a6e34d250f9678ef0a4e3cd8c4b06289e55",
491
-        "providers\/Telnyx\/lib\/Collection.php": "8953b7490974401e598cfdba09be005dcc037ff74d7eed660d11afca7a45d62c47f6b6c4f31b3b3003f3d9401599283122034362618a9c3d487eb131d05cfa13",
492
-        "providers\/Telnyx\/lib\/Error\/Api.php": "5c496f65e000a74652c5e7e3c79303befb693e497d67dab4e13287ebe72722c9651fa04c4de4065ea969e140f7a2f74ccaee2ab728f05790ee26200558d0085c",
493
-        "providers\/Telnyx\/lib\/Error\/ApiConnection.php": "469821ef557d096a088d2997f762b4a39c82c49bcf22ca707bcbf611b20006106522150d6365835e0c7e23e3303bd407d78181fb7b5d86bd35095645e68da158",
494
-        "providers\/Telnyx\/lib\/Error\/Authentication.php": "e1c7a938a695fcd8602e5a972086989efd349a6d8d5e3abddbf6f548ba2e1f9bdabe708b5ea75474f7c3588ba7cca8a1dc60970a8be70a80962f90342e67c13c",
495
-        "providers\/Telnyx\/lib\/Error\/Base.php": "9d311a5445b2f3d9c4e25c42094734c3d6243fdc5025c7e5a609ce49d2b2a47f01ea2f163154917f3330e1a92d30a736319c4daf3ae18bb6ddc41d131afae0ff",
496
-        "providers\/Telnyx\/lib\/Error\/Idempotency.php": "cde2f56479baab53e74c6784878c7914e7393b655bfdbf7a36e0619fa9c521671c105c3d5002983b3759989a22eafa0bba7b4aedd4801d7d6b820842c0285e35",
497
-        "providers\/Telnyx\/lib\/Error\/InvalidRequest.php": "0c5748224174c20020155c9f0c734121d07c752460ef63648b08a2392bb6d8b6ff0a9eba13ed1cfb8988545f6dc8c70930de6e78da03c63da0e59bc5fa109a9f",
498
-        "providers\/Telnyx\/lib\/Error\/Permission.php": "3a03b08e77e6fd0897de16d69fb3769707f6fb46717b2a00f1282d7b3e33527f5ca5ea94b6df03c883ea177520140ab2dce4986e0ee0977cce8c375e8a5011fd",
499
-        "providers\/Telnyx\/lib\/Error\/RateLimit.php": "0ceb884f1078559f5bbfbba6153e6bacd6ebc49dac2d047da9e7c64d45c7cff0abc067711366aaec74a4f2736b7205c02ae9de8c214871a82ed1fc53faf4be73",
500
-        "providers\/Telnyx\/lib\/Error\/SignatureVerification.php": "8aec6ea46f62c2b6ecf845cadb726332f89a6c0dd92f4864ac71ffd25268b2af0468cfa83b32a24e91c735ae947498bdc6181efe09857c6bfa799cec721dadda",
501
-        "providers\/Telnyx\/lib\/HttpClient\/ClientInterface.php": "f47e88048bac320e8cabb1b61869f138f84a04858afc3b7aff4de858db9b3efc507d1607037bf07ec5fb1f1df4069b71bf8ec1d0edf953bd1eb8255e67651ae9",
502
-        "providers\/Telnyx\/lib\/HttpClient\/CurlClient.php": "fed4939d221213da7fa7865b4405e5c0b7dc092375e5acd890bfdf178baa6572ec7ac7ad57cb02caab5af24d2aa52763bae1b21679f3b94e6f7ba659cee7a438",
503
-        "providers\/Telnyx\/lib\/Message.php": "18acf4bf51ec27d330df16216924c65a45db59895b610a3c803ef1d09beb7d96d20753b4ec16be06ed40f2886ad46bb3d866f14a87021484ede5d33ac1a93c4a",
504
-        "providers\/Telnyx\/lib\/MessagingPhoneNumber.php": "2a2caa5e44efc5de92ef9b0f8ed0a68af1ab2c80932f4cd7fe79caa87ca1e146af3bd0e1d16d977738da2a3af1fb3cef77081c32a0dac50bbe8ef54a108efbc9",
505
-        "providers\/Telnyx\/lib\/MessagingProfile.php": "351d96a913427c045f534b6993c37fa6ce2ecbdd7a398502ae6447d631ff322ce146cd73dcd1161c999f6bc9ab9764221b4bd3567888dd14c110b98bdc4432b3",
506
-        "providers\/Telnyx\/lib\/NumberOrder.php": "52067d9999c150fbefcbba9969b308bb6118eabe25bd08f30cc4978cdebd68fce4479e53d71ce29632133e8c69bb4ce9276301f5a36ea95bd77d29fd057f5d46",
507
-        "providers\/Telnyx\/lib\/NumberReservation.php": "2b44bfa3fdcce2e21668004d458e9e6bcdb5e33cc37e9a0c980bbdcacec945dc4e06e489bf5b9d0194df00229a79e39bc2a62395d44e4072473441e258841baa",
508
-        "providers\/Telnyx\/lib\/Reporting\/ReportRun.php": "2a7b066db83e08b86e3da4c0b2d041c4d53ce0a1fc95ca3dab76ad2bbf549d74f9a97974be6bbbf0d7b592a814a00b514bb26ad13c7621b5c229f9bc40abac7c",
509
-        "providers\/Telnyx\/lib\/Reporting\/ReportType.php": "92ad055c626d39d9f878666310ffec1c425d4625af9e7803547d50f1684c166ea1dc67d79c35580ae08850bb6e570a81994014e82f4d4080377cfbc664c4fbc5",
510
-        "providers\/Telnyx\/lib\/RequestTelemetry.php": "cefdb55dce61e5f276bd49f6b49e57c78085338537e56cce6fea5a81cd1d2235f1eaa78be326cbd513117be88a046177afb628659088b66ce423799995c53709",
511
-        "providers\/Telnyx\/lib\/ShortCode.php": "4abc882d0dbc72becbff07212d17b8e1383b0efb43818a7eab983fd2a08c3f591a4f4ba2f185003fab0622a43329c969d2fcc80b23cb94410007a0879309ad49",
512
-        "providers\/Telnyx\/lib\/SingletonApiResource.php": "f11599b789dfaef76ef6cf10bade1b426d2e16749bd207c6d08ddd007fea470fdbf0492f9a59cf8bc9f8589aa4532cd6c3887629cf27060696c3f086b0a48673",
513
-        "providers\/Telnyx\/lib\/Telnyx.php": "4971ff61049149242b0cfdca4a15dce213c465ee697cb444eb47da8215eddf2737508164c59393bd7661cf40b1a525afa9fc0df0dae8a071a59f3646a5ec44b9",
514
-        "providers\/Telnyx\/lib\/TelnyxObject.php": "a1bb11b6bfecd69ba694dd34d6309707e916ef45edea1e81e160c572dc404aa4e16841f3be7a82b3965037efef24db7c7c9730fbb65d26e8a188d30fa9af01f6",
515
-        "providers\/Telnyx\/lib\/Util\/AutoPagingIterator.php": "d03ac3841bb553d847be9ea73ab9debd8c1f2c829b0d38ac4416a121ac535a5ece2ecd9943d89e720cb5abb1c907ca9b96df899a561c190ccd6843bde785114b",
516
-        "providers\/Telnyx\/lib\/Util\/CaseInsensitiveArray.php": "bcdf3fba35ae234bc63ba6cdb5429aaa5fd6baed85857991abb9eff854b23eb7a878184ed038636292ac470b67f91c6bf8d79c20a6214d31c872d22fe51833a5",
517
-        "providers\/Telnyx\/lib\/Util\/DefaultLogger.php": "50a69f9f6ad628e489a05fdad0df811c926c957c301adb0b4b906dcce9733a0598f6c2eb126865c54a0100131dc4230a834b1e98275237ce8e90bff2e96cd0fb",
518
-        "providers\/Telnyx\/lib\/Util\/LoggerInterface.php": "8d2dc2c59af5e625eaeef0b85b09f78a42e533b62fee84717d67a4c706fbacd94674f439d3ac60984c0a3947b7d2f5a8ccfb64e071c41d063b8298f57578f88c",
519
-        "providers\/Telnyx\/lib\/Util\/RandomGenerator.php": "292c880420b28390e3d734c6343acd48f322db0c474f80430402916de1dcbf8e988b3d2753a7c18e763e632f474284b213ccc8e8fe4e52f00569e72728dcccb4",
520
-        "providers\/Telnyx\/lib\/Util\/RequestOptions.php": "61a13e62a72e7fc4a1f4d2a707d03ca785af36dd8566e037efa4b1a07d91debe1bccc637bbae6ab9dd836b20a4133cdb7316d6c2628da0d13d2164d6613f1e3f",
521
-        "providers\/Telnyx\/lib\/Util\/Set.php": "1381d2144748a490fd27329fe231e9d3a9a8b428499d4005f9ff18a946c350d8dda1ea90285314a1a99f5d351b1b235ad37a74823c37d7345da8af528dbbba87",
522
-        "providers\/Telnyx\/lib\/Util\/Util.php": "d7c35dbf5a2832ced6059800a6730fbe75338252641edab902adfb134a179d96e162f05bca2902c6c2d99cf4827d5b89b0daac826162c7d460e17017ee405606",
523
-        "providers\/Telnyx\/phpunit.no_autoload.xml": "06ad2f4fe0a292902757629f5605509f32a0d1dca527550619c98a61519d83fc70f3c886b12f5e5734b1031186fd9c7fed6fba813cd816b0f07d36c2a6bf11e4",
524
-        "providers\/Telnyx\/phpunit.xml": "82ac037adc20f2aa76682878094e8bffbfe31782dc6a94e2987bac5546e3ffec90577d03715f4ce481cc977685eec9e4109a61b4b46bc19351c2cad555d7cadf",
525
-        "providers\/Telnyx\/tests\/TelnyxMock.php": "e8e93ca1114530cb7e9cad46eb20e32072934496d515a9391ce8093773450dd60f3288f9d3ba46533a0f650fe67b508d5e54bbfc6e1642443d1fc043b88eaaeb",
526
-        "providers\/Telnyx\/tests\/TestCase.php": "9945df738b56e344648cc00d3d4b94345c15d8749ce511b5095a87d5e52aed35d8e3c773276d9dde9d9fa04eada784a55e4876ebf70a198ba719c8e94c8c32d8",
527
-        "providers\/Telnyx\/tests\/api_resources\/AlphanumericSenderIDTest.php": "1db47c5c215f1dccbc0456035edb1619cb7575dfe2b152924a6e1abe4a021bf63be3b1d1cf1b86285c5425f5df46c8e396cd66b6ff6a27534e402e145e5fb194",
528
-        "providers\/Telnyx\/tests\/api_resources\/AvailablePhoneNumberTest.php": "823ab5138035a84a790d70c9bc5964e7aa163f195aeaa2fb50d2cfc7068f1a77440f09a134bec36a187cf57cca6c735b428b225239a263aa26cc5cecbecdf6d5",
529
-        "providers\/Telnyx\/tests\/api_resources\/CollectionTest.php": "af248a4d4c4504f5fb7148e8f5ddbce3a05cc859a761f57cffb8335be10b07ef6d4e808002601f92eff2968e86873fbbc3fad838420db0694f81b9cd95091452",
530
-        "providers\/Telnyx\/tests\/api_resources\/MessageTest.php": "a616a69339b599526dfd24a25d8e99eefc99c2341bb7d4f635d1b4984f41dc38a3eb6bca3e4242caccb974b141a490624669b5c2b2f5315b6cb07540d74fcad7",
531
-        "providers\/Telnyx\/tests\/api_resources\/MessagingPhoneNumberTest.php": "40409c270a6f9a683bc690f6e91051fe1ac4c8a6cb1b4e5536416d64fc3f8c81f327f33e562ee94cee1481e0ec2f13148b0dc3f76f3f20a49a9d80adfa5c1afa",
532
-        "providers\/Telnyx\/tests\/api_resources\/MessagingProfileTest.php": "1ca7abc2b47f221b491ebbe7def5569deada6eaf4184bd6e6327f7bf2da15669d1fff581e24c466621e8462e816c0a12d02e0aa1d91aa3746092f8a09a9131ae",
533
-        "providers\/Telnyx\/tests\/api_resources\/NumberOrderTest.php": "dd6e4382dcdb0cd60ded9d9db6262bbc7f523e8f5eb842e15655fe8ba4e24ad5192b8be40bbc762de2c62de3aeec31e1373063420a99e39bf02f5bf74915d5ab",
534
-        "providers\/Telnyx\/tests\/api_resources\/NumberReservationTest.php": "8b8386c0e044e120b6d60f97433c9ecf0ddc272f805034768300bf01bfbc731a3f6f964758e509d650013df03bca66eb1db13fa1a24315df76ea55fd86287fd6",
535
-        "providers\/Telnyx\/tests\/api_resources\/ShortCodeTest.php": "8aef092868b89adda6517905c7f05245b3c39affed4c7723e5a32cf17b8e39528e8925923aad4b2add5a0bbce9049a8f934141b87a790fcb002eaf77aa494258",
536
-        "providers\/Telnyx\/tests\/bootstrap.no_autoload.php": "cb002f7c8f77834b6414db6535f083bcd227ee6085363fa3cb0f66b55226680a45c8562fd8458249868465957b2aeae134b3379f8ee2ed22c96425475e9c0af1",
537
-        "providers\/Telnyx\/tests\/bootstrap.php": "50e143ed68aceb91d3e119d5a31521e76bfe9876bd780c90ac83afb7ca4f32be48ff81c33c134109eafe1d22f35e0957a9a834966b8853df99dc1df04795adf4",
538
-        "providers\/Telnyx\/tests\/data\/test.png": "6ad523f5b65487369d305613366b9f68dcdeee225291766e3b25faf45439ca069f614030c08ca54c714fdbf7a944fac489b1515a8bf9e0d3191e1bcbbfe6a9df",
539
-        "providers\/Telnyx\/tests\/openapi\/README.md": "0c54fffd5b7a5f393358864ff9e3bd3793075d6060cc1336603b2455d60f16d160ffd47b52bca6834acf0d9713855b386f69580099a3dcc131e8d5d617975ff2",
540
-        "providers\/Telnyx\/update_certs.php": "46dfc1129c3dff2211cdd8274fadd8629c450e94a7a1c8527373221b25a0664b6043d6b007351ac9afa4b40ba349a7fdbf4ad2e088cf0a8d864f7cbb81145fb9",
541
-        "providers\/Telnyx\/vendor\/autoload.php": "1d4735a3ebfd65901ce478f8bb98ac576ef9ba2706f17a1c6ab125979a882ec7ff463b577fed1c418f817c1a56e842fc25b6aeb8e7ce6dcdd554a25e03959c3a",
542
-        "providers\/Telnyx\/vendor\/composer\/ClassLoader.php": "866e8cbde808b4e7774c5d9e2bdda44e84ff9bc84268785aff1a75277bd7918dc26ceeb27732718c9ea93756777ec0d16c09c15f9c1179be3cbb410c7914d295",
543
-        "providers\/Telnyx\/vendor\/composer\/InstalledVersions.php": "86ebb1216b59b01b7cd1f3b2e66311cd6295b58fab91a9a82603f903c6d2f716d7697a82d625372538f809e9e45f7dbd257a00e2b95d23c3785e4eeb3a6ebb60",
544
-        "providers\/Telnyx\/vendor\/composer\/LICENSE": "f3bb64009f41a425df5a9bbab53490f0eb9b74fa8d6aaa2f57efb928edc4ffff330260666edeaa04a91fed708c3663371cf01b284f3a08d6698aaef7a23f355a",
545
-        "providers\/Telnyx\/vendor\/composer\/autoload_classmap.php": "a298b75d605ec9a330a5efe11769e79f02cf202f49d8b241afbd175c7fcfa0ac4db8e72a29aa1d839138e3b181fbfeca525181eb57e998a4a2c14ec9e457cf1a",
546
-        "providers\/Telnyx\/vendor\/composer\/autoload_files.php": "107b2d75757e7b39e2d279e373fd4291d57e91a7f442b0f880b51d07e7119beb9d41d1cdf916131bba717e8da953e2117ff83f1bd9ef850fc1d9056d0f02996f",
547
-        "providers\/Telnyx\/vendor\/composer\/autoload_namespaces.php": "30324cf2dc20c214c5b5c8fdc2099b67772149ddea1d1d51969c711be9a83d036e43746c600f958a6b49969b16a10ef93e9b1e3d5af9714721ead916b9aef344",
548
-        "providers\/Telnyx\/vendor\/composer\/autoload_psr4.php": "02804e683dc13b4eb2ad98284be2dff3eeb97f0ae9054c3a45641ce7e6144a3b5f34ae36eb764fd2faae39fe5dd4131b4dffd4649c6ba3220ef24aeab45efcb4",
549
-        "providers\/Telnyx\/vendor\/composer\/autoload_real.php": "469f95fde429006c3262cabe72cd49970b0cd6098b743d8e5a646af25679dfe539c98d3337b51a8faf7f30d9c64e1def8d131a93e8897f801830e7e1c4da5874",
550
-        "providers\/Telnyx\/vendor\/composer\/autoload_static.php": "4845f043e32744886f456f358ea87cdcfd641508151ba6c3b0169c9aa53fe111f05b78b82e204368da01da68d7007709c9140d08dce4e7dca3cc4c9f60397dcb",
551
-        "providers\/Telnyx\/vendor\/composer\/installed.json": "5ca47a408f164e118f7ccba81577933913002efce47331f2eeb13f3e24d78878521db08454026d270deaa6552095260d745f0a424c91eb7efd36f6a9a20adfba",
552
-        "providers\/Telnyx\/vendor\/composer\/installed.php": "38fb24f1f4e4aa0435926d601c7b78797c231eb0e3621e370b17078645f5d238a1d02da3a29cd14a9125f78f53964445f4326311f6e830cf8faa24e944215ce4",
553
-        "providers\/Telnyx\/vendor\/composer\/platform_check.php": "4d385b31994301facce94382fa007a56ee32268d2e1cdbe7c9f9cfa834ed4195d3cf8e8e7c9a800c97aafe2c9b46f3c1a93e632c7415e8a9e4a282c083cc6f9a",
554
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/LICENSE": "0c0bf603f7e196edaf56d02acbb2e14df7f73a2da0617d62b5fc811f088c29865ecdbc7c6925a19bda63132cc651c56f1cdac79dfa02aaeb3fcca49033636ee0",
555
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/build-phar.sh": "a5ecc580bc6e95a9c901ad1a0097fd47ab857dee79d0221ae463e27f27cc8b2227e1975ab2699b9d0782f0b0396ed9b3ac0106f53fe61315cd2954ae54beb333",
556
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/composer.json": "c400438df2f41ace7bff40d284236bb06c6095ac03b58caef5b062e7ef317bac5a6bf551c94459ffc838acdae7df6cdfc615dfc3cbecd16be37ba67bd948415f",
557
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/dist\/random_compat.phar.pubkey": "e8909663e5350be2fa9416e28c6b179c41e87feab8da0d6fa6a41c294c9b00e8cc40ae8bcd03997770056f70d946315fd530f72f42974f63195f14b3c675e3c9",
558
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/dist\/random_compat.phar.pubkey.asc": "f07fb9c7b00f297e73127dddb1f3986fcebdb0760454765f6ce0977347919c0c74ea197ed310bcd86dca7ed227812bfa6d1595c44e40f10c085cbcbf602e163f",
559
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/lib\/random.php": "fe4539e2b55b47dfff1e2256c91498e5a41a85e28e42d790fdbcc42102c16abb09b0d7a0e2268ee004c555e1001241a9925fab1eeaa16c11ae2188e1f01540b9",
560
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/other\/build_phar.php": "370c622746a37b65aa6e36c2fb94486b4fb01f2db3f3c9539a7fde711d1abe3f9e9c30bc61f4200e6da9b47086c207b03cd7258d77dd2ea6b48126a618e2fa0e",
561
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/psalm-autoload.php": "f05ea11c8e973ddffde4d60688b161701217ac8e5c9237cfb57babf7113482d5e19ea441f5092eb1448a21b95ceed75f994427d6febfe0de100c376ed17e91c3",
562
-        "providers\/Telnyx\/vendor\/paragonie\/random_compat\/psalm.xml": "88c631fb2f70a79d0e56a4484fb7ae8b6b3502ed2a9599757e7a3302c42b0adfc6f0c45c9916b88d7430f209d8934b6121221dd8b424dd913c49236db7ef01c4",
563
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/LICENSE": "db260eb10b8775cb408f675dcbe11bfb1a738d638f4215467df6c4bd03b8265dec7712fffa30dbcd38b5ef944266c3963343d033f497eaa6dc602f55fdd8729d",
564
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/README.md": "82f123f85b02a7e91c3ebece404b85ef5a0950e0ca79bb0841735a5a03b88d1a3efed4bc8229b3ee1db245471cf58b81923ac9800586ace3b794421f379f7bb3",
565
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/appveyor.yml": "ed6f025871e47d5afb1eda2e0705a2185670c447279cadd8c0fa796779fa2f1d7a5f17efaf6412c403e40bee345ac3224a45f9aa0e5143f06ea5e25ba8cb848a",
566
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-fast.php": "a40c6c77f211a2257d3339ad80ae7197ede8ba0a94c76b48052cfbcc8ce903959dbd8e3434e6660bfce2c5e935cb9f38568f96cf00819d03f4a1c46cd6b7b0b1",
567
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-pedantic.php": "c1a0e8a5b461135bc58ebf0a37d75e865d9e44ce666aba9a95d6416cc7d57a834aae6fb6ef4a9cb4176690a4e41cdd8638106a11b32a155f3a8ca3acebf7a504",
568
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-php7.php": "0ac98043c8df48e7bdd3a20c11688ad3702a06271687e1019c2a7288288532ea593e7e462635b806c0b18dacbb8f2bd6d9c700a61d2b1deb90eba0b49660b008",
569
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload-phpunit.php": "d34cda9cd77a67d93817d5b9b1bb51a13521b2539f9a8d0189debb1938934df1d5fd51fd2a82c9d4775f5a8613708a1e78687fab86c3afdc356bc4b02045bc66",
570
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/autoload.php": "91c2a6366a27a76a0390c69dc4cf061c73cb03a22a3303aad673cd08e8cd659c7fa7e6796acdd9d2d271f015eb16b15663c5d21d8a538fe14f459519c9f9e8d1",
571
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/build-phar.sh": "5bc154a32c62797e85b82595da69ed11676d98deb9644b62a12d5ec169d3edfd4d3b24c67170143f12ca63d9bea06cd0803f68d5e63a7849ea9c4dc9483f7b4e",
572
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/composer-php52.json": "10cd40189c6ef385b9e21311b8b2bc8f7943273552227c8006a38889d743fde82c8c61286484d59bebfb83e645a87cf6d99f29409439a1057fd16a4ca7727417",
573
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/composer.json": "e9b03b450c47dc1a593e35493c7c80c373f958ac5ddbe89a163f15e7a30a8139ac0f9868466610899e3d5e5d573d517bf09acfc68d2b9420e3301b39e7736aad",
574
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/dist\/Makefile": "1cb0cca3e1413538bad70b8c8a22dd68d17bcb6450e0c4ee41fab9fab09c36bffb4816dd0f7ea2f40ca1b4cec6b030c5c0cc17955d2c83ec08759e748b04d965",
575
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/dist\/box.json": "47543b120abf7596f26b58f9911963e9bd0cbe2297b65d43f74dc52130e503ce09049a4be53146387b7fb42b7640f6577e3c1f4862540d4f8a0e668b0001e62c",
576
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/constants.php": "4e0597dadc39ae7b81e46ef5f3f045812a11753d9116215bf0d905e0bb3760bc44639988f1ec8f0ae8998f507e0c99eecbd19705f5399edfacb87172d7a577ba",
577
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/namespaced.php": "c550633d5dbd23c1bb2fe9a14b787e239bd5fa898932ddb8a1b1f8909a57393e01f12337fcc53f54b24bc48a97c3ed89de03da089ffbea71ef90d48c5091e200",
578
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/php72compat.php": "85b52455b2764ef4b80d60b8d99d5f65264b2a2e7d770b2ab05871a5aad213ad35f2cd755a8b5d19b5ddcea758c024175480f2dbc89ec75dc86ccdb453f5fc25",
579
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/php72compat_const.php": "177d6b1b8fb5286842400019be1465fa0438e06dfce2fbf5e93e93d0715c161ad07c0c31c17394cb0c6673a058f34544454cc0845893242dfb5a998655c93701",
580
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/ristretto255.php": "f2c36f65a9a556c43bf9f2fcad02f1c87c29d89bb5b3d81634112defbae7ac0c85e558fb3b5a5e74d95906a4b543e7a2cf16fd444ff28888ef09d73fb9e6b6f9",
581
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/sodium_compat.php": "75e3119fb1d400aba554506a562c64c1b1b82e66277383bf307406fd1f4c68499a32b82108529d5af99878890e3551dfd1fef1ab62ae86982c27dc975dd39155",
582
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/lib\/stream-xchacha20.php": "4cf0cb7bf023249c18f2261057f994faf8c4233022651285fdf8978fe9a71d7eae0511ea1f64faf2f3fcb1ae5b010112a5a4ebe8df9fea7ce908916cc2ec90af",
583
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Compat.php": "7a8389a0ca9cb8e544b7f345c60705e1cca41769105531211219142f15c83bd60b442dbe8bd62042a5fddf31040a19ba1f3f00ba6c2a44c3160089a2605099da",
584
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/BLAKE2b.php": "91aa0293c7c821d238f36fbb1f4327e67a718b53c13f0ea0f4d6e1d1675618bdadf183d842d4dea103017be863d40762a20c644a4f3619c7549991f11a19445b",
585
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/ChaCha20.php": "7e09160954fc59c77890f28e75f7ce8b75fdf08b9d5461c5e7dc1f49bc664bcb1b7ac74e3f5437657a20729c2db965d968060b27309a4a06a252d22b7f8dd4f6",
586
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/ChaCha20\/Ctx.php": "f19f61e54d42bf154182d203594613371f430d7c78f5b8229cb9bb94e19e42bb9a8e434639accff18497cd728ef391a1128d0145b8958f8d4350ee340340df39",
587
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/ChaCha20\/IetfCtx.php": "41ac6fb53ae553db13ef5c12d8c1c16d017267f130e8a00e9c2a8ad10d723aaee5ee08f2888f016babe4d712a0f1fa50012e4ebe6626b34973c26ad6728e36da",
588
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519.php": "5404d91b94a8e6c442c3eb30b763f1dd0c1234b845b967b7048f71d5a0b6e1ab287b44f43e06ae5bd6fce31f78154b8655353d7df86b6ac699a41200b9df33d7",
589
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Fe.php": "937defa56e99d4f38a81b88c03c649deca5b0f41f5d0b8e340cadccb34ef0677563f18967bb9f63e9547137a2a1827f9e37c62005fe745aff3764e39adf86cee",
590
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/Cached.php": "3db1263681f9414d237a8318c08ad07bbe3279b7310e21a40c22033f5d90eb5d7074dbde430eec7910a8d7e4286fa6c0131938c92045520f56fe6acc37af70af",
591
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/P1p1.php": "d757efd8638aa0c1609d59c47f3b18608a0fc6e1e5bc3cb94f16fd3fa2d6125872a796f4837cd8b940ca6988db92d3c668bba684c721476ee5fdb6fb6d50670e",
592
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/P2.php": "cd70c62efef16eb21967d5bb0489dadef845fb3cd4faf0b1bb7d080a8685164b2b0fde4d8865dec22037795eea6df605dc2151f20871c31d5e9e0084f0066219",
593
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/P3.php": "56c14b848691af72c00f5dcc3d31281a300d0ea9b6ec273ff929cf30d2279cf34d51891729a5b095445fffa8a63b8c8147f4d1ea24935c86b0216b3c40aa4241",
594
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/Ge\/Precomp.php": "f6c53daf36931b4289248a231da52759e91e5c38af10b2cb89a1bd7e55d29e316dc77d144fb9e52ca1cbf50db84234aeebf13603c62d58d5b3ee58dc19cc18f0",
595
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Curve25519\/H.php": "c2e48f6273cabcdc40f20fd0f7ea55975fc9da5a419b1c9cb834b694c858533f9a0d3e3ce768b532ea6b69ff5d2df1ae4c246a15b7129916d4034ac497ca2be4",
596
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Ed25519.php": "eda61c7ee144449df655ea9a9142d0b26624644542012652598bdc51493f61938c13651b32b05e942d31d3cfbfb7899b8621f4ebd8a5909a1ed12704b2bcfbca",
597
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/HChaCha20.php": "b5005439c15ef7aed83b566e670053819f59c415d9c5f607550c756622d7161ca32fe65dad8f688e6a292f88192637260d859302064b416465c08bbf7f6dbe13",
598
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/HSalsa20.php": "c882b541376c8eea8ab3bb63d8b51dddb345cc45ade8d5d264dbaa96427f72f0201aea828e696808155da7a978c4a1fad09723d42ec393117693e48187cf2a4f",
599
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Poly1305.php": "c438e61d6b330be26cff863f8b5c42fa3284d6e8abdd1e43a2023c2695dec643d2641b2239a9b0fbea1a34e9e8011d5094b4eb024b111b6fa903a1c026328747",
600
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Poly1305\/State.php": "4558eb5b05c7664408a4e793c2b85a4c2593ab8a1118c3b89db712f337a12346e2e882a0c638c32af733f5589a310b4a528c9bc02c136692ae82f3ac7e6cddab",
601
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Salsa20.php": "2836d7eeeec597187c456ec790107a5dc478a1f79c1c1e4ede4314bb830f865f189e048e3dc55742703e2fb7bf31275f515cca57ab5bc47332961bbdcac7c490",
602
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/SipHash.php": "345fc6b9f37659ec9830c9b3bd1459257b81568dc73809c023c551dd825981b0da6b150b6b7cd57b00097ae9cd3b742d730ebfda2d2e459ebd7d5257fc967156",
603
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Util.php": "81aac8187fcd44a14ae856e34d7337c012ff3603c606e1b9ff5a95fd5cdeb962725b70672a57b600d344fb2f34aeea00ddc8f1d4d8f8888961fae9171f8262d1",
604
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/X25519.php": "d11fca34bc3d313e365ca47981a0efb880a3cc8be3e2cb00da7df69de8d52f2f1fc793c1654cce1385ea66aec40eb5339c5cbf120c127cb399b72fe84b7297c4",
605
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/XChaCha20.php": "de5d7f3dd4402fe3c99b66a92fa4f0766beec66928c8996b3754b2f7a8869b65035c6ebafcc8ba2fe9b309adf541e89eba9491554f1ba548af6139770aedabf8",
606
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Core\/Xsalsa20.php": "6abb7e9217d5463d373023d5aab49c41cd3e1026835985dd13256e68374ef63b90b7dd033f7fe14ea60229a98e5e64d0d0f23b7a382ecc9d8b41746bbe3fec11",
607
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/Crypto.php": "257d3d05f1acc745b21f25652ddf0b09b5a68b2b75abaa9216bee10ea958f8ed1d3c964dda5326216366d9cca4a71e8678c23994fd07eca2582e3d8c8aa75500",
608
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/namespaced\/File.php": "d7cce5179670dc18544eace3bf8b8b9863e62fc9520526da2870e45d5d400004fdeeb3c0f44a90caf0742f89b633e7fe3f996bd5f89af4c7f52ea37f429e453b",
609
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/phpunit.xml.dist": "0f8b25b7effe47068dfafdc568c3298d7c5f2d4eb1abc040c8dcda1b0daea8523a1f82d8e00d6475ffde3cb566c18d17ccfd07db59c72bda11f40d555b692d32",
610
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/psalm-above-3.xml": "5bb5402c96cd45a0d88542bfaa12ee03c26c3242f42f1e33a2a32e5a16143e6b66e7dd4bca7cbe30f73ee9eea7e72862e356f1bc4c4daaaaf1ebcb248d63b230",
611
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/psalm-below-3.xml": "9ef67d2d8ee81c94d0ed80d592894be0c200045b295178f246865d12a54d963e97b4a8d75ab88595bbb73d74c75ab2275a54b9a33733bea2d15487c5894f515c",
612
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Compat.php": "1c233a4b931c13b00e243f699eed9e81fc683846e089a24ad90dd17f786bfdec9ab32509eb9666074c9fc2a168ea8d411144274e6c4d4413996c78bd3c536515",
613
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/BLAKE2b.php": "27fdd20dc655cc7f58454cfa97fb974e4d99f6da5b97d79e669d41b9c5bfd1be18fa34f0ef7a353731a3bebb11b56fcb68818cabb3d8ff026682e7b39106c6f5",
614
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Base64\/Common.php": "c8512fc6d570a3198107493c7b8d20f38539caec221adb14161d7efbd6ab7d1d0bef4cb5528fcd84cd9484f1a9e0fbeb45aaa2365012680b0106ea92f8873281",
615
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Base64\/Original.php": "4564f7cfef60c318abe626832bcd355cffbe04d020e04d18c5554fc1610c4a1b0ae8d1111681e2a458ae0b9d7ef3528bd62aef019fe3c1a3f9d28b5ae58da86f",
616
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Base64\/UrlSafe.php": "dcbd158a52f33b9c64c8046c8f091d9af95657a562ac694c9ac0beb3a1876d55a3f23cd42c1777d9cf2a55cdae38d88ec54628b2d5fccd6befc92d4d51eaca2a",
617
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/ChaCha20.php": "f0015a4f95fb6028c015c954992233d76ff0b07c7c60de6347e7b7ff1cf704e80de4ed5b3e236502fddd3c56071aa8012758d905031d6154f965c4898251329c",
618
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/ChaCha20\/Ctx.php": "aeb8c31a1bb46b8519f280f23d349fa93911bf766715c0964c0a901369d0f0599e87c6e13459734f582a04ce74d9ba9f3ed7553d4b7214855a815424a8a8610d",
619
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/ChaCha20\/IetfCtx.php": "d22a84b5bbe07297fa80c989e93681b27b3ee502a9b77b63e2b08eccdca03cb98c39834feec5fce3cb0e1915f2944b06e94fe555da123de982fedc61b30c1f91",
620
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519.php": "b25ba0383cbaa00339f5cbaff6b400a25f3bd4d244d2fe70a08b987ead0ebb04a7f51b9476baf01fea5967610911f809114e39d21d4e278a9be72b48ca39b09e",
621
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Fe.php": "0fad7d424e7f3fbc0abd6a4f9113c83523aadc3f9d3423a94da0954f56d31705ca567ffad0972794bfbba00c4909c8638130b99a983cc52022d262d6b7d145bb",
622
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/Cached.php": "58ed8181f08dd61076c0ae9ce176455d951de04b9b1b03260c593d009414e9757d9120ea9e94040ddc1e0867f8a6574dc55e3acf82f946100d03d4506c9f778b",
623
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/P1p1.php": "63b5f5a6c7061826799c2e3285884ac2108adb19ea246475b98fb68a26aebd694eeba56191fe15fbc1a9ecb9b85c139bf9e8b65b4456b8fb42652fcf29097fad",
624
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/P2.php": "4caf0b912ad4bd82f8c447fc25829177323ba7af6d2355a7709b8ef99a855b51158e5252a1739cf6e9ae72b780e415af0cf3d510bded3fbce3542c99cf057535",
625
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/P3.php": "5bd84bc8087c48e62e9d29451c0165376ae8486ad9288556c81e4cb897822cdaf95a2df6093f16e2a336839d0a4ea7c1535361bf041d8be0fddeb1eb245eae55",
626
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/Ge\/Precomp.php": "a58cbf2c93a75948b4576395ba1ebcef5a35b6dfb4625690e872010a44edd92939ba146b145cf40bc2cb6e45da0e19f169a45b575d813a70428f171459ee2d8c",
627
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/H.php": "0ce669e4f370acdbf6cf27d5a525b0a3a3bb7c794b8a2ccc7b2f3a3670fbb048a8493e3e6306a5f148204f50a5458d47ffe4a2705520e15631b02d45d39b0676",
628
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Curve25519\/README.md": "3f50765b54a3cf172c9cdaf2541a54273b811df61330af83883de5309103d6309a0900ecbae056f60aa831e438543c16c809fe183cc15c6a2f2bf15f6f910cf7",
629
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Ed25519.php": "89eada60bdd8739af528cd74b771a2ac04e36aa3e588549c7e8a82d2267a4df5eb4ef13c806185ac65bcd33fcba0f49a03cdbc03f143ffaa576ba6f4ab5efaa7",
630
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/HChaCha20.php": "e221d5f3c4818256a895cc05a8e68ae2b3cced7eaf4e425f3c373d59b2cec31fa7b498e5e42af7e374e70c3a176f966da3cccc4be97b646182a8bef2817986cd",
631
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/HSalsa20.php": "05e5376ceaa53ddb24971a43ded855892cf37fe0f03647660f573334ca79e61edafdd511c418cdb3d42e62298462e729c69b4dae3eb802c4749774b43d659536",
632
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Poly1305.php": "1bc3f6e6323d44ab76eca14cce61e7043ee98d8f7c50f29a5e29704c35adee345faaac767af588e1c6566f5732c1ec40ea815c51711056737460c9143adef1e8",
633
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Poly1305\/State.php": "9a69f92ff7c3e384cd57c0d5fddf9111d57abc9849acebb329ffd1ac4f53e539e1548140f4a430f628cb378d7fc980494307df13e4d1837b0af377bd7811c6d5",
634
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Ristretto255.php": "c4fcc5c22d8ece4e704c847ca01ce6edba7682fb2b9b91d74d664a204cd5955128c3bf8089a855312244f28c4ef6953927832ed989a03edf6eaec5c26df1722e",
635
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Salsa20.php": "8c2ad19b46f527ef9c091cbab17f64d36610745ef32f778e3911e1aa2a142e88c0f6e005ced046a678d66982d2e9ca48677f082697af3999cb62fecee4d800bb",
636
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/SecretStream\/State.php": "629c6f96a7bba323ddb8eb422e7048839c188560932cb4306b9f11ba8a2b15afdfc037fc14ce8725ed3efc72c26700cf6cd2ca4a85870fa885aad6b6d57a4a0c",
637
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/SipHash.php": "6f24cd7d32eb80c943461199a0937b0acdf01560542c54ca916fae6843c3dc5fa65d751380434508aa50501f7dfb6c227e9330996956c4a8c8b32b6ae55bebba",
638
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/Util.php": "fe12c7259ad5daa7eecd8e199c77f822e612333169878309cec5b5483a9bcc775261c344a31023c2741d53f37f05a0f6dc6289dc45c7d7b8ac7fedafd5458d57",
639
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/X25519.php": "ea1d665ec23534de7f18c4f48094de4463753baf8b9ba011e38b969873bbaaa32e6b90bbbd0597baed3687c28e37fe394c224a229d734671b7d7e03197d039f1",
640
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/XChaCha20.php": "56d827be22c68fe9a2cc01b9f5890846197c5831c3c0f129d9b8c522391b7d7391a217a2dc48a4bd78e81c3d2f3bd8187546d311f991148fdf43a8a67730c81e",
641
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core\/XSalsa20.php": "c0367d97622bfb654340a6a7948e8ca4ed399d106dd8b27169a9f5d9bc6532129548b4dabf9f12ffba654f490b8adfa07b0b76935bda15705560feb7c590a3bb",
642
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/BLAKE2b.php": "97cb339b44cc54299394b4fc27c8ab13d5a8d48aa4c8fce71733a27cea5d3226df4341bf9722fb4f4ba71c38f5491d677774245d75bd91a693269aaba0487036",
643
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/ChaCha20.php": "da693dd0be25c739b477673933d361ed4b2f83110ae98f7c6805af20789fb4379b4b7a4ae34aca588666cfbdf61c2dd5776f8a4b1ee0215dae64ea09c6479a10",
644
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/ChaCha20\/Ctx.php": "621194fbbe2eb42c04c9d94e45e3a0ebafdb4cd87195b924705f8c2a9e54c9dc52fa6dcb39967ea1dc4ceeb6f2d20659a1b0aced8035529376f6244ffaa96f07",
645
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/ChaCha20\/IetfCtx.php": "b4a0690f9af7ace9fb3f8c10ca78989573a1cd49d3309f9c0011501daa3c44f7b616868e417096076846b19502ddaaaacb7c85f9b5c8622c57e4882982e09a10",
646
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519.php": "fd10531c29a88f84f8b7de7c09a0e9e66472658827bcbdc55dcb1fba54f620b32dfe9359788e67abe4f6ffed3e4841e6b74939d7504188cfda243512a86c7eb4",
647
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Fe.php": "e6e5ce11b327d42167d51d2fa462ca6a54bf180229261af9ac1189fab30941148136ddabfff606dcf656985cb9da9bee93902f1863a84a3e5d42bfccbb0111d3",
648
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/Cached.php": "350f529a5a178921a2f40818a1668c3effdeac12b9b8aded2f57f1654343d0f7f535c780c5a271d9b7772969fff9381befcb85aaf676650c67b6e583d616c064",
649
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/P1p1.php": "fc8344d196cfa17fb61ab576b0a73f0ecbdfdf03de53d669cbf56bf10cf13eabd8c8a83d3eab7d9f9436b4dbb8d0785f9929c190059e0695579811405f3c840a",
650
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/P2.php": "6c4051bff3e25a7863fcfef3b9c1f028fa8b94d301e4de5dcb6654c629bc95f44978fdb697698375e3cfd1dfb9ae6a3c8dfcad0bd5138e51cd5d5315b5e5b788",
651
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/P3.php": "d6ee2e6bd34cba83a2025bd79e2d8a829d39f148c65ceee5a382662ef25b1c684552e0486ca29215f52d5d1e140176bdf6e2c40febd55970db55675b76d448e2",
652
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/Ge\/Precomp.php": "397b94e8292ad4f09cc37f1b08a7f364e12d6acb74f125ff0148c5562631f632a2ecc44db517cbd5ea61865e70732e6223a0c736b831c751df859a7d2afc4ae6",
653
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/H.php": "7bd14df9e3afbf8bc2ba27d5faf6ba72f17eed218cb7e89f4a458f500f6d9a60c52eaf5f1fd656d7de492246b0b0ac3d5904da319c5d85b754c64ce4b1f1b433",
654
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Curve25519\/README.md": "3f50765b54a3cf172c9cdaf2541a54273b811df61330af83883de5309103d6309a0900ecbae056f60aa831e438543c16c809fe183cc15c6a2f2bf15f6f910cf7",
655
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Ed25519.php": "30b970fe798803452a504ac453c70b5a2b51cf3094639dc58195b3c8e44fc37089c58bec2337d7f79ca60c91c4951af5dfa89e9dfbe3ae327084a806a6b8db7f",
656
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/HChaCha20.php": "d4fdd553cde5a1ff277805bbba85128e3ea59e4fc32eaacbc8502414148933c760ef6da06fd967bc594f9d22523c62e45ebd7cc9411ad4b76e2d76c0fc2c00c5",
657
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/HSalsa20.php": "8bbde85156bb88b6f0f14cab67840cabf1e1c456f9459edc145e09907161bd6fbea93fd37f121678064de6922102e78789cbfa3c2eddfcb40b93178fa3fbab6e",
658
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Int32.php": "325772c5cadd6953316e83afe2a04804041292f25cb16e6027ea230e20aebcdd819c937977918161eeb9c43187fc105be2824949c9d6059e9c0a39e0cbc42219",
659
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Int64.php": "8fde2b57266d78e8b03d8c3f89a1fbca3329bb6d0ed4526b3c6dbf5a0e92ef9d8e9e3697cd23b7eb5f7524fba7474cc5a2e06f1ba6faa04f7cb8729c985a5794",
660
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Poly1305.php": "f0cc2f5cf32a37ad6c3dbaff1a8a155ff334995eab78ab42f2e5bd950390babaee0c1588e3f17d4e73cf970b8e3c34f536096d7da23182f526b0eed704e3ecc8",
661
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Poly1305\/State.php": "8656ebf7aa0c2c7e8cf01546a261bf5e9f6c374eb5f40f8133bcb33e35bda2f19f47471b2ae6af6224df7ab9bf3886cc43b88049e8ddbe54b8dd129b28491129",
662
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Salsa20.php": "bbb3dc0a30030d9c5f5ef1ef63e36f9a067d67891185b9620ebee17a67bee31a7abc420abb7b82f38e913b5de54d235859f0e8f5f718d8f02316f4fb03e24b2a",
663
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/SecretStream\/State.php": "69d505517dbbdd2e77cf5aed72673edffa2aa008e70325db88877ba5673ac3ac070bc4c19cf13707932b0b4d71ee0a9b007e06a0f822292ec278a60def7cf511",
664
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/SipHash.php": "8c3c2d2e4c656ee6f7af729856cc4c79918ae2e09a167d6d0cb92f7dc9240c0bdaa36e65a167f5b63961d9f9ac4df2c19e50c848e5a6da5855566deb5b9ab8b4",
665
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/Util.php": "d6ff44eb1015687847600f8b7f6a80974f4de1cb80224ea7f733e908fd53ba2aa669b97d891fe89bf0bb8d358c15a2bbf0661a779e68a715cde0405455127eb4",
666
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/X25519.php": "9e2d803c100fc9a3749100dda30fabe25c6ec59382be64f9995b6505e1652d5b2762111f2243b69316abd942c88106fa5239adcae842971f22fedd8e3aedd954",
667
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/XChaCha20.php": "1d4ef660701da25af79c9d4af2f158e3f62afbc1e5c2aa062f64b970dd33378d5f67c9f0172991985ddd65a976759e09f4604ffdf6ae158bd8a98f4e97af851d",
668
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Core32\/XSalsa20.php": "ffcbccb7d8a1d0262c5e74cbc679022bbcf1acf9160599ce2b92f66e261996f0e93b419231fd41ca95852e09b7a892dd8e98101c3426d30cb294f869908ee21b",
669
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Crypto.php": "1af076765319483b5e0c2a3ed9d5a12133fd41b7172cd15073da3723200c41cdf077dbee04f1e4badc2b86ee5e23965dfd0e8f3af3f52b3b584ab2f775f64cf7",
670
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/Crypto32.php": "9fd3ecc6e6faec645f2c5166ca551cbb4ff8430664bdb46c383da399048de42ab505a05c709b6ed0de245402a1abd701f21398252f059003a59fd55bffd6399b",
671
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/File.php": "4f2a6c996bd3fe4a07e4e1d49d2790e68798add08c4887efb3d7bdc7beb5ec2c1601b8e77a0b40e570211f7d3b4e5a5f97471f60df8b31434487495677052640",
672
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/PHP52\/SplFixedArray.php": "2adc50710dd4bc2cc1138b741cde09f225f727f2177d006ce8ca82691de0336dc51b6c30384938eef1693ae92628460f8984aaacf336815dea092de4ed1521b5",
673
-        "providers\/Telnyx\/vendor\/paragonie\/sodium_compat\/src\/SodiumException.php": "705f6e9777db6be71970f7e218339e36d50023abf723446195cef782976d7431f815a90d1ed83e32ec527303057287f890215b4b0a9a8c992a13d111e8bfb947",
674
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/CHANGELOG.md": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
675
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/LICENSE": "8756122099aea86ddf6f176a480c0454f2be6dd278e475bd6be7d7ab3d572162f1bd44c9f623e52e53514cb15336be6e84a5eafc8e2a347b481ab5799ebd6e17",
676
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/README.md": "b552bcb37ad765a0aba888fe43d2e2f41b5bee6c90e734c365797e74dd0b8c4df017ae74dab2458edb410630299efd7b649438db57acd53fefb1723e233416f3",
677
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/VERSION": "294108697ec66acf16af2f9518c5999605a8585058ad25dc9303029fd890e6835b2fcda23fff2ad60058f8f6a8a19c945d998e4e228453d4946e395b9aa2055d",
678
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/build.php": "485d76b827a54d8455550e8a8f8d14862f9444381da251e66c2bb8ceaf2106a554c1cd339666b1260450749d0244d6b9ba0c6d0a2220ab2411aa4041fc83f8ad",
679
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/composer.json": "e05f4af7ceef33d82ed5704be36e1b9839236d13073d0e23ef77d33ce7ec303cc2cfc2ddcd25318f1a5295bbe3b61a13bc2fe72f55c226e2f072e2a0b1959481",
680
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/composer.lock": "2b8c24986c6cbd290c0ce53ac4f773836751aebfd65a2350fd07b4cf45292ce2667a54494fa098da13a385ce7a9e10a2ed55d20f7c8dd6817f93f33a6cc710fd",
681
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/data\/ca-certificates.crt": "659e8d36bcb65a7fdd299ee008fc4ecd42be87d8ae7d7d15828567b9be44b4ed8a316978f2f7d3d5d7e96a4da0b30bb8bdcfae5202ef099691daa796318a869e",
682
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/docker-compose.yml": "1fe4c651e406095f0ff1bfc196406d473184bf53cf80f7c67dc79f1aa94b26db74174e0e9bc47adc95eb2a5f6eb950255c4a5cf44ccb7029ba712df3be9e6384",
683
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/docker\/Dockerfile": "a63d1fabd8c19fef37b90922aa4bb21fbd1094635666cf2a3a4db47009888bfd3f1ad5c34c05184e2ccc8f581971f6dae91c1ff137730821422cd482c39e9390",
684
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/docker\/entrypoint.sh": "2bf3911c365a271fc52d17a0aac1687abf52e5286a5d52cd34367e18651dcfd6ef1f791b54105b7742f5d691564ddca3c05a9ba4ce8edfbc68fe919e0bdf6c1e",
685
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/examples\/example_webhook.php": "336b92a647e49d8c994c8e6dc6b26670f0a58cb57d4679d0ba7177fa1f56a84a628e5385dd4c1c25a1395b1d8499e54d34eb2c20f9742a2a2a3d0cb20c36be08",
686
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/examples\/simple_webhook.php": "ed299912ca9a55170796df76b25c5c92462660b065ef7eabf24bf7f552e75fe44512fc3fa977fae2a9dd5e9be1ea28100a456de926fd7f24c32152f577f8e46b",
687
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/examples\/verify_sms_demo.php": "042dee741d4fe90d78edcd0614df6a371cee77d1a95d34623b4e558ead69378c693a33d044f450ea204efd7253e7eeee1e5a4119708dfddbafeea358bc5408b0",
688
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/init.php": "82a207681a76c9b00d1a35fcfe64753cf286d9d0122366f8c1f3009ecd6c548369d2b65d5b4e03f20faa9502b967a3bdae30865e5bf8598eba630b5f9555542f",
689
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Address.php": "a01e1efcaab0209fa7cf32ed85722ff793b9c0f750daf7d3bcd0499037dea764f2a61defa54b4bbaf602f8d0f5f477fd4198e35d6d8b47b82fd13c7a7e70ad59",
690
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/AlphanumericSenderID.php": "c6f7d381cd9901af59d67c66fbe6ace0729c77ac2b2962ce41351ed076cb39c9049aeeb72ba0e3933ebce4ab8a936b86a7e21d30a1c07b2b08cad9da2abcda1e",
691
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/All.php": "5a6381d1492e2ebd1498fb4371b55c7e112ebf2c898e1861d7dfd2345db8c56df221795208a29b2a0e42295846fcf98f6a60fa8839df7e28fb66b9bde9226ce5",
692
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Create.php": "811f9227ecc5acb172e8e7120541227de0bc22cbf66a41490b743b3e49647a38889d5cfa5d64139b602572f0fcc0fbb96e3971c78801ed9acf7b50db2ab7499c",
693
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Delete.php": "e3cde9f67ab7281870c7399c4e76ff5807791b94b595567f56ee4ee494574e0f6f282a8d0c024c78c1709940198460f386ab8de6118a85de7d8a52feea0b0dd9",
694
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/NestedResource.php": "209aecf9e6abb679b4f1ec2b59b1ce363a73970f6d389829b77802cb88b7bb368506e4d0aad42f090b715b4d4a580fdbe5c8479c02227102b4d147d615fbdb8e",
695
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Request.php": "afcba7de3fa312bc9e532e43bdcab8fcc5ca8b532c6f7bec08f94a8d7b2849467266f98af029bd688a136ac24ab2b7f438ca2fc666395c589d578e9d0156053b",
696
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Retrieve.php": "6f29bd2711e3c6b586c2bf6d9805b986a5f76fb0cd8c98c63259cd9873eeacd679f9718dd333110966ec3bb772e2ad06da7b1586bb590180770bf300aef63c8f",
697
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiOperations\/Update.php": "1d353ac81bc74cd57c75f01da21d6c59e053813930a0eb0fa054417bc87b6a140f64393bc04ac312b8c16803bb4c3eabae278839973f772e3202df32828480c0",
698
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiRequestor.php": "deeca798d9ba058eced71d846bd22cac360cbb25bd1271db25cd0ebdb29b1af9ee863b362849035e8a9f6ee62bd49b8415cec97e1fc01e674ad6942ac987b6e0",
699
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiResource.php": "f093051a36277165763e1ee66594056cc266fdb89caec9ab9223ae6af9add8ea4a20e6e3ea6fff4e9625fcbb95f430686f1f89db36f981d7d54034d79bf397a4",
700
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ApiResponse.php": "0d292d053a85224f4ac839f54253decab0eec5ae9861ca95314e98cad0fec2d2f0a7e712a8ec433adb302b6702d69262c8866b20fd08d67b2d18571965bf6789",
701
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/AvailablePhoneNumber.php": "7c82ca4fa28264c4fdd910c71741270657e52cdbc760343339bbb7c1d5980d27b7af476f7e1bd431926d428dba685a6e34d250f9678ef0a4e3cd8c4b06289e55",
702
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Balance.php": "333bbe5f278ca247d8287c8da5cf3b3f6a96c896a82e3c3b54d01277e3cdc82dd5bbda2a1253fb473a29c49d3030b73b24eb8231cc34f85b0a43bd853682e000",
703
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/BillingGroup.php": "60d9fed23d1520237a50a707986709f3b700d42d049e4070a48fbb50f257a98eab779f45a15939af3d5bce811014c01abbcb86fa1b9ccc5b89d55f44c4b1a308",
704
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Call.php": "eec97591c5e7af2b057dac6e6498cbb2c1fee0439b1b7f31c2d879a5a0fdb5a3eb5ba3bb7e3c5a9195d9019e9df82c99a491ec52f15bec59b496435c0787d43e",
705
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/CallControlApplication.php": "fee499465ecfdd2d5aee0479d3770a80219a5837bed934e0930413e6dde740be21bcd965216c782e0765ba18fd71714ac69a5ee887497845ccc1bd7797d6cac4",
706
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Collection.php": "ba4afd20a921ae7c838a74bd9efcc4e468fc12ecae86b2222f97c9405d376a77533f55924bd1d577429825e746ac59142f6d4576f4d446cb3757cb36b65894fd",
707
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Conference.php": "ef9da126fc06537687947c8eea71fc34a53a7d44607d60bcaea7d8c7f55e76a94a9d7e0057f9abf7efb1f4f270680cba042112a127c2c487fe3c617c5102be29",
708
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Connection.php": "c5f43a62ff80b2e91556dc63ad2f78cd83b4fcae4a7a28ede36388177591fbfc6c20b244f6fd4e540cd9401e34b04946bf422eedfce25316e61c89f15de97665",
709
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/CredentialConnection.php": "fe9d8b7b34a24f5b3b83d6a2597359fedce871db3a526124832d4bf4129e7515366ae16517b8dae259305ae69f95655aaa8b4710a9addc23fffee0e70b70b74c",
710
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ErrorObject.php": "cf83764f49da72bbc816c8741644e15b9a74481145c6c0c11c390221ee4c7ae485cfc09d77db24a48b0756b69c85570242bb2b903c39ca699e636a299ec4dd31",
711
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Event.php": "4e4ccaef81755432630c46881a958928c8b633ef1dea76d05f05711da17f68bf6e5b7b77395abf297b3ab128c065da7b4ed38d1be3a45306eb6d7a1080e72994",
712
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/ApiConnectionException.php": "b2a920958f3e1664a6ea5c5f32c73f9914b3f59d8a927c4e920d385ce87a6676475823729f203b09f5530da667f52e3dc3d4471fa498277270ee9360d0797b5f",
713
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/ApiErrorException.php": "b775efde92c04d1a53dd3f948f2efd92baf1f1dcb5092ed0863f37bb71fe03052562fa89349b1030f3d27a0dffa974ee47c9a3655b40a3941b05e721e7fe97c9",
714
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/AuthenticationException.php": "f8154528a04642cdd24f3de876b1a38d6f97e357d36badafd39e596ca739df7fb77f4259de1efde8bc300f126b20f6e242db4c1e3a25503565df579b62676ec7",
715
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/BadMethodCallException.php": "5e6df108c1df11bc1275948d96829f0ca6ff039126934ec57dbeee74913af00a64e6a9f2b58f42bf74aebeb94596c45cbcf66e5a4afa8924b238ca63d424f452",
716
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/ExceptionInterface.php": "77d5904b79a9a5b265ef121cd19d91b952f631ac7436e7896bb0786d9afc0b7ffe54c7ea901091baefa0154b91abfbb3f9f3a7fcfea4053f27cb44be2d7cb23f",
717
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/InvalidArgumentException.php": "f2872cf684dba5abd50bf876971e32364a23c9259c1e85a01575348614274453d00cc655b01c2dbf2c78c88f4a6143cb486c786dd1664204dc7676a64a9cac4c",
718
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/InvalidRequestException.php": "fa310ff5d5ea8f02f731089c27e6903d9b0e692a3faf272efd19ae4f1075a2a1219d167730b21cac6a30e705816c4230e2511fdda981fb47714f4d81606ffcdd",
719
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/PermissionException.php": "4cc209df863027760738530c5c01962702970a73ac7f11be232234413376dfd34db049f4e49305c8a15ee1f016b26f1c128312930e10cab174e80d6ba20cb12f",
720
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/RateLimitException.php": "c37157b02475d2a3940dc7d007b84cc3c86cab88b42e841a392e3ce4919e637c9b59bc7b33ad3ed8b4b32e74dddafd8e61a6f30d60029b8b1ecc82b8faad4833",
721
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/SignatureVerificationException.php": "3aaa44cc52efcc4caeaee624c070e8ec87b665decbdf00d8aef04ac857358028e4bc0495c4a86c504f3ccc6d753413c5ed685816e3b80851026bf2034514cb59",
722
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/UnexpectedValueException.php": "33504e45241779bae5e9c1d6ace82a75d545e6f7ae76f7d7f071fa4bbab13b2c23d11e59230da3c242b548ee7b5386bf4795e0d06d1719812348d1f9efb0c1cb",
723
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Exception\/UnknownApiErrorException.php": "cf5cc44f46c03d9d0de656e2ae61d7b077d123a4b6666a4b0f57fafa2033e072ceb5b14d6a47987bb14e0acd48ae00b39d4d6ac1849fadc879bcc43ed1acb44a",
724
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/FQDN.php": "b7d44de17cfcd207ac1fe6aada6c24871a98dadafc4cddebe28b135c6e507634608e1b6c7052a40cc750f6515fe19c2de29864d4b9551e7002fd800cc6cc05fa",
725
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/FQDNConnection.php": "527d18ad480447e4d79e567e7a91796ca31bb778f10011aa9fafafba6e769d387fdfbc306a6f1ba58e583bc7c37a9a66f1961494d3639dcdcd8912efcd0e6a55",
726
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Fax.php": "fd8af5f711fb5341e2b86a7fc66a49707bd31efabd2cd63a1d5153c24462f07341d6af618b7e82ff1faeb9bdc203f62b6dd5570d74754e052300d0d7edd0424b",
727
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/FaxApplication.php": "f489a9e161565a6e7f55a4d90fc05bdc8147a8947788a757a2b5464059ff2c49e61fa26b6d1f0b43fbf9ce8d0c08328e276442ab4d2d100e7ef34e9b2e0860c0",
728
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/HttpClient\/ClientInterface.php": "da6ee5de3e8aec8ac144511858cb3bec53bfd2aa0b5ff27eb43c7f72dcdbfb1646da223cbd861db7595db904007ff4c8d6a010122547a98bc1d2c07139328a80",
729
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/HttpClient\/CurlClient.php": "dfcbf2f40053699b94de74defc4a57461c2e07280976a377cf4ec3600e6279fa9cc434060b0291c7e10a634647e1a86e67cbaaadc49783eb532681ca25256a42",
730
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/IP.php": "624821d6dcc5d30a1a08368bacba88cc7ce8b768bb3315b3f8013606e303fa8940c13da8ece0c67a43329a0cfd86d8bd09682963eb54138f4253eb2f159c7560",
731
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/IPConnection.php": "01239dc2096fbe207ce1a5a58dad8d25795b9a8a81dbdd4290730009f2fafee76d74335aa951fb7b54e930e4e9530a0566daa9ef7e99ea60a50b8daf956f11dd",
732
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/InboundChannel.php": "c37478b08abc62ca491806db6e2814c4a28a11357fef873f6aff8867e179dc8d89817ee3db3fdaa84150111cbeb426ad0282dfd7550eb815dca100843f542178",
733
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Message.php": "18acf4bf51ec27d330df16216924c65a45db59895b610a3c803ef1d09beb7d96d20753b4ec16be06ed40f2886ad46bb3d866f14a87021484ede5d33ac1a93c4a",
734
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MessagingHostedNumberOrder.php": "ecee6ab7a46ebf03b93870017aba4ce00c10ee36342a6d3ead209078aacf4ebcb798ae129535fb15af860355b52ea72ae6bcbf0e5261a9d66224e43560858227",
735
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MessagingPhoneNumber.php": "2a2caa5e44efc5de92ef9b0f8ed0a68af1ab2c80932f4cd7fe79caa87ca1e146af3bd0e1d16d977738da2a3af1fb3cef77081c32a0dac50bbe8ef54a108efbc9",
736
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MessagingProfile.php": "7a561dcea7b45a4ad4c3dbfc6baa766f011de2b2dee9a23e512689b374017b05f4fcc5c3510f19111a9d8484ed93a5e05d3dc01f35d75e356f475a894596dc49",
737
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/MobileOperatorNetwork.php": "d4436bfd9a628713889a37846829763909033339a086b6983eac792e9af42c0df2a8bcbd688c5c54a196d1fcb3d22aae7b45e9e18c015592d979e9a924c42ffd",
738
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberLookup.php": "cac3b5f1ea0ca30f9121849a8aa52ed2e18b7776c4f1d552dca4c3536e0d4eb96af45267bb687319a9ec715972bc95a19c7dda54c33a2701e20cff9564dfcee5",
739
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberOrder.php": "52067d9999c150fbefcbba9969b308bb6118eabe25bd08f30cc4978cdebd68fce4479e53d71ce29632133e8c69bb4ce9276301f5a36ea95bd77d29fd057f5d46",
740
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberOrderDocument.php": "007830f9c03979a7811a4e0dd0c74c4b2b6d05e05b56b9d6ceb5a6e55167eb95b2546087ae17328715e01d486c0e58e396bc41816b44866391b98d48ca246d03",
741
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/NumberReservation.php": "988c853084f13e0d86445d6638517f84ef3d90c3f618c2c85c0bd8ab790012c3986a1a3eb3e00fef7759d04a6a1957bd9521bb8da6ade8c05fd2e02a8040f6a3",
742
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/OtaUpdate.php": "3c9579c6ac1ef6f31ff572fa3fb7562b3618182cb36eab3f406d8fbe6fc7b1d35a996e47923074428583ee3653aaff3792f9fdc47eabe1627f1a85722fd9dbf0",
743
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/OutboundVoiceProfile.php": "d0c5985f6f629904f4c95b892e329f280f7e0e13b8794d1950e216ef4c28ede7b94baa99f18803ff6f60b09d6178ad39fe5d3c182e984c2b4b57e9732991597e",
744
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PhoneNumber.php": "8106765a769bf3f6190783917aa923f3f7690af5b7bf971e3dbe73ee5f227b27531a553cff9cc425ccfc7cf2ac52bcfc685f3d3b178875f8fa837a5de99a077c",
745
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PhoneNumber\/Messaging.php": "d0aded1cbbd4c6108b0fc6e6773dbd03040af54c967f0a8aa9b2523db769317182889c882e6efe6fb0e187ac3f2919563aa6a937c77f4c1ff94e5bbc31f4d9d6",
746
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PhoneNumber\/Voice.php": "e7e8184351cb186fee77019e88600dcb15da0435161d1878799433686e012167ab3347d7f02efb5cd511b5d02cd7b6547453f6ecaab623ed23fac7c91b0a7333",
747
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PortingOrder.php": "ad9a683aab02c8817796e62131fa9cad6f3490d3afe231b5718b3b4f0689a535543362a88333ab808c36e9c41bfc8b7b6178be7fbd5b12f38b6d806053726997",
748
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/PortingPhoneNumber.php": "ff2e1e98371b6a7b0cc5265d1ab82f053d97711a72633a7d3911a4211dacf75c08083d6629aa4fc028643c0dc929d3ab56132f6f21808b875a9ce679e56fe055",
749
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Portout.php": "71de0eb22350f649e5023b2c4a374b3d10a4beb0f8066d67482c62f68a39219d9cda4bd95d91e1df2fc215479f45b1ab79bfc0ccc2d39267d2f268356ae83ec8",
750
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/RegulatoryRequirement.php": "0658d49bc2c20a9a16ac72ea01b5306eda422d81747529c3373333facb5ce1940252387aa498d2957dec62f0eeaa8aac3979ffd84ca72308e660a1a0708796d4",
751
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/RequestTelemetry.php": "cefdb55dce61e5f276bd49f6b49e57c78085338537e56cce6fea5a81cd1d2235f1eaa78be326cbd513117be88a046177afb628659088b66ce423799995c53709",
752
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/ShortCode.php": "4abc882d0dbc72becbff07212d17b8e1383b0efb43818a7eab983fd2a08c3f591a4f4ba2f185003fab0622a43329c969d2fcc80b23cb94410007a0879309ad49",
753
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/SimCard.php": "46289711eda27b37931b0d9f7e9624c114ef9c1e997ea88055dfdf6fe6dfaf7f9169b9a67cbfe48100dc4df2b73ba4d27328b0ca3ff0af3655789535ec3c0b26",
754
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/TelephonyCredential.php": "497a3dde2d7fcf8bf57b502c71daa5e166010daae45e30e1db7ebacb3a37028fc70c7cdcf39a356dd32f845664e8e9723a366fa69610c8f9bd31fa59b3300624",
755
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Telnyx.php": "f5ecf9589eaf7db991051de8482d582b36edc387b8a7ca48c80a419c1a99e1393d7f099aa4ad3e87adb4706ab62c8714dc843c9a8ce77d6fe6ea5ab929d9a882",
756
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/TelnyxObject.php": "0f45c91559ef686a3eb4ce3777ab7d43ba288b380ffd1031cc3c562138410d3582c251e2d986e8a84a2c189257ed4307500e3fa0d662a48a30b28a9622ae8ad2",
757
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/AutoPagingIterator.php": "d03ac3841bb553d847be9ea73ab9debd8c1f2c829b0d38ac4416a121ac535a5ece2ecd9943d89e720cb5abb1c907ca9b96df899a561c190ccd6843bde785114b",
758
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/CaseInsensitiveArray.php": "d5bcc37aeab4fcbbe0b9f4a9057a5654f6080ed899ae54f8ef18bfc907f244071a6693386dd306caceb6bf338883a13c7972574ac5d700aa00e22ec363932cd6",
759
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/DefaultLogger.php": "50a69f9f6ad628e489a05fdad0df811c926c957c301adb0b4b906dcce9733a0598f6c2eb126865c54a0100131dc4230a834b1e98275237ce8e90bff2e96cd0fb",
760
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/LoggerInterface.php": "8d2dc2c59af5e625eaeef0b85b09f78a42e533b62fee84717d67a4c706fbacd94674f439d3ac60984c0a3947b7d2f5a8ccfb64e071c41d063b8298f57578f88c",
761
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/ObjectTypes.php": "99ce4f7d4d4d9d43e24f3124a7c21b9540267aa160c780efe69d6559843a12948f3790b179db66282b0adda384309a793636d71aeb97d9aab0a62dccfbe2b51b",
762
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/RandomGenerator.php": "292c880420b28390e3d734c6343acd48f322db0c474f80430402916de1dcbf8e988b3d2753a7c18e763e632f474284b213ccc8e8fe4e52f00569e72728dcccb4",
763
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/RequestOptions.php": "00b6d4890b5a38f42f13ffdca556bbf1377c05c8a79ad2d6d0b69b7e27deb70252c15088458da4bbd56e7832cc6b2828e261241661dc344727e2bfb170465de2",
764
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/Set.php": "9cfa1c1bc6c012e8a7a797ba8a7893382eeeb234da73f93594a159f78b9858c984dec1e42da5a6cdb240f00d27d250e3fd6a7842d40c23513661201a148a6c5e",
765
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Util\/Util.php": "4556fc8b785486adfb60ea8001296ad0ae7b13d785f92d545324b557fc4aad85a69ec19dbca27dd868050d64670e4e2be2e3a4f50e4aaac609b0089c0e9e2749",
766
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Verification.php": "b63d4f9d717ba204dcedd1c3315db3300567fe09563faed0e4b8f1415171e43e0068fb06ebb2f42c808602248f623f5773414a1612539a873070f461398be650",
767
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/VerifyProfile.php": "fbdf0818dbe1fdcd6bf13720f21ab6552a3ee7930c80a9adc44c3863ebb3df990b18adc8beee6770f4fca9bcda0d514a689d051c129d871eca48f2c0eccd7649",
768
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/VerifyVerification.php": "f2883946ac990666dfa62e07dad649ae0c9de75d5682857cd22419fda8926d45d504ce4fbf38896a1cbf25323a604a818d3b89f05baf58d91cef497c54d981e7",
769
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/Webhook.php": "b451d90496fcad105eb4f61d5716b93878405315742c09d7c4be96c6b9c0427e35c03c1a664ab2f30f1288566b45117f87b069a3ce96d64111ef6a1ef289ac9e",
770
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/lib\/WebhookSignature.php": "ad990cd80d771718468e39aab1b06809a0efb9bb47f5ea4d42a649dbe481f5929fcbd502da6140f1438920e96ce2e4af82d9cfd810b0ddd0eaea391599685c0d",
771
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/phpunit.no_autoload.xml": "06ad2f4fe0a292902757629f5605509f32a0d1dca527550619c98a61519d83fc70f3c886b12f5e5734b1031186fd9c7fed6fba813cd816b0f07d36c2a6bf11e4",
772
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/phpunit.xml": "82ac037adc20f2aa76682878094e8bffbfe31782dc6a94e2987bac5546e3ffec90577d03715f4ce481cc977685eec9e4109a61b4b46bc19351c2cad555d7cadf",
773
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/TelnyxMock.php": "e8e93ca1114530cb7e9cad46eb20e32072934496d515a9391ce8093773450dd60f3288f9d3ba46533a0f650fe67b508d5e54bbfc6e1642443d1fc043b88eaaeb",
774
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/TestCase.php": "9945df738b56e344648cc00d3d4b94345c15d8749ce511b5095a87d5e52aed35d8e3c773276d9dde9d9fa04eada784a55e4876ebf70a198ba719c8e94c8c32d8",
775
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/AddressTest.php": "dd980e7890ad3dc1d12858f2d241a461689a34892bd780a8db034e620c23d01587996042c2c12d82333b2072bfcca6585afb06213694b7415b0b13d3084b83f5",
776
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/AllTest.php": "6031bc6fa9e899f06af9465468fb9e15bf5a9a7c1051fb52fbd383ea879842e72ba4b5347d07566182c632b5f66d5f2d4bdf73c1368a3581c6010330bff91ec9",
777
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/CreateTest.php": "c94c7e854a40716aec0e257c4d7fa279c3e941d64a37e167d4885dae5a0e22a513c8f3b018c436eff90ee045432c5e34b96aeb7d879380e9386c2bc177b94f39",
778
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/DeleteTest.php": "02ea2d3adfd1d83770f10dc42cc2c12c28079ca80933fbe02219ea79fe7eb6958d2b1d76cb7a0bfee9e308c01efb1eff61901e22d192e15e89ae67f7edcabe5e",
779
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/RequestTest.php": "f6e158958616f0637f827b94cce168e873e0d3be09e4ec27165f984af3d89c0be4d5d5cd3ed66df5b6237bf183003a0de1c652f599827fd01a2ee7ad47d5fd61",
780
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/RetrieveTest.php": "b26b8f61eb3cb893ce4ff9517817295fe9b727dd570b1cf79ace36e16902e0ab9f460d6b65342afa28c59236b59ec0ba0809e1cee673f69ea26489fdbf5f4f42",
781
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiOperations\/UpdateTest.php": "6aafed3640a1173822ac9a26c002168eeef552f9b681fab9ec4f191df4f988a920d8c290b2f875c02596ef613273ed003e4b5a6bb6e0bc2760f54ffff445cdd1",
782
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiRequestorTest.php": "5a1234c4a1e4107aaf970bf87f0fdb1420979dd575a548e589b046cd7feea4dc914f25bf15474fe5bcd9773c94184b610d06b309d48639964a78e6137078cb5a",
783
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiResourceTest.php": "05562966c7ecea541b0ae95f67a11d9e2b86e45439b436b319e252d5998e0eb7a6c9b677e233572fc616caee856d9764b56feed80fd07cc1bec0d861490753b4",
784
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ApiResponseTest.php": "6f8d458b49e34df5c0634276659fd441e4140fb4dade92b384230e4e2b897e0da6d0e82c373b1eca98770dc3396ffc8b924672ce2141426706c624d00ffc7af9",
785
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/AvailablePhoneNumberTest.php": "354326429958fdd199df78d11bbc582a0988018b8f907d93808cbd53243f50332482c0603bf4ff12db2a8977ffe7e663ea9d6e8cb5f485aece0d46ae8942833d",
786
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/BalanceTest.php": "8f866f88a8a59754e2fce7d5fe2a0bf50399fd21711cef171873a45308ff96f929b23163495c273e96c9894b7ea39ee5149c45e764fa0de3b51807a329c674c6",
787
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/BillingGroupTest.php": "4333c81ee3ac767fa600095d95f324286d289c7e105ab251f635d9a942e75c418bde60f96c5954ae29dc152ee5fe7679bc5a8b67452f5fa1f59a411dc4854c69",
788
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CallControlApplicationTest.php": "2bb4f83cdf82457840352c5beaaed8963aba1dcb59711e310d5aaed0d35429730796b412f1aa4e85d5be5a2288ebdd12fc2be9ad75549506d1a613d604d20749",
789
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CallTest.php": "50f830a3a3c28953ec53c244d22381910307513ba18b7199d5e7bffc5747863e4da975fa972114b2f8a81d0c24afb2f72df8315010febd8d606d086d79d82165",
790
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CollectionTest.php": "9e742f72d8a223e64bf1a25362f9a28356c0b55037811510692880a359ee5e39266d9e76aa0832de39530e26798806929fb9ab9795a04651ff316f609e2211f8",
791
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ConferenceTest.php": "4e8ab0baaf21da65e3942b0d98caff11b7a30c24bae10ba546b82f7031d7a85b9d88087f9ac8172e69546eb7635bc1cf8f39b509017b82116e0e13b557bc1f7e",
792
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ConnectionTest.php": "429f80316a563f45783c87db6b6d3dd1564190b5c6a259f254e91ad8b71b2aa5e6ed40b9cf1a98632b7c89b66441e07f0285d434c78dd9729c032c7a4891d4ee",
793
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/CredentialConnectionTest.php": "a1c37f36e418debb034faa2b7df5095eee175ac8801baed517089622123dcc4af642448aecde7aa8b19cf67629de087e4995ec816d791b5007923ee614590c1c",
794
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ErrorObjectTest.php": "97344e9d24c204ae429b856d0b32299de4380ec52e9cfbdef6090add25355d268e3dd3ec35ae7c5e0893f5bb204624930d1a856932243180bb71b40e5a1dc08f",
795
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/EventTest.php": "5152c008cb3de14a47586eeaf3ef778629b2beef87fe154a2c40c337c3f918d664c0ea44d8339e22846fedc696fe6b98f0bb0b557d3f88a3ac62990445a55ec5",
796
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Exception\/ApiErrorExceptionTest.php": "7d54379e1ab9f7d6bddb721ea1c284a8d023674e24e99d115f388ae367250089e10b5962e2bd091e3ebbedd0cc83bb4f821eb0a986ae11487e341569ef7f5c6e",
797
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Exception\/InvalidRequestExceptionTest.php": "a7da1818af1dfb3eaade1e1a122a8a3224e03a557396e11528af75b13cfae07764f82a282a3161d514358b4c55312193c73b5a8900fd70463fe0a66b448cc9f8",
798
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Exception\/SignatureVerificationExceptionTest.php": "1bb0fd1563a5c91b78b02e4f66f3cf0288986f546a0805830e0d4ad1ac449549930558caf86c06cdc578279323c43e4739747961065d5ddfa198dbbcd9540599",
799
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FQDNConnectionTest.php": "0af10bfb2398682865c4ee72cfb34425fe73b0fd20c86b51c61c4cf72f8c4d39a4ecfa21e4ae2e07a67fdf956057549f0c8c4f77e27e65dc1b75dae8b9b849c9",
800
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FQDNTest.php": "625370468fb338819fb823fbd38656799a8750f5093eebf75c02cfb592969a8635a442ec2febfe07705a5d6feea362b7644c25c67ae653a245bdf55fc178a2ed",
801
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FaxApplicationTest.php": "64a60460c62983cb0afc2c76880628e16270f14b0b761a8d62766cbe4c0fb33dfc7bd93ae0cb62de25a8f2b3e1994826fcbfe300ea37353f398c4cc8ed7dd62b",
802
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/FaxTest.php": "a920c8ac18021bedbbc4972109afb0cd0afc16e5d86df2fffa2f8e0bdf837e5684124f926f01daf0bae439473022899498441a770ad8cc52479da3d012f1ea1f",
803
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/HttpClient\/CurlClientTest.php": "cff15215b95a804e4ee233df60671c5c1e9270f621025f6ea7cd5a0bdbb55175caa6c43c62e176300bde05c9ee90d84efda0dcdf0d0b5dda4dab2a47d1a669b7",
804
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/IPConnectionTest.php": "6e034e287616ac89e5059d337c682e3fde010130f4403dc76fe4efa12742c40dac114ddc1aaf7ce9e553c597d9ac27170419c5e33fb1439c31c6b585953ff1a4",
805
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/IPTest.php": "7ff33e91d1c7b8bdbef1ca1f5e373150a05f709e524d5a62b000b5c8b8d697ce42306ea8df917305d9ef2a4ea19f797ca28e2f8d0d5f9e3e31c4ebe5eab55ee9",
806
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/InboundChannelTest.php": "c430f6df3eb5add5bda2342e4b4a3acd77b33d74758516782ee0a045d75e7387aaccf36017fdaef18d71cf8865a28faaa0cf07a4f31c9876858719d84d479657",
807
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessageTest.php": "08ae5ad7b98362fa7c1478254f851078ef7e9a223c74f3fc57619d2b9c255259edefefc400e261cceafce7072fa7457b8c1cb4dc8dda29b51e432f6d274a8c3a",
808
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessagingHostedNumberOrderTest.php": "f8f8ac7271fb01b07815e2a92d7a0974e4320de63942eadc12df307c9458a7cbda7ddae505a731c491e4aa6bcdda7bec04786890df80dd9acd422593f2a02c0e",
809
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessagingPhoneNumberTest.php": "7827d12be3191d1329168c6b277899b81df17aa18b775be538b9b29ec9a90868969c05cf61d53715c42105b92cc37977270c1a7b78bee3d13214d8ece51172f2",
810
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MessagingProfileTest.php": "0949c56ac67ee6f87854959635dbd003391e497325305692784905987d114b399e4c648252f314bc1147e385daf4e60198cbfd6aa940a6cb24992b8cb5abc24e",
811
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/MobileOperatorNetworkTest.php": "6cdaa23aa8cd0a0e9cc43b6f17c86d9c1f7793f7eb30b774f4a8ae9754488e59e0c180823c31d062abaa356578a8718c65f367588c61015e5e36f9f98e7a5cbe",
812
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberLookupTest.php": "e03a73e589abd73cf52a637dd7d273dd2477533b66bcb75685552b77b47f7b58116c4637477da7f9ccb36a408909d91d3f0d3079396aca9bee996b862f358499",
813
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberOrderDocumentTest.php": "06f3e8f8e8dcf5d8c96f25a6f1888d59e9433654ff060701bcc5cb9f54b07357bb3606ac17af3e3913033fb639358df85c6d5c55bff114407168333d7d49cbec",
814
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberOrderTest.php": "176ca2e94df05262e8a43f14e112fb62108ce886bd90a690e8b907881c696e35bd223f08a4960fb58ebebd20cd42bd4217ffa14132e53ddac260926c6d7e8842",
815
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/NumberReservationTest.php": "11742f7449c279908848fd493817731f3f1343895e16d3426a7a7f9fc3d4cc27e275a858e16d7efb8e9c18d32de1ffffc92929e8e3ba277157ab7304c3023c86",
816
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/OtaUpdateTest.php": "14830affab4936804afdd723714f2dc76c520fc2fd6e4d36d7bb255ef566836eafb6b29c18c5adb8785eed39f4bab030e3cd1aab1ef0293d9660b38a10fd6a45",
817
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/OutboundVoiceProfileTest.php": "e49828087e2114fb11569db7387a0acb7cce8bdb0cd655b280b567445ba2dbf16f8b66a88369876e7a2530fb282bf5a04be702719adf4ace871c2b6df8fa5edf",
818
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PhoneNumber\/MessagingTest.php": "b3c5665f4661624f58f02b814ab1edbee5ceb8c26643bd356b486f049dbb498a44da0af43daf200890c79acad16d51c169d7aa1a2ad4befe074b0ac539ebe3c0",
819
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PhoneNumber\/VoiceTest.php": "af08b444289d0194437c414916a8ec9285b98413d78e74d1c832b9b45583f9037832a538751628b5dc86b5a13c40c63e9dd360b719501762e8e868fcaa6fb215",
820
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PhoneNumberTest.php": "7a07f41165e45e5fab268b0e01523c2f67f0ad146965c401856582c4b4a3f63e53324585b1785b41cbeb637d8e61e26e2bfdb57feaf6c6c04cc33be8e4864df8",
821
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PortingOrderTest.php": "48d2ed4bb9354c772eef6484a0c9a195487c39f26bee3d143ddf64ae7da15e42e5f280a3e26eaa280940230fdee52ea09b7e5320823d4baefa73eec4490537ad",
822
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PortingPhoneNumberTest.php": "476748b7e467c4f5a648c394eb19dbf297aebc2c16357c946dbc4f363241639dd1001985a7bb21166d5bc77bff1e31edce6e379dbda10f04406377dafcae1bd5",
823
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/PortoutTest.php": "cd262d5eae7c9ef9ba8c76856ef2d4f604484e6bf8646e9ad5231e89f5d45c8176a8ac33a757c53e4be8e2c98e6bb750c6041aefe8b2a589ac1e70a2db4493b2",
824
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/RegulatoryRequirementTest.php": "daa2836606e7c3f34fa122045e982e42f5da86b46f367ddcd7fe9b12e2a3fe5d472d4f38403d4b63aa0c58473d3b5901b8dd49b93a56fa3e76a0bdcf88ebade0",
825
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/RequestTelemetryTest.php": "61190b3601f7c2c72f55e9b1634cfaf11ca53231cf4b5f854ab14859b97f5dc0f07f6c95b8f7c3516ed253e13768b7d4ed9c1d15d0772fd1850eb894f5821152",
826
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/ShortCodeTest.php": "f2e867e0b75d8334ccce51f7bdce842b350e7028319e8d388e0512b5e119585952a54ea79762010f12de8ffcd1c440638ba5300ddbe59adfdcefc712d8e079ac",
827
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/SimCardTest.php": "7000edb2f9b739bdbd44fceeee2e4a16c708efb22c7e38483569d5416f3c107bcecdc759e2e6108553193ba99acc542f5bf3bc353ee1428593a81b80d89ad7c8",
828
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelephonyCredentialTest.php": "1f65bad536cd49b2df684db54533b9799856b32464b80700bed5008c9379c414f756d075ab8e231d83f5bd9c1729dba064a5ab5c7e515ca5c32e85698e2036ad",
829
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelnyxObjectTest.php": "6214f2c38865c7a183f6a3fd64bc79e7f04963bd726fc124a87b65412075fd236e00cb5f5ed514a3ca2847faec77f4e7a14c59e8906478543daea9c4ddecb7b7",
830
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelnyxTelemetryTest.php": "ced938d8d20bdcd0d465155e1bd3ffbaec8ba96a6392c42dbec27a1d10a04da17b90fd3b91322c94b54fcd5a974528e6f10d081ca9b1915a8c8166e0727ceb31",
831
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/TelnyxTest.php": "d88d70053ebb64905acccf7e3cf651ea40c9155130e351d56135c96ada96263311faeabc83d4cef1e72387302ea4a11edf338c3744093d9828e056351eefe11a",
832
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/CaseInsensitiveArrayTest.php": "671262198a48a16dc2ddb7ecf1c7fd309241db9c74c11072d86cbd2f56403973e4bb17ca5bc6c489bddf46cc391098dd6b666b134fded9430c211c2a3193fc58",
833
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/DefaultLoggerTest.php": "39942a071430588bf6c089f5d0c97596b3b46b5b7a2b45d900cc41670dcf4bcf0d34e37895e494f0c89242e52d11d8a62f419650407c26ed91b43ea18c816e9e",
834
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/ObjectTypesTest.php": "2d697994485e6c8f9084f9155a5a5b753261bcd2afcc9dfc5760daa5d4196b7c5baee49b264142a705ca7dd6c5d2cde227db3c1f860173aee6769299db95cd83",
835
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/RequestOptionsTest.php": "86d628c4b19e4b7d057cac471219603643b6405e83745535b6c5f743fe84d5cf918a273f9e8e22c5eded36cc20ce49453e90c0ae05a9ed437059ddc287ccb5f7",
836
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/SetTest.php": "c91cbf6d983f16e033eec154e56705b1d942243371df25d5cec7cb375a359faf29fec0c87fa5f3e4d7aad512d7e757361cf409e60d643fff7fa8fef72d9ff172",
837
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/Util\/UtilTest.php": "10f13d306d3ac2211b67e759a6e1fbbbdcbc1cb791db4531ac799a8f84be67b3ab43cc85498b786b0630510324bf5039ac7ed39e2252f607f7937e802f9b578d",
838
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/VerificationTest.php": "8ea7985bfc5075c0e5d3a8b0b703af578479e481d769a0e8659d4b0996314aae15de36cc7022e087c0625c5976255aae323f9ac141e9e4fef3939a23fda6d260",
839
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/VerifyProfileTest.php": "c0986530c0ddd14e2227cbf9ceb0614aeec3c3b2dc37b5bce0de0d174ebd047f61fa28ba0787b4de1fd3efb5d77d5924e36ebf6fbba09711d0237f520365e8fc",
840
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/api_resources\/WebhookTest.php": "7e06c31d714348c6c9a6cf14c4a21a1f593287fe61e41630a6d766f15cf2595dccb1cd92981578cc205f6c89839a07c7c845efca2b44521d0aa36c0be9e444f7",
841
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/bootstrap.no_autoload.php": "cb002f7c8f77834b6414db6535f083bcd227ee6085363fa3cb0f66b55226680a45c8562fd8458249868465957b2aeae134b3379f8ee2ed22c96425475e9c0af1",
842
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/bootstrap.php": "50e143ed68aceb91d3e119d5a31521e76bfe9876bd780c90ac83afb7ca4f32be48ff81c33c134109eafe1d22f35e0957a9a834966b8853df99dc1df04795adf4",
843
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/data\/test.png": "6ad523f5b65487369d305613366b9f68dcdeee225291766e3b25faf45439ca069f614030c08ca54c714fdbf7a944fac489b1515a8bf9e0d3191e1bcbbfe6a9df",
844
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/tests\/openapi\/README.md": "0c54fffd5b7a5f393358864ff9e3bd3793075d6060cc1336603b2455d60f16d160ffd47b52bca6834acf0d9713855b386f69580099a3dcc131e8d5d617975ff2",
845
-        "providers\/Telnyx\/vendor\/telnyx\/telnyx-php\/update_certs.php": "6a7fd896832dbc4c039fc907c74f25fad01f26882809d1ed0bef2870ba7db5d5930311208e2864190209862a077e4397dabcc1760ef2ec7e29127868016fc0d8",
846
-        "providers\/Twilio\/readme.txt": "879f75eaefe03b56788a884a5cb031533b33a94acd816b9e3e51a9cf0db826de700062955fc45d9561bd4c69f71178e2976f702e801fc06c3c076494c55c8bcb",
847
-        "templates\/content\/index.php": "63d6e27dee39188b80cef2b095db84791e02af0526b80d41bd37845386714f9f82cc9dafaf97fa355b927ab9b74527199ec70604480e09feb10a2b076e313b5a",
848
-        "templates\/index.php": "15ea019ef66fa303773941fa9ca673e472e9521b3f9fdb9052870e6f0596ca3939b247c8924ec0d67e0f3fee6e612e2c447a1297cf23cb5b6144e58a6197d65e",
849
-        "templates\/navigation\/index.php": "2b7b13c516cd0199d5a01a5c85ce3d93f347495d50201238648ed8a516f0f6ac4680f73b7776e11968f231379db4bb5960d79cf2d053df354ae072fb7a08e54e",
850
-        "templates\/settings\/admin.php": "8cacf367ddf1010227a355af99aad3589418b1cfc861c395b3ebdb71a9b1adafd061e10ea3cd5383e044437c5bddead6728fbb02b27248492c930e901edde1af",
851
-        "templates\/settings\/personal.php": "28012052db35429ce5ca5ad2e6192e5bbebadb6069dfab2b7df7e4fde3f34411d40c8f3406d030c384b2629a76ea3a6e96d7571474b7040fda9f655d7f10b95d"
852
-    },
853
-    "signature": "tOoSwei1gLbx7iH\/kZSn+qHLvGFeexR+a1pk7wIphRxqBz2hab4mu1P+Szv2\/F6ZmbOFz5W6gmQNvDLDJh9Z0su85LZX0WLOaTKsxmrUyrk7TgHVV9dn1BsdDw5teTgsajritIphhQ97jBjsUL5lk4Cbj2YrrOjnmrP6U+9Bipq7UsVTwoRL\/dooCaO7c3JBJTJcQzAnLD1tjthi2AaUDWn3903sfQiJo2vROChtU\/Ogm8ayQC0MtzisgV5UPMaCwNLswQsywV0DsmMat3TgIYH1ikjl+LeRj1ljSf4THemKJXeK5JdtPYD6Obngn9esm0vR81mifME09jB8LrKi5WBp63G3dlPcj4Ziv9Ytr1F+xdqKm85J8McEQW0GueJej9JHx2RWsZBRSrfLAKagpAN1\/lx36h5e33GyezeZG6NsPlOOjScpxbeRcP19jYJjSxKlP5jhuHt4zIkbGkxgc6Rc0+ynSfyFDCN0k+ls\/3Ho6BBkPK32VRBRSk077c2iza+9Fs0ZdWEnm3EQ0pvG0A4ebuaz\/8y0nEu8Y\/lPg2d0l8fSU4sHe9rYPfcj6SsS0nm+rE7bmjXkQ6VemPBeSWIWcC2Pw3Ye8ywI6DqSAieXnowHJPkQinGdRVEoiak3hiFHDnnPtEWwV9ehXjWrlC+30duE5ySW8MMEpBEW5to=",
854
-    "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-----"
855
-}
856 0
\ No newline at end of file
857 1
deleted file mode 100644
... ...
@@ -1,2813 +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
-div > label {
24
-   position: relative;
25
-}
26
-
27
-label span {
28
-   display: inline-block;
29
-   min-width: 110px;
30
-   padding: 0px 0px 8px 0px;
31
-}
32
-
33
-select {
34
-  min-height: 25px;
35
-  box-sizing: border-box;
36
-  text-overflow: inherit;
37
-}
38
-
39
-.providerSettings {
40
-   background-color: #F7F7F7;
41
-   padding: 14px;
42
-}
43
-
44
-.providerName {
45
-   font-size: 18px;
46
-   font-weight: bold;
47
-   margin-bottom: 20px;
48
-}
49
-
50
-#smsrelentless_vbar {
51
-   padding: 18px;
52
-   font-family: Calibri, Frutiger, "Myriad Pro", Myriad, sans-serif;
53
-   color: #6d6c6c;
54
-}
55
-
56
-.smsr_textbox {
57
-   display: block;
58
-   box-sizing: content-box;
59
-   width: 70%;
60
-   font-size: 14px !important;
61
-}
62
-
63
-.smsr_textboxspec {
64
-   box-sizing: content-box;
65
-   width: 70%;
66
-   font-size: 14px !important;
67
-}
68
-
69
-#copyToClipboardtel, #copyToClipboardnex, #copyToClipboardtwil, #copyToClipboardflow {
70
-   display: inline-block;
71
-   width: 18px;
72
-   height: 18px;
73
-   margin: 0px 0px -4px 5px;
74
-   cursor: pointer;
75
-}
76
-
77
-#copyToClipboardtel:hover, #copyToClipboardnex:hover, #copyToClipboardtwil:hover, #copyToClipboardflow:hover {
78
-   background-color: #E0E0E0;
79
-}
80
-
81
-#telapi_url, #nexapi_url, #twilapi_url, #twilapi_url_rec, #flowapi_url, #flowapi_url_rec {
82
-   display: inline-block;
83
-   box-sizing: content-box;
84
-   width: 70%;
85
-   font-size: 14px !important;
86
-}
87
-
88
-#generate_tel_rcpt, #generate_tel_delrcpt, #generate_nex_rcpt, #generate_nex_delrcpt, #generate_twil_rcpt, #generate_twil_delrcpt, #generate_flow_rcpt, #generate_flow_delrcpt {
89
-   display: block;
90
-   white-space: normal;
91
-   word-wrap: break-word;
92
-}
93
-
94
-.generateUrl {
95
-   color: #161616;
96
-   background-color: #e3ecf0 !important;
97
-}
98
-
99
-.generateUrl:hover {
100
-   background-color: #c2dcea !important;
101
-}
102
-
103
-.generateUrl:active {
104
-   background-color: #b5cfdd !important;
105
-}
106
-
107
-#settings-dscr {
108
-   padding-top: 3px;
109
-}
110
-
111
-.setlabeltext {
112
-  font-size: 15px;
113
-}
114
-
115
-#smsr_save_msg {
116
-   display: inline;
117
-   color: #181918;
118
-   background-color: #a5e5b3;
119
-   font-weight: bold;
120
-}
121
-
122
-#get_notify {
123
-   display: block;
124
-   margin-bottom: 18px;
125
-}
126
-
127
-#get_notify:hover {
128
-   cursor: pointer;
129
-}
130
-
131
-#includesmsinemail, #showallmessages, #showdisplaynames {
132
-   display: block;
133
-   margin-bottom: 14px;
134
-}
135
-
136
-#includesmsinemail:hover {
137
-   cursor: pointer;
138
-}
139
-
140
-#currentbaldiv, #smsnumbersdiv {
141
-   display: block;
142
-   position: relative;
143
-   font-size: 17px;
144
-   font-weight: bold;
145
-   height: 30px;
146
-   margin: 0px 0px 14px 0px;
147
-   background-color: #4CA3D9;
148
-   border-radius: 20px;
149
-}
150
-
151
-.providername {
152
-  color: #FFFFFF;
153
-}
154
-
155
-.providername:hover {
156
-  color: #2c0cfc;
157
-}
158
-
159
-#currentbalance {
160
-  display: inline-block;
161
-  position: relative;
162
-  margin: 5px 0px 0px 114px;
163
-  color: #262626;
164
-  font-weight: 600;
165
-}
166
-
167
-#smsprovider {
168
-  display: inline;
169
-  position: absolute;
170
-  width: 102px;
171
-  height: 22px;
172
-  padding: 0px 0px 1px 0px !important;
173
-  -moz-box-sizing: border-box;
174
-  -webkit-box-sizing: border-box;
175
-  box-sizing: border-box;
176
-  background: #fcfcfc;
177
-  font-size: 15px;
178
-  font-weight: 500;
179
-  color: #565656;
180
-  text-align: center;
181
-  border-radius: 20px;
182
-}
183
-
184
-#currentsmsnmbrs {
185
-  display: inline-block;
186
-  position: absolute;
187
-  height: 22px;
188
-  width: 54%;
189
-  padding: 0.4px 0px 0px 0px !important;
190
-  margin: 2px 0px 0px 4px;
191
-  text-align: center;
192
-  text-overflow: inherit;
193
-  font-size: 14px;
194
-  font-weight: 500;
195
-  color: #565656;
196
-  -moz-box-sizing: border-box;
197
-  -webkit-box-sizing: border-box;
198
-  box-sizing: border-box;
199
-  background: #fcfcfc;
200
-  border-radius: 20px;
201
-}
202
-
203
-.cllridcls {
204
-  position: relative;
205
-  display: inline;
206
-  font-size: 17px;
207
-  color: #000000;
208
-}
209
-
210
-.tooltipbalanceid  {
211
-  position: relative;
212
-  display: inline-block;
213
-  float: right;
214
-  font-size: 15px;
215
-  color: #000000;
216
-  z-index: 9;
217
-}
218
-
219
-.tooltipsetid  {
220
-  position: relative;
221
-  display: inline-block;
222
-  float: right;
223
-  font-size: 15px;
224
-  color: #000000;
225
-  z-index: 8;
226
-}
227
-
228
-.tooltipbalanceid #infobalance {
229
-  display: block;
230
-  position: relative;
231
-  margin: 4px 14px 0px 0px;
232
-  color: #000000;
233
-  font-size: 21px;
234
-  font-weight: bold;
235
-  font-family: 'Liberation Serif', sans-serif;
236
-  font-style: italic;
237
-  z-index: 6;
238
-}
239
-
240
-.tooltipbalanceid .balancetooltip {
241
-  display: block;
242
-  position: absolute;
243
-  visibility: hidden;
244
-  width: 264px;
245
-  background-color: #fafafa;
246
-  font-size: 15px;
247
-  font-weight: bold;
248
-  color: #595959;
249
-  text-align: left;
250
-  border-radius: 5px;
251
-  padding: 5px 5px 5px 8px;
252
-  margin: -4px 0px 0px -244px;
253
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
254
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
255
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
256
-  z-index: 6;
257
-}
258
-
259
-.tooltipbalanceid:hover .balancetooltip {
260
-   visibility: visible;
261
-}
262
-
263
-#infotipid {
264
-   display: block;
265
-   position: relative;
266
-   margin: 4px 14px 0px 0px;
267
-   color: #000000;
268
-   font-size: 21px;
269
-   font-weight: bold;
270
-   font-family: 'Liberation Serif', sans-serif;
271
-   font-style: italic;
272
-   z-index: 5;
273
-}
274
-
275
-#setcalleridtp {
276
-   display: block;
277
-   position: absolute;
278
-   width: 274px;
279
-   overflow-y: scroll;
280
-   visibility: hidden;
281
-   background-color: #fafafa;
282
-   border-radius: 5px;
283
-   margin: -6px 0px 0px -250px;
284
-   scrollbar-width: auto;
285
-   scrollbar-color: #a2a2a2 #ececec;
286
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
287
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
288
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
289
-   z-index: 10;
290
-}
291
-
292
-.calleridtooltip {
293
-   display: block;
294
-   position: relative;
295
-   width: auto;
296
-   height: auto;
297
-   background-color: #f4f4f4;
298
-   font-size: 15px;
299
-   font-weight: bold;
300
-   color: #595959;
301
-   text-align: left;
302
-   padding: 5px 12px 5px 10px;
303
-   z-index: 10;
304
-}
305
-
306
-.tooltipsetid:hover #setcalleridtp {
307
-   visibility: visible;
308
-}
309
-
310
-.pflabels {
311
-   font-size: 15px;
312
-   font-weight: bold;
313
-}
314
-
315
-.srheader {
316
-   display: block;
317
-   position: relative;
318
-   margin: 0px 0px 7px 0px;
319
-   font-size: 17px;
320
-   font-weight: bold;
321
-}
322
-
323
-.sendtomultrcvrs {
324
-   display: block;
325
-   position: relative;
326
-   margin: 0px 0px 7px 0px;
327
-   font-size: 17px;
328
-}
329
-
330
-.smsnbformat {
331
-   display: block;
332
-   position: relative;
333
-   margin: 0px;
334
-   font-size: 17px;
335
-   font-weight: bold;
336
-}
337
-
338
-.smsrelentless_box {
339
-   width: 400px;
340
-   display: block;
341
-}
342
-.indtext {
343
-   display: inline-block;
344
-   padding-left: 10px;
345
-}
346
-
347
-#settings-dscr {
348
-   padding-top: 3px;
349
-}
350
-
351
-#sms_upload_msg {
352
-   display: block;
353
-   color: #181918;
354
-   background-color: #a5e5b3;
355
-   font-weight: bold;
356
-}
357
-
358
-#sms_submit_msg {
359
-   display: none;
360
-   margin: 14px 0px 8px 0px;
361
-   padding: 3px 20px 0px 20px;
362
-   width: 100%;
363
-   color: #181918;
364
-   background-color: #a5e5b3;
365
-   font-size: 15px;
366
-   font-weight: bold;
367
-   text-align: center;
368
-   border-radius: 14px;
369
-}
370
-
371
-#pickedfilename {
372
-   font-size: 13px;
373
-}
374
-
375
-#smstodiv {
376
-   display: block;
377
-   position: relative;
378
-   height: 32px;
379
-}
380
-
381
-#smsto {
382
-   display: block;
383
-   width: 99%;
384
-   max-height: 32px;
385
-   padding: 0px 15px 0px 15px;
386
-   color: #565656;
387
-   font-size: 16px;
388
-   font-weight: bold;
389
-   border-radius: 20px;
390
-}
391
-
392
-#sendtomultiple {
393
-   display: inline-block;
394
-   position: relative;
395
-   margin: 10px 0px 12px 0px;
396
-   font-size: 16px;
397
-   font-weight: bold;
398
-}
399
-
400
-#entermessage {
401
-   display: block;
402
-   position: relative;
403
-   margin: 4px 0px 0px 0px;
404
-   font-size: 16px;
405
-   font-weight: bold;
406
-}
407
-
408
-#uploadfileforsms {
409
-   margin-left: 7px;
410
-   background-color: #ffffff;
411
-   border-radius: 3px !important;
412
-}
413
-
414
-.entertime {
415
-   display: inline;
416
-   font-size: 16px;
417
-   font-weight: bold;
418
-   margin-right: 7px;
419
-}
420
-
421
-#sendmediafl {
422
-   display: block;
423
-   position: relative;
424
-   margin: 0px 0px 20px 0px;
425
-   font-size: 16px;
426
-   font-weight: bold;
427
-}
428
-
429
-#tomultchckbx {
430
-   display: inline-block;
431
-   position: absolute;
432
-   margin: 3px 0px 0px 10px;
433
-}
434
-
435
-#mediafilechckbx {
436
-   display: inline-block;
437
-   position: absolute;
438
-   margin: -7px 0px 0px 10px;
439
-}
440
-
441
-#deleteoldchckbox {
442
-   display: inline-block;
443
-   position: absolute;
444
-   margin: 3.5px 0px 0px 10px;
445
-}
446
-
447
-#tomultchckbx:hover, #mediafilechckbx:hover, #deleteoldchckbox:hover {
448
-   cursor: pointer;
449
-}
450
-
451
-.maxmessagelength {
452
-   display: none;
453
-   position: relative;
454
-   margin: 2px 7px 4px 0px;
455
-   font-size: 15px;
456
-   color: #000000;
457
-   z-index: 6;
458
-}
459
-
460
-#maxlengthinfo {
461
-   display: block;
462
-   position: absolute;
463
-   width: 274px;
464
-   height: 200px;
465
-   overflow-y: scroll;
466
-   visibility: hidden;
467
-   background-color: #fafafa;
468
-   border-radius: 5px;
469
-   margin: -11px 0px 0px -6px;
470
-   scrollbar-width: auto;
471
-   scrollbar-color: #a2a2a2 #ececec;
472
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
473
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
474
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
475
-   z-index: 10;
476
-}
477
-
478
-.maxlengthtooltip {
479
-   display: block;
480
-   position: relative;
481
-   width: auto;
482
-   height: auto;
483
-   background-color: #f4f4f4;
484
-   font-size: 15px;
485
-   font-weight: bold;
486
-   color: #595959;
487
-   text-align: left;
488
-   padding: 5px 12px 5px 10px;
489
-   z-index: 10;
490
-}
491
-
492
-.maxmessagelength:hover #maxlengthinfo {
493
-   visibility: visible;
494
-}
495
-
496
-.up-bttn-wrapper {
497
-  display: block;
498
-  position: relative;
499
-  overflow: hidden;
500
-  padding-top: 20px;
501
-  padding-bottom: 30px;
502
-}
503
-
504
-#smstext {
505
-  display: inline-block;
506
-  color: #000000;
507
-  width: 100%;
508
-  height: 130px;
509
-  text-align: left;
510
-  font-size: 16px;
511
-  border-radius: 6px;
512
-  resize: vertical;
513
-  white-space: pre-wrap;
514
-}
515
-
516
-#char_count {
517
-  display: none;
518
-  font-size: 15px;
519
-  font-weight: bold;
520
-}
521
-
522
-#mtextSize {
523
-  display: none;
524
-  margin-left: 10px;
525
-  font-size: 15px;
526
-  font-weight: bold;
527
-  color: #4CA3D9;
528
-}
529
-
530
-#submitsms {
531
-   display: block;
532
-   position: relative;
533
-   margin-top: 14px;
534
-   color: white;
535
-   font-weight: bold;
536
-   font-size: 15px;
537
-   background-color: #4CA3D9;
538
-   border-radius: 20px;
539
-}
540
-
541
-#submitsms:hover {
542
-   border-color: #5CAECC;
543
-}
544
-
545
-#submitsms:active {
546
-   background: #4B96B1;
547
-   border-color: #4B96B1;
548
-}
549
-
550
-#multiplerecivers {
551
-   display: none;
552
-   background: #e8f6ff;
553
-   border-radius: 6px;
554
-   padding: 5px;
555
-   margin: 0px 0px 20px 0px;
556
-}
557
-
558
-#multsetrows {
559
-  display: block;
560
-  padding: 5px;
561
-}
562
-
563
-#multsmsinterval {
564
-  display: block;
565
-  width: 100px;
566
-  height: 25px;
567
-  font-size: 14px;
568
-  font-weight: bold;
569
-  padding: 0px 0px 0px 10px;
570
-  border-radius: 20px;
571
-}
572
-
573
-#app {
574
-  position: relative;
575
-  display: flex;
576
-  min-height: 100%;
577
-  min-width: 100%;
578
-}
579
-
580
-#app-content {
581
-   position: relative;
582
-   z-index: 1000;
583
-   flex-basis: 100vw;
584
-   min-width: 0;
585
-   min-height: 100%;
586
-   margin: 0 !important;
587
-   overflow-y: scroll;
588
-}
589
-
590
-#viewerContainer {
591
-   display: block;
592
-   position: relative;
593
-   width: 100%;
594
-   height: 100%;
595
-}
596
-
597
-.pdfViewer #viewer {
598
-   display: block;
599
-   position: relative;
600
-   min-width: 100%;
601
-   min-height: 100%;
602
-}
603
-
604
-#smsdocpreview {
605
-   display: inline-block;
606
-   position: relative;
607
-   width: 100%;
608
-   height: 100%;
609
-   margin-top: -50px;
610
-}
611
-
612
-#outerContainer {
613
-   display: block;
614
-   position: relative;
615
-   width: 100%;
616
-   height: 100%;
617
-}
618
-
619
-#mainContainer {
620
-   display: block;
621
-   position: relative;
622
-   width: 100%;
623
-   height: 100%;
624
-}
625
-
626
-.texttooltip {
627
-  font-family: 'Liberation Serif', Calibri, sans-serif;
628
-  font-style: italic;
629
-  color: #000000;
630
-  font-size: 21px;
631
-  font-weight: bold;
632
-  margin: 0px 0px 4px 4px;
633
-}
634
-
635
-.fortooltip {
636
-   position: relative;
637
-   display: inline-block;
638
-   margin: 0px;
639
-   font-size: 15px;
640
-   color: #000000;
641
-   z-index: 7;
642
-}
643
-
644
-.fortooltipsec {
645
-   position: relative;
646
-   display: inline-block;
647
-   font-size: 15px;
648
-   color: #000000;
649
-   padding: 2px 0px 4px 2px;
650
-   z-index: 3;
651
-}
652
-
653
-.fortooltiptert {
654
-   position: relative;
655
-   display: inline-block;
656
-   font-size: 15px;
657
-   color: #000000;
658
-   padding: 2px 0px 4px 2px;
659
-   z-index: 0;
660
-}
661
-
662
-.fortooltipfourth {
663
-   position: relative;
664
-   display: inline-block;
665
-   font-size: 15px;
666
-   color: #000000;
667
-   padding: 2px 0px 4px 2px;
668
-   z-index: 4;
669
-}
670
-
671
-#tonmbrformat {
672
-   display: block;
673
-   position: absolute;
674
-   width: 274px;
675
-   overflow-y: scroll;
676
-   visibility: hidden;
677
-   background-color: #fafafa;
678
-   border-radius: 5px;
679
-   margin: -11px 0px 0px -6px;
680
-   scrollbar-width: auto;
681
-   scrollbar-color: #a2a2a2 #ececec;
682
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
683
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
684
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
685
-   z-index: 10;
686
-}
687
-
688
-.fortooltiptext {
689
-   display: block;
690
-   position: relative;
691
-   width: auto;
692
-   height: auto;
693
-   background-color: #f4f4f4;
694
-   font-size: 15px;
695
-   font-weight: bold;
696
-   color: #595959;
697
-   text-align: left;
698
-   padding: 5px 12px 5px 10px;
699
-   z-index: 10;
700
-}
701
-
702
-.fortooltip:hover #tonmbrformat {
703
-   visibility: visible;
704
-}
705
-
706
-#uploadfileinfo {
707
-   display: block;
708
-   position: absolute;
709
-   width: 274px;
710
-   overflow-y: scroll;
711
-   visibility: hidden;
712
-   background-color: #fafafa;
713
-   border-radius: 5px;
714
-   margin: -11px 0px 0px -6px;
715
-   scrollbar-width: auto;
716
-   scrollbar-color: #a2a2a2 #ececec;
717
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
718
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
719
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
720
-   z-index: 10;
721
-}
722
-
723
-.fortooltiptextsec {
724
-   display: block;
725
-   position: relative;
726
-   width: auto;
727
-   height: auto;
728
-   background-color: #f4f4f4;
729
-   font-size: 15px;
730
-   font-weight: bold;
731
-   color: #595959;
732
-   text-align: left;
733
-   padding: 5px 12px 5px 10px;
734
-   z-index: 10;
735
-}
736
-
737
-.fortooltipsec:hover #uploadfileinfo {
738
-   visibility: visible;
739
-}
740
-
741
-#deleteoldinfo {
742
-   display: block;
743
-   position: absolute;
744
-   width: 274px;
745
-   height: 200px;
746
-   overflow-y: scroll;
747
-   visibility: hidden;
748
-   background-color: #fafafa;
749
-   border-radius: 5px;
750
-   margin: -11px 0px 0px -6px;
751
-   scrollbar-width: auto;
752
-   scrollbar-color: #a2a2a2 #ececec;
753
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
754
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
755
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
756
-   z-index: 10;
757
-}
758
-
759
-.fortooltiptexttert {
760
-   display: block;
761
-   position: relative;
762
-   width: auto;
763
-   height: auto;
764
-   background-color: #f4f4f4;
765
-   font-size: 15px;
766
-   font-weight: bold;
767
-   color: #595959;
768
-   text-align: left;
769
-   padding: 5px 12px 5px 10px;
770
-   z-index: 10;
771
-}
772
-
773
-.fortooltiptert:hover #deleteoldinfo {
774
-   visibility: visible;
775
-}
776
-
777
-#uploadmmfileinfo {
778
-   display: block;
779
-   position: absolute;
780
-   width: 274px;
781
-   height: 350px;
782
-   overflow-y: scroll;
783
-   visibility: hidden;
784
-   background-color: #fafafa;
785
-   border-radius: 5px;
786
-   margin: -11px 0px 0px -16px;
787
-   scrollbar-width: auto;
788
-   scrollbar-color: #a2a2a2 #ececec;
789
-   box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
790
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
791
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
792
-   z-index: 10;
793
-}
794
-
795
-#tooltiptextfourth {
796
-   display: block;
797
-   position: relative;
798
-   width: auto;
799
-   height: auto;
800
-   background-color: #f4f4f4;
801
-   font-size: 15px;
802
-   font-weight: bold;
803
-   color: #595959;
804
-   text-align: left;
805
-   padding: 5px 12px 5px 10px;
806
-   z-index: 10;
807
-}
808
-
809
-.fortooltipfourth:hover #uploadmmfileinfo {
810
-   visibility: visible;
811
-}
812
-
813
-.fileupload {
814
-   display: none;
815
-}
816
-
817
-.uploadflbt {
818
-   width: 411px;
819
-}
820
-
821
-#infotipmms {
822
-   display: block;
823
-   position: relative;
824
-   margin: 0px;
825
-   color: #000000;
826
-   font-size: 21px;
827
-   font-weight: bold;
828
-   font-family: 'Liberation Serif', sans-serif;
829
-   font-style: italic;
830
-   z-index: 5;
831
-}
832
-
833
-#mmsfoldersview {
834
-   display: none;
835
-   position: relative;
836
-   width: 100%;
837
-   height: 100%;
838
-   margin-top: -50px;
839
-   background-color: #f4f9ff;
840
-}
841
-
842
-#upmediafiles {
843
-   display: none;
844
-   background: #e8f6ff;
845
-   border-radius: 6px;
846
-   padding: 10px;
847
-   margin: 0px 0px 20px 0px;
848
-}
849
-
850
-.uploadflbt .icon-upload {
851
-   display: inline;
852
-}
853
-
854
-.pfprompt {
855
-   font-size: 16px;
856
-   font-weight: bold;
857
-}
858
-
859
-.fileuploadstl, .filesfromnc {
860
-  display: block;
861
-  font-size: 17px;
862
-  font-weight: bold;
863
-  color: #000000;
864
-}
865
-
866
-#uploadfileformms {
867
-   margin-left: 21px;
868
-   background-color: #ffffff;
869
-   border-radius: 3px !important;
870
-}
871
-
872
-#filestotsize {
873
-  display: none;
874
-  position: relative;
875
-  height: auto;
876
-  padding: 0px 0px 8px 0px;
877
-  font-size: 14.5px;
878
-  font-weight: bold;
879
-  color: #189558;
880
-}
881
-
882
-#filessizetext {
883
-  display: inline;
884
-  position: relative;
885
-  padding-left: 10px;
886
-}
887
-
888
-#fileuploadednm .indivflcls {
889
-  display: inline-block;
890
-  position: relative;
891
-  height:auto;
892
-  max-width: 90%;
893
-  overflow: visible;
894
-  white-space: normal;
895
-  word-break: break-all;
896
-  text-overflow: ellipsis;
897
-  font-size: 17px;
898
-  color: #0e6ba0;
899
-}
900
-
901
-#fileuploadednm .indivflcls:hover {
902
-  cursor: pointer;
903
-  text-decoration: underline;
904
-}
905
-
906
-#fileuploadednm .indupfldl {
907
-  position: relative;
908
-  display: inline-block;
909
-  float: right;
910
-  cursor: pointer;
911
-  width: 20px;
912
-  color: #0e6ba0;
913
-  text-align: center;
914
-  font-size: 17px;
915
-}
916
-
917
-#fileuploadednm .indupfldl:hover {
918
-  background-color: #e8f6ff;
919
-  cursor: pointer;
920
-}
921
-
922
-#filespickednc .indivflpckd {
923
-  display: inline-block;
924
-  position: relative;
925
-  height:auto;
926
-  max-width: 90%;
927
-  overflow: visible;
928
-  white-space: normal;
929
-  word-break: break-all;
930
-  text-overflow: ellipsis;
931
-  color: #0e6ba0;
932
-}
933
-
934
-.indivflpckd:hover {
935
-  cursor: pointer;
936
-  text-decoration: underline;
937
-}
938
-
939
-.indpckfldl {
940
-  position: relative;
941
-  display: inline-block;
942
-  float: right;
943
-  cursor: pointer;
944
-  width: 20px;
945
-  color: #0e6ba0;
946
-  text-align: center;
947
-}
948
-
949
-#filespickednc .indpckfldl:hover {
950
-  background-color: #e8f6ff;
951
-  cursor: pointer;
952
-}
953
-
954
-#pf_upload_msg, #pf_choose_msg {
955
-  display: block;
956
-  color: #181918;
957
-  background-color: #a5e5b3;
958
-  font-weight: bold;
959
-  text-align: center;
960
-  border-radius: 3px;
961
-}
962
-
963
-#choosefilen {
964
-  display: inline;
965
-  position: relative;
966
-  margin: 0px 0px 20px 16px;
967
-  padding-top: 15px;
968
-  background-image: url('../img/nextcloud_logo.svg');
969
-  background-repeat: no-repeat;
970
-  background-size: 110% 125%;
971
-  background-position: center center;
972
-  min-width: 66px;
973
-  min-height: 30px;
974
-  cursor:pointer;
975
-}
976
-
977
-#choosefilen:active {
978
-  background-image: url('../img/nextcloud_logo_bright.svg');
979
-  background-repeat: no-repeat;
980
-  background-size: 110% 125%;
981
-  background-position: center center;
982
-  min-width: 66px;
983
-  min-height: 30px;
984
-}
985
-
986
-#pickFromNext, #uploadFile {
987
-  display: inline-block;
988
-  position: relative;
989
-  font-size: 16px;
990
-  font-weight: bold;
991
-  color: #6d6c6c;
992
-}
993
-
994
-#filespickednc .indivflpckd {
995
-  display: inline-block;
996
-  position: relative;
997
-  height:auto;
998
-  max-width: 90%;
999
-  overflow: visible;
1000
-  white-space: normal;
1001
-  word-break: break-all;
1002
-  text-overflow: ellipsis;
1003
-  color: #0e6ba0;
1004
-}
1005
-
1006
-#filespickednc .indpckfldl:hover {
1007
-  background-color: #e8f6ff;
1008
-  cursor: pointer;
1009
-}
1010
-
1011
-.uploadflbt {
1012
-  width: 411px;
1013
-}
1014
-
1015
-.uploadflbt .icon-upload {
1016
-  display: inline;
1017
-}
1018
-
1019
-.uploadfiledv {
1020
-  display: inline-block;
1021
-  position: relative;
1022
-  margin: 16px 0px 22px 0px;
1023
-}
1024
-
1025
-#mmsfileuploadednm .indivflcls {
1026
-  display: inline-block;
1027
-  position: relative;
1028
-  height:auto;
1029
-  max-width: 90%;
1030
-  overflow: visible;
1031
-  white-space: normal;
1032
-  word-break: break-all;
1033
-  text-overflow: ellipsis;
1034
-  font-size: 17px;
1035
-  color: #0e6ba0;
1036
-}
1037
-
1038
-#mmsfileuploadednm .indivflcls:hover {
1039
-  cursor: pointer;
1040
-  text-decoration: underline;
1041
-}
1042
-
1043
-#mmsfileuploadednm .indupfldl {
1044
-  position: relative;
1045
-  display: inline-block;
1046
-  float: right;
1047
-  cursor: pointer;
1048
-  width: 20px;
1049
-  color: #0e6ba0;
1050
-  text-align: center;
1051
-  font-size: 17px;
1052
-}
1053
-
1054
-#mmsfileuploadednm .indupfldl:hover {
1055
-  background-color: #e8f6ff;
1056
-  cursor: pointer;
1057
-}
1058
-
1059
-#filessizetext {
1060
-  display: inline;
1061
-  position: relative;
1062
-  padding-left: 10px;
1063
-}
1064
-
1065
-.srheaderch {
1066
-  display: block;
1067
-  position: relative;
1068
-  margin: 0px 0px 15px 0px;
1069
-  font-size: 16px;
1070
-  font-weight: bold;
1071
-}
1072
-
1073
-.indgenflclsmms, .indgenpckfls {
1074
-  display: block;
1075
-  margin: 10px 6px 0px 6px;
1076
-}
1077
-
1078
-#pickfilesNext {
1079
-  display: block;
1080
-  margin: 20px 0px 0px 0px;
1081
-}
1082
-
1083
-#dirbuttons {
1084
-  margin-top: 20px;
1085
-}
1086
-
1087
-button, input, textarea, div[contenteditable="true"], div[contenteditable="false"] {
1088
-  min-height: 9px;
1089
-}
1090
-
1091
-#choosefilen {
1092
-  display: inline;
1093
-  position: relative;
1094
-  margin: 4px 0px 20px 16px;
1095
-  background-image: url('../img/nextcloud_logo.svg');
1096
-  background-repeat: no-repeat;
1097
-  background-size: 110% 125%;
1098
-  background-position: center center;
1099
-  min-width: 66px;
1100
-  min-height: 30px;
1101
-  cursor:pointer;
1102
-}
1103
-
1104
-#choosefilen:active {
1105
-  background-image: url('../img/nextcloud_logo_bright.svg');
1106
-  background-repeat: no-repeat;
1107
-  background-size: 110% 125%;
1108
-  background-position: center center;
1109
-  min-width: 66px;
1110
-  min-height: 30px;
1111
-}
1112
-
1113
-#selectcalleridbttn {
1114
-  position: relative;
1115
-  padding-left: 0px;
1116
-  margin-top: 2.6px;
1117
-  margin-right: 4px;
1118
-  float: right;
1119
-  background-image: url('../img/refresh_logo.svg');
1120
-  background-repeat: no-repeat;
1121
-  background-size: 110% 110%;
1122
-  background-position: center center;
1123
-  min-width: 24px;
1124
-  min-height: 24px;
1125
-  cursor: pointer;
1126
-  background-color: #ffffff;
1127
-  border-radius: 20px;
1128
-}
1129
-
1130
-#pickid, #showsum {
1131
-  display: inline-block;
1132
-  position: relative;
1133
-  font-size: 17px;
1134
-  font-weight: bold;
1135
-  margin: 4px 0px 8px 14px;
1136
-  color: #FFFFFF;
1137
-}
1138
-
1139
-.smsrelentless_checkbox:hover {
1140
-  cursor: pointer;
1141
-}
1142
-
1143
-#smstables {
1144
-  display: block; 
1145
-  position: relative;
1146
-  min-width: 100%;
1147
-  min-height: 100%;
1148
-}
1149
-
1150
-#smsRGreyLogo {
1151
-  display: block;
1152
-  position: relative;
1153
-  background-image: url('../img/sms_relentless_grey.svg');
1154
-  background-repeat: no-repeat;
1155
-  background-position: center center;
1156
-  width: 100%;
1157
-  height: 675px;
1158
-}
1159
-
1160
-#recSmsTable, #sentSmsTable {
1161
-  display: block;
1162
-  position: relative;
1163
-  top: 0px;
1164
-  width: 100%;
1165
-  height: auto;
1166
-  font-size: 14px;
1167
-  z-index: 50;
1168
-  background: #FFFFFF;
1169
-}
1170
-
1171
-.receivedrows, .receivedrowsbody, .sentrows, .sentrowsbody, .groupedmsgrows {
1172
-  border: 1px solid #f3f3f3;
1173
-  padding: 8px;
1174
-}
1175
-
1176
-#groupedSmsTable {
1177
-  display: block;
1178
-  position: relative;
1179
-  top: 0px;
1180
-  width: 100%;
1181
-  height: auto;
1182
-  font-size: 14px;
1183
-  z-index: 50;
1184
-  background: #FFFFFF;
1185
-}
1186
-
1187
-#groupedSmsTable td {
1188
-  text-align: left;
1189
-  vertical-align: top;
1190
-  border: 1px solid #f3f3f3;
1191
-  padding: 5px;
1192
-}
1193
-
1194
-.groupedrowsbody {
1195
-  border: 1px solid #f3f3f3;
1196
-  padding: 8px;
1197
-}
1198
-
1199
-.groupedLstNmbr {
1200
-  overflow: scroll;
1201
-  white-space: nowrap;
1202
-}
1203
-
1204
-.groupedLstNames {
1205
-  overflow: scroll;
1206
-  white-space: nowrap;
1207
-}
1208
-
1209
-.groupedLstMsgs {
1210
-  overflow: scroll;
1211
-  white-space: nowrap;
1212
-}
1213
-
1214
-.groupedSentMsg {
1215
-  display: block;
1216
-  width: 95%;
1217
-  float: right;
1218
-  margin: 6px 6px 6px 0px;
1219
-  padding: 8px 10px;
1220
-  border: 0;
1221
-  border-radius: 10px;
1222
-  background-color: #f2fbff;
1223
-}
1224
-
1225
-.groupedRecMsg {
1226
-  display: block; 
1227
-  width: 95%;
1228
-  float: left;
1229
-  margin: 6px 0px;
1230
-  padding: 8px 10px;
1231
-  border: 0;
1232
-  border-radius: 10px;
1233
-  background-color: #f2fff8;
1234
-}
1235
-
1236
-.fixedRowHeight {
1237
-  max-height: 300px;
1238
-}
1239
-
1240
-.expandGrpRow {
1241
-  display: block;
1242
-  margin:-3px auto 7px auto;
1243
-  cursor: pointer;
1244
-}
1245
-
1246
-.dispNameList {
1247
-  display: block;
1248
-  margin: 2px 0px;
1249
-  font-size: 14.5px;
1250
-  font-weight: 500;
1251
-  color: #0a559e;
1252
-  cursor: pointer;
1253
-}
1254
-
1255
-.dispNameList:hover {
1256
-  color: #1483f0;
1257
-}
1258
-
1259
-.phoneNmbrRow {
1260
-  font-size: 14.5px;
1261
-  font-weight: 500;
1262
-  color: #06866f;
1263
-  cursor: pointer;
1264
-}
1265
-
1266
-.phoneNmbrRow:hover {
1267
-  color: #08b899;
1268
-}
1269
-
1270
-#selectListedNmbrs {
1271
-  display: block;
1272
-  width: 100%;
1273
-}
1274
-
1275
-.sentMssgStatus {
1276
-  display: inline-block;
1277
-  margin: 0px 6px 0px 6.5px;
1278
-}
1279
-
1280
-.saveRestrictions, .saveAutoReply {
1281
-  display: inline-block;
1282
-  border-radius: 8px !important;
1283
-  padding: 0px 14px !important;
1284
-  margin: 0px 0px 0px 10px !important;
1285
-  color: #ffffff !important;
1286
-  background-color: #59d0b4 !important;
1287
-}
1288
-
1289
-.savealwdKeys {
1290
-  display: inline-block;
1291
-  border-radius: 8px !important;
1292
-  padding: 0px 14px !important;
1293
-  margin: 0 !important;
1294
-  color: #ffffff !important;
1295
-  background-color: #59d0b4 !important;
1296
-}
1297
-
1298
-.saveRestrictions:hover, .saveAutoReply:hover, .savealwdKeys:hover {
1299
-  background-color: #40c1a3 !important;
1300
-}
1301
-
1302
-.saveRestrictions:active, .saveAutoReply:active, .savealwdKeys:active {
1303
-  background-color: #3aad92 !important;
1304
-}
1305
-
1306
-#save_admin_settings {
1307
-  display: inline-block;
1308
-  border-radius: 8px !important;
1309
-  padding: 0px 14px !important;
1310
-  color: #ffffff !important;
1311
-  background-color: #1e89c2 !important;
1312
-}
1313
-
1314
-#save_admin_settings:hover {
1315
-  background-color: #0369a0  !important;
1316
-}
1317
-
1318
-#save_admin_settings:active {
1319
-  background-color: #025480  !important;
1320
-}
1321
-
1322
-#phoneNmbrRestr th {
1323
-  font-weight: 500;
1324
-}
1325
-
1326
-#tnxKeysAccessTbl th, #plvKeysAccessTbl th, #twlKeysAccessTbl th, #flrKeysAccessTbl th {
1327
-  font-weight: 500;
1328
-  color: #222222;
1329
-}
1330
-
1331
-.restrAuthor {
1332
-  width: 200px;
1333
-  height: 40px !important;
1334
-}
1335
-
1336
-.restrPhoneNmbr, .arplPhoneNmbr {
1337
-  width: 194px;
1338
-  height: 40px !important;
1339
-}
1340
-
1341
-.restrGroups, .restrUsers {
1342
-  width: 330px;
1343
-  height: 40px !important;
1344
-  border: 1px solid #000;
1345
-  border-radius: 6px;
1346
-  margin: 0px 1px 0px 0px;
1347
-  padding: 0px 4px;
1348
-  overflow: hidden;
1349
-}
1350
-
1351
-.restrGroups:hover, .restrUsers:hover {
1352
-  overflow: auto !important;
1353
-}
1354
-
1355
-.alwdKeysGroups, .alwdKeysUsers {
1356
-  width: 398px;
1357
-  min-height: 80px !important;
1358
-  background-color: #ffffff !important;
1359
-  border: 1px solid #000;
1360
-  border-radius: 6px;
1361
-  margin: 0px 1px 0px 0px;
1362
-  padding: 0px 4px;
1363
-  overflow-y: scroll;
1364
-  white-space: pre-wrap;
1365
-}
1366
-
1367
-.alwdKeysGroups:hover, .alwdKeysUsers:hover {
1368
-  overflow: auto !important;
1369
-}
1370
-
1371
-#addRestrRow, #addArplRow {
1372
-  display: block;
1373
-  margin: 10px 0px 0px 6px;
1374
-  width: 16px;
1375
-  height: 16px;
1376
-  cursor: pointer;
1377
-  border-radius: 2px;
1378
-}
1379
-
1380
-#autoReplyTbl td {
1381
-  text-align: left;
1382
-  vertical-align: top;
1383
-  padding: 0px 0px 10px 0px;
1384
-}
1385
-
1386
-#autoReplyTbl th {
1387
-  font-weight: 500;
1388
-}
1389
-
1390
-.arplAuthor {
1391
-  width: 200px;
1392
-  height: 38px !important;
1393
-}
1394
-
1395
-.arplMode {
1396
-  display: inline-block;
1397
-  width: 330px;
1398
-  height: 184px;
1399
-  border: 1px solid #000;
1400
-  border-radius: 6px;
1401
-  margin: 0px 4px 0px 0px;
1402
-  overflow: visible;
1403
-}
1404
-
1405
-.modeContent .date-picker-x {
1406
-   top: -170px !important;
1407
-   left: -170px !important;
1408
-}
1409
-
1410
-.arplText {
1411
-  display: inline-block;
1412
-  color: #000000;
1413
-  width: 330px;
1414
-  height: 184px;
1415
-  font-size: 15px;
1416
-  text-align: left;
1417
-  border: 1px solid #000;
1418
-  border-radius: 6px;
1419
-  margin: 0px 1px 0px 0px;
1420
-  resize: vertical;
1421
-  white-space: pre-wrap;
1422
-  overflow: auto;
1423
-}
1424
-
1425
-.selectArplMode {
1426
-  display: block;
1427
-  width: 322px;
1428
-  margin: 4px 0px 0px 4px;
1429
-  cursor: pointer;
1430
-  font-weight: 500;
1431
-}
1432
-
1433
-.daysOfWeek {
1434
-  display: block;
1435
-  width: 100%;
1436
-  height: 26px;
1437
-  margin: 3px auto;
1438
-  font-weight: 500;
1439
-  text-align: center;
1440
-}
1441
-
1442
-.daysInWeek {
1443
-  display: block;
1444
-  position: relative;
1445
-  width: 322px;
1446
-  height: auto;
1447
-  margin: 0px 0px 0px 4px !important;
1448
-  text-align: center;
1449
-  border: 1px solid #000;
1450
-  border-radius: 6px;
1451
-}
1452
-
1453
-.chooseTInterval {
1454
-  display: block;
1455
-  width: 100%;
1456
-  height: 26px;
1457
-  margin: 5px auto 0px auto;
1458
-  font-weight: 500;
1459
-  text-align: center;
1460
-}
1461
-
1462
-.selectArplHours {
1463
-  display: block;
1464
-  width: 100%;
1465
-  text-align: center;
1466
-}
1467
-
1468
-.tooltipautoreply {
1469
-  display: inline-block;
1470
-  position: absolute;
1471
-  font-size: 15px;
1472
-  z-index: 9;
1473
-}
1474
-
1475
-.tooltipautoreplyst, .tooltipautoreplypn {
1476
-  display: inline-block;
1477
-  position: absolute;
1478
-  font-size: 15px;
1479
-  z-index: 7;
1480
-}
1481
-
1482
-#infoautoreply, #infoautoreplyst, #infoautoreplypn {
1483
-  display: inline-block;
1484
-  position: relative;
1485
-  margin: -2px 0px 0px 10px;
1486
-  color: #000000;
1487
-  font-size: 21px;
1488
-  font-weight: bold;
1489
-  font-family: 'Liberation Serif', sans-serif;
1490
-  font-style: italic;
1491
-  cursor: pointer;
1492
-}
1493
-
1494
-.autorpltooltip, .autorpltooltipst, .autorpltooltippn {
1495
-  display: block;
1496
-  position: absolute;
1497
-  visibility: hidden;
1498
-  width: 330px;
1499
-  height: auto;
1500
-  background-color: #fafafa;
1501
-  font-size: 15px;
1502
-  font-weight: bold;
1503
-  white-space: normal;
1504
-  color: #595959;
1505
-  text-align: left;
1506
-  border-radius: 5px;
1507
-  padding: 5px 5px 5px 8px;
1508
-  margin: -4px 0px 0px -150px;
1509
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1510
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1511
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1512
-}
1513
-
1514
-.tooltipautoreply:hover .autorpltooltip, .tooltipautoreplyst:hover .autorpltooltipst, .tooltipautoreplypn:hover .autorpltooltippn  {
1515
-   visibility: visible;
1516
-}
1517
-
1518
-.selectHrMin {
1519
-  font-weight: 500 !important;
1520
-  color: #01446d !important;
1521
-}
1522
-
1523
-.chooseDateIntvl {
1524
-  display: block;
1525
-  width: 100%;
1526
-  height: 32px;
1527
-  margin: 19px auto 4px auto;
1528
-  font-weight: 500;
1529
-  text-align: center;
1530
-}
1531
-
1532
-.arplstrtendDates {
1533
-  display: block;
1534
-  position: absolute;
1535
-  width: 330px;
1536
-  height: auto;
1537
-}
1538
-
1539
-.stdtTitle {
1540
-  display: inline-block;
1541
-  position: absolute;
1542
-  width: 140px;
1543
-  height: 38px;
1544
-  left: 10px;
1545
-  top: 2px;
1546
-  font-weight: 500;
1547
-  text-align: center;
1548
-}
1549
-
1550
-.enddtTitle {
1551
-  display: inline-block;
1552
-  position: absolute;
1553
-  width: 140px;
1554
-  height: 38px;
1555
-  right: 10px;
1556
-  top: 2px;
1557
-  font-weight: 500;
1558
-  text-align: center;
1559
-}
1560
-
1561
-.startDate {
1562
-  display: inline-block;
1563
-  position: absolute;
1564
-  width: 140px;
1565
-  height: 38px;
1566
-  left: 10px;
1567
-  top: 26px;
1568
-  border: 1px solid #3b3b3b;
1569
-  border-radius: 6px;
1570
-  text-align: center;
1571
-  font-weight: 500;
1572
-  color: #01446d !important;
1573
-}
1574
-
1575
-.endDate {
1576
-  display: inline-block;
1577
-  position: absolute;
1578
-  width: 140px;
1579
-  height: 38px;
1580
-  right: 10px;
1581
-  top: 26px;
1582
-  border: 1px solid #3b3b3b;
1583
-  border-radius: 6px;
1584
-  text-align: center;
1585
-  font-weight: 500;
1586
-  color: #01446d !important;
1587
-}
1588
-
1589
-#adminOverlay {
1590
-  display: block;
1591
-  position: absolute;
1592
-  top: 0;
1593
-  left: 0;
1594
-  opacity: 0;
1595
-  z-index: 4990;
1596
-}
1597
-
1598
-.grpsList, .usrsList {
1599
-  display: block;
1600
-  position: absolute;
1601
-  width: 300px;
1602
-  max-height: 400px;
1603
-  z-index: 5000;
1604
-  overflow: auto;
1605
-  background-color: #ffffff;
1606
-}
1607
-
1608
-.groupsList, .usersList {
1609
-  display: block;
1610
-  position: relative;
1611
-  float: left;
1612
-  padding: 6px 4px;
1613
-  width: 300px;
1614
-  height: auto;
1615
-  color: #353535;
1616
-  border-radius: 6px;
1617
-  border: 1px solid #dadada;
1618
-  cursor: pointer;
1619
-}
1620
-
1621
-.groupsList:hover, .usersList:hover {
1622
-  background-color: #f1f1f1;
1623
-}
1624
-
1625
-.selectedGrps, .selectedUsrs {
1626
-  display: inline-block;
1627
-  position: relative;
1628
-  margin: 6px 1px 0px 1px;
1629
-  padding: 0px 6px;
1630
-  color: #353535;
1631
-  background-color: #ffffff;
1632
-  border: 1px solid #dadada;
1633
-  border-radius: 6px;
1634
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1635
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1636
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1637
-}
1638
-
1639
-.removeGroup, .removeUser { 
1640
-  margin: 0px 0px -2px 6px;
1641
-  width: 12px;
1642
-  height: 12px;
1643
-  cursor: pointer;
1644
-}
1645
-
1646
-.showAllGroups, .showAllUsers {
1647
-  max-width: 40px !important;
1648
-  margin: 3px 10px 0px 6px;
1649
-  background-color: #ffffff;
1650
-  border-radius: 6px;
1651
-  padding: 4px 4px 0px 4px;
1652
-  z-index: 5000;
1653
-}
1654
-
1655
-.showAllGroupsak {
1656
-  max-width: 40px !important;
1657
-  margin: 3px 12px 0px 6px;
1658
-  background-color: #F7F7F7;
1659
-  border-radius: 6px;
1660
-  padding: 4px 4px 0px 4px;
1661
-}
1662
-
1663
-.showAllUsersak {
1664
-  max-width: 40px !important;
1665
-  margin: 3px 10px 0px 6px;
1666
-  background-color: #F7F7F7;
1667
-  border-radius: 6px;
1668
-  padding: 4px 4px 0px 4px;
1669
-}
1670
-
1671
-.showByNmbrTitle {
1672
-  display: block;
1673
-  width: 100%;
1674
-  color: #353535;
1675
-  text-align: center;
1676
-  font-size: 16px; 
1677
-  font-weight: 500;
1678
-  margin: 0px auto 5px auto;
1679
-}
1680
-
1681
-.marksent {
1682
-  background-color: #F2FBFF !important;
1683
-}
1684
-
1685
-.markreceived {
1686
-  background-color: #F2FFF5 !important;
1687
-}
1688
-
1689
-#sentfiltersrow, #recfiltersrow, #grpfiltersrow {
1690
-  display: none;
1691
-  position: sticky;
1692
-  top: 27px;
1693
-  background: #FFFFFF;
1694
-  box-shadow: 0 6px 7px rgba(0, 0, 0, 0.1);
1695
-  z-index: 1000;
1696
-}
1697
-
1698
-#sentSmsTable th, #recSmsTable th, #groupedSmsTable th {
1699
-  position: sticky;
1700
-  top: 27px;
1701
-  z-index: 999;
1702
-  border: 1px solid #f3f3f3;
1703
-  padding: 7px;
1704
-  background-color: #bfe5f2;
1705
-  font-size: 15px;
1706
-  font-weight: bold;
1707
-  text-align: center;
1708
-}
1709
-
1710
-#sentSmsTable td, #recSmsTable td {
1711
-  border: 1px solid #f3f3f3;
1712
-  padding: 5px;
1713
-  white-space: normal;
1714
-}
1715
-
1716
-.datecolsent {
1717
-  text-align: center;
1718
-}
1719
-
1720
-.sentdbidcolumn {
1721
-  text-align: center;
1722
-}
1723
-
1724
-.dbidcolumnrec {
1725
-  width: 50px;
1726
-  text-align: center;
1727
-}
1728
-
1729
-.messagecolumnsent {
1730
-  background: #fffff2;
1731
-  text-align: left;
1732
-  font-weight: 500;
1733
-  width: 250px;
1734
-  word-break: break-word;
1735
-}
1736
-
1737
-.messagecolumnrec {
1738
-  background: #fffff2;
1739
-  text-align: left;
1740
-  font-weight: 500;
1741
-  width: 526px;
1742
-  word-break: break-word;
1743
-}
1744
-
1745
-.messageAuthorName {
1746
-  border: 0px;
1747
-  border-radius: 20px;
1748
-  padding: 4px 10px;
1749
-  margin: 0px 4px 0px 0px;
1750
-  color: #414141;
1751
-  background-color: #eff9ff;
1752
-}
1753
-
1754
-.msgAuthorNameGrp {
1755
-  border: 0px;
1756
-  border-radius: 20px;
1757
-  padding: 3px 8px;
1758
-  margin: 0px 4px 0px 0px;
1759
-  color: #616161;
1760
-  background-color: #e8edff !important;
1761
-}
1762
-
1763
-.addNameToPhNb {
1764
-  cursor: pointer;
1765
-  border-radius: 20px;
1766
-}
1767
-
1768
-.listToFromMsgs {
1769
-  display: block;
1770
-  margin: 0 auto;
1771
-  width: 30px;
1772
-  text-align: center;
1773
-  cursor: pointer;
1774
-}
1775
-
1776
-.lstMsgConv {
1777
-  display: block;
1778
-  position: relative;
1779
-  width: 30px;
1780
-  height: auto;
1781
-  text-align: center;
1782
-  margin: 4px auto 0 auto;
1783
-}
1784
-
1785
-.lstMsgConvImg {
1786
-  cursor: pointer;
1787
-  height: auto;
1788
-}
1789
-
1790
-.lstMsgToFromImg {
1791
-  cursor: pointer;
1792
-  height: auto;
1793
-}
1794
-
1795
-.lstMsgToFromImg:hover, .lstMsgConvImg:hover {
1796
-   box-shadow: 0 0 7px rgba(0, 0, 0, 0.25);
1797
-   -webkit-box-shadow: 0 0 7px rgba(0, 0, 0, 0.25);
1798
-   -moz-box-shadow: 0 0 7px rgba(0, 0, 0, 0.25);
1799
-}
1800
-
1801
-.lstMsgToFromImg:active, .lstMsgConvImg:hover {
1802
-   box-shadow: 0 0 9px rgba(0, 0, 0, 0.25);
1803
-   -webkit-box-shadow: 0 0 9px rgba(0, 0, 0, 0.25);
1804
-   -moz-box-shadow: 0 0 9px rgba(0, 0, 0, 0.25);
1805
-}
1806
-
1807
-
1808
-#loadMoreMsgs, #loadMoreMsgsusr {
1809
-  display: none;
1810
-  margin: 1px auto 2px auto;
1811
-  width: 180px;
1812
-  height: 22px;
1813
-  border: 1px solid #b8d4e6;
1814
-  border-radius: 20px;
1815
-  color: #6c91b2;
1816
-  line-height: normal;
1817
-  text-align: center;
1818
-  font-size: 15px;
1819
-  font-weight: 500;
1820
-  cursor: pointer;
1821
-}
1822
-
1823
-#loadMoreMsgs:hover, #loadMoreMsgsusr:hover {
1824
-  color: #3a6c9a;
1825
-  border: 1px solid #95bad3;
1826
-}
1827
-
1828
-#loadMoreMsgs:active, #loadMoreMsgsusr:active {
1829
-  box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1830
-  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1831
-  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1832
-  border: 1px solid #79a2be;
1833
-}
1834
-
1835
-.addNameToPhNb:hover {
1836
-  box-shadow: 0 0 8px rgba(0, 0, 0, 0.23);
1837
-  -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.23);
1838
-  -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.23);
1839
-}
1840
-
1841
-.addNameToPhNb:active {
1842
-  box-shadow: 0 0 12px rgba(0, 0, 0, 0.33);
1843
-  -webkit-box-shadow: 0 0 12px rgba(0, 0, 0, 0.33);
1844
-  -moz-box-shadow: 0 0 12px rgba(0, 0, 0, 0.33);
1845
-}
1846
-
1847
-#recTblOverlay, #alertMsgOverlay {
1848
-  display: block;
1849
-  position: absolute;
1850
-  top: 0;
1851
-  left: 0;
1852
-  width: 100%;
1853
-  height: 100%;
1854
-  background-color: #000000;
1855
-  opacity: 0.09;
1856
-  z-index: 5050;
1857
-}
1858
-
1859
-#disNameWindow, #alertMessage {
1860
-  display: block;
1861
-  position: absolute;
1862
-  width: 338px;
1863
-  height: auto;
1864
-  white-space: pre-wrap;
1865
-  border-radius: 6px;
1866
-  background-color: #ffffff;
1867
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1868
-   -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1869
-   -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
1870
-  z-index: 5100;
1871
-}
1872
-
1873
-#alertTextWrap {
1874
-  display: block;
1875
-  text-align: left;
1876
-  font-size: 16px;
1877
-  margin: 30px 22px 16px 22px;
1878
-  color: #353535;
1879
-  white-space: pre-wrap;
1880
-  word-break: break-word;
1881
-}
1882
-
1883
-#closeDisNmWindow {
1884
-  display: block;
1885
-  position: absolute;
1886
-  width: 16px;
1887
-  height: 16px;
1888
-  right: 8px;
1889
-  top: 10px;
1890
-  padding: 0;
1891
-  background-image: url('../img/closewnd.svg');
1892
-  background-repeat: no-repeat;
1893
-  background-position: center center;
1894
-  cursor: pointer;
1895
-}
1896
-
1897
-#closeFrmMsgWindow, #closeAlertWnd {
1898
-  display: block;
1899
-  position: absolute;
1900
-  width: 14px;
1901
-  height: 14px;
1902
-  right: 8px;
1903
-  top: 10px;
1904
-  padding: 0;
1905
-  background-image: url('../img/closewnd.svg');
1906
-  background-repeat: no-repeat;
1907
-  background-position: center center;
1908
-  cursor: pointer;
1909
-}
1910
-
1911
-#sendMsgConvBtn {
1912
-  display: flex;
1913
-  width: 200px;
1914
-  height: 20px;
1915
-  padding: 0;
1916
-  margin: -2px auto 0 auto;
1917
-  color: #ffffff;
1918
-  background: #40c1a3;
1919
-  border: 1px solid #40c1a3;
1920
-  border-radius: 20px;
1921
-  text-align: center;
1922
-  font-weight: 500;
1923
-  cursor: pointer;
1924
-  line-height: normal;
1925
-  justify-content: center;
1926
-  align-items: end;
1927
-}
1928
-
1929
-#sendMsgConvBtn:hover {
1930
-  background-color:  #3bb397 !important;
1931
-  box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1932
-  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1933
-  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1934
-}
1935
-
1936
-#sendMsgConvBtn:active {
1937
-  background-color: #33a087 !important;
1938
-  box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1939
-  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1940
-  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.23);
1941
-}
1942
-
1943
-#saveDispName, #alertOk {
1944
-  display: block;
1945
-  border-radius: 20px !important;
1946
-  padding: 0px 14px !important;
1947
-  margin: 10px auto !important;
1948
-  color: #ffffff !important;
1949
-  background-color: #40c1a3 !important;
1950
-}
1951
-
1952
-#saveDispName:hover, #alertOk:hover {
1953
-  background-color:  #3bb397 !important;
1954
-}
1955
-
1956
-#saveDispName:active, #alertOk:active {
1957
-  background-color: #33a087 !important;
1958
-}
1959
-
1960
-#sendMsgReply {
1961
-  display: none;
1962
-}
1963
-
1964
-#sendMsgConv {
1965
-  display: block;
1966
-  width: 558px;
1967
-  height: auto;
1968
-  margin: 0 auto;
1969
-  border: none;
1970
-}
1971
-
1972
-#sendMsgConv td {
1973
-  background-color: #ffffff;
1974
-  border: none;
1975
-}
1976
-
1977
-#sendMsgConvText {
1978
-  display: inline-block;
1979
-  width: 558px;
1980
-  height: 72px;
1981
-  padding: 3px 5px;
1982
-  color: #000000;
1983
-  text-align: left;
1984
-  font-size: 16px;
1985
-  border-radius: 6px;
1986
-  resize: none;
1987
-  white-space: pre-wrap;
1988
-  border: 1px solid #dedede;
1989
-  background-color: #ffffff;
1990
-  overflow-y: auto;
1991
-}
1992
-
1993
-#fromPhoneNmbrConv {
1994
-  display: inline-block;
1995
-  width: 50%;
1996
-  height: auto;
1997
-  margin: 6px 0px 2px 10px;
1998
-  font-weight: 500;
1999
-  color: #222222;
2000
-}
2001
-
2002
-#toPhoneNmbrConv {
2003
-  display: inline-block;
2004
-  width: 50%;
2005
-  height: auto;
2006
-  margin: 6px 0px 2px -20px;
2007
-  font-weight: 500;
2008
-  color: #222222;
2009
-  text-align: right;
2010
-}
2011
-
2012
-#selectFromNbConv {
2013
-  height: 26px;
2014
-  width: auto;
2015
-  margin: 0;
2016
-  text-align: left;
2017
-  color: #222222;
2018
-  background-color: #ffffff !important;
2019
-  border: 1px solid #d8d8d8;
2020
-}
2021
-
2022
-#listAllMsgsFromTo {
2023
-  display: block;
2024
-  position: absolute;
2025
-  width: 600px;
2026
-  height: 490px;
2027
-  white-space: pre-wrap;
2028
-  border-radius: 6px;
2029
-  background-color: #ffffff;
2030
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2031
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2032
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2033
-  z-index: 5100;
2034
-}
2035
-
2036
-#listAllMsgsConv {
2037
-  display: block;
2038
-  position: absolute;
2039
-  width: 600px;
2040
-  height: 490px;
2041
-  white-space: pre-wrap;
2042
-  border-radius: 6px;
2043
-  background-color: #ffffff;
2044
-  box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2045
-  -webkit-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2046
-  -moz-box-shadow: 0 0 23px rgba(0, 0, 0, 0.23);
2047
-  z-index: 5100;
2048
-}
2049
-
2050
-#expandWindowRpl {
2051
-  display: block;
2052
-  margin: 4px auto 0 auto;
2053
-  cursor: pointer;
2054
-}
2055
-
2056
-#dragDispNmWindow {
2057
-  display: block;
2058
-  position: relative;
2059
-  width: 40px;
2060
-  height: 20px;
2061
-  margin:-3px auto 0px auto;
2062
-  cursor: grab;
2063
-  text-align: center;
2064
-}
2065
-
2066
-#draglstMsgmWindow {
2067
-  display: block;
2068
-  position: relative;
2069
-  width: 500px;
2070
-  height: 20px;
2071
-  margin:-3px auto 0px auto;
2072
-  cursor: grab;
2073
-  text-align: center;
2074
-}
2075
-
2076
-#draglstMsgmWindowsc {
2077
-  display: block;
2078
-  position: absolute;
2079
-  width: 100%;
2080
-  height: 14px;
2081
-  bottom: 3px;
2082
-  cursor: grab;
2083
-  text-align: center;
2084
-}
2085
-
2086
-#frmMsgLstWrap {
2087
-  display: block;
2088
-  position: relative;
2089
-  width: 560px;
2090
-  height: 400px;
2091
-  margin: 0 auto;
2092
-  overflow-y: auto;
2093
-  overflow-x: hidden;
2094
-}
2095
-
2096
-#frmMsgLstTbl {
2097
-  display: block;
2098
-  position: relative;
2099
-  width: 100%;
2100
-  height: 100%;
2101
-}
2102
-
2103
-#frmMsgLstTbl td {
2104
-  text-align: left;
2105
-  vertical-align: top;
2106
-  background-color: #ffffff !important;
2107
-}
2108
-
2109
-.groupedLstNamespn {
2110
-  display: block;
2111
-  position: fixed;
2112
-  width: 130px;
2113
-  height: auto;
2114
-  padding: 0px 0px 0px 4px;
2115
-  overflow-y: auto;
2116
-  white-space: pre-wrap;
2117
-}
2118
-
2119
-#msgListRowCell {
2120
-  display: block;
2121
-  width: 428px;
2122
-  height: auto;
2123
-  margin: 0px 0px 0px 130px;
2124
-  padding: 0px 0px 0px 4px;
2125
-  overflow: scroll;
2126
-  white-space: nowrap;
2127
-}
2128
-
2129
-.dispNameListAll {
2130
-  display: block;
2131
-  width: 100%;
2132
-  height: auto;
2133
-  border: 1px solid #c6cedb;
2134
-  border-radius: 20px;
2135
-  margin: 6px 0px 0px 0px;
2136
-  color: #04957b;
2137
-  font-size: 13px;
2138
-  padding: 0px 9px;
2139
-  text-align: center;
2140
-  font-weight: 500;
2141
-  cursor: pointer;
2142
-}
2143
-
2144
-#selectAllChckbx:hover {
2145
-  cursor: pointer;
2146
-}
2147
-
2148
-.indivchckbx:hover {
2149
-  cursor: pointer;
2150
-}
2151
-
2152
-.selectsmsdv {
2153
-  width: 30px;
2154
-  padding: 5px 5px 5px 7px;
2155
-  text-align: center;
2156
-}
2157
-
2158
-#selectalldv {
2159
-  width: 30px;
2160
-  padding: 5px 5px 5px 7px;
2161
-}
2162
-
2163
-.indivfilter {
2164
-  height: 30px;
2165
-  font-weight: bold;
2166
-  padding: 0px;
2167
-}
2168
-
2169
-.selectalldvfilter {
2170
-  border: 1px solid #f3f3f3;
2171
-  padding: 3px;
2172
-  margin: 0px; 
2173
-}
2174
-
2175
-.filterbuttonsrec, .filterbuttonsent {
2176
-  display: block;
2177
-  position: relative;
2178
-  margin: 5px auto !important;
2179
-  border-radius: 3px !important;
2180
-  background-color: #ffffff !important;
2181
-  background-image: url('../img/filter_icon.svg');
2182
-  background-repeat: no-repeat;
2183
-  background-position: center center;
2184
-  cursor: pointer;
2185
-}
2186
-
2187
-#clearrecfilters, #clearsentfilters, #cleargrpfilter {
2188
-  display: inline-block;
2189
-  width: 22px;
2190
-  height: 22px;
2191
-  background-color: #ffffff;
2192
-  background-image: url('../img/clearfilters.svg');
2193
-  background-repeat: no-repeat;
2194
-  background-position: center center;
2195
-  margin: 0px 0px 8px 0px;
2196
-  border: none;
2197
-  cursor: pointer;
2198
-}
2199
-
2200
-#deleterecrows, #deletesentrows {
2201
-  display: inline-block;
2202
-  width: 16px;
2203
-  height: 20px;
2204
-  background-color: #ffffff;
2205
-  background-image: url('../img/garbage.svg');
2206
-  background-repeat: no-repeat;
2207
-  background-position: center center;
2208
-  margin: 0px 0px 4px 0px;
2209
-  border: none;
2210
-  cursor: pointer;
2211
-}
2212
-
2213
-#deleterecrows:active, #deletesentrows:active {
2214
-  background-image: url('../img/garbage_bright.svg');
2215
-}
2216
-
2217
-#toptablerec, #toptablesent, #toptablegrp {
2218
-  display: block;
2219
-  position: sticky;
2220
-  top: 0px;
2221
-  height: 27px;
2222
-  width: 100%;
2223
-  z-index: 1001;
2224
-}
2225
-
2226
-.topbuttonandpage {
2227
-  display: block;
2228
-  position: relative;
2229
-  width: 100%;
2230
-  height: 27px;
2231
-  border-radius: 0px 24px 0px 0px;
2232
-  background: #FFFFFF;
2233
-  z-index: 1001;
2234
-}
2235
-
2236
-#paginationrec, #paginationsent, #paginationgrp {
2237
-   display: block;
2238
-   position: relative;
2239
-   float: right;
2240
-   width: auto;
2241
-   margin: -25px 14px 0px 0px;
2242
-   font-size: 16px;
2243
-   font-weight: bold;
2244
-   color: #0082C9;
2245
-   z-index: 1002;
2246
-}
2247
-
2248
-.arrowDownCl {
2249
-   background-image: url('../img/arrowDown.svg');
2250
-   background-repeat: no-repeat;
2251
-   background-position: center center;
2252
-   z-index: 1010;
2253
-}
2254
-
2255
-.arrowUpCl {
2256
-   background-image: url('../img/arrowUp.svg');
2257
-   background-repeat: no-repeat;
2258
-   background-position: center center;
2259
-   z-index: 1010;   
2260
-}
2261
-
2262
-@media (max-width: 1020px) {
2263
-  #recarrow, #sentarrow {
2264
-    display: block;
2265
-    position: relative;
2266
-    float: left;
2267
-    margin: 3.8px 0px 0px 50px;
2268
-    width: 17px;
2269
-    height: 17px;
2270
-    border: none;
2271
-    cursor: pointer;
2272
-  }
2273
-}
2274
-
2275
-@media (min-width: 1021px) {
2276
-  #recarrow, #sentarrow {
2277
-    display: block;
2278
-    position: relative;
2279
-    float: left;
2280
-    margin: 3.8px 0px 0px 5px;
2281
-    width: 17px;
2282
-    height: 17px;
2283
-    border: none;
2284
-    cursor: pointer;
2285
-  }
2286
-}
2287
-
2288
-#totalrecmessages, #totalsentmessages, #totalgrpmessages {
2289
-  display: block;
2290
-  position: relative;
2291
-  padding: 10px 0px 0px 7px;
2292
-  font-size: 14px;
2293
-  font-weight: bold;
2294
-  color: #4cbc86;
2295
-}
2296
-
2297
-.pagenumbers, .pagenumbersbottom, .pagenumbersrec, .pagenumbersbottomrec, .pagenumbersgrp {
2298
-  color: #0082C9;
2299
-}
2300
-
2301
-#dbidtextsent {
2302
-  display: block;
2303
-  margin: auto;
2304
-  width: 95%;
2305
-}
2306
-
2307
-#dbidtextrec {
2308
-  display: block;
2309
-  margin: auto;
2310
-  width: 95%;
2311
-}
2312
-
2313
-#useridtext {
2314
-  display: block;
2315
-  margin: auto;
2316
-  width: 95%;
2317
-}
2318
-
2319
-#useridtextrec {
2320
-  display: block;
2321
-  margin: auto;
2322
-  width: 95%;
2323
-}
2324
-
2325
-#messageidtext {
2326
-  display: block;
2327
-  margin: auto;
2328
-  width: 95%;
2329
-}
2330
-
2331
-#messageidtextrec {
2332
-  display: block;
2333
-  margin: auto;
2334
-  width: 95%;
2335
-}
2336
-
2337
-#datetext {
2338
-  display: block;
2339
-  margin: auto;
2340
-  width: 95px;
2341
-}
2342
-
2343
-#datetextrec {
2344
-  display: block;
2345
-  margin: auto;
2346
-  width: 95%;
2347
-}
2348
-
2349
-#fromtext {
2350
-  display: block;
2351
-  margin: auto;
2352
-  width: 95%;
2353
-}
2354
-
2355
-#fromtextrec {
2356
-  display: block;
2357
-  margin: auto;
2358
-  width: 95%;
2359
-}
2360
-
2361
-#totext {
2362
-  display: block;
2363
-  margin: auto;
2364
-  width: 95%;
2365
-}
2366
-
2367
-#totextrec {
2368
-  display: block;
2369
-  margin: auto;
2370
-  width: 95%;
2371
-}
2372
-
2373
-#networktext {
2374
-  display: block;
2375
-  margin: auto;
2376
-  width: 95%;
2377
-}
2378
-
2379
-#pricetext {
2380
-  display: block;
2381
-  margin: auto;
2382
-  width: 95%;
2383
-}
2384
-
2385
-#statustext {
2386
-  display: block;
2387
-  margin: auto;
2388
-  width: 95%;
2389
-}
2390
-
2391
-#deliveryrcpttext {
2392
-  display: block;
2393
-  margin: auto;
2394
-  width: 95%;
2395
-}
2396
-
2397
-#messagetext {
2398
-  display: block;
2399
-  margin: auto;
2400
-  width: 95%;
2401
-}
2402
-
2403
-#messagetextrec {
2404
-  display: block;
2405
-  margin: auto;
2406
-  width: 95%;
2407
-}
2408
-
2409
-#databaseidfilter {
2410
-  display: block;
2411
-  margin-left: auto;
2412
-  margin-right: auto;
2413
-}
2414
-
2415
-#sentstatuscolumn {
2416
-  max-width: 160px;
2417
-}
2418
-
2419
-.useridcolrec {
2420
-  width: 124px;
2421
-  background-color: #ffffff;
2422
-  text-align: center;
2423
-}
2424
-
2425
-.messageidcolsent {
2426
-  overflow: visible;
2427
-  word-break: break-all;
2428
-  text-align: center;
2429
-}
2430
-
2431
-.messageidcolrec {
2432
-  overflow: visible;
2433
-  word-break: break-all;
2434
-  width: 420px;
2435
-  text-align: center;
2436
-}
2437
-
2438
-.datecolrec {
2439
-  width: 160px;
2440
-  text-align: center;
2441
-}
2442
-
2443
-.fromcolumnrec {
2444
-  width: 140px;
2445
-  text-align: center;
2446
-  background-color: #f2fff5;
2447
-}
2448
-
2449
-.tocolrec {
2450
-  width: 140px;
2451
-  background-color: #f2fbff;
2452
-  text-align: center;
2453
-}
2454
-
2455
-.networkcolumnsent {
2456
-  max-width: 90px;
2457
-  background-color: #ffffff;
2458
-  word-break: break-word;
2459
-  text-align: center;
2460
-}
2461
-
2462
-.useridcolsent, .pricecolumnsent, .statuscolumnsent, .deliveryrcptcolsent {
2463
-  background-color: #ffffff;
2464
-  text-align: center;
2465
-}
2466
-
2467
-.tocolumnsent {
2468
-  background-color: #f2fbff;
2469
-  text-align: center;
2470
-}
2471
-
2472
-.fromcolumnsent {
2473
-  background-color: #f2fff5;
2474
-  text-align: center;
2475
-}
2476
-
2477
-.active {
2478
-  color: #c62b71;
2479
-}
2480
-
2481
-#deleteoldmssgs {
2482
-  display: inline-block;
2483
-  position: relative;
2484
-  margin: 10px 0px 10px 1px;
2485
-  font-size: 16px;
2486
-  font-weight: bold;
2487
-}
2488
-
2489
-#deleteoldsms {
2490
-  display: none;
2491
-  background: #e8f6ff;
2492
-  border-radius: 6px;
2493
-  padding: 5px;
2494
-}
2495
-
2496
-#delOldrecSMS, #delOldsentSMS {
2497
-  display: block;
2498
-  background-color: #0082C9;
2499
-  color: #ffffff;
2500
-  margin: 10px 0px 10px 5px;
2501
-  border-radius: 20px;  
2502
-}
2503
-
2504
-#delOldrecSMS:active, #delOldsentSMS:active {
2505
-  background: #00a2f9;
2506
-}
2507
-
2508
-#delsetrows {
2509
-  display: block;
2510
-  padding: 5px;
2511
-}
2512
-
2513
-.deletesmsolder {
2514
-  display: inline;
2515
-  font-size: 16px;
2516
-  font-weight: bold;
2517
-}
2518
-
2519
-#oldrecSmsInterval, #oldsentSmsInterval {
2520
-  display: inline;
2521
-  width: 60px;
2522
-  height: 25px;
2523
-  padding: 0px 0px 0px 10px;
2524
-  font-size: 14px;
2525
-  font-weight: bold;
2526
-  border-radius: 20px;
2527
-}
2528
-
2529
-#upArrow {
2530
-  background-image: url("../img/arrow-top.svg");
2531
-  background-repeat: no-repeat;
2532
-  background-color: transparent !important;
2533
-  opacity: 0.30;
2534
-  position: fixed;
2535
-  bottom: 40px;
2536
-  right: 4px;
2537
-  width: 50px;
2538
-  height: 50px;
2539
-  border: none;
2540
-  cursor: pointer;
2541
-  display: none;
2542
-  z-index: 1010;
2543
-}
2544
-
2545
-#upArrow:hover {
2546
-  opacity: 1;
2547
-}
2548
-
2549
-#arrowupWrap {
2550
-  display: block;
2551
-  position: sticky;
2552
-  width: 20px;
2553
-  height: 20px;
2554
-  bottom: 14px;
2555
-  left: 530px;
2556
-}
2557
-
2558
-#upArrowSmall {
2559
-  background-image: url("../img/arrow-top-small.svg");
2560
-  background-repeat: no-repeat;
2561
-  background-color: transparent !important;
2562
-  width: 21px;
2563
-  height: 21px;
2564
-  opacity: 0.30;
2565
-  border: none;
2566
-  cursor: pointer;
2567
-  display: none;
2568
-  z-index: 5300;
2569
-}
2570
-
2571
-#upArrowSmall:hover {
2572
-  opacity: 1;
2573
-}
2574
-
2575
-.opensmsfolder {
2576
-  display: block;
2577
-  position: relative;
2578
-  margin: 10px 0px 10px 0px !important;
2579
-  padding: 7px 0px 7px 0px;
2580
-  width: 100% !important;
2581
-  color: #FFFFFF !important;
2582
-  font-size: 15px !important;
2583
-  background-color: #CB99C5 !important;
2584
-}
2585
-
2586
-.opensmsfolder:hover {
2587
-  border: 2px;
2588
-  background-color: #c18bba !important;
2589
-}
2590
-
2591
-.opensmsfolder:active {
2592
-  background-color: #b777af !important;
2593
-  border: 2px;
2594
-  color: #FFFFFF !important;
2595
-  border-color: #b777af;
2596
-}
2597
-
2598
-.opensmsfolder:focus {
2599
-  background-color: #a3669b !important;
2600
-  border: 2px;
2601
-  border-color: #a3669b;
2602
-}
2603
-
2604
-#save_sms_settings {
2605
-  display: inline-block;
2606
-  border-radius: 8px !important;
2607
-  padding: 0px 14px !important;
2608
-  color: #ffffff !important;
2609
-  background-color: #1e89c2 !important;
2610
-}
2611
-
2612
-#save_sms_settings:hover {
2613
-  background-color: #0369a0 !important;
2614
-}
2615
-
2616
-#save_sms_settings:active {
2617
-  background-color: #025480 !important;
2618
-}
2619
-
2620
-/* Changes for dark themes */
2621
-[data-theme-dark] .srheader,
2622
-[data-theme-dark-highcontrast] .srheader {
2623
-  display: block;
2624
-  position: relative;
2625
-  margin: 0px 0px 7px 0px;
2626
-  color: #fafafa;
2627
-  font-size: 17px;
2628
-  font-weight: bold;
2629
-}
2630
-
2631
-[data-theme-dark] #sendtomultiple,
2632
-[data-theme-dark-highcontrast] #sendtomultiple {
2633
-  display: inline-block;
2634
-  position: relative;
2635
-  margin: 10px 0px 12px 0px;
2636
-  color: #fafafa;
2637
-  font-size: 16px;
2638
-  font-weight: bold;
2639
-}
2640
-
2641
-[data-theme-dark] #entermessage,
2642
-[data-theme-dark-highcontrast] #entermessage {
2643
-  display: block;
2644
-  position: relative;
2645
-  margin: 10px 0px 0px 0px;
2646
-  color: #fafafa;
2647
-  font-size: 16px;
2648
-  font-weight: bold;
2649
-}
2650
-
2651
-[data-theme-dark] #sendmediafl,
2652
-[data-theme-dark-highcontrast] #sendmediafl {
2653
-  display: block;
2654
-  position: relative;
2655
-  margin: 0px 0px 20px 0px;
2656
-  color: #fafafa;
2657
-  font-size: 16px;
2658
-  font-weight: bold;
2659
-}
2660
-
2661
-[data-theme-dark] #deleteoldmssgs,
2662
-[data-theme-dark-highcontrast] #deleteoldmssgs {
2663
-  display: inline-block;
2664
-  position: relative;
2665
-  margin: 10px 0px 10px 1px;
2666
-  color: #fafafa;
2667
-  font-size: 16px;
2668
-  font-weight: bold;
2669
-}
2670
-
2671
-[data-theme-dark] #smsto,
2672
-[data-theme-dark-highcontrast] #smsto {
2673
-  display: block;
2674
-  width: 99%;
2675
-  max-height: 32px;
2676
-  padding: 0px 15px 0px 15px;
2677
-  color: #fafafa;
2678
-  font-size: 16px;
2679
-  font-weight: bold;
2680
-  border-radius: 20px;
2681
-}
2682
-
2683
-[data-theme-dark] #smstext,
2684
-[data-theme-dark-highcontrast] #smstext {
2685
-  display: inline-block;
2686
-  color: #fafafa;
2687
-  width: 100%;
2688
-  height: 130px;
2689
-  text-align: left;
2690
-  font-size: 16px;
2691
-  border-radius: 6px;
2692
-  resize: vertical;
2693
-  white-space: pre-wrap;
2694
-}
2695
-
2696
-
2697
-[data-theme-dark] .arplText,
2698
-[data-theme-dark-highcontrast] .arplText {
2699
-  display: inline-block;
2700
-  color: #fafafa;
2701
-  width: 330px;
2702
-  height: 184px;
2703
-  font-size: 15px;
2704
-  text-align: left;
2705
-  border: 1px solid #000;
2706
-  border-radius: 6px;
2707
-  margin: 0px 1px 0px 0px;
2708
-  resize: vertical;
2709
-  white-space: pre-wrap;
2710
-  overflow: auto;
2711
-}
2712
-
2713
-[data-theme-dark] .tooltipbalanceid #infobalance,
2714
-[data-theme-dark-highcontrast] .tooltipbalanceid #infobalance {
2715
-  display: block;
2716
-  position: relative;
2717
-  margin: 4px 14px 0px 0px;
2718
-  color: #fafafa;
2719
-  font-size: 21px;
2720
-  font-weight: bold;
2721
-  font-family: 'Liberation Serif', sans-serif;
2722
-  font-style: italic;
2723
-  z-index: 6;
2724
-}
2725
-
2726
-[data-theme-dark] #infotipid,
2727
-[data-theme-dark-highcontrast] #infotipid {
2728
-  display: block;
2729
-  position: relative;
2730
-  margin: 4px 14px 0px 0px;
2731
-  color: #fafafa;
2732
-  font-size: 21px;
2733
-  font-weight: bold;
2734
-  font-family: 'Liberation Serif', sans-serif;
2735
-  font-style: italic;
2736
-  z-index: 5;
2737
-}
2738
-
2739
-[data-theme-dark] .fortooltip .texttooltip, [data-theme-dark] .maxmessagelength .texttooltip,
2740
-[data-theme-dark-highcontrast] .fortooltip .texttooltip, [data-theme-dark-highcontrast] .maxmessagelength .texttooltip {
2741
-  font-family: 'Liberation Serif', Calibri, sans-serif;
2742
-  font-style: italic;
2743
-  color: #fafafa;
2744
-  font-size: 21px;
2745
-  font-weight: bold;
2746
-  margin: 0px 0px 4px 4px;
2747
-}
2748
-
2749
-[data-theme-dark] #uploadfileforsms,
2750
-[data-theme-dark-highcontrast] #uploadfileforsms {
2751
-  margin-left: 7px;
2752
-  background-color: #434343;
2753
-  border-radius: 3px !important;
2754
-}
2755
-
2756
-[data-theme-dark] #uploadfileformms,
2757
-[data-theme-dark-highcontrast] #uploadfileformms {
2758
-  margin-left: 21px;
2759
-  background-color: #434343;
2760
-  border-radius: 3px !important;
2761
-}
2762
-
2763
-[data-theme-dark] .smsnbformat a,
2764
-[data-theme-dark-highcontrast] .smsnbformat a {
2765
-  color: #cedfff !important;
2766
-}
2767
-
2768
-[data-theme-dark] .smsnbformat font,
2769
-[data-theme-dark-highcontrast] .smsnbformat font {
2770
-  color: #f7547a !important;
2771
-}
2772
-
2773
-[data-theme-dark] .indivfiltersent, [data-theme-dark] .indivfilterrec,
2774
-[data-theme-dark-highcontrast] .indivfiltersent, [data-theme-dark-highcontrast] .indivfilterrec {
2775
-  color: #fafafa !important;
2776
-}
2777
-
2778
-[data-theme-dark] #recSmsTable, [data-theme-dark] #groupedSmsTable, [data-theme-dark] #sentSmsTable,
2779
-[data-theme-dark-highcontrast] #recSmsTable, [data-theme-dark-highcontrast] #groupedSmsTable, [data-theme-dark-highcontrast] #sentSmsTable {
2780
-  color: #272727 !important;
2781
-}
2782
-
2783
-[data-theme-dark] .providerSettings .setlabeltext,
2784
-[data-theme-dark-highcontrast] .providerSettings .setlabeltext {
2785
-  color: #272727;
2786
-}
2787
-
2788
-[data-theme-dark] .providerName,
2789
-[data-theme-dark-highcontrast] .providerName  {
2790
-   font-size: 18px;
2791
-   font-weight: bold;
2792
-   margin-bottom: 20px;
2793
-   color: #272727;
2794
-}
2795
-
2796
-[data-theme-dark] .selectHrMin, 
2797
-[data-theme-dark-highcontrast] .selectHrMin,
2798
-[data-theme-dark] .startDate,
2799
-[data-theme-dark-highcontrast] .startDate,
2800
-[data-theme-dark] .endDate,
2801
-[data-theme-dark-highcontrast] .endDate {
2802
-   color: #ffffff !important;
2803
-}
2804
-
2805
-[data-theme-dark] #infoautoreply, [data-theme-dark] #infoautoreplyst, [data-theme-dark] #infoautoreplypn,
2806
-[data-theme-dark-highcontrast] #infoautoreply, [data-theme-dark-highcontrast] #infoautoreplyst, [data-theme-dark-highcontrast] #infoautoreplypn {
2807
-   color: #ffffff;
2808
-}
2809
-
2810
-[data-theme-dark] .generateUrl,
2811
-[data-theme-dark-highcontrast] .generateUrl {
2812
-   color: #013351 !important;
2813
-}
2814 0
deleted file mode 100644
... ...
@@ -1,40 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
-<svg
3
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
4
-   xmlns:cc="http://creativecommons.org/ns#"
5
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
-   xmlns:svg="http://www.w3.org/2000/svg"
7
-   xmlns="http://www.w3.org/2000/svg"
8
-   height="14"
9
-   width="14"
10
-   version="1.1"
11
-   viewbox="0 0 16 16"
12
-   id="svg4">
13
-  <metadata
14
-     id="metadata10">
15
-    <rdf:RDF>
16
-      <cc:Work
17
-         rdf:about="">
18
-        <dc:format>image/svg+xml</dc:format>
19
-        <dc:type
20
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
21
-        <dc:title></dc:title>
22
-      </cc:Work>
23
-    </rdf:RDF>
24
-  </metadata>
25
-  <defs
26
-     id="defs8" />
27
-  <g
28
-     id="g865"
29
-     transform="matrix(0.73123197,0,0,0.73123197,-14.943405,3.9617649)"
30
-     style="fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:3.41889;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
31
-    <path
32
-       style="fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:3.41889;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
33
-       d="M 35.011646,-3.7084868 22.145374,9.1577854"
34
-       id="path841" />
35
-    <path
36
-       style="fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:3.41889;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
37
-       d="M 22.145374,-3.7084868 35.011646,9.1577854"
38
-       id="path841-8" />
39
-  </g>
40
-</svg>
41 0
deleted file mode 100644
... ...
@@ -1,828 +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
-  // Get admin settings
26
-  var userid = "<?php p($userId); ?>";
27
-  var baseUrlget = OC.generateUrl('/apps/sms_relentless/user/getadminsettings');
28
-
29
-  $.ajax({
30
-     method: 'GET',
31
-     url: baseUrlget + '/' + userid,
32
-     contentType: 'application/json',
33
-     success: function(settingsadm) {
34
-
35
-          $("#telapi_key").val(settingsadm.telapi_key);
36
-          $("#tel_pub_key").val(settingsadm.tel_pub_key);
37
-          $("#telapi_url_rec").val(settingsadm.telapi_url_rec);
38
-          $("#telapi_url").val(settingsadm.telapi_url);
39
-          $("#messaging_profile_id").val(settingsadm.messaging_profile_id);
40
-          $("#nexapi_key").val(settingsadm.nexapi_key);
41
-          $("#nexapi_secret").val(settingsadm.nexapi_secret);
42
-          $("#nexapi_url_rec").val(settingsadm.nexapi_url_rec);
43
-          $("#nexapi_url").val(settingsadm.nexapi_url);
44
-          $("#twilapi_key").val(settingsadm.twilapi_key);
45
-          $("#twilapi_secret").val(settingsadm.twilapi_secret);
46
-          $("#twilapi_url_rec").val(settingsadm.twilapi_url_rec);
47
-          $("#twilapi_url").val(settingsadm.twilapi_url);
48
-          $("#flowapi_key").val(settingsadm.flowapi_key);
49
-          $("#flowapi_secret").val(settingsadm.flowapi_secret);
50
-          $("#flowapi_url_rec").val(settingsadm.flowapi_url_rec);
51
-          $("#flowapi_url").val(settingsadm.flowapi_url);
52
-          $("#tel_sender_name").val(settingsadm.tel_sender_name);
53
-          $("#nex_sender_name").val(settingsadm.nex_sender_name);
54
-          $("#twil_sender_name").val(settingsadm.twil_sender_name);
55
-/*
56
-          $("#messagesperpage").val(settingsadm.messagesperpage);
57
-
58
-          if (settingsadm.get_notify == 1) {
59
-              $("#get_notify").attr('checked', true);
60
-          } else {
61
-              $("#get_notify").attr('checked', false);
62
-          }
63
-
64
-          $("#notification_email").val(settingsadm.notification_email);
65
-
66
-          if (settingsadm.getsmsinemail == 1) {
67
-              $("#includesmsinemail").attr('checked', true);
68
-          } else {
69
-              $("#includesmsinemail").attr('checked', false);
70
-          }
71
-
72
-          if (settingsadm.show_display_names == 1) {
73
-              $("#showdisplaynames").attr('checked', true);
74
-          } else {
75
-              $("#showdisplaynames").attr('checked', false);
76
-          }
77
-*/
78
-          if (settingsadm.show_all_messages == 1) {
79
-              $("#showallmessages").attr("checked", true);
80
-          } else {
81
-              $("#showallmessages").attr("checked", false);
82
-          }
83
-
84
-          var crntadmDispName = settingsadm.admdisplayname;
85
-          var allRestrictions = settingsadm.restrictions;
86
-          var allGroups = settingsadm.allgroups;
87
-          var allUsers = settingsadm.allusers;
88
-          var allGroupswadm = settingsadm.allgroupswadm;
89
-          var allUserswadm = settingsadm.alluserswadm;
90
-          var tnxallowedgrp = settingsadm.allowedkeysuse.tnx_groups_allowed;
91
-          var tnxallowedusr = settingsadm.allowedkeysuse.tnx_users_allowed;
92
-          var plvallowedgrp = settingsadm.allowedkeysuse.plv_groups_allowed;
93
-          var plvallowedusr = settingsadm.allowedkeysuse.plv_users_allowed;
94
-          var twlallowedgrp = settingsadm.allowedkeysuse.twl_groups_allowed;
95
-          var twlallowedusr = settingsadm.allowedkeysuse.twl_users_allowed;
96
-          var flrallowedgrp = settingsadm.allowedkeysuse.flr_groups_allowed;
97
-          var flrallowedusr = settingsadm.allowedkeysuse.flr_users_allowed;
98
-
99
-          // List all the groups and users allowed to access the API keys, for each provider
100
-          if (tnxallowedgrp) {
101
-              var tnxallowedgrparr = tnxallowedgrp.split("|");
102
-              for (var g = 0; g < tnxallowedgrparr.length; g++) {
103
-                   $("#alwdakeyGrps-tnx").append("<div class='selectedGrps'>"+ tnxallowedgrparr[g] +"<img id='rmvGrp-tnx-"+ tnxallowedgrparr[g] +"' class='removeGroup' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
104
-              }
105
-          }
106
-
107
-          if (tnxallowedusr) {
108
-              var tnxallowedusrarr = tnxallowedusr.split("|");
109
-              for (var g = 0; g < tnxallowedusrarr.length; g++) {
110
-                   $("#alwdakeyUsrs-tnx").append("<div class='selectedUsrs'>"+ tnxallowedusrarr[g] +"<img id='rmvUsr-tnx-"+ tnxallowedusrarr[g] +"' class='removeUser' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
111
-              }
112
-          }
113
-
114
-          if (plvallowedgrp) {
115
-              var plvallowedgrparr = plvallowedgrp.split("|");
116
-              for (var g = 0; g < plvallowedgrparr.length; g++) {
117
-                   $("#alwdakeyGrps-plv").append("<div class='selectedGrps'>"+ plvallowedgrparr[g] +"<img id='rmvGrp-plv-"+ plvallowedgrparr[g] +"' class='removeGroup' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
118
-              }
119
-          }
120
-
121
-          if (plvallowedusr) {
122
-              var plvallowedusrarr = plvallowedusr.split("|");
123
-              for (var g = 0; g < plvallowedusrarr.length; g++) {
124
-                   $("#alwdakeyUsrs-plv").append("<div class='selectedUsrs'>"+ plvallowedusrarr[g] +"<img id='rmvUsr-plv-"+ plvallowedusrarr[g] +"' class='removeUser' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
125
-              }
126
-          }
127
-
128
-          if (twlallowedgrp) {
129
-              var twlallowedgrparr = twlallowedgrp.split("|");
130
-              for (var g = 0; g < twlallowedgrparr.length; g++) {
131
-                   $("#alwdakeyGrps-twl").append("<div class='selectedGrps'>"+ twlallowedgrparr[g] +"<img id='rmvGrp-twl-"+ twlallowedgrparr[g] +"' class='removeGroup' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
132
-              }
133
-          }
134
-
135
-          if (twlallowedusr) {
136
-              var twlallowedusrarr = twlallowedusr.split("|");
137
-              for (var g = 0; g < twlallowedusrarr.length; g++) {
138
-                   $("#alwdakeyUsrs-twl").append("<div class='selectedUsrs'>"+ twlallowedusrarr[g] +"<img id='rmvUsr-twl-"+ twlallowedusrarr[g] +"' class='removeUser' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
139
-              }
140
-          }
141
-
142
-          if (flrallowedgrp) {
143
-              var flrallowedgrparr = flrallowedgrp.split("|");
144
-              for (var g = 0; g < flrallowedgrparr.length; g++) {
145
-                   $("#alwdakeyGrps-flr").append("<div class='selectedGrps'>"+ flrallowedgrparr[g] +"<img id='rmvGrp-flr-"+ flrallowedgrparr[g] +"' class='removeGroup' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
146
-              }
147
-          }
148
-
149
-          if (flrallowedusr) {
150
-              var flrallowedusrarr = flrallowedusr.split("|");
151
-              for (var g = 0; g < flrallowedusrarr.length; g++) {
152
-                   $("#alwdakeyUsrs-flr").append("<div class='selectedUsrs'>"+ flrallowedusrarr[g] +"<img id='rmvUsr-flr-"+ flrallowedusrarr[g] +"' class='removeUser' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
153
-              }
154
-          }
155
-
156
-
157
-          // Create a list with all the available groups, excluding the admin group
158
-          var grpsListItemswadm = "";
159
-          $.each(allGroupswadm, function(key, value) {
160
-                 grpsListItemswadm += "<div class='groupsList'>"+ value +"</div>";
161
-          });
162
-
163
-          // Create a list with all the available users, excluding the admins
164
-          var usersListItemswadm = "";
165
-          $.each(allUserswadm, function(key, usrval) {
166
-                 usersListItemswadm += "<div class='usersList'>"+ usrval +"</div>";
167
-          });
168
-          
169
-
170
-          function showListsalwdk() {
171
-
172
-              // Append the list of available groups to the table of groups and users allowed to use the API keys
173
-              $('[id^="showakeyGrps-"]').click(function() {
174
-                 var crtid = $(this).attr("id").split("-")[1];
175
-                 $("#grpsadapik-"+ crtid).remove();
176
-                 $("#showakeyGrps-"+ crtid).append("<div id='grpsadapik-"+ crtid +"' class='grpsList'>"+ grpsListItemswadm +"</div>");
177
-                 $("#adminOverlay").remove();
178
-                 $("#app-content").append("<div id='adminOverlay'></div>");
179
-                 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
180
-
181
-                 $("#adminOverlay").click(function() { 
182
-                    $("#adminOverlay").remove();
183
-                    $("#grpsadapik-"+ crtid).remove();
184
-                    $("#usrsadapik-"+ crtid).remove();
185
-                 });
186
-
187
-                 // Select a group
188
-                 $(".groupsList").click(function() {
189
-                    var slctdGrp = $(this).text();
190
-                    $("#grpsadapik-"+ crtid).remove();
191
-                    var addedTxtgrp = $("#alwdakeyGrps-"+ crtid).text();
192
-
193
-                    if (addedTxtgrp.indexOf(slctdGrp) == -1) {
194
-                        $("#alwdakeyGrps-"+ crtid).append("<div class='selectedGrps'>"+ slctdGrp +"<img id='rmvGrp-"+ crtid +"-"+ slctdGrp +"' class='removeGroup' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
195
-                    } else { showAlert("That group has already been added!"); }
196
-
197
-                    // Remove a group from list
198
-                    $('[id^="rmvGrp-"]').click(function() {
199
-                       $(this).closest(".selectedGrps").remove();
200
-                    });
201
-                 });
202
-
203
-              });
204
-
205
-              // Append the list of available users to the table of groups and users allowed to use the API keys
206
-              $('[id^="showakeyUsrs-"]').click(function() {
207
-
208
-                 var crtidusr = $(this).attr("id").split("-")[1];
209
-                 $("#usrsadapik-"+ crtidusr).remove();
210
-                 $("#showakeyUsrs-"+ crtidusr).append("<div id='usrsadapik-"+ crtidusr +"' class='usrsList'>"+ usersListItemswadm +"</div>");
211
-                 $("#adminOverlay").remove();
212
-                 $("#app-content").append("<div id='adminOverlay'></div>");
213
-                 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
214
-
215
-                 $("#adminOverlay").click(function() { 
216
-                    $("#adminOverlay").remove(); 
217
-                    $("#grpsadapik-"+ crtidusr).remove();
218
-                    $("#usrsadapik-"+ crtidusr).remove();
219
-                 });
220
-
221
-                 // Select a user
222
-                 $(".usersList").click(function() {
223
-                    var slctdUsr = $(this).text();
224
-                    var addedTxtusr = $("#alwdakeyUsrs-"+ crtidusr).text();
225
-
226
-                    if (addedTxtusr.indexOf(slctdUsr) == -1) {
227
-                        $("#alwdakeyUsrs-"+ crtidusr).append("<div class='selectedUsrs'>"+ slctdUsr +"<img id='rmvUsr-"+ crtidusr +"-"+ slctdUsr +"' class='removeUser' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
228
-                    } else { showAlert("That user has already been added!"); }
229
-
230
-                    // Remove a user from list
231
-                    $('[id^="rmvUsr-"]').click(function() {
232
-                       $(this).closest(".selectedUsrs").remove();
233
-                    });
234
-                 });
235
-
236
-              });
237
-
238
-              // Remove a group from the list 
239
-              $('[id^="rmvGrp-"]').click(function() {
240
-                 $(this).closest(".selectedGrps").remove();
241
-              });
242
-
243
-              // Remove a user from the list
244
-              $('[id^="rmvUsr-"]').click(function() {
245
-                 $(this).closest(".selectedUsrs").remove();
246
-              });
247
-
248
-          }
249
-          showListsalwdk();
250
-
251
-
252
-          // Save the data
253
-          function saveAlwdRow() {
254
-             $('[id^="alwdrstsave-"]').unbind("click");
255
-             $('[id^="alwdrstsave-"]').click(function(event) {
256
-
257
-                 event.preventDefault();
258
-                 var crntprov = $(this).attr("id").replace("alwdrstsave-", "");
259
-                 
260
-                 if ($(this).attr("value") == "Save") {
261
-
262
-                     var selGroups = [];
263
-                     $("#alwdakeyGrps-"+ crntprov +" .selectedGrps").each(function() {
264
-                        selGroups.push($(this).text());
265
-                     });
266
-                     if (selGroups.length == 0) { selGroups.push(""); }
267
-
268
-                     var selUsers = [];
269
-                     $("#alwdakeyUsrs-"+ crntprov +" .selectedUsrs").each(function() {
270
-                        selUsers.push($(this).text());
271
-                     });
272
-                     if (selUsers.length == 0) { selUsers.push(""); }
273
-
274
-                     // Check if the access key fields have been left empty
275
-                     if (crntprov == 'tnx' && ($("#telapi_key").val().trim() == '' || $("#tel_pub_key").val().trim() == '' || $("#messaging_profile_id").val().trim() == '')) {
276
-                         showAlert("Please first fill in the fields: 'Telnyx API Secret Key', 'Telnyx Account Public Key' and 'Messaging Profile ID'");
277
-                         return;
278
-                     } else if (crntprov == 'plv' && ($("#nexapi_key").val().trim() == '' || $("#nexapi_secret").val().trim() == '')) {
279
-                         showAlert("Please first fill in the fields: 'Plivo Auth ID' and 'Plivo Auth Token'.");
280
-                         return;
281
-                     } else if (crntprov == 'twl' && ($("#twilapi_key").val().trim() == '' || $("#twilapi_secret").val().trim() == '')) {
282
-                         showAlert("Please first fill in the fields: 'Twilio Account SID' and 'Twilio Auth Token'.");
283
-                         return;
284
-                     } else if (crntprov == 'flr' && ($("#flowapi_key").val().trim() == '' || $("#flowapi_secret").val().trim() == '')) {
285
-                         showAlert("Please first fill in the fields: 'Flowroute Access Key' and 'Flowroute Secret Key'.");
286
-                         return;
287
-                     }
288
-
289
-                     var saveAlwdUrl = OC.generateUrl('/apps/sms_relentless/user/updatekeysallowedusers');
290
-
291
-                     var alwddatatosend = { 
292
-                              userId: userid,
293
-                              groups: selGroups,
294
-                              users: selUsers,
295
-                              provider: crntprov
296
-                     };
297
-
298
-	             $.ajax({
299
-	                   method: 'PUT',
300
-	                   url: saveAlwdUrl + '/' + userid,
301
-	                   contentType: 'application/json',
302
-	                   data: JSON.stringify(alwddatatosend),
303
-                           success: function(messagesent) {
304
-                                        if (messagesent == 'success') {
305
-                                            showAlert('The allowed groups and users have been successfully saved to the database!');
306
-                                        } else if (messagesent != 'success' && messagesent != 'failure') {
307
-                                            showAlert(messagesent);
308
-                                        } else if (messagesent == 'failure') {
309
-                                            showAlert('Error while trying to save the allowed groups and users!');
310
-                                        }
311
-                           },
312
-	                   error: function() {
313
-		                        showAlert('Error while attempting to save the allowed groups and users! You can check the Nextcloud log to find more details about this issue.');
314
-	                   }
315
-	             });
316
-
317
-                     $(this).attr("value", "Edit");
318
-
319
-                } else {
320
-
321
-                     $("#alwdrstsave-"+ crntprov).attr("value", "Save");
322
-                }
323
-
324
-             });
325
-          }
326
-          saveAlwdRow();
327
-
328
-
329
-
330
-          // Phone number restrictions
331
-
332
-          // Create a list with all the available groups
333
-          var grpsListItems = "";
334
-          $.each(allGroups, function(key, value) {
335
-                 grpsListItems += "<div class='groupsList'>"+ value +"</div>";
336
-          });
337
-
338
-          // Create a list with all the available users
339
-          var usersListItems = "";
340
-          $.each(allUsers, function(key, usrval) {
341
-                 usersListItems += "<div class='usersList'>"+ usrval +"</div>";
342
-          });
343
-
344
-
345
-          if (allRestrictions.length > 0) {
346
-              var restrNmb = allRestrictions.length;
347
-          } else {
348
-              var restrNmb = 0;
349
-          }
350
-
351
-
352
-	  // List the access restrictions for groups and users
353
-          if (restrNmb == 0) {
354
-
355
-              $("#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='/apps/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='/apps/sms_relentless/img/user.svg' style='cursor:pointer' title='Show all users'></div></td><td><img id='rmRow-"+ restrNmb +"' class='removeRow' src='/apps/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>");
356
-	      $("#phoneNmbrRestr").append("<div><img id='addRestrRow' src='/apps/sms_relentless/img/add.svg' title='Add Row'></div>");
357
-
358
-          } else {
359
-
360
-	      for (k = 0; k < restrNmb; k++) {
361
-
362
-                   if (allRestrictions[k].groups) {
363
-                       var groupsfdbpre = allRestrictions[k].groups.split("|");
364
-                       var groupsfdb = "";
365
-                       for (var g = 0; g < groupsfdbpre.length; g++) {
366
-                            groupsfdb += "<div class='selectedGrps'>"+ groupsfdbpre[g] +"<img id='rmvGrp-"+ groupsfdbpre[g] +"' class='removeGroup' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this group'></div>";
367
-                       }
368
-                   } else { var groupsfdb = ""; }
369
-
370
-                   if (allRestrictions[k].users) {
371
-                       var usersfdbpre = allRestrictions[k].users.split("|");
372
-                       var usersfdb = "";
373
-                       for (var u = 0; u < usersfdbpre.length; u++) {
374
-                            usersfdb += "<div class='selectedUsrs'>"+ usersfdbpre[u] +"<img id='rmvUsr-"+ usersfdbpre[u] +"' class='removeUser' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this user'></div>";
375
-                       }
376
-                   } else { var usersfdb = ""; }
377
-
378
-		   $("#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='/apps/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='/apps/sms_relentless/img/user.svg' style='cursor:pointer' title='Show all users'></div></td><td><img id='rmRow-"+ k +"' class='removeRow' src='/apps/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>");
379
-              }
380
-              $("#phoneNmbrRestr").append("<div><img id='addRestrRow' src='/apps/sms_relentless/img/add.svg' title='Add Row'></div>");
381
-          }
382
-
383
-
384
-          // Get the available phone numbers from all providers associated with the access keys entered on the Settings page
385
-          $("#phoneNumberTh").addClass('icon-loading');
386
-          var getnumbersUrl = OC.generateUrl("/apps/sms_relentless/user/getsmsnumbers");
387
-          var numbersListItems = '';
388
-
389
-	  $.ajax({
390
-		  url: getnumbersUrl + '/' + userid,
391
-		  type: "POST",
392
-		  cache: false,
393
-		  processData: false,
394
-		  contentType: false,
395
-		  success: function(currentnmbrs) {
396
-
397
-                                    $("#phoneNumberTh").removeClass('icon-loading');
398
-
399
-				    // Create a list with all the available phone numbers
400
-                                    numbersListItems = "<option value='' selected>Select phone number</option>";
401
-
402
-				    $.each(currentnmbrs, function(key, indsmsnmb) {
403
-					   numbersListItems += "<option value='"+ indsmsnmb +"'>"+ indsmsnmb +"</option>";
404
-				    });
405
-
406
-				    if (restrNmb == 0) { var indRow = 0; } else { var indRow = parseInt(restrNmb + 1); }
407
-
408
-				    // Append the list of available phone numbers
409
-				    $("#rstphn-"+ indRow).empty();
410
-				    $("#rstphn-"+ indRow).append(numbersListItems);
411
-        
412
-		  },
413
-		  error: function() {
414
-                                    $("#phoneNumberTh").removeClass('icon-loading'); 
415
-                                    showAlert("Error while attempting to retrieve the available phone numbers!");
416
-                  }
417
-          });
418
-
419
-
420
-          function showLists() {
421
-
422
-              // Append the list of available groups to the restrictions table
423
-              $('[id^="showGrps-"]').click(function() {
424
-                 var crtnmbr = $(this).attr("id").replace("showGrps-", "");
425
-                 $("#grpL-"+ crtnmbr).remove();
426
-                 $("#showGrps-"+ crtnmbr).append("<div id='grpL-"+ crtnmbr +"' class='grpsList'>"+ grpsListItems +"</div>");
427
-                 $("#adminOverlay").remove();
428
-                 $("#app-content").append("<div id='adminOverlay'></div>");
429
-                 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
430
-
431
-                 $("#adminOverlay").click(function() { 
432
-                    $("#adminOverlay").remove(); 
433
-                    $("#grpL-"+ crtnmbr).remove(); 
434
-                    $("#usrL-"+ crtnmbr).remove();
435
-                 });
436
-
437
-                 // Select a group
438
-                 $(".groupsList").click(function() {
439
-                    var slctdGrp = $(this).text();
440
-                    $("#grpL-"+ crtnmbr).remove();
441
-                    var addedTxtgrp = $("#rstgrp-"+ crtnmbr).text();
442
-
443
-                    if (addedTxtgrp.indexOf(slctdGrp) == -1) {
444
-                        $("#rstgrp-"+ crtnmbr).append("<div class='selectedGrps'>"+ slctdGrp +"<img id='rmvGrp-"+ slctdGrp +"' class='removeGroup' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this group'></div>");
445
-                    } else { showAlert("That group has already been added!"); }
446
-
447
-                    // Remove a group from list
448
-                    $('[id^="rmvGrp-"]').click(function() {
449
-                       $(this).closest(".selectedGrps").remove();
450
-                    });
451
-                 });
452
-
453
-              });
454
-
455
-              // Append the list of available users to the restrictions table
456
-              $('[id^="showUsr-"]').click(function() {
457
-
458
-                 var ctusrnmbr = $(this).attr("id").replace("showUsr-", "");
459
-                 $("#usrL-"+ ctusrnmbr).remove();
460
-                 $("#showUsr-"+ ctusrnmbr).append("<div id='usrL-"+ ctusrnmbr +"' class='usrsList'>"+ usersListItems +"</div>");
461
-                 $("#adminOverlay").remove();
462
-                 $("#app-content").append("<div id='adminOverlay'></div>");
463
-                 $("#adminOverlay").css({ "width" : parseInt($("#sms_relentless_adm").width() + 400) +"px", "height" : $("#sms_relentless_adm").height() +"px" });
464
-
465
-                 $("#adminOverlay").click(function() { 
466
-                    $("#adminOverlay").remove(); 
467
-                    $("#grpL-"+ ctusrnmbr).remove(); 
468
-                    $("#usrL-"+ ctusrnmbr).remove();
469
-                 });
470
-
471
-                 // Select a user
472
-                 $(".usersList").click(function() {
473
-                    var slctdUsr = $(this).text();
474
-                    var addedTxtusr = $("#rstusr-"+ ctusrnmbr).text();
475
-
476
-                    if (addedTxtusr.indexOf(slctdUsr) == -1) {
477
-                        $("#rstusr-"+ ctusrnmbr).append("<div class='selectedUsrs'>"+ slctdUsr +"<img id='rmvUsr-"+ slctdUsr +"' class='removeUser' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this user'></div>");
478
-                    } else { showAlert("That user has already been added!"); }
479
-
480
-                    // Remove a user from list
481
-                    $('[id^="rmvUsr-"]').click(function() {
482
-                       $(this).closest(".selectedUsrs").remove();
483
-                    });
484
-                 });
485
-
486
-              });
487
-
488
-              // Remove a group from the list 
489
-              $('[id^="rmvGrp-"]').click(function() {
490
-                 $(this).closest(".selectedGrps").remove();
491
-              });
492
-
493
-              // Remove a user from the list
494
-              $('[id^="rmvUsr-"]').click(function() {
495
-                 $(this).closest(".selectedUsrs").remove();
496
-              });
497
-
498
-          }
499
-          showLists();
500
-
501
-
502
-          // Save the data
503
-          function saveRestrRow() {
504
-             $('[id^="rstsave-"]').unbind("click");
505
-             $('[id^="rstsave-"]').click(function(event) {
506
-
507
-                 event.preventDefault();
508
-                 var crntrwnmbr = $(this).attr("id").replace("rstsave-", "");
509
-
510
-                 if ($(this).attr("value") == "Save") {
511
-
512
-                     var phoneNmbr = $("#rstphn-"+ crntrwnmbr).val();
513
-                     var slctdGroups = [];
514
-                     $("#rstgrp-"+ crntrwnmbr +" .selectedGrps").each(function() {
515
-                        slctdGroups.push($(this).text());
516
-                     });
517
-                     var slctdUsers = [];
518
-                     $("#rstusr-"+ crntrwnmbr +" .selectedUsrs").each(function() {
519
-                        slctdUsers.push($(this).text());
520
-                     });
521
-
522
-                     if (phoneNmbr != '') {
523
-
524
-                       if (slctdGroups.length > 0 || slctdUsers.length > 0) {
525
-
526
-                         var saveRestrUrl = OC.generateUrl('/apps/sms_relentless/user/updatenumberrestrictions');
527
-
528
-                         var datatosend = { 
529
-                              userId: userid,
530
-                              savedByDsplname: crntadmDispName,
531
-                              phoneNumber: phoneNmbr,
532
-                              groups: slctdGroups,
533
-                              users: slctdUsers
534
-                         };
535
-
536
-	                 $.ajax({
537
-	                   method: 'PUT',
538
-	                   url: saveRestrUrl + '/' + userid,
539
-	                   contentType: 'application/json',
540
-	                   data: JSON.stringify(datatosend),
541
-                           success: function(messagetosend) {
542
-                                        if (messagetosend == 'success') {
543
-                                            showAlert('The restrictions have been successfully saved to the database!');
544
-                                        } else {
545
-                                            showAlert('Error while trying to save the restrictions!');
546
-                                        }
547
-                           },
548
-	                   error: function() {
549
-		                        showAlert('Error while attempting to save the restrictions! You can check the Nextcloud log to find more details about this issue.');
550
-	                   }
551
-	                 });
552
-
553
-                       } else { showAlert("You must select at least a group or a user in order to restrict the use of a phone number."); return; }
554
-
555
-                     } else { showAlert("Please select a phone number!"); return; }
556
-
557
-                     $(this).attr("value", "Edit");
558
-
559
-                } else {
560
-
561
-                     $("#rstsave-"+ crntrwnmbr).attr("value", "Save");
562
-                }
563
-
564
-             });
565
-          }
566
-          saveRestrRow();
567
-
568
-          // Remove a row
569
-          function removeRestrRow() {
570
-               $('[id^="rmRow-"]').click(function() {
571
-
572
-                  var slctRowRmv = $(this).attr("id").replace("rmRow-", "");
573
-                  var crntPhNmbr = $("#rstphn-"+ slctRowRmv).val();
574
-
575
-                  if (confirm("Do you really want to remove this row from the database ?")) {
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='/apps/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='/apps/sms_relentless/img/user.svg' style='cursor:pointer' title='Show all users'></div></td><td><img id='rmRow-"+ indRowAdd +"' class='removeRow' src='/apps/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.");
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
-
747
-  $("#save_admin_settings").on("click", function(event) {
748
-
749
-    event.preventDefault();
750
-    OC.msg.startAction('#smsr_save_msg', t('sms_relentless', 'Saved'));
751
-
752
-    var baseUrlsv = OC.generateUrl('/apps/sms_relentless/user/updateadminsettings');
753
-
754
-    var showallmsgs = 0;
755
-    if ($("#showallmessages").is(':checked')) {
756
-        showallmsgs = 1;
757
-    }
758
-
759
-    var telsenderinit = $("#tel_sender_name").val();
760
-    var telsenderproc = telsenderinit.replace(/[^A-Za-z 0-9]/g, '');
761
-
762
-    var nexsenderinit = $("#nex_sender_name").val();
763
-    var nexsenderproc = nexsenderinit.replace(/[^A-Za-z 0-9]/g, '');
764
-
765
-    var twilsenderinit = $("#twil_sender_name").val();
766
-    var twilsenderproc = twilsenderinit.replace(/[^A-Za-z 0-9]/g, '');
767
-
768
-    var datatosave = {
769
-                      userId: userid,
770
-                      telapiKey: $("#telapi_key").val(),
771
-                      telPubKey: $("#tel_pub_key").val(),
772
-                      telapiUrlRec: $("#telapi_url_rec").val(),
773
-                      telapiUrl: $("#telapi_url").val(),
774
-                      messagingProfileId: $("#messaging_profile_id").val(),
775
-                      nexapiKey: $("#nexapi_key").val(),
776
-                      nexapiSecret: $("#nexapi_secret").val(),
777
-                      nexapiUrlRec: $("#nexapi_url_rec").val(),
778
-                      nexapiUrl: $("#nexapi_url").val(),
779
-                      twilapiKey: $("#twilapi_key").val(),
780
-                      twilapiSecret: $("#twilapi_secret").val(),
781
-                      twilapiUrlRec: $("#twilapi_url_rec").val(),
782
-                      twilapiUrl: $("#twilapi_url").val(),
783
-                      flowapiKey: $("#flowapi_key").val(),
784
-                      flowapiSecret: $("#flowapi_secret").val(),
785
-                      flowapiUrlRec: $("#flowapi_url_rec").val(),
786
-                      flowapiUrl: $("#flowapi_url").val(),
787
-                      telSenderName: telsenderproc,
788
-                      nexSenderName: nexsenderproc,
789
-                      twilSenderName: twilsenderproc,
790
-                      showAllMessages: showallmsgs
791
-    };
792
-
793
-
794
-    $.ajax({
795
-       method: 'PUT',
796
-       url: baseUrlsv + '/' + userid,
797
-       contentType: 'application/json',
798
-       data: JSON.stringify(datatosave),
799
-       success: function() {
800
-       },
801
-       error: function() {
802
-            showAlert('Error while attempting to save the settings! You can check the Nextcloud log to find more details about this issue.');
803
-       }
804
-    });
805
-
806
-  });
807
-
808
-  function showAlert(alertText) {
809
-
810
-     let alertwnd = "<div id='alertMessage'>";
811
-     alertwnd += "<a id='closeAlertWnd' title='Close this window'></a>";
812
-     alertwnd += "<div id='alertTextWrap'>"+ alertText +"</div>";
813
-     alertwnd += "<input type='submit' id='alertOk' value='OK'>";
814
-     alertwnd += "</div>";
815
-
816
-     $("#content").append("<div id='alertMsgOverlay'></div>");
817
-     $("#content").append(alertwnd);
818
-
819
-     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
820
-     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
821
-     $("#alertMessage").css({ "top" : topDist, "left" : leftDist });
822
-
823
-     $("#closeAlertWnd").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
824
-     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
825
-     $("#alertOk").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
826
-  }
827
-
828
-});
829 0
deleted file mode 100644
... ...
@@ -1,298 +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
-
27
-    // Delete from the database all the received messages older than the specified period
28
-    $("#delOldrecSMS").on("click", function() {
29
-
30
-      var oldrecInterval = $("#oldrecSmsInterval").val();
31
-      var procoldrecint = oldrecInterval.replace(/[^0-9]/g, "");
32
-      var finaloldrecint = parseInt(procoldrecint);
33
-
34
-      if (finaloldrecint == "" || !$.isNumeric(finaloldrecint)) {
35
-          showAlert("Please enter the number of days in the box from above !");
36
-      } else {
37
-
38
-         var getRecUrl = OC.generateUrl("/apps/sms_relentless/user/getreceivedtablefordel");
39
-         $('#smstables').addClass('icon-loading');
40
-
41
-         $.ajax({
42
-             url: getRecUrl + '/' + userid,
43
-             method: "GET",
44
-             dataType:'text',
45
-             success: function(recinfoFromDB) {
46
-
47
-                var parsedinfo = $.parseJSON(recinfoFromDB);
48
-
49
-                if (parsedinfo == "not permitted") {
50
-
51
-                    showAlert("Only admins can remove old messages using this option!");
52
-                    $('#smstables').removeClass('icon-loading');
53
-                    return;
54
-
55
-                } else {
56
-
57
-                    var recmessagedbIDs = [];
58
-                    var oldrecRows = [];
59
-                    oldrecRows.push("id,user_id,message_id,date,from,to,message,author_displayname,internal_sender\r\n");
60
-
61
-                    var targetdate = new Date(new Date().setDate(new Date().getDate() - finaloldrecint));
62
-
63
-                    for (var j = 0; j < parsedinfo.length; j++) {
64
-                         var firstdate = parsedinfo[j].date;
65
-                         var secdate = firstdate.split(" ");
66
-                         var thirddate = secdate[0].split("-");
67
-                         var fourthdate = secdate[1].split(":");
68
-                         var pastdate = new Date(thirddate[0],(thirddate[1]-1),thirddate[2],fourthdate[0],fourthdate[1],fourthdate[2]);
69
-
70
-                         if (pastdate < targetdate) {
71
-                             recmessagedbIDs.push(parsedinfo[j].id);
72
-
73
-                             // Check if the message contains characters that must be escaped in the final CSV file
74
-                             if ((parsedinfo[j].message.indexOf(',') > -1 || /\r|\n|\r\n/.exec(parsedinfo[j].message)) && parsedinfo[j].message.indexOf('"') === -1) {
75
-                                 var messageproc = '"'+ parsedinfo[j].message + '"';
76
-                             } else if (parsedinfo[j].message.indexOf('"') > -1) {
77
-                                 var messageproc = '"'+ parsedinfo[j].message.replace(/"/g,'""') + '"';
78
-                             }
79
-
80
-                             oldrecRows.push(parsedinfo[j].id + ',' + parsedinfo[j].user_id + ',' + parsedinfo[j].message_id + ',' + parsedinfo[j].date + ',' + parsedinfo[j].from + ',' + parsedinfo[j].to + ',' + messageproc + ',' + parsedinfo[j].author_displayname + ',' + parsedinfo[j].internal_sender + '\r\n');
81
-                         }
82
-                    }
83
-
84
-
85
-                    if (oldrecRows.length == 1) {
86
-
87
-                        showAlert("No messages will be deleted since there are no messages older than " + finaloldrecint + " days.");
88
-
89
-                    // Save in a '.csv' file all the received messages that will be deleted from the database, then delete them
90
-                    } else {
91
-
92
-                        if (confirm("Are you sure you want to delete all the received messages older than " + finaloldrecint + " days ?")) {
93
-
94
-                            var deloldrecRowsUrl = OC.generateUrl("/apps/sms_relentless/user/saveoldrecrows");
95
-
96
-                            $.ajax({
97
-                                url: deloldrecRowsUrl + '/' + userid,
98
-                                method: "POST",
99
-                                dataType:'text',
100
-                                data: { oldrecRows: oldrecRows },
101
-                                success: function(savecheck) {
102
-
103
-                                            // Delete received messages from the database
104
-                                            var delrecDbSmsUrl = OC.generateUrl("/apps/sms_relentless/user/removerecrows");
105
-
106
-                                            if (savecheck == 1) {
107
-
108
-                                                $.ajax({
109
-                                                       url: delrecDbSmsUrl + '/' + userid,
110
-                                                       method: "POST",
111
-                                                       dataType:'text',
112
-                                                       data: { recmessagedbIDs: recmessagedbIDs },
113
-                                                       success: function() {
114
-                                                            showAlert((oldrecRows.length - 1)+" rows have been successfully saved in the 'SMS_relentless/removed_received_messages' directory and then deleted from the database !");
115
-                                                            $('#smstables').removeClass('icon-loading');
116
-                                                       },
117
-                                                       error: function() {
118
-                                                            showAlert("There was an error while deleting the messages older than the specified period!");
119
-                                                            $('#smstables').removeClass('icon-loading');
120
-                                                       }
121
-                                                });
122
-
123
-                                            } else { showAlert("There was an error while saving the messages older than the specified period!"); }
124
-
125
-                                            $('#smstables').removeClass('icon-loading');
126
-                                },
127
-                                error: function() {
128
-                                     showAlert("There was an error while saving and/or deleting the messages older than the specified period!");
129
-                                     $('#smstables').removeClass('icon-loading');
130
-                                }
131
-                            });
132
-                        }
133
-                    }
134
-                }
135
-             },
136
-             error: function() {
137
-                showAlert("An error occurred while getting data from the database!");
138
-                $('#smstables').removeClass('icon-loading');
139
-             }
140
-         });
141
-
142
-      }
143
-
144
-    });
145
-
146
-
147
-    // Delete from the database all the sent messages older than the specified period
148
-    $("#delOldsentSMS").on("click", function() {
149
-
150
-      var oldsentInterval = $("#oldsentSmsInterval").val();
151
-      var procoldsentint = oldsentInterval.replace(/[^0-9]/g, "");
152
-      var finaloldsentint = parseInt(procoldsentint);
153
-
154
-      if (finaloldsentint == "" || !$.isNumeric(finaloldsentint)) {
155
-          showAlert("Please enter the number of days in the box above !");
156
-      } else {
157
-
158
-         var getSentUrl = OC.generateUrl("/apps/sms_relentless/user/getsenttablefordel");
159
-         $('#smstables').addClass('icon-loading');
160
-
161
-         $.ajax({
162
-             url: getSentUrl + '/' + userid,
163
-             method: "GET",
164
-             dataType:'text',
165
-             success: function(sentinfoFromDB) {
166
-
167
-                var parsedsentinfo = $.parseJSON(sentinfoFromDB);
168
-
169
-                if (parsedsentinfo == "not permitted") {
170
-
171
-                    showAlert("Only admins can remove old messages using this option!");
172
-                    $('#smstables').removeClass('icon-loading');
173
-                    return;
174
-
175
-                } else {
176
-
177
-                    var sentmessagedbIDs = [];
178
-                    var oldsentRows = [];
179
-                    oldsentRows.push("id,user_id,message_id,date,from,to,network,price,status,deliveryreceipt,message,author_displayname\r\n");
180
-
181
-                    var senttargetdate = new Date(new Date().setDate(new Date().getDate() - finaloldsentint));
182
-
183
-                    for (var j = 0; j < parsedsentinfo.length; j++) {
184
-                         var firstdate = parsedsentinfo[j].date;
185
-                         var secdate = firstdate.split(" ");
186
-                         var thirddate = secdate[0].split("-");
187
-                         var fourthdate = secdate[1].split(":");
188
-                         var sentpastdate = new Date(thirddate[0],(thirddate[1]-1),thirddate[2],fourthdate[0],fourthdate[1],fourthdate[2]);
189
-
190
-                         if (sentpastdate < senttargetdate) {
191
-                             sentmessagedbIDs.push(parsedsentinfo[j].id);
192
-
193
-                             // Check if the message contains characters that must be escaped in the final CSV file
194
-                             if ((parsedsentinfo[j].message.indexOf(',') > -1 || /\r|\n|\r\n/.exec(parsedsentinfo[j].message)) && parsedsentinfo[j].message.indexOf('"') === -1) {
195
-                                 var messageproc = '"'+ parsedsentinfo[j].message + '"';
196
-                             } else if (parsedsentinfo[j].message.indexOf('"') > -1) {
197
-                                 var messageproc = '"'+ parsedsentinfo[j].message.replace(/"/g,'""') + '"';
198
-                             }
199
-
200
-                             if ((parsedsentinfo[j].network.indexOf(',') > -1 || /\r|\n|\r\n/.exec(parsedsentinfo[j].network)) && parsedsentinfo[j].network.indexOf('"') === -1) {
201
-                                 var networkproc = '"'+ parsedsentinfo[j].network + '"';
202
-                             } else if (parsedsentinfo[j].network.indexOf('"') > -1) {
203
-                                 var networkproc = '"'+ parsedsentinfo[j].network.replace(/"/g,'""') + '"';
204
-                             }
205
-
206
-                             if ((parsedsentinfo[j].status.indexOf(',') > -1 || /\r|\n|\r\n/.exec(parsedsentinfo[j].status)) && parsedsentinfo[j].status.indexOf('"') === -1) {
207
-                                 var statusproc = '"'+ parsedsentinfo[j].status + '"';
208
-                             } else if (parsedsentinfo[j].status.indexOf('"') > -1) {
209
-                                 var statusproc = '"'+ parsedsentinfo[j].status.replace(/"/g,'""') + '"';
210
-                             }
211
-
212
-                             oldsentRows.push(parsedsentinfo[j].id + ',' + parsedsentinfo[j].user_id + ',' + parsedsentinfo[j].message_id + ',' + parsedsentinfo[j].date + ',' + parsedsentinfo[j].from + ',' + parsedsentinfo[j].to + ',' + networkproc + ',' + parsedsentinfo[j].price + ',' + statusproc + ',' + parsedsentinfo[j].deliveryreceipt + ',' + messageproc + ',' + parsedsentinfo[j].author_displayname + '\r\n');
213
-                         }
214
-                    }
215
-
216
-
217
-                    if (oldsentRows.length == 1) {
218
-
219
-                        showAlert("No messages will be deleted since there are no messages older than " + finaloldsentint + " days.");
220
-
221
-                    // Save in a '.csv' file all the sent messages that will be deleted from the database, then delete them
222
-                    } else {
223
-
224
-                          if (confirm("Are you sure you want to delete all the sent messages older than " + finaloldsentint + " days ?")) {
225
-
226
-                              var deloldsentRowsUrl = OC.generateUrl("/apps/sms_relentless/user/saveoldsentrows");
227
-
228
-                              $.ajax({
229
-                                  url: deloldsentRowsUrl + '/' + userid,
230
-                                  method: "POST",
231
-                                  dataType:'text',
232
-                                  data: { oldsentRows: oldsentRows },
233
-                                  success: function(savesentcheck) {
234
-
235
-                                            // Delete sent messages from the database
236
-                                            var delsentDbSmsUrl = OC.generateUrl("/apps/sms_relentless/user/removesentrows");
237
-
238
-                                            if (savesentcheck == 1) {
239
-
240
-                                                $.ajax({
241
-                                                       url: delsentDbSmsUrl + '/' + userid,
242
-                                                       method: "POST",
243
-                                                       dataType:'text',
244
-                                                       data: { sentmessagedbIDs: sentmessagedbIDs },
245
-                                                       success: function() {
246
-                                                            showAlert((oldsentRows.length - 1) + " rows have been successfully saved in the 'SMS_relentless/removed_sent_messages' directory and then deleted from the database !");
247
-                                                            $('#smstables').removeClass('icon-loading');
248
-                                                       },
249
-                                                       error: function() {
250
-                                                            showAlert("There was an error while deleting the messages older than the specified period!");
251
-                                                            $('#smstables').removeClass('icon-loading');
252
-                                                       }
253
-                                                });
254
-
255
-                                            } else { showAlert("There was an error while saving the messages older than the specified period!"); }
256
-
257
-                                            $('#smstables').removeClass('icon-loading');
258
-                                  },
259
-                                  error: function() {
260
-                                     showAlert("There was an error while saving and/or deleting the messages older than the specified period!");
261
-                                     $('#smstables').removeClass('icon-loading');
262
-                                  }
263
-                              });
264
-                          }
265
-                    }
266
-                }  
267
-
268
-             },
269
-             error: function() {
270
-                showAlert("An error occurred while getting data from the database!");
271
-                $('#smstables').removeClass('icon-loading');
272
-             }
273
-         });
274
-      }
275
-
276
-    });
277
-
278
-    function showAlert(alertText) {
279
-
280
-       let alertwnd = "<div id='alertMessage'>";
281
-       alertwnd += "<a id='closeAlertWnd' title='Close this window'></a>";
282
-       alertwnd += "<div id='alertTextWrap'>"+ alertText +"</div>";
283
-       alertwnd += "<input type='submit' id='alertOk' value='OK'>";
284
-       alertwnd += "</div>";
285
-
286
-       $("#content").append("<div id='alertMsgOverlay'></div>");
287
-       $("#content").append(alertwnd);
288
-
289
-       let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
290
-       let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
291
-       $("#alertMessage").css({ "top" : topDist, "left" : leftDist });
292
-
293
-       $("#closeAlertWnd").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
294
-       $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
295
-       $("#alertOk").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
296
-    }
297
-
298
-});
299 0
deleted file mode 100644
... ...
@@ -1,1652 +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
-  var userid = "<?php p($userId); ?>";
24
-  var charcolorthr = 160;
25
-  var textread = '';
26
-  var providerUsed = '';
27
-  var receiversNumbers = [];
28
-  var waittime = 1000;
29
-  var selectedid = '';
30
-  var isMMS = 0;
31
-  var n = 1;
32
-  var textsizekb = 0;
33
-  var uploadedtomms = [];
34
-  var msgtotalflsize = 0;
35
-  var readtxtfile = [];
36
-  var readjpg = [];
37
-  var readpng = [];
38
-  var readgif = [];
39
-  var readbmp = [];
40
-  var readtif = [];
41
-  var readmp4 = [];
42
-  var chosenProvider = '';
43
-  var chosenProvFullName = '';
44
-  var infonotecontent = '';
45
-  var validExtensions = [];
46
-  var maximumsize = 750;
47
-  var maxsizenonimage = 600;
48
-  var maximumfilenumber = 10;
49
-  var maximumsizeinit = 750;
50
-
51
-  // Adjust the path, so that the uploaded pdf files can be previewed while Nextcloud is served on a subdomain or on a subdirectory, by Nginx or by Apache
52
-  var locHref = window.location.href;
53
-  var pathSplit = locHref.split('/');
54
-  var firstPathEl = '';
55
-  if (pathSplit.length == 7) { firstPathEl = '/' + pathSplit[3]; }
56
-
57
-
58
-  // Get the available phone numbers associated with the API keys saved on the Settings page
59
-  $("#smsnumbersdiv").addClass('icon-loading');
60
-
61
-  var getsmsnumbersUrl = OC.generateUrl("/apps/sms_relentless/user/getsmsnumbers");
62
-
63
-  $.ajax({
64
-          url: getsmsnumbersUrl + '/' + userid,
65
-          type: "POST",
66
-          data: { userid: userid },
67
-          cache: false,
68
-          processData: false,
69
-          contentType: false,
70
-          success: function(currentnmbrs) {
71
-
72
-                     $('#currentsmsnmbrs').empty();
73
-
74
-                     if (currentnmbrs.length > 1) {
75
-
76
-                         $('#currentsmsnmbrs').append("<option value='' class='optselectsmsnb' selected disabled>Choose an ID</option>");
77
-
78
-                         $.each(currentnmbrs, function(key, valsmsnmb) {
79
-                                $('#currentsmsnmbrs').append("<option value='"+ valsmsnmb +"' class='optselectsmsnb'>"+ valsmsnmb +"</option>");
80
-                         });
81
-
82
-                         // Append the available providers to the 'see balance' drop-down list
83
-                         var providerNm = [];
84
-                         for (var n = 0; n < currentnmbrs.length; n++) {
85
-
86
-                              var provfirstchr = currentnmbrs[n].split(": ")[0];
87
-                              if (provfirstchr == "Tx") {
88
-                                  if (providerNm.indexOf("Telnyx") === -1) {
89
-                                      providerNm.push("Telnyx");
90
-                                      $("#smsprovider").append("<option value='Telnyx' class='selectsmsprov'>Telnyx</option>");
91
-                                  }
92
-                              } else if (provfirstchr == "Pl") {
93
-                                  if (providerNm.indexOf("Plivo") === -1) {
94
-                                      providerNm.push("Plivo");
95
-                                      $("#smsprovider").append("<option value='Plivo' class='selectsmsprov'>Plivo</option>");
96
-                                  }
97
-                              } else if (provfirstchr == "Tw") {
98
-                                  if (providerNm.indexOf("Twilio") === -1) {
99
-                                      providerNm.push("Twilio");
100
-                                      $("#smsprovider").append("<option value='Twilio' class='selectsmsprov'>Twilio</option>");
101
-                                  }
102
-                              } else if (provfirstchr == "Fl") {
103
-                                  if (providerNm.indexOf("Flowroute") === -1) {
104
-                                      providerNm.push("Flowroute");
105
-                                      $("#smsprovider").append("<option value='Flowroute' class='selectsmsprov'>Flowroute</option>");
106
-                                  }
107
-                              }
108
-                         }
109
-
110
-//                         for (var b = 0; b < providerNm.length; b++) {
111
-//                              $("#smsprovider").append("<option value='"+ providerNm[b] +"' class='selectsmsprov'>"+ providerNm[b] +"</option>");
112
-//                         }
113
-
114
-                     } else if (currentnmbrs.length == 1) {
115
-
116
-                                $('#currentsmsnmbrs').append("<option value='"+ currentnmbrs[0] +"' class='optselectsmsnb' selected disabled>"+ currentnmbrs[0] +"</option>");
117
-
118
-                                selectedid = currentnmbrs[0];
119
-
120
-                                var unqprovider = currentnmbrs[0].split(": ")[0];
121
-
122
-                                if (unqprovider == 'Tx') {
123
-
124
-					  validExtensions = ["jpg", "jpeg", "png", "gif", "mp3", "ogg", "amr", "mp4", "3gpp", "pdf", "vcf", "vcard", "txt"];
125
-					  // Maximum size of message text + files in KB
126
-					  maximumsize = 1024;
127
-					  maximumsizeinit = 1024;
128
-					  maxsizenonimage = 600;
129
-					  maximumfilenumber = 10;
130
-					  chosenProvFullName = "Telnyx";
131
-					  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Telnyx, if you send only jpeg/jpg, png \
132
-						             or gif files, the size of all the files plus the size of the text should be \
133
-						             <a href='https://support.telnyx.com/en/articles/4450150-faqs-about-mms-at-telnyx' style='color:#1b60ba' target='_blank' \
134
-						             rel='noreferrer noopener'>1024 KB</a> or less. If you send files of other formats, the total size of the files plus the size of the text should \
135
-						             be 600 KB or less. Allowed formats are jpeg/jpg, png, gif, mp3, ogg, amr, mp4, 3gpp, pdf, vcf, vcard and txt. By default, Telnyx accounts are \
136
-						             limited to <a href='https://support.telnyx.com/en/articles/3102823-mms-sending-and-receiving' style='color:#1b60ba' target='_blank' \
137
-						             rel='noreferrer noopener'>1 MMS message per second</a>. Deliverability of MMS messages depends on the carrier and device of the receiver. \
138
-						             Carriers can reject MMS messages with files exceeding a certain size. The best deliverability is achieved when sending jpeg/jpg, png or \
139
-						             gif files, with a total message size of 600 KB or less. Telnyx allows sending MMS messages only from US or Canadian phone numbers to other US \
140
-						             or Canadian phone numbers. Although all the specified file types can be added to the MMS, only the most common media file types (jpeg/jpg, png, \
141
-						             gif, mp4, ogg, etc.) can be previewed in the adjoining pane.";
142
-					  $("#tooltiptextfourth").html(infonotecontent);
143
-
144
-                                          // Append 'Telnyx' to the 'see balance' drop-down list
145
-                                          $("#smsprovider").append("<option value='Telnyx' class='selectsmsprov'>Telnyx</option>");
146
-
147
-                                } else if (unqprovider == 'Pl') {
148
-
149
-					  validExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "wav", "wave", "mp4", "amr", "mpg", "mpeg", "3gpp", "3gpp2", "vcf", "vcard", "x-vcard", "ics", "ical", "ifb", 
150
-						             "icalendar", "csv", "txt", "pdf", "xls"];
151
-					  // Maximum size of message text + files in KB
152
-					  maximumsize = 5120;
153
-					  maximumsizeinit = 5120;
154
-					  maxsizenonimage = 600;
155
-					  maximumfilenumber = 10;
156
-					  chosenProvFullName = "Plivo";
157
-					  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Plivo, if you send only jpeg/jpg, png \
158
-						             or gif files, the size of all the files plus the size of the text should be \
159
-						             <a href='https://support.plivo.com/hc/en-us/articles/360042280091-What-are-the-MMS-upload-size-limits-and-file-restrictions-' \
160
-						             style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>5120 KB</a> or less. If you send files of other formats, the total size \
161
-						             of the files plus the size of the text should be 600 KB or less. <a href='https://support.plivo.com/hc/en-us/articles/360042273051' \
162
-						             style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>Allowed formats</a> are jpeg/jpg, png, gif, bmp, wav/wave, mp4, amr, mpg, mpeg, 3gpp, \
163
-						             3gpp2, vcf, vcard, x-vcard, ics, ical, ifb, icalendar, csv, txt, pdf and xls. Deliverability of MMS messages depends on the carrier and \
164
-						             device of the receiver. Carriers can reject MMS messages with files exceeding a certain size. The best deliverability is \
165
-						             achieved when sending jpeg/jpg, png or gif files, with a total message size of 600 KB or less. Plivo allows sending MMS messages \
166
-						             only from US or Canadian phone numbers to other US or Canadian phone numbers. Although all the specified file types can be added to the MMS, \
167
-						             only the most common media file types (jpeg/jpg, png, gif, wav/wave, mp4, etc.) can be previewed in the adjoining pane.";
168
-					  $("#tooltiptextfourth").html(infonotecontent);
169
-
170
-                                          // Append 'Plivo' to the 'see balance' drop-down list
171
-                                          $("#smsprovider").append("<option value='Plivo' class='selectsmsprov'>Plivo</option>");
172
-
173
-                                } else if (unqprovider == 'Tw') {
174
-
175
-					  validExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "tiff", "tif", "au", "snd", "l16", "wav", "wave", "aiff", "pcm", "mp4", "ogg", "ra", "ram", "3gpp", 
176
-						             "3gpp2", "ac3", "webm", "amr", "mpg", "mpeg", "mov", "qt", "h261", "h263", "h264", "vcf", "vcard", "x-vcard", "csv", "rtf", "ics", "ical", "ifb", 
177
-						             "icalendar", "directory", "pdf", "pkpass"];
178
-					  // Maximum size of message text + files in KB
179
-					  maximumsize = 5120;
180
-					  maximumsizeinit = 5120;
181
-					  maxsizenonimage = 600;
182
-					  maximumfilenumber = 10;
183
-					  chosenProvFullName = "Twilio";
184
-					  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Twilio, if you send only jpeg/jpg, png \
185
-						             or gif files, the size of all the files plus the size of the text should be \
186
-						             <a href='https://support.twilio.com/hc/en-us/articles/360018832773-Twilio-Programmable-SMS-Supported-File-Types-and-Size-Limits-for-MMS-Media-Messages' \
187
-						             style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>5120 KB</a> or less. If you send files of other formats, the total size \
188
-						             of the files plus the size of the text should be 600 KB or less. <a href='https://www.twilio.com/docs/sms/accepted-mime-types' \
189
-						             style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>Allowed formats</a> are jpeg/jpg, png, gif, bmp, tiff/tif, au, snd, l16, \
190
-						             wav/wave, aiff, pcm, mp4, ogg, ra, ram, 3gpp, 3gpp2, ac3, webm, amr, mpg, mpeg, mov, qt, h261, h263, h264, vcf, vcard, x-vcard, csv, rtf, ics, \
191
-						             ical, ifb, icalendar, directory, pdf and pkpass. Deliverability of MMS messages depends on the carrier and device of the receiver. Carriers \
192
-						             can reject MMS messages with files exceeding a certain size. The best deliverability is achieved when sending jpeg/jpg, png or gif files, \
193
-						             with a total message size of 600 KB or less. Twilio allows sending MMS messages from US or Canadian phone numbers to other US or Canadian phone \
194
-						             numbers. However, MMS messages sent internationally will be converted to SMS messages with URL links to the included files. Although all the \
195
-						             specified file types can be added to the MMS, only the most common media file types (jpeg/jpg, png, gif, wav/wave, mp4, ogg, etc.) can be \
196
-						             previewed in the adjoining pane."
197
-					  $("#tooltiptextfourth").html(infonotecontent);
198
-
199
-                                          // Append 'Twilio' to the 'see balance' drop-down list
200
-                                          $("#smsprovider").append("<option value='Twilio' class='selectsmsprov'>Twilio</option>");
201
-
202
-                                } else if (unqprovider == 'Fl') {
203
-
204
-					  validExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "3gp", "mp4", "avi", "amr", "midi", "wav", "wave", "ac3", "mp3"];
205
-					  // Maximum size of message text + files in KB
206
-					  maximumsize = 750;
207
-					  maximumsizeinit = 750;
208
-					  maxsizenonimage = 600;
209
-					  maximumfilenumber = 10;
210
-					  chosenProvFullName = "Flowroute";
211
-					  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Flowroute, if you send only jpeg/jpg, \
212
-							     png or gif files, the size of all the files plus the size of the text should be \
213
-							     <a href='https://developer.flowroute.com/api/messages/v2.1/send-an-mms/' style='color:#1b60ba' target='_blank' \
214
-							     rel='noreferrer noopener'>750 KB</a> or less. If you send files of other formats, the total \
215
-							     size of the files plus the size of the text should be 600 KB or less. \
216
-							     <a href='https://support.flowroute.com/937402-What-file-types-does-Flowroute-MMS-support' style='color:#1b60ba' target='_blank' \
217
-							     rel='noreferrer noopener'>Allowed formats</a> are jpeg/jpg, png, gif, bmp, 3gp, mp4, avi, amr, midi, wav/wave, ac3 and mp3. Flowroute accounts are \
218
-							     limited to <a href='https://developer.flowroute.com/docs/sms-mms-best-practices/#sending-and-receiving-limitations' style='color:#1b60ba' \
219
-							     target='_blank' rel='noreferrer noopener'>1 MMS message per second</a>. Deliverability of MMS messages depends on the carrier and device \
220
-							     of the receiver. Carriers can reject MMS messages with files exceeding a certain size. The best deliverability is achieved when sending \
221
-							     jpeg/jpg, png or gif files, with a total message size of 600 KB or less. Flowroute allows sending MMS messages only from US or Canadian phone \
222
-							     numbers to other US or Canadian phone numbers. Although all the specified file types can be added to the MMS, only the most common media file \
223
-							     types (jpeg/jpg, png, gif, wav/wave, mp4, etc.) can be previewed in the adjoining pane."
224
-					  $("#tooltiptextfourth").html(infonotecontent);
225
-
226
-                                          // Append 'Flowroute' to the 'see balance' drop-down list
227
-                                          $("#smsprovider").append("<option value='Flowroute' class='selectsmsprov'>Flowroute</option>");
228
-                                }
229
-                     } else {
230
-                                $('#currentsmsnmbrs').append("<option value='' class='optselectsmsnb' selected disabled>No IDs</option>");
231
-                     }
232
-
233
-                     $("#smsnumbersdiv").removeClass('icon-loading');
234
-          }
235
-  });
236
-     //  });
237
-
238
-
239
-  // Clean the SMS_Relentless/temp_files directory
240
-  var cleanflUrl = OC.generateUrl("/apps/sms_relentless/user/cleantempdir");
241
-
242
-  $.ajax({
243
-          url: cleanflUrl + '/' + userid,
244
-          type: "POST",
245
-          data: { userid: userid },
246
-          cache: false,
247
-          processData: false,
248
-          contentType: false
249
-  });
250
-  
251
-  // Check the available balance
252
-  $("#smsprovider").on("change", function () {
253
-
254
-     var provider = $('#smsprovider :selected').val();
255
-
256
-     if (provider == "Telnyx") {
257
-
258
-        var gettelbalance = function() {
259
-
260
-          $('#currentbalance').addClass('icon-loading');
261
-
262
-          var gettelbalanceUrl = OC.generateUrl("/apps/sms_relentless/user/getbalancetel");
263
-
264
-          $.ajax({
265
-              url: gettelbalanceUrl + '/' + userid,
266
-              type: "POST",
267
-              data: { userid: userid },
268
-              cache: false,
269
-              processData: false,
270
-              contentType: false,
271
-              success: function(currentbalancetel) {
272
-
273
-                     $('#currentbalance').empty();
274
-                     $('#currentbalance').text(currentbalancetel);
275
-                     $('#currentbalance').removeClass('icon-loading');
276
-              }
277
-          });
278
-        }
279
-
280
-        gettelbalance();
281
-
282
-     } else if (provider == "Plivo") {
283
-
284
-          var getnexbalance = function() {
285
-
286
-            $('#currentbalance').addClass('icon-loading');
287
-
288
-            var getnexbalanceUrl = OC.generateUrl("/apps/sms_relentless/user/getbalancenex");
289
-
290
-            $.ajax({
291
-                url: getnexbalanceUrl + '/' + userid,
292
-                type: "POST",
293
-                data: { userid: userid },
294
-                cache: false,
295
-                processData: false,
296
-                contentType: false,
297
-                success: function(currentbalancenex) {
298
-
299
-                     $('#currentbalance').empty();
300
-                     $('#currentbalance').text(currentbalancenex);
301
-                     $('#currentbalance').removeClass('icon-loading');
302
-                }
303
-            });
304
-          }
305
-
306
-          getnexbalance();
307
-
308
-     } else if (provider == "Twilio") {
309
-
310
-          var gettwilbalance = function() {
311
-
312
-            $('#currentbalance').addClass('icon-loading');
313
-
314
-            var gettwilbalanceUrl = OC.generateUrl("/apps/sms_relentless/user/getbalancetwil");
315
-
316
-            $.ajax({
317
-                url: gettwilbalanceUrl + '/' + userid,
318
-                type: "POST",
319
-                data: { userid: userid },
320
-                cache: false,
321
-                processData: false,
322
-                contentType: false,
323
-                success: function(currentbalancetwil) {
324
-
325
-                     $('#currentbalance').empty();
326
-                     $('#currentbalance').text(currentbalancetwil);
327
-                     $('#currentbalance').removeClass('icon-loading');
328
-                }
329
-            });
330
-          }
331
-
332
-          gettwilbalance();
333
-
334
-     } else if (provider == "Flowroute") {
335
-
336
-          var getflowbalance = function() {
337
-
338
-            $('#currentbalance').addClass('icon-loading');
339
-
340
-            var getflowbalanceUrl = OC.generateUrl("/apps/sms_relentless/user/getbalanceflow");
341
-
342
-            $.ajax({
343
-                url: getflowbalanceUrl + '/' + userid,
344
-                type: "POST",
345
-                data: { userid: userid },
346
-                cache: false,
347
-                processData: false,
348
-                contentType: false,
349
-                success: function(currentbalanceflow) {
350
-
351
-                     $('#currentbalance').empty();
352
-                     $('#currentbalance').text(currentbalanceflow);
353
-                     $('#currentbalance').removeClass('icon-loading');
354
-                }
355
-            });
356
-          }
357
-
358
-          getflowbalance();
359
-
360
-       } else if (provider == "") {
361
-                $('#currentbalance').text("");
362
-                $('#currentbalance').removeClass('icon-loading');
363
-       }
364
-  });
365
-
366
-
367
-  // If a Sender ID is selected
368
-  $("#currentsmsnmbrs").on("change", function () {
369
-
370
-          if ($("#currentsmsnmbrs option[value='']").length > 0) {
371
-
372
-              selectedid = $('#currentsmsnmbrs :selected').val();
373
-              var setIdsplit = selectedid.split(":");
374
-	      chosenProvider = setIdsplit[0];
375
-
376
-              // Set the valid MMS file extensions, maximum MMS message size, maximum message size when non-jpeg/png/gif files are included, maximum number of files and the info note content, for the chosen provider
377
-	      if (chosenProvider == "Tx") {
378
-		  validExtensions = ["jpg", "jpeg", "png", "gif", "mp3", "ogg", "amr", "mp4", "3gpp", "pdf", "vcf", "vcard", "txt"];
379
-		  // Maximum size of message text + files in KB
380
-		  maximumsize = 1024;
381
-                  maximumsizeinit = 1024;
382
-		  maxsizenonimage = 600;
383
-		  maximumfilenumber = 10;
384
-                  chosenProvFullName = "Telnyx";
385
-                  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Telnyx, if you send only jpeg/jpg, png \
386
-                                     or gif files, the size of all the files plus the size of the text should be \
387
-                                     <a href='https://support.telnyx.com/en/articles/4450150-faqs-about-mms-at-telnyx' style='color:#1b60ba' target='_blank' \
388
-                                     rel='noreferrer noopener'>1024 KB</a> or less. If you send files of other formats, the total size of the files plus the size of the text should \
389
-                                     be 600 KB or less. Allowed formats are jpeg/jpg, png, gif, mp3, ogg, amr, mp4, 3gpp, pdf, vcf, vcard and txt. By default, Telnyx accounts are \
390
-                                     limited to <a href='https://support.telnyx.com/en/articles/3102823-mms-sending-and-receiving' style='color:#1b60ba' target='_blank' \
391
-                                     rel='noreferrer noopener'>1 MMS message per second</a>. Deliverability of MMS messages depends on the carrier and device of the receiver. \
392
-                                     Carriers can reject MMS messages with files exceeding a certain size. The best deliverability is achieved when sending jpeg/jpg, png or \
393
-                                     gif files, with a total message size of 600 KB or less. Telnyx allows sending MMS messages only from US or Canadian phone numbers to other US \
394
-                                     or Canadian phone numbers. Although all the specified file types can be added to the MMS, only the most common media file types (jpeg/jpg, png, \
395
-                                     gif, mp4, ogg, etc.) can be previewed in the adjoining pane.";
396
-                  $("#tooltiptextfourth").html(infonotecontent);
397
-	      } else if (chosenProvider == "Pl") {
398
-		  validExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "wav", "wave", "mp4", "amr", "mpg", "mpeg", "3gpp", "3gpp2", "vcf", "vcard", "x-vcard", "ics", "ical", "ifb", 
399
-                                     "icalendar", "csv", "txt", "pdf", "xls"];
400
-		  // Maximum size of message text + files in KB
401
-		  maximumsize = 5120;
402
-                  maximumsizeinit = 5120;
403
-		  maxsizenonimage = 600;
404
-		  maximumfilenumber = 10;
405
-                  chosenProvFullName = "Plivo";
406
-                  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Plivo, if you send only jpeg/jpg, png \
407
-                                     or gif files, the size of all the files plus the size of the text should be \
408
-                                     <a href='https://support.plivo.com/hc/en-us/articles/360042280091-What-are-the-MMS-upload-size-limits-and-file-restrictions-' \
409
-                                     style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>5120 KB</a> or less. If you send files of other formats, the total size \
410
-                                     of the files plus the size of the text should be 600 KB or less. <a href='https://support.plivo.com/hc/en-us/articles/360042273051' \
411
-                                     style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>Allowed formats</a> are jpeg/jpg, png, gif, bmp, wav/wave, mp4, amr, mpg, mpeg, 3gpp, \
412
-                                     3gpp2, vcf, vcard, x-vcard, ics, ical, ifb, icalendar, csv, txt, pdf and xls. Deliverability of MMS messages depends on the carrier and \
413
-                                     device of the receiver. Carriers can reject MMS messages with files exceeding a certain size. The best deliverability is \
414
-                                     achieved when sending jpeg/jpg, png or gif files, with a total message size of 600 KB or less. Plivo allows sending MMS messages \
415
-                                     only from US or Canadian phone numbers to other US or Canadian phone numbers. Although all the specified file types can be added to the MMS, \
416
-                                     only the most common media file types (jpeg/jpg, png, gif, wav/wave, mp4, etc.) can be previewed in the adjoining pane.";
417
-                  $("#tooltiptextfourth").html(infonotecontent);
418
-	      } else if (chosenProvider == "Tw") {
419
-		  validExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "tiff", "tif", "au", "snd", "l16", "wav", "wave", "aiff", "pcm", "mp4", "ogg", "ra", "ram", "3gpp", 
420
-                                     "3gpp2", "ac3", "webm", "amr", "mpg", "mpeg", "mov", "qt", "h261", "h263", "h264", "vcf", "vcard", "x-vcard", "csv", "rtf", "ics", "ical", "ifb", 
421
-                                     "icalendar", "directory", "pdf", "pkpass"];
422
-		  // Maximum size of message text + files in KB
423
-		  maximumsize = 5120;
424
-                  maximumsizeinit = 5120;
425
-		  maxsizenonimage = 600;
426
-		  maximumfilenumber = 10;
427
-                  chosenProvFullName = "Twilio";
428
-                  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Twilio, if you send only jpeg/jpg, png \
429
-                                     or gif files, the size of all the files plus the size of the text should be \
430
-                                     <a href='https://support.twilio.com/hc/en-us/articles/360018832773-Twilio-Programmable-SMS-Supported-File-Types-and-Size-Limits-for-MMS-Media-Messages' \
431
-                                     style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>5120 KB</a> or less. If you send files of other formats, the total size \
432
-                                     of the files plus the size of the text should be 600 KB or less. <a href='https://www.twilio.com/docs/sms/accepted-mime-types' \
433
-                                     style='color:#1b60ba' target='_blank' rel='noreferrer noopener'>Allowed formats</a> are jpeg/jpg, png, gif, bmp, tiff/tif, au, snd, l16, \
434
-                                     wav/wave, aiff, pcm, mp4, ogg, ra, ram, 3gpp, 3gpp2, ac3, webm, amr, mpg, mpeg, mov, qt, h261, h263, h264, vcf, vcard, x-vcard, csv, rtf, ics, \
435
-                                     ical, ifb, icalendar, directory, pdf and pkpass. Deliverability of MMS messages depends on the carrier and device of the receiver. Carriers \
436
-                                     can reject MMS messages with files exceeding a certain size. The best deliverability is achieved when sending jpeg/jpg, png or gif files, \
437
-                                     with a total message size of 600 KB or less. Twilio allows sending MMS messages from US or Canadian phone numbers to other US or Canadian phone \
438
-                                     numbers. However, MMS messages sent internationally will be converted to SMS messages with URL links to the included files. Although all the \
439
-                                     specified file types can be added to the MMS, only the most common media file types (jpeg/jpg, png, gif, wav/wave, mp4, ogg, etc.) can be \
440
-                                     previewed in the adjoining pane."
441
-                  $("#tooltiptextfourth").html(infonotecontent);
442
-	      } else if (chosenProvider == "Fl") {
443
-		  validExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "3gp", "mp4", "avi", "amr", "midi", "wav", "wave", "ac3", "mp3"];
444
-		  // Maximum size of message text + files in KB
445
-		  maximumsize = 750;
446
-                  maximumsizeinit = 750;
447
-		  maxsizenonimage = 600;
448
-		  maximumfilenumber = 10;
449
-                  chosenProvFullName = "Flowroute";
450
-                  infonotecontent = "To send an MMS, you can upload media files or pick them from Nextcloud. You can add up to 10 files. For Flowroute, if you send only jpeg/jpg, \
451
-                                     png or gif files, the size of all the files plus the size of the text should be \
452
-                                     <a href='https://developer.flowroute.com/api/messages/v2.1/send-an-mms/' style='color:#1b60ba' target='_blank' \
453
-                                     rel='noreferrer noopener'>750 KB</a> or less. If you send files of other formats, the total \
454
-                                     size of the files plus the size of the text should be 600 KB or less. \
455
-                                     <a href='https://support.flowroute.com/937402-What-file-types-does-Flowroute-MMS-support' style='color:#1b60ba' target='_blank' \
456
-                                     rel='noreferrer noopener'>Allowed formats</a> are jpeg/jpg, png, gif, bmp, 3gp, mp4, avi, amr, midi, wav/wave, ac3 and mp3. Flowroute accounts are \
457
-                                     limited to <a href='https://developer.flowroute.com/docs/sms-mms-best-practices/#sending-and-receiving-limitations' style='color:#1b60ba' \
458
-                                     target='_blank' rel='noreferrer noopener'>1 MMS message per second</a>. Deliverability of MMS messages depends on the carrier and device \
459
-                                     of the receiver. Carriers can reject MMS messages with files exceeding a certain size. The best deliverability is achieved when sending \
460
-                                     jpeg/jpg, png or gif files, with a total message size of 600 KB or less. Flowroute allows sending MMS messages only from US or Canadian phone \
461
-                                     numbers to other US or Canadian phone numbers. Although all the specified file types can be added to the MMS, only the most common media file \
462
-                                     types (jpeg/jpg, png, gif, wav/wave, mp4, etc.) can be previewed in the adjoining pane."
463
-                  $("#tooltiptextfourth").html(infonotecontent);
464
-	      }
465
-
466
-          } else { selectedid = ''; }
467
-  });
468
-
469
-  // Check the checkbox to send SMS message to multiple recipients
470
-  $('#tomultchckbx').change(function() {
471
-      if ($(this).is(':checked')) {
472
-          $("#multiplerecivers").css("display", "block");
473
-          $("#smstodiv").css("visibility", "hidden");
474
-          $("#smsto").val("");
475
-
476
-          receiversNumbers.length = 0;
477
-
478
-      } else {
479
-          $("#multiplerecivers").css("display", "none");
480
-          $("#smstodiv").css("visibility", "visible");
481
-
482
-          // Remove the uploaded file(s) if any
483
-          $("#induploadfile").remove();
484
-
485
-          receiversNumbers.length = 0;
486
-      }
487
-  });
488
-
489
-  // Upload the file with the recipients' phone numbers
490
-  $("#uploadfileforsms").change(function(e) {
491
-
492
-     $("#fileuploadednm").empty();
493
-
494
-     receiversNumbers.length = 0;
495
-
496
-     OC.msg.startAction("#sms_upload_msg", t("sms_relentless", "Uploading ..."));
497
-
498
-     var baseUrl = OC.generateUrl("/apps/sms_relentless/user/upload_numbers_file");
499
-
500
-     var formData = new FormData();
501
-     formData.append('uploadfileforsms', $('#uploadfileforsms')[0].files[0]);
502
-
503
-     var fileup = $('#uploadfileforsms').val();
504
-     var fileuptrim = fileup.split('\\').pop();
505
-
506
-     $('#fileuploadednm').append("<div id='induploadfile' class='indgenflcls'><div id='indfilediv' class='indivflcls'>" + fileuptrim + "</div><div id='indivflremove' class='indupfldl'>X</div></div><br>");
507
-
508
-     var extension = fileup.replace(/^.*\./, '');
509
-
510
-     if (extension == fileup) {
511
-         extension = "";
512
-     } else {
513
-         extension = extension.toLowerCase();
514
-     }
515
-
516
-     var validExtensionsmrec = ["txt", "csv"];
517
-
518
-     if (jQuery.inArray(extension, validExtensionsmrec) != -1) {
519
-
520
-       if (selectedid != '') {
521
-
522
-               $.ajax({
523
-                 url: baseUrl + '/' + userid,
524
-                 type: "POST",
525
-                 data: formData,
526
-                 cache: false,
527
-                 processData: false,
528
-                 contentType: false,
529
-                 success: function(numberarray) {
530
-
531
-		    if (numberarray.length > 0) {
532
-
533
-		        // Get the array of the receivers' phone numbers
534
-		        if (chosenProvider == "Tx") {
535
-
536
-		             for(key in numberarray) {
537
-		                 receiversNumbers.push("+"+numberarray[key]);
538
-		             }
539
-
540
-		        } else if (chosenProvider == "Pl") {
541
-
542
-		             for(key in numberarray) {
543
-		                 receiversNumbers.push(numberarray[key]);
544
-		             }
545
-
546
-		          } else if (chosenProvider == "Tw") {
547
-
548
-		             for(key in numberarray) {
549
-		                 receiversNumbers.push(numberarray[key]);
550
-		             }
551
-		          } else if (chosenProvider == "Fl") {
552
-
553
-		             for(key in numberarray) {
554
-		                 receiversNumbers.push(numberarray[key]);
555
-		             }
556
-		          }
557
-
558
-		    } else {
559
-//		          alert("The uploaded file doesn't seem to contain any valid phone numbers. Please upload a txt or csv file that contains phone numbers separated by commas, semicolons, vertical bars or new lines.");
560
-                          showAlert("The uploaded file doesn't seem to contain any valid phone numbers. Please upload a txt or csv file that contains phone numbers separated by commas, semicolons, vertical bars or new lines.");
561
-		    }
562
-                            
563
-                    // Preview the uploaded file
564
-                    var smsfilename = e.target.files[0].name;
565
-                    var baseUrl = OC.generateUrl("/remote.php/webdav/SMS_Relentless/temp_files/"+smsfilename);
566
-
567
-                    var reader = new FileReader();
568
-                    reader.readAsText(e.target.files[0]);
569
-                    reader.onload = function(e) {
570
-                          $("#smstables").empty();
571
-                          $("#smstables").append(e.target.result.replace(/(?:\r\n|\r|\n)/g, '<br>'));
572
-                    };
573
-
574
-                    $("#smstables").show();
575
-
576
-                    $('#sms_upload_msg').hide();
577
-                    $('#smstables').removeClass('icon-loading');
578
-
579
-                  },
580
-                  error: function() {
581
-//                     alert('Error!');
582
-                             showAlert("Error while uploading the file.");
583
-                  }
584
-               });
585
-
586
-        } else {
587
-//               alert("Please choose a Sender ID from the Set ID drop-down list!");
588
-               showAlert("Please choose a Sender ID from the Set ID drop-down list!");
589
-               $('#sms_upload_msg').hide();
590
-               $('#smstables').removeClass('icon-loading');
591
-        }
592
-
593
-     } else {
594
-//          alert('The file type is not supported ! Supported formats are txt and csv.');
595
-          showAlert("The file type is not supported ! Supported formats are txt and csv.");
596
-          $('#pf_upload_msg').hide();
597
-          $('#smstables').removeClass('icon-loading');
598
-
599
-          $("#induploadfile").remove();
600
-          $("#sms_upload_msg").hide();
601
-     }
602
-
603
-     //Preview uploaded file when clicked
604
-     $("#indfilediv").on("click", function() {
605
-
606
-          var smsfilename = e.target.files[0].name;
607
-          var baseUrl = OC.generateUrl("/remote.php/webdav/SMS_Relentless/temp_files/"+smsfilename);
608
-
609
-          var reader = new FileReader();
610
-          reader.readAsText(e.target.files[0]);
611
-          reader.onload = function(e) {
612
-                  $("#smstables").empty();
613
-                  $("#smstables").append(e.target.result.replace(/(?:\r\n|\r|\n)/g, '<br>'));
614
-          };
615
-
616
-          $("#smstables").show();
617
-          $('#sms_upload_msg').hide();
618
-          $('#smstables').removeClass('icon-loading');
619
-     });
620
-
621
-     // Remove selected file
622
-     $("#indivflremove").on("click", function() {
623
-
624
-          $("#induploadfile").remove();
625
-          $("#sms_upload_msg").hide();
626
-
627
-          receiversNumbers.length = 0;
628
-
629
-     });
630
-
631
-  });
632
-
633
-  // Show the number of characters entered in the SMS textarea and the text size in KB
634
-  $("#smstext").on('input', function() {
635
-
636
-     $("#char_count").css("display", "inline");
637
-
638
-     $("#mtextSize").css("display", "inline");
639
-
640
-     $(".maxmessagelength").css("display", "inline-block");
641
-
642
-     $("#countchnb").text($(this).val().length);
643
-
644
-     var textsize = encodeURIComponent($(this).val()).replace(/%[A-F\d]{2}/g, 'U').length;
645
-     textsizekb = parseFloat(textsize/1024).toFixed(4);
646
-     $("#textsizeinkb").text(textsizekb);
647
-
648
-     if ($(this).val().length > charcolorthr) {
649
-         $("#char_count").css("color", "#BB2E4B");
650
-     } else {
651
-         $("#char_count").css("color", "#4cbc86;");
652
-     }
653
-
654
-  });
655
-
656
-
657
-  // Check the checkbox to send file(s) as MMS
658
-  $('#mediafilechckbx').change(function() {
659
-
660
-      if ($(this).is(':checked')) {
661
-
662
-          isMMS = 1;
663
-          if (selectedid == '') {
664
-//              alert("Please, first choose a Sender ID from the Set ID drop-down list !");
665
-              showAlert("Please, first choose a Sender ID from the Set ID drop-down list !");
666
-              $(this).prop("checked", false);
667
-              isMMS = 0;
668
-              return;
669
-          }
670
-          $("#upmediafiles").css("display", "block");
671
-          $("#submitsms").prop("value", "Send MMS");
672
-
673
-      } else {
674
-
675
-          isMMS = 0;
676
-          $("#upmediafiles").css("display", "none");
677
-          $("#submitsms").prop("value", "Send SMS");
678
-
679
-          // Remove the uploaded file(s) if any
680
-          $(".indgenflclsmms").each(function() { $(this).remove(); });
681
-          $(".indgenpckfls").each(function() { $(this).remove(); });
682
-
683
-          uploadedtomms = [];
684
-          n = 1;
685
-
686
-          msgtotalflsize = 0;
687
-
688
-          $("#filestotsize").hide();
689
-      }
690
-  });
691
-
692
-
693
-  // Check if the uploaded files' format is jpeg, png or gif and adjust the maximum cumulative size of files, if necessary
694
-  function adjustMaximumSize(uploadedtomms) {
695
-				      
696
-      var nonimgcheck = 0;
697
-      for (var u = 0; u < uploadedtomms.length; u++) {
698
-	   var crupfl = uploadedtomms[u];
699
-	   var extensionup = crupfl.replace(/^.*\./, '');
700
-	   if ($.inArray(extensionup, ["jpg", "jpeg", "png", "gif"]) === -1) {
701
-	       nonimgcheck = 1;
702
-	   }
703
-      }
704
-
705
-      if (nonimgcheck == 0) { maximumsize = maximumsizeinit; }
706
-  }
707
-
708
-  // Upload files to be sent as MMS
709
-  $("#uploadfileformms").change(function(e) {
710
-
711
-     OC.msg.startAction("#pf_upload_msg", t("sms_relentless", "Uploading ..."));
712
-     $('#smstables').addClass('icon-loading');
713
-     $('#filestotsize').show();
714
-
715
-     var userid = "<?php p($userId); ?>";
716
-     var baseUrl = OC.generateUrl("/apps/sms_relentless/user/uploadfile");
717
-
718
-     var formData = new FormData();
719
-     formData.append('uploadfileformms', $('#uploadfileformms')[0].files[0]);
720
-
721
-     var currentflsize = $('#uploadfileformms')[0].files[0].size;
722
-
723
-     // Add the size of the current file to the total size of all the files
724
-     msgtotalflsize += Math.floor((currentflsize/1024) * 100)/100;
725
-
726
-     var fileup = $('#uploadfileformms').val();
727
-     var fileuptrim = fileup.split('\\').pop();
728
-
729
-     if ($.inArray(fileuptrim, uploadedtomms) != -1) {
730
-         var duplicatescheck = 1;
731
-     } else { 
732
-         var duplicatescheck = 0;
733
-     }
734
-
735
-     var extension = fileup.replace(/^.*\./, '');
736
-
737
-     if (extension == fileup) {
738
-         extension = "";
739
-     } else {
740
-         extension = extension.toLowerCase();
741
-     }
742
-
743
-     // If the uploaded file's format is different from jpeg, png or gif, the maximum allowed size of the message will be lower
744
-     if (($.inArray(extension, ["jpg", "jpeg", "png", "gif"]) === -1) && (msgtotalflsize <= Number(maximumsize) - Number(textsizekb))) {
745
-         maximumsize = maxsizenonimage;
746
-     }
747
-
748
-     if ($.inArray(extension, validExtensions) != -1) {
749
-
750
-       if (duplicatescheck == 0) {
751
-
752
-         if (msgtotalflsize <= Number(maximumsize) - Number(textsizekb)) {
753
-
754
-            if (n <= maximumfilenumber) {
755
-
756
-               $.ajax({
757
-                 url: baseUrl + '/' + userid,
758
-                 type: "POST",
759
-                 data: formData,
760
-                 cache: false,
761
-                 processData: false,
762
-                 contentType: false,
763
-                 success: function(totalflsize) {
764
-
765
-                   uploadedtomms.push(fileuptrim);
766
-
767
-                   $('#filessizetext').text(totalflsize);
768
-
769
-                   var rectotfilesz = parseFloat(totalflsize);
770
-
771
-                   if (rectotfilesz <= maximumsize) {
772
-                       $('#submitsms').attr("disabled", false);
773
-                       $('#filestotsize').css('color', '#189558');
774
-                   } else {
775
-                       $('#filestotsize').css('color', '#ba3555');
776
-//                       alert("Error ! For "+ chosenProvFullName +", for the chosen files format, the size of all the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
777
-                       showAlert("Error ! For "+ chosenProvFullName +", for the chosen files format, the size of all the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
778
-                       $('#submitsms').attr("disabled", true);
779
-                       $('#smstables').removeClass('icon-loading');
780
-                       $('#pf_upload_msg').hide();
781
-                   }
782
-
783
-                   $('#mmsfileuploadednm').append("<div class='indgenflclsmms'><div id='"+n+"indfilediv' class='indivflcls'>" + n + ") " + fileuptrim + "</div><div class='indupfldl'>X</div></div>");
784
-                   n++;
785
-
786
-                   // Preview the file when you click on its name
787
-                   $("div:visible[id*='indfilediv']").each(function() {
788
-
789
-                        $(this).on("click", function(eventclck) {
790
-
791
-                           $("#mmsfoldersview").css("display", "inline-block");
792
-                           var mmsfilenameinit = $(this).text();
793
-                           var mmsfilenamesec = mmsfilenameinit.substring(mmsfilenameinit.indexOf(" ") + 1);
794
-                           var mmsfilename = mmsfilenamesec.replace("X","");
795
-                           var baseUrl = firstPathEl+"/remote.php/webdav/SMS_Relentless/temp_files/"+mmsfilename;
796
-                           var extenlst = mmsfilename.replace(/^.*\./, '');
797
-
798
-                           if (extenlst == mmsfilename) {
799
-                               extenlst = "";
800
-                           } else {
801
-                               extenlst = extenlst.toLowerCase();
802
-                           }
803
-
804
-                           if (extenlst == 'jpg' || extenlst == 'jpeg') {
805
-                                  $("#smstables").empty();
806
-                                  $("#smstables").append('<img style="width:auto;height:auto" id="uploadedjpg" src="#" />');
807
-                                  $("#uploadedjpg").attr('src', readjpg[mmsfilename]);
808
-                           } else if (extenlst == 'png') {
809
-                                  $("#smstables").empty();
810
-                                  $("#smstables").append('<img style="width:auto;height:auto" id="uploadedpng" src="#" />');
811
-                                  $("#uploadedpng").attr('src', readpng[mmsfilename]);
812
-                           } else if (extenlst == 'gif') {
813
-                                  $("#smstables").empty();
814
-                                  $("#smstables").append('<img style="width:auto;height:auto" id="uploadedgif" src="#" />');
815
-                                  $("#uploadedgif").attr('src', readgif[mmsfilename]);
816
-                           } else if (extenlst == 'bmp') {
817
-                                  $("#smstables").empty();
818
-                                  $("#smstables").append('<img style="width:auto;height:auto" id="uploadedbmp" src="#" />');
819
-                                  $("#uploadedbmp").attr('src', readbmp[mmsfilename]);
820
-                           } else if (extenlst == 'tif' || extenlst == 'tiff') {
821
-                                  var tiffile = '/remote.php/webdav/SMS_Relentless/temp_files/'+mmsfilename;
822
-                                  var xhr = new XMLHttpRequest();
823
-                                  xhr.responseType = 'arraybuffer';
824
-                                  xhr.open('GET', tiffile);
825
-                                  xhr.onload = function (evnt) {
826
-                                      var tiff = new Tiff({buffer: xhr.response});
827
-                                      var tifcanvas = tiff.toCanvas();
828
-                                      $("#smstables").empty();
829
-                                      $("#smstables").append(tifcanvas);
830
-                                  };
831
-                                  xhr.send();
832
-                           } else if (extenlst == 'pdf') {
833
-                                  var viewerclick = OC.generateUrl('/apps/files_pdfviewer/?file={file}', {file: baseUrl});
834
-                                  var $iframe = $('<iframe id="docclickview" style="width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:1041;" src="' + viewerclick + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals"></iframe>');
835
-                                  $("#smstables").empty();
836
-                                  $("#smstables").append($iframe);
837
-                           } else if (extenlst == 'txt') {
838
-                                  $("#smstables").empty();
839
-                                  $("#smstables").append(readtxtfile[mmsfilename]);
840
-                           } else if (extension == 'mp4') {
841
-                                  $("#smstables").empty();
842
-                                  $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmp4" src="'+ baseUrl +'"></video>');
843
-		           } else if (extension == 'ogg') {
844
-		                  $("#smstables").empty();
845
-		                  $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedogg" src="'+ baseUrl +'"></video>');
846
-		           } else if (extension == 'avi') {
847
-		                  $("#smstables").empty();
848
-		                  $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedavi" src="'+ baseUrl +'" type="video/avi"></video>');
849
-		           } else if (extension == 'mpg' || extension == 'mpeg') {
850
-		                  $("#smstables").empty();
851
-		                  $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmpg" src="'+ baseUrl +'"></video>');
852
-		           } else if (extension == 'wav' || extension == 'wave') {
853
-		                  $("#smstables").empty();
854
-		                  $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedwav" src="'+ baseUrl +'"></audio>');
855
-		           } else if (extension == 'mp3') {
856
-		                  $("#smstables").empty();
857
-		                  $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmp3" src="'+ baseUrl +'" type="audio/mp3"></audio>');
858
-		           } else if (extension == 'midi') {
859
-		                  $("#smstables").empty();
860
-		                  $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmidi" src="'+ baseUrl +'" type="audio/midi"></audio>');
861
-		           }
862
-
863
-                           $("#smstables").show();
864
-                           $("#mmsfoldersview").hide();
865
-                        });
866
-                   });
867
-
868
-                   // Remove uploaded files
869
-                   $('[class*="indupfldl"]').last().click(function() {
870
-
871
-                           var userid = "<?php p($userId); ?>";
872
-                           var baseUrl = OC.generateUrl("/apps/sms_relentless/user/removeupfile");
873
-
874
-                           var removedfilenameinit = $(this).closest('[class*="indgenflclsmms"]').find('[class*="indivflcls"]').text();
875
-
876
-                           var removedfilesplit = removedfilenameinit.split(") ");
877
-                           var removedflnb = parseInt(removedfilesplit[0]);
878
-
879
-                           $(this).closest('[class*="indgenflclsmms"]').find('[class*="indivflcls"]').hide();
880
-                           $(this).hide();
881
-
882
-                           var removedfilename = removedfilenameinit.substring(removedfilenameinit.indexOf(" ") + 1);
883
-
884
-                           uploadedtomms = $.grep(uploadedtomms, function(value) {
885
-                                           return value != removedfilename;
886
-                           });
887
-
888
-                           $.ajax({
889
-                                   url: baseUrl + '/' + userid,
890
-                                   type: "POST",
891
-                                   data: {removedfilename: removedfilename},
892
-                                   success: function(totalflsize) {
893
-
894
-                                      msgtotalflsize = totalflsize;
895
-                                      $('#filessizetext').text(totalflsize);
896
-
897
-                                      adjustMaximumSize(uploadedtomms);
898
-
899
-                                      // Check message size
900
-                                      var rectotfilesz = parseFloat(totalflsize);
901
-
902
-                                      if (rectotfilesz <= Number(maximumsize) - Number(textsizekb)) {
903
-                                          $('#submitsms').attr("disabled", false);
904
-                                          $('#filestotsize').css('color', '#189558');
905
-                                      } else {
906
-                                          $('#filestotsize').css('color', '#ba3555');
907
-//                                          alert("Error ! For "+ chosenProvFullName +", for the chosen files format, the total size of the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
908
-                                          showAlert("Error ! For "+ chosenProvFullName +", for the chosen files format, the total size of the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
909
-                                          $('#submitsms').attr("disabled", true);
910
-                                      }
911
-
912
-                                      // Rewrite order numbers for files that follow
913
-                                      --n;
914
-                                      $("div:visible[id*='indfilediv']").each(function() {
915
-
916
-                                          var getdivtext =  $(this).text();
917
-                                          var splitdivtext = getdivtext.split(") ");
918
-                                          var currentnbvalue = parseInt(splitdivtext[0]);
919
-                                          var newnbvalue = currentnbvalue - 1;
920
-
921
-                                          if (currentnbvalue > removedflnb) {
922
-                                              var replacedstr = newnbvalue + ") " + splitdivtext[1];
923
-                                              $(this).text(replacedstr);
924
-                                          }
925
-                                      });
926
-
927
-                                      $("div:visible[id*='indflpicked']").each(function() {
928
-
929
-                                          var getdivtext =  $(this).text();
930
-                                          var splitdivtext = getdivtext.split(") ");
931
-                                          var currentnbvalue = parseInt(splitdivtext[0]);
932
-                                          var newnbvalue = currentnbvalue - 1;
933
-
934
-                                          if (currentnbvalue > removedflnb) {
935
-                                              var replacedstr = newnbvalue + ") " + splitdivtext[1];
936
-                                              $(this).text(replacedstr);
937
-                                          }
938
-                                      });
939
-
940
-                                   },
941
-                                   error: function() {
942
-//                                          alert('Error removing file(s)!');
943
-                                              showAlert("Error while removing the file(s).");
944
-                                   }
945
-                           });
946
-
947
-                           $('#smstables').removeClass('icon-loading');
948
-                           $("#smstables").empty();
949
-                   });
950
-
951
-                   // Preview the uploaded file
952
-                   $("#mmsfoldersview").css("display", "inline-block");
953
-                   var mmsfilename = e.target.files[0].name;
954
-                   var baseUrl = firstPathEl+"/remote.php/webdav/SMS_Relentless/temp_files/"+mmsfilename;
955
-
956
-
957
-                   if (extension == 'jpg' || extension == 'jpeg') {
958
-                              $("#smstables").empty();
959
-                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedjpg" src="#" />');
960
-
961
-                              var reader = new FileReader();
962
-                              reader.onload = function (e) {
963
-                                  readjpg[mmsfilename] = e.target.result;
964
-                                  $("#uploadedjpg").attr('src', readjpg[mmsfilename]);
965
-                              }
966
-                              reader.readAsDataURL(e.target.files[0]);
967
-                   } else if (extension == 'png') {
968
-                              $("#smstables").empty();
969
-                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedpng" src="#" />');
970
-
971
-                              var reader = new FileReader();
972
-                              reader.onload = function (e) {
973
-                                  readpng[mmsfilename] = e.target.result;
974
-                                  $("#uploadedpng").attr('src', readpng[mmsfilename]);
975
-                              }
976
-                              reader.readAsDataURL(e.target.files[0]);
977
-
978
-                   } else if (extension == 'gif') {
979
-                              $("#smstables").empty();
980
-                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedgif" src="#" />');
981
-
982
-                              var reader = new FileReader();
983
-                              reader.onload = function (e) {
984
-                                  readgif[mmsfilename] = e.target.result;
985
-                                  $("#uploadedgif").attr('src', readgif[mmsfilename]);
986
-                              }
987
-                              reader.readAsDataURL(e.target.files[0]);
988
-
989
-                   } else if (extension == 'bmp') {
990
-                              $("#smstables").empty();
991
-                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedbmp" src="#" />');
992
-
993
-                              var reader = new FileReader();
994
-                              reader.onload = function (e) {
995
-                                  readbmp[mmsfilename] = e.target.result;
996
-                                  $("#uploadedbmp").attr('src', readbmp[mmsfilename]);
997
-                              }
998
-                              reader.readAsDataURL(e.target.files[0]);
999
-
1000
-                   } else if (extension == 'tif' || extension == 'tiff') {
1001
-                              var tiffile = '/remote.php/webdav/SMS_Relentless/temp_files/'+mmsfilename;
1002
-                              var xhr = new XMLHttpRequest();
1003
-                              xhr.responseType = 'arraybuffer';
1004
-                              xhr.open('GET', tiffile);
1005
-                              xhr.onload = function (e) {
1006
-                                  var tiff = new Tiff({buffer: xhr.response});
1007
-                                  var tifcanvas = tiff.toCanvas();
1008
-                                  $("#smstables").empty();
1009
-                                  $("#smstables").append(tifcanvas);
1010
-                              };
1011
-                              xhr.send();
1012
-
1013
-                   } else if (extension == 'pdf') {
1014
-                              var viewer = OC.generateUrl('/apps/files_pdfviewer/?file={file}', {file: baseUrl});
1015
-                              var $iframe = $('<iframe id="docviewer" style="width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:1041;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals"></iframe>');
1016
-                              $("#smstables").empty();
1017
-                              $("#smstables").append($iframe);
1018
-
1019
-                   } else if (extension == 'txt') {
1020
-                              var reader = new FileReader();
1021
-                              reader.readAsText(e.target.files[0]);
1022
-                              reader.onload = function(e) {
1023
-                                  readtxtfile[mmsfilename] = e.target.result.replace(/(?:\r\n|\r|\n)/g, '<br>');
1024
-                                  $("#smstables").empty();
1025
-                                  $("#smstables").append(readtxtfile[mmsfilename]);
1026
-                              };
1027
-                   } else if (extension == 'mp4') {
1028
-                              $("#smstables").empty();
1029
-                              $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmp4" src="'+ baseUrl +'"></video>');
1030
-                   } else if (extension == 'ogg') {
1031
-                              $("#smstables").empty();
1032
-                              $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedogg" src="'+ baseUrl +'"></video>');
1033
-                   } else if (extension == 'avi') {
1034
-                              $("#smstables").empty();
1035
-                              $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedavi" src="'+ baseUrl +'" type="video/avi"></video>');
1036
-                   } else if (extension == 'mpg' || extension == 'mpeg') {
1037
-                              $("#smstables").empty();
1038
-                              $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmpg" src="'+ baseUrl +'"></video>');
1039
-                   } else if (extension == 'wav' || extension == 'wave') {
1040
-                              $("#smstables").empty();
1041
-                              $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedwav" src="'+ baseUrl +'"></audio>');
1042
-                   } else if (extension == 'mp3') {
1043
-                              $("#smstables").empty();
1044
-                              $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmp3" src="'+ baseUrl +'" type="audio/mp3"></audio>');
1045
-                   } else if (extension == 'midi') {
1046
-                              $("#smstables").empty();
1047
-                              $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmidi" src="'+ baseUrl +'" type="audio/midi"></audio>');
1048
-                   }
1049
-
1050
-                   $("#smstables").show();
1051
-                   $('#pf_upload_msg').hide();
1052
-                   $('#smstables').removeClass('icon-loading');
1053
-                   $("#mmsfoldersview").hide();
1054
-                 },
1055
-                 error: function() {
1056
-//                     alert('Error uploading file!');
1057
-                              showAlert("Error while uploading the file.");
1058
-                 }
1059
-               });
1060
-
1061
-            } else {
1062
-                  msgtotalflsize -= Math.floor((currentflsize/1024) * 100)/100;
1063
-                  adjustMaximumSize(uploadedtomms);
1064
-
1065
-//                  alert("Error ! You cannot send more than 10 files in one MMS !");
1066
-                  showAlert("Error! You cannot send more than 10 files in one MMS !");
1067
-                  $('#pf_upload_msg').hide();
1068
-                  $('#smstables').removeClass('icon-loading');
1069
-            }
1070
-         } else {
1071
-              msgtotalflsize -= Math.floor((currentflsize/1024) * 100)/100;
1072
-              adjustMaximumSize(uploadedtomms);
1073
-
1074
-//              alert('Error ! For '+ chosenProvFullName +', for the chosen files format, the size of all the included files plus the size of the text cannot be greater than '+ maxsizenonimage +' KB !');
1075
-              showAlert("Error ! For "+ chosenProvFullName +", for the chosen files format, the size of all the included files plus the size of the text cannot be greater than "+ maxsizenonimage +" KB !");
1076
-              $('#pf_upload_msg').hide();
1077
-              $('#smstables').removeClass('icon-loading');
1078
-         }
1079
-       } else {
1080
-            msgtotalflsize -= Math.floor((currentflsize/1024) * 100)/100;
1081
-            adjustMaximumSize(uploadedtomms);
1082
-
1083
-//            alert("Error ! There is already a file named '"+fileuptrim+"' in the 'SMS_Relentless/temp_files' folder !");
1084
-            showAlert("Error ! There is already a file named '"+ fileuptrim +"' in the 'SMS_Relentless/temp_files' folder !");
1085
-            $('#pf_upload_msg').hide();
1086
-            $('#smstables').removeClass('icon-loading');
1087
-       }
1088
-
1089
-     } else {
1090
-          msgtotalflsize -= Math.floor((currentflsize/1024) * 100)/100;
1091
-          adjustMaximumSize(uploadedtomms);
1092
-
1093
-//          alert('The file type is not supported ! Supported extensions for '+ chosenProvFullName +' are: '+ validExtensions.join(", ") +'.');
1094
-          showAlert("The file type is not supported! Supported extensions for "+ chosenProvFullName +" are: "+ validExtensions.join(", ") +".");
1095
-          $('#pf_upload_msg').hide();
1096
-          $('#smstables').removeClass('icon-loading');
1097
-     }
1098
-  });
1099
-
1100
-
1101
-  // Pick file(s) from Nextcloud, to send as MMS
1102
-  var mmsfilename = null;
1103
-
1104
-  $("#choosefilen").on("click", function(evn) {
1105
-
1106
-                OC.dialogs.filepicker(
1107
-                        t('settings', "Select a file to send as MMS."),
1108
-                        function (path) {
1109
-
1110
-                              OC.msg.startAction("#pf_choose_msg", t("sms_relentless", "Please wait ..."));
1111
-                              $('#smstables').addClass('icon-loading');
1112
-                              $('#filestotsize').show();
1113
-
1114
-                              var userid = "<?php p($userId); ?>";
1115
-                              var baseUrl = OC.generateUrl("/apps/sms_relentless/user/pickfile");
1116
-
1117
-                              mmsfilename = path.split('/').pop();
1118
-
1119
-                              if ($.inArray(mmsfilename, uploadedtomms) != -1) {
1120
-                                  var duplicatescheck = 1;
1121
-                              } else var duplicatescheck = 0;
1122
-
1123
-                              var extension = mmsfilename.replace(/^.*\./, '');
1124
-
1125
-                              if (extension == mmsfilename) {
1126
-                                  extension = "";
1127
-                              } else {
1128
-                                  extension = extension.toLowerCase();
1129
-                              }
1130
-
1131
-			      // If the picked file's format is different from jpeg, png or gif, the maximum allowed size of the message will be lower
1132
-			      if ($.inArray(extension, ["jpg", "jpeg", "png", "gif"]) === -1) {
1133
-				   maximumsize = maxsizenonimage;
1134
-			      }
1135
-
1136
-                              if ($.inArray(extension, validExtensions) != -1) {
1137
-
1138
-                                 if (duplicatescheck == 0) {
1139
-
1140
-                                    if (n <= maximumfilenumber) {
1141
-
1142
-                                       $.ajax({
1143
-                                          url: baseUrl + '/' + userid,
1144
-                                          type: "POST",
1145
-                                          data: { path: path },
1146
-                                          success: function(pickresult) {
1147
-
1148
-                                                uploadedtomms.push(mmsfilename);
1149
-
1150
-                                                var totalflsize = pickresult[0];
1151
-                                                var pickedflsize = pickresult[1];
1152
-
1153
-                                                // Check message size
1154
-                                                var rectotfilesz = parseFloat(totalflsize);
1155
-                                                var filesplustextsize = Number(rectotfilesz) + Number(textsizekb);
1156
-
1157
-                                                if (filesplustextsize <= maximumsize) {
1158
-
1159
-                                                    $("#mmsfoldersview").css("display", "inline-block");
1160
-
1161
-                                                    $('#filespickednc').append("<div class='indgenpckfls'><div id='"+n+"indflpicked' class='indivflpckd'>" + n + ") " + mmsfilename + "</div><div class='indpckfldl'>X</div></div>");
1162
-                                                    n++;
1163
-
1164
-                                                    msgtotalflsize = totalflsize;
1165
-                                                    $('#filessizetext').text(totalflsize);
1166
-                                                    $('#filestotsize').css('color', '#189558');
1167
-
1168
-                                                } else {
1169
-
1170
-                                                    uploadedtomms = uploadedtomms.filter(function(e) { return e !== mmsfilename });
1171
-                                                    $('#filestotsize').css('color', '#ba3555');
1172
-                                                    msgtotalflsize -= pickedflsize;
1173
-                                                    var baseUrlindrm = OC.generateUrl("/apps/sms_relentless/user/removeupfile");
1174
-
1175
-                                                    $.ajax({
1176
-                                                        url: baseUrlindrm + '/' + userid,
1177
-                                                        type: "POST",
1178
-                                                        data: {removedfilename: mmsfilename},
1179
-                                                        success: function(totalflsize) {
1180
-
1181
-                                                                          $('#filessizetext').text(totalflsize);
1182
-                                                                          $('#filestotsize').css('color', '#189558');
1183
-                                                                          adjustMaximumSize(uploadedtomms);
1184
-
1185
-                                                        },
1186
-                                                        error: function(totalflsize) {
1187
-                                                                          $('#filessizetext').text(totalflsize);
1188
-                                                                          if (parseFloat(totalflsize) > maximumsize) {
1189
-                                                                              $('#filestotsize').css('color', '#ba3555');
1190
-                                                                          } else { $('#filestotsize').css('color', '#189558'); }
1191
-//                                                                          alert("Error while trying to remove the last picked file from the 'SMS_Relentless/temp_files' directory!");
1192
-                                                                          showAlert("Error while trying to remove the last picked file from the 'SMS_Relentless/temp_files' directory!");
1193
-                                                        }
1194
-                                                    });
1195
-
1196
-//                                                    alert("Error ! For "+ chosenProvFullName +", for the chosen files format, the size of all the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
1197
-                                                    showAlert("Error ! For "+ chosenProvFullName +", for the chosen files format, the size of all the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
1198
-                                                }
1199
-
1200
-
1201
-                                                // Preview each file when you click on its name
1202
-                                                $("div:visible[id*='indflpicked']").each(function() {
1203
-                                                   $(this).on("click", function(event) {
1204
-
1205
-                                                      var mmsfilenameinit = $(this).text();
1206
-                                                      var mmsfilenamesec = mmsfilenameinit.substring(mmsfilenameinit.indexOf(" ") + 1);
1207
-                                                      var mmsfilenamesp = mmsfilenamesec.replace("X","");
1208
-                                                      var baseUrl = firstPathEl+"/remote.php/webdav/SMS_Relentless/temp_files/"+mmsfilenamesp;
1209
-                                                      var extenlst = mmsfilenamesp.replace(/^.*\./, '');
1210
-
1211
-                                                      if (extenlst == mmsfilenamesp) {
1212
-                                                           extenlst = "";
1213
-                                                      } else {
1214
-                                                           extenlst = extenlst.toLowerCase();
1215
-                                                      }
1216
-
1217
-
1218
-                                                      if (extenlst == 'jpg' || extenlst == 'jpeg') {
1219
-                                                              $("#smstables").empty();
1220
-                                                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedjpg" src="'+ baseUrl +'" />');
1221
-                                                      } else if (extenlst == 'png') {
1222
-                                                              $("#smstables").empty();
1223
-                                                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedpng" src="'+ baseUrl +'" />');
1224
-                                                      } else if (extenlst == 'gif') {
1225
-                                                              $("#smstables").empty();
1226
-                                                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedgif" src="'+ baseUrl +'" />');
1227
-                                                      } else if (extenlst == 'bmp') {
1228
-                                                              $("#smstables").empty();
1229
-                                                              $("#smstables").append('<img style="width:auto;height:auto" id="uploadedbmp" src="'+ baseUrl +'" />');
1230
-                                                      } else if (extenlst == 'tif' || extenlst == 'tiff') {
1231
-                                                              var tiffile = '/remote.php/webdav/SMS_Relentless/temp_files/'+mmsfilenamesp;
1232
-                                                              var xhr = new XMLHttpRequest();
1233
-                                                              xhr.responseType = 'arraybuffer';
1234
-                                                              xhr.open('GET', tiffile);
1235
-                                                              xhr.onload = function (evnt) {
1236
-                                                                  var tiff = new Tiff({buffer: xhr.response});
1237
-                                                                  var tifcanvas = tiff.toCanvas();
1238
-                                                                  $("#smstables").empty();
1239
-                                                                  $("#smstables").append(tifcanvas);
1240
-                                                              };
1241
-                                                              xhr.send();
1242
-                                                      } else if (extenlst == 'pdf') {
1243
-                                                              var viewerclick = OC.generateUrl('/apps/files_pdfviewer/?file={file}', {file: baseUrl});
1244
-                                                              var $iframe = $('<iframe id="docclickview" style="width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:1041;" src="' + viewerclick + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals"></iframe>');
1245
-                                                              $("#smstables").empty();
1246
-                                                              $("#smstables").append($iframe);
1247
-                                                      } else if (extenlst == 'txt') {
1248
-                                                              $("#smstables").empty();
1249
-                                                              $("#smstables").append(readtxtfile[mmsfilenamesp]);
1250
-                                                      } else if (extension == 'mp4') {
1251
-							      $("#smstables").empty();
1252
-							      $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmp4" src="'+ baseUrl +'"></video>');
1253
-						      } else if (extension == 'ogg') {
1254
-							      $("#smstables").empty();
1255
-							      $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedogg" src="'+ baseUrl +'"></video>');
1256
-						      } else if (extension == 'avi') {
1257
-							      $("#smstables").empty();
1258
-							      $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedavi" src="'+ baseUrl +'" type="video/avi"></video>');
1259
-						      } else if (extension == 'mpg' || extension == 'mpeg') {
1260
-							      $("#smstables").empty();
1261
-							      $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmpg" src="'+ baseUrl +'"></video>');
1262
-						      } else if (extension == 'wav' || extension == 'wave') {
1263
-							      $("#smstables").empty();
1264
-							      $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedwav" src="'+ baseUrl +'"></audio>');
1265
-						      } else if (extension == 'mp3') {
1266
-							      $("#smstables").empty();
1267
-							      $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmp3" src="'+ baseUrl +'" type="audio/mp3"></audio>');
1268
-						      } else if (extension == 'midi') {
1269
-							      $("#smstables").empty();
1270
-							      $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmidi" src="'+ baseUrl +'" type="audio/midi"></audio>');
1271
-						      }
1272
-
1273
-
1274
-                                                      $("#smstables").show();
1275
-                                                      $("#mmsfoldersview").hide();
1276
-                                                   });
1277
-                                                });
1278
-
1279
-
1280
-                                                // Remove picked files
1281
-                                                $('[class*="indpckfldl"]').last().click(function() {
1282
-                                                    var userid = "<?php p($userId); ?>";
1283
-                                                    var baseUrl = OC.generateUrl("/apps/sms_relentless/user/removeupfile");
1284
-
1285
-                                                    var removedfilenameinit = $(this).closest('[class*="indgenpckfls"]').find('[class*="indivflpckd"]').text();
1286
-
1287
-                                                    var removedfilesplit = removedfilenameinit.split(") ");
1288
-                                                    var removedflnb = parseInt(removedfilesplit[0]);
1289
-
1290
-                                                    $(this).closest('[class*="indgenpckfls"]').find('[class*="indivflpckd"]').hide();
1291
-                                                    $(this).hide();
1292
-                                                    var removedfilename = removedfilenameinit.substring(removedfilenameinit.indexOf(" ") + 1);
1293
-
1294
-                                                    uploadedtomms = $.grep(uploadedtomms, function(value) {
1295
-                                                             return value != removedfilename;
1296
-                                                    });
1297
-
1298
-                                                    $.ajax({
1299
-                                                        url: baseUrl + '/' + userid,
1300
-                                                        type: "POST",
1301
-                                                        data: {removedfilename: removedfilename},
1302
-                                                        success: function(totalflsize) {
1303
-
1304
-                                                             msgtotalflsize = totalflsize;
1305
-                                                             $('#filessizetext').text(totalflsize);
1306
-                                                             adjustMaximumSize(uploadedtomms);
1307
-
1308
-                                                             // Check message size
1309
-                                                             var rectotfilesz = parseFloat(totalflsize);
1310
-
1311
-                                                             if (rectotfilesz > maximumsize) {
1312
-                                                                 $('#filestotsize').css('color', '#ba3555');
1313
-//                                                                 alert("Error ! For "+ chosenProvFullName +", for the chosen files format, the size of all the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
1314
-                                                                 showAlert("Error ! For "+ chosenProvFullName +", for the chosen files format, the size of all the included files plus the size of the text cannot exceed "+ maximumsize +" KB !");
1315
-                                                                 $('#submitsms').attr("disabled", true);
1316
-                                                             } else {
1317
-                                                                 $('#submitsms').attr("disabled", false);
1318
-                                                                 $('#filestotsize').css('color', '#189558');
1319
-                                                               }
1320
-
1321
-                                                             // Rewrite order numbers for files that follow
1322
-                                                             --n;
1323
-                                                             $("div:visible[id*='indflpicked']").each(function() {
1324
-
1325
-                                                                  var getdivtext =  $(this).text();
1326
-                                                                  var splitdivtext = getdivtext.split(") ");
1327
-                                                                  var currentnbvalue = parseInt(splitdivtext[0]);
1328
-                                                                  var newnbvalue = currentnbvalue - 1;
1329
-
1330
-                                                                  if (currentnbvalue > removedflnb) {
1331
-                                                                      var replacedstr = newnbvalue + ") " + splitdivtext[1];
1332
-                                                                      $(this).text(replacedstr);
1333
-                                                                  }
1334
-                                                             });
1335
-                                                        },
1336
-                                                        error: function() {
1337
-//                                                             alert('Error !');
1338
-                                                                  showAlert("Error while removing the file.");
1339
-                                                        }
1340
-                                                    });
1341
-
1342
-                                                    $('#smstables').removeClass('icon-loading');
1343
-                                                    $("#smstables").empty();
1344
-                                                });
1345
-
1346
-
1347
-		                                // Preview the picked file
1348
-		                                $("#mmsfoldersview").css("display", "inline-block");
1349
-		                                var flUrl = firstPathEl+"/remote.php/webdav/SMS_Relentless/temp_files/"+mmsfilename;
1350
-		                                var pickUrl = OC.generateUrl("/apps/sms_relentless/user/getpickedfile");
1351
-
1352
-
1353
-						if (extension == 'jpg' || extension == 'jpeg') {
1354
-
1355
-		                                            $("#smstables").empty();
1356
-		                                            $("#smstables").append('<img style="width:auto;height:auto" id="uploadedjpg" src="'+ flUrl +'" />');
1357
-
1358
-		                                } else if (extension == 'png') {
1359
-
1360
-		                                            $("#smstables").empty();
1361
-		                                            $("#smstables").append('<img style="width:auto;height:auto" id="uploadedpng" src="'+ flUrl +'" />');
1362
-
1363
-		                                } else if (extension == 'gif') {
1364
-
1365
-		                                            $("#smstables").empty();
1366
-		                                            $("#smstables").append('<img style="width:auto;height:auto" id="uploadedgif" src="'+ flUrl +'" />');
1367
-
1368
-		                                } else if (extension == 'bmp') {
1369
-
1370
-	                                                    $("#smstables").empty();
1371
-		                                            $("#smstables").append('<img style="width:auto;height:auto" id="uploadedbmp" src="'+ flUrl +'" />');
1372
-
1373
-		                                } else if (extension == 'tif' || extension == 'tiff') {
1374
-
1375
-		                                       var tiffile = '/remote.php/webdav/SMS_Relentless/temp_files/'+mmsfilename;
1376
-		                                       var xhr = new XMLHttpRequest();
1377
-		                                       xhr.responseType = 'arraybuffer';
1378
-		                                       xhr.open('GET', tiffile);
1379
-		                                       xhr.onload = function (event) {
1380
-		                                           var tiff = new Tiff({buffer: xhr.response});
1381
-		                                           var tifcanvas = tiff.toCanvas();
1382
-		                                           $("#smstables").empty();
1383
-		                                           $("#smstables").append(tifcanvas);
1384
-		                                       };
1385
-		                                       xhr.send();
1386
-
1387
-		                                } else if (extension == 'pdf') {
1388
-
1389
-		                                       var viewer = OC.generateUrl('/apps/files_pdfviewer/?file={file}', {file: flUrl});
1390
-		                                       var $iframe = $('<iframe id="docviewer" style="width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:1041;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals"></iframe>');
1391
-		                                       $("#smstables").empty();
1392
-		                                       $("#smstables").append($iframe);
1393
-
1394
-		                                } else if (extension == 'txt') {
1395
-
1396
-							     $.get(flUrl, function(textdata) {
1397
-		                                               readtxtfile[mmsfilename] = textdata.replace(/(?:\r\n|\r|\n)/g, '<br>');
1398
-		                                               $("#smstables").empty();
1399
-							       $("#smstables").append(readtxtfile[mmsfilename]);
1400
-							     });
1401
-
1402
-		                                } else if (extension == 'mp4') {
1403
-						       $("#smstables").empty();
1404
-						       $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmp4" src="'+ baseUrl +'"></video>');
1405
-						} else if (extension == 'ogg') {
1406
-						       $("#smstables").empty();
1407
-						       $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedogg" src="'+ baseUrl +'"></video>');
1408
-						} else if (extension == 'avi') {
1409
-						       $("#smstables").empty();
1410
-						       $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedavi" src="'+ baseUrl +'" type="video/avi"></video>');
1411
-						} else if (extension == 'mpg' || extension == 'mpeg') {
1412
-						       $("#smstables").empty();
1413
-						       $("#smstables").append('<video width="100%" height="auto" controls><source id="uploadedmpg" src="'+ baseUrl +'"></video>');
1414
-						} else if (extension == 'wav' || extension == 'wave') {
1415
-						       $("#smstables").empty();
1416
-						       $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedwav" src="'+ baseUrl +'"></audio>');
1417
-						} else if (extension == 'mp3') {
1418
-						       $("#smstables").empty();
1419
-						       $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmp3" src="'+ baseUrl +'" type="audio/mp3"></audio>');
1420
-						} else if (extension == 'midi') {
1421
-						       $("#smstables").empty();
1422
-						       $("#smstables").append('<audio width="100%" height="auto" controls><source id="uploadedmidi" src="'+ baseUrl +'" type="audio/midi"></audio>');
1423
-						}
1424
-
1425
-
1426
-		                                $("#smstables").show();
1427
-
1428
-		                                $('#pf_choose_msg').hide();
1429
-		                                $('#smstables').removeClass('icon-loading');
1430
-		                                $("#mmsfoldersview").hide();
1431
-
1432
-                                          },
1433
-
1434
-                                          error: function(data){
1435
-//                                             alert('Error!');
1436
-                                                showAlert("Error while getting the file.");
1437
-                                          }
1438
-
1439
-                                       });
1440
-
1441
-                                    } else {
1442
-//                                        alert("Error ! You cannot send more than "+ maximumfilenumber +" files in one MMS message !");
1443
-                                        showAlert("Error ! You cannot send more than "+ maximumfilenumber +" files in one MMS message !");
1444
-                                        $('#pf_choose_msg').hide();
1445
-                                        $('#smstables').removeClass('icon-loading');
1446
-                                      }
1447
-                                 } else {
1448
-//                                      alert("Error ! There is already a file named '"+ mmsfilename +"' in the 'SMS_Relentless/temp_files' folder !");
1449
-                                      showAlert("Error ! There is already a file named '"+ mmsfilename +"' in the 'SMS_Relentless/temp_files' folder !");
1450
-                                      $('#pf_choose_msg').hide();
1451
-                                      $('#smstables').removeClass('icon-loading');
1452
-                                   }
1453
-
1454
-                              } else {
1455
-//                                   alert('The file type is not supported ! Supported extensions for '+ chosenProvFullName +' are: '+ validExtensions.join(", ") +'.');
1456
-                                   showAlert("The file type is not supported! Supported extensions for "+ chosenProvFullName +" are: "+ validExtensions.join(", ") +".");
1457
-                                   $('#pf_choose_msg').hide();
1458
-                                   $('#smstables').removeClass('icon-loading');
1459
-                                }
1460
-
1461
-                        }
1462
-                );
1463
-  });
1464
-
1465
-
1466
-
1467
-  // Send the SMS/MMS message
1468
-  $("#submitsms").on("click", function(event) {
1469
-
1470
-     if (isMMS == 0) { var sendingtype = 'SMS'; } else { var sendingtype = 'MMS'; }
1471
-     OC.msg.startAction("#sms_submit_msg", t("sms_relentless", "Sending "+ sendingtype +" ... Please wait !"));
1472
-     $("#sms_submit_msg").css("display", "inline-block");
1473
-     $('#smstables,#recSmsTable,#sentSmsTable').addClass('icon-loading');
1474
-
1475
-     if (selectedid != '') { 
1476
-
1477
-         var sendersplit = selectedid.split(":");
1478
-         var providercap = sendersplit[0];
1479
-         var provsec = sendersplit[1];
1480
-
1481
-         if (/[a-zA-Z]/.test(provsec)) {
1482
-             var alphanumcheck = true;
1483
-         } else { var alphanumcheck = false; }
1484
-
1485
-         if (providercap == 'Tx' && alphanumcheck == false) {  
1486
-             var senderproc = selectedid.replace(/[^0-9]/g, "");
1487
-             var selectedsender = "+" + senderproc;
1488
-             var providerUsed = "telnyx";
1489
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
1490
-         } else if (providercap == 'Pl' && alphanumcheck == false) {
1491
-             var selectedsender = selectedid.replace(/[^0-9]/g, "");
1492
-             var providerUsed = "plivo";
1493
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
1494
-         } else if (providercap == 'Tw' && alphanumcheck == false) {  
1495
-             var senderproc = selectedid.replace(/[^0-9]/g, "");
1496
-             var selectedsender = "+" + senderproc;
1497
-             var providerUsed = "twilio";
1498
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
1499
-         } else if (providercap == 'Fl' && alphanumcheck == false) {  
1500
-             var senderproc = selectedid.replace(/[^0-9]/g, "");
1501
-             var selectedsender = "+" + senderproc;
1502
-             var providerUsed = "flowroute";
1503
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
1504
-         } else if (providercap == 'Tx' && alphanumcheck == true) {
1505
-             var selectedsender = provsec;
1506
-             var providerUsed = "telnyx";
1507
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
1508
-         } else if (providercap == 'Pl' && alphanumcheck == true) {
1509
-             var selectedsender = provsec;
1510
-             var providerUsed = "plivo";
1511
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
1512
-         } else if (providercap == 'Tw' && alphanumcheck == true) {
1513
-             var selectedsender = provsec;
1514
-             var providerUsed = "twilio";
1515
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
1516
-         } else if (providercap == 'Fl' && alphanumcheck == true) {
1517
-             var selectedsender = provsec;
1518
-             var providerUsed = "flowroute";
1519
-             var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
1520
-         }
1521
-
1522
-         // Get the interval between message consecutive sending requests, if it's the case
1523
-         if ($('#tomultchckbx').is(':checked')) {
1524
-
1525
-             var numbersfile = 1;
1526
-             var initinterval = $("#multsmsinterval").val();
1527
-             var secinterval = initinterval.replace(/[^0-9]/g, "");
1528
-
1529
-             if (secinterval != '') {
1530
-                 var tertinterval = parseInt(secinterval);
1531
-                     waittime = tertinterval;
1532
-             }
1533
-
1534
-         } else {
1535
-
1536
-             var numbersfile = 0;
1537
-             var toNumberinit = $('#smsto').val();
1538
-             var toNumber = toNumberinit.replace(/[^0-9,]/g, "");
1539
-             var toNumbersec = toNumber.split(",");
1540
-
1541
-                 for (var i = 0; i < toNumbersec.length; i++) {
1542
-                      toNumbersec[i] = "+" + toNumbersec[i];
1543
-                 }
1544
-
1545
-                 receiversNumbers = toNumbersec.filter(function(v){return v!==""});
1546
-         }
1547
-
1548
-         if (numbersfile == 0 && $('#smsto').val().trim() == '') { receiversNumbers.length = 0; }
1549
-
1550
-         var smstext = $("#smstext").val();
1551
-
1552
-         if (receiversNumbers.length != 0) {
1553
-
1554
-              if (smstext != '') {
1555
-                  $.ajax({
1556
-                     url: relbaseUrl + '/' + userid,
1557
-                     type: "POST",
1558
-                     data: {
1559
-                           receiversPhoneNbs: receiversNumbers,
1560
-                           fromsender: selectedsender,
1561
-                           waitinterval: waittime,
1562
-                           sentsmstext: smstext,
1563
-                           ismms: isMMS,
1564
-                           mmsfiles: uploadedtomms
1565
-                         },
1566
-                     success: function() {
1567
-
1568
-                           if (receiversNumbers.length == 1) {
1569
-//                               alert("The message has been sent ! You can press the 'Sent SMS Messages' button to check the current status and the delivery receipt for this message. If they don't appear immediately, wait about 10 seconds and press the button again.");
1570
-                               showAlert("The message has been sent ! You can press the 'Sent SMS Messages' button to check the current status and the delivery receipt for this message. If they don't appear immediately, wait about 10 seconds and press the button again.");
1571
-                           } else {
1572
-//                               alert("The messages have been sent ! You can press the 'Sent SMS Messages' button to check the current status and the delivery receipt for each message. If they don't appear immediately, wait about 10 seconds and press the button again.");
1573
-                               showAlert("The messages have been sent ! You can press the 'Sent SMS Messages' button to check the current status and the delivery receipt for each message. If they don't appear immediately, wait about 10 seconds and press the button again.");
1574
-                           }
1575
-
1576
-                           $('#sms_submit_msg').hide();
1577
-                           $('#smstables,#recSmsTable,#sentSmsTable').removeClass('icon-loading');
1578
-                     },
1579
-                     error: function() {
1580
-//                           alert("An error occurred! Please check the recipient's phone number and your settings !");
1581
-                           showAlert("Error! Please check the recipient's phone number and your settings!");
1582
-                           $('#sms_submit_msg').hide();
1583
-                           $('#smstables,#recSmsTable,#sentSmsTable').removeClass('icon-loading');
1584
-                     }
1585
-                  });
1586
-              } else {
1587
-//                     alert("Please enter a message in the text box !");
1588
-                     showAlert("Please enter a message in the text box !");
1589
-
1590
-                     $('#sms_submit_msg').hide();
1591
-                     $('#smstables,#recSmsTable,#sentSmsTable').removeClass('icon-loading');
1592
-              }
1593
-         } else if (receiversNumbers.length == 0 && !($('#tomultchckbx').is(':checked'))) {
1594
-//                 alert("Please enter the recipient's phone number !");
1595
-                 showAlert("Please enter the recipient's phone number !");
1596
-                 $('#sms_submit_msg').hide();
1597
-                 $('#smstables,#recSmsTable,#sentSmsTable').removeClass('icon-loading');
1598
-         } else if (receiversNumbers.length == 0 && $('#tomultchckbx').is(':checked')) {
1599
-//                 alert("Please upload a txt or csv file that contains phone numbers separated by commas, semicolons, vertical bars or new lines !");
1600
-                 showAlert("Please upload a txt or csv file that contains phone numbers separated by commas, semicolons, vertical bars or new lines !");
1601
-                 $('#sms_submit_msg').hide();
1602
-                 $('#smstables,#recSmsTable,#sentSmsTable').removeClass('icon-loading');
1603
-         }
1604
-     } else {
1605
-//           alert("Please choose a Sender ID from the Set ID drop-down list !");
1606
-           showAlert("Please choose a Sender ID from the Set ID drop-down list !");
1607
-           $('#smstables,#recSmsTable,#sentSmsTable').removeClass('icon-loading');
1608
-           $('#sms_submit_msg').hide();
1609
-     }
1610
-
1611
-  });
1612
-
1613
-  // Check the checkbox to delete old messages from the database
1614
-  $('#deleteoldchckbox').change(function() {
1615
-     if ($(this).is(':checked')) {
1616
-         $("#deleteoldsms").css("display", "block");
1617
-     } else {
1618
-         $("#deleteoldsms").css("display", "none");
1619
-     }
1620
-  });
1621
-
1622
-  // Set the height of 3 info notes
1623
-  $('#setcalleridtp').css('height', $(window).height() - 160);
1624
-  $('#tonmbrformat').css('height', $(window).height() - 260);
1625
-  $('#uploadfileinfo').css('height', $(window).height() - 390);
1626
-
1627
-  $(window).resize(function() { 
1628
-     $('#setcalleridtp').css('height', $(window).height() - 160);
1629
-     $('#tonmbrformat').css('height', $(window).height() - 260);
1630
-     $('#uploadfileinfo').css('height', $(window).height() - 390);
1631
-  });
1632
-
1633
-
1634
-  function showAlert(alertText) {
1635
-
1636
-     let alertwnd = "<div id='alertMessage'>";
1637
-     alertwnd += "<a id='closeAlertWnd' title='Close this window'></a>";
1638
-     alertwnd += "<div id='alertTextWrap'>"+ alertText +"</div>";
1639
-     alertwnd += "<input type='submit' id='alertOk' value='OK'>";
1640
-     alertwnd += "</div>";
1641
-
1642
-     $("#content").append("<div id='alertMsgOverlay'></div>");
1643
-     $("#content").append(alertwnd);
1644
-
1645
-     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
1646
-     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
1647
-     $("#alertMessage").css({ "top" : topDist, "left" : leftDist });
1648
-
1649
-     $("#closeAlertWnd").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
1650
-     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
1651
-     $("#alertOk").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
1652
-  }
1653 0
deleted file mode 100644
... ...
@@ -1,823 +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 isadm = '';
27
-
28
-  // Get personal settings
29
-  var baseUrlget = OC.generateUrl('/apps/sms_relentless/user/getsettings');
30
-
31
-  $.ajax({
32
-     method: 'GET',
33
-     url: baseUrlget + '/' + userid,
34
-     contentType: 'application/json',
35
-     success: function(settingsfromdb) {
36
-
37
-         // Add the webhook URLs section, if the user is not an admin
38
-         if (settingsfromdb.adminornot == 'reguser') {
39
-
40
-             isadm = 'reguser';
41
-
42
-             $("#appTitlePrg").append('<p id="settings-dscr"><h3>Enter your options in the fields from below. As a non-admin user, you can use any of the SMS service providers from \
43
-                  below, on the condition that an admin has shared with you his API keys for that provider:</h3></p><br>');
44
-
45
-             $("#nadmProvSection").append('<div class="providerSettings"><p><label for="telapi_url_rec" class="setlabeltext"><b>Telnyx webhook URL for incoming SMS/MMS</b> (Generate \
46
-                  the URL by pressing the button from below. Don\'t forget to also click the \'Save\' button at the bottom of this page after entering all the options, to save \
47
-                  all the settings to the database.)</label></p> \
48
-                  <input type="button" id="generate_tel_rcpt" class="generateUrl" value="Generate new webhook URL for incoming SMS/MMS" /> \
49
-                  <input type="text" class="smsr_textboxspec" id="telapi_url_rec" name="telapi_url_rec" autocomplete="false" /> \
50
-                  <span id="copyToClipboardtel" class="icon icon-clippy" title="Copy to clipboard"></span><br><br> \
51
-                  \
52
-                  <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 \
53
-                  requests, so that Telnyx will know where to send the delivery receipts. Just generate it by pressing the button from below. Don\'t forget to click the \'Save\' \
54
-                  button at the bottom of this page after entering all the options, to save all the settings to the database.)</label></p> \
55
-                  <input type="button" id="generate_tel_delrcpt" class="generateUrl" value="Generate new webhook URL for delivery receipts" /> \
56
-                  <input type="text" id="telapi_url" name="telapi_url" autocomplete="false" /></div><br><br> \
57
-                  \
58
-                  <div class="providerSettings"><p><label for="nexapi_url_rec" class="setlabeltext"><b>Plivo webhook URL for incoming SMS/MMS</b> (Generate the URL by pressing \
59
-                  the button from below. Don\'t forget to also click the \'Save\' button at the bottom of this page after entering all the options, to save all the settings \
60
-                  to the database.)</label></p> \
61
-                  <input type="button" id="generate_nex_rcpt" class="generateUrl" value="Generate new webhook URL for incoming SMS/MMS" /> \
62
-                  <input type="text" class="smsr_textboxspec" id="nexapi_url_rec" name="nexapi_url_rec" autocomplete="false" /> \
63
-                  <span id="copyToClipboardnex" class="icon icon-clippy" title="Copy to clipboard"></span><br><br> \
64
-                  \
65
-                  <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 \
66
-                  requests, so that Plivo will know where to send the delivery receipts. Just generate it by pressing the button from below. Don\'t forget to click the \'Save\' \
67
-                  button at the bottom of this page after entering all the options, to save all the settings to the database.)</label></p> \
68
-                  <input type="button" id="generate_nex_delrcpt" class="generateUrl" value="Generate new webhook URL for delivery receipts" /> \
69
-                  <input type="text" id="nexapi_url" name="nexapi_url" autocomplete="false" /></div><br><br> \
70
-                  \
71
-                  <div class="providerSettings"><p><label for="twilapi_url_rec" class="setlabeltext"><b>Twilio webhook URL for incoming SMS/MMS</b> (Generate the URL by pressing \
72
-                  the button from below. Don\'t forget to also click the \'Save\' button at the bottom of this page after entering all the options, to save all the settings to \
73
-                  the database.)</label></p> \
74
-                  <input type="button" id="generate_twil_rcpt" class="generateUrl" value="Generate new webhook URL for incoming SMS/MMS" /> \
75
-                  <input type="text" class="smsr_textboxspec" id="twilapi_url_rec" name="twilapi_url_rec" autocomplete="false" /> \
76
-                  <span id="copyToClipboardtwil" class="icon icon-clippy" title="Copy to clipboard"></span><br><br> \
77
-                  \
78
-                  <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 \
79
-                  requests, so that Twilio will know where to send the delivery receipts. Just generate it by pressing the button from below. Don\'t forget to click the \'Save\' \
80
-                  button at the bottom of this page after entering all the options, to save all the settings to the database.)</label></p> \
81
-                  <input type="button" id="generate_twil_delrcpt" class="generateUrl" value="Generate new webhook URL for delivery receipts" /> \
82
-                  <input type="text" id="twilapi_url" name="twilapi_url" autocomplete="false" /></div><br><br> \
83
-                  \
84
-                  <div class="providerSettings"><p><label for="flowapi_url_rec" class="setlabeltext"><b>Flowroute webhook URL for incoming SMS/MMS</b> (Generate the URL by pressing \
85
-                  the button from below. Don\'t forget to also click the \'Save\' button at the bottom of this page after entering all the options, to save all the settings to \
86
-                  the database.)</label></p> \
87
-                  <input type="button" id="generate_flow_rcpt" class="generateUrl" value="Generate new webhook URL for incoming SMS/MMS" /> \
88
-                  <input type="text" class="smsr_textboxspec" id="flowapi_url_rec" name="flowapi_url_rec" autocomplete="false" /> \
89
-                  <span id="copyToClipboardflow" class="icon icon-clippy" title="Copy to clipboard"></span><br><br> \
90
-                  \
91
-                  <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 \
92
-                  requests, so that Flowroute will know where to send the delivery receipts. Just generate it by pressing the button from below. Don\'t forget to click the \'Save\' \
93
-                  button at the bottom of this page after entering all the options, to save all the settings to the database.)</label></p> \
94
-                  <input type="button" id="generate_flow_delrcpt" class="generateUrl" value="Generate new webhook URL for delivery receipts" /> \
95
-                  <input type="text" id="flowapi_url" name="flowapi_url" autocomplete="false" /><br><br> \
96
-                  Flowroute only supports sending/receiving SMS/MMS messages within USA and Canada and it doesn\'t support Alphanumeric Sender IDs.</div><br>');
97
-
98
-
99
-		  $("#telapi_url_rec").val(settingsfromdb.telapi_url_rec);
100
-		  $("#telapi_url").val(settingsfromdb.telapi_url);
101
-		  $("#nexapi_url_rec").val(settingsfromdb.nexapi_url_rec);
102
-		  $("#nexapi_url").val(settingsfromdb.nexapi_url);
103
-		  $("#twilapi_url_rec").val(settingsfromdb.twilapi_url_rec);
104
-		  $("#twilapi_url").val(settingsfromdb.twilapi_url);
105
-		  $("#flowapi_url_rec").val(settingsfromdb.flowapi_url_rec);
106
-		  $("#flowapi_url").val(settingsfromdb.flowapi_url);
107
-		  $("#messagesperpage").val(settingsfromdb.messagesperpage);
108
-
109
-		  if (settingsfromdb.get_notify == 1) {
110
-		      $("#get_notify").attr('checked', true);
111
-		  } else {
112
-		      $("#get_notify").attr('checked', false);
113
-		  }
114
-
115
-		  $("#notification_email").val(settingsfromdb.notification_email);
116
-
117
-		  if (settingsfromdb.getsmsinemail == 1) {
118
-		      $("#includesmsinemail").attr('checked', true);
119
-		  } else {
120
-		      $("#includesmsinemail").attr('checked', false);
121
-		  }
122
-
123
-		  if (settingsfromdb.show_display_names == 1) {
124
-		      $("#showdisplaynames").attr('checked', true);
125
-		  } else {
126
-		      $("#showdisplaynames").attr('checked', false);
127
-		  }
128
-/*
129
-		  var telnyxwhurlrec = '';
130
-		  var telnyxwhurl = '';
131
-		  var plivowhurlrec = '';
132
-		  var plivodrwhurl = '';
133
-		  var twilwhurlrec = '';
134
-		  var twildrwhurl = '';
135
-		  var flowwhurlrec = '';
136
-		  var flowdrwhurl = '';
137
-*/
138
-		  function randomStr(strlength) {
139
-			var fintext = "";
140
-			var keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
141
-			for (var i = 0; i < strlength; i++) {
142
-			     fintext += keyspace.charAt(Math.floor(Math.random() * keyspace.length));
143
-			}
144
-			return fintext;
145
-		  }
146
-
147
-		  $("#generate_tel_rcpt").on("click", function(event) {
148
-
149
-		     var teltokenrec = randomStr(70);
150
-		     var telnyxwhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmstel?telrecparam=') + teltokenrec;
151
-
152
-		     $("#telapi_url_rec").val(telnyxwhurlrec);
153
-		  });
154
-
155
-		  $("#copyToClipboardtel").on("click", function(event) {
156
-		     var $tempEl = $("<input>");
157
-		     $("body").append($tempEl);
158
-		     $tempEl.val($("#telapi_url_rec").val()).select();
159
-		     document.execCommand("Copy");
160
-		     $tempEl.remove();
161
-		     showAlert("The link has been copied to your clipboard!");
162
-		  });
163
-
164
-		  $("#generate_tel_delrcpt").on("click", function(event) {
165
-
166
-		     var teltoken = randomStr(70);
167
-		     var telnyxwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliverytel?teldrparam=') + teltoken;
168
-
169
-		     $("#telapi_url").val(telnyxwhurl);
170
-		  });
171
-
172
-
173
-		  $("#generate_nex_rcpt").on("click", function(event) {
174
-
175
-		     var plivotokenrec = randomStr(70);
176
-		     var plivowhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmsnex?plivorecparam=') + plivotokenrec;
177
-
178
-		     $("#nexapi_url_rec").val(plivowhurlrec);
179
-		  });
180
-
181
-		  $("#copyToClipboardnex").on("click", function(event) {
182
-		     var $tempElpl = $("<input>");
183
-		     $("body").append($tempElpl);
184
-		     $tempElpl.val($("#nexapi_url_rec").val()).select();
185
-		     document.execCommand("Copy");
186
-		     $tempElpl.remove();
187
-		     showAlert("The link has been copied to your clipboard!");
188
-		  });
189
-
190
-		  $("#generate_nex_delrcpt").on("click", function(event) {
191
-
192
-		     var plivotoken = randomStr(70);
193
-		     var plivodrwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliverynex?plivodrparam=') + plivotoken;
194
-
195
-		     $("#nexapi_url").val(plivodrwhurl);
196
-		  });
197
-
198
-
199
-		  $("#generate_twil_rcpt").on("click", function(event) {
200
-
201
-		     var twiltokenrec = randomStr(35);
202
-		     var twilwhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmstwil?twilrecparam=') + twiltokenrec;
203
-
204
-		     $("#twilapi_url_rec").val(twilwhurlrec);
205
-		  });
206
-
207
-		  $("#copyToClipboardtwil").on("click", function(event) {
208
-		     var $tempElpl = $("<input>");
209
-		     $("body").append($tempElpl);
210
-		     $tempElpl.val($("#twilapi_url_rec").val()).select();
211
-		     document.execCommand("Copy");
212
-		     $tempElpl.remove();
213
-		     showAlert("The link has been copied to your clipboard!");
214
-		  });
215
-
216
-		  $("#generate_twil_delrcpt").on("click", function(event) {
217
-
218
-		     var twiltoken = randomStr(35);
219
-		     var twildrwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliverytwil?twildrparam=') + twiltoken;
220
-
221
-		     $("#twilapi_url").val(twildrwhurl);
222
-		  });
223
-
224
-
225
-		  $("#generate_flow_rcpt").on("click", function(event) {
226
-
227
-		     var flowtokenrec = randomStr(70);
228
-		     var flowwhurlrec = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recsmsflow?flowrecparam=') + flowtokenrec;
229
-
230
-		     $("#flowapi_url_rec").val(flowwhurlrec);
231
-		  });
232
-
233
-		  $("#copyToClipboardflow").on("click", function(event) {
234
-		     var $tempElpl = $("<input>");
235
-		     $("body").append($tempElpl);
236
-		     $tempElpl.val($("#flowapi_url_rec").val()).select();
237
-		     document.execCommand("Copy");
238
-		     $tempElpl.remove();
239
-		     showAlert("The link has been copied to your clipboard!");
240
-		  });
241
-
242
-		  $("#generate_flow_delrcpt").on("click", function(event) {
243
-
244
-		     var flowtoken = randomStr(70);
245
-		     var flowdrwhurl = window.location.origin + OC.generateUrl('/apps/sms_relentless/api/recdeliveryflow?flowdrparam=') + flowtoken;
246
-
247
-		     $("#flowapi_url").val(flowdrwhurl);
248
-		  });
249
-
250
-
251
-         } else if (settingsfromdb.adminornot == 'admin') {
252
-
253
-                  $("#appTitlePrg").append('<p id="settings-dscr"><h3>Enter your options in the fields from below:</h3></p><br>');
254
-                  isadm = 'admin';
255
-
256
-		  $("#messagesperpage").val(settingsfromdb.messagesperpage);
257
-
258
-		  if (settingsfromdb.get_notify == 1) {
259
-		      $("#get_notify").attr('checked', true);
260
-		  } else {
261
-		      $("#get_notify").attr('checked', false);
262
-		  }
263
-
264
-		  $("#notification_email").val(settingsfromdb.notification_email);
265
-
266
-		  if (settingsfromdb.getsmsinemail == 1) {
267
-		      $("#includesmsinemail").attr('checked', true);
268
-		  } else {
269
-		      $("#includesmsinemail").attr('checked', false);
270
-		  }
271
-
272
-		  if (settingsfromdb.show_display_names == 1) {
273
-		      $("#showdisplaynames").attr('checked', true);
274
-		  } else {
275
-		      $("#showdisplaynames").attr('checked', false);
276
-		  }
277
-         }
278
-
279
-
280
-         // Auto-reply settings
281
-
282
-         // Get the available phone numbers from all providers associated with the access keys entered on the Settings page (restrictions are applied to numbers for non-admins)
283
-         $("#autoRplPhoneNb").addClass('icon-loading');
284
-         var getnumbersUrl = OC.generateUrl("/apps/sms_relentless/user/getautoreplyconf");
285
-
286
-	 $.ajax({
287
-		  url: getnumbersUrl + '/' + userid,
288
-		  type: "GET",
289
-                  contentType: 'application/json',
290
-		  success: function(autoreplydata) {
291
-
292
-                                    $("#autoRplPhoneNb").removeClass('icon-loading');
293
-                                    var cusrDisplayName = autoreplydata.userdisplayname;
294
-                                    var availPhoneNmbrs = autoreplydata.phonenumbers;
295
-                                    var autorpldata = autoreplydata.autoreplies;
296
-
297
-				    if (autorpldata.length > 0) { 
298
-				        var arplNmb = autorpldata.length;
299
-				    } else { 
300
-				        var arplNmb = 0; 
301
-				    }
302
-
303
-				    // List the auto-replies for the phone numbers available for the current user
304
-				    if (arplNmb == 0) {
305
-
306
-				        $("#autoReplyTbl").append("<tr><td><input type='text' class='arplAuthor' value='"+ cusrDisplayName +"' disabled></td><td><select id='arpphn-"+ arplNmb +"' class='arplPhoneNmbr'></select></td><td><div id='arplmode-"+ arplNmb +"' class='arplMode'><select id='modeselect-"+ arplNmb +"' class='selectArplMode'><option value='' selected>Select mode</option><option value='daily'>Daily mode</option><option value='vacation'>Vacation mode</option></select><div id='modecont-"+ arplNmb +"' class='modeContent'></div></div></td><td><textarea id='arpltxt-"+ arplNmb +"' class='arplText' rows='20' cols='40' placeholder='Enter the auto-reply message here.'></textarea></td><td><img id='rmRow-"+ arplNmb +"' class='removeRow' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this row from the database' style='cursor:pointer;margin:9px 8px 0px 18px;'></td><td><input type='submit' id='arplsave-"+ arplNmb +"' class='saveAutoReply' value='Save' title='Save Row' /></td></tr>");
307
-				        $("#autoReplyTbl").append("<div><img id='addArplRow' src='/apps/sms_relentless/img/add.svg' title='Add Row'></div>");
308
-
309
-				    } else {
310
-
311
-				        for (k = 0; k < arplNmb; k++) {
312
-
313
-                                             if (autorpldata[k].days_of_week != '') {
314
-
315
-                                                 var slctdMode = "<option value=''>Select mode</option><option value='daily' selected>Daily mode</option><option value='vacation'>Vacation mode</option>";
316
-                                                 var dailyStartArr = autorpldata[k].daily_start.split(":");
317
-                                                 var dailyEndArr = autorpldata[k].daily_end.split(":");
318
-
319
-		                                 var dlHrStartOptions = "";
320
-			                         for (var hr = 0; hr < 24; hr++) {
321
-		                                      if (dailyStartArr[0] != hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false})) {
322
-			                                  dlHrStartOptions += "<option value='"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"'>"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
323
-		                                      } else {
324
-			                                  dlHrStartOptions += "<option value='"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"' selected>"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
325
-		                                      }
326
-			                         }
327
-
328
-		                                 var dlMnStartOptions = "";
329
-			                         for (var mn = 0; mn < 60; mn++) {
330
-		                                      if (dailyStartArr[0] != mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false})) {
331
-			                                  dlMnStartOptions += "<option value='"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"'>"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
332
-		                                      } else {
333
-			                                  dlMnStartOptions += "<option value='"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"' selected>"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
334
-		                                      }
335
-			                         }
336
-
337
-		                                 var dlHrEndOptions = "";
338
-			                         for (var hr = 0; hr < 24; hr++) {
339
-		                                      if (dailyEndArr[0] != hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false})) {
340
-			                                  dlHrEndOptions += "<option value='"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"'>"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
341
-		                                      } else {
342
-			                                  dlHrEndOptions += "<option value='"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"' selected>"+ hr.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
343
-		                                      }
344
-			                         }
345
-
346
-		                                 var dlMnEndOptions = "";
347
-			                         for (var mn = 0; mn < 60; mn++) {
348
-		                                      if (dailyEndArr[1] != mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false})) {
349
-			                                  dlMnEndOptions += "<option value='"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"'>"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
350
-		                                      } else {
351
-			                                  dlMnEndOptions += "<option value='"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"' selected>"+ mn.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
352
-		                                      }
353
-			                         }
354
-
355
-                                                 var modeContent = "<div class='daysOfWeek'>Days of the week:<div class='tooltipautoreply'><div id='infoautoreply'>i</div><div class='autorpltooltip'>Enter the order number of the days of the week in which the auto-reply will be sent. For example, to send the auto-reply every day from Monday to Friday (outside the time interval specified below), enter 1,2,3,4,5 To send the auto-reply only Monday, Thursday and Friday enter 1,4,5 To send the auto-reply every day of the week enter 1,2,3,4,5,6,7</div></div></div><input type='text' id='weekdays-"+ k +"' class='daysInWeek' value='"+ autorpldata[k].days_of_week +"'><div class='chooseTInterval'>Send auto-reply <span style='color:#ad0202'>outside</span> this interval:<div class='tooltipautoreplyst'><div id='infoautoreplyst'>i</div><div class='autorpltooltipst'>These fields specify the time of the server. If the server is located in a time zone that is different from that of the owner/company, the time interval entered here should be adjusted accordingly.</div></div></div><div class='selectArplHours'><select id='dmstarthr-"+ k +"' class='selectHrMin'>"+ dlHrStartOptions +"</select><select id='dmstartmn-"+ k +"' class='selectHrMin'>"+ dlMnStartOptions +"</select><span style='font-weight: 600'> — </span><select id='dmendhr-"+ k +"' class='selectHrMin'>"+ dlHrEndOptions +"</select><select id='dmendmn-"+ k +"' class='selectHrMin'>"+ dlMnEndOptions +"</select></div>";
356
-
357
-                                             } else {
358
-
359
-                                                 var vctnStart = autorpldata[k].vacation_start.split(" ")[0];
360
-                                                 var vctnEnd = autorpldata[k].vacation_end.split(" ")[0];
361
-
362
-                                                 var slctdMode = "<option value=''>Select mode</option><option value='daily'>Daily mode</option><option value='vacation' selected>Vacation mode</option>";
363
-                                                 var modeContent = "<div class='chooseDateIntvl'>Send auto-reply <span style='color:#ad0202'>inside</span> this interval:</div><div class='arplstrtendDates'><div class='stdtTitle'>Start Date</div><input type='text' id='startDT-"+ k +"' class='startDate' placeholder='Pick a date' value='"+ vctnStart +"'><div class='enddtTitle'>End Date</div><input type='text' id='endDT-"+ k +"' class='endDate' placeholder='Pick a date' value='"+ vctnEnd +"'></div>"
364
-                                             }
365
-
366
-				             $("#autoReplyTbl").append("<tr><td><input type='text' class='arplAuthor' value='"+ autorpldata[k].saved_by_dsplname +"' disabled></td><td><select id='arpphn-"+ k +"' class='arplPhoneNmbr' style='pointer-events:none'><option selected>"+ autorpldata[k].phone_number +"</option></select></td><td><div id='arplmode-"+ k +"' class='arplMode'><select id='modeselect-"+ k +"' class='selectArplMode'>"+ slctdMode +"</select><div id='modecont-"+ k +"' class='modeContent'>"+ modeContent +"</div></div></td><td><textarea id='arpltxt-"+ k +"' class='arplText' rows='20' cols='40' placeholder='Enter the auto-reply message here.'>"+ autorpldata[k].message_text +"</textarea></td><td><img id='rmRow-"+ k +"' class='removeRow' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this row from the database' style='cursor:pointer;margin:9px 8px 0px 18px;'></td><td><input type='submit' id='arplsave-"+ k +"' class='saveAutoReply' value='Edit' title='Edit Row' /></td></tr>");
367
-				        }
368
-				        $("#autoReplyTbl").append("<div><img id='addArplRow' src='/apps/sms_relentless/img/add.svg' title='Add Row'></div>");
369
-				    }
370
-
371
-
372
-				    // Create a list with all the available phone numbers
373
-                                    var numbersListItems = "<option value='' selected>Select phone number</option>";
374
-
375
-				    $.each(availPhoneNmbrs, function(key, indsmsnmb) {
376
-				           numbersListItems += "<option value='"+ indsmsnmb +"'>"+ indsmsnmb +"</option>";
377
-				    });
378
-
379
-                                    if (arplNmb == 0) {
380
-				        $("#arpphn-"+ arplNmb).append(numbersListItems);
381
-                                    }
382
-
383
-                                    // Initialize the date picker
384
-			            $('[id^="endDT-"]').datepicker({ dateFormat: "yy-mm-dd" });
385
-			            $('[id^="startDT-"]').datepicker({ dateFormat: "yy-mm-dd" });
386
-
387
-
388
-                                    // Select the auto-reply mode
389
-                                    function selectMode() {
390
-
391
-		                            $('[id^="modeselect-"]').change(function() {
392
-
393
-		                               var crtnmbr = $(this).attr("id").replace("modeselect-", "");
394
-
395
-		                               var dailyHrStart = "";
396
-		                               for (var h = 0; h < 24; h++) {
397
-		                                    dailyHrStart += "<option value='"+ h.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"'>"+ h.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
398
-		                               }
399
-
400
-		                               var dailyMnStart = "";
401
-		                               for (var m = 0; m < 60; m++) {
402
-		                                    dailyMnStart += "<option value='"+ m.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"'>"+ m.toLocaleString('en-US', {minimumIntegerDigits: 2, useGrouping:false}) +"</option>";
403
-		                               }
404
-
405
-		                               var dailyHrEnd = dailyHrStart;
406
-		                               var dailyMnEnd = dailyMnStart;
407
-
408
-		                               if ($(this).val() == 'daily') {
409
-		                                   $("#modecont-"+ crtnmbr).empty();
410
-		                                   $("#modecont-"+ crtnmbr).append("<div class='daysOfWeek'>Days of the week:<div class='tooltipautoreply'><div id='infoautoreply'>i</div><div class='autorpltooltip'>Enter the order number of the days of the week. For example, to send the auto-reply every day from Monday to Friday outside the specified time interval, enter 1,2,3,4,5 To send the auto-reply only Monday, Thursday and Friday enter 1,4,5 To send the auto-reply every day of the week enter 1,2,3,4,5,6,7</div></div></div><input type='text' id='weekdays-"+ crtnmbr +"' class='daysInWeek'><div class='chooseTInterval'>Send auto-reply <span style='color:#ad0202'>outside</span> this interval:<div class='tooltipautoreplyst'><div id='infoautoreplyst'>i</div><div class='autorpltooltipst'>These fields specify the time of the server. If the server is located in a time zone that is different from that of the owner/company, the time interval entered here should be adjusted accordingly.</div></div></div><div class='selectArplHours'><select id='dmstarthr-"+ crtnmbr +"' class='selectHrMin'>"+ dailyHrStart +"</select><select id='dmstartmn-"+ crtnmbr +"' class='selectHrMin'>"+ dailyMnStart +"</select><span style='font-weight: 600'> — </span><select id='dmendhr-"+ crtnmbr +"' class='selectHrMin'>"+ dailyHrEnd +"</select><select id='dmendmn-"+ crtnmbr +"' class='selectHrMin'>"+ dailyMnEnd +"</select></div>");
411
-		                               } else if ($(this).val() == 'vacation') {
412
-		                                   $("#modecont-"+ crtnmbr).empty();
413
-		                                   $("#modecont-"+ crtnmbr).append("<div class='chooseDateIntvl'>Send auto-reply <span style='color:#ad0202'>inside</span> this interval:</div><div class='arplstrtendDates'><div class='stdtTitle'>Start Date</div><input type='text' id='startDT-"+ crtnmbr +"' class='startDate' placeholder='Pick a date'><div class='enddtTitle'>End Date</div><input type='text' id='endDT-"+ crtnmbr +"' class='endDate' placeholder='Pick a date' /></div>");
414
-		                               }
415
-
416
-					       $("#endDT-"+ crtnmbr +"").datepicker({ dateFormat: "yy-mm-dd" });
417
-					       $("#startDT-"+ crtnmbr +"").datepicker({ dateFormat: "yy-mm-dd" });
418
-		                          });
419
-                                  }
420
-                                  selectMode();
421
-
422
-				  // Save the data
423
-				  function saveArplRow() {
424
-
425
-				     $('[id^="arplsave-"]').unbind("click");
426
-				     $('[id^="arplsave-"]').click(function(event) {
427
-
428
-				        event.preventDefault();
429
-				        var crntrwnmbr = $(this).attr("id").replace("arplsave-", "");
430
-
431
-				        if ($(this).attr("value") == "Save") {
432
-
433
-				            var phoneNmbr = $("#arpphn-"+ crntrwnmbr).val();
434
-				            var arplText = $("#arpltxt-"+ crntrwnmbr).val();
435
-				            var slctdMode = $("#modeselect-"+ crntrwnmbr).val();
436
-
437
-				            var slctddmDays = "";
438
-				            var slctdHrStart = "";
439
-				            var slctdMnStart = "";
440
-				            var slctdHrEnd = "";
441
-				            var slctdMnEnd = "";
442
-
443
-				            var vcStartDate = null;
444
-				            var vcEndDate = null;
445
-
446
-				            if (slctdMode == 'daily') {
447
-
448
-				                slctddmDays = $("#weekdays-"+ crntrwnmbr).val().trim();
449
-				                slctdHrStart = $("#dmstarthr-"+ crntrwnmbr).val().trim();
450
-				                slctdMnStart = $("#dmstartmn-"+ crntrwnmbr).val().trim();
451
-				                slctdHrEnd = $("#dmendhr-"+ crntrwnmbr).val().trim();
452
-				                slctdMnEnd = $("#dmendmn-"+ crntrwnmbr).val().trim();
453
-
454
-                                                if (slctdHrStart != '' && slctdMnStart != '') {
455
-                                                    var hrmnStartComp = slctdHrStart +":"+ slctdMnStart;
456
-                                                } else { var hrmnStartComp = ""; }
457
-
458
-                                                if (slctdHrEnd != '' && slctdMnEnd != '') {
459
-                                                    var hrmnEndComp = slctdHrEnd +":"+ slctdMnEnd;
460
-                                                } else { var hrmnEndComp = ""; }
461
-
462
-                                                if (!(/^[1-7\,]+$/.test(slctddmDays))) {
463
-				                    showAlert("The 'Days of the week' field can contain only digits from 1 to 7 and commas (,).");
464
-				                    return;
465
-                                                }
466
-
467
-                                                if (!(/^[0-9]+$/.test(slctdHrStart + slctdMnStart + slctdHrEnd + slctdMnEnd))) {
468
-				                    showAlert("The starting and ending values of the time interval for the 'Daily mode' can contain only digits from 0 to 9.");
469
-				                    return;
470
-                                                }
471
-
472
-                                                if (slctddmDays.trim() == '' || (slctdHrStart == slctdHrEnd && slctdMnStart == slctdMnEnd)) {
473
-				                    showAlert("For the 'Daily mode', you have to enter the order number of the days of the week for which you want the auto-reply to be sent, and you have to set a starting time that is different from the ending time!");
474
-				                    return;
475
-                                                }
476
-
477
-				            } else if (slctdMode == 'vacation') {
478
-		
479
-                                                if ($("#startDT-"+ crntrwnmbr).val().trim() == '' || $("#endDT-"+ crntrwnmbr).val().trim() == '') {
480
-
481
-				                    showAlert("For the 'Vacation mode', you have to enter both a start date and an end date.");
482
-				                    return;
483
-
484
-                                                } else {
485
-
486
-                                                    if (!(/^[0-9\-]+$/.test($("#startDT-"+ crntrwnmbr).val().trim() + $("#endDT-"+ crntrwnmbr).val().trim()))) {
487
-				                        showAlert("The start date and end date values for the 'Vacation mode' can contain only digits from 0 to 9 and hyphens (-).");
488
-				                        return;
489
-                                                    }
490
-
491
-		                                    vcStartDate = $("#startDT-"+ crntrwnmbr).val().trim() +" 00:00:00";
492
-				                    vcEndDate = $("#endDT-"+ crntrwnmbr).val().trim() +" 23:59:59";
493
-				                    var strtDateCmp = new Date(vcStartDate).toJSON().slice(0, 10) +" 00:00:00";
494
-				                    var endDateCmp = new Date(vcEndDate).toJSON().slice(0, 10) +" 23:59:59";
495
-				                    var crntDate = new Date().toJSON().slice(0, 10) +" 23:59:59";
496
-
497
-                                                    if (vcStartDate.trim() == "" || vcEndDate.trim() == "" || (strtDateCmp >= endDateCmp || ((strtDateCmp < crntDate) && (endDateCmp < crntDate)))) {
498
-				                        showAlert("For 'Vacation mode', you have to enter both a start date and an end date, the start date must be before the end date and at least the ending of the time interval must be in the future.");
499
-				                        return;
500
-                                                    }
501
-                                                }
502
-				            }
503
-
504
-
505
-				            if (phoneNmbr != '') {
506
-
507
-				              if (arplText.trim() != '') {
508
-
509
-				                if (slctdMode != '') {
510
-
511
-				                    var saveArplUrl = OC.generateUrl('/apps/sms_relentless/user/updateautoreplies');
512
-				                    var arpldata = {
513
-				                         userId: userid,
514
-				                         savedByDsplname: cusrDisplayName,
515
-				                         phoneNumber: phoneNmbr,
516
-				                         daysOfWeek: slctddmDays,
517
-				                         dailyStart: hrmnStartComp,
518
-				                         dailyEnd: hrmnEndComp,
519
-				                         vacationStart: vcStartDate,
520
-				                         vacationEnd: vcEndDate,
521
-				                         messageText: arplText
522
-				                    };
523
-
524
-					            $.ajax({
525
-					              method: 'PUT',
526
-					              url: saveArplUrl + '/' + userid,
527
-					              contentType: 'application/json',
528
-					              data: JSON.stringify(arpldata),
529
-				                      success: function(messagereceived) {
530
-
531
-				                                   if (messagereceived == 'success') {
532
-				                                       showAlert('The auto-reply has been successfully saved to the database!');
533
-				                                   } else if (messagereceived == 'failure') {
534
-				                                       showAlert('Error while trying to save the auto-reply!');
535
-				                                   } else if (messagereceived == 'not allowed') {
536
-                                                                       showAlert('You cannot change an auto-reply that was saved by a different user.');
537
-                                                                   }
538
-				                      },
539
-					              error: function() {
540
-						                   showAlert('Error while attempting to save the auto-reply! You can check the Nextcloud log to find more details about this issue.');
541
-					              }
542
-					            });
543
-
544
-
545
-                                                } else { showAlert("Please select the auto-reply mode."); return; }
546
-
547
-                                              } else { showAlert("Please enter the text of the auto-reply."); return; }
548
-
549
-                                            } else { showAlert("Please select a phone number if at least one number is available in the 'Phone Number' drop-down list. Otherwise, you should contact the administrator."); return; }
550
-
551
-                                            $(this).attr("value", "Edit");
552
-
553
-                                        } else {
554
-                                            $("#arplsave-"+ crntrwnmbr).attr("value", "Save");
555
-                                        }
556
-
557
-                                     });
558
-
559
-				  }
560
-                                  saveArplRow();
561
-
562
-
563
-				  // Remove a row
564
-				  function removeArplRow() {
565
-				       $('[id^="rmRow-"]').click(function() {
566
-
567
-					  var slctRowRm = $(this).attr("id").replace("rmRow-", "");
568
-					  var crntPhnNmbr = $("#arpphn-"+ slctRowRm).val();
569
-
570
-					  if (confirm("Do you really want to remove this row from the database ?")) {
571
-
572
-					      var rmvArplUrl = OC.generateUrl('/apps/sms_relentless/user/removeautoreplies');
573
-					      $.ajax({
574
-						   url: rmvArplUrl + '/' + userid,
575
-						   method: "POST",
576
-						   dataType: "text",
577
-						   data: { phoneNumber: crntPhnNmbr },
578
-						   success: function(delresult) {
579
-
580
-						                     if (delresult.indexOf("success") > -1) {
581
-						                         showAlert("The auto-reply has been removed successfully!");
582
-						                         $("#arpphn-"+ slctRowRm).closest("tr").remove();
583
-						                     } else if (delresult.indexOf("failure") > -1) {
584
-						                         showAlert("Error while trying to remove auto-reply data!");
585
-						                     } else if (delresult.indexOf("not allowed") > -1) {
586
-                                                                         showAlert("You cannot remove the auto-reply saved by another user.");
587
-                                                                     }
588
-						   },
589
-						   error: function() { showAlert("Error while attempting to remove auto-reply data! You can check the Nextcloud log to find more details about this issue."); }
590
-					       });
591
-					  }
592
-				       });
593
-				  }
594
-				  removeArplRow();
595
-
596
-                                  // Add a new row
597
-                                  $("#addArplRow").click(function() {
598
-
599
-                                     if ($("#autoReplyTbl").find("tr:last-child").find(".arplPhoneNmbr").length > 0) {
600
-                                         var lastarpl = $("#autoReplyTbl").find("tr:last-child").find(".arplPhoneNmbr").attr("id").replace("arpphn-", "");
601
-                                         var indArplAdd = parseInt(lastarpl + 1);
602
-                                     } else { var indArplAdd = 0; }
603
-			             $("#autoReplyTbl").append("<tr><td><input type='text' class='arplAuthor' value='"+ cusrDisplayName +"' disabled></td><td><select id='arpphn-"+ indArplAdd +"' class='arplPhoneNmbr'>"+ numbersListItems +"</select></td><td><div id='arplmode-"+ indArplAdd +"' class='arplMode'><select id='modeselect-"+ indArplAdd +"' class='selectArplMode'><option value='' selected>Select mode</option><option value='daily'>Daily mode</option><option value='vacation'>Vacation mode</option></select><div id='modecont-"+ indArplAdd +"' class='modeContent'></div></div></td><td><textarea id='arpltxt-"+ indArplAdd +"' class='arplText' rows='20' cols='40' placeholder='Enter the auto-reply message here.'></textarea></td><td><img id='rmRow-"+ indArplAdd +"' class='removeRow' src='/apps/sms_relentless/img/closewnd.svg' title='Remove this row from the database' style='cursor:pointer;margin:9px 8px 0px 18px;'></td><td><input type='submit' id='arplsave-"+ indArplAdd +"' class='saveAutoReply' value='Save' title='Save Row' /></td></tr>");
604
-
605
-                                     selectMode();
606
-                                     saveArplRow();
607
-                                     removeArplRow();
608
-
609
-			             // Check if there is an auto-reply set for the same phone number
610
-				     $("#arpphn-"+ indArplAdd).change(function() {
611
-					 var selectedPhNb = $("#arpphn-"+ indArplAdd).val();
612
-					 var allArplPhNmbrs = $("#autoReplyTbl").find("tr").find(".arplPhoneNmbr");
613
-					 var phNbChck = 0;
614
-					 allArplPhNmbrs.each(function() {
615
-					    var slctphnb = ($(this).val())? $(this).val() : $(this).text();
616
-					    if (selectedPhNb == slctphnb) { phNbChck++; }
617
-					 });
618
-
619
-					 if (phNbChck == 2) {
620
-					     showAlert("There is already an auto-reply set up for this phone number. Please edit its own row, or choose a different phone number.");
621
-					     $(this).val('');
622
-					     return;
623
-					 }
624
-				     });
625
-                                  });
626
-
627
-		  },
628
-		  error: function() {
629
-                                    $("#autoRplPhoneNb").removeClass('icon-loading'); 
630
-                                    showAlert("Error while attempting to get the auto-reply settings! You can check the Nextcloud log to find more details about this issue.");
631
-                  }
632
-         });
633
-
634
-     },
635
-     error: function() {
636
-                  showAlert('Error while getting the settings! You can check the Nextcloud log to find more details about this issue.');
637
-     }
638
-  });
639
-
640
-
641
-
642
-  // Save personal settings for non-admin users
643
-  $("#save_sms_settings").on("click", function(event) {
644
-
645
-     if (isadm == 'reguser') {
646
-
647
-	    event.preventDefault();
648
-//	    OC.msg.startAction('#smsr_save_msg', t('sms_relentless', 'Saved'));
649
-
650
-	    var baseUrlsave = OC.generateUrl('/apps/sms_relentless/user/updatesettings');
651
-
652
-	    var messagesperpageinit = $("#messagesperpage").val();
653
-	    var messagesperpagesec = messagesperpageinit.replace(/[^0-9]/g, '');
654
-
655
-	    if (messagesperpagesec != '') {
656
-		var messagesperpageproc = messagesperpagesec;
657
-	    } else {
658
-		var messagesperpageproc = 100;
659
-	    }
660
-
661
-	    var getnotify = 0;
662
-
663
-	    if ($("#get_notify").is(':checked')) {
664
-		getnotify = 1;
665
-	    }
666
-
667
-	    var emailaddressinit = $("#notification_email").val();
668
-
669
-	    function validate_email($email) {
670
-		var email_reg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
671
-		return email_reg.test($email);
672
-	    }
673
-
674
-	    if (validate_email(emailaddressinit)) {
675
-		 var notifyemail = emailaddressinit;
676
-	    } else {
677
-		 var notifyemail = '';
678
-	    }
679
-
680
-	    var includesmsinemail = 0;
681
-	    if ($("#includesmsinemail").is(':checked')) {
682
-		includesmsinemail = 1;
683
-                if ($("#notification_email").val().trim() == '') {
684
-                    showAlert("Please enter an email address in the field: 'I want to receive a notification to the email address from below ...', or uncheck the checkbox: 'Include the SMS/MMS message in the email notification itself'.");
685
-                    return;
686
-                }
687
-	    }
688
-
689
-	    var showdisplaynm = 0;
690
-	    if ($("#showdisplaynames").is(':checked')) {
691
-		showdisplaynm = 1;
692
-	    }
693
-
694
-	    var datatosave = {
695
-			      userId: userid,
696
-		              telapiUrlRec: $("#telapi_url_rec").val(),
697
-		              telapiUrl: $("#telapi_url").val(),
698
-		              nexapiUrlRec: $("#nexapi_url_rec").val(),
699
-		              nexapiUrl: $("#nexapi_url").val(),
700
-		              twilapiUrlRec: $("#twilapi_url_rec").val(),
701
-		              twilapiUrl: $("#twilapi_url").val(),
702
-		              flowapiUrlRec: $("#flowapi_url_rec").val(),
703
-		              flowapiUrl: $("#flowapi_url").val(),
704
-			      messagesperpage: messagesperpageproc,
705
-			      getNotify: getnotify,
706
-			      notificationEmail: notifyemail,
707
-			      getsmsinemail: includesmsinemail,
708
-			      showDisplayNames: showdisplaynm
709
-	    };
710
-
711
-
712
-	    $.ajax({
713
-	       method: 'PUT',
714
-	       url: baseUrlsave + '/' + userid,
715
-	       contentType: 'application/json',
716
-	       data: JSON.stringify(datatosave),
717
-	       success: function() {
718
-                               OC.msg.startAction('#smsr_save_msg', t('sms_relentless', 'Saved'));
719
-	       },
720
-	       error: function() {
721
-		    showAlert('Error while attempting to save the settings! You can check the Nextcloud log to find more details about this issue.');
722
-	       }
723
-	    });
724
-
725
-
726
-     } else if (isadm == 'admin') {
727
-
728
-	    // Save personal settings for admins
729
-	    event.preventDefault();
730
-//	    OC.msg.startAction('#smsr_save_msg', t('sms_relentless', 'Saved'));
731
-
732
-	    var baseUrlsaveadm = OC.generateUrl('/apps/sms_relentless/user/updatepersadmnsettings');
733
-
734
-	    var messagesperpageinit = $("#messagesperpage").val();
735
-	    var messagesperpagesec = messagesperpageinit.replace(/[^0-9]/g, '');
736
-
737
-	    if (messagesperpagesec != '') {
738
-		var messagesperpageproc = messagesperpagesec;
739
-	    } else {
740
-		var messagesperpageproc = 100;
741
-	    }
742
-
743
-	    var getnotify = 0;
744
-
745
-	    if ($("#get_notify").is(':checked')) {
746
-		getnotify = 1;
747
-	    }
748
-
749
-	    var emailaddressinit = $("#notification_email").val();
750
-
751
-	    function validate_email($email) {
752
-		var email_reg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
753
-		return email_reg.test($email);
754
-	    }
755
-
756
-	    if (validate_email(emailaddressinit)) {
757
-		 var notifyemail = emailaddressinit;
758
-	    } else {
759
-		 var notifyemail = '';
760
-	    }
761
-
762
-	    var includesmsinemail = 0;
763
-	    if ($("#includesmsinemail").is(':checked')) {
764
-		includesmsinemail = 1;
765
-                if ($("#notification_email").val().trim() == '') {
766
-                    showAlert("Please enter an email address in the field: 'I want to receive a notification to the email address from below ...', or uncheck the checkbox: 'Include the SMS/MMS message in the email notification itself'.");
767
-                    return;
768
-                }
769
-	    }
770
-
771
-	    var showdisplaynm = 0;
772
-	    if ($("#showdisplaynames").is(':checked')) {
773
-		showdisplaynm = 1;
774
-	    }
775
-
776
-	    var datatosave = {
777
-			      userId: userid,
778
-			      messagesperpage: messagesperpageproc,
779
-			      getNotify: getnotify,
780
-			      notificationEmail: notifyemail,
781
-			      getsmsinemail: includesmsinemail,
782
-			      showDisplayNames: showdisplaynm
783
-	    };
784
-
785
-
786
-	    $.ajax({
787
-	       method: 'PUT',
788
-	       url: baseUrlsaveadm + '/' + userid,
789
-	       contentType: 'application/json',
790
-	       data: JSON.stringify(datatosave),
791
-	       success: function() {
792
-                               OC.msg.startAction('#smsr_save_msg', t('sms_relentless', 'Saved'));
793
-	       },
794
-	       error: function() {
795
-		    showAlert('Error while attempting to save the settings! You can check the Nextcloud log to find more details about this issue.');
796
-	       }
797
-	    });
798
-
799
-     }
800
-  });
801
-
802
-  function showAlert(alertText) {
803
-
804
-     let alertwnd = "<div id='alertMessage'>";
805
-     alertwnd += "<a id='closeAlertWnd' title='Close this window'></a>";
806
-     alertwnd += "<div id='alertTextWrap'>"+ alertText +"</div>";
807
-     alertwnd += "<input type='submit' id='alertOk' value='OK'>";
808
-     alertwnd += "</div>";
809
-
810
-     $("#content").append("<div id='alertMsgOverlay'></div>");
811
-     $("#content").append(alertwnd);
812
-
813
-     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
814
-     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
815
-     $("#alertMessage").css({ "top" : topDist, "left" : leftDist });
816
-
817
-     $("#closeAlertWnd").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
818
-     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
819
-     $("#alertOk").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
820
-  }
821
-
822
-
823
-});
824 0
deleted file mode 100644
... ...
@@ -1,4599 +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
-  // Set the default number of messages per page
30
-  var messagesperpage = 100;
31
-
32
-  // Get the number of messages per page from the database
33
-  var getNoPerPageUrl = OC.generateUrl("/apps/sms_relentless/user/getmessagesperpage");
34
-
35
-  $.ajax({
36
-        url: getNoPerPageUrl + '/' + userid,
37
-        method: 'GET',
38
-        success: function(mesperpagedb) {
39
-                 messagesperpage = parseInt(mesperpagedb);
40
-
41
-        },
42
-        error: function(mesperpagedb) {
43
-//               alert("Error. You can check the Nextcloud log to find more details about this issue!");
44
-                 showAlert("Error while getting the number of messages per page. You can check the Nextcloud log to find more details about this issue!");
45
-        }
46
-  });
47
-
48
-
49
-  // List received messages
50
-  $("#receivedsmstableshow").on("click", function(event) {
51
-
52
-     $('#smstables').empty();
53
-     var getReceivedUrl = OC.generateUrl("/apps/sms_relentless/user/getreceivedtable");
54
-
55
-     $('#smstables').addClass('icon-loading');
56
-
57
-     $.ajax({
58
-          url: getReceivedUrl + '/' + userid,
59
-          method: 'GET',
60
-          contentType: 'application/json',
61
-//          success: function(parseddata) {
62
-          success: function(datafdb) {
63
-
64
-                var parseddata = datafdb.datarows;
65
-
66
-                $('#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>");
67
-                $('#smstables').append("<table id='recSmsTable'></table>");
68
-
69
-                $('#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>");
70
-                $('#recSmsTable').append("<tr class='receivedrows' id='recheaderrow'><th id='selectalldv' class='selectsmsdv'><input type='checkbox' id='selectAllChckbx' class ='indivchckbx' title='Select all rows.' /></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>");
71
-
72
-                $('#recfiltersrow').hide();
73
-
74
-                if (datafdb.showdispnm == 1) {
75
-
76
-                    for (var i = 0; i < parseddata.length; i++) {
77
-
78
-                         if (parseddata[i].author_displayname) {
79
-                             var procrcmessage = "<span class='messageAuthorName'>"+ parseddata[i].author_displayname + ":</span>" + parseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/apps/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
80
-                         } else {
81
-                             var procrcmessage = parseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/apps/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
82
-                         }
83
-
84
-                         if (parseddata[i].internal_sender == 0) {
85
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'><div id='addDispName-"+ i +"' style='display:block;margin-right:5px;'><img class='addNameToPhNb' src='/apps/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='/apps/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>";
86
-                         } else {
87
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'>"+ parseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/apps/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>";
88
-                         }
89
-
90
-                         var procrecTo = "<div id='toNmbr-"+ i +"'>"+ parseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/apps/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>";
91
-
92
-                         $("#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>");
93
-                    }
94
-
95
-                } else {
96
-
97
-                    for (var i = 0; i < parseddata.length; i++) {
98
-
99
-                         var procrcmessage = parseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/apps/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
100
-
101
-                         if (parseddata[i].internal_sender == 0) {
102
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'><div id='addDispName-"+ i +"' style='display:block;margin-right:5px;'><img class='addNameToPhNb' src='/apps/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='/apps/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>";
103
-                         } else {
104
-                             var procrecFrom = "<div id='frmNmbr-"+ i +"'>"+ parseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/apps/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>";
105
-                         }
106
-
107
-                         var procrecTo = "<div id='toNmbr-"+ i +"'>"+ parseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src = '/apps/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>";
108
-
109
-                         $("#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>");
110
-                    }
111
-                }
112
-
113
-                $('#smstables').append("<div id='totalrecmessages'>Total displayed messages: " + parseddata.length + "</div>");
114
-
115
-                $('#smstables').removeClass('icon-loading');
116
-                $('#recarrow').removeClass('arrowUpCl');
117
-                $('#recarrow').addClass('arrowDownCl');
118
-
119
-
120
-                // Show the pop-up window that lists all the messages exchanged between the current 2 phone numbers
121
-                function showRecMsgPerConv(phNumberFrom, phNumberTo) {
122
-
123
-                   let allfrmtomsg = "<div id='listAllMsgsConv'>";
124
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/apps/sms_relentless/img/dots.svg'></div>";
125
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
126
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages exchanged between <span style='color:#04957b'>"+ phNumberFrom +"</span> and <span style='color:#04957b'>"+ phNumberTo +"</span></div>";
127
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
128
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
129
-                   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='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
130
-                   allfrmtomsg += "</table></div>";
131
-                   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>";
132
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS'></textarea></td></tr></table>";
133
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
134
-                   allfrmtomsg += "<div style='display:block;width:100%;height:14px;'><img id='expandWindowRpl' src='/apps/sms_relentless/img/arrowDown.svg' title='Expand to send a reply'></div>";
135
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/apps/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;'></div>";
136
-                   allfrmtomsg += "</div>";
137
-
138
-                   $("#content").append("<div id='recTblOverlay'></div>");
139
-                   $("#content").append(allfrmtomsg);
140
-
141
-                   let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
142
-                   let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
143
-                   $("#listAllMsgsConv").css({ "top" : topDist, "left" : leftDist });
144
-
145
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
146
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
147
-
148
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
149
-	           $("#expandWindowRpl").click(function() {
150
-
151
-	              if ($(this).attr('src') == '/apps/sms_relentless/img/arrowDown.svg') {
152
-                          $("#sendMsgReply").css("display", "block");
153
-                          $("#listAllMsgsConv").css("height", "618px");
154
-	                  $(this).attr('src', '/apps/sms_relentless/img/arrowUp.svg');
155
-                          $(this).attr('title', 'Collapse');
156
-	              } else {
157
-                          $("#sendMsgReply").css("display", "none");
158
-                          $("#listAllMsgsConv").css("height", "490px");
159
-                          $(this).attr('src', '/apps/sms_relentless/img/arrowDown.svg');
160
-                          $(this).attr('title', 'Expand to send a reply');
161
-	              }
162
-	           });
163
-
164
-                   // Send a message from the 'conversation' window
165
-                   $("#sendMsgConvBtn").click(function() {
166
-
167
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
168
-                      var msgToSend = $("#sendMsgConvText").val();
169
-                      var selectedid = $("#selectFromNbConv").val();
170
-                      var toNumber = $("#toNmbrConv").text();
171
-                      var receiversNumbers = [toNumber];
172
-
173
-		      if (selectedid != '') { 
174
-
175
-			  var sendersplit = selectedid.split(":");
176
-			  var providercap = sendersplit[0];
177
-			  var provsec = sendersplit[1];
178
-
179
-			  if (/[a-zA-Z]/.test(provsec)) {
180
-			      var alphanumcheck = true;
181
-			  } else { var alphanumcheck = false; }
182
-
183
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
184
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
185
-			      var selectedsender = "+" + senderproc;
186
-			      var providerUsed = "telnyx";
187
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
188
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
189
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
190
-			      var providerUsed = "plivo";
191
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
192
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
193
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
194
-			      var selectedsender = "+" + senderproc;
195
-			      var providerUsed = "twilio";
196
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
197
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
198
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
199
-			      var selectedsender = "+" + senderproc;
200
-			      var providerUsed = "flowroute";
201
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
202
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
203
-			      var selectedsender = provsec;
204
-			      var providerUsed = "telnyx";
205
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
206
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
207
-			      var selectedsender = provsec;
208
-			      var providerUsed = "plivo";
209
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
210
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
211
-			      var selectedsender = provsec;
212
-			      var providerUsed = "twilio";
213
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
214
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
215
-			      var selectedsender = provsec;
216
-			      var providerUsed = "flowroute";
217
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
218
-			  }
219
-
220
-                          var uploadedtomms = [];
221
-
222
-	                  if (msgToSend != '') {
223
-
224
-				  $.ajax({
225
-				     url: relbaseUrl + '/' + userid,
226
-				     type: "POST",
227
-				     data: {
228
-				           receiversPhoneNbs: receiversNumbers,
229
-				           fromsender: selectedsender,
230
-				           waitinterval: 1000,
231
-				           sentsmstext: msgToSend,
232
-				           ismms: 0,
233
-				           mmsfiles: uploadedtomms
234
-				         },
235
-				     success: function(displayname) {
236
-
237
-                                           var tzdate = new Date();
238
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
239
-                                           var presDatedb = presDatest.split(".")[0];
240
-                                           var presDatesc = presDatedb.split("T");
241
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
242
-                                           var sentMessageStatus = '';
243
-
244
-                                           if (displayname) {
245
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
246
-                                           } else { var msgToSendproc = ''; }
247
-
248
-                                           $("#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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
249
-
250
-                                           // Scroll down to the bottom of the window
251
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
252
-
253
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
254
-				     },
255
-				     error: function() {
256
-//				           alert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
257
-                                           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
258
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
259
-				     }
260
-				  });
261
-			  } else {
262
-//				  alert("Please enter a message in the text box!");
263
-                                  showAlert("Please enter a message in the text box!");
264
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
265
-			  }
266
-		      } else {
267
-//			      alert("Please choose a Sender ID from the 'From' drop-down list!");
268
-                              showAlert("Please choose a Sender ID from the 'From' drop-down list!");
269
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
270
-		      }
271
-
272
-                   });
273
-
274
-
275
-	           // Make the window draggable
276
-	           function makeMgrWndDraggable(e) {
277
-
278
-			   window.pmdragging = {};
279
-			   pmdragging.pageX0 = e.pageX;
280
-			   pmdragging.pageY0 = e.pageY;
281
-			   pmdragging.elem = $("#listAllMsgsConv");
282
-			   pmdragging.offset0 = $("#listAllMsgsConv").offset();
283
-
284
-			   function handle_dragging(e) {
285
-			       let left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
286
-			       let top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
287
-			       $(pmdragging.elem).offset({top: top, left: left});
288
-			   }
289
-
290
-			   function handle_mouseup(e) {
291
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
292
-			   }
293
-
294
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
295
-	           }
296
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
297
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
298
-
299
-
300
-                   // Append the available phone numbers to the From drop-down list
301
-                   var availPhoneNmbrs = [];
302
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
303
-                      var crtphnmbr = $(this).attr("value");
304
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
305
-                   });
306
-
307
-                   if (availPhoneNmbrs.length > 0) {
308
-                       var avphopt = "";
309
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
310
-                            if (availPhoneNmbrs[d].indexOf(phNumberTo) === -1) {
311
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
312
-                            } else {
313
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"' selected>"+ availPhoneNmbrs[d] +"</option>";
314
-                            }
315
-                       }
316
-                       $("#selectFromNbConv").append(avphopt);
317
-
318
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
319
-
320
-
321
-                   // Get the sent/received messages for the current phone number, from the database
322
-		   let getGrpConvUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedforreply");
323
-
324
-		   $('#listAllMsgsConv').addClass('icon-loading');
325
-		   let totalPhNmbrs = 0;
326
-
327
-		   $.ajax({
328
-			  method: 'POST',
329
-			  url: getGrpConvUrl + '/' + userid,
330
-			  contentType: 'application/json',
331
-                          data: JSON.stringify({ phoneNmbrFrom: phNumberFrom, phoneNmbrTo: phNumberTo }),
332
-			  success: function(groupedperconv) {
333
-
334
-				     $('#listAllMsgsConv').removeClass('icon-loading');
335
-
336
-				     let fromtoNmbrsData = [];
337
-
338
-				     for (let i = 0; i < groupedperconv.length; i++) {
339
-
340
-					     if (groupedperconv[i].author_displayname) {
341
-						 var authordnm = groupedperconv[i].author_displayname;
342
-					     } else { 
343
-						 var authordnm = '';
344
-					     }
345
-
346
-					     var sentfromnmbrarr = groupedperconv[i].from.split("+");
347
-				             if (sentfromnmbrarr[1]) {
348
-						 var groupednbfrom = "+"+ sentfromnmbrarr[1];
349
-				             } else {
350
-						 var groupednbfrom = sentfromnmbrarr[0];
351
-				             }
352
-
353
-				             var modmessagerec = '';
354
-				             if (groupedperconv[i].author_displayname) {
355
-						 modmessagerec = "<span class='msgAuthorNameGrp'>"+ groupedperconv[i].author_displayname + ":</span>" + groupedperconv[i].message;
356
-				             } else {
357
-			                         modmessagerec = groupedperconv[i].message;
358
-                                             }
359
-
360
-				             if (groupedperconv[i].to.indexOf(": ") > -1) {
361
-				                 var groupednmbrtopre = groupedperconv[i].to.split(": ");
362
-				                 var groupednmbrto = groupednmbrtopre[1];
363
-				             } else { 
364
-				                 var groupednmbrto = groupedperconv[i].to;
365
-				             }
366
-
367
-				             fromtoNmbrsData.push({
368
-				                       'author_displayname': authordnm,
369
-				                       'from': groupednbfrom,
370
-				                       'to': groupednmbrto,
371
-				                       'message': modmessagerec,
372
-				                       'date': groupedperconv[i].date,
373
-				                       'status': groupedperconv[i].deliveryreceipt,
374
-				                       'table': groupedperconv[i].table
375
-				             });
376
-				     }
377
-
378
-
379
-				     // Remove the duplicates
380
-				     let noDupMsgData = [];
381
-				     $.each(fromtoNmbrsData, function(i, e) {
382
-					    let matchingData = $.grep(noDupMsgData, function(item) {
383
-				                    return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
384
-					    });
385
-					    if (matchingData.length === 0) {
386
-						noDupMsgData.push(e);
387
-					    }
388
-				     });
389
-
390
-				     let messagesPerNmbr = {};
391
-				     let msgsNamesPerNmbr = {};
392
-				     let msgsNmbrsNames = {};
393
-
394
-			             let displayNamesarr = [];
395
-			             let convData = [];
396
-
397
-			             for (let n = 0; n < noDupMsgData.length; n++) {
398
-
399
-			                  if (noDupMsgData[n]['from'] == phNumberFrom && noDupMsgData[n]['table'] == 'sent') {
400
-
401
-			                      convData.push({
402
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
403
-			                                     'message': noDupMsgData[n]['message'],
404
-			                                     'from': noDupMsgData[n]['from'],
405
-			                                     'to': noDupMsgData[n]['to'],
406
-			                                     'date': noDupMsgData[n]['date'],
407
-			                                     'direction': 'sent_from',
408
-			                                     'status': noDupMsgData[n]['status'],
409
-			                                     'table': noDupMsgData[n]['table']
410
-			                      });
411
-
412
-			                  } else if (noDupMsgData[n]['to'] == phNumberFrom && noDupMsgData[n]['table'] == 'sent') {
413
-
414
-			                      convData.push({
415
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
416
-			                                     'message': noDupMsgData[n]['message'],
417
-			                                     'from': noDupMsgData[n]['from'],
418
-			                                     'to': noDupMsgData[n]['to'],
419
-			                                     'date': noDupMsgData[n]['date'],
420
-			                                     'direction': 'sent_to',
421
-			                                     'status': noDupMsgData[n]['status'],
422
-			                                     'table': noDupMsgData[n]['table']
423
-			                      });
424
-
425
-
426
-			                  } else if (noDupMsgData[n]['from'] == phNumberFrom && noDupMsgData[n]['table'] == 'received') {
427
-
428
-			                      convData.push({
429
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
430
-			                                     'message': noDupMsgData[n]['message'],
431
-			                                     'from': noDupMsgData[n]['from'],
432
-			                                     'to': noDupMsgData[n]['to'],
433
-			                                     'date': noDupMsgData[n]['date'],
434
-			                                     'direction': 'received_from',
435
-			                                     'status': noDupMsgData[n]['status'],
436
-			                                     'table': noDupMsgData[n]['table']
437
-			                      });
438
-
439
-			                  } else if (noDupMsgData[n]['to'] == phNumberFrom && noDupMsgData[n]['table'] == 'received') {
440
-
441
-			                      convData.push({
442
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
443
-			                                     'message': noDupMsgData[n]['message'],
444
-			                                     'from': noDupMsgData[n]['from'],
445
-			                                     'to': noDupMsgData[n]['to'],
446
-			                                     'date': noDupMsgData[n]['date'],
447
-			                                     'direction': 'received_on',
448
-			                                     'status': noDupMsgData[n]['status'],
449
-			                                     'table': noDupMsgData[n]['table']
450
-			                      });
451
-			                  }
452
-			             }
453
-
454
-			             // Sort messages by date
455
-				     convData.sort(function(a, b) {
456
-					let c = new Date(a.date);
457
-					let d = new Date(b.date);
458
-					return c-d;
459
-				     });
460
-                                     convData.reverse();
461
-
462
-			             // Collect the display names of the users that sent messages from the current number
463
-			             let selectedNames = [];
464
-			             let displayNames = '';
465
-			             for (let v = 0; v < convData.length; v++) {
466
-			                  if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
467
-			                      selectedNames.push(convData[v]['author_displayname']);
468
-			                      displayNames += "<div id='diplNm_"+ phNumberFrom +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
469
-			                  }
470
-			             }
471
-			             displayNames += "<div id='diplNmAllMsg' class='dispNameListAll' title='Show all the messages for this number.'>"+ phNumberFrom +"</div>";
472
-
473
-			             // Store the display names for the current number, to be able to see them later
474
-			             let ctPhNumber = phNumberFrom;
475
-			             msgsNamesPerNmbr[ctPhNumber] = displayNames;
476
-
477
-			             // Store the messages sent by each user, to be able to see them later when clicking on the user's name
478
-			             for (let h = 0; h < selectedNames.length; h++) {
479
-
480
-			                  let rowMessageArrpn = [];
481
-			                  for (let b = 0; b < convData.length; b++) {
482
-
483
-			                       if (selectedNames[h] == convData[b]['author_displayname']) {
484
-
485
-					           if (convData[b]['direction'] == 'sent_from') {
486
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
487
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
488
-					               } else {
489
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
490
-					               }
491
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
492
-					           } else if (convData[b]['direction'] == 'sent_to') {
493
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
494
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
495
-					               } else {
496
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
497
-					               }
498
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
499
-					           } else if (convData[b]['direction'] == 'received_from') {
500
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
501
-					           } else if (convData[b]['direction'] == 'received_on') {
502
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
503
-			                           }
504
-			                       }
505
-			                  }
506
-			                  let crtNmber = phNumberFrom;
507
-			                  let crtName = selectedNames[h];
508
-			                  msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
509
-                                          msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
510
-			             }
511
-
512
-                                     // The number of messages to be loaded by default
513
-                                     let nmbTblDefault = 50;
514
-
515
-                                     // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
516
-                                     if (convData.length > nmbTblDefault) {
517
-                                         $("#loadMoreMsgs").css("display", "block");
518
-                                         var nmbToBeLoaded = nmbTblDefault;
519
-                                     } else { var nmbToBeLoaded = convData.length; }
520
-
521
-			             let rowMessageArr = [];
522
-			             for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
523
-
524
-			                  if (convData[m]['direction'] == 'sent_from') {
525
-
526
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
527
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
528
-			                      } else {
529
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
530
-			                      }
531
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
532
-
533
-			                  } else if (convData[m]['direction'] == 'sent_to') {
534
-
535
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
536
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
537
-			                      } else {
538
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
539
-			                      }
540
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
541
-
542
-			                  } else if (convData[m]['direction'] == 'received_from') {
543
-
544
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
545
-
546
-			                  } else if (convData[m]['direction'] == 'received_on') {
547
-
548
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
549
-			                  }
550
-			             }
551
-
552
-			             let convDataPerNmbr = rowMessageArr.join("");
553
-
554
-                                     $("#grpdbynamelst").append(displayNames);
555
-                                     $("#msgListRowCell").append(convDataPerNmbr);
556
-
557
-			             // Store the messages for the current number, to be able to see them later, when clicking on the number
558
-			             let rowMessageArrcpt = [];
559
-			             for (let m = 0; m < convData.length; m++) {
560
-
561
-			                  if (convData[m]['direction'] == 'sent_from') {
562
-
563
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
564
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
565
-			                      } else {
566
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
567
-			                      }
568
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
569
-
570
-			                  } else if (convData[m]['direction'] == 'sent_to') {
571
-
572
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
573
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
574
-			                      } else {
575
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
576
-			                      }
577
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
578
-
579
-			                  } else if (convData[m]['direction'] == 'received_from') {
580
-
581
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
582
-
583
-			                  } else if (convData[m]['direction'] == 'received_on') {
584
-
585
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
586
-			                  }
587
-			             }
588
-
589
-			             messagesPerNmbr[phNumberFrom] = rowMessageArrcpt;
590
-
591
-                                     // Scroll down to the bottom of the window
592
-                                     $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
593
-
594
-                                     // Load more messages
595
-                                     let clickNmb = 0;
596
-                                     $("#loadMoreMsgs").click(function() {
597
-
598
-                                         clickNmb++;
599
-
600
-                                         var crefnb = (clickNmb + 1) * nmbToBeLoaded;
601
-
602
-                                         if (crefnb > convData.length) {
603
-                                             var nmbmsg = convData.length - 1;
604
-                                             $("#loadMoreMsgs").css("display", "none");
605
-                                         } else { 
606
-                                             var nmbmsg = crefnb - 1;
607
-                                         }
608
-
609
-                                         var rowMessageArrAdd = [];
610
-
611
-                                         for (let m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
612
-
613
-			                      if (convData[m]['direction'] == 'sent_from') {
614
-
615
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
616
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
617
-			                          } else {
618
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
619
-			                          }
620
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
621
-
622
-			                      } else if (convData[m]['direction'] == 'sent_to') {
623
-
624
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
625
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
626
-			                          } else {
627
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
628
-			                          }
629
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
630
-
631
-			                      } else if (convData[m]['direction'] == 'received_from') {
632
-
633
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
634
-
635
-			                      } else if (convData[m]['direction'] == 'received_on') {
636
-
637
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
638
-			                      }
639
-                                         }
640
-
641
-			                 let convDataPerNmbrad = rowMessageArrAdd.join("");
642
-
643
-                                         let scrlheight = $("#msgListRowCell").height();
644
-                                         $("#msgListRowCell").prepend(convDataPerNmbrad);
645
-
646
-                                         $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
647
-                                     });
648
-
649
-
650
-			             // Show the messages sent by each user whose name is clicked
651
-			             $('[id*="diplNm_"]').click(function() {
652
-
653
-			                 let crntNmbr = $(this).attr("id").split("_")[1];
654
-			                 let crntDisName = $(this).attr("name");                               
655
-                                         $("#loadMoreMsgs").css("display", "none");
656
-
657
-                                         let convDataprn = [];
658
-                                         $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
659
-                                                convDataprn.push(item);
660
-                                         });
661
-
662
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
663
-                                         if (convDataprn.length > nmbTblDefault) {
664
-                                             $("#loadMoreMsgsusr").css("display", "block");
665
-                                             let nmbToBeLoaded = nmbTblDefault;
666
-                                         } else {
667
-                                             $("#loadMoreMsgsusr").css("display", "none");
668
-                                             let nmbToBeLoaded = convDataprn.length;
669
-                                         }
670
-
671
-			                 let rowMessageArrprnst = [];
672
-
673
-			                 for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
674
-                                              rowMessageArrprnst.push(convDataprn[n]);
675
-			                 }
676
-
677
-			                 let convDataPerNmbrprnst = rowMessageArrprnst.join("");
678
-
679
-                                         $("#msgListRowCell").empty();
680
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
681
-
682
-                                         // Scroll down to the bottom of the window
683
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
684
-
685
-                                         // Load more messages
686
-                                         let clckNb = 0;
687
-                                         $("#loadMoreMsgsusr").unbind("click");
688
-                                         $("#loadMoreMsgsusr").click(function() {
689
-
690
-                                             clckNb++;
691
-                                             let crefnb = (clckNb + 1) * nmbToBeLoaded;
692
-
693
-                                             $("#loadMoreMsgs").css("display", "none");
694
-
695
-                                             if (crefnb > convDataprn.length) {
696
-                                                 let nmbmsg = convDataprn.length - 1;
697
-                                                 $("#loadMoreMsgsusr").css("display", "none");
698
-                                             } else { 
699
-                                                 let nmbmsg = crefnb - 1;
700
-                                                 $("#loadMoreMsgsusr").css("display", "block");
701
-                                             }
702
-
703
-                                             let rowMessageArrAddst = [];
704
-
705
-                                             for (let q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
706
-
707
-                                                  rowMessageArrAddst.push(convDataprn[q]);
708
-                                             }
709
-
710
-			                     let convDataPerNmbradst = rowMessageArrAddst.join("");
711
-
712
-                                             let scrlheight = $("#msgListRowCell").height();
713
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
714
-
715
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
716
-                                         });
717
-
718
-
719
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
720
-			                 $("#diplNmAllMsg").css("color", "#04957b");
721
-			                 $(this).css("color", "#1b8efe");
722
-			             });
723
-
724
-
725
-			             // Show again all the messages sent/received to/from the clicked number
726
-			             $("#diplNmAllMsg").click(function() {
727
-
728
-                                         $("#loadMoreMsgsusr").css("display", "none");
729
-
730
-                                         let convDataprn = [];
731
-                                         $.each(messagesPerNmbr[phNumberFrom], function(index, item) {
732
-                                                convDataprn.push(item);
733
-                                         });
734
-
735
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
736
-                                         if (convDataprn.length > nmbTblDefault) {
737
-                                             $("#loadMoreMsgs").css("display", "block");
738
-                                             let nmbToBeLoaded = nmbTblDefault;
739
-                                         } else {
740
-                                             $("#loadMoreMsgs").css("display", "none");
741
-                                             let nmbToBeLoaded = convDataprn.length;
742
-                                         }
743
-
744
-
745
-			                 let rowMessageArrprnst = [];
746
-
747
-			                 for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
748
-                                              rowMessageArrprnst.push(convDataprn[n]);
749
-			                 }
750
-
751
-			                 let convDataPerNmbrprnst = rowMessageArrprnst.join("");
752
-
753
-                                         $("#msgListRowCell").empty();
754
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
755
-
756
-                                         // Scroll down to the bottom of the window
757
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
758
-
759
-
760
-                                         // Load more messages
761
-                                         let clckNb = 0;
762
-                                         $("#loadMoreMsgsusr").unbind("click");
763
-                                         $("#loadMoreMsgsusr").click(function() {
764
-
765
-                                             clckNb++;
766
-                                             let crefnb = (clckNb + 1) * nmbToBeLoaded;
767
-
768
-                                             $("#loadMoreMsgs").css("display", "none");
769
-
770
-                                             if (crefnb > convDataprn.length) {
771
-                                                 let nmbmsg = convDataprn.length - 1;
772
-                                                 $("#loadMoreMsgsusr").css("display", "none");
773
-                                             } else { 
774
-                                                 let nmbmsg = crefnb - 1;
775
-                                                 $("#loadMoreMsgsusr").css("display", "block");
776
-                                             }
777
-
778
-                                             let rowMessageArrAddst = [];
779
-
780
-                                             for (let q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
781
-
782
-                                                  rowMessageArrAddst.push(convDataprn[q]);
783
-                                             }
784
-
785
-			                     let convDataPerNmbradst = rowMessageArrAddst.join("");
786
-
787
-                                             let scrlheight = $("#msgListRowCell").height();
788
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
789
-
790
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
791
-                                         });
792
-
793
-
794
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
795
-			                 $("#diplNmAllMsg").css("color", "#04957b");
796
-			                 $(this).css("color", "#04c6a4");
797
-
798
-			             });
799
-
800
-
801
-				     // Show the scroll-up arrow
802
-				     $("#frmMsgLstWrap").scroll(function() {
803
-					if ($(this).scrollTop() > 900) {
804
-					      $('#upArrowSmall').fadeIn();
805
-					} else {
806
-					      $('#upArrowSmall').fadeOut();
807
-					}
808
-				     });
809
-
810
-				     $("#upArrowSmall").click(function() {
811
-					$("#frmMsgLstWrap").animate({scrollTop : 0},400);
812
-				     });
813
-
814
-			  },
815
-			  error: function() {
816
-//				     alert("Error while attempting to get message data from the database!");
817
-                                     showAlert("Error while attempting to get message data from the database!");
818
-				     $('#listAllMsgsConv').removeClass('icon-loading');
819
-			  }
820
-		   });
821
-
822
-                }
823
-
824
-                $('[id^="showMsgConv-"]').click(function() {
825
-
826
-                   let ctrwnmbr = $(this).attr("id").replace("showMsgConv-", "");
827
-                   let phNumberFrom = $("#frmNmbr-"+ ctrwnmbr).text();
828
-                   let phNumberTo = $("#toNmbr-"+ ctrwnmbr).text().split(": ")[1];
829
-
830
-                   showRecMsgPerConv(phNumberFrom, phNumberTo);
831
-                });
832
-
833
-
834
-
835
-                // Show the pop-up window that lists all the messages sent/received to/from a phone number
836
-                function showMsgPerNmbr(clckPhNumber) {
837
-
838
-                   var allfrmtomsg = "<div id='listAllMsgsFromTo'>";
839
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/apps/sms_relentless/img/dots.svg'></div>";
840
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
841
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages sent/received to/from  <span style='color:#04957b'>"+ clckPhNumber +"</span></div>";
842
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
843
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
844
-                   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='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
845
-                   allfrmtomsg += "</table></div>";
846
-                   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>";
847
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS'></textarea></td></tr></table>";
848
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
849
-                   allfrmtomsg += "<div style='display:block;width:100%;height:14px;'><img id='expandWindowRpl' src='/apps/sms_relentless/img/arrowDown.svg' title='Expand to send a message'></div>";
850
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/apps/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;'></div>";
851
-                   allfrmtomsg += "</div>";
852
-
853
-                   $("#content").append("<div id='recTblOverlay'></div>");
854
-                   $("#content").append(allfrmtomsg);
855
-
856
-                   var topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
857
-                   var leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
858
-                   $("#listAllMsgsFromTo").css({ "top" : topDist, "left" : leftDist });
859
-
860
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
861
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
862
-
863
-
864
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
865
-	           $("#expandWindowRpl").click(function() {
866
-
867
-	              if ($(this).attr('src') == '/apps/sms_relentless/img/arrowDown.svg') {
868
-                          $("#sendMsgReply").css("display", "block");
869
-                          $("#listAllMsgsFromTo").css("height", "618px");
870
-	                  $(this).attr('src', '/apps/sms_relentless/img/arrowUp.svg');
871
-                          $(this).attr('title', 'Collapse');
872
-	              } else {
873
-                          $("#sendMsgReply").css("display", "none");
874
-                          $("#listAllMsgsFromTo").css("height", "490px");
875
-                          $(this).attr('src', '/apps/sms_relentless/img/arrowDown.svg');
876
-                          $(this).attr('title', 'Expand to send a reply');
877
-	              }
878
-	           });
879
-
880
-                   // Send a message from the 'conversation' window
881
-                   $("#sendMsgConvBtn").click(function() {
882
-
883
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
884
-                      var msgToSend = $("#sendMsgConvText").val();
885
-                      var selectedid = $("#selectFromNbConv").val();
886
-                      var toNumber = $("#toNmbrConv").text();
887
-                      var receiversNumbers = [toNumber];
888
-
889
-		      if (selectedid != '') { 
890
-
891
-			  var sendersplit = selectedid.split(":");
892
-			  var providercap = sendersplit[0];
893
-			  var provsec = sendersplit[1];
894
-
895
-			  if (/[a-zA-Z]/.test(provsec)) {
896
-			      var alphanumcheck = true;
897
-			  } else { var alphanumcheck = false; }
898
-
899
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
900
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
901
-			      var selectedsender = "+" + senderproc;
902
-			      var providerUsed = "telnyx";
903
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
904
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
905
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
906
-			      var providerUsed = "plivo";
907
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
908
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
909
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
910
-			      var selectedsender = "+" + senderproc;
911
-			      var providerUsed = "twilio";
912
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
913
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
914
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
915
-			      var selectedsender = "+" + senderproc;
916
-			      var providerUsed = "flowroute";
917
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
918
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
919
-			      var selectedsender = provsec;
920
-			      var providerUsed = "telnyx";
921
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
922
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
923
-			      var selectedsender = provsec;
924
-			      var providerUsed = "plivo";
925
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
926
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
927
-			      var selectedsender = provsec;
928
-			      var providerUsed = "twilio";
929
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
930
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
931
-			      var selectedsender = provsec;
932
-			      var providerUsed = "flowroute";
933
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
934
-			  }
935
-
936
-                          var uploadedtomms = [];
937
-
938
-	                  if (msgToSend != '') {
939
-
940
-				  $.ajax({
941
-				     url: relbaseUrl + '/' + userid,
942
-				     type: "POST",
943
-				     data: {
944
-				           receiversPhoneNbs: receiversNumbers,
945
-				           fromsender: selectedsender,
946
-				           waitinterval: 1000,
947
-				           sentsmstext: msgToSend,
948
-				           ismms: 0,
949
-				           mmsfiles: uploadedtomms
950
-				         },
951
-				     success: function(displayname) {
952
-
953
-                                           var tzdate = new Date();
954
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
955
-                                           var presDatedb = presDatest.split(".")[0];
956
-                                           var presDatesc = presDatedb.split("T");
957
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
958
-                                           var sentMessageStatus = '';
959
-
960
-                                           if (displayname) {
961
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
962
-                                           } else { var msgToSendproc = ''; }
963
-
964
-                                           $("#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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
965
-
966
-                                           // Scroll down to the bottom of the window
967
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
968
-
969
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
970
-				     },
971
-				     error: function() {
972
-//				           alert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
973
-                                           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
974
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
975
-				     }
976
-				  });
977
-			  } else {
978
-//				  alert("Please enter a message in the text box!");
979
-                                  showAlert("Please enter a message in the text box!");
980
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
981
-			  }
982
-		      } else {
983
-//			      alert("Please choose a Sender ID from the 'From' drop-down list!");
984
-                              showAlert("Please choose a Sender ID from the 'From' drop-down list!");
985
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
986
-		      }
987
-
988
-                   });
989
-
990
-
991
-
992
-	           // Make the window draggable
993
-	           function makeMgrWndDraggable(e) {
994
-
995
-			   window.pmdragging = {};
996
-			   pmdragging.pageX0 = e.pageX;
997
-			   pmdragging.pageY0 = e.pageY;
998
-			   pmdragging.elem = $("#listAllMsgsFromTo");
999
-			   pmdragging.offset0 = $("#listAllMsgsFromTo").offset();
1000
-
1001
-			   function handle_dragging(e) {
1002
-			       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
1003
-			       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
1004
-			       $(pmdragging.elem).offset({top: top, left: left});
1005
-			   }
1006
-
1007
-			   function handle_mouseup(e) {
1008
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
1009
-			   }
1010
-
1011
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
1012
-	           }
1013
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
1014
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
1015
-
1016
-
1017
-                   // Append the available phone numbers to the From drop-down list
1018
-                   var availPhoneNmbrs = [];
1019
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
1020
-                      var crtphnmbr = $(this).attr("value");
1021
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
1022
-                   });
1023
-
1024
-                   if (availPhoneNmbrs.length > 0) {
1025
-                       var avphopt = "";
1026
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
1027
-//                            if (availPhoneNmbrs[d].indexOf(clckPhNumber) === -1) {
1028
-                            avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
1029
-//                            } else {
1030
-//                                  avphopt += "<option value='"+ availPhoneNmbrs[d] +"' selected>"+ availPhoneNmbrs[d] +"</option>";
1031
-//                            }
1032
-                       }
1033
-                       $("#selectFromNbConv").append(avphopt);
1034
-
1035
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
1036
-
1037
-
1038
-                   // Get the sent/received messages for the current phone number, from the database
1039
-		   var getGroupedPnUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedpernumber");
1040
-
1041
-		   $('#listAllMsgsFromTo').addClass('icon-loading');
1042
-		   var totalPhNmbrs = 0;
1043
-
1044
-		   $.ajax({
1045
-			  method: 'POST',
1046
-			  url: getGroupedPnUrl + '/' + userid,
1047
-			  contentType: 'application/json',
1048
-                          data: JSON.stringify({ phoneNumber: clckPhNumber }),
1049
-			  success: function(groupedpernb) {
1050
-
1051
-				     $('#listAllMsgsFromTo').removeClass('icon-loading');
1052
-
1053
-				     var fromtoNmbrsData = [];
1054
-
1055
-				     for (var i = 0; i < groupedpernb.length; i++) {
1056
-
1057
-					     if (groupedpernb[i].author_displayname) {
1058
-						 var authordnm = groupedpernb[i].author_displayname;
1059
-					     } else { 
1060
-						 //var authordnm = groupedpernb[i].user_id;
1061
-						 var authordnm = '';
1062
-					     }
1063
-
1064
-					     var sentfromnmbrarr = groupedpernb[i].from.split("+");
1065
-				             if (sentfromnmbrarr[1]) {
1066
-						 var groupednbfrom = "+"+ sentfromnmbrarr[1];
1067
-				             } else {
1068
-						 var groupednbfrom = sentfromnmbrarr[0];
1069
-				             }
1070
-
1071
-				             var modmessagerec = '';
1072
-				             if (groupedpernb[i].author_displayname) {
1073
-						 modmessagerec = "<span class='msgAuthorNameGrp'>"+ groupedpernb[i].author_displayname + ":</span>" + groupedpernb[i].message;
1074
-				             } else {
1075
-			                         modmessagerec = groupedpernb[i].message;
1076
-                                             }
1077
-
1078
-				             if (groupedpernb[i].to.indexOf(": ") > -1) {
1079
-				                 var groupednmbrtopre = groupedpernb[i].to.split(": ");
1080
-				                 var groupednmbrto = groupednmbrtopre[1];
1081
-				             } else { 
1082
-				                 var groupednmbrto = groupedpernb[i].to;
1083
-				             }
1084
-
1085
-				             fromtoNmbrsData.push({
1086
-				                       'author_displayname': authordnm,
1087
-				                       'from': groupednbfrom,
1088
-				                       'to': groupednmbrto,
1089
-				                       'message': modmessagerec,
1090
-				                       'date': groupedpernb[i].date,
1091
-				                       'status': groupedpernb[i].deliveryreceipt,
1092
-				                       'table': groupedpernb[i].table
1093
-				             });
1094
-				     }
1095
-
1096
-
1097
-				     // Remove the duplicates
1098
-				     var noDupMsgData = [];
1099
-				     $.each(fromtoNmbrsData, function(i, e) {
1100
-					    var matchingData = $.grep(noDupMsgData, function(item) {
1101
-				                    return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
1102
-					    });
1103
-					    if (matchingData.length === 0) {
1104
-						noDupMsgData.push(e);
1105
-					    }
1106
-				     });
1107
-
1108
-				     var messagesPerNmbr = {};
1109
-				     var msgsNamesPerNmbr = {};
1110
-				     var msgsNmbrsNames = {};
1111
-
1112
-			             var displayNamesarr = [];
1113
-			             var convData = [];
1114
-
1115
-			             for (var n = 0; n < noDupMsgData.length; n++) {
1116
-
1117
-			                  if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
1118
-
1119
-			                      convData.push({
1120
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
1121
-			                                     'message': noDupMsgData[n]['message'],
1122
-			                                     'from': noDupMsgData[n]['from'],
1123
-			                                     'to': noDupMsgData[n]['to'],
1124
-			                                     'date': noDupMsgData[n]['date'],
1125
-			                                     'direction': 'sent_from',
1126
-			                                     'status': noDupMsgData[n]['status'],
1127
-			                                     'table': noDupMsgData[n]['table']
1128
-			                      });
1129
-
1130
-			                  } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
1131
-
1132
-			                      convData.push({
1133
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
1134
-			                                     'message': noDupMsgData[n]['message'],
1135
-			                                     'from': noDupMsgData[n]['from'],
1136
-			                                     'to': noDupMsgData[n]['to'],
1137
-			                                     'date': noDupMsgData[n]['date'],
1138
-			                                     'direction': 'sent_to',
1139
-			                                     'status': noDupMsgData[n]['status'],
1140
-			                                     'table': noDupMsgData[n]['table']
1141
-			                      });
1142
-
1143
-
1144
-			                  } else if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
1145
-
1146
-			                      convData.push({
1147
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
1148
-			                                     'message': noDupMsgData[n]['message'],
1149
-			                                     'from': noDupMsgData[n]['from'],
1150
-			                                     'to': noDupMsgData[n]['to'],
1151
-			                                     'date': noDupMsgData[n]['date'],
1152
-			                                     'direction': 'received_from',
1153
-			                                     'status': noDupMsgData[n]['status'],
1154
-			                                     'table': noDupMsgData[n]['table']
1155
-			                      });
1156
-
1157
-			                  } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
1158
-
1159
-			                      convData.push({
1160
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
1161
-			                                     'message': noDupMsgData[n]['message'],
1162
-			                                     'from': noDupMsgData[n]['from'],
1163
-			                                     'to': noDupMsgData[n]['to'],
1164
-			                                     'date': noDupMsgData[n]['date'],
1165
-			                                     'direction': 'received_on',
1166
-			                                     'status': noDupMsgData[n]['status'],
1167
-			                                     'table': noDupMsgData[n]['table']
1168
-			                      });
1169
-			                  }
1170
-			             }
1171
-
1172
-			             // Sort messages by date
1173
-				     convData.sort(function(a, b) {
1174
-					var c = new Date(a.date);
1175
-					var d = new Date(b.date);
1176
-					return c-d;
1177
-				     });
1178
-                                     convData.reverse();
1179
-
1180
-			             // Collect the display names of the users that sent messages from the current number
1181
-			             var selectedNames = [];
1182
-			             var displayNames = '';
1183
-			             for (var v = 0; v < convData.length; v++) {
1184
-			                  if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
1185
-			                      selectedNames.push(convData[v]['author_displayname']);
1186
-			                      displayNames += "<div id='diplNm_"+ clckPhNumber +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
1187
-			                  }
1188
-			             }
1189
-			             displayNames += "<div id='diplNmAllMsg' class='dispNameListAll' title='Show all the messages for this number.'>"+ clckPhNumber +"</div>";
1190
-
1191
-			             // Store the display names for the current number, to be able to see them later
1192
-			             var ctPhNumber = clckPhNumber;
1193
-			             msgsNamesPerNmbr[ctPhNumber] = displayNames;
1194
-
1195
-			             // Store the messages sent by each user, to be able to see them later when clicking on the user's name
1196
-			             for (var h = 0; h < selectedNames.length; h++) {
1197
-
1198
-			                  var rowMessageArrpn = [];
1199
-			                  for (var b = 0; b < convData.length; b++) {
1200
-
1201
-			                       if (selectedNames[h] == convData[b]['author_displayname']) {
1202
-
1203
-					           if (convData[b]['direction'] == 'sent_from') {
1204
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
1205
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1206
-					               } else {
1207
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1208
-					               }
1209
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1210
-					           } else if (convData[b]['direction'] == 'sent_to') {
1211
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
1212
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1213
-					               } else {
1214
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1215
-					               }
1216
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1217
-					           } else if (convData[b]['direction'] == 'received_from') {
1218
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
1219
-					           } else if (convData[b]['direction'] == 'received_on') {
1220
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
1221
-			                           }
1222
-			                       }
1223
-			                  }
1224
-			                  var crtNmber = clckPhNumber;
1225
-			                  var crtName = selectedNames[h];
1226
-			                  msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
1227
-                                          msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
1228
-			             }
1229
-
1230
-                                     // The number of messages to be loaded by default
1231
-                                     var nmbTblDefault = 50;
1232
-
1233
-                                     // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
1234
-                                     if (convData.length > nmbTblDefault) {
1235
-                                         $("#loadMoreMsgs").css("display", "block");
1236
-                                         var nmbToBeLoaded = nmbTblDefault;
1237
-                                     } else { var nmbToBeLoaded = convData.length; }
1238
-
1239
-			             var rowMessageArr = [];
1240
-			             for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
1241
-
1242
-			                  if (convData[m]['direction'] == 'sent_from') {
1243
-
1244
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
1245
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1246
-			                      } else {
1247
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1248
-			                      }
1249
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1250
-
1251
-			                  } else if (convData[m]['direction'] == 'sent_to') {
1252
-
1253
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
1254
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1255
-			                      } else {
1256
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1257
-			                      }
1258
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1259
-
1260
-			                  } else if (convData[m]['direction'] == 'received_from') {
1261
-
1262
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1263
-
1264
-			                  } else if (convData[m]['direction'] == 'received_on') {
1265
-
1266
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1267
-			                  }
1268
-			             }
1269
-
1270
-			             var convDataPerNmbr = rowMessageArr.join("");
1271
-
1272
-                                     $("#grpdbynamelst").append(displayNames);
1273
-                                     $("#msgListRowCell").append(convDataPerNmbr);
1274
-
1275
-			             // Store the messages for the current number, to be able to see them later, when clicking on the number
1276
-			             var rowMessageArrcpt = [];
1277
-			             for (var m = 0; m < convData.length; m++) {
1278
-
1279
-			                  if (convData[m]['direction'] == 'sent_from') {
1280
-
1281
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
1282
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1283
-			                      } else {
1284
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1285
-			                      }
1286
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1287
-
1288
-			                  } else if (convData[m]['direction'] == 'sent_to') {
1289
-
1290
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
1291
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1292
-			                      } else {
1293
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1294
-			                      }
1295
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1296
-
1297
-			                  } else if (convData[m]['direction'] == 'received_from') {
1298
-
1299
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1300
-
1301
-			                  } else if (convData[m]['direction'] == 'received_on') {
1302
-
1303
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1304
-			                  }
1305
-			             }
1306
-
1307
-			             messagesPerNmbr[clckPhNumber] = rowMessageArrcpt;
1308
-
1309
-                                     // Scroll down to the bottom of the window
1310
-                                     $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
1311
-
1312
-                                     // Load more messages
1313
-                                     var clickNmb = 0;
1314
-                                     $("#loadMoreMsgs").click(function() {
1315
-
1316
-                                         clickNmb++;
1317
-
1318
-                                         var crefnb = (clickNmb + 1) * nmbToBeLoaded;
1319
-
1320
-                                         if (crefnb > convData.length) {
1321
-                                             var nmbmsg = convData.length - 1;
1322
-                                             $("#loadMoreMsgs").css("display", "none");
1323
-                                         } else { 
1324
-                                             var nmbmsg = crefnb - 1;
1325
-                                         }
1326
-
1327
-                                         var rowMessageArrAdd = [];
1328
-
1329
-                                         for (var m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
1330
-
1331
-			                      if (convData[m]['direction'] == 'sent_from') {
1332
-
1333
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
1334
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1335
-			                          } else {
1336
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1337
-			                          }
1338
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1339
-
1340
-			                      } else if (convData[m]['direction'] == 'sent_to') {
1341
-
1342
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
1343
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
1344
-			                          } else {
1345
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
1346
-			                          }
1347
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
1348
-
1349
-			                      } else if (convData[m]['direction'] == 'received_from') {
1350
-
1351
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1352
-
1353
-			                      } else if (convData[m]['direction'] == 'received_on') {
1354
-
1355
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
1356
-			                      }
1357
-                                         }
1358
-
1359
-			                 var convDataPerNmbrad = rowMessageArrAdd.join("");
1360
-
1361
-                                         var scrlheight = $("#msgListRowCell").height();
1362
-                                         $("#msgListRowCell").prepend(convDataPerNmbrad);
1363
-
1364
-                                         $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
1365
-                                     });
1366
-
1367
-
1368
-			             // Show the messages sent by each user whose name is clicked
1369
-			             $('[id*="diplNm_"]').click(function() {
1370
-
1371
-			                 var crntNmbr = $(this).attr("id").split("_")[1];
1372
-			                 var crntDisName = $(this).attr("name");                               
1373
-                                         $("#loadMoreMsgs").css("display", "none");
1374
-
1375
-                                         var convDataprn = [];
1376
-                                         $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
1377
-                                                convDataprn.push(item);
1378
-                                         });
1379
-
1380
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
1381
-                                         if (convDataprn.length > nmbTblDefault) {
1382
-                                             $("#loadMoreMsgsusr").css("display", "block");
1383
-                                             var nmbToBeLoaded = nmbTblDefault;
1384
-                                         } else {
1385
-                                             $("#loadMoreMsgsusr").css("display", "none");
1386
-                                             var nmbToBeLoaded = convDataprn.length;
1387
-                                         }
1388
-
1389
-			                 var rowMessageArrprnst = [];
1390
-
1391
-			                 for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
1392
-                                              rowMessageArrprnst.push(convDataprn[n]);
1393
-			                 }
1394
-
1395
-			                 var convDataPerNmbrprnst = rowMessageArrprnst.join("");
1396
-
1397
-                                         $("#msgListRowCell").empty();
1398
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
1399
-
1400
-                                         // Scroll down to the bottom of the window
1401
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
1402
-
1403
-                                         // Load more messages
1404
-                                         var clckNb = 0;
1405
-                                         $("#loadMoreMsgsusr").unbind("click");
1406
-                                         $("#loadMoreMsgsusr").click(function() {
1407
-
1408
-                                             clckNb++;
1409
-                                             var crefnb = (clckNb + 1) * nmbToBeLoaded;
1410
-
1411
-                                             $("#loadMoreMsgs").css("display", "none");
1412
-
1413
-                                             if (crefnb > convDataprn.length) {
1414
-                                                 var nmbmsg = convDataprn.length - 1;
1415
-                                                 $("#loadMoreMsgsusr").css("display", "none");
1416
-                                             } else { 
1417
-                                                 var nmbmsg = crefnb - 1;
1418
-                                                 $("#loadMoreMsgsusr").css("display", "block");
1419
-                                             }
1420
-
1421
-                                             var rowMessageArrAddst = [];
1422
-
1423
-                                             for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
1424
-
1425
-                                                  rowMessageArrAddst.push(convDataprn[q]);
1426
-                                             }
1427
-
1428
-			                     var convDataPerNmbradst = rowMessageArrAddst.join("");
1429
-
1430
-                                             var scrlheight = $("#msgListRowCell").height();
1431
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
1432
-
1433
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
1434
-                                         });
1435
-
1436
-
1437
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
1438
-			                 $("#diplNmAllMsg").css("color", "#04957b");
1439
-			                 $(this).css("color", "#1b8efe");
1440
-			             });
1441
-
1442
-
1443
-			             // Show again all the messages sent/received to/from the clicked number
1444
-			             $("#diplNmAllMsg").click(function() {
1445
-
1446
-                                         $("#loadMoreMsgsusr").css("display", "none");
1447
-
1448
-                                         var convDataprn = [];
1449
-                                         $.each(messagesPerNmbr[clckPhNumber], function(index, item) {
1450
-                                                convDataprn.push(item);
1451
-                                         });
1452
-
1453
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
1454
-                                         if (convDataprn.length > nmbTblDefault) {
1455
-                                             $("#loadMoreMsgs").css("display", "block");
1456
-                                             var nmbToBeLoaded = nmbTblDefault;
1457
-                                         } else {
1458
-                                             $("#loadMoreMsgs").css("display", "none");
1459
-                                             var nmbToBeLoaded = convDataprn.length;
1460
-                                         }
1461
-
1462
-
1463
-			                 var rowMessageArrprnst = [];
1464
-
1465
-			                 for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
1466
-                                              rowMessageArrprnst.push(convDataprn[n]);
1467
-			                 }
1468
-
1469
-			                 var convDataPerNmbrprnst = rowMessageArrprnst.join("");
1470
-
1471
-                                         $("#msgListRowCell").empty();
1472
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
1473
-
1474
-                                         // Scroll down to the bottom of the window
1475
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
1476
-
1477
-
1478
-                                         // Load more messages
1479
-                                         var clckNb = 0;
1480
-                                         $("#loadMoreMsgsusr").unbind("click");
1481
-                                         $("#loadMoreMsgsusr").click(function() {
1482
-
1483
-                                             clckNb++;
1484
-                                             var crefnb = (clckNb + 1) * nmbToBeLoaded;
1485
-
1486
-                                             $("#loadMoreMsgs").css("display", "none");
1487
-
1488
-                                             if (crefnb > convDataprn.length) {
1489
-                                                 var nmbmsg = convDataprn.length - 1;
1490
-                                                 $("#loadMoreMsgsusr").css("display", "none");
1491
-                                             } else { 
1492
-                                                 var nmbmsg = crefnb - 1;
1493
-                                                 $("#loadMoreMsgsusr").css("display", "block");
1494
-                                             }
1495
-
1496
-                                             var rowMessageArrAddst = [];
1497
-
1498
-                                             for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
1499
-
1500
-                                                  rowMessageArrAddst.push(convDataprn[q]);
1501
-                                             }
1502
-
1503
-			                     var convDataPerNmbradst = rowMessageArrAddst.join("");
1504
-
1505
-                                             var scrlheight = $("#msgListRowCell").height();
1506
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
1507
-
1508
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
1509
-                                         });
1510
-
1511
-
1512
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
1513
-			                 $("#diplNmAllMsg").css("color", "#04957b");
1514
-			                 $(this).css("color", "#04c6a4");
1515
-
1516
-			             });
1517
-
1518
-
1519
-				     // Show the scroll-up arrow
1520
-				     $("#frmMsgLstWrap").scroll(function() {
1521
-					if ($(this).scrollTop() > 900) {
1522
-					      $('#upArrowSmall').fadeIn();
1523
-					} else {
1524
-					      $('#upArrowSmall').fadeOut();
1525
-					}
1526
-				     });
1527
-
1528
-				     $("#upArrowSmall").click(function() {
1529
-					$("#frmMsgLstWrap").animate({scrollTop : 0},400);
1530
-				     });
1531
-
1532
-			  },
1533
-			  error: function() {
1534
-//				     alert("Error while attempting to get message data from the database!");
1535
-                                     showAlert("Error while attempting to get message data from the database!");
1536
-				     $('#listAllMsgsFromTo').removeClass('icon-loading');
1537
-			  }
1538
-		   });
1539
-                }
1540
-
1541
-                $('[id^="showMsgFrom-"]').click(function() {
1542
-
1543
-                   var ctrwnb = $(this).attr("id").replace("showMsgFrom-", "");
1544
-                   var clckPhNumber = $("#frmNmbr-"+ ctrwnb).text();
1545
-
1546
-                   showMsgPerNmbr(clckPhNumber);
1547
-                })
1548
-
1549
-                $('[id^="showMsgTo-"]').click(function() {
1550
-                   var ctrwnbTo = $(this).attr("id").replace("showMsgTo-", "");
1551
-                   if ($("#toNmbr-"+ ctrwnbTo).text().indexOf(":") > -1) {
1552
-                       var clckPhNbTo = $("#toNmbr-"+ ctrwnbTo).text().split(": ")[1];
1553
-                   } else { var clckPhNbTo = $("#toNmbr-"+ ctrwnbTo).text(); };
1554
-
1555
-                   showMsgPerNmbr(clckPhNbTo);
1556
-                })
1557
-
1558
-                // Show the pop-up window for adding a Display Name to the 'From' numbers of unknown senders
1559
-                $('[id^="addDispName-"]').click(function() {
1560
-
1561
-                   var crrownb = $(this).attr("id").replace("addDispName-", "");
1562
-                   var slctPhoneNb = $("#frmNmbr-"+ crrownb).text();
1563
-
1564
-                   var addDNameWindow = "<div id='disNameWindow'>";
1565
-                   addDNameWindow += "<div id='dragDispNmWindow'><img src='/apps/sms_relentless/img/dots.svg'></div>";
1566
-                   addDNameWindow += "<a id='closeDisNmWindow' title='Close this window'></a>";
1567
-                   addDNameWindow += "<div style='display:block;text-align:left;font-size:16px;margin:14px 22px 0px 22px;color:#353535;'>This phone number was not mentioned on the 'Profile info' page of any Nextcloud user. If it's an external 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>";
1568
-                   addDNameWindow += "<div style='display:block;text-align:center;color:#49B382;font-size:16px;font-weight:500;margin:6px 0px 10px 0px;'>"+ slctPhoneNb +"</div>";
1569
-                   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;'>";
1570
-                   addDNameWindow += "<input type='submit' id='saveDispName' value='Save'>";
1571
-                   addDNameWindow += "</div>";
1572
-
1573
-                   $("#content").append("<div id='recTblOverlay'></div>");
1574
-                   $("#content").append(addDNameWindow);
1575
-
1576
-                   var topNmDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
1577
-                   var leftNmDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
1578
-                   $("#disNameWindow").css({ "top" : topNmDist, "left" : leftNmDist });
1579
-
1580
-                   $("#closeDisNmWindow").click(function() { $("#disNameWindow").remove(); $("#recTblOverlay").remove(); });
1581
-                   $("#recTblOverlay").click(function() { $("#disNameWindow").remove(); $("#recTblOverlay").remove(); });
1582
-
1583
-
1584
-	           // Make the window draggable
1585
-	           function makeMgrWndDraggable(e) {
1586
-
1587
-			   window.pmdragging = {};
1588
-			   pmdragging.pageX0 = e.pageX;
1589
-			   pmdragging.pageY0 = e.pageY;
1590
-			   pmdragging.elem = $("#disNameWindow");
1591
-			   pmdragging.offset0 = $("#disNameWindow").offset();
1592
-
1593
-			   function handle_dragging(e) {
1594
-			       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
1595
-			       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
1596
-			       $(pmdragging.elem).offset({top: top, left: left});
1597
-			   }
1598
-
1599
-			   function handle_mouseup(e) {
1600
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
1601
-			   }
1602
-
1603
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
1604
-	           }
1605
-	           $("#dragDispNmWindow").mousedown(makeMgrWndDraggable);
1606
-
1607
-                   // Save the Display Name
1608
-                   $("#saveDispName").click(function() {
1609
-
1610
-                      var dispNmText = $("#saveDispNmText").val();
1611
-
1612
-                      if (/^[a-zA-Z0-9\s\-\/\.\)\(\']+$/.test(dispNmText) && dispNmText.length < 256) {
1613
-
1614
-                             var saveDispNameUrl = OC.generateUrl("/apps/sms_relentless/user/savedisplayname");
1615
-
1616
-			     $.ajax({
1617
-				  url: saveDispNameUrl + '/' + userid,
1618
-				  method: 'POST',
1619
-				  dataType:'text',
1620
-                                  data: { 
1621
-                                          authorDisplayname: dispNmText,
1622
-                                          from: slctPhoneNb
1623
-                                         },
1624
-				  success: function(respupdname) {
1625
-//                                               alert(respupdname);
1626
-                                               showAlert(respupdname);
1627
-                                               $("#disNameWindow").remove();
1628
-                                               $("#recTblOverlay").remove();
1629
-                                  },
1630
-				  error: function() {
1631
-//                                               alert("Error while attempting to save the new Display Name to the database.");
1632
-                                               showAlert("Error while attempting to save the new Display Name to the database.");
1633
-                                               $("#disNameWindow").remove();
1634
-                                               $("#recTblOverlay").remove();
1635
-                                  }
1636
-			     });
1637
-
1638
-                      } else {
1639
-//                             alert("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.");
1640
-                              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.");
1641
-                      }
1642
-                   });
1643
-
1644
-                });
1645
-
1646
-
1647
-                // Add pagination
1648
-                var rowsShown = messagesperpage;
1649
-                var rowsTotal = $("#recSmsTable tr").length;
1650
-
1651
-                var numPages = (rowsTotal - 2) / rowsShown;
1652
-
1653
-                for (i = 0; i < numPages; i++) {
1654
-                     var pageNum = i + 1;
1655
-                     $('#paginationrec').append('<a href="#" rel="' + i + '" class="pagenumbersrec">' + pageNum + '</a> ');
1656
-                }
1657
-
1658
-                $('#paginationrec').children(":first").addClass('active');
1659
-
1660
-//                $(".receivedrowsbody").hide();
1661
-
1662
-                $('#paginationrec a:first').addClass('active');
1663
-
1664
-                // Show table page when clicking a page number
1665
-                $('.recpages a').bind('click', function() {
1666
-
1667
-                   $('#paginationrec').children().removeClass('active');
1668
-
1669
-                   $(this).addClass('active');
1670
-
1671
-                   var currentPageNo = $(this).text();
1672
-
1673
-                   $('#paginationrec a').each(function() {
1674
-                       if ($(this).text() == currentPageNo) {
1675
-                           $(this).addClass('active');
1676
-                       }
1677
-                   });
1678
-
1679
-                   // Sort table rows
1680
-		   var rows = $('#recSmsTable tr').get();
1681
-
1682
-		   rows.sort(function(a, b) {
1683
-
1684
-		        var A = parseInt($('td.dbidcolumnrec', a).text());
1685
-		        var B = parseInt($('td.dbidcolumnrec', b).text());
1686
-
1687
-		        if (A < B) {
1688
-		            return -1;
1689
-		        }
1690
-
1691
-		        if (A > B) {
1692
-		            return 1;
1693
-		        }
1694
-
1695
-		        return 0;
1696
-		   });
1697
-
1698
-		   $.each(rows, function(index, row) {
1699
-		      $('#recSmsTable').append(row);
1700
-		   });
1701
-
1702
-                   var currPage = $(this).attr('rel');
1703
-                   var startItem = currPage * rowsShown;
1704
-                   var endItem = startItem + rowsShown;
1705
-
1706
-                   $(".receivedrowsbody").hide().slice(startItem, endItem).css('display', 'table-row');
1707
-
1708
-                   $('#totalrecmessages').remove();
1709
-                   $('#smstables').append("<div id='totalrecmessages'>Total displayed messages: " + parseddata.length + "</div>");
1710
-                });
1711
-
1712
-                $('#paginationrec').children(":last").trigger('click');
1713
-
1714
-                // Select all records
1715
-                $('#selectAllChckbx').change(function() {
1716
-                  if ($(this).is(':checked')) {
1717
-                       $(".indivchckbx").prop("checked", true);
1718
-                  } else {
1719
-                       $(".indivchckbx").prop("checked", false);
1720
-                  }
1721
-                });
1722
-
1723
-                function reorderRecRows() {
1724
-                   var currenttext = $(".filterbuttonsrec").closest('[class="filterbuttonsrec"]').find('[class="indivfilterrec"]').text();
1725
-                   if (currenttext == '') {
1726
-                       $('tr').sort(function (a, b) {
1727
-                          return parseInt($('td.dbidcolumnrec', b).text()) < parseInt($('td.dbidcolumnrec', a).text());
1728
-                       }).appendTo("#recSmsTable");
1729
-                   }
1730
-                }
1731
-
1732
-                // Filter rows
1733
-                $("#databaseidfilter").on("click", function(event) {
1734
-
1735
-                      var databaseId = $("#dbidtextrec").val();
1736
-                      var msgrowsNo = 0;
1737
-
1738
-                      $(".receivedrowsbody").each(function() {
1739
-
1740
-                          var checkrecEmpty1 = 0;
1741
-                          $(".indivfilterrec").not("#dbidtextrec").each(function() {
1742
-                              if ($(this).val() != '') {
1743
-                                  checkrecEmpty1 = 1;
1744
-                              }
1745
-                          });
1746
-
1747
-                          if (checkrecEmpty1 == 0) {
1748
-                              $(this).show();
1749
-                          }
1750
-
1751
-                          if (databaseId != '') {
1752
-                             if ($(this).find('[class="dbidcolumnrec"]').text() == databaseId) {
1753
-                                $("#recSmsTable").append(this);
1754
-                                if ($(this).is(":visible")) { msgrowsNo++; }
1755
-                             } else {
1756
-                                $(this).hide();
1757
-                             }
1758
-                          } else {
1759
-                                $(this).show();
1760
-                                msgrowsNo++;
1761
-                          }
1762
-                      });
1763
-
1764
-                      reorderRecRows();
1765
-                      $('#totalrecmessages').remove();
1766
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
1767
-                });
1768
-
1769
-
1770
-                $("#useridfilter").on("click", function(event) {
1771
-
1772
-                      var useridtxt = $("#useridtextrec").val().toLowerCase();
1773
-                      var msgrowsNo = 0;
1774
-
1775
-                      $(".receivedrowsbody").each(function() {
1776
-
1777
-                          var checkrecEmpty2 = 0;
1778
-                          $(".indivfilterrec").not("#useridtextrec").each(function() {
1779
-                              if ($(this).val() != '') {
1780
-                                  checkrecEmpty2 = 1;
1781
-                              }
1782
-                          });
1783
-
1784
-                          if (checkrecEmpty2 == 0) {
1785
-                              $(this).show();
1786
-                          }
1787
-
1788
-                          if (useridtxt != '') {
1789
-                             var useridfound = $(this).find('[class="useridcolrec"]').text().toLowerCase();
1790
-                             if(useridfound.indexOf(useridtxt) != -1) {
1791
-                                $("#recSmsTable").append(this);
1792
-                                if ($(this).is(":visible")) { msgrowsNo++; }
1793
-                             } else {
1794
-                                $(this).hide();
1795
-                             }
1796
-                          } else {
1797
-                                $(this).show();
1798
-                                msgrowsNo++;
1799
-                          }
1800
-                      });
1801
-
1802
-                      reorderRecRows();
1803
-                      $('#totalrecmessages').remove();
1804
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
1805
-
1806
-                });
1807
-
1808
-                $("#messageidfilter").on("click", function(event) {
1809
-
1810
-                      var messageidtxt = $("#messageidtextrec").val().toLowerCase();
1811
-                      var msgrowsNo = 0;
1812
-
1813
-                      $(".receivedrowsbody").each(function() {
1814
-
1815
-                          var checkrecEmpty3 = 0;
1816
-                          $(".indivfilterrec").not("#messageidtextrec").each(function() {
1817
-                              if ($(this).val() != '') {
1818
-                                  checkrecEmpty3 = 1;
1819
-                              }
1820
-                          });
1821
-
1822
-                          if (checkrecEmpty3 == 0) {
1823
-                              $(this).show();
1824
-                          }
1825
-
1826
-                          if (messageidtxt != '') {
1827
-                             var foundtdmssgid = $(this).find('[class="messageidcolrec"]').text().toLowerCase();
1828
-                             if (foundtdmssgid.indexOf(messageidtxt) != -1) {
1829
-                                $("#recSmsTable").append(this);
1830
-                                if ($(this).is(":visible")) { msgrowsNo++; }
1831
-                             } else {
1832
-                                $(this).hide();
1833
-                             }
1834
-                          } else {
1835
-                                $(this).show();
1836
-                                msgrowsNo++;
1837
-                          }
1838
-                      });
1839
-
1840
-                      reorderRecRows();
1841
-                      $('#totalrecmessages').remove();
1842
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
1843
-                });
1844
-
1845
-                $("#datefilter").on("click", function(event) {
1846
-
1847
-                      var datetxtvr = $("#datetextrec").val().toLowerCase();
1848
-                      var msgrowsNo = 0;
1849
-
1850
-                      $(".receivedrowsbody").each(function() {
1851
-
1852
-                          var checkrecEmpty4 = 0;
1853
-                          $(".indivfilterrec").not("#datetextrec").each(function() {
1854
-                              if ($(this).val() != '') {
1855
-                                  checkrecEmpty4 = 1;
1856
-                              }
1857
-                          });
1858
-
1859
-                          if (checkrecEmpty4 == 0) {
1860
-                              $(this).show();
1861
-                          }
1862
-
1863
-                          if (datetxtvr != '') {
1864
-                              var founddate = $(this).find('[class="datecolrec"]').text().toLowerCase();
1865
-                              if (founddate.indexOf(datetxtvr) != -1) {
1866
-                                  $("#recSmsTable").append(this);
1867
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
1868
-                              } else {
1869
-                                  $(this).hide();
1870
-                              }
1871
-                          } else {
1872
-                                  $(this).show();
1873
-                                  msgrowsNo++;
1874
-                          }
1875
-                      });
1876
-
1877
-                      reorderRecRows();
1878
-                      $('#totalrecmessages').remove();
1879
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
1880
-                });
1881
-
1882
-                $("#fromfilter").on("click", function(event) {
1883
-
1884
-                      var fromtxtvr = $("#fromtextrec").val().toLowerCase();
1885
-                      var msgrowsNo = 0;
1886
-
1887
-                      $(".receivedrowsbody").each(function() {
1888
-
1889
-                          var checkrecEmpty5 = 0;
1890
-                          $(".indivfilterrec").not("#fromtextrec").each(function() {
1891
-                              if ($(this).val() != '') {
1892
-                                  checkrecEmpty5 = 1;
1893
-                              }
1894
-                          });
1895
-
1896
-                          if (checkrecEmpty5 == 0) {
1897
-                              $(this).show();
1898
-                          }
1899
-
1900
-                          if (fromtxtvr != '') {
1901
-                             var foundfrom = $(this).find('[class="fromcolumnrec"]').text().toLowerCase();
1902
-                             if (foundfrom.indexOf(fromtxtvr) != -1) {
1903
-                                 $("#recSmsTable").append(this);
1904
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
1905
-                             } else {
1906
-                                 $(this).hide();
1907
-                             }
1908
-                          } else {
1909
-                                 $(this).show();
1910
-                                 msgrowsNo++;
1911
-                          }
1912
-                      });
1913
-
1914
-                      reorderRecRows();
1915
-                      $('#totalrecmessages').remove();
1916
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
1917
-                });
1918
-
1919
-                $("#tofilter").on("click", function(event) {
1920
-
1921
-                      var totxtvr = $("#totextrec").val().toLowerCase();
1922
-                      var msgrowsNo = 0;
1923
-
1924
-                      $(".receivedrowsbody").each(function() {
1925
-
1926
-                          var checkrecEmpty6 = 0;
1927
-                          $(".indivfilterrec").not("#totextrec").each(function() {
1928
-                              if ($(this).val() != '') {
1929
-                                  checkrecEmpty6 = 1;
1930
-                              }
1931
-                          });
1932
-
1933
-                          if (checkrecEmpty6 == 0) {
1934
-                              $(this).show();
1935
-                          }
1936
-
1937
-                          if (totxtvr != '') {
1938
-                             var foundto = $(this).find('[class="tocolrec"]').text().toLowerCase();
1939
-                             if (foundto.indexOf(totxtvr) != -1) {
1940
-                                 $("#recSmsTable").append(this);
1941
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
1942
-                             } else {
1943
-                                 $(this).hide();
1944
-                             }
1945
-                          } else {
1946
-                                 $(this).show();
1947
-                                 msgrowsNo++;
1948
-                          }
1949
-                      });
1950
-
1951
-                      reorderRecRows();
1952
-                      $('#totalrecmessages').remove();
1953
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
1954
-                });
1955
-
1956
-                $("#messagefilter").on("click", function(event) {
1957
-
1958
-                      var messagetxtvr = $("#messagetextrec").val().toLowerCase();
1959
-                      var msgrowsNo = 0;
1960
-
1961
-                      $(".receivedrowsbody").each(function() {
1962
-
1963
-                          var checkrecEmpty7 = 0;
1964
-                          $(".indivfilterrec").not("#messagetextrec").each(function() {
1965
-                              if ($(this).val() != '') {
1966
-                                  checkrecEmpty7 = 1;
1967
-                              }
1968
-                          });
1969
-
1970
-                          if (checkrecEmpty7 == 0) {
1971
-                              $(this).show();
1972
-                          }
1973
-
1974
-                          if (messagetxtvr != '') {
1975
-                             var foundmessage = $(this).find('[class="messagecolumnrec"]').text().toLowerCase();
1976
-                             if (foundmessage.indexOf(messagetxtvr) != -1) {
1977
-                                $("#recSmsTable").append(this);
1978
-                                if ($(this).is(":visible")) { msgrowsNo++; }
1979
-                             } else {
1980
-                                $(this).hide();
1981
-                             }
1982
-                          } else {
1983
-                                $(this).show();
1984
-                                msgrowsNo++;
1985
-                          }
1986
-                      });
1987
-
1988
-                      reorderRecRows();
1989
-                      $('#totalrecmessages').remove();
1990
-                      $('#smstables').append("<div id='totalrecmessages'>Total filtered messages: " + msgrowsNo + "</div>");
1991
-               });
1992
-
1993
-               // Clear all filters
1994
-               $("#clearrecfilters").on("click", function(event) {
1995
-                      $(".receivedrowsbody").each(function() {
1996
-                          $(this).show();
1997
-                      });
1998
-                      $(".indivfilterrec").val("");
1999
-                      $('#totalrecmessages').remove();
2000
-                      $('#smstables').append("<div id='totalrecmessages'>Total displayed messages: " + parseddata.length + "</div>");
2001
-               });
2002
-
2003
-               // Delete selected rows from the database
2004
-               $("#deleterecrows").on("click", function() {
2005
-                  var checkcheckbx = jQuery("#recSmsTable input[type=checkbox]:checked").length;
2006
-                  if (checkcheckbx == 0) {
2007
-//                     alert("Please select the row(s) to permanently delete from the database !");
2008
-                     showAlert("Please select the row(s) to permanently delete from the database !");
2009
-                  } else {
2010
-                          var checkboxIds = [];
2011
-                          $(".receivedrowsbody").each(function() {
2012
-                             var rowcheckbx = $(this).find('input[type="checkbox"]');
2013
-                             if (rowcheckbx.is(":checked")) {
2014
-                                 var dbrowid = $(this).find('[class="dbidcolumnrec"]').text();
2015
-                                 checkboxIds.push(dbrowid);
2016
-                             }
2017
-                          });
2018
-
2019
-                          if (confirm("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'.")) {
2020
-
2021
-                              var deleterecRowsUrl = OC.generateUrl("/apps/sms_relentless/user/removerecrows");
2022
-                              $('#smstables').addClass('icon-loading');
2023
-
2024
-                              $.ajax({
2025
-                                   url: deleterecRowsUrl + '/' + userid,
2026
-                                   method: "POST",
2027
-                                   dataType:'text',
2028
-                                   data: {recmessagedbIDs: checkboxIds},
2029
-                                   success: function() {
2030
-//                                            alert("The row(s) have been deleted successfully !");
2031
-                                            showAlert("The row(s) have been deleted successfully !");
2032
-                                            $('#smstables').removeClass('icon-loading');
2033
-                                            $('#receivedsmstableshow').click();
2034
-                                   },
2035
-                                   error: function() {
2036
-//                                            alert("There was an error while deleting the selected row(s) !");
2037
-                                            showAlert("There was an error while deleting the selected row(s) !");
2038
-                                            $('#smstables').removeClass('icon-loading');
2039
-                                   }
2040
-                              });
2041
-                          }
2042
-                  }
2043
-               });
2044
-
2045
-
2046
-               // Show/Hide filter row
2047
-	       $('#recarrow').on('click', function() {
2048
-	          if ($('#recfiltersrow').is(':visible')) {
2049
-		      $('#recfiltersrow').hide();
2050
-                      $('#recheaderrow').css('top', '0px');
2051
-                      $(this).removeClass('arrowUpCl');
2052
-                      $(this).addClass('arrowDownCl');
2053
-		  } else {
2054
-		      $('#recfiltersrow').show();
2055
-                      $('#recheaderrow').css('top', '158px');
2056
-                      $(this).removeClass('arrowDownCl');
2057
-                      $(this).addClass('arrowUpCl');
2058
-                  }
2059
-               });
2060
-
2061
-               $("#app-content").animate({scrollTop:$("#recSmsTable").prop("scrollHeight")},200);
2062
-          },
2063
-          error: function(recdatafromdb) {
2064
-//                      alert("Error. You can check the Nextcloud log to find more details about this issue.");
2065
-                      showAlert("Error. You can check the Nextcloud log to find more details about this issue.");
2066
-                      $('#smstables').removeClass('icon-loading');
2067
-          }
2068
-     });
2069
-
2070
-  });
2071
-
2072
-
2073
-  // List sent messages
2074
-  $("#sentsmstableshow").on("click", function(event) {
2075
-
2076
-     $('#smstables').empty();
2077
-
2078
-     var getSentUrl = OC.generateUrl("/apps/sms_relentless/user/getsenttable");
2079
-     $('#smstables').addClass('icon-loading');
2080
-
2081
-     $.ajax({
2082
-          url: getSentUrl + '/' + userid,
2083
-          method: "GET",
2084
-          contentType: 'application/json',
2085
-//          success: function(sentparseddata) {
2086
-          success: function(sentdatafdb) {
2087
-
2088
-                var sentparseddata = sentdatafdb.datarows;
2089
-
2090
-                $('#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>");
2091
-                $('#smstables').append("<table id='sentSmsTable'></table>");
2092
-                $('#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>");
2093
-                $('#sentSmsTable').append("<tr class='sentrows' id='sentheaderrow'><th id='selectalldv' class='selectsmsdv'><input type='checkbox' id='selectAllChckbx' class ='indivchckbx' title='Select all rows.' /></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 title='When a 5 or 6 digits code appears in this column, the first 3 digits specify the mobile country code and the last 2 or 3 digits specify the mobile network code of the receiver. You can look up the mobile country code and then the mobile network code on https://en.wikipedia.org/wiki/Mobile_country_code#National_operators'>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>");
2094
-
2095
-                $('#sentfiltersrow').hide();
2096
-
2097
-                if (sentdatafdb.showdispnm == 1) {
2098
-
2099
-                    for (var i = 0; i < sentparseddata.length; i++) {
2100
-
2101
-                         if (sentparseddata[i].author_displayname) {
2102
-                             var procmessage = "<span class='messageAuthorName'>"+ sentparseddata[i].author_displayname + ":</span>" + sentparseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/apps/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
2103
-                         } else {
2104
-                             var procmessage = sentparseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/apps/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
2105
-                         }
2106
-
2107
-                         var procsentFrom = "<div id='frmNmbr-"+ i +"'>"+ sentparseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/apps/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>";
2108
-
2109
-                         var procsentTo = "<div id='toNmbr-"+ i +"'>"+ sentparseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/apps/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>";
2110
-
2111
-                         $('#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'>"+ sentparseddata[i].network +"</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>");
2112
-                    }
2113
-
2114
-                } else {
2115
-
2116
-                         var procmessage = sentparseddata[i].message +"<div id='showMsgConv-"+ i +"' class='lstMsgConv'><img class='lstMsgConvImg' src='/apps/sms_relentless/img/reply.svg' title='Show all the messages exchanged between the current 2 phone numbers.'></div>";
2117
-
2118
-                         var procsentFrom = "<div id='frmNmbr-"+ i +"'>"+ sentparseddata[i].from +"<div id='showMsgFrom-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/apps/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>";
2119
-
2120
-                         var procsentTo = "<div id='toNmbr-"+ i +"'>"+ sentparseddata[i].to +"<div id='showMsgTo-"+ i +"' class='listToFromMsgs'><img class='lstMsgToFromImg' src='/apps/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>";
2121
-
2122
-                         $('#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'>"+ sentparseddata[i].network +"</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>");
2123
-                }
2124
-
2125
-                $('#smstables').append("<div id='totalsentmessages'><span>Total displayed messages: " + sentparseddata.length + "</span></div>");
2126
-
2127
-                $('#smstables').removeClass('icon-loading');
2128
-
2129
-                $('#sentarrow').removeClass('arrowUpCl');
2130
-                $('#sentarrow').addClass('arrowDownCl');
2131
-
2132
-
2133
-                // Show the pop-up window that lists all the messages exchanged between the current 2 phone numbers
2134
-                function showSentMsgPerConv(phNumberFrom, phNumberTo) {
2135
-
2136
-                   let allfrmtomsg = "<div id='listAllMsgsConv'>";
2137
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/apps/sms_relentless/img/dots.svg'></div>";
2138
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
2139
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages exchanged between <span style='color:#04957b'>"+ phNumberFrom +"</span> and <span style='color:#04957b'>"+ phNumberTo +"</span></div>";
2140
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
2141
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
2142
-                   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='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
2143
-                   allfrmtomsg += "</table></div>";
2144
-                   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>";
2145
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS'></textarea></td></tr></table>";
2146
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
2147
-                   allfrmtomsg += "<div style='display:block;width:100%;height:14px;'><img id='expandWindowRpl' src='/apps/sms_relentless/img/arrowDown.svg' title='Expand to send a reply'></div>";
2148
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/apps/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;'></div>";
2149
-                   allfrmtomsg += "</div>";
2150
-
2151
-                   $("#content").append("<div id='recTblOverlay'></div>");
2152
-                   $("#content").append(allfrmtomsg);
2153
-
2154
-                   let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
2155
-                   let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
2156
-                   $("#listAllMsgsConv").css({ "top" : topDist, "left" : leftDist });
2157
-
2158
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
2159
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsConv").remove(); $("#recTblOverlay").remove(); });
2160
-
2161
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
2162
-	           $("#expandWindowRpl").click(function() {
2163
-
2164
-	              if ($(this).attr('src') == '/apps/sms_relentless/img/arrowDown.svg') {
2165
-                          $("#sendMsgReply").css("display", "block");
2166
-                          $("#listAllMsgsConv").css("height", "618px");
2167
-	                  $(this).attr('src', '/apps/sms_relentless/img/arrowUp.svg');
2168
-                          $(this).attr('title', 'Collapse');
2169
-	              } else {
2170
-                          $("#sendMsgReply").css("display", "none");
2171
-                          $("#listAllMsgsConv").css("height", "490px");
2172
-                          $(this).attr('src', '/apps/sms_relentless/img/arrowDown.svg');
2173
-                          $(this).attr('title', 'Expand to send a reply');
2174
-	              }
2175
-	           });
2176
-
2177
-                   // Send a message from the 'conversation' window
2178
-                   $("#sendMsgConvBtn").click(function() {
2179
-
2180
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
2181
-                      var msgToSend = $("#sendMsgConvText").val();
2182
-                      var selectedid = $("#selectFromNbConv").val();
2183
-                      var toNumber = $("#toNmbrConv").text();
2184
-                      var receiversNumbers = [toNumber];
2185
-
2186
-		      if (selectedid != '') { 
2187
-
2188
-			  var sendersplit = selectedid.split(":");
2189
-			  var providercap = sendersplit[0];
2190
-			  var provsec = sendersplit[1];
2191
-
2192
-			  if (/[a-zA-Z]/.test(provsec)) {
2193
-			      var alphanumcheck = true;
2194
-			  } else { var alphanumcheck = false; }
2195
-
2196
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
2197
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2198
-			      var selectedsender = "+" + senderproc;
2199
-			      var providerUsed = "telnyx";
2200
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
2201
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
2202
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
2203
-			      var providerUsed = "plivo";
2204
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
2205
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
2206
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2207
-			      var selectedsender = "+" + senderproc;
2208
-			      var providerUsed = "twilio";
2209
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
2210
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
2211
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2212
-			      var selectedsender = "+" + senderproc;
2213
-			      var providerUsed = "flowroute";
2214
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
2215
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
2216
-			      var selectedsender = provsec;
2217
-			      var providerUsed = "telnyx";
2218
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
2219
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
2220
-			      var selectedsender = provsec;
2221
-			      var providerUsed = "plivo";
2222
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
2223
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
2224
-			      var selectedsender = provsec;
2225
-			      var providerUsed = "twilio";
2226
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
2227
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
2228
-			      var selectedsender = provsec;
2229
-			      var providerUsed = "flowroute";
2230
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
2231
-			  }
2232
-
2233
-                          var uploadedtomms = [];
2234
-
2235
-	                  if (msgToSend != '') {
2236
-
2237
-				  $.ajax({
2238
-				     url: relbaseUrl + '/' + userid,
2239
-				     type: "POST",
2240
-				     data: {
2241
-				           receiversPhoneNbs: receiversNumbers,
2242
-				           fromsender: selectedsender,
2243
-				           waitinterval: 1000,
2244
-				           sentsmstext: msgToSend,
2245
-				           ismms: 0,
2246
-				           mmsfiles: uploadedtomms
2247
-				         },
2248
-				     success: function(displayname) {
2249
-
2250
-                                           var tzdate = new Date();
2251
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
2252
-                                           var presDatedb = presDatest.split(".")[0];
2253
-                                           var presDatesc = presDatedb.split("T");
2254
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
2255
-                                           var sentMessageStatus = '';
2256
-
2257
-                                           if (displayname) {
2258
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
2259
-                                           } else { var msgToSendproc = ''; }
2260
-
2261
-                                           $("#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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2262
-
2263
-                                           // Scroll down to the bottom of the window
2264
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
2265
-
2266
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2267
-				     },
2268
-				     error: function() {
2269
-				           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
2270
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2271
-				     }
2272
-				  });
2273
-			  } else {
2274
-				  showAlert("Please enter a message in the text box!");
2275
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2276
-			  }
2277
-		      } else {
2278
-			      showAlert("Please choose a Sender ID from the 'From' drop-down list!");
2279
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2280
-		      }
2281
-
2282
-                   });
2283
-
2284
-
2285
-	           // Make the window draggable
2286
-	           function makeMgrWndDraggable(e) {
2287
-
2288
-			   window.pmdragging = {};
2289
-			   pmdragging.pageX0 = e.pageX;
2290
-			   pmdragging.pageY0 = e.pageY;
2291
-			   pmdragging.elem = $("#listAllMsgsConv");
2292
-			   pmdragging.offset0 = $("#listAllMsgsConv").offset();
2293
-
2294
-			   function handle_dragging(e) {
2295
-			       let left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
2296
-			       let top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
2297
-			       $(pmdragging.elem).offset({top: top, left: left});
2298
-			   }
2299
-
2300
-			   function handle_mouseup(e) {
2301
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
2302
-			   }
2303
-
2304
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
2305
-	           }
2306
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
2307
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
2308
-
2309
-
2310
-                   // Append the available phone numbers to the From drop-down list
2311
-                   var availPhoneNmbrs = [];
2312
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
2313
-                      var crtphnmbr = $(this).attr("value");
2314
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
2315
-                   });
2316
-
2317
-                   if (availPhoneNmbrs.length > 0) {
2318
-                       var avphopt = "";
2319
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
2320
-                            if (availPhoneNmbrs[d].indexOf(phNumberFrom) === -1) {
2321
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
2322
-                            } else {
2323
-                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"' selected>"+ availPhoneNmbrs[d] +"</option>";
2324
-                            }
2325
-                       }
2326
-                       $("#selectFromNbConv").append(avphopt);
2327
-
2328
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
2329
-
2330
-
2331
-                   // Get the sent/received messages for the current phone number, from the database
2332
-		   let getGrpConvUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedforreply");
2333
-
2334
-		   $('#listAllMsgsConv').addClass('icon-loading');
2335
-		   let totalPhNmbrs = 0;
2336
-
2337
-		   $.ajax({
2338
-			  method: 'POST',
2339
-			  url: getGrpConvUrl + '/' + userid,
2340
-			  contentType: 'application/json',
2341
-                          data: JSON.stringify({ phoneNmbrFrom: phNumberFrom, phoneNmbrTo: phNumberTo }),
2342
-			  success: function(groupedperconv) {
2343
-
2344
-				     $('#listAllMsgsConv').removeClass('icon-loading');
2345
-
2346
-				     let fromtoNmbrsData = [];
2347
-
2348
-				     for (let i = 0; i < groupedperconv.length; i++) {
2349
-
2350
-					     if (groupedperconv[i].author_displayname) {
2351
-						 var authordnm = groupedperconv[i].author_displayname;
2352
-					     } else { 
2353
-						 var authordnm = '';
2354
-					     }
2355
-
2356
-					     var sentfromnmbrarr = groupedperconv[i].from.split("+");
2357
-				             if (sentfromnmbrarr[1]) {
2358
-						 var groupednbfrom = "+"+ sentfromnmbrarr[1];
2359
-				             } else {
2360
-						 var groupednbfrom = sentfromnmbrarr[0];
2361
-				             }
2362
-
2363
-				             var modmessagerec = '';
2364
-				             if (groupedperconv[i].author_displayname) {
2365
-						 modmessagerec = "<span class='msgAuthorNameGrp'>"+ groupedperconv[i].author_displayname + ":</span>" + groupedperconv[i].message;
2366
-				             } else {
2367
-			                         modmessagerec = groupedperconv[i].message;
2368
-                                             }
2369
-
2370
-				             if (groupedperconv[i].to.indexOf(": ") > -1) {
2371
-				                 var groupednmbrtopre = groupedperconv[i].to.split(": ");
2372
-				                 var groupednmbrto = groupednmbrtopre[1];
2373
-				             } else { 
2374
-				                 var groupednmbrto = groupedperconv[i].to;
2375
-				             }
2376
-
2377
-				             fromtoNmbrsData.push({
2378
-				                       'author_displayname': authordnm,
2379
-				                       'from': groupednbfrom,
2380
-				                       'to': groupednmbrto,
2381
-				                       'message': modmessagerec,
2382
-				                       'date': groupedperconv[i].date,
2383
-				                       'status': groupedperconv[i].deliveryreceipt,
2384
-				                       'table': groupedperconv[i].table
2385
-				             });
2386
-				     }
2387
-
2388
-
2389
-				     // Remove the duplicates
2390
-				     let noDupMsgData = [];
2391
-				     $.each(fromtoNmbrsData, function(i, e) {
2392
-					    let matchingData = $.grep(noDupMsgData, function(item) {
2393
-				                    return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
2394
-					    });
2395
-					    if (matchingData.length === 0) {
2396
-						noDupMsgData.push(e);
2397
-					    }
2398
-				     });
2399
-
2400
-				     let messagesPerNmbr = {};
2401
-				     let msgsNamesPerNmbr = {};
2402
-				     let msgsNmbrsNames = {};
2403
-
2404
-			             let displayNamesarr = [];
2405
-			             let convData = [];
2406
-
2407
-			             for (let n = 0; n < noDupMsgData.length; n++) {
2408
-
2409
-			                  if (noDupMsgData[n]['from'] == phNumberTo && noDupMsgData[n]['table'] == 'sent') {
2410
-
2411
-			                      convData.push({
2412
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
2413
-			                                     'message': noDupMsgData[n]['message'],
2414
-			                                     'from': noDupMsgData[n]['from'],
2415
-			                                     'to': noDupMsgData[n]['to'],
2416
-			                                     'date': noDupMsgData[n]['date'],
2417
-			                                     'direction': 'sent_from',
2418
-			                                     'status': noDupMsgData[n]['status'],
2419
-			                                     'table': noDupMsgData[n]['table']
2420
-			                      });
2421
-
2422
-			                  } else if (noDupMsgData[n]['to'] == phNumberTo && noDupMsgData[n]['table'] == 'sent') {
2423
-
2424
-			                      convData.push({
2425
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
2426
-			                                     'message': noDupMsgData[n]['message'],
2427
-			                                     'from': noDupMsgData[n]['from'],
2428
-			                                     'to': noDupMsgData[n]['to'],
2429
-			                                     'date': noDupMsgData[n]['date'],
2430
-			                                     'direction': 'sent_to',
2431
-			                                     'status': noDupMsgData[n]['status'],
2432
-			                                     'table': noDupMsgData[n]['table']
2433
-			                      });
2434
-
2435
-
2436
-			                  } else if (noDupMsgData[n]['from'] == phNumberTo && noDupMsgData[n]['table'] == 'received') {
2437
-
2438
-			                      convData.push({
2439
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
2440
-			                                     'message': noDupMsgData[n]['message'],
2441
-			                                     'from': noDupMsgData[n]['from'],
2442
-			                                     'to': noDupMsgData[n]['to'],
2443
-			                                     'date': noDupMsgData[n]['date'],
2444
-			                                     'direction': 'received_from',
2445
-			                                     'status': noDupMsgData[n]['status'],
2446
-			                                     'table': noDupMsgData[n]['table']
2447
-			                      });
2448
-
2449
-			                  } else if (noDupMsgData[n]['to'] == phNumberTo && noDupMsgData[n]['table'] == 'received') {
2450
-
2451
-			                      convData.push({
2452
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
2453
-			                                     'message': noDupMsgData[n]['message'],
2454
-			                                     'from': noDupMsgData[n]['from'],
2455
-			                                     'to': noDupMsgData[n]['to'],
2456
-			                                     'date': noDupMsgData[n]['date'],
2457
-			                                     'direction': 'received_on',
2458
-			                                     'status': noDupMsgData[n]['status'],
2459
-			                                     'table': noDupMsgData[n]['table']
2460
-			                      });
2461
-			                  }
2462
-			             }
2463
-
2464
-			             // Sort messages by date
2465
-				     convData.sort(function(a, b) {
2466
-					let c = new Date(a.date);
2467
-					let d = new Date(b.date);
2468
-					return c-d;
2469
-				     });
2470
-                                     convData.reverse();
2471
-
2472
-			             // Collect the display names of the users that sent messages from the current number
2473
-			             let selectedNames = [];
2474
-			             let displayNames = '';
2475
-			             for (let v = 0; v < convData.length; v++) {
2476
-			                  if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) {
2477
-			                      selectedNames.push(convData[v]['author_displayname']);
2478
-			                      displayNames += "<div id='diplNm_"+ phNumberTo +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
2479
-			                  }
2480
-			             }
2481
-			             displayNames += "<div id='diplNmAllMsg' class='dispNameListAll' title='Show all the messages for this number.'>"+ phNumberTo +"</div>";
2482
-
2483
-			             // Store the display names for the current number, to be able to see them later
2484
-			             let ctPhNumber = phNumberTo;
2485
-			             msgsNamesPerNmbr[ctPhNumber] = displayNames;
2486
-
2487
-			             // Store the messages sent by each user, to be able to see them later when clicking on the user's name
2488
-			             for (let h = 0; h < selectedNames.length; h++) {
2489
-
2490
-			                  let rowMessageArrpn = [];
2491
-			                  for (let b = 0; b < convData.length; b++) {
2492
-
2493
-			                       if (selectedNames[h] == convData[b]['author_displayname']) {
2494
-
2495
-					           if (convData[b]['direction'] == 'sent_from') {
2496
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
2497
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2498
-					               } else {
2499
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2500
-					               }
2501
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2502
-					           } else if (convData[b]['direction'] == 'sent_to') {
2503
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
2504
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2505
-					               } else {
2506
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2507
-					               }
2508
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2509
-					           } else if (convData[b]['direction'] == 'received_from') {
2510
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
2511
-					           } else if (convData[b]['direction'] == 'received_on') {
2512
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
2513
-			                           }
2514
-			                       }
2515
-			                  }
2516
-			                  let crtNmber = phNumberTo;
2517
-			                  let crtName = selectedNames[h];
2518
-			                  msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
2519
-                                          msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
2520
-			             }
2521
-
2522
-                                     // The number of messages to be loaded by default
2523
-                                     let nmbTblDefault = 50;
2524
-
2525
-                                     // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
2526
-                                     if (convData.length > nmbTblDefault) {
2527
-                                         $("#loadMoreMsgs").css("display", "block");
2528
-                                         var nmbToBeLoaded = nmbTblDefault;
2529
-                                     } else { var nmbToBeLoaded = convData.length; }
2530
-
2531
-			             let rowMessageArr = [];
2532
-			             for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
2533
-
2534
-			                  if (convData[m]['direction'] == 'sent_from') {
2535
-
2536
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
2537
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2538
-			                      } else {
2539
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2540
-			                      }
2541
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2542
-
2543
-			                  } else if (convData[m]['direction'] == 'sent_to') {
2544
-
2545
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
2546
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2547
-			                      } else {
2548
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2549
-			                      }
2550
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2551
-
2552
-			                  } else if (convData[m]['direction'] == 'received_from') {
2553
-
2554
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2555
-
2556
-			                  } else if (convData[m]['direction'] == 'received_on') {
2557
-
2558
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2559
-			                  }
2560
-			             }
2561
-
2562
-			             let convDataPerNmbr = rowMessageArr.join("");
2563
-
2564
-                                     $("#grpdbynamelst").append(displayNames);
2565
-                                     $("#msgListRowCell").append(convDataPerNmbr);
2566
-
2567
-			             // Store the messages for the current number, to be able to see them later, when clicking on the number
2568
-			             let rowMessageArrcpt = [];
2569
-			             for (let m = 0; m < convData.length; m++) {
2570
-
2571
-			                  if (convData[m]['direction'] == 'sent_from') {
2572
-
2573
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
2574
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2575
-			                      } else {
2576
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2577
-			                      }
2578
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2579
-
2580
-			                  } else if (convData[m]['direction'] == 'sent_to') {
2581
-
2582
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
2583
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2584
-			                      } else {
2585
-			                          let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2586
-			                      }
2587
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2588
-
2589
-			                  } else if (convData[m]['direction'] == 'received_from') {
2590
-
2591
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2592
-
2593
-			                  } else if (convData[m]['direction'] == 'received_on') {
2594
-
2595
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2596
-			                  }
2597
-			             }
2598
-
2599
-			             messagesPerNmbr[phNumberTo] = rowMessageArrcpt;
2600
-
2601
-                                     // Scroll down to the bottom of the window
2602
-                                     $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
2603
-
2604
-                                     // Load more messages
2605
-                                     let clickNmb = 0;
2606
-                                     $("#loadMoreMsgs").click(function() {
2607
-
2608
-                                         clickNmb++;
2609
-
2610
-                                         var crefnb = (clickNmb + 1) * nmbToBeLoaded;
2611
-
2612
-                                         if (crefnb > convData.length) {
2613
-                                             var nmbmsg = convData.length - 1;
2614
-                                             $("#loadMoreMsgs").css("display", "none");
2615
-                                         } else { 
2616
-                                             var nmbmsg = crefnb - 1;
2617
-                                         }
2618
-
2619
-                                         var rowMessageArrAdd = [];
2620
-
2621
-                                         for (let m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
2622
-
2623
-			                      if (convData[m]['direction'] == 'sent_from') {
2624
-
2625
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
2626
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2627
-			                          } else {
2628
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2629
-			                          }
2630
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2631
-
2632
-			                      } else if (convData[m]['direction'] == 'sent_to') {
2633
-
2634
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
2635
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
2636
-			                          } else {
2637
-			                              let sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
2638
-			                          }
2639
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2640
-
2641
-			                      } else if (convData[m]['direction'] == 'received_from') {
2642
-
2643
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2644
-
2645
-			                      } else if (convData[m]['direction'] == 'received_on') {
2646
-
2647
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
2648
-			                      }
2649
-                                         }
2650
-
2651
-			                 let convDataPerNmbrad = rowMessageArrAdd.join("");
2652
-
2653
-                                         let scrlheight = $("#msgListRowCell").height();
2654
-                                         $("#msgListRowCell").prepend(convDataPerNmbrad);
2655
-
2656
-                                         $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
2657
-                                     });
2658
-
2659
-
2660
-			             // Show the messages sent by each user whose name is clicked
2661
-			             $('[id*="diplNm_"]').click(function() {
2662
-
2663
-			                 let crntNmbr = $(this).attr("id").split("_")[1];
2664
-			                 let crntDisName = $(this).attr("name");                               
2665
-                                         $("#loadMoreMsgs").css("display", "none");
2666
-
2667
-                                         let convDataprn = [];
2668
-                                         $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
2669
-                                                convDataprn.push(item);
2670
-                                         });
2671
-
2672
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
2673
-                                         if (convDataprn.length > nmbTblDefault) {
2674
-                                             $("#loadMoreMsgsusr").css("display", "block");
2675
-                                             let nmbToBeLoaded = nmbTblDefault;
2676
-                                         } else {
2677
-                                             $("#loadMoreMsgsusr").css("display", "none");
2678
-                                             let nmbToBeLoaded = convDataprn.length;
2679
-                                         }
2680
-
2681
-			                 let rowMessageArrprnst = [];
2682
-
2683
-			                 for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
2684
-                                              rowMessageArrprnst.push(convDataprn[n]);
2685
-			                 }
2686
-
2687
-			                 let convDataPerNmbrprnst = rowMessageArrprnst.join("");
2688
-
2689
-                                         $("#msgListRowCell").empty();
2690
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
2691
-
2692
-                                         // Scroll down to the bottom of the window
2693
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
2694
-
2695
-                                         // Load more messages
2696
-                                         let clckNb = 0;
2697
-                                         $("#loadMoreMsgsusr").unbind("click");
2698
-                                         $("#loadMoreMsgsusr").click(function() {
2699
-
2700
-                                             clckNb++;
2701
-                                             let crefnb = (clckNb + 1) * nmbToBeLoaded;
2702
-
2703
-                                             $("#loadMoreMsgs").css("display", "none");
2704
-
2705
-                                             if (crefnb > convDataprn.length) {
2706
-                                                 let nmbmsg = convDataprn.length - 1;
2707
-                                                 $("#loadMoreMsgsusr").css("display", "none");
2708
-                                             } else { 
2709
-                                                 let nmbmsg = crefnb - 1;
2710
-                                                 $("#loadMoreMsgsusr").css("display", "block");
2711
-                                             }
2712
-
2713
-                                             let rowMessageArrAddst = [];
2714
-
2715
-                                             for (let q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
2716
-
2717
-                                                  rowMessageArrAddst.push(convDataprn[q]);
2718
-                                             }
2719
-
2720
-			                     let convDataPerNmbradst = rowMessageArrAddst.join("");
2721
-
2722
-                                             let scrlheight = $("#msgListRowCell").height();
2723
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
2724
-
2725
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
2726
-                                         });
2727
-
2728
-
2729
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
2730
-			                 $("#diplNmAllMsg").css("color", "#04957b");
2731
-			                 $(this).css("color", "#1b8efe");
2732
-			             });
2733
-
2734
-
2735
-			             // Show again all the messages sent/received to/from the clicked number
2736
-			             $("#diplNmAllMsg").click(function() {
2737
-
2738
-                                         $("#loadMoreMsgsusr").css("display", "none");
2739
-
2740
-                                         let convDataprn = [];
2741
-                                         $.each(messagesPerNmbr[phNumberTo], function(index, item) {
2742
-                                                convDataprn.push(item);
2743
-                                         });
2744
-
2745
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
2746
-                                         if (convDataprn.length > nmbTblDefault) {
2747
-                                             $("#loadMoreMsgs").css("display", "block");
2748
-                                             let nmbToBeLoaded = nmbTblDefault;
2749
-                                         } else {
2750
-                                             $("#loadMoreMsgs").css("display", "none");
2751
-                                             let nmbToBeLoaded = convDataprn.length;
2752
-                                         }
2753
-
2754
-
2755
-			                 let rowMessageArrprnst = [];
2756
-
2757
-			                 for (let n = nmbToBeLoaded - 1; n >= 0; n--) {
2758
-                                              rowMessageArrprnst.push(convDataprn[n]);
2759
-			                 }
2760
-
2761
-			                 let convDataPerNmbrprnst = rowMessageArrprnst.join("");
2762
-
2763
-                                         $("#msgListRowCell").empty();
2764
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
2765
-
2766
-                                         // Scroll down to the bottom of the window
2767
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
2768
-
2769
-
2770
-                                         // Load more messages
2771
-                                         let clckNb = 0;
2772
-                                         $("#loadMoreMsgsusr").unbind("click");
2773
-                                         $("#loadMoreMsgsusr").click(function() {
2774
-
2775
-                                             clckNb++;
2776
-                                             let crefnb = (clckNb + 1) * nmbToBeLoaded;
2777
-
2778
-                                             $("#loadMoreMsgs").css("display", "none");
2779
-
2780
-                                             if (crefnb > convDataprn.length) {
2781
-                                                 let nmbmsg = convDataprn.length - 1;
2782
-                                                 $("#loadMoreMsgsusr").css("display", "none");
2783
-                                             } else { 
2784
-                                                 let nmbmsg = crefnb - 1;
2785
-                                                 $("#loadMoreMsgsusr").css("display", "block");
2786
-                                             }
2787
-
2788
-                                             let rowMessageArrAddst = [];
2789
-
2790
-                                             for (let q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
2791
-
2792
-                                                  rowMessageArrAddst.push(convDataprn[q]);
2793
-                                             }
2794
-
2795
-			                     let convDataPerNmbradst = rowMessageArrAddst.join("");
2796
-
2797
-                                             let scrlheight = $("#msgListRowCell").height();
2798
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
2799
-
2800
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
2801
-                                         });
2802
-
2803
-
2804
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
2805
-			                 $("#diplNmAllMsg").css("color", "#04957b");
2806
-			                 $(this).css("color", "#04c6a4");
2807
-
2808
-			             });
2809
-
2810
-
2811
-				     // Show the scroll-up arrow
2812
-				     $("#frmMsgLstWrap").scroll(function() {
2813
-					if ($(this).scrollTop() > 900) {
2814
-					      $('#upArrowSmall').fadeIn();
2815
-					} else {
2816
-					      $('#upArrowSmall').fadeOut();
2817
-					}
2818
-				     });
2819
-
2820
-				     $("#upArrowSmall").click(function() {
2821
-					$("#frmMsgLstWrap").animate({scrollTop : 0},400);
2822
-				     });
2823
-
2824
-			  },
2825
-			  error: function() {
2826
-				     showAlert("Error while attempting to get message data from the database!");
2827
-				     $('#listAllMsgsConv').removeClass('icon-loading');
2828
-			  }
2829
-		   });
2830
-
2831
-                }
2832
-
2833
-                $('[id^="showMsgConv-"]').click(function() {
2834
-
2835
-                   let ctrwnmbr = $(this).attr("id").replace("showMsgConv-", "");
2836
-                   let phNumberFrom = $("#frmNmbr-"+ ctrwnmbr).text().split(": ")[1];
2837
-                   let phNumberTo = $("#toNmbr-"+ ctrwnmbr).text();
2838
-
2839
-                   showSentMsgPerConv(phNumberFrom, phNumberTo);
2840
-                });
2841
-
2842
-
2843
-
2844
-                // Show the pop-up window that lists all the messages sent/received to/from a phone number
2845
-                function showMsgPerNmbr(clckPhNumber) {
2846
-
2847
-                   var allfrmtomsg = "<div id='listAllMsgsFromTo'>";
2848
-                   allfrmtomsg += "<div id='draglstMsgmWindow'><img src='/apps/sms_relentless/img/dots.svg'></div>";
2849
-                   allfrmtomsg += "<a id='closeFrmMsgWindow' title='Close this window'></a>";
2850
-                   allfrmtomsg += "<div class='showByNmbrTitle'>Messages sent/received to/from  <span style='color:#04957b'>"+ clckPhNumber +"</span></div>";
2851
-                   allfrmtomsg += "<div id='frmMsgLstWrap'>";
2852
-                   allfrmtomsg += "<table id='frmMsgLstTbl'>";
2853
-                   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='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>";
2854
-                   allfrmtomsg += "</table></div>";
2855
-//                   allfrmtomsg += "<input type='submit' id='sendMsgToNmb' value='Send a message to "+ clckPhNumber +"'>";
2856
-                   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>";
2857
-                   allfrmtomsg += "<tr><td><textarea id='sendMsgConvText' placeholder='Enter a message here, then press Send SMS'></textarea></td></tr></table>";
2858
-                   allfrmtomsg += "<div id='sendMsgConvBtn'>Send SMS</div></div>";
2859
-                   allfrmtomsg += "<div style='display:block;width:100%;height:14px;'><img id='expandWindowRpl' src='/apps/sms_relentless/img/arrowDown.svg' title='Expand to send a message'></div>";
2860
-                   allfrmtomsg += "<div id='draglstMsgmWindowsc'><img src='/apps/sms_relentless/img/dots.svg' style='padding:4px;vertical-align:top;'></div>";
2861
-                   allfrmtomsg += "</div>";
2862
-
2863
-                   $("#content").append("<div id='recTblOverlay'></div>");
2864
-                   $("#content").append(allfrmtomsg);
2865
-
2866
-                   var topDist = parseInt((window.innerHeight / 2).toFixed(2) - 340) +"px";
2867
-                   var leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 300) +"px";
2868
-                   $("#listAllMsgsFromTo").css({ "top" : topDist, "left" : leftDist });
2869
-
2870
-                   $("#closeFrmMsgWindow").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
2871
-                   $("#recTblOverlay").click(function() { $("#listAllMsgsFromTo").remove(); $("#recTblOverlay").remove(); });
2872
-
2873
-
2874
-	           // Expand the window when clicking on the arrow, to be able to send a reply message
2875
-	           $("#expandWindowRpl").click(function() {
2876
-
2877
-	              if ($(this).attr('src') == '/apps/sms_relentless/img/arrowDown.svg') {
2878
-                          $("#sendMsgReply").css("display", "block");
2879
-                          $("#listAllMsgsFromTo").css("height", "618px");
2880
-	                  $(this).attr('src', '/apps/sms_relentless/img/arrowUp.svg');
2881
-                          $(this).attr('title', 'Collapse');
2882
-	              } else {
2883
-                          $("#sendMsgReply").css("display", "none");
2884
-                          $("#listAllMsgsFromTo").css("height", "490px");
2885
-                          $(this).attr('src', '/apps/sms_relentless/img/arrowDown.svg');
2886
-                          $(this).attr('title', 'Expand to send a reply');
2887
-	              }
2888
-	           });
2889
-
2890
-                   // Send a message from the 'conversation' window
2891
-                   $("#sendMsgConvBtn").click(function() {
2892
-
2893
-                      $("#sendMsgConv,#sendMsgConvBtn").addClass('icon-loading');
2894
-                      var msgToSend = $("#sendMsgConvText").val();
2895
-                      var selectedid = $("#selectFromNbConv").val();
2896
-                      var toNumber = $("#toNmbrConv").text();
2897
-                      var receiversNumbers = [toNumber];
2898
-
2899
-		      if (selectedid != '') {
2900
-
2901
-			  var sendersplit = selectedid.split(":");
2902
-			  var providercap = sendersplit[0];
2903
-			  var provsec = sendersplit[1];
2904
-
2905
-			  if (/[a-zA-Z]/.test(provsec)) {
2906
-			      var alphanumcheck = true;
2907
-			  } else { var alphanumcheck = false; }
2908
-
2909
-			  if (providercap == 'Tx' && alphanumcheck == false) {  
2910
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2911
-			      var selectedsender = "+" + senderproc;
2912
-			      var providerUsed = "telnyx";
2913
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
2914
-			  } else if (providercap == 'Pl' && alphanumcheck == false) {
2915
-			      var selectedsender = selectedid.replace(/[^0-9]/g, "");
2916
-			      var providerUsed = "plivo";
2917
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
2918
-			  } else if (providercap == 'Tw' && alphanumcheck == false) {  
2919
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2920
-			      var selectedsender = "+" + senderproc;
2921
-			      var providerUsed = "twilio";
2922
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
2923
-			  } else if (providercap == 'Fl' && alphanumcheck == false) {  
2924
-			      var senderproc = selectedid.replace(/[^0-9]/g, "");
2925
-			      var selectedsender = "+" + senderproc;
2926
-			      var providerUsed = "flowroute";
2927
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
2928
-			  } else if (providercap == 'Tx' && alphanumcheck == true) {
2929
-			      var selectedsender = provsec;
2930
-			      var providerUsed = "telnyx";
2931
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstel");
2932
-			  } else if (providercap == 'Pl' && alphanumcheck == true) {
2933
-			      var selectedsender = provsec;
2934
-			      var providerUsed = "plivo";
2935
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsnex");
2936
-			  } else if (providercap == 'Tw' && alphanumcheck == true) {
2937
-			      var selectedsender = provsec;
2938
-			      var providerUsed = "twilio";
2939
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmstwil");
2940
-			  } else if (providercap == 'Fl' && alphanumcheck == true) {
2941
-			      var selectedsender = provsec;
2942
-			      var providerUsed = "flowroute";
2943
-			      var relbaseUrl = OC.generateUrl("/apps/sms_relentless/user/sendsmsflow");
2944
-			  }
2945
-
2946
-                          var uploadedtomms = [];
2947
-
2948
-	                  if (msgToSend != '') {
2949
-
2950
-				  $.ajax({
2951
-				     url: relbaseUrl + '/' + userid,
2952
-				     type: "POST",
2953
-				     data: {
2954
-				           receiversPhoneNbs: receiversNumbers,
2955
-				           fromsender: selectedsender,
2956
-				           waitinterval: 1000,
2957
-				           sentsmstext: msgToSend,
2958
-				           ismms: 0,
2959
-				           mmsfiles: uploadedtomms
2960
-				         },
2961
-				     success: function(displayname) {
2962
-
2963
-                                           var tzdate = new Date();
2964
-                                           var presDatest = new Date(tzdate.getTime() - (tzdate.getTimezoneOffset() * 60000)).toJSON();
2965
-                                           var presDatedb = presDatest.split(".")[0];
2966
-                                           var presDatesc = presDatedb.split("T");
2967
-                                           var presDate = presDatesc[0] +" "+ presDatesc[1];
2968
-                                           var sentMessageStatus = '';
2969
-
2970
-                                           if (displayname) {
2971
-                                               var msgToSendproc = "<span class='msgAuthorNameGrp'>"+ displayname + ":</span>" + msgToSend; 
2972
-                                           } else { var msgToSendproc = ''; }
2973
-
2974
-                                           $("#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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
2975
-
2976
-                                           // Scroll down to the bottom of the window
2977
-                                           $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
2978
-
2979
-                                           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2980
-				     },
2981
-				     error: function() {
2982
-				           showAlert("Error while sending the message. You can check your Nextcloud log to find out more about this issue.");
2983
-				           $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2984
-				     }
2985
-				  });
2986
-			  } else {
2987
-				  showAlert("Please enter a message in the text box!");
2988
-				  $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2989
-			  }
2990
-		      } else {
2991
-			      showAlert("Please choose a Sender ID from the 'From' drop-down list!");
2992
-			      $("#sendMsgConv,#sendMsgConvBtn").removeClass('icon-loading');
2993
-		      }
2994
-
2995
-                   });
2996
-
2997
-
2998
-	           // Make the window draggable
2999
-	           function makeMgrWndDraggable(e) {
3000
-
3001
-			   window.pmdragging = {};
3002
-			   pmdragging.pageX0 = e.pageX;
3003
-			   pmdragging.pageY0 = e.pageY;
3004
-			   pmdragging.elem = $("#listAllMsgsFromTo");
3005
-			   pmdragging.offset0 = $("#listAllMsgsFromTo").offset();
3006
-
3007
-			   function handle_dragging(e) {
3008
-			       var left = pmdragging.offset0.left + (e.pageX - pmdragging.pageX0);
3009
-			       var top = pmdragging.offset0.top + (e.pageY - pmdragging.pageY0);
3010
-			       $(pmdragging.elem).offset({top: top, left: left});
3011
-			   }
3012
-
3013
-			   function handle_mouseup(e) {
3014
-			       $('body').off('mousemove', handle_dragging).off('mouseup', handle_mouseup);
3015
-			   }
3016
-
3017
-			   $('body').on('mouseup', handle_mouseup).on('mousemove', handle_dragging);
3018
-	           }
3019
-	           $("#draglstMsgmWindow").mousedown(makeMgrWndDraggable);
3020
-	           $("#draglstMsgmWindowsc").mousedown(makeMgrWndDraggable);
3021
-
3022
-
3023
-                   // Append the available phone numbers to the From drop-down list
3024
-                   var availPhoneNmbrs = [];
3025
-                   $("#currentsmsnmbrs .optselectsmsnb").each(function() {
3026
-                      var crtphnmbr = $(this).attr("value");
3027
-                      if (crtphnmbr != "") { availPhoneNmbrs.push(crtphnmbr); }
3028
-                   });
3029
-
3030
-                   if (availPhoneNmbrs.length > 0) {
3031
-                       var avphopt = "";
3032
-                       for (let d = 0; d < availPhoneNmbrs.length; d++) {
3033
-//                            if (availPhoneNmbrs[d].indexOf(phNumberTo) === -1) {
3034
-                            avphopt += "<option value='"+ availPhoneNmbrs[d] +"'>"+ availPhoneNmbrs[d] +"</option>";
3035
-//                            } else {
3036
-//                                avphopt += "<option value='"+ availPhoneNmbrs[d] +"' selected>"+ availPhoneNmbrs[d] +"</option>";
3037
-//                            }
3038
-                       }
3039
-                       $("#selectFromNbConv").append(avphopt);
3040
-
3041
-                   } else { $("#selectFromNbConv").append("<option value='' selected>No IDs</option>"); }
3042
-
3043
-
3044
-                   // Get the sent/received messages for the current phone number, from the database
3045
-		   var getGroupedPnUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedpernumber");
3046
-
3047
-		   $('#listAllMsgsFromTo').addClass('icon-loading');
3048
-		   var totalPhNmbrs = 0;
3049
-
3050
-		   $.ajax({
3051
-			  method: 'POST',
3052
-			  url: getGroupedPnUrl + '/' + userid,
3053
-			  contentType: 'application/json',
3054
-                          data: JSON.stringify({ phoneNumber: clckPhNumber }),
3055
-			  success: function(groupedpernb) {
3056
-
3057
-				     $('#listAllMsgsFromTo').removeClass('icon-loading');
3058
-
3059
-				     var fromtoNmbrsData = [];
3060
-
3061
-				     for (var i = 0; i < groupedpernb.length; i++) {
3062
-
3063
-					     if (groupedpernb[i].author_displayname) {
3064
-						 var authordnm = groupedpernb[i].author_displayname;
3065
-					     } else { 
3066
-//						 var authordnm = groupedpernb[i].user_id;
3067
-						 var authordnm = '';
3068
-					     }
3069
-
3070
-					     var sentfromnmbrarr = groupedpernb[i].from.split("+");
3071
-				             if (sentfromnmbrarr[1]) {
3072
-						 var groupednbfrom = "+"+ sentfromnmbrarr[1];
3073
-				             } else {
3074
-						 var groupednbfrom = sentfromnmbrarr[0];
3075
-				             }
3076
-
3077
-				             var modmessagesent = '';
3078
-				             if (groupedpernb[i].author_displayname) {
3079
-						 modmessagesent = "<span class='msgAuthorNameGrp'>"+ groupedpernb[i].author_displayname + ":</span>" + groupedpernb[i].message;
3080
-				             } else {
3081
-			                         modmessagesent = groupedpernb[i].message;
3082
-                                             }
3083
-
3084
-				             if (groupedpernb[i].to.indexOf(": ") > -1) {
3085
-				                 var groupednmbrtopre = groupedpernb[i].to.split(": ");
3086
-				                 var groupednmbrto = groupednmbrtopre[1];
3087
-				             } else { 
3088
-				                 var groupednmbrto = groupedpernb[i].to;
3089
-				             }
3090
-
3091
-				             fromtoNmbrsData.push({
3092
-				                       'author_displayname': authordnm,
3093
-				                       'from': groupednbfrom,
3094
-				                       'to': groupednmbrto,
3095
-				                       'message': modmessagesent,
3096
-				                       'date': groupedpernb[i].date,
3097
-				                       'status': groupedpernb[i].deliveryreceipt,
3098
-				                       'table': groupedpernb[i].table
3099
-				             });
3100
-				     }
3101
-
3102
-
3103
-				     // Remove the duplicates
3104
-				     var noDupMsgData = [];
3105
-				     $.each(fromtoNmbrsData, function(i, e) {
3106
-					    var matchingData = $.grep(noDupMsgData, function(item) {
3107
-				                    return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent';
3108
-					    });
3109
-					    if (matchingData.length === 0) {
3110
-						noDupMsgData.push(e);
3111
-					    }
3112
-				     });
3113
-
3114
-				     var messagesPerNmbr = {};
3115
-				     var msgsNamesPerNmbr = {};
3116
-				     var msgsNmbrsNames = {};
3117
-
3118
-			             var displayNamesarr = [];
3119
-			             var convData = [];
3120
-
3121
-			             for (var n = 0; n < noDupMsgData.length; n++) {
3122
-
3123
-			                  if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
3124
-
3125
-			                      convData.push({
3126
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
3127
-			                                     'message': noDupMsgData[n]['message'],
3128
-			                                     'from': noDupMsgData[n]['from'],
3129
-			                                     'to': noDupMsgData[n]['to'],
3130
-			                                     'date': noDupMsgData[n]['date'],
3131
-			                                     'direction': 'sent_from',
3132
-			                                     'status': noDupMsgData[n]['status'],
3133
-			                                     'table': noDupMsgData[n]['table']
3134
-			                      });
3135
-
3136
-			                  } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'sent') {
3137
-
3138
-			                      convData.push({
3139
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
3140
-			                                     'message': noDupMsgData[n]['message'],
3141
-			                                     'from': noDupMsgData[n]['from'],
3142
-			                                     'to': noDupMsgData[n]['to'],
3143
-			                                     'date': noDupMsgData[n]['date'],
3144
-			                                     'direction': 'sent_to',
3145
-			                                     'status': noDupMsgData[n]['status'],
3146
-			                                     'table': noDupMsgData[n]['table']
3147
-			                      });
3148
-
3149
-
3150
-			                  } else if (noDupMsgData[n]['from'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
3151
-
3152
-			                      convData.push({
3153
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
3154
-			                                     'message': noDupMsgData[n]['message'],
3155
-			                                     'from': noDupMsgData[n]['from'],
3156
-			                                     'to': noDupMsgData[n]['to'],
3157
-			                                     'date': noDupMsgData[n]['date'],
3158
-			                                     'direction': 'received_from',
3159
-			                                     'status': noDupMsgData[n]['status'],
3160
-			                                     'table': noDupMsgData[n]['table']
3161
-			                      });
3162
-
3163
-			                  } else if (noDupMsgData[n]['to'] == clckPhNumber && noDupMsgData[n]['table'] == 'received') {
3164
-
3165
-			                      convData.push({
3166
-			                                     'author_displayname': noDupMsgData[n]['author_displayname'],
3167
-			                                     'message': noDupMsgData[n]['message'],
3168
-			                                     'from': noDupMsgData[n]['from'],
3169
-			                                     'to': noDupMsgData[n]['to'],
3170
-			                                     'date': noDupMsgData[n]['date'],
3171
-			                                     'direction': 'received_on',
3172
-			                                     'status': noDupMsgData[n]['status'],
3173
-			                                     'table': noDupMsgData[n]['table']
3174
-			                      });
3175
-			                  }
3176
-			             }
3177
-
3178
-			             // Sort messages by date
3179
-				     convData.sort(function(a, b) {
3180
-					var c = new Date(a.date);
3181
-					var d = new Date(b.date);
3182
-					return c-d;
3183
-				     });
3184
-                                     convData.reverse();
3185
-
3186
-			             // Collect the display names of the users that sent messages from the current number
3187
-			             var selectedNames = [];
3188
-			             var displayNames = '';
3189
-			             for (var v = 0; v < convData.length; v++) {
3190
-			                  if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
3191
-			                      selectedNames.push(convData[v]['author_displayname']);
3192
-			                      displayNames += "<div id='diplNm_"+ clckPhNumber +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
3193
-			                  }
3194
-			             }
3195
-			             displayNames += "<div id='diplNmAllMsg' class='dispNameListAll' title='Show all the messages for this number.'>"+ clckPhNumber +"</div>";
3196
-
3197
-			             // Store the display names for the current number, to be able to see them later
3198
-			             var ctPhNumber = clckPhNumber;
3199
-			             msgsNamesPerNmbr[ctPhNumber] = displayNames;
3200
-
3201
-			             // Store the messages sent by each user, to be able to see them later when clicking on the user's name
3202
-			             for (var h = 0; h < selectedNames.length; h++) {
3203
-
3204
-			                  var rowMessageArrpn = [];
3205
-			                  for (var b = 0; b < convData.length; b++) {
3206
-
3207
-			                       if (selectedNames[h] == convData[b]['author_displayname']) {
3208
-
3209
-					           if (convData[b]['direction'] == 'sent_from') {
3210
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
3211
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3212
-					               } else {
3213
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3214
-					               }
3215
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3216
-					           } else if (convData[b]['direction'] == 'sent_to') {
3217
-					               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
3218
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3219
-					               } else {
3220
-					                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3221
-					               }
3222
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3223
-					           } else if (convData[b]['direction'] == 'received_from') {
3224
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
3225
-					           } else if (convData[b]['direction'] == 'received_on') {
3226
-					               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
3227
-			                           }
3228
-			                       }
3229
-			                  }
3230
-			                  var crtNmber = clckPhNumber;
3231
-			                  var crtName = selectedNames[h];
3232
-			                  msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
3233
-                                          msgsNmbrsNames[crtNmber][crtName] = rowMessageArrpn;
3234
-			             }
3235
-
3236
-                                     // The number of messages to be loaded by default
3237
-                                     var nmbTblDefault = 50;
3238
-
3239
-                                     // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3240
-                                     if (convData.length > nmbTblDefault) {
3241
-                                         $("#loadMoreMsgs").css("display", "block");
3242
-                                         var nmbToBeLoaded = nmbTblDefault;
3243
-                                     } else { var nmbToBeLoaded = convData.length; }
3244
-
3245
-			             var rowMessageArr = [];
3246
-			             for (var m = nmbToBeLoaded - 1; m >= 0; m--) {
3247
-
3248
-			                  if (convData[m]['direction'] == 'sent_from') {
3249
-
3250
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
3251
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3252
-			                      } else {
3253
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3254
-			                      }
3255
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3256
-
3257
-			                  } else if (convData[m]['direction'] == 'sent_to') {
3258
-
3259
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
3260
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3261
-			                      } else {
3262
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3263
-			                      }
3264
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3265
-
3266
-			                  } else if (convData[m]['direction'] == 'received_from') {
3267
-
3268
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3269
-
3270
-			                  } else if (convData[m]['direction'] == 'received_on') {
3271
-
3272
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3273
-			                  }
3274
-			             }
3275
-
3276
-			             var convDataPerNmbr = rowMessageArr.join("");
3277
-
3278
-//				     $("#frmMsgLstTbl").append("<tr class='groupedrowsbody'><td><div class='groupedLstNamespn'>"+ displayNames +"</div></td><td><div id='msgListRowCell' class='groupedLstMsgspn'>"+ convDataPerNmbr +"</div><div id='arrowupWrap'><div id='upArrowSmall' title='Scroll to the top'></div></div></td></tr>");
3279
-                                     $("#grpdbynamelst").append(displayNames);
3280
-                                     $("#msgListRowCell").append(convDataPerNmbr);
3281
-
3282
-			             // Store the messages for the current number, to be able to see them later, when clicking on the number
3283
-			             var rowMessageArrcpt = [];
3284
-			             for (var m = 0; m < convData.length; m++) {
3285
-
3286
-			                  if (convData[m]['direction'] == 'sent_from') {
3287
-
3288
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
3289
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3290
-			                      } else {
3291
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3292
-			                      }
3293
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3294
-
3295
-			                  } else if (convData[m]['direction'] == 'sent_to') {
3296
-
3297
-			                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
3298
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3299
-			                      } else {
3300
-			                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3301
-			                      }
3302
-			                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3303
-
3304
-			                  } else if (convData[m]['direction'] == 'received_from') {
3305
-
3306
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3307
-
3308
-			                  } else if (convData[m]['direction'] == 'received_on') {
3309
-
3310
-					      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3311
-			                  }
3312
-			             }
3313
-
3314
-			             messagesPerNmbr[clckPhNumber] = rowMessageArrcpt;
3315
-
3316
-                                     // Scroll down to the bottom of the window
3317
-                                     $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3318
-
3319
-                                     // Load more messages
3320
-                                     var clickNmb = 0;
3321
-                                     $("#loadMoreMsgs").click(function() {
3322
-
3323
-                                         clickNmb++;
3324
-
3325
-                                         var crefnb = (clickNmb + 1) * nmbToBeLoaded;
3326
-
3327
-                                         if (crefnb > convData.length) {
3328
-                                             var nmbmsg = convData.length - 1;
3329
-                                             $("#loadMoreMsgs").css("display", "none");
3330
-                                         } else { 
3331
-                                             var nmbmsg = crefnb - 1;
3332
-                                         }
3333
-
3334
-                                         var rowMessageArrAdd = [];
3335
-
3336
-                                         for (var m = nmbmsg; m >= clickNmb * nmbToBeLoaded; m--) {
3337
-
3338
-			                      if (convData[m]['direction'] == 'sent_from') {
3339
-
3340
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
3341
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3342
-			                          } else {
3343
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3344
-			                          }
3345
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3346
-
3347
-			                      } else if (convData[m]['direction'] == 'sent_to') {
3348
-
3349
-			                          if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
3350
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
3351
-			                          } else {
3352
-			                              var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
3353
-			                          }
3354
-			                          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
3355
-
3356
-			                      } else if (convData[m]['direction'] == 'received_from') {
3357
-
3358
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3359
-
3360
-			                      } else if (convData[m]['direction'] == 'received_on') {
3361
-
3362
-					          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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
3363
-			                      }
3364
-                                         }
3365
-
3366
-			                 var convDataPerNmbrad = rowMessageArrAdd.join("");
3367
-
3368
-                                         var scrlheight = $("#msgListRowCell").height();
3369
-                                         $("#msgListRowCell").prepend(convDataPerNmbrad);
3370
-
3371
-                                         $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
3372
-                                     });
3373
-
3374
-
3375
-			             // Show the messages sent by each user whose name is clicked
3376
-			             $('[id*="diplNm_"]').click(function() {
3377
-
3378
-			                 var crntNmbr = $(this).attr("id").split("_")[1];
3379
-			                 var crntDisName = $(this).attr("name");                               
3380
-                                         $("#loadMoreMsgs").css("display", "none");
3381
-
3382
-                                         var convDataprn = [];
3383
-                                         $.each(msgsNmbrsNames[crntNmbr][crntDisName], function(index, item) {
3384
-                                                convDataprn.push(item);
3385
-                                         });
3386
-
3387
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3388
-                                         if (convDataprn.length > nmbTblDefault) {
3389
-                                             $("#loadMoreMsgsusr").css("display", "block");
3390
-                                             var nmbToBeLoaded = nmbTblDefault;
3391
-                                         } else {
3392
-                                             $("#loadMoreMsgsusr").css("display", "none");
3393
-                                             var nmbToBeLoaded = convDataprn.length;
3394
-                                         }
3395
-
3396
-
3397
-			                 var rowMessageArrprnst = [];
3398
-
3399
-			                 for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
3400
-                                              rowMessageArrprnst.push(convDataprn[n]);
3401
-			                 }
3402
-
3403
-			                 var convDataPerNmbrprnst = rowMessageArrprnst.join("");
3404
-
3405
-                                         $("#msgListRowCell").empty();
3406
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
3407
-
3408
-                                         // Scroll down to the bottom of the window
3409
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3410
-
3411
-                                         // Load more messages
3412
-                                         var clckNb = 0;
3413
-                                         $("#loadMoreMsgsusr").unbind("click");
3414
-                                         $("#loadMoreMsgsusr").click(function() {
3415
-
3416
-                                             clckNb++;
3417
-                                             var crefnb = (clckNb + 1) * nmbToBeLoaded;
3418
-
3419
-                                             $("#loadMoreMsgs").css("display", "none");
3420
-
3421
-                                             if (crefnb > convDataprn.length) {
3422
-                                                 var nmbmsg = convDataprn.length - 1;
3423
-                                                 $("#loadMoreMsgsusr").css("display", "none");
3424
-                                             } else { 
3425
-                                                 var nmbmsg = crefnb - 1;
3426
-                                                 $("#loadMoreMsgsusr").css("display", "block");
3427
-                                             }
3428
-
3429
-                                             var rowMessageArrAddst = [];
3430
-
3431
-                                             for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
3432
-
3433
-                                                  rowMessageArrAddst.push(convDataprn[q]);
3434
-                                             }
3435
-
3436
-			                     var convDataPerNmbradst = rowMessageArrAddst.join("");
3437
-
3438
-                                             var scrlheight = $("#msgListRowCell").height();
3439
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
3440
-
3441
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
3442
-                                         });
3443
-
3444
-
3445
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
3446
-			                 $("#diplNmAllMsg").css("color", "#04957b");
3447
-			                 $(this).css("color", "#1b8efe");
3448
-			             });
3449
-
3450
-
3451
-			             // Show again all the messages sent/received to/from the clicked number
3452
-			             $("#diplNmAllMsg").click(function() {
3453
-
3454
-                                         $("#loadMoreMsgsusr").css("display", "none");
3455
-//                                         $("#loadMoreMsgs").css("display", "block");                        
3456
-//                                         $("#loadMoreMsgs").css("display", "none");
3457
-
3458
-                                         var convDataprn = [];
3459
-                                         $.each(messagesPerNmbr[clckPhNumber], function(index, item) {
3460
-                                                convDataprn.push(item);
3461
-                                         });
3462
-
3463
-                                         // If the total number of messages is greater than the default number of messages to display, show the 'Load more messages' button
3464
-                                         if (convDataprn.length > nmbTblDefault) {
3465
-//                                             $("#loadMoreMsgsusr").css("display", "block");
3466
-                                             $("#loadMoreMsgs").css("display", "block");
3467
-                                             var nmbToBeLoaded = nmbTblDefault;
3468
-                                         } else {
3469
-                                             $("#loadMoreMsgs").css("display", "none");
3470
-                                             var nmbToBeLoaded = convDataprn.length;
3471
-                                         }
3472
-
3473
-
3474
-			                 var rowMessageArrprnst = [];
3475
-
3476
-			                 for (var n = nmbToBeLoaded - 1; n >= 0; n--) {
3477
-                                              rowMessageArrprnst.push(convDataprn[n]);
3478
-			                 }
3479
-
3480
-			                 var convDataPerNmbrprnst = rowMessageArrprnst.join("");
3481
-
3482
-                                         $("#msgListRowCell").empty();
3483
-                                         $("#msgListRowCell").append(convDataPerNmbrprnst);
3484
-
3485
-                                         // Scroll down to the bottom of the window
3486
-                                         $("#frmMsgLstWrap").animate({scrollTop:$("#frmMsgLstTbl").prop("scrollHeight")},200);
3487
-
3488
-
3489
-                                         // Load more messages
3490
-                                         var clckNb = 0;
3491
-                                         $("#loadMoreMsgsusr").unbind("click");
3492
-                                         $("#loadMoreMsgsusr").click(function() {
3493
-
3494
-                                             clckNb++;
3495
-                                             var crefnb = (clckNb + 1) * nmbToBeLoaded;
3496
-
3497
-                                             $("#loadMoreMsgs").css("display", "none");
3498
-
3499
-                                             if (crefnb > convDataprn.length) {
3500
-                                                 var nmbmsg = convDataprn.length - 1;
3501
-                                                 $("#loadMoreMsgsusr").css("display", "none");
3502
-                                             } else { 
3503
-                                                 var nmbmsg = crefnb - 1;
3504
-                                                 $("#loadMoreMsgsusr").css("display", "block");
3505
-                                             }
3506
-
3507
-                                             var rowMessageArrAddst = [];
3508
-
3509
-                                             for (var q = nmbmsg; q >= clckNb * nmbToBeLoaded; q--) {
3510
-
3511
-                                                  rowMessageArrAddst.push(convDataprn[q]);
3512
-                                             }
3513
-
3514
-			                     var convDataPerNmbradst = rowMessageArrAddst.join("");
3515
-
3516
-                                             var scrlheight = $("#msgListRowCell").height();
3517
-                                             $("#msgListRowCell").prepend(convDataPerNmbradst);
3518
-
3519
-                                             $("#frmMsgLstWrap").scrollTop($("#msgListRowCell").height() - scrlheight);
3520
-                                         });
3521
-
3522
-
3523
-			                 $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
3524
-			                 $("#diplNmAllMsg").css("color", "#04957b");
3525
-			                 $(this).css("color", "#04c6a4");
3526
-
3527
-			             });
3528
-
3529
-
3530
-				     // Show the scroll-up arrow
3531
-				     $("#frmMsgLstWrap").scroll(function() {
3532
-					if ($(this).scrollTop() > 900) {
3533
-					      $('#upArrowSmall').fadeIn();
3534
-					} else {
3535
-					      $('#upArrowSmall').fadeOut();
3536
-					}
3537
-				     });
3538
-
3539
-				     $("#upArrowSmall").click(function() {
3540
-					$("#frmMsgLstWrap").animate({scrollTop : 0},400);
3541
-				     });
3542
-
3543
-			  },
3544
-			  error: function() {
3545
-				     showAlert("Error while attempting to get message data from the database!");
3546
-				     $('#listAllMsgsFromTo').removeClass('icon-loading');
3547
-			  }
3548
-		   });
3549
-                }
3550
-
3551
-
3552
-                $('[id^="showMsgFrom-"]').click(function() {
3553
-
3554
-                   var ctrwnb = $(this).attr("id").replace("showMsgFrom-", "");
3555
-                   if ($("#frmNmbr-"+ ctrwnb).text().indexOf(":") > -1) {
3556
-                       var clckPhNumber = $("#frmNmbr-"+ ctrwnb).text().split(": ")[1];
3557
-                   } else { var clckPhNumber = $("#frmNmbr-"+ ctrwnb).text(); }
3558
-
3559
-                   showMsgPerNmbr(clckPhNumber);
3560
-                })
3561
-
3562
-                $('[id^="showMsgTo-"]').click(function() {
3563
-                   var ctrwnbTo = $(this).attr("id").replace("showMsgTo-", "");
3564
-                   var clckPhNbTo = $("#toNmbr-"+ ctrwnbTo).text();
3565
-
3566
-                   showMsgPerNmbr(clckPhNbTo);
3567
-                })
3568
-
3569
-
3570
-                // Add pagination
3571
-                var rowsShown = messagesperpage;
3572
-                var rowsTotal = $("#sentSmsTable tr").length;
3573
-                var numPages = (rowsTotal - 2) / rowsShown;
3574
-
3575
-                for (i = 0; i < numPages; i++) {
3576
-                     var pageNum = i + 1;
3577
-                     $('#paginationsent').append('<a href="#" rel="' + i + '" class="pagenumbers">' + pageNum + '</a> ');
3578
-                }
3579
-
3580
-                $('#paginationsent').children(":first").addClass('active');
3581
-
3582
-//                $(".sentrowsbody").hide();
3583
-
3584
-                $('#paginationsent a:first').addClass('active');
3585
-
3586
-                // Show table page when clicking on page number
3587
-                $('.pages a').bind('click', function () {
3588
-
3589
-                      $('#paginationsent').children().removeClass('active');
3590
-
3591
-                      $(this).addClass('active');
3592
-
3593
-                      var currentsentPgNo = $(this).text();
3594
-
3595
-                      $('#paginationsent a').each(function() {
3596
-                         if ($(this).text() == currentsentPgNo) {
3597
-                             $(this).addClass('active');
3598
-                         }
3599
-                      });
3600
-
3601
-                      // Sort table rows
3602
-		      var rows = $('#sentSmsTable tr').get();
3603
-
3604
-		      rows.sort(function(a, b) {
3605
-
3606
-		           var A = parseInt($('td.sentdbidcolumn', a).text());
3607
-		           var B = parseInt($('td.sentdbidcolumn', b).text());
3608
-
3609
-		           if (A < B) {
3610
-		               return -1;
3611
-		           }
3612
-
3613
-		           if (A > B) {
3614
-		               return 1;
3615
-		           }
3616
-
3617
-		           return 0;
3618
-		      });
3619
-
3620
-		      $.each(rows, function(index, row) {
3621
-		         $('#sentSmsTable').append(row);
3622
-		      });
3623
-
3624
-                      var currPage = $(this).attr('rel');
3625
-                      var startItem = currPage * rowsShown;
3626
-                      var endItem = startItem + rowsShown;
3627
-
3628
-                      $('.sentrowsbody').hide().slice(startItem, endItem).css('display', 'table-row');
3629
-
3630
-                      $('#totalsentmessages').remove();
3631
-                      $('#smstables').append("<div id='totalsentmessages'>Total displayed messages: " + sentparseddata.length + "</div>");
3632
-                });
3633
-
3634
-                $('#paginationsent').children(":last").trigger('click');
3635
-
3636
-                // Select all records
3637
-                $('#selectAllChckbx').change(function() {
3638
-                   if ($(this).is(':checked')) {
3639
-                       $(".indivchckbx").prop("checked", true);
3640
-                   } else {
3641
-                       $(".indivchckbx").prop("checked", false);
3642
-                   }
3643
-                });
3644
-
3645
-                function reorderSentRows() {
3646
-                    var currenttext = $(".filterbuttonsent").closest('[class="filterbuttonsent"]').find('[class="indivfiltersent"]').text();
3647
-                    if (currenttext == '') {
3648
-                        $('tr').sort(function (a, b) {
3649
-                           return parseInt($('td.sentdbidcolumn', b).text()) < parseInt($('td.sentdbidcolumn', a).text());
3650
-                        }).appendTo("#sentSmsTable");
3651
-                    }
3652
-                }
3653
-
3654
-                // Filter rows
3655
-                $("#databaseidfilter").on("click", function(event) {
3656
-
3657
-                       var databaseId = $("#dbidtextsent").val();
3658
-                       var msgrowsNo = 0;
3659
-
3660
-                       $(".sentrowsbody").each(function() {
3661
-
3662
-                          var checkEmpty = 0;
3663
-                          $(".indivfiltersent").not("#dbidtextsent").each(function() {
3664
-                              if ($(this).val() != '') {
3665
-                                  checkEmpty = 1;
3666
-                              }
3667
-                          });
3668
-
3669
-                          if (checkEmpty == 0) {
3670
-                              $(this).show();
3671
-                          }
3672
-
3673
-                          if (databaseId != '') {
3674
-                             if ($(this).find('[class="sentdbidcolumn"]').text() == databaseId) {
3675
-                                 $("#sentSmsTable").append(this);
3676
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
3677
-                             } else {
3678
-                                 $(this).hide();
3679
-                             }
3680
-                          } else {
3681
-                                 $(this).show();
3682
-                                 msgrowsNo++;
3683
-                          }
3684
-                       });
3685
-
3686
-                       reorderSentRows();
3687
-                       $('#totalsentmessages').remove();
3688
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3689
-                });
3690
-
3691
-                $("#useridfilter").on("click", function(event) {
3692
-
3693
-                       var useridtxt = $("#useridtext").val().toLowerCase();
3694
-                       var msgrowsNo = 0;
3695
-
3696
-                       $(".sentrowsbody").each(function() {
3697
-
3698
-                          var checkEmpty1 = 0;
3699
-                          $(".indivfiltersent").not("#useridtext").each(function() {
3700
-                              if ($(this).val() != '') {
3701
-                                  checkEmpty1 = 1;
3702
-                              }
3703
-                          });
3704
-
3705
-                          if (checkEmpty1 == 0) {
3706
-                              $(this).show();
3707
-                          }
3708
-
3709
-                          if (useridtxt != '') {
3710
-                              var founduserid = $(this).find('[class="useridcolsent"]').text().toLowerCase();
3711
-                              if (founduserid.indexOf(useridtxt) != -1) {
3712
-                                  $("#sentSmsTable").append(this);
3713
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
3714
-                             } else {
3715
-                                  $(this).hide();
3716
-                             }
3717
-                          } else {
3718
-                                  $(this).show();
3719
-                                  msgrowsNo++;
3720
-                          }
3721
-                       });
3722
-
3723
-                       reorderSentRows();
3724
-                       $('#totalsentmessages').remove();
3725
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3726
-                });
3727
-
3728
-                $("#messageidfilter").on("click", function(event) {
3729
-
3730
-                       var messageidtxt = $("#messageidtext").val().toLowerCase();
3731
-                       var msgrowsNo = 0;
3732
-
3733
-                       $(".sentrowsbody").each(function() {
3734
-
3735
-                          var checkEmpty2 = 0;
3736
-                          $(".indivfiltersent").not("#messageidtext").each(function() {
3737
-                              if ($(this).val() != '') {
3738
-                                  checkEmpty2 = 1;
3739
-                              }
3740
-                          });
3741
-
3742
-                          if (checkEmpty2 == 0) {
3743
-                              $(this).show();
3744
-                          }
3745
-
3746
-                          if (messageidtxt != '') {
3747
-                              var foundtdmssgid = $(this).find('[class="messageidcolsent"]').text().toLowerCase();
3748
-                              if (foundtdmssgid.indexOf(messageidtxt) != -1) {
3749
-                                  $("#sentSmsTable").append(this);
3750
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
3751
-                              } else {
3752
-                                  $(this).hide();
3753
-                              }
3754
-                          } else {
3755
-                                  $(this).show();
3756
-                                  msgrowsNo++;
3757
-                          }
3758
-                       });
3759
-
3760
-                       reorderSentRows();
3761
-                       $('#totalsentmessages').remove();
3762
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3763
-                });
3764
-
3765
-                $("#datefilter").on("click", function(event) {
3766
-
3767
-                       var datetxtvr = $("#datetext").val().toLowerCase();
3768
-                       var msgrowsNo = 0;
3769
-
3770
-                       $(".sentrowsbody").each(function() {
3771
-
3772
-                          var checkEmpty3 = 0;
3773
-                          $(".indivfiltersent").not("#datetext").each(function() {
3774
-                              if ($(this).val() != '') {
3775
-                                  checkEmpty3 = 1;
3776
-                              }
3777
-                          });
3778
-
3779
-                          if (checkEmpty3 == 0) {
3780
-                              $(this).show();
3781
-                          }
3782
-
3783
-                          if (datetxtvr != '') {
3784
-                             var founddate = $(this).find('[class="datecolsent"]').text().toLowerCase();
3785
-                             if (founddate.indexOf(datetxtvr) != -1) {
3786
-                                 $("#sentSmsTable").append(this);
3787
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
3788
-                             } else {
3789
-                                 $(this).hide();
3790
-                             }
3791
-                          } else {
3792
-                                 $(this).show();
3793
-                                 msgrowsNo++;
3794
-                          }
3795
-                       });
3796
-
3797
-                       reorderSentRows();
3798
-                       $('#totalsentmessages').remove();
3799
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3800
-                });
3801
-
3802
-                $("#fromfilter").on("click", function(event) {
3803
-
3804
-                       var fromtxtvr = $("#fromtext").val().toLowerCase();
3805
-                       var msgrowsNo = 0;
3806
-
3807
-                       $(".sentrowsbody").each(function() {
3808
-
3809
-                          var checkEmpty4 = 0;
3810
-                          $(".indivfiltersent").not("#fromtext").each(function() {
3811
-                              if ($(this).val() != '') {
3812
-                                  checkEmpty4 = 1;
3813
-                              }
3814
-                          });
3815
-
3816
-                          if (checkEmpty4 == 0) {
3817
-                              $(this).show();
3818
-                          }
3819
-
3820
-                          if (fromtxtvr != '') {
3821
-                             var foundfrom = $(this).find('[class="fromcolumnsent"]').text().toLowerCase();
3822
-                             if (foundfrom.indexOf(fromtxtvr) != -1) {
3823
-                                 $("#sentSmsTable").append(this);
3824
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
3825
-                             } else {
3826
-                                 $(this).hide();
3827
-                             }
3828
-                          } else {
3829
-                                 $(this).show();
3830
-                                 msgrowsNo++;
3831
-                          }
3832
-                       });
3833
-
3834
-                       reorderSentRows();
3835
-                       $('#totalsentmessages').remove();
3836
-                       $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3837
-                });
3838
-
3839
-                $("#tofilter").on("click", function(event) {
3840
-
3841
-                      var totxtvr = $("#totext").val().toLowerCase();
3842
-                      var msgrowsNo = 0;
3843
-
3844
-                      $(".sentrowsbody").each(function() {
3845
-
3846
-                          var checkEmpty5 = 0;
3847
-                          $(".indivfiltersent").not("#totext").each(function() {
3848
-                              if ($(this).val() != '') {
3849
-                                  checkEmpty5 = 1;
3850
-                              }
3851
-                          });
3852
-
3853
-                          if (checkEmpty5 == 0) {
3854
-                              $(this).show();
3855
-                          }
3856
-
3857
-                          if (totxtvr != '') {
3858
-                             var foundto = $(this).find('[class="tocolumnsent"]').text().toLowerCase();
3859
-                             if (foundto.indexOf(totxtvr) != -1) {
3860
-                                 $("#sentSmsTable").append(this);
3861
-                                 if ($(this).is(":visible")) { msgrowsNo++; }
3862
-                             } else {
3863
-                                 $(this).hide();
3864
-                             }
3865
-                          } else {
3866
-                                 $(this).show();
3867
-                                 msgrowsNo++;
3868
-                          }
3869
-                      });
3870
-
3871
-                      reorderSentRows();
3872
-                      $('#totalsentmessages').remove();
3873
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3874
-                });
3875
-
3876
-                $("#networkfilter").on("click", function(event) {
3877
-
3878
-                      var networktxtvr = $("#networktext").val().toLowerCase();
3879
-                      var msgrowsNo = 0;
3880
-
3881
-                      $(".sentrowsbody").each(function() {
3882
-
3883
-                          var checkEmpty6 = 0;
3884
-                          $(".indivfiltersent").not("#networktext").each(function() {
3885
-                              if ($(this).val() != '') {
3886
-                                  checkEmpty6 = 1;
3887
-                              }
3888
-                          });
3889
-
3890
-                          if (checkEmpty6 == 0) {
3891
-                              $(this).show();
3892
-                          }
3893
-
3894
-                          if (networktxtvr != '') {
3895
-                              var foundnetwork = $(this).find('[class="networkcolumnsent"]').text().toLowerCase();
3896
-                              if (foundnetwork.indexOf(networktxtvr) != -1) {
3897
-                                  $("#sentSmsTable").append(this);
3898
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
3899
-                              } else {
3900
-                                  $(this).hide();
3901
-                              }
3902
-                          } else {
3903
-                                  $(this).show();
3904
-                                  msgrowsNo++;
3905
-                          }
3906
-                      });
3907
-
3908
-                      reorderSentRows();
3909
-                      $('#totalsentmessages').remove();
3910
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3911
-                });
3912
-
3913
-                $("#pricefilter").on("click", function(event) {
3914
-
3915
-                      var pricetxtvr = $("#pricetext").val().toLowerCase();
3916
-                      var msgrowsNo = 0;
3917
-
3918
-                      $(".sentrowsbody").each(function() {
3919
-
3920
-                          var checkEmpty7 = 0;
3921
-                          $(".indivfiltersent").not("#pricetext").each(function() {
3922
-                              if ($(this).val() != '') {
3923
-                                  checkEmpty7 = 1;
3924
-                              }
3925
-                          });
3926
-
3927
-                          if (checkEmpty7 == 0) {
3928
-                              $(this).show();
3929
-                          }
3930
-
3931
-                          if (pricetxtvr != '') {
3932
-                              var foundprice = $(this).find('[class="pricecolumnsent"]').text().toLowerCase();
3933
-                              if (foundprice.indexOf(pricetxtvr) != -1) {
3934
-                                  $("#sentSmsTable").append(this);
3935
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
3936
-                              } else {
3937
-                                  $(this).hide();
3938
-                              }
3939
-                          } else {
3940
-                                  $(this).show();
3941
-                                  msgrowsNo++;
3942
-                          }
3943
-                      });
3944
-
3945
-                      reorderSentRows();
3946
-                      $('#totalsentmessages').remove();
3947
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3948
-                });
3949
-
3950
-                $("#statusfilter").on("click", function(event) {
3951
-
3952
-                      var statustxtvr = $("#statustext").val().toLowerCase();
3953
-                      var msgrowsNo = 0;
3954
-
3955
-                      $(".sentrowsbody").each(function() {
3956
-
3957
-                          var checkEmpty8 = 0;
3958
-                          $(".indivfiltersent").not("#statustext").each(function() {
3959
-                              if ($(this).val() != '') {
3960
-                                  checkEmpty8 = 1;
3961
-                              }
3962
-                          });
3963
-
3964
-                          if (checkEmpty8 == 0) {
3965
-                              $(this).show();
3966
-                          }
3967
-
3968
-                          if (statustxtvr != '') {
3969
-                              var foundstatus = $(this).find('[class="statuscolumnsent"]').text().toLowerCase();
3970
-                              if (foundstatus.indexOf(statustxtvr) != -1) {
3971
-                                  $("#sentSmsTable").append(this);
3972
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
3973
-                              } else {
3974
-                                  $(this).hide();
3975
-                              }
3976
-                          } else {
3977
-                                  $(this).show();
3978
-                                  msgrowsNo++;
3979
-                          }
3980
-                      });
3981
-
3982
-                      reorderSentRows();
3983
-                      $('#totalsentmessages').remove();
3984
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
3985
-                });
3986
-
3987
-                $("#deliveryrecfilter").on("click", function(event) {
3988
-
3989
-                      var deliverytxtvr = $("#deliveryrcpttext").val().toLowerCase();
3990
-                      var msgrowsNo = 0;
3991
-
3992
-                      $(".sentrowsbody").each(function() {
3993
-
3994
-                          var checkEmpty9 = 0;
3995
-                          $(".indivfiltersent").not("#deliveryrcpttext").each(function() {
3996
-                              if ($(this).val() != '') {
3997
-                                  checkEmpty9 = 1;
3998
-                              }
3999
-                          });
4000
-
4001
-                          if (checkEmpty9 == 0) {
4002
-                              $(this).show();
4003
-                          }
4004
-
4005
-                          if (deliverytxtvr != '') {
4006
-                              var founddeliveryrcpt = $(this).find('[class="deliveryrcptcolsent"]').text().toLowerCase();
4007
-                              if (founddeliveryrcpt.indexOf(deliverytxtvr) != -1) {
4008
-                                  $("#sentSmsTable").append(this);
4009
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4010
-                              } else {
4011
-                                  $(this).hide();
4012
-                              }
4013
-                          } else {
4014
-                                  $(this).show();
4015
-                                  msgrowsNo++;
4016
-                          }
4017
-                      });
4018
-
4019
-                      reorderSentRows();
4020
-                      $('#totalsentmessages').remove();
4021
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4022
-                });
4023
-
4024
-                $("#messagefilter").on("click", function(event) {
4025
-
4026
-                      var messagetxtvr = $("#messagetext").val().toLowerCase();
4027
-                      var msgrowsNo = 0;
4028
-
4029
-                      $(".sentrowsbody").each(function() {
4030
-
4031
-                          var checkEmpty10 = 0;
4032
-                          $(".indivfiltersent").not("#messagetext").each(function() {
4033
-                              if ($(this).val() != '') {
4034
-                                  checkEmpty10 = 1;
4035
-                              }
4036
-                          });
4037
-
4038
-                          if (checkEmpty10 == 0) {
4039
-                              $(this).show();
4040
-                          }
4041
-
4042
-                          if (messagetxtvr != '') {
4043
-                              var foundmessage = $(this).find('[class="messagecolumnsent"]').text().toLowerCase();
4044
-                              if (foundmessage.indexOf(messagetxtvr) != -1) {
4045
-                                  $("#sentSmsTable").append(this);
4046
-                                  if ($(this).is(":visible")) { msgrowsNo++; }
4047
-                              } else {
4048
-                                  $(this).hide();
4049
-                              }
4050
-                          } else {
4051
-                                  $(this).show();
4052
-                                  msgrowsNo++;
4053
-                          }
4054
-                      });
4055
-
4056
-                      reorderSentRows();
4057
-                      $('#totalsentmessages').remove();
4058
-                      $('#smstables').append("<div id='totalsentmessages'>Total filtered messages: " + msgrowsNo + "</div>");
4059
-                });
4060
-
4061
-                // Clear all filters
4062
-                $("#clearsentfilters").on("click", function(event) {
4063
-                       $(".sentrowsbody").each(function() {
4064
-                          $(this).show();
4065
-                       });
4066
-                       $(".indivfiltersent").val("");
4067
-                       $('#totalsentmessages').remove();
4068
-                       $('#smstables').append("<div id='totalsentmessages'>Total displayed messages: " + sentparseddata.length + "</div>");
4069
-                });
4070
-
4071
-                // Delete selected rows from the database
4072
-                $("#deletesentrows").on("click", function() {
4073
-
4074
-                   var checkcheckbx = jQuery("#sentSmsTable input[type=checkbox]:checked").length;
4075
-                   if (checkcheckbx == 0) {
4076
-                       showAlert("Please select the row(s) to permanently delete from the database !");
4077
-                   } else {
4078
-                          var sentcheckboxIds = [];
4079
-                          $(".sentrowsbody").each(function() {
4080
-                             var sentrowcheckbx = $(this).find('input[type="checkbox"]');
4081
-                             if (sentrowcheckbx.is(":checked")) {
4082
-                                 var dbrowid = $(this).find('[class="sentdbidcolumn"]').text();
4083
-                                 sentcheckboxIds.push(dbrowid);
4084
-                             }
4085
-                          });
4086
-
4087
-                          if (confirm("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'.")) {
4088
-
4089
-                              var deletesentRowsUrl = OC.generateUrl("/apps/sms_relentless/user/removesentrows");
4090
-                              $('#smstables').addClass('icon-loading');
4091
-
4092
-                              $.ajax({
4093
-                                   url: deletesentRowsUrl + '/' + userid,
4094
-                                   method: "POST",
4095
-                                   dataType:'text',
4096
-                                   data: {sentmessagedbIDs: sentcheckboxIds},
4097
-                                   success: function() {
4098
-                                            showAlert("The row(s) have been deleted successfully !");
4099
-                                            $('#smstables').removeClass('icon-loading');
4100
-                                            $('#sentsmstableshow').click();
4101
-                                   },
4102
-                                   error: function() {
4103
-                                            showAlert("There was an error while deleting the selected row(s) !");
4104
-                                            $('#smstables').removeClass('icon-loading');
4105
-                                   }
4106
-                              });
4107
-                          }
4108
-                    }
4109
-                });
4110
-
4111
-                // Show/Hide filter row
4112
-	        $('#sentarrow').on('click', function() {
4113
-	           if ($('#sentfiltersrow').is(':visible')) {
4114
-		       $('#sentfiltersrow').hide();
4115
-                       $('#sentheaderrow').css('top', '0px');
4116
-                       $(this).removeClass('arrowUpCl');
4117
-                       $(this).addClass('arrowDownCl');
4118
-		   } else {
4119
-		       $('#sentfiltersrow').show();
4120
-                       $('#sentheaderrow').css('top', '158px');
4121
-                       $(this).removeClass('arrowDownCl');
4122
-                       $(this).addClass('arrowUpCl');
4123
-                   }
4124
-                });
4125
-
4126
-                $("#app-content").animate({scrollTop:$("#sentSmsTable").prop("scrollHeight")},200);
4127
-          },
4128
-          error: function(sentdatafromdb) {
4129
-                showAlert("Error! You can check the Nextcloud log to find more details about this issue.");
4130
-                $('#smstables').removeClass('icon-loading');
4131
-          }
4132
-     });
4133
-
4134
-  });
4135
-
4136
-  // List grouped messages
4137
-  $("#groupedtableshow").on("click", function(event) {
4138
-
4139
-     $('#smstables').empty();
4140
-     var getGroupedUrl = OC.generateUrl("/apps/sms_relentless/user/getgroupedtable");
4141
-
4142
-     $('#smstables').addClass('icon-loading');
4143
-     var totalPhNmbrs = 0;
4144
-
4145
-     $.ajax({
4146
-          method: 'GET',
4147
-          url: getGroupedUrl + '/' + userid,
4148
-          contentType: 'application/json',
4149
-          success: function(groupedparsed) {
4150
-
4151
-		        $('#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>");
4152
-		        $('#smstables').append("<table id='groupedSmsTable'></table>");
4153
-
4154
-                        $('#groupedSmsTable').append("<tr id='grpfiltersrow'><td colspan='2'><div id='filterByNumber'></div></td><td><button id='cleargrpfilter' title='Clear the filter'></button></td></tr>");
4155
-                        $('#groupedSmsTable').append("<tr class='groupedmsgrows' id='grpheaderrow'><th>Phone Number</th><th>Senders / Receivers</th><th>Messages</th></tr>");
4156
-
4157
-                        $('#grpfiltersrow').hide();
4158
-
4159
-                        var fromtoNmbrsData = [];
4160
-                        var fromtoNumberArr = [];
4161
-
4162
-		        for (var i = 0; i < groupedparsed.length; i++) {
4163
-
4164
-			     if (groupedparsed[i].author_displayname) {
4165
-			         var authordnm = groupedparsed[i].author_displayname;
4166
-			     } else { 
4167
-//			         var authordnm = groupedparsed[i].user_id;
4168
-			         var authordnm = '';
4169
-			     }
4170
-
4171
-			     var sentfromnmbrarr = groupedparsed[i].from.split("+");
4172
-                             if (sentfromnmbrarr[1]) {
4173
-			         var groupednbfrom = "+"+ sentfromnmbrarr[1];
4174
-                             } else {
4175
-			         var groupednbfrom = sentfromnmbrarr[0];
4176
-                             }
4177
-
4178
-                             var modmessage = '';
4179
-                             if (groupedparsed[i].author_displayname) {
4180
-			         modmessage = "<span class='msgAuthorNameGrp'>"+ groupedparsed[i].author_displayname + ":</span>" + groupedparsed[i].message;
4181
-                             } else {
4182
-			         modmessage = groupedparsed[i].message;
4183
-                             }
4184
-
4185
-                             if (groupedparsed[i].to.indexOf(": ") > -1) {
4186
-                                 var groupednmbrtopre = groupedparsed[i].to.split(": ");
4187
-                                 var groupednmbrto = groupednmbrtopre[1];
4188
-                             } else { 
4189
-                                 var groupednmbrto = groupedparsed[i].to;
4190
-                             }
4191
-
4192
-                             fromtoNmbrsData.push({
4193
-                                       'author_displayname': authordnm,
4194
-                                       'from': groupednbfrom,
4195
-                                       'to': groupednmbrto,
4196
-                                       'message': modmessage,
4197
-                                       'date': groupedparsed[i].date,
4198
-                                       'status': groupedparsed[i].deliveryreceipt,
4199
-                                       'table': groupedparsed[i].table
4200
-                             });
4201
-
4202
-                             if (fromtoNumberArr.indexOf(groupednbfrom) == -1) { fromtoNumberArr.push(groupednbfrom); }
4203
-                             if (fromtoNumberArr.indexOf(groupednmbrto) == -1) { fromtoNumberArr.push(groupednmbrto); }
4204
-		        }
4205
-
4206
-                        totalPhNmbrs = fromtoNumberArr.length;
4207
-
4208
-                        // Remove the duplicates
4209
-			var noDupMsgData = [];
4210
-			$.each(fromtoNmbrsData, function(i, e) {
4211
-			    var matchingData = $.grep(noDupMsgData, function(item) {
4212
-                                return item.from == e.from && item.to == e.to && item.message == e.message && item.table == 'received' && e.table == 'sent'
4213
-			    });
4214
-			    if (matchingData.length === 0) {
4215
-				noDupMsgData.push(e);
4216
-			    }
4217
-			});
4218
-
4219
-                        var messagesPerNmbr = {};
4220
-                        var msgsNamesPerNmbr = {};
4221
-                        var msgsNmbrsNames = {};
4222
-
4223
-                        for (var k = 0; k < fromtoNumberArr.length; k++) {
4224
-
4225
-                             var displayNamesarr = [];
4226
-                             var convData = [];
4227
-
4228
-                             for (var n = 0; n < noDupMsgData.length; n++) {
4229
-
4230
-                                  if (noDupMsgData[n]['from'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'sent') {
4231
-
4232
-                                      convData.push({
4233
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
4234
-                                                     'message': noDupMsgData[n]['message'],
4235
-                                                     'from': noDupMsgData[n]['from'],
4236
-                                                     'to': noDupMsgData[n]['to'],
4237
-                                                     'date': noDupMsgData[n]['date'],
4238
-                                                     'direction': 'sent_from',
4239
-                                                     'status': noDupMsgData[n]['status'],
4240
-                                                     'table': noDupMsgData[n]['table']
4241
-                                      });
4242
-
4243
-                                  } else if (noDupMsgData[n]['to'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'sent') {
4244
-
4245
-                                      convData.push({
4246
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
4247
-                                                     'message': noDupMsgData[n]['message'],
4248
-                                                     'from': noDupMsgData[n]['from'],
4249
-                                                     'to': noDupMsgData[n]['to'],
4250
-                                                     'date': noDupMsgData[n]['date'],
4251
-                                                     'direction': 'sent_to',
4252
-                                                     'status': noDupMsgData[n]['status'],
4253
-                                                     'table': noDupMsgData[n]['table']
4254
-                                      });
4255
-
4256
-
4257
-                                  } else if (noDupMsgData[n]['from'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'received') {
4258
-
4259
-                                      convData.push({
4260
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
4261
-                                                     'message': noDupMsgData[n]['message'],
4262
-                                                     'from': noDupMsgData[n]['from'],
4263
-                                                     'to': noDupMsgData[n]['to'],
4264
-                                                     'date': noDupMsgData[n]['date'],
4265
-                                                     'direction': 'received_from',
4266
-                                                     'status': noDupMsgData[n]['status'],
4267
-                                                     'table': noDupMsgData[n]['table']
4268
-                                      });
4269
-
4270
-                                  } else if (noDupMsgData[n]['to'] == fromtoNumberArr[k] && noDupMsgData[n]['table'] == 'received') {
4271
-
4272
-                                      convData.push({
4273
-                                                     'author_displayname': noDupMsgData[n]['author_displayname'],
4274
-                                                     'message': noDupMsgData[n]['message'],
4275
-                                                     'from': noDupMsgData[n]['from'],
4276
-                                                     'to': noDupMsgData[n]['to'],
4277
-                                                     'date': noDupMsgData[n]['date'],
4278
-                                                     'direction': 'received_on',
4279
-                                                     'status': noDupMsgData[n]['status'],
4280
-                                                     'table': noDupMsgData[n]['table']
4281
-                                      });
4282
-                                  }
4283
-                             }
4284
-
4285
-                             // Sort messages by date
4286
-		             convData.sort(function(a, b) {
4287
-			        var c = new Date(a.date);
4288
-			        var d = new Date(b.date);
4289
-			        return c-d;
4290
-		             });
4291
-
4292
-                             // Collect the display names of the users that sent messages from the current number
4293
-                             var selectedNames = [];
4294
-                             var displayNames = '';
4295
-                             for (var v = 0; v < convData.length; v++) {
4296
-                                  if (selectedNames.indexOf(convData[v]['author_displayname']) == -1) { 
4297
-                                      selectedNames.push(convData[v]['author_displayname']);
4298
-                                      displayNames += "<div id='diplNm_"+ fromtoNumberArr[k] +"_"+ v +"' class='dispNameList' name='"+ convData[v]['author_displayname'] +"'>"+ convData[v]['author_displayname'] +"</div>";
4299
-                                  }
4300
-                             }
4301
-
4302
-                             // Store the display names for the current number, to be able to see them later when selecting the number from the drop-down list
4303
-                             var ctPhNumber = fromtoNumberArr[k];
4304
-                             msgsNamesPerNmbr[ctPhNumber] = displayNames;
4305
-
4306
-                             // Store the messages sent by each user, to be able to see them later when clicking on the user's name
4307
-                             for (var h = 0; h < selectedNames.length; h++) {
4308
-
4309
-                                  var rowMessageArrpn = [];
4310
-                                  for (var b = 0; b < convData.length; b++) {
4311
-
4312
-                                       if (selectedNames[h] == convData[b]['author_displayname']) {
4313
-
4314
-		                           if (convData[b]['direction'] == 'sent_from') {
4315
-		                               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
4316
-		                                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
4317
-		                               } else {
4318
-		                                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
4319
-		                               }
4320
-		                               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
4321
-		                           } else if (convData[b]['direction'] == 'sent_to') {
4322
-		                               if (convData[b]['status'].indexOf("delivered") > -1 || convData[b]['status'].indexOf("delivery success") > -1) {
4323
-		                                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
4324
-		                               } else {
4325
-		                                   var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
4326
-		                               }
4327
-		                               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
4328
-		                           } else if (convData[b]['direction'] == 'received_from') {
4329
-		                               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
4330
-		                           } else if (convData[b]['direction'] == 'received_on') {
4331
-		                               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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[b]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[b]['date'] +"</div></div>");
4332
-                                           }
4333
-                                       }
4334
-                                  }
4335
-                                  var convDataPerNmbrpn = rowMessageArrpn.join("<br>");
4336
-                                  var crtNmber = fromtoNumberArr[k];
4337
-                                  var crtName = selectedNames[h];
4338
-                                  msgsNmbrsNames[crtNmber] = msgsNmbrsNames[crtNmber] || {};
4339
-                                  msgsNmbrsNames[crtNmber][crtName] = convDataPerNmbrpn;
4340
-                             }
4341
-
4342
-                             var rowMessageArr = [];
4343
-                             for (var m = 0; m < convData.length; m++) {
4344
-
4345
-                                  if (convData[m]['direction'] == 'sent_from') {
4346
-
4347
-                                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
4348
-                                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
4349
-                                      } else {
4350
-                                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
4351
-                                      }
4352
-                                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
4353
-
4354
-                                  } else if (convData[m]['direction'] == 'sent_to') {
4355
-
4356
-                                      if (convData[m]['status'].indexOf("delivered") > -1 || convData[m]['status'].indexOf("delivery success") > -1) {
4357
-                                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/check.svg' title='`delivery success` received.'>";
4358
-                                      } else {
4359
-                                          var sentMsgStatus = "<img src='/apps/sms_relentless/img/question.svg' title='This message did not receive a `delivery success` receipt. However, it is possible that it reached its destination.'>";
4360
-                                      }
4361
-                                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ 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>");
4362
-
4363
-                                  } else if (convData[m]['direction'] == 'received_from') {
4364
-
4365
-		                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
4366
-
4367
-                                  } else if (convData[m]['direction'] == 'received_on') {
4368
-
4369
-		                      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='/apps/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:15px;color:#353535;font-weight:500;white-space:normal;'>"+ convData[m]['message'] +"</div><div style='display:block;margin:6px 0px 0px 4px;font-size:12.5px;color:#353535;'>"+ convData[m]['date'] +"</div></div>");
4370
-                                  }
4371
-                             }
4372
-
4373
-                             var convDataPerNmbr = rowMessageArr.join("");
4374
-
4375
-                             var rowPhoneNumber = "<div id='nmbrow_"+ fromtoNumberArr[k] +"' class='phoneNmbrRow'>"+ fromtoNumberArr[k] +"</div>";
4376
-
4377
-		             $("#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>");
4378
-                             $("#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='/apps/sms_relentless/img/arrowDown.svg'></div><td></tr>");
4379
-
4380
-                             // Store the messages for the current number, to be able to see them later, when clicking on the number
4381
-                             var ctNmbr = fromtoNumberArr[k];
4382
-                             messagesPerNmbr[ctNmbr] = convDataPerNmbr;
4383
-                        }
4384
-
4385
-
4386
-                        // Add the 'filter by number' drop-down list
4387
-                        var nmbrslst = "<option value='title'>Filter messages by number</option>";
4388
-                        for (var p = 0; p < fromtoNumberArr.length; p++) {
4389
-                             nmbrslst += "<option value='"+ fromtoNumberArr[p] +"'>"+ fromtoNumberArr[p] +"</option>";
4390
-                        }
4391
-                        $("#filterByNumber").append("<select id='selectListedNmbrs'>"+ nmbrslst +"</select>");
4392
-
4393
-
4394
-                        $("#selectListedNmbrs").change(function() {
4395
-
4396
-                          var selectedNmbr = $(this).val();
4397
-
4398
-                          if (selectedNmbr != "title") {
4399
-
4400
-                              $(".groupedrowsbody,.groupedrowsexp").each(function() { $(this).hide(); });
4401
-		              $("#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>");
4402
-                              $("#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='/apps/sms_relentless/img/arrowDown.svg'></div><td></tr>");
4403
-
4404
-
4405
-                               // Show the messages sent by each user whose name is listed for the phone number of the current row
4406
-                               $('[id*="diplNm_"]').click(function() {
4407
-
4408
-                                  var crntNmbr = $(this).attr("id").split("_")[1];
4409
-                                  var crntDisName = $(this).attr("name");                        
4410
-                                  var clsmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
4411
-                                  clsmsgcell.empty();
4412
-                                  clsmsgcell.html(msgsNmbrsNames[crntNmbr][crntDisName]);
4413
-
4414
-                                  $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
4415
-                                  $(this).css("color", "#1483f0");
4416
-                                  $("#nmbrow_"+ selectedNmbr).css("color", "#06866f");
4417
-                                  $(".groupedLstNmbr").each(function () { $(this).css("color", "#06866f"); });
4418
-                               });
4419
-
4420
-
4421
-		               // Show all the messages sent to/from the clicked number
4422
-		               $('[id*="nmbrow_"]').click(function() {
4423
-		                  var rwNmbr = $(this).attr("id").replace("nmbrow_", "");
4424
-		                  var rowmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
4425
-		                  rowmsgcell.empty();
4426
-		                  rowmsgcell.html(messagesPerNmbr[rwNmbr]);
4427
-
4428
-		                  $(".phoneNmbrRow").each(function() { $(this).css("color", "#06866f"); });
4429
-		                  $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
4430
-		                  $(this).css("color", "#08b899");
4431
-		               });
4432
-
4433
-
4434
-		               // Expand the rows to see all the messages
4435
-		               $('[id^="expandRowfl_"]').click(function() {
4436
-		                   var idnumbrfl = $(this).attr("id").replace("expandRowfl_", "");
4437
-		                   var crntExpandfl = $(this).find(".expandGrpRow");
4438
-
4439
-		                   if (crntExpandfl.attr('src') == '/apps/sms_relentless/img/arrowDown.svg') {
4440
-                                       $("#singlerowfl_"+ idnumbrfl).find(".fixedRowHeight").removeClass("fixedRowHeight");
4441
-		                       crntExpandfl.attr('src', '/apps/sms_relentless/img/arrowUp.svg');
4442
-		                   } else {
4443
-                                       $("#singlerowfl_"+ idnumbrfl).find(".groupedLstNmbr,.groupedLstNames,.groupedLstMsgs").addClass("fixedRowHeight");
4444
-                                       crntExpandfl.attr('src', '/apps/sms_relentless/img/arrowDown.svg'); 
4445
-		                   }
4446
-		               });
4447
-
4448
-		               $('#totalgrpmessages').remove();
4449
-		               $('#smstables').append("<div id='totalgrpmessages'>Total displayed phone numbers: 1</div>");
4450
-                           }
4451
-                        });
4452
-
4453
-                        // Clear the 'filter by number' filter
4454
-                        $("#cleargrpfilter").click(function() {
4455
-                               $('[id^="singlerowfl_"]').remove();
4456
-                               $('[id^="expandRowfl_"]').remove();
4457
-                               $(".groupedrowsbody,.groupedrowsexp").each(function() { $(this).show(); });
4458
-                               $("#selectListedNmbrs").val("title");
4459
-		               $('#totalgrpmessages').remove();
4460
-		               $('#smstables').append("<div id='totalgrpmessages'>Total displayed phone numbers: "+ totalPhNmbrs +"</div>");
4461
-                        });
4462
-
4463
-                        // Show the messages sent by each user whose name is listed for the phone number on the current row
4464
-                        $('[id*="diplNm_"]').click(function() {
4465
-
4466
-                           var crntNmbr = $(this).attr("id").split("_")[1];
4467
-                           var crntDisName = $(this).attr("name");                               
4468
-                           var clsmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
4469
-                           clsmsgcell.empty();
4470
-                           clsmsgcell.html(msgsNmbrsNames[crntNmbr][crntDisName]);
4471
-
4472
-                           $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
4473
-                           $(this).css("color", "#1483f0");
4474
-                        });
4475
-
4476
-                        // Show all the messages sent to/from the clicked number
4477
-                        $('[id*="nmbrow_"]').click(function() {
4478
-                           var rwNmbr = $(this).attr("id").replace("nmbrow_", "");
4479
-                           var rowmsgcell = $(this).closest(".groupedrowsbody").find(".groupedLstMsgs");
4480
-                           rowmsgcell.empty();
4481
-                           rowmsgcell.html(messagesPerNmbr[rwNmbr]);
4482
-
4483
-                           $(".phoneNmbrRow").each(function() { $(this).css("color", "#06866f"); });
4484
-                           $(".dispNameList").each(function() { $(this).css("color", "#0a559e"); });
4485
-                           $(this).css("color", "#08b899");
4486
-                        });
4487
-
4488
-
4489
-		        $('#smstables').removeClass('icon-loading');
4490
-		        $('#recarrow').removeClass('arrowUpCl');
4491
-		        $('#recarrow').addClass('arrowDownCl');
4492
-
4493
-                        // Expand the rows to see all the messages
4494
-                        $('[id^="expandRow_"]').click(function() {
4495
-                            var idnumbr = $(this).attr("id").replace("expandRow_", "");
4496
-                            var crntExpand = $(this).find(".expandGrpRow");
4497
-
4498
-                            if (crntExpand.attr('src') == '/apps/sms_relentless/img/arrowDown.svg') {
4499
-                                $("#singlerow_"+ idnumbr).find(".fixedRowHeight").removeClass("fixedRowHeight");
4500
-                                crntExpand.attr('src', '/apps/sms_relentless/img/arrowUp.svg');
4501
-                            } else {
4502
-                                $("#singlerow_"+ idnumbr).find(".groupedLstNmbr,.groupedLstNames,.groupedLstMsgs").addClass("fixedRowHeight");
4503
-                                crntExpand.attr('src', '/apps/sms_relentless/img/arrowDown.svg'); 
4504
-                            }
4505
-                        });
4506
-
4507
-
4508
-		        // Add pagination
4509
-		        var rowsShowngrp = messagesperpage;
4510
-		        var rowsTotalgrp = $("#groupedSmsTable tr").length;
4511
-
4512
-		        var numPagesgrp = ((rowsTotalgrp - 2) / rowsShowngrp) / 2;
4513
-
4514
-		        for (i = 0; i < numPagesgrp; i++) {
4515
-		             var pageNumgrp = i + 1;
4516
-		             $('#paginationgrp').append('<a href="#" rel="' + i + '" class="pagenumbersgrp">' + pageNumgrp + '</a> ');
4517
-		        }
4518
-
4519
-		        $('#paginationgrp').children(":first").addClass('active');
4520
-
4521
-		        $(".groupedrowsbody,.groupedrowsexp").hide();
4522
-
4523
-		        $('#paginationgrp a:first').addClass('active');
4524
-
4525
-		        // Show table page when clicking a page number
4526
-		        $('.grppages a').bind('click', function() {
4527
-
4528
-		           $('#paginationgrp').children().removeClass('active');
4529
-
4530
-		           $(this).addClass('active');
4531
-
4532
-		           var currentPageNogrp = $(this).text();
4533
-
4534
-		           $('#paginationgrp a').each(function() {
4535
-		               if ($(this).text() == currentPageNogrp) {
4536
-		                   $(this).addClass('active');
4537
-		               }
4538
-		           });
4539
-
4540
-		           var currPagegrp = $(this).attr('rel');
4541
-		           var startItemgrp = currPagegrp * rowsShowngrp;
4542
-		           var endItemgrp = startItemgrp + rowsShowngrp;
4543
-
4544
-		           $(".groupedrowsbody").hide().slice(startItemgrp, endItemgrp).css('display', 'table-row');
4545
-		           $(".groupedrowsexp").hide().slice(startItemgrp, endItemgrp).css('display', 'table-row');
4546
-
4547
-		           $('#totalgrpmessages').remove();
4548
-		           $('#smstables').append("<div id='totalgrpmessages'>Total displayed phone numbers: " + totalPhNmbrs + "</div>");
4549
-		        });
4550
-
4551
-                        $('#paginationgrp').children(":last").trigger('click');
4552
-
4553
-
4554
-		        // Show/Hide filter row
4555
-		        $('#recarrow').on('click', function() {
4556
-			   if ($('#grpfiltersrow').is(':visible')) {
4557
-			       $('#grpfiltersrow').hide();
4558
-		               $('#grpheaderrow').css('top', '0px');
4559
-		               $(this).removeClass('arrowUpCl');
4560
-		               $(this).addClass('arrowDownCl');
4561
-			   } else {
4562
-			       $('#grpfiltersrow').show();
4563
-		               $('#grpheaderrow').css('top', '158px');
4564
-		               $(this).removeClass('arrowDownCl');
4565
-		               $(this).addClass('arrowUpCl');
4566
-		           }
4567
-		        });
4568
-
4569
-          },
4570
-          error: function() {
4571
-
4572
-                        showAlert("Error while attempting to get the messages from the database.");
4573
-                        $('#smstables').removeClass('icon-loading');
4574
-          }
4575
-     });
4576
-  });
4577
-
4578
-
4579
-  function showAlert(alertText) {
4580
-
4581
-     let alertwnd = "<div id='alertMessage'>";
4582
-     alertwnd += "<a id='closeAlertWnd' title='Close this window'></a>";
4583
-     alertwnd += "<div id='alertTextWrap'>"+ alertText +"</div>";
4584
-     alertwnd += "<input type='submit' id='alertOk' value='OK'>";
4585
-     alertwnd += "</div>";
4586
-
4587
-     $("#content").append("<div id='alertMsgOverlay'></div>");
4588
-     $("#content").append(alertwnd);
4589
-
4590
-     let topDist = parseInt((window.innerHeight / 2).toFixed(2) - 152) +"px";
4591
-     let leftDist = parseInt((window.innerWidth / 2).toFixed(2) - 150) +"px";
4592
-     $("#alertMessage").css({ "top" : topDist, "left" : leftDist });
4593
-
4594
-     $("#closeAlertWnd").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
4595
-     $("#alertMsgOverlay").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
4596
-     $("#alertOk").click(function() { $("#alertMsgOverlay").remove(); $("#alertMessage").remove(); });
4597
-  }
4598
-
4599
-});
4600 0
deleted file mode 100644
... ...
@@ -1,570 +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\Migration;
27
-
28
-use Closure;
29
-use OCP\DB\Types;
30
-use OCP\DB\ISchemaWrapper;
31
-use OCP\IDBConnection;
32
-use OCP\Migration\IOutput;
33
-use OCP\Migration\SimpleMigrationStep;
34
-
35
-
36
-class Version116Date20230508212745 extends SimpleMigrationStep {
37
-
38
-        /** @var IDBConnection */
39
-        private $connection;
40
-
41
-        /**
42
-         * @param IDBConnection $connection
43
-         */
44
-        public function __construct(IDBConnection $connection) {
45
-                $this->connection = $connection;
46
-        }
47
-
48
-	/**
49
-	 * @param IOutput $output
50
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
51
-	 * @param array $options
52
-	 * @return null|ISchemaWrapper
53
-	 */
54
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
55
-		/** @var ISchemaWrapper $schema */
56
-		$schema = $schemaClosure();
57
-
58
-		if (!$schema->hasTable('sms_relent_settings')) {
59
-			$table = $schema->createTable('sms_relent_settings');
60
-			$table->addColumn('id', Types::BIGINT, [
61
-				'autoincrement' => true,
62
-				'notnull' => true,
63
-                                'length' => 11,
64
-                                'unsigned' => true,
65
-			]);
66
-			$table->addColumn('user_id', Types::STRING, [
67
-				'notnull' => true,
68
-				'length' => 128,
69
-			]);
70
-			$table->addColumn('telapi_key', Types::STRING, [
71
-				'notnull' => true,
72
-				'length' => 512,
73
-			]);
74
-			$table->addColumn('tel_pub_key', Types::STRING, [
75
-				'notnull' => true,
76
-				'length' => 512,
77
-			]);
78
-			$table->addColumn('telapi_url_rec', Types::STRING, [
79
-				'notnull' => true,
80
-				'length' => 512,
81
-			]);
82
-			$table->addColumn('telapi_url', Types::STRING, [
83
-				'notnull' => true,
84
-				'length' => 512,
85
-			]);
86
-			$table->addColumn('messaging_profile_id', Types::STRING, [
87
-				'notnull' => true,
88
-				'length' => 512,
89
-			]);
90
-			$table->addColumn('nexapi_key', Types::STRING, [
91
-				'notnull' => true,
92
-				'length' => 512,
93
-			]);
94
-			$table->addColumn('nexapi_secret', Types::STRING, [
95
-				'notnull' => true,
96
-				'length' => 512,
97
-			]);
98
-			$table->addColumn('nexapi_url_rec', Types::STRING, [
99
-				'notnull' => true,
100
-				'length' => 512,
101
-			]);
102
-			$table->addColumn('nexapi_url', Types::STRING, [
103
-				'notnull' => true,
104
-				'length' => 512,
105
-			]);
106
-			$table->addColumn('twilapi_key', Types::STRING, [
107
-				'notnull' => true,
108
-				'length' => 512,
109
-			]);
110
-			$table->addColumn('twilapi_secret', Types::STRING, [
111
-				'notnull' => true,
112
-				'length' => 512,
113
-			]);
114
-			$table->addColumn('twilapi_url_rec', Types::STRING, [
115
-				'notnull' => true,
116
-				'length' => 512,
117
-			]);
118
-			$table->addColumn('twilapi_url', Types::STRING, [
119
-				'notnull' => true,
120
-				'length' => 512,
121
-			]);
122
-			$table->addColumn('flowapi_key', Types::STRING, [
123
-				'notnull' => true,
124
-				'length' => 512,
125
-			]);
126
-			$table->addColumn('flowapi_secret', Types::STRING, [
127
-				'notnull' => true,
128
-				'length' => 512,
129
-			]);
130
-			$table->addColumn('flowapi_url_rec', Types::STRING, [
131
-				'notnull' => true,
132
-				'length' => 512,
133
-			]);
134
-			$table->addColumn('flowapi_url', Types::STRING, [
135
-				'notnull' => true,
136
-				'length' => 512,
137
-			]);
138
-			$table->addColumn('tel_sender_name', Types::STRING, [
139
-				'notnull' => false,
140
-				'length' => 48,
141
-				'default' => '',
142
-			]);
143
-			$table->addColumn('nex_sender_name', Types::STRING, [
144
-				'notnull' => false,
145
-				'length' => 48,
146
-				'default' => '',
147
-			]);
148
-			$table->addColumn('twil_sender_name', Types::STRING, [
149
-				'notnull' => false,
150
-				'length' => 48,
151
-				'default' => '',
152
-			]);
153
-			$table->addColumn('flow_sender_name', Types::STRING, [
154
-				'notnull' => false,
155
-				'length' => 48,
156
-				'default' => '',
157
-			]);
158
-			$table->addColumn('messagesperpage', Types::INTEGER, [
159
-				'notnull' => false,
160
-				'length' => 11,
161
-                                'unsigned' => true,
162
-			]);
163
-			$table->addColumn('get_notify', Types::SMALLINT, [
164
-				'notnull' => false,
165
-				'length' => 1,
166
-			]);
167
-			$table->addColumn('notification_email', Types::STRING, [
168
-				'notnull' => false,
169
-				'length' => 512,
170
-				'default' => '',
171
-			]);
172
-			$table->addColumn('getsmsinemail', Types::SMALLINT, [
173
-				'notnull' => false,
174
-				'length' => 1,
175
-			]);
176
-			$table->addColumn('show_all_messages', Types::SMALLINT, [
177
-				'notnull' => false,
178
-				'length' => 1,
179
-			]);
180
-			$table->addColumn('show_display_names', Types::SMALLINT, [
181
-				'notnull' => false,
182
-				'length' => 1,
183
-			]);
184
-                        $table->setPrimaryKey(['id']);
185
-                        $table->addUniqueIndex(['id']);
186
-
187
-		} else {
188
-
189
-                        $table = $schema->getTable('sms_relent_settings');
190
-
191
-			$table->addColumn('show_all_messages', Types::SMALLINT, [
192
-				'notnull' => false,
193
-				'length' => 1,
194
-			]);
195
-			$table->addColumn('show_display_names', Types::SMALLINT, [
196
-				'notnull' => false,
197
-				'length' => 1,
198
-			]);
199
-                }
200
-
201
-
202
-		if (!$schema->hasTable('sms_relent_received')) {
203
-			$table = $schema->createTable('sms_relent_received');
204
-			$table->addColumn('id', Types::BIGINT, [
205
-				'autoincrement' => true,
206
-				'notnull' => true,
207
-                                'length' => 11,
208
-                                'unsigned' => true,
209
-			]);
210
-			$table->addColumn('user_id', Types::STRING, [
211
-				'notnull' => true,
212
-				'length' => 64,
213
-			]);
214
-			$table->addColumn('message_id', Types::STRING, [
215
-				'notnull' => true,
216
-				'length' => 512,
217
-			]);
218
-			$table->addColumn('date', Types::DATETIME, [
219
-				'notnull' => true,
220
-			]);
221
-			$table->addColumn('from', Types::STRING, [
222
-				'notnull' => true,
223
-				'length' => 128,
224
-			]);
225
-			$table->addColumn('to', Types::STRING, [
226
-				'notnull' => true,
227
-				'length' => 128,
228
-			]);
229
-			$table->addColumn('message', Types::TEXT, [
230
-				'notnull' => false,
231
-				'default' => '',
232
-			]);
233
-			$table->addColumn('author_displayname', Types::STRING, [
234
-				'notnull' => true,
235
-				'length' => 255,
236
-			]);
237
-			$table->addColumn('internal_sender', Types::SMALLINT, [
238
-				'notnull' => false,
239
-				'length' => 1,
240
-			]);
241
-                        $table->setPrimaryKey(['id']);
242
-                        $table->addUniqueIndex(['id']);
243
-
244
-		} else {
245
-
246
-                        $table = $schema->getTable('sms_relent_received');
247
-
248
-			$table->addColumn('author_displayname', Types::STRING, [
249
-				'notnull' => true,
250
-				'length' => 255,
251
-			]);
252
-			$table->addColumn('internal_sender', Types::SMALLINT, [
253
-				'notnull' => false,
254
-				'length' => 1,
255
-			]);
256
-                }
257
-
258
-
259
-		if (!$schema->hasTable('sms_relent_sent')) {
260
-			$table = $schema->createTable('sms_relent_sent');
261
-			$table->addColumn('id', Types::BIGINT, [
262
-				'autoincrement' => true,
263
-				'notnull' => true,
264
-                                'length' => 11,
265
-                                'unsigned' => true,
266
-			]);
267
-			$table->addColumn('user_id', Types::STRING, [
268
-				'notnull' => true,
269
-				'length' => 64,
270
-			]);
271
-			$table->addColumn('message_id', Types::STRING, [
272
-				'notnull' => true,
273
-				'length' => 512,
274
-			]);
275
-			$table->addColumn('date', Types::DATETIME, [
276
-				'notnull' => true,
277
-			]);
278
-			$table->addColumn('from', Types::STRING, [
279
-				'notnull' => true,
280
-				'length' => 128,
281
-			]);
282
-			$table->addColumn('to', Types::STRING, [
283
-				'notnull' => true,
284
-				'length' => 128,
285
-			]);
286
-			$table->addColumn('network ', Types::STRING, [
287
-				'notnull' => false,
288
-				'length' => 64,
289
-				'default' => '',
290
-			]);
291
-			$table->addColumn('price', Types::STRING, [
292
-				'notnull' => false,
293
-				'length' => 64,
294
-				'default' => '',
295
-			]);
296
-			$table->addColumn('status', Types::STRING, [
297
-				'notnull' => false,
298
-				'length' => 512,
299
-				'default' => '',
300
-			]);
301
-			$table->addColumn('deliveryreceipt', Types::STRING, [
302
-				'notnull' => false,
303
-				'length' => 64,
304
-				'default' => '',
305
-			]);
306
-			$table->addColumn('message', Types::TEXT, [
307
-				'notnull' => false,
308
-                                'default' => '',
309
-			]);
310
-			$table->addColumn('author_displayname', Types::STRING, [
311
-				'notnull' => true,
312
-				'length' => 255,
313
-			]);
314
-                        $table->setPrimaryKey(['id']);
315
-                        $table->addUniqueIndex(['id']);
316
-
317
-		} else {
318
-
319
-                        $table = $schema->getTable('sms_relent_sent');
320
-
321
-			$table->addColumn('author_displayname', Types::STRING, [
322
-				'notnull' => true,
323
-				'length' => 255,
324
-			]);
325
-                }
326
-
327
-
328
-		if (!$schema->hasTable('sms_relent_autorply')) {
329
-			$table = $schema->createTable('sms_relent_autorply');
330
-			$table->addColumn('id', Types::BIGINT, [
331
-				'autoincrement' => true,
332
-				'notnull' => true,
333
-                                'length' => 11,
334
-                                'unsigned' => true,
335
-			]);
336
-			$table->addColumn('user_id', Types::STRING, [
337
-				'notnull' => true,
338
-				'length' => 128,
339
-			]);
340
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
341
-				'notnull' => true,
342
-				'length' => 255,
343
-			]);
344
-			$table->addColumn('phone_number', Types::STRING, [
345
-				'notnull' => true,
346
-				'length' => 128,
347
-			]);
348
-			$table->addColumn('days_of_week', Types::STRING, [
349
-				'notnull' => false,
350
-				'length' => 64,
351
-                                'default' => '',
352
-			]);
353
-			$table->addColumn('daily_start', Types::STRING, [
354
-				'notnull' => false,
355
-				'length' => 8,
356
-                                'default' => '',
357
-			]);
358
-			$table->addColumn('daily_end', Types::STRING, [
359
-				'notnull' => false,
360
-				'length' => 8,
361
-                                'default' => '',
362
-			]);
363
-			$table->addColumn('vacation_start', Types::DATETIME, [
364
-				'notnull' => false,
365
-			]);
366
-			$table->addColumn('vacation_end', Types::DATETIME, [
367
-				'notnull' => false,
368
-			]);
369
-			$table->addColumn('message_text', Types::TEXT, [
370
-				'notnull' => false,
371
-                                'default' => '',
372
-			]);
373
-                        $table->setPrimaryKey(['id']);
374
-                        $table->addUniqueIndex(['id']);
375
-
376
-		}
377
-
378
-
379
-		if (!$schema->hasTable('sms_relent_restrict')) {
380
-			$table = $schema->createTable('sms_relent_restrict');
381
-			$table->addColumn('id', Types::BIGINT, [
382
-				'autoincrement' => true,
383
-				'notnull' => true,
384
-                                'length' => 11,
385
-                                'unsigned' => true,
386
-			]);
387
-			$table->addColumn('user_id', Types::STRING, [
388
-				'notnull' => true,
389
-				'length' => 128,
390
-			]);
391
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
392
-				'notnull' => true,
393
-				'length' => 255,
394
-			]);
395
-			$table->addColumn('phone_number', Types::STRING, [
396
-				'notnull' => true,
397
-				'length' => 128,
398
-			]);
399
-			$table->addColumn('groups', Types::STRING, [
400
-				'notnull' => true,
401
-				'length' => 2048,
402
-			]);
403
-			$table->addColumn('users', Types::STRING, [
404
-				'notnull' => true,
405
-				'length' => 2048,
406
-			]);
407
-                        $table->setPrimaryKey(['id']);
408
-                        $table->addUniqueIndex(['id']);
409
-
410
-		}
411
-
412
-		return $schema;
413
-	}
414
-
415
-        public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
416
-
417
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_received' table, for messages that were received before the upgrade
418
-                $getrecfromnb = $this->connection->prepare('SELECT `from` FROM `*PREFIX*sms_relent_received`');
419
-	        $getrecfromnbres = $getrecfromnb->execute();
420
-
421
-                $recdatanmbrs = [];
422
-                while ($rowfetched = $getrecfromnbres->fetch()) {
423
-                       $recdatanmbrs[] = $rowfetched['from'];
424
-                }
425
-                $getrecfromnbres->closeCursor();
426
-
427
-                if ($recdatanmbrs) {
428
-
429
-                    $recnmbrs = array_values(array_unique($recdatanmbrs));
430
-
431
-                    $phoneDisplayPairs = [];
432
-                    foreach ($recnmbrs as $rckey => $rcvalue) {
433
-
434
-                         $rcvalueprc = '%' . $rcvalue;
435
-                         $getacdata = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` LIKE ?');
436
-	                 $getacdatares = $getacdata->execute(['phone', $rcvalueprc]);
437
-
438
-		         $acdatausers = [];
439
-		         while ($acusrfetched = $getacdatares->fetch()) {
440
-		                $acdatausers[] = $acusrfetched['uid'];
441
-		         }
442
-		         $getacdatares->closeCursor();
443
-
444
-
445
-                         if ($acdatausers) {
446
-
447
-		             $acdatausrdn = [];
448
-                             foreach ($acdatausers as $dnkey => $dnvalue) {
449
-
450
-		                  $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
451
-			          $getacdatadnres = $getacdatadn->execute([$dnvalue, 'displayname']);
452
-
453
-				  while ($acusrdnfetched = $getacdatadnres->fetch()) {
454
-				         $acdatausrdn[] = $acusrdnfetched['value'];
455
-				  }
456
-				  $getacdatadnres->closeCursor();
457
-                             }
458
-
459
-                             if ($acdatausrdn) {
460
-
461
-                                 if (count($acdatausrdn) == 1) {
462
-
463
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => $acdatausrdn[0], 'internal_sender' => 1];
464
-
465
-                                 } elseif (count($acdatausrdn) > 1) {
466
-
467
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => implode("/", $acdatausrdn), 'internal_sender' => 1];
468
-                                 }
469
-
470
-                             } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
471
-
472
-                         } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
473
-                    }
474
-
475
-                    foreach ($phoneDisplayPairs as $pdpkey => $pdpvalue) {
476
-
477
-                         if (is_array($pdpvalue)) {
478
-                             $pdpkeyprc = '%' . $pdpkey;
479
-			     $updaterecms = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_received` SET `author_displayname` = ?, `internal_sender` = ? WHERE `from` LIKE ?');
480
-			     $updaterecmsres = $updaterecms->execute([$pdpvalue['author_displayname'], $pdpvalue['internal_sender'], $pdpkeyprc]);
481
-			     $updaterecmsres->closeCursor();
482
-                         }
483
-                    }
484
-                }
485
-
486
-
487
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_sent' table, for messages that were sent before the upgrade
488
-                $getsentfromnb = $this->connection->prepare('SELECT `user_id`, `from` FROM `*PREFIX*sms_relent_sent`');
489
-	        $getsentfromnbres = $getsentfromnb->execute();
490
-
491
-                $sentdatanmbrs = [];
492
-                $sentdatanmbrsusr = [];
493
-                while ($rowfetchedst = $getsentfromnbres->fetch()) {
494
-
495
-                       $sentdatanmbrspre = $rowfetchedst['from'];
496
-                       $sentdatanmbrsarr = explode("+", $sentdatanmbrspre);
497
-                       if (count($sentdatanmbrsarr) > 1) {
498
-                           $sentdatanmbrs[] = "+" . $sentdatanmbrsarr[1];
499
-                           $sentdatanmbrsusr[] = $rowfetchedst['user_id'];
500
-                       } else {
501
-                           $sentdatanmbrs[] = $sentdatanmbrsarr[0];
502
-                           $sentdatanmbrsusr[] = $rowfetchedst['user_id'];
503
-                       }
504
-                }
505
-                $getsentfromnbres->closeCursor();
506
-
507
-                if ($sentdatanmbrs && $sentdatanmbrsusr) {
508
-
509
-                    $sentnmbrs = array_values(array_unique($sentdatanmbrs));
510
-
511
-                    $phoneDisplayPairsst = [];
512
-
513
-	            $acdatausrdnst = [];
514
-                    for ($k = 0; $k < count($sentnmbrs); $k++) {
515
-
516
-                         $nmbusernames = [];
517
-                         for ($j = 0; $j < count($sentdatanmbrs); $j++) {
518
-                              if ($sentnmbrs[$k] == $sentdatanmbrs[$j]) {                                  
519
-                                  $nmbusernames[] = $sentdatanmbrsusr[$j];
520
-                              }
521
-                         }
522
-                         $acdatausrdnst[$sentnmbrs[$k]] = $nmbusernames;
523
-                    }
524
-
525
-                    foreach ($acdatausrdnst as $ukey => $uvalue) {
526
-
527
-                         if (is_array($uvalue)) {
528
-
529
-                             $dispnamearr = [];
530
-                             foreach ($uvalue as $dskey => $dsvalue) {
531
-			              $getacdatadnst = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
532
-				      $getacdatadnstres = $getacdatadnst->execute([$dsvalue, 'displayname']);
533
-		                      $fetchdspname = $getacdatadnstres->fetch();                              
534
-
535
-		                      if ($fetchdspname) {
536
-		                          $dispnamearr[] = $fetchdspname['value']];
537
-		                      }
538
-				      $getacdatadnstres->closeCursor();
539
-                             }
540
-
541
-	                     if ($dispnamearr) {
542
-
543
-	                         if (count($dispnamearr) == 1) {
544
-
545
-	                             $phoneDisplayPairsst[$ukey] = ['author_displayname' => $dispnamearr[0]];
546
-
547
-	                         } elseif (count($dispnamearr) > 1) {
548
-
549
-	                             $phoneDisplayPairsst[$ukey] = ['author_displayname' => implode("/", $dispnamearr)];
550
-	                         }
551
-
552
-	                     } else { $phoneDisplayPairsst[$ukey] = ['author_displayname' => '']; }
553
-                         }
554
-                    }
555
-
556
-                    foreach ($phoneDisplayPairsst as $pstkey => $pstvalue) {
557
-
558
-                         if (is_array($pstvalue)) {
559
-                             $contfield = "%" . $pstkey;
560
-			     $updatesentmsst = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_sent` SET `author_displayname` = ? WHERE `from` LIKE ?');
561
-			     $updatesentmsres = $updatesentmsst->execute([$pstvalue['author_displayname'], $contfield]);
562
-			     $updatesentmsres->closeCursor();
563
-                         }
564
-                    }
565
-                }
566
-
567
-                return null;
568
-        }
569
-
570
-}
571 0
deleted file mode 100644
... ...
@@ -1,533 +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\Migration;
27
-
28
-use Closure;
29
-use OCP\DB\Types;
30
-use OCP\DB\ISchemaWrapper;
31
-use OCP\IDBConnection;
32
-use OCP\Migration\IOutput;
33
-use OCP\Migration\SimpleMigrationStep;
34
-
35
-
36
-class Version117Date20230509183517 extends SimpleMigrationStep {
37
-
38
-        /** @var IDBConnection */
39
-        private $connection;
40
-
41
-        /**
42
-         * @param IDBConnection $connection
43
-         */
44
-        public function __construct(IDBConnection $connection) {
45
-                $this->connection = $connection;
46
-        }
47
-
48
-	/**
49
-	 * @param IOutput $output
50
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
51
-	 * @param array $options
52
-	 * @return null|ISchemaWrapper
53
-	 */
54
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
55
-		/** @var ISchemaWrapper $schema */
56
-		$schema = $schemaClosure();
57
-
58
-		if (!$schema->hasTable('sms_relent_settings')) {
59
-			$table = $schema->createTable('sms_relent_settings');
60
-			$table->addColumn('id', Types::BIGINT, [
61
-				'autoincrement' => true,
62
-				'notnull' => true,
63
-                                'length' => 11,
64
-                                'unsigned' => true,
65
-			]);
66
-			$table->addColumn('user_id', Types::STRING, [
67
-				'notnull' => true,
68
-				'length' => 128,
69
-			]);
70
-			$table->addColumn('telapi_key', Types::STRING, [
71
-				'notnull' => true,
72
-				'length' => 512,
73
-			]);
74
-			$table->addColumn('tel_pub_key', Types::STRING, [
75
-				'notnull' => true,
76
-				'length' => 512,
77
-			]);
78
-			$table->addColumn('telapi_url_rec', Types::STRING, [
79
-				'notnull' => true,
80
-				'length' => 512,
81
-			]);
82
-			$table->addColumn('telapi_url', Types::STRING, [
83
-				'notnull' => true,
84
-				'length' => 512,
85
-			]);
86
-			$table->addColumn('messaging_profile_id', Types::STRING, [
87
-				'notnull' => true,
88
-				'length' => 512,
89
-			]);
90
-			$table->addColumn('nexapi_key', Types::STRING, [
91
-				'notnull' => true,
92
-				'length' => 512,
93
-			]);
94
-			$table->addColumn('nexapi_secret', Types::STRING, [
95
-				'notnull' => true,
96
-				'length' => 512,
97
-			]);
98
-			$table->addColumn('nexapi_url_rec', Types::STRING, [
99
-				'notnull' => true,
100
-				'length' => 512,
101
-			]);
102
-			$table->addColumn('nexapi_url', Types::STRING, [
103
-				'notnull' => true,
104
-				'length' => 512,
105
-			]);
106
-			$table->addColumn('twilapi_key', Types::STRING, [
107
-				'notnull' => true,
108
-				'length' => 512,
109
-			]);
110
-			$table->addColumn('twilapi_secret', Types::STRING, [
111
-				'notnull' => true,
112
-				'length' => 512,
113
-			]);
114
-			$table->addColumn('twilapi_url_rec', Types::STRING, [
115
-				'notnull' => true,
116
-				'length' => 512,
117
-			]);
118
-			$table->addColumn('twilapi_url', Types::STRING, [
119
-				'notnull' => true,
120
-				'length' => 512,
121
-			]);
122
-			$table->addColumn('flowapi_key', Types::STRING, [
123
-				'notnull' => true,
124
-				'length' => 512,
125
-			]);
126
-			$table->addColumn('flowapi_secret', Types::STRING, [
127
-				'notnull' => true,
128
-				'length' => 512,
129
-			]);
130
-			$table->addColumn('flowapi_url_rec', Types::STRING, [
131
-				'notnull' => true,
132
-				'length' => 512,
133
-			]);
134
-			$table->addColumn('flowapi_url', Types::STRING, [
135
-				'notnull' => true,
136
-				'length' => 512,
137
-			]);
138
-			$table->addColumn('tel_sender_name', Types::STRING, [
139
-				'notnull' => false,
140
-				'length' => 48,
141
-				'default' => '',
142
-			]);
143
-			$table->addColumn('nex_sender_name', Types::STRING, [
144
-				'notnull' => false,
145
-				'length' => 48,
146
-				'default' => '',
147
-			]);
148
-			$table->addColumn('twil_sender_name', Types::STRING, [
149
-				'notnull' => false,
150
-				'length' => 48,
151
-				'default' => '',
152
-			]);
153
-			$table->addColumn('flow_sender_name', Types::STRING, [
154
-				'notnull' => false,
155
-				'length' => 48,
156
-				'default' => '',
157
-			]);
158
-			$table->addColumn('messagesperpage', Types::INTEGER, [
159
-				'notnull' => false,
160
-				'length' => 11,
161
-                                'unsigned' => true,
162
-			]);
163
-			$table->addColumn('get_notify', Types::SMALLINT, [
164
-				'notnull' => false,
165
-				'length' => 1,
166
-			]);
167
-			$table->addColumn('notification_email', Types::STRING, [
168
-				'notnull' => false,
169
-				'length' => 512,
170
-				'default' => '',
171
-			]);
172
-			$table->addColumn('getsmsinemail', Types::SMALLINT, [
173
-				'notnull' => false,
174
-				'length' => 1,
175
-			]);
176
-			$table->addColumn('show_all_messages', Types::SMALLINT, [
177
-				'notnull' => false,
178
-				'length' => 1,
179
-			]);
180
-			$table->addColumn('show_display_names', Types::SMALLINT, [
181
-				'notnull' => false,
182
-				'length' => 1,
183
-			]);
184
-                        $table->setPrimaryKey(['id']);
185
-                        $table->addUniqueIndex(['id']);
186
-
187
-		}
188
-
189
-
190
-		if (!$schema->hasTable('sms_relent_received')) {
191
-			$table = $schema->createTable('sms_relent_received');
192
-			$table->addColumn('id', Types::BIGINT, [
193
-				'autoincrement' => true,
194
-				'notnull' => true,
195
-                                'length' => 11,
196
-                                'unsigned' => true,
197
-			]);
198
-			$table->addColumn('user_id', Types::STRING, [
199
-				'notnull' => true,
200
-				'length' => 64,
201
-			]);
202
-			$table->addColumn('message_id', Types::STRING, [
203
-				'notnull' => true,
204
-				'length' => 512,
205
-			]);
206
-			$table->addColumn('date', Types::DATETIME, [
207
-				'notnull' => true,
208
-			]);
209
-			$table->addColumn('from', Types::STRING, [
210
-				'notnull' => true,
211
-				'length' => 128,
212
-			]);
213
-			$table->addColumn('to', Types::STRING, [
214
-				'notnull' => true,
215
-				'length' => 128,
216
-			]);
217
-			$table->addColumn('message', Types::TEXT, [
218
-				'notnull' => false,
219
-				'default' => '',
220
-			]);
221
-			$table->addColumn('author_displayname', Types::STRING, [
222
-				'notnull' => true,
223
-				'length' => 255,
224
-			]);
225
-			$table->addColumn('internal_sender', Types::SMALLINT, [
226
-				'notnull' => false,
227
-				'length' => 1,
228
-			]);
229
-                        $table->setPrimaryKey(['id']);
230
-                        $table->addUniqueIndex(['id']);
231
-
232
-		}
233
-
234
-
235
-		if (!$schema->hasTable('sms_relent_sent')) {
236
-			$table = $schema->createTable('sms_relent_sent');
237
-			$table->addColumn('id', Types::BIGINT, [
238
-				'autoincrement' => true,
239
-				'notnull' => true,
240
-                                'length' => 11,
241
-                                'unsigned' => true,
242
-			]);
243
-			$table->addColumn('user_id', Types::STRING, [
244
-				'notnull' => true,
245
-				'length' => 64,
246
-			]);
247
-			$table->addColumn('message_id', Types::STRING, [
248
-				'notnull' => true,
249
-				'length' => 512,
250
-			]);
251
-			$table->addColumn('date', Types::DATETIME, [
252
-				'notnull' => true,
253
-			]);
254
-			$table->addColumn('from', Types::STRING, [
255
-				'notnull' => true,
256
-				'length' => 128,
257
-			]);
258
-			$table->addColumn('to', Types::STRING, [
259
-				'notnull' => true,
260
-				'length' => 128,
261
-			]);
262
-			$table->addColumn('network ', Types::STRING, [
263
-				'notnull' => false,
264
-				'length' => 64,
265
-				'default' => '',
266
-			]);
267
-			$table->addColumn('price', Types::STRING, [
268
-				'notnull' => false,
269
-				'length' => 64,
270
-				'default' => '',
271
-			]);
272
-			$table->addColumn('status', Types::STRING, [
273
-				'notnull' => false,
274
-				'length' => 512,
275
-				'default' => '',
276
-			]);
277
-			$table->addColumn('deliveryreceipt', Types::STRING, [
278
-				'notnull' => false,
279
-				'length' => 64,
280
-				'default' => '',
281
-			]);
282
-			$table->addColumn('message', Types::TEXT, [
283
-				'notnull' => false,
284
-                                'default' => '',
285
-			]);
286
-			$table->addColumn('author_displayname', Types::STRING, [
287
-				'notnull' => true,
288
-				'length' => 255,
289
-			]);
290
-                        $table->setPrimaryKey(['id']);
291
-                        $table->addUniqueIndex(['id']);
292
-
293
-		}
294
-
295
-
296
-		if (!$schema->hasTable('sms_relent_autorply')) {
297
-			$table = $schema->createTable('sms_relent_autorply');
298
-			$table->addColumn('id', Types::BIGINT, [
299
-				'autoincrement' => true,
300
-				'notnull' => true,
301
-                                'length' => 11,
302
-                                'unsigned' => true,
303
-			]);
304
-			$table->addColumn('user_id', Types::STRING, [
305
-				'notnull' => true,
306
-				'length' => 128,
307
-			]);
308
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
309
-				'notnull' => true,
310
-				'length' => 255,
311
-			]);
312
-			$table->addColumn('phone_number', Types::STRING, [
313
-				'notnull' => true,
314
-				'length' => 128,
315
-			]);
316
-			$table->addColumn('days_of_week', Types::STRING, [
317
-				'notnull' => false,
318
-				'length' => 64,
319
-                                'default' => '',
320
-			]);
321
-			$table->addColumn('daily_start', Types::STRING, [
322
-				'notnull' => false,
323
-				'length' => 8,
324
-                                'default' => '',
325
-			]);
326
-			$table->addColumn('daily_end', Types::STRING, [
327
-				'notnull' => false,
328
-				'length' => 8,
329
-                                'default' => '',
330
-			]);
331
-			$table->addColumn('vacation_start', Types::DATETIME, [
332
-				'notnull' => false,
333
-			]);
334
-			$table->addColumn('vacation_end', Types::DATETIME, [
335
-				'notnull' => false,
336
-			]);
337
-			$table->addColumn('message_text', Types::TEXT, [
338
-				'notnull' => false,
339
-                                'default' => '',
340
-			]);
341
-                        $table->setPrimaryKey(['id']);
342
-                        $table->addUniqueIndex(['id']);
343
-
344
-		}
345
-
346
-
347
-		if (!$schema->hasTable('sms_relent_restrict')) {
348
-			$table = $schema->createTable('sms_relent_restrict');
349
-			$table->addColumn('id', Types::BIGINT, [
350
-				'autoincrement' => true,
351
-				'notnull' => true,
352
-                                'length' => 11,
353
-                                'unsigned' => true,
354
-			]);
355
-			$table->addColumn('user_id', Types::STRING, [
356
-				'notnull' => true,
357
-				'length' => 128,
358
-			]);
359
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
360
-				'notnull' => true,
361
-				'length' => 255,
362
-			]);
363
-			$table->addColumn('phone_number', Types::STRING, [
364
-				'notnull' => true,
365
-				'length' => 128,
366
-			]);
367
-			$table->addColumn('groups', Types::STRING, [
368
-				'notnull' => true,
369
-				'length' => 2048,
370
-			]);
371
-			$table->addColumn('users', Types::STRING, [
372
-				'notnull' => true,
373
-				'length' => 2048,
374
-			]);
375
-                        $table->setPrimaryKey(['id']);
376
-                        $table->addUniqueIndex(['id']);
377
-
378
-		}
379
-
380
-		return $schema;
381
-	}
382
-
383
-        public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
384
-
385
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_received' table, for messages that were received before the upgrade
386
-                $getrecfromnb = $this->connection->prepare('SELECT `from` FROM `*PREFIX*sms_relent_received`');
387
-	        $getrecfromnbres = $getrecfromnb->execute();
388
-
389
-                $recdatanmbrs = [];
390
-                while ($rowfetched = $getrecfromnbres->fetch()) {
391
-                       $recdatanmbrs[] = $rowfetched['from'];
392
-                }
393
-                $getrecfromnbres->closeCursor();
394
-
395
-                if ($recdatanmbrs) {
396
-
397
-                    $recnmbrs = array_values(array_unique($recdatanmbrs));
398
-
399
-                    $phoneDisplayPairs = [];
400
-                    foreach ($recnmbrs as $rckey => $rcvalue) {
401
-
402
-                         $rcvalueprc = '%' . $rcvalue;
403
-                         $getacdata = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` LIKE ?');
404
-	                 $getacdatares = $getacdata->execute(['phone', $rcvalueprc]);
405
-
406
-		         $acdatausers = [];
407
-		         while ($acusrfetched = $getacdatares->fetch()) {
408
-		                $acdatausers[] = $acusrfetched['uid'];
409
-		         }
410
-		         $getacdatares->closeCursor();
411
-
412
-
413
-                         if ($acdatausers) {
414
-
415
-		             $acdatausrdn = [];
416
-                             foreach ($acdatausers as $dnkey => $dnvalue) {
417
-
418
-		                  $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
419
-			          $getacdatadnres = $getacdatadn->execute([$dnvalue, 'displayname']);
420
-
421
-				  while ($acusrdnfetched = $getacdatadnres->fetch()) {
422
-				         $acdatausrdn[] = $acusrdnfetched['value'];
423
-				  }
424
-				  $getacdatadnres->closeCursor();
425
-                             }
426
-
427
-                             if ($acdatausrdn) {
428
-
429
-                                 if (count($acdatausrdn) == 1) {
430
-
431
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => $acdatausrdn[0], 'internal_sender' => 1];
432
-
433
-                                 } elseif (count($acdatausrdn) > 1) {
434
-
435
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => implode("/", $acdatausrdn), 'internal_sender' => 1];
436
-                                 }
437
-
438
-                             } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
439
-
440
-                         } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
441
-                    }
442
-
443
-                    foreach ($phoneDisplayPairs as $pdpkey => $pdpvalue) {
444
-
445
-                         if (is_array($pdpvalue)) {
446
-                             $pdpkeyprc = '%' . $pdpkey;
447
-			     $updaterecms = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_received` SET `author_displayname` = ?, `internal_sender` = ? WHERE `from` LIKE ?');
448
-			     $updaterecmsres = $updaterecms->execute([$pdpvalue['author_displayname'], $pdpvalue['internal_sender'], $pdpkeyprc]);
449
-			     $updaterecmsres->closeCursor();
450
-                         }
451
-                    }
452
-                }
453
-
454
-
455
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_sent' table, for messages that were sent before the upgrade
456
-                $getsentfromnb = $this->connection->prepare('SELECT `from` FROM `*PREFIX*sms_relent_sent`');
457
-	        $getsentfromnbres = $getsentfromnb->execute();
458
-
459
-                $sentdatanmbrs = [];
460
-                while ($rowfetchedst = $getsentfromnbres->fetch()) {
461
-
462
-                       $sentdatanmbrspre = $rowfetchedst['from'];
463
-                       $sentdatanmbrsarr = explode("+", $sentdatanmbrspre);
464
-                       if (count($sentdatanmbrsarr) > 1) {
465
-                           $sentdatanmbrs[] = "+" . $sentdatanmbrsarr[1];
466
-                       } else {
467
-                           $sentdatanmbrs[] = $sentdatanmbrsarr[0];
468
-                       }
469
-                }
470
-                $getsentfromnbres->closeCursor();
471
-
472
-                if ($sentdatanmbrs) {
473
-
474
-                    $sentnmbrs = array_values(array_unique($sentdatanmbrs));
475
-
476
-                    $phoneDisplayPairsst = [];
477
-                    foreach ($sentnmbrs as $stkey => $stvalue) {
478
-
479
-                         $stvalueprc = '%' . $stvalue;
480
-                         $getacdatast = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` LIKE ?');
481
-	                 $getacdatastres = $getacdatast->execute(['phone', $stvalueprc]);
482
-
483
-		         $acdatausersst = [];
484
-		         while ($acusrstfetched = $getacdatastres->fetch()) {
485
-		                $acdatausersst[] = $acusrstfetched['uid'];
486
-		         }
487
-		         $getacdatastres->closeCursor();
488
-
489
-                         if ($acdatausersst) {
490
-
491
-		             $acdatausrdnst = [];
492
-                             foreach ($acdatausersst as $dnstkey => $dnstvalue) {
493
-
494
-		                  $getacdatadnst = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
495
-			          $getacdatadnstres = $getacdatadnst->execute([$dnstvalue, 'displayname']);
496
-
497
-				  while ($acusrdnstfetched = $getacdatadnstres->fetch()) {
498
-				         $acdatausrdnst[] = $acusrdnstfetched['value'];
499
-				  }
500
-				  $getacdatadnstres->closeCursor();
501
-                             }
502
-
503
-                             if ($acdatausrdnst) {
504
-
505
-                                 if (count($acdatausrdnst) == 1) {
506
-
507
-                                     $phoneDisplayPairsst[$stvalue] = ['author_displayname' => $acdatausrdnst[0]];
508
-
509
-                                 } elseif (count($acdatausrdnst) > 1) {
510
-
511
-                                     $phoneDisplayPairsst[$stvalue] = ['author_displayname' => implode("/", $acdatausrdnst)];
512
-                                 }
513
-
514
-                             } else { $phoneDisplayPairsst[$stvalue] = ['author_displayname' => '']; }
515
-
516
-                         } else { $phoneDisplayPairsst[$stvalue] = ['author_displayname' => '']; }
517
-                    }
518
-
519
-                    foreach ($phoneDisplayPairsst as $pstkey => $pstvalue) {
520
-
521
-                         if (is_array($pstvalue)) {
522
-                             $contfield = "%" . $pstkey;
523
-			     $updatesentmsst = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_sent` SET `author_displayname` = ? WHERE `from` LIKE ?');
524
-			     $updatesentmsres = $updatesentmsst->execute([$pstvalue['author_displayname'], $contfield]);
525
-			     $updatesentmsres->closeCursor();
526
-                         }
527
-                    }
528
-                }
529
-
530
-                return null;
531
-        }
532
-
533
-}
534 0
deleted file mode 100644
... ...
@@ -1,533 +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\Migration;
27
-
28
-use Closure;
29
-use OCP\DB\Types;
30
-use OCP\DB\ISchemaWrapper;
31
-use OCP\IDBConnection;
32
-use OCP\Migration\IOutput;
33
-use OCP\Migration\SimpleMigrationStep;
34
-
35
-
36
-class Version118Date20230509194216 extends SimpleMigrationStep {
37
-
38
-        /** @var IDBConnection */
39
-        private $connection;
40
-
41
-        /**
42
-         * @param IDBConnection $connection
43
-         */
44
-        public function __construct(IDBConnection $connection) {
45
-                $this->connection = $connection;
46
-        }
47
-
48
-	/**
49
-	 * @param IOutput $output
50
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
51
-	 * @param array $options
52
-	 * @return null|ISchemaWrapper
53
-	 */
54
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
55
-		/** @var ISchemaWrapper $schema */
56
-		$schema = $schemaClosure();
57
-
58
-		if (!$schema->hasTable('sms_relent_settings')) {
59
-			$table = $schema->createTable('sms_relent_settings');
60
-			$table->addColumn('id', Types::BIGINT, [
61
-				'autoincrement' => true,
62
-				'notnull' => true,
63
-                                'length' => 11,
64
-                                'unsigned' => true,
65
-			]);
66
-			$table->addColumn('user_id', Types::STRING, [
67
-				'notnull' => true,
68
-				'length' => 128,
69
-			]);
70
-			$table->addColumn('telapi_key', Types::STRING, [
71
-				'notnull' => true,
72
-				'length' => 512,
73
-			]);
74
-			$table->addColumn('tel_pub_key', Types::STRING, [
75
-				'notnull' => true,
76
-				'length' => 512,
77
-			]);
78
-			$table->addColumn('telapi_url_rec', Types::STRING, [
79
-				'notnull' => true,
80
-				'length' => 512,
81
-			]);
82
-			$table->addColumn('telapi_url', Types::STRING, [
83
-				'notnull' => true,
84
-				'length' => 512,
85
-			]);
86
-			$table->addColumn('messaging_profile_id', Types::STRING, [
87
-				'notnull' => true,
88
-				'length' => 512,
89
-			]);
90
-			$table->addColumn('nexapi_key', Types::STRING, [
91
-				'notnull' => true,
92
-				'length' => 512,
93
-			]);
94
-			$table->addColumn('nexapi_secret', Types::STRING, [
95
-				'notnull' => true,
96
-				'length' => 512,
97
-			]);
98
-			$table->addColumn('nexapi_url_rec', Types::STRING, [
99
-				'notnull' => true,
100
-				'length' => 512,
101
-			]);
102
-			$table->addColumn('nexapi_url', Types::STRING, [
103
-				'notnull' => true,
104
-				'length' => 512,
105
-			]);
106
-			$table->addColumn('twilapi_key', Types::STRING, [
107
-				'notnull' => true,
108
-				'length' => 512,
109
-			]);
110
-			$table->addColumn('twilapi_secret', Types::STRING, [
111
-				'notnull' => true,
112
-				'length' => 512,
113
-			]);
114
-			$table->addColumn('twilapi_url_rec', Types::STRING, [
115
-				'notnull' => true,
116
-				'length' => 512,
117
-			]);
118
-			$table->addColumn('twilapi_url', Types::STRING, [
119
-				'notnull' => true,
120
-				'length' => 512,
121
-			]);
122
-			$table->addColumn('flowapi_key', Types::STRING, [
123
-				'notnull' => true,
124
-				'length' => 512,
125
-			]);
126
-			$table->addColumn('flowapi_secret', Types::STRING, [
127
-				'notnull' => true,
128
-				'length' => 512,
129
-			]);
130
-			$table->addColumn('flowapi_url_rec', Types::STRING, [
131
-				'notnull' => true,
132
-				'length' => 512,
133
-			]);
134
-			$table->addColumn('flowapi_url', Types::STRING, [
135
-				'notnull' => true,
136
-				'length' => 512,
137
-			]);
138
-			$table->addColumn('tel_sender_name', Types::STRING, [
139
-				'notnull' => false,
140
-				'length' => 48,
141
-				'default' => '',
142
-			]);
143
-			$table->addColumn('nex_sender_name', Types::STRING, [
144
-				'notnull' => false,
145
-				'length' => 48,
146
-				'default' => '',
147
-			]);
148
-			$table->addColumn('twil_sender_name', Types::STRING, [
149
-				'notnull' => false,
150
-				'length' => 48,
151
-				'default' => '',
152
-			]);
153
-			$table->addColumn('flow_sender_name', Types::STRING, [
154
-				'notnull' => false,
155
-				'length' => 48,
156
-				'default' => '',
157
-			]);
158
-			$table->addColumn('messagesperpage', Types::INTEGER, [
159
-				'notnull' => false,
160
-				'length' => 11,
161
-                                'unsigned' => true,
162
-			]);
163
-			$table->addColumn('get_notify', Types::SMALLINT, [
164
-				'notnull' => false,
165
-				'length' => 1,
166
-			]);
167
-			$table->addColumn('notification_email', Types::STRING, [
168
-				'notnull' => false,
169
-				'length' => 512,
170
-				'default' => '',
171
-			]);
172
-			$table->addColumn('getsmsinemail', Types::SMALLINT, [
173
-				'notnull' => false,
174
-				'length' => 1,
175
-			]);
176
-			$table->addColumn('show_all_messages', Types::SMALLINT, [
177
-				'notnull' => false,
178
-				'length' => 1,
179
-			]);
180
-			$table->addColumn('show_display_names', Types::SMALLINT, [
181
-				'notnull' => false,
182
-				'length' => 1,
183
-			]);
184
-                        $table->setPrimaryKey(['id']);
185
-                        $table->addUniqueIndex(['id']);
186
-
187
-		}
188
-
189
-
190
-		if (!$schema->hasTable('sms_relent_received')) {
191
-			$table = $schema->createTable('sms_relent_received');
192
-			$table->addColumn('id', Types::BIGINT, [
193
-				'autoincrement' => true,
194
-				'notnull' => true,
195
-                                'length' => 11,
196
-                                'unsigned' => true,
197
-			]);
198
-			$table->addColumn('user_id', Types::STRING, [
199
-				'notnull' => true,
200
-				'length' => 64,
201
-			]);
202
-			$table->addColumn('message_id', Types::STRING, [
203
-				'notnull' => true,
204
-				'length' => 512,
205
-			]);
206
-			$table->addColumn('date', Types::DATETIME, [
207
-				'notnull' => true,
208
-			]);
209
-			$table->addColumn('from', Types::STRING, [
210
-				'notnull' => true,
211
-				'length' => 128,
212
-			]);
213
-			$table->addColumn('to', Types::STRING, [
214
-				'notnull' => true,
215
-				'length' => 128,
216
-			]);
217
-			$table->addColumn('message', Types::TEXT, [
218
-				'notnull' => false,
219
-				'default' => '',
220
-			]);
221
-			$table->addColumn('author_displayname', Types::STRING, [
222
-				'notnull' => true,
223
-				'length' => 255,
224
-			]);
225
-			$table->addColumn('internal_sender', Types::SMALLINT, [
226
-				'notnull' => false,
227
-				'length' => 1,
228
-			]);
229
-                        $table->setPrimaryKey(['id']);
230
-                        $table->addUniqueIndex(['id']);
231
-
232
-		}
233
-
234
-
235
-		if (!$schema->hasTable('sms_relent_sent')) {
236
-			$table = $schema->createTable('sms_relent_sent');
237
-			$table->addColumn('id', Types::BIGINT, [
238
-				'autoincrement' => true,
239
-				'notnull' => true,
240
-                                'length' => 11,
241
-                                'unsigned' => true,
242
-			]);
243
-			$table->addColumn('user_id', Types::STRING, [
244
-				'notnull' => true,
245
-				'length' => 64,
246
-			]);
247
-			$table->addColumn('message_id', Types::STRING, [
248
-				'notnull' => true,
249
-				'length' => 512,
250
-			]);
251
-			$table->addColumn('date', Types::DATETIME, [
252
-				'notnull' => true,
253
-			]);
254
-			$table->addColumn('from', Types::STRING, [
255
-				'notnull' => true,
256
-				'length' => 128,
257
-			]);
258
-			$table->addColumn('to', Types::STRING, [
259
-				'notnull' => true,
260
-				'length' => 128,
261
-			]);
262
-			$table->addColumn('network ', Types::STRING, [
263
-				'notnull' => false,
264
-				'length' => 64,
265
-				'default' => '',
266
-			]);
267
-			$table->addColumn('price', Types::STRING, [
268
-				'notnull' => false,
269
-				'length' => 64,
270
-				'default' => '',
271
-			]);
272
-			$table->addColumn('status', Types::STRING, [
273
-				'notnull' => false,
274
-				'length' => 512,
275
-				'default' => '',
276
-			]);
277
-			$table->addColumn('deliveryreceipt', Types::STRING, [
278
-				'notnull' => false,
279
-				'length' => 64,
280
-				'default' => '',
281
-			]);
282
-			$table->addColumn('message', Types::TEXT, [
283
-				'notnull' => false,
284
-                                'default' => '',
285
-			]);
286
-			$table->addColumn('author_displayname', Types::STRING, [
287
-				'notnull' => true,
288
-				'length' => 255,
289
-			]);
290
-                        $table->setPrimaryKey(['id']);
291
-                        $table->addUniqueIndex(['id']);
292
-
293
-		}
294
-
295
-
296
-		if (!$schema->hasTable('sms_relent_autorply')) {
297
-			$table = $schema->createTable('sms_relent_autorply');
298
-			$table->addColumn('id', Types::BIGINT, [
299
-				'autoincrement' => true,
300
-				'notnull' => true,
301
-                                'length' => 11,
302
-                                'unsigned' => true,
303
-			]);
304
-			$table->addColumn('user_id', Types::STRING, [
305
-				'notnull' => true,
306
-				'length' => 128,
307
-			]);
308
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
309
-				'notnull' => true,
310
-				'length' => 255,
311
-			]);
312
-			$table->addColumn('phone_number', Types::STRING, [
313
-				'notnull' => true,
314
-				'length' => 128,
315
-			]);
316
-			$table->addColumn('days_of_week', Types::STRING, [
317
-				'notnull' => false,
318
-				'length' => 64,
319
-                                'default' => '',
320
-			]);
321
-			$table->addColumn('daily_start', Types::STRING, [
322
-				'notnull' => false,
323
-				'length' => 8,
324
-                                'default' => '',
325
-			]);
326
-			$table->addColumn('daily_end', Types::STRING, [
327
-				'notnull' => false,
328
-				'length' => 8,
329
-                                'default' => '',
330
-			]);
331
-			$table->addColumn('vacation_start', Types::DATETIME, [
332
-				'notnull' => false,
333
-			]);
334
-			$table->addColumn('vacation_end', Types::DATETIME, [
335
-				'notnull' => false,
336
-			]);
337
-			$table->addColumn('message_text', Types::TEXT, [
338
-				'notnull' => false,
339
-                                'default' => '',
340
-			]);
341
-                        $table->setPrimaryKey(['id']);
342
-                        $table->addUniqueIndex(['id']);
343
-
344
-		}
345
-
346
-
347
-		if (!$schema->hasTable('sms_relent_restrict')) {
348
-			$table = $schema->createTable('sms_relent_restrict');
349
-			$table->addColumn('id', Types::BIGINT, [
350
-				'autoincrement' => true,
351
-				'notnull' => true,
352
-                                'length' => 11,
353
-                                'unsigned' => true,
354
-			]);
355
-			$table->addColumn('user_id', Types::STRING, [
356
-				'notnull' => true,
357
-				'length' => 128,
358
-			]);
359
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
360
-				'notnull' => true,
361
-				'length' => 255,
362
-			]);
363
-			$table->addColumn('phone_number', Types::STRING, [
364
-				'notnull' => true,
365
-				'length' => 128,
366
-			]);
367
-			$table->addColumn('groups', Types::STRING, [
368
-				'notnull' => true,
369
-				'length' => 2048,
370
-			]);
371
-			$table->addColumn('users', Types::STRING, [
372
-				'notnull' => true,
373
-				'length' => 2048,
374
-			]);
375
-                        $table->setPrimaryKey(['id']);
376
-                        $table->addUniqueIndex(['id']);
377
-
378
-		}
379
-
380
-		return $schema;
381
-	}
382
-
383
-        public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
384
-
385
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_received' table, for messages that were received before the upgrade
386
-                $getrecfromnb = $this->connection->prepare('SELECT `from` FROM `*PREFIX*sms_relent_received`');
387
-	        $getrecfromnbres = $getrecfromnb->execute();
388
-
389
-                $recdatanmbrs = [];
390
-                while ($rowfetched = $getrecfromnbres->fetch()) {
391
-                       $recdatanmbrs[] = $rowfetched['from'];
392
-                }
393
-                $getrecfromnbres->closeCursor();
394
-
395
-                if ($recdatanmbrs) {
396
-
397
-                    $recnmbrs = array_values(array_unique($recdatanmbrs));
398
-
399
-                    $phoneDisplayPairs = [];
400
-                    foreach ($recnmbrs as $rckey => $rcvalue) {
401
-
402
-                         $rcvalueprc = '%' . $rcvalue;
403
-                         $getacdata = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` LIKE ?');
404
-	                 $getacdatares = $getacdata->execute(['phone', $rcvalueprc]);
405
-
406
-		         $acdatausers = [];
407
-		         while ($acusrfetched = $getacdatares->fetch()) {
408
-		                $acdatausers[] = $acusrfetched['uid'];
409
-		         }
410
-		         $getacdatares->closeCursor();
411
-
412
-
413
-                         if ($acdatausers) {
414
-
415
-		             $acdatausrdn = [];
416
-                             foreach ($acdatausers as $dnkey => $dnvalue) {
417
-
418
-		                  $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
419
-			          $getacdatadnres = $getacdatadn->execute([$dnvalue, 'displayname']);
420
-
421
-				  while ($acusrdnfetched = $getacdatadnres->fetch()) {
422
-				         $acdatausrdn[] = $acusrdnfetched['value'];
423
-				  }
424
-				  $getacdatadnres->closeCursor();
425
-                             }
426
-
427
-                             if ($acdatausrdn) {
428
-
429
-                                 if (count($acdatausrdn) == 1) {
430
-
431
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => $acdatausrdn[0], 'internal_sender' => 1];
432
-
433
-                                 } elseif (count($acdatausrdn) > 1) {
434
-
435
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => implode("/", $acdatausrdn), 'internal_sender' => 1];
436
-                                 }
437
-
438
-                             } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
439
-
440
-                         } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
441
-                    }
442
-
443
-                    foreach ($phoneDisplayPairs as $pdpkey => $pdpvalue) {
444
-
445
-                         if (is_array($pdpvalue)) {
446
-                             $pdpkeyprc = '%' . $pdpkey;
447
-			     $updaterecms = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_received` SET `author_displayname` = ?, `internal_sender` = ? WHERE `from` LIKE ?');
448
-			     $updaterecmsres = $updaterecms->execute([$pdpvalue['author_displayname'], $pdpvalue['internal_sender'], $pdpkeyprc]);
449
-			     $updaterecmsres->closeCursor();
450
-                         }
451
-                    }
452
-                }
453
-
454
-
455
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_sent' table, for messages that were sent before the upgrade
456
-                $getsentfromnb = $this->connection->prepare('SELECT `from` FROM `*PREFIX*sms_relent_sent`');
457
-	        $getsentfromnbres = $getsentfromnb->execute();
458
-
459
-                $sentdatanmbrs = [];
460
-                while ($rowfetchedst = $getsentfromnbres->fetch()) {
461
-
462
-                       $sentdatanmbrspre = $rowfetchedst['from'];
463
-                       $sentdatanmbrsarr = explode("+", $sentdatanmbrspre);
464
-                       if (count($sentdatanmbrsarr) > 1) {
465
-                           $sentdatanmbrs[] = "+" . $sentdatanmbrsarr[1];
466
-                       } else {
467
-                           $sentdatanmbrs[] = $sentdatanmbrsarr[0];
468
-                       }
469
-                }
470
-                $getsentfromnbres->closeCursor();
471
-
472
-                if ($sentdatanmbrs) {
473
-
474
-                    $sentnmbrs = array_values(array_unique($sentdatanmbrs));
475
-
476
-                    $phoneDisplayPairsst = [];
477
-                    foreach ($sentnmbrs as $stkey => $stvalue) {
478
-
479
-                         $stvalueprc = '%' . $stvalue;
480
-                         $getacdatast = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` LIKE ?');
481
-	                 $getacdatastres = $getacdatast->execute(['phone', $stvalueprc]);
482
-
483
-		         $acdatausersst = [];
484
-		         while ($acusrstfetched = $getacdatastres->fetch()) {
485
-		                $acdatausersst[] = $acusrstfetched['uid'];
486
-		         }
487
-		         $getacdatastres->closeCursor();
488
-
489
-                         if ($acdatausersst) {
490
-
491
-		             $acdatausrdnst = [];
492
-                             foreach ($acdatausersst as $dnstkey => $dnstvalue) {
493
-
494
-		                  $getacdatadnst = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
495
-			          $getacdatadnstres = $getacdatadnst->execute([$dnstvalue, 'displayname']);
496
-
497
-				  while ($acusrdnstfetched = $getacdatadnstres->fetch()) {
498
-				         $acdatausrdnst[] = $acusrdnstfetched['value'];
499
-				  }
500
-				  $getacdatadnstres->closeCursor();
501
-                             }
502
-
503
-                             if ($acdatausrdnst) {
504
-
505
-                                 if (count($acdatausrdnst) == 1) {
506
-
507
-                                     $phoneDisplayPairsst[$stvalue] = ['author_displayname' => $acdatausrdnst[0]];
508
-
509
-                                 } elseif (count($acdatausrdnst) > 1) {
510
-
511
-                                     $phoneDisplayPairsst[$stvalue] = ['author_displayname' => implode("/", $acdatausrdnst)];
512
-                                 }
513
-
514
-                             } else { $phoneDisplayPairsst[$stvalue] = ['author_displayname' => '']; }
515
-
516
-                         } else { $phoneDisplayPairsst[$stvalue] = ['author_displayname' => '']; }
517
-                    }
518
-
519
-                    foreach ($phoneDisplayPairsst as $pstkey => $pstvalue) {
520
-
521
-                         if (is_array($pstvalue)) {
522
-                             $contfield = "%" . $pstkey;
523
-			     $updatesentmsst = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_sent` SET `author_displayname` = ? WHERE `from` LIKE ?');
524
-			     $updatesentmsres = $updatesentmsst->execute([$pstvalue['author_displayname'], $contfield]);
525
-			     $updatesentmsres->closeCursor();
526
-                         }
527
-                    }
528
-                }
529
-
530
-                return null;
531
-        }
532
-
533
-}
534 0
deleted file mode 100644
... ...
@@ -1,582 +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\Migration;
27
-
28
-use Closure;
29
-use OCP\DB\Types;
30
-use OCP\DB\ISchemaWrapper;
31
-use OCP\IDBConnection;
32
-use OCP\Migration\IOutput;
33
-use OCP\Migration\SimpleMigrationStep;
34
-
35
-
36
-class Version120Date20230520072431 extends SimpleMigrationStep {
37
-
38
-        /** @var IDBConnection */
39
-        private $connection;
40
-
41
-        /**
42
-         * @param IDBConnection $connection
43
-         */
44
-        public function __construct(IDBConnection $connection) {
45
-                $this->connection = $connection;
46
-        }
47
-
48
-	/**
49
-	 * @param IOutput $output
50
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
51
-	 * @param array $options
52
-	 * @return null|ISchemaWrapper
53
-	 */
54
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
55
-		/** @var ISchemaWrapper $schema */
56
-		$schema = $schemaClosure();
57
-
58
-		if (!$schema->hasTable('sms_relent_settings')) {
59
-			$table = $schema->createTable('sms_relent_settings');
60
-			$table->addColumn('id', Types::BIGINT, [
61
-				'autoincrement' => true,
62
-				'notnull' => true,
63
-                                'length' => 11,
64
-                                'unsigned' => true,
65
-			]);
66
-			$table->addColumn('user_id', Types::STRING, [
67
-				'notnull' => true,
68
-				'length' => 128,
69
-			]);
70
-			$table->addColumn('telapi_key', Types::STRING, [
71
-				'notnull' => true,
72
-				'length' => 512,
73
-			]);
74
-			$table->addColumn('tel_pub_key', Types::STRING, [
75
-				'notnull' => true,
76
-				'length' => 512,
77
-			]);
78
-			$table->addColumn('telapi_url_rec', Types::STRING, [
79
-				'notnull' => true,
80
-				'length' => 512,
81
-			]);
82
-			$table->addColumn('telapi_url', Types::STRING, [
83
-				'notnull' => true,
84
-				'length' => 512,
85
-			]);
86
-			$table->addColumn('messaging_profile_id', Types::STRING, [
87
-				'notnull' => true,
88
-				'length' => 512,
89
-			]);
90
-			$table->addColumn('nexapi_key', Types::STRING, [
91
-				'notnull' => true,
92
-				'length' => 512,
93
-			]);
94
-			$table->addColumn('nexapi_secret', Types::STRING, [
95
-				'notnull' => true,
96
-				'length' => 512,
97
-			]);
98
-			$table->addColumn('nexapi_url_rec', Types::STRING, [
99
-				'notnull' => true,
100
-				'length' => 512,
101
-			]);
102
-			$table->addColumn('nexapi_url', Types::STRING, [
103
-				'notnull' => true,
104
-				'length' => 512,
105
-			]);
106
-			$table->addColumn('twilapi_key', Types::STRING, [
107
-				'notnull' => true,
108
-				'length' => 512,
109
-			]);
110
-			$table->addColumn('twilapi_secret', Types::STRING, [
111
-				'notnull' => true,
112
-				'length' => 512,
113
-			]);
114
-			$table->addColumn('twilapi_url_rec', Types::STRING, [
115
-				'notnull' => true,
116
-				'length' => 512,
117
-			]);
118
-			$table->addColumn('twilapi_url', Types::STRING, [
119
-				'notnull' => true,
120
-				'length' => 512,
121
-			]);
122
-			$table->addColumn('flowapi_key', Types::STRING, [
123
-				'notnull' => true,
124
-				'length' => 512,
125
-			]);
126
-			$table->addColumn('flowapi_secret', Types::STRING, [
127
-				'notnull' => true,
128
-				'length' => 512,
129
-			]);
130
-			$table->addColumn('flowapi_url_rec', Types::STRING, [
131
-				'notnull' => true,
132
-				'length' => 512,
133
-			]);
134
-			$table->addColumn('flowapi_url', Types::STRING, [
135
-				'notnull' => true,
136
-				'length' => 512,
137
-			]);
138
-			$table->addColumn('tel_sender_name', Types::STRING, [
139
-				'notnull' => false,
140
-				'length' => 48,
141
-				'default' => '',
142
-			]);
143
-			$table->addColumn('nex_sender_name', Types::STRING, [
144
-				'notnull' => false,
145
-				'length' => 48,
146
-				'default' => '',
147
-			]);
148
-			$table->addColumn('twil_sender_name', Types::STRING, [
149
-				'notnull' => false,
150
-				'length' => 48,
151
-				'default' => '',
152
-			]);
153
-			$table->addColumn('flow_sender_name', Types::STRING, [
154
-				'notnull' => false,
155
-				'length' => 48,
156
-				'default' => '',
157
-			]);
158
-			$table->addColumn('messagesperpage', Types::INTEGER, [
159
-				'notnull' => false,
160
-				'length' => 11,
161
-                                'unsigned' => true,
162
-			]);
163
-			$table->addColumn('get_notify', Types::SMALLINT, [
164
-				'notnull' => false,
165
-				'length' => 1,
166
-			]);
167
-			$table->addColumn('notification_email', Types::STRING, [
168
-				'notnull' => false,
169
-				'length' => 512,
170
-				'default' => '',
171
-			]);
172
-			$table->addColumn('getsmsinemail', Types::SMALLINT, [
173
-				'notnull' => false,
174
-				'length' => 1,
175
-			]);
176
-			$table->addColumn('show_all_messages', Types::SMALLINT, [
177
-				'notnull' => false,
178
-				'length' => 1,
179
-			]);
180
-			$table->addColumn('show_display_names', Types::SMALLINT, [
181
-				'notnull' => false,
182
-				'length' => 1,
183
-			]);
184
-                        $table->setPrimaryKey(['id']);
185
-                        $table->addUniqueIndex(['id']);
186
-
187
-		}
188
-
189
-
190
-		if (!$schema->hasTable('sms_relent_received')) {
191
-			$table = $schema->createTable('sms_relent_received');
192
-			$table->addColumn('id', Types::BIGINT, [
193
-				'autoincrement' => true,
194
-				'notnull' => true,
195
-                                'length' => 11,
196
-                                'unsigned' => true,
197
-			]);
198
-			$table->addColumn('user_id', Types::STRING, [
199
-				'notnull' => true,
200
-				'length' => 64,
201
-			]);
202
-			$table->addColumn('message_id', Types::STRING, [
203
-				'notnull' => true,
204
-				'length' => 512,
205
-			]);
206
-			$table->addColumn('date', Types::DATETIME, [
207
-				'notnull' => true,
208
-			]);
209
-			$table->addColumn('from', Types::STRING, [
210
-				'notnull' => true,
211
-				'length' => 128,
212
-			]);
213
-			$table->addColumn('to', Types::STRING, [
214
-				'notnull' => true,
215
-				'length' => 128,
216
-			]);
217
-			$table->addColumn('message', Types::TEXT, [
218
-				'notnull' => false,
219
-				'default' => '',
220
-			]);
221
-			$table->addColumn('author_displayname', Types::STRING, [
222
-				'notnull' => true,
223
-				'length' => 255,
224
-			]);
225
-			$table->addColumn('internal_sender', Types::SMALLINT, [
226
-				'notnull' => false,
227
-				'length' => 1,
228
-			]);
229
-                        $table->setPrimaryKey(['id']);
230
-                        $table->addUniqueIndex(['id']);
231
-
232
-		}
233
-
234
-
235
-		if (!$schema->hasTable('sms_relent_sent')) {
236
-			$table = $schema->createTable('sms_relent_sent');
237
-			$table->addColumn('id', Types::BIGINT, [
238
-				'autoincrement' => true,
239
-				'notnull' => true,
240
-                                'length' => 11,
241
-                                'unsigned' => true,
242
-			]);
243
-			$table->addColumn('user_id', Types::STRING, [
244
-				'notnull' => true,
245
-				'length' => 64,
246
-			]);
247
-			$table->addColumn('message_id', Types::STRING, [
248
-				'notnull' => true,
249
-				'length' => 512,
250
-			]);
251
-			$table->addColumn('date', Types::DATETIME, [
252
-				'notnull' => true,
253
-			]);
254
-			$table->addColumn('from', Types::STRING, [
255
-				'notnull' => true,
256
-				'length' => 128,
257
-			]);
258
-			$table->addColumn('to', Types::STRING, [
259
-				'notnull' => true,
260
-				'length' => 128,
261
-			]);
262
-			$table->addColumn('network ', Types::STRING, [
263
-				'notnull' => false,
264
-				'length' => 64,
265
-				'default' => '',
266
-			]);
267
-			$table->addColumn('price', Types::STRING, [
268
-				'notnull' => false,
269
-				'length' => 64,
270
-				'default' => '',
271
-			]);
272
-			$table->addColumn('status', Types::STRING, [
273
-				'notnull' => false,
274
-				'length' => 512,
275
-				'default' => '',
276
-			]);
277
-			$table->addColumn('deliveryreceipt', Types::STRING, [
278
-				'notnull' => false,
279
-				'length' => 64,
280
-				'default' => '',
281
-			]);
282
-			$table->addColumn('message', Types::TEXT, [
283
-				'notnull' => false,
284
-                                'default' => '',
285
-			]);
286
-			$table->addColumn('author_displayname', Types::STRING, [
287
-				'notnull' => true,
288
-				'length' => 255,
289
-			]);
290
-                        $table->setPrimaryKey(['id']);
291
-                        $table->addUniqueIndex(['id']);
292
-
293
-		}
294
-
295
-
296
-		if (!$schema->hasTable('sms_relent_autorply')) {
297
-			$table = $schema->createTable('sms_relent_autorply');
298
-			$table->addColumn('id', Types::BIGINT, [
299
-				'autoincrement' => true,
300
-				'notnull' => true,
301
-                                'length' => 11,
302
-                                'unsigned' => true,
303
-			]);
304
-			$table->addColumn('user_id', Types::STRING, [
305
-				'notnull' => true,
306
-				'length' => 128,
307
-			]);
308
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
309
-				'notnull' => true,
310
-				'length' => 255,
311
-			]);
312
-			$table->addColumn('phone_number', Types::STRING, [
313
-				'notnull' => true,
314
-				'length' => 128,
315
-			]);
316
-			$table->addColumn('days_of_week', Types::STRING, [
317
-				'notnull' => false,
318
-				'length' => 64,
319
-                                'default' => '',
320
-			]);
321
-			$table->addColumn('daily_start', Types::STRING, [
322
-				'notnull' => false,
323
-				'length' => 8,
324
-                                'default' => '',
325
-			]);
326
-			$table->addColumn('daily_end', Types::STRING, [
327
-				'notnull' => false,
328
-				'length' => 8,
329
-                                'default' => '',
330
-			]);
331
-			$table->addColumn('vacation_start', Types::DATETIME, [
332
-				'notnull' => false,
333
-			]);
334
-			$table->addColumn('vacation_end', Types::DATETIME, [
335
-				'notnull' => false,
336
-			]);
337
-			$table->addColumn('message_text', Types::TEXT, [
338
-				'notnull' => false,
339
-                                'default' => '',
340
-			]);
341
-                        $table->setPrimaryKey(['id']);
342
-                        $table->addUniqueIndex(['id']);
343
-
344
-		}
345
-
346
-
347
-		if (!$schema->hasTable('sms_relent_restrict')) {
348
-			$table = $schema->createTable('sms_relent_restrict');
349
-			$table->addColumn('id', Types::BIGINT, [
350
-				'autoincrement' => true,
351
-				'notnull' => true,
352
-                                'length' => 11,
353
-                                'unsigned' => true,
354
-			]);
355
-			$table->addColumn('user_id', Types::STRING, [
356
-				'notnull' => true,
357
-				'length' => 128,
358
-			]);
359
-			$table->addColumn('saved_by_dsplname', Types::STRING, [
360
-				'notnull' => true,
361
-				'length' => 255,
362
-			]);
363
-			$table->addColumn('phone_number', Types::STRING, [
364
-				'notnull' => true,
365
-				'length' => 128,
366
-			]);
367
-			$table->addColumn('groups', Types::STRING, [
368
-				'notnull' => true,
369
-				'length' => 2048,
370
-			]);
371
-			$table->addColumn('users', Types::STRING, [
372
-				'notnull' => true,
373
-				'length' => 2048,
374
-			]);
375
-                        $table->setPrimaryKey(['id']);
376
-                        $table->addUniqueIndex(['id']);
377
-
378
-		}
379
-
380
-		if (!$schema->hasTable('sms_relent_subac')) {
381
-			$table = $schema->createTable('sms_relent_subac');
382
-			$table->addColumn('id', Types::BIGINT, [
383
-				'autoincrement' => true,
384
-				'notnull' => true,
385
-                                'length' => 11,
386
-                                'unsigned' => true,
387
-			]);
388
-			$table->addColumn('user_id', Types::STRING, [
389
-				'notnull' => true,
390
-				'length' => 128,
391
-			]);
392
-			$table->addColumn('tnx_groups_allowed', Types::TEXT, [
393
-				'notnull' => false,
394
-                                'default' => '',
395
-			]);
396
-			$table->addColumn('tnx_users_allowed', Types::TEXT, [
397
-				'notnull' => false,
398
-                                'default' => '',
399
-			]);
400
-			$table->addColumn('plv_groups_allowed', Types::TEXT, [
401
-				'notnull' => false,
402
-                                'default' => '',
403
-			]);
404
-			$table->addColumn('plv_users_allowed', Types::TEXT, [
405
-				'notnull' => false,
406
-                                'default' => '',
407
-			]);
408
-			$table->addColumn('twl_groups_allowed', Types::TEXT, [
409
-				'notnull' => false,
410
-                                'default' => '',
411
-			]);
412
-			$table->addColumn('twl_users_allowed', Types::TEXT, [
413
-				'notnull' => false,
414
-                                'default' => '',
415
-			]);
416
-			$table->addColumn('flr_groups_allowed', Types::TEXT, [
417
-				'notnull' => false,
418
-                                'default' => '',
419
-			]);
420
-			$table->addColumn('flr_users_allowed', Types::TEXT, [
421
-				'notnull' => false,
422
-                                'default' => '',
423
-			]);
424
-                        $table->setPrimaryKey(['id']);
425
-                        $table->addUniqueIndex(['id']);
426
-		}
427
-
428
-
429
-		return $schema;
430
-	}
431
-
432
-        public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
433
-
434
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_received' table, for messages that were received before the upgrade
435
-                $getrecfromnb = $this->connection->prepare('SELECT `from` FROM `*PREFIX*sms_relent_received`');
436
-	        $getrecfromnbres = $getrecfromnb->execute();
437
-
438
-                $recdatanmbrs = [];
439
-                while ($rowfetched = $getrecfromnbres->fetch()) {
440
-                       $recdatanmbrs[] = $rowfetched['from'];
441
-                }
442
-                $getrecfromnbres->closeCursor();
443
-
444
-                if ($recdatanmbrs) {
445
-
446
-                    $recnmbrs = array_values(array_unique($recdatanmbrs));
447
-
448
-                    $phoneDisplayPairs = [];
449
-                    foreach ($recnmbrs as $rckey => $rcvalue) {
450
-
451
-                         $rcvalueprc = '%' . $rcvalue;
452
-                         $getacdata = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` LIKE ?');
453
-	                 $getacdatares = $getacdata->execute(['phone', $rcvalueprc]);
454
-
455
-		         $acdatausers = [];
456
-		         while ($acusrfetched = $getacdatares->fetch()) {
457
-		                $acdatausers[] = $acusrfetched['uid'];
458
-		         }
459
-		         $getacdatares->closeCursor();
460
-
461
-
462
-                         if ($acdatausers) {
463
-
464
-		             $acdatausrdn = [];
465
-                             foreach ($acdatausers as $dnkey => $dnvalue) {
466
-
467
-		                  $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
468
-			          $getacdatadnres = $getacdatadn->execute([$dnvalue, 'displayname']);
469
-
470
-				  while ($acusrdnfetched = $getacdatadnres->fetch()) {
471
-				         $acdatausrdn[] = $acusrdnfetched['value'];
472
-				  }
473
-				  $getacdatadnres->closeCursor();
474
-                             }
475
-
476
-                             if ($acdatausrdn) {
477
-
478
-                                 if (count($acdatausrdn) == 1) {
479
-
480
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => $acdatausrdn[0], 'internal_sender' => 1];
481
-
482
-                                 } elseif (count($acdatausrdn) > 1) {
483
-
484
-                                     $phoneDisplayPairs[$rcvalue] = ['author_displayname' => implode("/", $acdatausrdn), 'internal_sender' => 1];
485
-                                 }
486
-
487
-                             } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
488
-
489
-                         } else { $phoneDisplayPairs[$rcvalue] = ['author_displayname' => '', 'internal_sender' => 0]; }
490
-                    }
491
-
492
-                    foreach ($phoneDisplayPairs as $pdpkey => $pdpvalue) {
493
-
494
-                         if (is_array($pdpvalue)) {
495
-                             $pdpkeyprc = '%' . $pdpkey;
496
-			     $updaterecms = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_received` SET `author_displayname` = ?, `internal_sender` = ? WHERE `from` LIKE ?');
497
-			     $updaterecmsres = $updaterecms->execute([$pdpvalue['author_displayname'], $pdpvalue['internal_sender'], $pdpkeyprc]);
498
-			     $updaterecmsres->closeCursor();
499
-                         }
500
-                    }
501
-                }
502
-
503
-
504
-                // Enter the Nextcloud display name in the 'author_displayname' column of the 'sms_relent_sent' table, for messages that were sent before the upgrade
505
-                $getsentfromnb = $this->connection->prepare('SELECT `from` FROM `*PREFIX*sms_relent_sent`');
506
-	        $getsentfromnbres = $getsentfromnb->execute();
507
-
508
-                $sentdatanmbrs = [];
509
-                while ($rowfetchedst = $getsentfromnbres->fetch()) {
510
-
511
-                       $sentdatanmbrspre = $rowfetchedst['from'];
512
-                       $sentdatanmbrsarr = explode("+", $sentdatanmbrspre);
513
-                       if (count($sentdatanmbrsarr) > 1) {
514
-                           $sentdatanmbrs[] = "+" . $sentdatanmbrsarr[1];
515
-                       } else {
516
-                           $sentdatanmbrs[] = $sentdatanmbrsarr[0];
517
-                       }
518
-                }
519
-                $getsentfromnbres->closeCursor();
520
-
521
-                if ($sentdatanmbrs) {
522
-
523
-                    $sentnmbrs = array_values(array_unique($sentdatanmbrs));
524
-
525
-                    $phoneDisplayPairsst = [];
526
-                    foreach ($sentnmbrs as $stkey => $stvalue) {
527
-
528
-                         $stvalueprc = '%' . $stvalue;
529
-                         $getacdatast = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` LIKE ?');
530
-	                 $getacdatastres = $getacdatast->execute(['phone', $stvalueprc]);
531
-
532
-		         $acdatausersst = [];
533
-		         while ($acusrstfetched = $getacdatastres->fetch()) {
534
-		                $acdatausersst[] = $acusrstfetched['uid'];
535
-		         }
536
-		         $getacdatastres->closeCursor();
537
-
538
-                         if ($acdatausersst) {
539
-
540
-		             $acdatausrdnst = [];
541
-                             foreach ($acdatausersst as $dnstkey => $dnstvalue) {
542
-
543
-		                  $getacdatadnst = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
544
-			          $getacdatadnstres = $getacdatadnst->execute([$dnstvalue, 'displayname']);
545
-
546
-				  while ($acusrdnstfetched = $getacdatadnstres->fetch()) {
547
-				         $acdatausrdnst[] = $acusrdnstfetched['value'];
548
-				  }
549
-				  $getacdatadnstres->closeCursor();
550
-                             }
551
-
552
-                             if ($acdatausrdnst) {
553
-
554
-                                 if (count($acdatausrdnst) == 1) {
555
-
556
-                                     $phoneDisplayPairsst[$stvalue] = ['author_displayname' => $acdatausrdnst[0]];
557
-
558
-                                 } elseif (count($acdatausrdnst) > 1) {
559
-
560
-                                     $phoneDisplayPairsst[$stvalue] = ['author_displayname' => implode("/", $acdatausrdnst)];
561
-                                 }
562
-
563
-                             } else { $phoneDisplayPairsst[$stvalue] = ['author_displayname' => '']; }
564
-
565
-                         } else { $phoneDisplayPairsst[$stvalue] = ['author_displayname' => '']; }
566
-                    }
567
-
568
-                    foreach ($phoneDisplayPairsst as $pstkey => $pstvalue) {
569
-
570
-                         if (is_array($pstvalue)) {
571
-                             $contfield = "%" . $pstkey;
572
-			     $updatesentmsst = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_sent` SET `author_displayname` = ? WHERE `from` LIKE ?');
573
-			     $updatesentmsres = $updatesentmsst->execute([$pstvalue['author_displayname'], $contfield]);
574
-			     $updatesentmsres->closeCursor();
575
-                         }
576
-                    }
577
-                }
578
-
579
-                return null;
580
-        }
581
-
582
-}
583 0
deleted file mode 100644
... ...
@@ -1,3374 +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
-
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
-            $escapedmessagepre = $recmessagearr[4];
99
-            $escapedmessage = nl2br($escapedmessagepre);
100
-
101
-            $sql = $this->connection->prepare('
102
-				INSERT INTO `*PREFIX*sms_relent_received`
103
-					(`user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`)
104
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?)
105
-			');
106
-	    $sql->execute([$userId, $recmessagearr[0], $recmessagearr[1], $recmessagearr[2], $recmessagearr[3], $escapedmessage, $authorDisplayNm, $internalSender]);
107
-     }
108
-
109
-
110
-     /**
111
-      * @NoAdminRequired
112
-      *
113
-      */
114
-     public function insertsentsms($userId, $sentmessagearr) {
115
-
116
-            $authorDisplayName = '';
117
-            $msgsentfrompre = explode("+", $sentmessagearr[2]);
118
-            $msgsentfrom = "+" . $msgsentfrompre[1];
119
-
120
-            // Search for the sender's Display Name
121
-            $getacdatadnst = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
122
-            $getacdatadnstres = $getacdatadnst->execute([$userId, 'displayname']);
123
-	    $acusrdnstfetched = $getacdatadnstres->fetch();
124
-            $getacdatadnstres->closeCursor();
125
-
126
-            if ($acusrdnstfetched) {
127
-	        $authorDisplayName = $acusrdnstfetched['value'];
128
-	    }
129
-
130
-            $textwithnl = nl2br($sentmessagearr[8]);
131
-            $sql = $this->connection->prepare('
132
-				INSERT INTO `*PREFIX*sms_relent_sent`
133
-					(`user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`)
134
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
135
-			');
136
-	    $sql->execute([$userId, $sentmessagearr[0], $sentmessagearr[1], $sentmessagearr[2], $sentmessagearr[3], $sentmessagearr[4], $sentmessagearr[5], $sentmessagearr[6], 
137
-                           $sentmessagearr[7], $textwithnl, $authorDisplayName]);
138
-     }
139
-
140
-
141
-     /**
142
-      * @NoAdminRequired
143
-      *
144
-      */
145
-     public function updatedeliverystatustel($ncuserfortelnyxdel, $messageid, $network, $messageprice, $messagestatus, $deliverystatus) {
146
-
147
-	    $sqlupdateds = $this->connection->prepare('
148
-			UPDATE `*PREFIX*sms_relent_sent`
149
-			SET `price` = ?, `status` = ?, `deliveryreceipt` = ?, `network` = ?
150
-                        WHERE `message_id` = ? AND `user_id` = ? ');
151
-	    $updateRes = $sqlupdateds->execute([$messageprice, $messagestatus, $deliverystatus, $network, $messageid, $ncuserfortelnyxdel]);
152
-	    $updateRes->closeCursor();
153
-     }
154
-
155
-
156
-     /**
157
-      * @NoAdminRequired
158
-      *
159
-      */
160
-     public function updatedeliverystatusnex($ncuserforplivodel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus) {
161
-
162
-	    $sqlupdatedspl = $this->connection->prepare('
163
-			UPDATE `*PREFIX*sms_relent_sent`
164
-			SET `price` = ?, `deliveryreceipt` = ?, `status` = ?, `network` = ?
165
-                        WHERE `message_id` = ? AND `user_id` = ? ');
166
-	    $updateResdspl = $sqlupdatedspl->execute([$messageprice, $deliverystatus, $mStatus, $networkcode, $messageid, $ncuserforplivodel]);
167
-	    $updateResdspl->closeCursor();
168
-     }
169
-
170
-
171
-     /**
172
-      * @NoAdminRequired
173
-      *
174
-      */
175
-     public function updatedeliverystatustwil($ncuserfortwildel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus) {
176
-
177
-	    $sqlupdatedstw = $this->connection->prepare('
178
-			UPDATE `*PREFIX*sms_relent_sent`
179
-			SET `price` = ?, `deliveryreceipt` = ?, `status` = ?, `network` = ?
180
-                        WHERE `message_id` = ? AND `user_id` = ? ');
181
-	    $updateResdstw = $sqlupdatedstw->execute([$messageprice, $deliverystatus, $mStatus, $networkcode, $messageid, $ncuserfortwildel]);
182
-	    $updateResdstw->closeCursor();
183
-     }
184
-
185
-
186
-     /**
187
-      * @NoAdminRequired
188
-      *
189
-      */
190
-     public function updatedeliverystatusflow($ncuserforflowdel, $messageid, $networkcode, $messageprice, $mStatus, $deliverystatus) {
191
-
192
-	    $sqlupdatedsfl = $this->connection->prepare('
193
-			UPDATE `*PREFIX*sms_relent_sent`
194
-			SET `price` = ?, `deliveryreceipt` = ?, `status` = ?, `network` = ?
195
-                        WHERE `message_id` = ? AND `user_id` = ? ');
196
-	    $updateResdsfl = $sqlupdatedsfl->execute([$messageprice, $deliverystatus, $mStatus, $networkcode, $messageid, $ncuserforflowdel]);
197
-	    $updateResdsfl->closeCursor();
198
-     }
199
-
200
-
201
-     /**
202
-      * @NoAdminRequired
203
-      */
204
-     public function getreceivedtable($userId) {
205
-
206
-        // Get the user's preferences from the settings
207
-        $getgamcheckrc = $this->connection->prepare('
208
-		       SELECT `user_id`, `show_all_messages`, `show_display_names`
209
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
210
-        $getgamcheckrcres = $getgamcheckrc->execute([$userId]);
211
-        $getcrgamsrcpref = $getgamcheckrcres->fetch();
212
-        $crgamsrcpref = $getcrgamsrcpref['show_all_messages'];
213
-        $crdnmsrcpref = $getcrgamsrcpref['show_display_names'];
214
-        $getgamcheckrcres->closeCursor();
215
-
216
-
217
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
218
-        if ($crgamsrcpref == 1 && $this->groupManager->isAdmin($userId)) {
219
-
220
-            // Get the users that belong to the 'admin' group
221
-            $getadmn = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
222
-            $getadmnres = $getadmn->execute(['admin']);
223
-
224
-            $usersadminsd = [];
225
-            while ($getadmnusrs = $getadmnres->fetch()) {
226
-                   $usersadminsd[] = $getadmnusrs['uid'];
227
-            }
228
-            $getadmnres->closeCursor();
229
-
230
-            // Get the groups and users that were allowed access to the API keys
231
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
232
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
233
-                                                   WHERE `user_id` = ?');
234
-            $getgrpsres = $getgrps->execute([$userId]);
235
-            $getgrpsusr = $getgrpsres->fetch();
236
-            $getgrpsres->closeCursor();
237
-
238
-            if ($getgrpsusr) {
239
-
240
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
241
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
242
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
243
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
244
-
245
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
246
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
247
-
248
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
249
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
250
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
251
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
252
-
253
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
254
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
255
-
256
-            } else {
257
-                $allwdusersunq = [];
258
-                $allwdgroupsunq = [];
259
-            }
260
-
261
-            // Get the username for each Display Name of the allowed users
262
-            $allwdusersfnl = [];
263
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
264
-
265
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
266
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
267
-		         $acdatausrname = $getacdatausrnmres->fetch();
268
-                         if ($acdatausrname) {
269
-                             $allwdusersfnl[] = $acdatausrname['uid'];
270
-                         }
271
-                         $getacdatausrnmres->closeCursor();
272
-            }
273
-
274
-            // Get the users from all the allowed groups
275
-            $allwdusersgrpmlt = [];
276
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
277
-
278
-                         // Get all the users that belong to the current group
279
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
280
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
281
-
282
-		         while ($getusrname = $getusringroupres->fetch()) {
283
-
284
-	                        // Ensure the current user is not an admin
285
-                                if (!in_array($getusrname['uid'], $usersadminsd)) {
286
-                                     $allwdusersgrpmlt[] = $getusrname['uid'];
287
-                                }
288
-                         }
289
-		         $getusringroupres->closeCursor();
290
-            }
291
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
292
-            
293
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
294
-            $allusruniquest = array_unique($allusr);
295
-
296
-            if ($allusruniquest) {
297
-                array_unshift($allusruniquest, $userId);
298
-                $allusruniquerc = $allusruniquest;
299
-            } else { $allusruniquerc = [$userId]; }
300
-
301
-            $procardatarc = implode(',', array_fill(0, count($allusruniquerc), '?'));
302
-        }
303
-
304
-
305
-        if ($crgamsrcpref == 1 && $this->groupManager->isAdmin($userId)) {
306
-
307
-            if ($crdnmsrcpref == 1) {
308
-	        $getrectable = $this->connection->prepare('
309
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
310
-			FROM  `*PREFIX*sms_relent_received` WHERE `user_id` IN (' . $procardatarc . ')');
311
-	        $rcresult = $getrectable->execute($allusruniquerc);
312
-            } else {
313
-	        $getrectable = $this->connection->prepare('
314
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
315
-			FROM  `*PREFIX*sms_relent_received` WHERE `user_id` IN (' . $procardatarc . ')');
316
-	        $rcresult = $getrectable->execute($allusruniquerc);
317
-            }
318
-
319
-        } else {
320
-
321
-            if ($crdnmsrcpref == 1) {
322
-	        $getrectable = $this->connection->prepare('
323
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
324
-			FROM  `*PREFIX*sms_relent_received`
325
-			WHERE `user_id` = ?');
326
-	        $rcresult = $getrectable->execute([$userId]);
327
-            } else {
328
-	        $getrectable = $this->connection->prepare('
329
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `internal_sender`
330
-			FROM  `*PREFIX*sms_relent_received`
331
-			WHERE `user_id` = ?');
332
-	        $rcresult = $getrectable->execute([$userId]);
333
-            }
334
-        }
335
-
336
-        $recdatatable = [];
337
-        while ($rowfetched = $rcresult->fetch()) {
338
-               $recdatatable[] = $rowfetched;
339
-        }
340
-	$rcresult->closeCursor();
341
-
342
-        $recdatafromdb = $recdatatable;
343
-
344
-
345
-        if ($this->groupManager->isAdmin($userId)) {
346
-
347
-              $recdatafdb = ['datarows' => $recdatafromdb, 'showdispnm' => $crdnmsrcpref];
348
-              return $recdatafdb;
349
-
350
-        } else {
351
-
352
-            // Get the restrictions from the 'sms_relent_restrict' table
353
-            $getrestr = $this->connection->prepare('
354
-		       SELECT `phone_number`, `groups`, `users`
355
-		       FROM  `*PREFIX*sms_relent_restrict`');
356
-            $getrestrres = $getrestr->execute();
357
-
358
-            $restrdata = [];
359
-            while ($restrfetched = $getrestrres->fetch()) {
360
-                   $restrdata[] = $restrfetched;
361
-            }
362
-            $getrestrres->closeCursor();
363
-
364
-            if ($restrdata) {
365
-
366
-                // Get the groups to which the current user belongs
367
-                $getusrgrp = $this->connection->prepare('
368
-		       SELECT `gid`, `uid`
369
-		       FROM  `*PREFIX*group_user`
370
-                       WHERE `uid` = ?');
371
-                $getusrgrpres = $getusrgrp->execute([$userId]);
372
-
373
-                $usergrps = [];
374
-                while ($fetchedgrps = $getusrgrpres->fetch()) {
375
-                       $usergrps[] = $fetchedgrps['gid'];
376
-                }
377
-                $getusrgrpres->closeCursor();
378
-
379
-		// Get the Display Name of the current user
380
-		$getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
381
-		$getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
382
-		$acdatausrdnadm = $getacdatadnres->fetch();
383
-		$cruserdname = $acdatausrdnadm['value'];
384
-		$getacdatadnres->closeCursor();
385
-
386
-                // Get the phone numbers that are not allowed for the current user
387
-                $restrPhoneNb = [];
388
-                foreach ($restrdata as $rskey => $rsvalue) {
389
-
390
-                       $restrgrparr = explode("|", $rsvalue['groups']);
391
-                       $chck = 0;
392
-                       foreach ($restrgrparr as $rkey => $rvalue) {
393
-                                if (str_contains(implode("|", $usergrps), $rvalue)) { $chck++; }
394
-                       }
395
-                       if (str_contains($rsvalue['users'], $cruserdname)) { $chck++; }
396
-
397
-                       if ($chck == 0) { $restrPhoneNb[] = $rsvalue['phone_number']; }
398
-                }
399
-
400
-                $restrPhoneNmbrs = array_unique($restrPhoneNb);
401
-
402
-                // Clean the phone numbers from tags
403
-                $restrPhfin = [];
404
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
405
-
406
-                    $restrpharr = explode(": ", $phvalue);
407
-                    $restrPhfin[] = $restrpharr[1];
408
-                }
409
-
410
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
411
-                foreach ($recdatafromdb as $mdkey => $mdvalue) {
412
-
413
-                    if (str_contains($mdvalue['to'], "+")) {
414
-                        $fromnmbrarr = explode("+", $mdvalue['to']);
415
-                        if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
416
-                            unset($recdatafromdb[$mdkey]);
417
-                        }
418
-                    } else {
419
-                        $tonmbrarr = explode(": ", $mdvalue['to']);
420
-                        if (count($tonmbrarr) == 2) {
421
-                            $tonmbrtbcmprd = $tonmbrarr[1];
422
-                        } else {
423
-                            $tonmbrtbcmprd = $tonmbrarr[0];
424
-                        }
425
-                        if (in_array($tonmbrtbcmprd, $restrPhfin)) {
426
-                            unset($recdatafromdb[$mdkey]);
427
-                        }
428
-                    }
429
-                }
430
-
431
-                $recdatafdbproc = array_values($recdatafromdb);
432
-
433
-                $recdataproc = ['datarows' => $recdatafdbproc, 'showdispnm' => $crdnmsrcpref];
434
-                return $recdataproc;
435
-            }
436
-        }
437
-     }
438
-
439
-
440
-     /**
441
-      * @NoAdminRequired
442
-      */
443
-     public function getreceivedtablefordel($userId) {
444
-
445
-        if ($this->groupManager->isAdmin($userId)) {
446
-
447
-            $getrecfordl = $this->connection->prepare('
448
-			SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `message`, `author_displayname`, `internal_sender`
449
-			FROM  `*PREFIX*sms_relent_received`
450
-			WHERE `user_id` = ?');
451
-	    $resultdl = $getrecfordl->execute([$userId]);
452
-
453
-            $recdatatable = [];
454
-            while ($rowfetched = $resultdl->fetch()) {
455
-                   $recdatatable[] = $rowfetched;
456
-            }
457
-            $resultdl->closeCursor();
458
-
459
-            $recdatafromdb = $recdatatable;
460
-
461
-            return $recdatafromdb;
462
-
463
-        } else { return "not permitted"; }
464
-     }
465
-
466
-
467
-     /**
468
-      * @NoAdminRequired
469
-      */
470
-     public function removerecrows($userId, $recmessagedbIDs) {
471
-
472
-        foreach ($recmessagedbIDs as $key => $rowtodel) {
473
-		 $query = $this->connection->prepare('
474
-		       DELETE FROM `*PREFIX*sms_relent_received`
475
-		       WHERE `id` = ?');
476
-		 $deleteResult = $query->execute([$rowtodel]);
477
-		 $deleteResult->closeCursor();
478
-        }
479
-
480
-	$sqlupdate = $this->connection->prepare('
481
-                  SET @resetrec = 0;
482
-		  UPDATE `*PREFIX*sms_relent_received`
483
-		  SET `id` = @resetrec := @resetrec + 1;
484
-                  ALTER TABLE `*PREFIX*sms_relent_received` auto_increment=1;');
485
-	$updateRes = $sqlupdate->execute();
486
-	$updateRes->closeCursor();
487
-     }
488
-
489
-
490
-     /**
491
-      * @NoAdminRequired
492
-      */
493
-     public function getsenttable($userId) {
494
-
495
-        // Get the user's preferences from the settings
496
-        $getgamcheck = $this->connection->prepare('
497
-		       SELECT `user_id`, `show_all_messages`, `show_display_names`
498
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
499
-        $getgamcheckres = $getgamcheck->execute([$userId]);
500
-        $getcrgamspref = $getgamcheckres->fetch();
501
-        $crgamspref = $getcrgamspref['show_all_messages'];
502
-        $crdnamespref = $getcrgamspref['show_display_names'];
503
-        $getgamcheckres->closeCursor();
504
-
505
-
506
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
507
-        if ($crgamspref == 1 && $this->groupManager->isAdmin($userId)) {
508
-
509
-            // Get the users that belong to the 'admin' group
510
-            $getadmn = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
511
-            $getadmnres = $getadmn->execute(['admin']);
512
-
513
-            $usersadminsd = [];
514
-            while ($getadmnusrs = $getadmnres->fetch()) {
515
-                   $usersadminsd[] = $getadmnusrs['uid'];
516
-            }
517
-            $getadmnres->closeCursor();
518
-
519
-            // Get the groups and users that were allowed access to the API keys
520
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
521
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
522
-                                                   WHERE `user_id` = ?');
523
-            $getgrpsres = $getgrps->execute([$userId]);
524
-            $getgrpsusr = $getgrpsres->fetch();
525
-            $getgrpsres->closeCursor();
526
-
527
-            if ($getgrpsusr) {
528
-
529
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
530
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
531
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
532
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
533
-
534
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
535
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
536
-
537
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
538
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
539
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
540
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
541
-
542
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
543
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
544
-
545
-            } else {
546
-                $allwdusersunq = [];
547
-                $allwdgroupsunq = [];
548
-            }
549
-
550
-            // Get the username for each Display Name of the allowed users
551
-            $allwdusersfnl = [];
552
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
553
-
554
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
555
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
556
-		         $acdatausrname = $getacdatausrnmres->fetch();
557
-                         if ($acdatausrname) {
558
-                             $allwdusersfnl[] = $acdatausrname['uid'];
559
-                         }
560
-                         $getacdatausrnmres->closeCursor();
561
-            }
562
-
563
-            // Get the users from all the allowed groups
564
-            $allwdusersgrpmlt = [];
565
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
566
-
567
-                         // Get all the users that belong to the current group
568
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
569
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
570
-
571
-		         while ($getusrname = $getusringroupres->fetch()) {
572
-
573
-	                        // Ensure the current user is not an admin
574
-                                if (!in_array($getusrname['uid'], $usersadminsd)) {
575
-                                     $allwdusersgrpmlt[] = $getusrname['uid'];
576
-                                }
577
-                         }
578
-		         $getusringroupres->closeCursor();
579
-            }
580
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
581
-            
582
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
583
-            $allusruniquest = array_unique($allusr);
584
-
585
-            if ($allusruniquest) {
586
-                array_unshift($allusruniquest, $userId);
587
-                $allusrunique = $allusruniquest;
588
-            } else { $allusrunique = [$userId]; }
589
-
590
-            $procardata = implode(',', array_fill(0, count($allusrunique), '?'));
591
-        }
592
-
593
-
594
-        if ($crgamspref == 1 && $this->groupManager->isAdmin($userId)) {
595
-
596
-            if ($crdnamespref == 1) {
597
-                $getsenttbl = $this->connection->prepare('
598
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
599
-		       FROM  `*PREFIX*sms_relent_sent` WHERE `user_id` IN (' . $procardata . ')');
600
-                $resultsent = $getsenttbl->execute($allusrunique);
601
-            } else {
602
-                $getsenttbl = $this->connection->prepare('
603
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`
604
-		       FROM  `*PREFIX*sms_relent_sent` WHERE `user_id` IN (' . $procardata . ')');
605
-                $resultsent = $getsenttbl->execute($allusrunique);
606
-            }
607
-
608
-        } else {
609
-
610
-            if ($crdnamespref == 1) {
611
-                $getsenttbl = $this->connection->prepare('
612
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
613
-		       FROM  `*PREFIX*sms_relent_sent`
614
-		       WHERE `user_id` = ?');
615
-                $resultsent = $getsenttbl->execute([$userId]);
616
-            } else {
617
-                $getsenttbl = $this->connection->prepare('
618
-		       SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`
619
-		       FROM  `*PREFIX*sms_relent_sent`
620
-		       WHERE `user_id` = ?');
621
-                $resultsent = $getsenttbl->execute([$userId]);
622
-            }
623
-        }
624
-
625
-        $sentdatatable = [];
626
-        while ($rowfetched = $resultsent->fetch()){
627
-               $sentdatatable[] = $rowfetched;
628
-        }
629
-        $resultsent->closeCursor();
630
-
631
-        $sentdatafromdb = $sentdatatable;
632
-
633
-
634
-        if ($this->groupManager->isAdmin($userId)) {
635
-
636
-            $sentdatafdb = ['datarows' => $sentdatafromdb, 'showdispnm' => $crdnamespref];
637
-            return $sentdatafdb;
638
-
639
-        } else {
640
-
641
-            // Get the restrictions from the 'sms_relent_restrict' table
642
-            $getrestr = $this->connection->prepare('
643
-		       SELECT `phone_number`, `groups`, `users`
644
-		       FROM  `*PREFIX*sms_relent_restrict`');
645
-            $getrestrres = $getrestr->execute();
646
-
647
-            $restrdata = [];
648
-            while ($restrfetched = $getrestrres->fetch()) {
649
-                   $restrdata[] = $restrfetched;
650
-            }
651
-            $getrestrres->closeCursor();
652
-
653
-            if ($restrdata) {
654
-
655
-                // Get the groups to which the current user belongs
656
-                $getusrgrp = $this->connection->prepare('
657
-		       SELECT `gid`, `uid`
658
-		       FROM  `*PREFIX*group_user`
659
-                       WHERE `uid` = ?');
660
-                $getusrgrpres = $getusrgrp->execute([$userId]);
661
-
662
-                $usergrps = [];
663
-                while ($fetchedgrps = $getusrgrpres->fetch()) {
664
-                       $usergrps[] = $fetchedgrps['gid'];
665
-                }
666
-                $getusrgrpres->closeCursor();
667
-
668
-		// Get the Display Name of the current user
669
-		$getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
670
-		$getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
671
-		$acdatausrdnadm = $getacdatadnres->fetch();
672
-		$cruserdname = $acdatausrdnadm['value'];
673
-		$getacdatadnres->closeCursor();
674
-
675
-                // Get the phone numbers that are not allowed for the current user
676
-                $restrPhoneNb = [];
677
-                foreach ($restrdata as $rskey => $rsvalue) {
678
-
679
-                       $restrgrparr = explode("|", $rsvalue['groups']);
680
-                       $chck = 0;
681
-                       foreach ($restrgrparr as $rkey => $rvalue) {
682
-                                if (str_contains(implode("|", $usergrps), $rvalue)) { $chck++; }
683
-                       }
684
-                       if (str_contains($rsvalue['users'], $cruserdname)) { $chck++; }
685
-
686
-                       if ($chck == 0) { $restrPhoneNb[] = $rsvalue['phone_number']; }
687
-                }
688
-
689
-                $restrPhoneNmbrs = array_unique($restrPhoneNb);
690
-
691
-                // Clean the phone numbers from tags
692
-                $restrPhfin = [];
693
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
694
-
695
-                    $restrpharr = explode(": ", $phvalue);
696
-                    $restrPhfin[] = $restrpharr[1];
697
-                }
698
-
699
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
700
-                foreach ($sentdatafromdb as $smdkey => $smdvalue) {
701
-
702
-                    if (str_contains($smdvalue['from'], "+")) {
703
-                        $fromnmbrarr = explode("+", $smdvalue['from']);
704
-                        if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
705
-                            unset($sentdatafromdb[$smdkey]);
706
-                        }
707
-                    } else {
708
-                        $frmnmbrarr = explode(": ", $smdvalue['from']);
709
-                        if (count($frmnmbrarr) == 2) {
710
-                            $nmbtbcmprd = $frmnmbrarr[1];
711
-                        } else { 
712
-                            $nmbtbcmprd = $frmnmbrarr[0];
713
-                        }
714
-
715
-                        if (in_array($nmbtbcmprd, $restrPhfin)) {
716
-                            unset($sentdatafromdb[$smdkey]);
717
-                        }
718
-                    }
719
-                }
720
-
721
-                $sentdatadbproc = array_values($sentdatafromdb);
722
-
723
-                $sentdatafdb = ['datarows' => $sentdatadbproc, 'showdispnm' => $crdnamespref];
724
-                return $sentdatafdb;
725
-            }
726
-        }
727
-     }
728
-
729
-
730
-     /**
731
-      * @NoAdminRequired
732
-      */
733
-     public function getsenttablefordel($userId) {
734
-
735
-        if ($this->groupManager->isAdmin($userId)) {
736
-
737
-            $getsenttbldel = $this->connection->prepare('
738
-		          SELECT `id`, `user_id`, `message_id`, `date`, `from`, `to`, `network`, `price`, `status`, `deliveryreceipt`, `message`, `author_displayname`
739
-		          FROM  `*PREFIX*sms_relent_sent`
740
-		          WHERE `user_id` = ?');
741
-            $resultsentdl = $getsenttbldel->execute([$userId]);
742
-
743
-            $sentdatatable = [];
744
-            while ($rowfetched = $resultsentdl->fetch()){
745
-                   $sentdatatable[] = $rowfetched;
746
-            }
747
-            $resultsentdl->closeCursor();
748
-
749
-            $sentdatafromdb = $sentdatatable;
750
-
751
-            return $sentdatafromdb;
752
-
753
-        } else { return "not permitted"; }
754
-     }
755
-
756
-
757
-     /**
758
-      * @NoAdminRequired
759
-      */
760
-     public function removesentrows($userId, $sentmessagedbIDs) {
761
-
762
-        foreach ($sentmessagedbIDs as $key => $sentrowtodel) {
763
-		 $query = $this->connection->prepare('
764
-		       DELETE FROM `*PREFIX*sms_relent_sent`
765
-		       WHERE `id` = ?');
766
-		 $deleteResult = $query->execute([$sentrowtodel]);
767
-		 $deleteResult->closeCursor();
768
-        }
769
-
770
-	$sqlupdate = $this->connection->prepare('
771
-                  SET @resetsent = 0;
772
-		  UPDATE `*PREFIX*sms_relent_sent`
773
-		  SET `id` = @resetsent := @resetsent + 1;
774
-                  ALTER TABLE `*PREFIX*sms_relent_sent` auto_increment=1;');
775
-	$updateRes = $sqlupdate->execute();
776
-	$updateRes->closeCursor();
777
-     }
778
-
779
-
780
-     /**
781
-      * @NoAdminRequired
782
-      */
783
-     public function getgroupedtable($userId) {
784
-
785
-
786
-        // Get the user's preferences from the settings
787
-        $getpref = $this->connection->prepare('
788
-		       SELECT `user_id`, `show_all_messages`
789
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
790
-        $getprefres = $getpref->execute([$userId]);
791
-        $getprefresdata = $getprefres->fetch();
792
-        $crsampref = $getprefresdata['show_all_messages'];
793
-        $getprefres->closeCursor();
794
-
795
-
796
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
797
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
798
-
799
-            // Get the users that belong to the 'admin' group
800
-            $getadmn = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
801
-            $getadmnres = $getadmn->execute(['admin']);
802
-
803
-            $usersadminsd = [];
804
-            while ($getadmnusrs = $getadmnres->fetch()) {
805
-                   $usersadminsd[] = $getadmnusrs['uid'];
806
-            }
807
-            $getadmnres->closeCursor();
808
-
809
-            // Get the groups and users that were allowed access to the API keys
810
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
811
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
812
-                                                   WHERE `user_id` = ?');
813
-            $getgrpsres = $getgrps->execute([$userId]);
814
-            $getgrpsusr = $getgrpsres->fetch();
815
-            $getgrpsres->closeCursor();
816
-
817
-            if ($getgrpsusr) {
818
-
819
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
820
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
821
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
822
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
823
-
824
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
825
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
826
-
827
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
828
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
829
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
830
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
831
-
832
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
833
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
834
-
835
-            } else {
836
-                $allwdusersunq = [];
837
-                $allwdgroupsunq = [];
838
-            }
839
-
840
-            // Get the username for each Display Name of the allowed users
841
-            $allwdusersfnl = [];
842
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
843
-
844
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
845
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
846
-		         $acdatausrname = $getacdatausrnmres->fetch();
847
-                         if ($acdatausrname) {
848
-                             $allwdusersfnl[] = $acdatausrname['uid'];
849
-                         }
850
-                         $getacdatausrnmres->closeCursor();
851
-            }
852
-
853
-            // Get the users from all the allowed groups
854
-            $allwdusersgrpmlt = [];
855
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
856
-
857
-                         // Get all the users that belong to the current group
858
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
859
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
860
-
861
-		         while ($getusrname = $getusringroupres->fetch()) {
862
-
863
-	                        // Ensure the current user is not an admin
864
-                                if (!in_array($getusrname['uid'], $usersadminsd)) {
865
-                                     $allwdusersgrpmlt[] = $getusrname['uid'];
866
-                                }
867
-                         }
868
-		         $getusringroupres->closeCursor();
869
-            }
870
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
871
-            
872
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
873
-            $allusruniquest = array_unique($allusr);
874
-
875
-            if ($allusruniquest) {
876
-                array_unshift($allusruniquest, $userId);
877
-                $allusruniquegr = $allusruniquest;
878
-            } else { $allusruniquegr = [$userId]; }
879
-
880
-            $procardatagr = implode(',', array_fill(0, count($allusruniquegr), '?'));
881
-        }
882
-
883
-
884
-        // Get received messages
885
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
886
-
887
-            $getrecmsgs = $this->connection->prepare('
888
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
889
-			FROM  `*PREFIX*sms_relent_received` WHERE `user_id` IN (' . $procardatagr . ')');
890
-	    $getrecmsgsres = $getrecmsgs->execute($allusruniquegr);
891
-
892
-        } else {
893
-
894
-            $getrecmsgs = $this->connection->prepare('
895
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
896
-			FROM  `*PREFIX*sms_relent_received`
897
-			WHERE `user_id` = ?');
898
-	    $getrecmsgsres = $getrecmsgs->execute([$userId]);
899
-        }
900
-
901
-        $recmsgs = [];
902
-        while ($rcrowsfetch = $getrecmsgsres->fetch()) {
903
-               $rcrowsfetch['deliveryreceipt'] = '';
904
-               $rcrowsfetch['table'] = 'received';
905
-               $recmsgs[] = $rcrowsfetch;
906
-        }
907
-	$getrecmsgsres->closeCursor();
908
-
909
-
910
-        // Get sent messages
911
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
912
-
913
-            $getsentmsgs = $this->connection->prepare('
914
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
915
-		       FROM  `*PREFIX*sms_relent_sent` WHERE `user_id` IN (' . $procardatagr . ')');
916
-            $getsentmsgsres = $getsentmsgs->execute($allusruniquegr);
917
-
918
-        } else {
919
-
920
-            $getsentmsgs = $this->connection->prepare('
921
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
922
-		       FROM  `*PREFIX*sms_relent_sent`
923
-		       WHERE `user_id` = ?');
924
-            $getsentmsgsres = $getsentmsgs->execute([$userId]);
925
-        }
926
-
927
-        $sentmsgs = [];
928
-        while ($rowfetchedsmsg = $getsentmsgsres->fetch()) {
929
-               $rowfetchedsmsg['table'] = 'sent';
930
-               $sentmsgs[] = $rowfetchedsmsg;
931
-        }
932
-        $getsentmsgsres->closeCursor();
933
-
934
-        $groupedfromdb = array_merge($recmsgs, $sentmsgs);
935
-
936
-        if ($this->groupManager->isAdmin($userId)) {
937
-
938
-            return $groupedfromdb;
939
-
940
-        } else {
941
-
942
-            // Get the restrictions from the 'sms_relent_restrict' table
943
-            $getrestr = $this->connection->prepare('
944
-		       SELECT `phone_number`, `groups`, `users`
945
-		       FROM  `*PREFIX*sms_relent_restrict`');
946
-            $getrestrres = $getrestr->execute();
947
-
948
-            $restrdata = [];
949
-            while ($restrfetched = $getrestrres->fetch()) {
950
-                   $restrdata[] = $restrfetched;
951
-            }
952
-            $getrestrres->closeCursor();
953
-
954
-            if ($restrdata) {
955
-
956
-                // Get the groups to which the current user belongs
957
-                $getusrgrp = $this->connection->prepare('
958
-		       SELECT `gid`, `uid`
959
-		       FROM  `*PREFIX*group_user`
960
-                       WHERE `uid` = ?');
961
-                $getusrgrpres = $getusrgrp->execute([$userId]);
962
-
963
-                $usergrps = [];
964
-                while ($fetchedgrps = $getusrgrpres->fetch()) {
965
-                       $usergrps[] = $fetchedgrps['gid'];
966
-                }
967
-                $getusrgrpres->closeCursor();
968
-
969
-		// Get the Display Name of the current user
970
-		$getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
971
-		$getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
972
-		$acdatausrdnadm = $getacdatadnres->fetch();
973
-		$cruserdname = $acdatausrdnadm['value'];
974
-		$getacdatadnres->closeCursor();
975
-
976
-                // Get the phone numbers that are not allowed for the current user
977
-                $restrPhoneNb = [];
978
-                foreach ($restrdata as $rskey => $rsvalue) {
979
-
980
-                       $restrgrparr = explode("|", $rsvalue['groups']);
981
-                       $chck = 0;
982
-                       foreach ($restrgrparr as $rkey => $rvalue) {
983
-                                if (str_contains(implode("|", $usergrps), $rvalue)) { $chck++; }
984
-                       }
985
-                       if (str_contains($rsvalue['users'], $cruserdname)) { $chck++; }
986
-
987
-                       if ($chck == 0) { $restrPhoneNb[] = $rsvalue['phone_number']; }
988
-                }
989
-
990
-                $restrPhoneNmbrs = array_unique($restrPhoneNb);
991
-
992
-                // Clean the phone numbers from tags
993
-                $restrPhfin = [];
994
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
995
-
996
-                    $restrpharr = explode(": ", $phvalue);
997
-                    $restrPhfin[] = $restrpharr[1];
998
-                }
999
-
1000
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
1001
-                foreach ($groupedfromdb as $gmdkey => $gmdvalue) {
1002
-
1003
-                    if ($gmdvalue['user_id'] == $userId) {
1004
-
1005
-                        if ($gmdvalue['table'] == 'sent') {
1006
-
1007
-                            if (str_contains($gmdvalue['from'], "+")) {
1008
-                                $fromnmbrarr = explode("+", $gmdvalue['from']);
1009
-                                if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1010
-                                    unset($groupedfromdb[$gmdkey]);
1011
-                                }
1012
-                            } else {
1013
-                                $frmnmbrarr = explode(": ", $gmdvalue['from']);
1014
-                                if (count($frmnmbrarr) == 2) {
1015
-                                    $nmbtbcmprd = $frmnmbrarr[1];
1016
-                                } else { 
1017
-                                    $nmbtbcmprd = $frmnmbrarr[0];
1018
-                                }
1019
-                                if (in_array($nmbtbcmprd, $restrPhfin)) {
1020
-                                    unset($groupedfromdb[$gmdkey]);
1021
-                                }
1022
-                            }
1023
-
1024
-                        } elseif ($gmdvalue['table'] == 'received') {
1025
-
1026
-                            if (str_contains($gmdvalue['to'], "+")) {
1027
-                                $fromnmbrarr = explode("+", $gmdvalue['to']);
1028
-                                if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1029
-                                    unset($groupedfromdb[$gmdkey]);
1030
-                                }
1031
-                            } else {
1032
-                                $tonmbrarr = explode(": ", $gmdvalue['to']);
1033
-                                if (count($tonmbrarr) == 2) {
1034
-                                    $tonmbrtbcmprd = $tonmbrarr[1];
1035
-                                } else {
1036
-                                    $tonmbrtbcmprd = $tonmbrarr[0];
1037
-                                }
1038
-                                if (in_array($tonmbrtbcmprd, $restrPhfin)) {
1039
-                                    unset($groupedfromdb[$gmdkey]);
1040
-                                }
1041
-                            }
1042
-                        }
1043
-
1044
-                    } else { unset($groupedfromdb[$gmdkey]); }
1045
-
1046
-                }
1047
-
1048
-                $groupedfdbproc = array_values($groupedfromdb);
1049
-
1050
-                return $groupedfdbproc;
1051
-            }
1052
-        }
1053
-     }
1054
-
1055
-
1056
-     /**
1057
-      * @NoAdminRequired
1058
-      */
1059
-     public function getgroupedpernumber($userId, $phoneNumber) {
1060
-
1061
-        $phoneNumberpr = "%" . $phoneNumber;
1062
-
1063
-        // Get the user's preferences from the settings
1064
-        $getpref = $this->connection->prepare('
1065
-		       SELECT `user_id`, `show_all_messages`
1066
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
1067
-        $getprefres = $getpref->execute([$userId]);
1068
-        $getprefresdata = $getprefres->fetch();
1069
-        $crsampref = $getprefresdata['show_all_messages'];
1070
-        $getprefres->closeCursor();
1071
-
1072
-
1073
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
1074
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1075
-
1076
-            // Get the users that belong to the 'admin' group
1077
-            $getadmn = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
1078
-            $getadmnres = $getadmn->execute(['admin']);
1079
-
1080
-            $usersadminsd = [];
1081
-            while ($getadmnusrs = $getadmnres->fetch()) {
1082
-                   $usersadminsd[] = $getadmnusrs['uid'];
1083
-            }
1084
-            $getadmnres->closeCursor();
1085
-
1086
-            // Get the groups and users that were allowed access to the API keys
1087
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
1088
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
1089
-                                                   WHERE `user_id` = ?');
1090
-            $getgrpsres = $getgrps->execute([$userId]);
1091
-            $getgrpsusr = $getgrpsres->fetch();
1092
-            $getgrpsres->closeCursor();
1093
-
1094
-            if ($getgrpsusr) {
1095
-
1096
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
1097
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
1098
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
1099
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
1100
-
1101
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
1102
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
1103
-
1104
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
1105
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
1106
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
1107
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
1108
-
1109
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
1110
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
1111
-
1112
-            } else {
1113
-                $allwdusersunq = [];
1114
-                $allwdgroupsunq = [];
1115
-            }
1116
-
1117
-            // Get the username for each Display Name of the allowed users
1118
-            $allwdusersfnl = [];
1119
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
1120
-
1121
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
1122
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
1123
-		         $acdatausrname = $getacdatausrnmres->fetch();
1124
-                         if ($acdatausrname) {
1125
-                             $allwdusersfnl[] = $acdatausrname['uid'];
1126
-                         }
1127
-                         $getacdatausrnmres->closeCursor();
1128
-            }
1129
-
1130
-            // Get the users from all the allowed groups
1131
-            $allwdusersgrpmlt = [];
1132
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
1133
-
1134
-                         // Get all the users that belong to the current group
1135
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
1136
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
1137
-
1138
-		         while ($getusrname = $getusringroupres->fetch()) {
1139
-
1140
-	                        // Ensure the current user is not an admin
1141
-                                if (!in_array($getusrname['uid'], $usersadminsd)) {
1142
-                                     $allwdusersgrpmlt[] = $getusrname['uid'];
1143
-                                }
1144
-                         }
1145
-		         $getusringroupres->closeCursor();
1146
-            }
1147
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
1148
-            
1149
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
1150
-            $allusruniquest = array_unique($allusr);
1151
-
1152
-            if ($allusruniquest) {
1153
-                array_unshift($allusruniquest, $userId);
1154
-                $allusruniquepn = $allusruniquest;
1155
-            } else { $allusruniquepn = [$userId]; }
1156
-
1157
-            $allusruniquepnst = $allusruniquepn;
1158
-
1159
-            $procardatapn = implode(',', array_fill(0, count($allusruniquepn), '?'));
1160
-
1161
-            array_unshift($allusruniquepn, $phoneNumber, $phoneNumberpr);
1162
-            $allusruniquead = $allusruniquepn;
1163
-
1164
-            array_unshift($allusruniquepnst, $phoneNumberpr, $phoneNumber);
1165
-            $allusruniqueadst = $allusruniquepnst;
1166
-        }
1167
-
1168
-
1169
-        // Get all the received messages for the current number
1170
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1171
-
1172
-            $getrecmsgs = $this->connection->prepare('
1173
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1174
-			FROM  `*PREFIX*sms_relent_received` WHERE (`from` = ? OR `to` LIKE ?) AND `user_id` IN (' . $procardatapn . ')');
1175
-	    $getrecmsgsres = $getrecmsgs->execute($allusruniquead);
1176
-
1177
-        } else {
1178
-
1179
-            $getrecmsgs = $this->connection->prepare('
1180
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1181
-			FROM  `*PREFIX*sms_relent_received`
1182
-			WHERE `user_id` = ? AND (`from` = ? OR `to` LIKE ?)');
1183
-	    $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNumber, $phoneNumberpr]);
1184
-        }
1185
-
1186
-        $recmsgs = [];
1187
-        while ($rcrowsfetch = $getrecmsgsres->fetch()) {
1188
-               $rcrowsfetch['deliveryreceipt'] = '';
1189
-               $rcrowsfetch['table'] = 'received';
1190
-               $recmsgs[] = $rcrowsfetch;
1191
-        }
1192
-	$getrecmsgsres->closeCursor();
1193
-
1194
-
1195
-        // Get all the sent messages
1196
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1197
-
1198
-            $getsentmsgs = $this->connection->prepare('
1199
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1200
-		       FROM  `*PREFIX*sms_relent_sent` WHERE (`from` LIKE ? OR `to` = ?) AND `user_id` IN (' . $procardatapn . ')');
1201
-            $getsentmsgsres = $getsentmsgs->execute($allusruniqueadst);
1202
-
1203
-        } else {
1204
-
1205
-            $getsentmsgs = $this->connection->prepare('
1206
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1207
-		       FROM  `*PREFIX*sms_relent_sent`
1208
-		       WHERE `user_id` = ? AND (`from` LIKE ? OR `to` = ?)');
1209
-            $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNumberpr, $phoneNumber]);
1210
-        }
1211
-
1212
-        $sentmsgs = [];
1213
-        while ($rowfetchedsmsg = $getsentmsgsres->fetch()) {
1214
-               $rowfetchedsmsg['table'] = 'sent';
1215
-               $sentmsgs[] = $rowfetchedsmsg;
1216
-        }
1217
-        $getsentmsgsres->closeCursor();
1218
-
1219
-        $groupedpernb = array_merge($recmsgs, $sentmsgs);
1220
-
1221
-        if ($this->groupManager->isAdmin($userId)) {
1222
-
1223
-            return $groupedpernb;
1224
-
1225
-        } else {
1226
-
1227
-            // Get the restrictions from the 'sms_relent_restrict' table
1228
-            $getrestr = $this->connection->prepare('
1229
-		       SELECT `phone_number`, `groups`, `users`
1230
-		       FROM  `*PREFIX*sms_relent_restrict`');
1231
-            $getrestrres = $getrestr->execute();
1232
-
1233
-            $restrdata = [];
1234
-            while ($restrfetched = $getrestrres->fetch()) {
1235
-                   $restrdata[] = $restrfetched;
1236
-            }
1237
-            $getrestrres->closeCursor();
1238
-
1239
-            if ($restrdata) {
1240
-
1241
-                // Get the groups to which the current user belongs
1242
-                $getusrgrp = $this->connection->prepare('
1243
-		       SELECT `gid`, `uid`
1244
-		       FROM  `*PREFIX*group_user`
1245
-                       WHERE `uid` = ?');
1246
-                $getusrgrpres = $getusrgrp->execute([$userId]);
1247
-
1248
-                $usergrps = [];
1249
-                while ($fetchedgrps = $getusrgrpres->fetch()) {
1250
-                       $usergrps[] = $fetchedgrps['gid'];
1251
-                }
1252
-                $getusrgrpres->closeCursor();
1253
-
1254
-		// Get the Display Name of the current user
1255
-		$getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
1256
-		$getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
1257
-		$acdatausrdnadm = $getacdatadnres->fetch();
1258
-		$cruserdname = $acdatausrdnadm['value'];
1259
-		$getacdatadnres->closeCursor();
1260
-
1261
-                // Get the phone numbers that are not allowed for the current user
1262
-                $restrPhoneNb = [];
1263
-                foreach ($restrdata as $rskey => $rsvalue) {
1264
-
1265
-                       $restrgrparr = explode("|", $rsvalue['groups']);
1266
-                       $chck = 0;
1267
-                       foreach ($restrgrparr as $rkey => $rvalue) {
1268
-                                if (str_contains(implode("|", $usergrps), $rvalue)) { $chck++; }
1269
-                       }
1270
-                       if (str_contains($rsvalue['users'], $cruserdname)) { $chck++; }
1271
-
1272
-                       if ($chck == 0) { $restrPhoneNb[] = $rsvalue['phone_number']; }
1273
-                }
1274
-
1275
-                $restrPhoneNmbrs = array_unique($restrPhoneNb);
1276
-
1277
-                // Clean the phone numbers from tags
1278
-                $restrPhfin = [];
1279
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
1280
-
1281
-                    $restrpharr = explode(": ", $phvalue);
1282
-                    $restrPhfin[] = $restrpharr[1];
1283
-                }
1284
-
1285
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
1286
-                foreach ($groupedpernb as $gmdkey => $gmdvalue) {
1287
-
1288
-                    if ($gmdvalue['user_id'] == $userId) {
1289
-
1290
-                        if ($gmdvalue['table'] == 'sent') {
1291
-
1292
-                            if (str_contains($gmdvalue['from'], "+")) {
1293
-                                $fromnmbrarr = explode("+", $gmdvalue['from']);
1294
-                                if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1295
-                                    unset($groupedpernb[$gmdkey]);
1296
-                                }
1297
-                            } else {
1298
-                                $frmnmbrarr = explode(": ", $gmdvalue['from']);
1299
-                                if (count($frmnmbrarr) == 2) {
1300
-                                    $nmbtbcmprd = $frmnmbrarr[1];
1301
-                                } else { 
1302
-                                    $nmbtbcmprd = $frmnmbrarr[0];
1303
-                                }
1304
-                                if (in_array($nmbtbcmprd, $restrPhfin)) {
1305
-                                    unset($groupedpernb[$gmdkey]);
1306
-                                }
1307
-                            }
1308
-
1309
-                        } elseif ($gmdvalue['table'] == 'received') {
1310
-
1311
-                            if (str_contains($gmdvalue['to'], "+")) {
1312
-                                $fromnmbrarr = explode("+", $gmdvalue['to']);
1313
-                                if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1314
-                                    unset($groupedpernb[$gmdkey]);
1315
-                                }
1316
-                            } else {
1317
-                                $tonmbrarr = explode(": ", $gmdvalue['to']);
1318
-                                if (count($tonmbrarr) == 2) {
1319
-                                    $tonmbrtbcmprd = $tonmbrarr[1];
1320
-                                } else {
1321
-                                    $tonmbrtbcmprd = $tonmbrarr[0];
1322
-                                }
1323
-                                if (in_array($tonmbrtbcmprd, $restrPhfin)) {
1324
-                                    unset($groupedpernb[$gmdkey]);
1325
-                                }
1326
-                            }
1327
-                        }
1328
-
1329
-                    } else { unset($groupedpernb[$gmdkey]); }
1330
-                }
1331
-
1332
-                $groupedpernb = array_values($groupedpernb);
1333
-
1334
-                return $groupedpernb;
1335
-            }
1336
-        }
1337
-     }
1338
-
1339
-
1340
-     /**
1341
-      * @NoAdminRequired
1342
-      */
1343
-     public function getgroupedforreply($userId, $phoneNmbrFrom, $phoneNmbrTo) {
1344
-
1345
-        $phoneNmbrFrompr = "%" . $phoneNmbrFrom;
1346
-        $phoneNmbrTopr = "%" . $phoneNmbrTo;
1347
-
1348
-        // Get the user's preferences from the settings
1349
-        $getpref = $this->connection->prepare('
1350
-		       SELECT `user_id`, `show_all_messages`
1351
-		       FROM  `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
1352
-        $getprefres = $getpref->execute([$userId]);
1353
-        $getprefresdata = $getprefres->fetch();
1354
-        $crsampref = $getprefresdata['show_all_messages'];
1355
-        $getprefres->closeCursor();
1356
-
1357
-
1358
-        // Collect the users with whom the current admin is sharing his API keys and whose messages he will be able to see
1359
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1360
-
1361
-            // Get the users that belong to the 'admin' group
1362
-            $getadmn = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
1363
-            $getadmnres = $getadmn->execute(['admin']);
1364
-
1365
-            $usersadminsd = [];
1366
-            while ($getadmnusrs = $getadmnres->fetch()) {
1367
-                   $usersadminsd[] = $getadmnusrs['uid'];
1368
-            }
1369
-            $getadmnres->closeCursor();
1370
-
1371
-            // Get the groups and users that were allowed access to the API keys
1372
-            $getgrps = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
1373
-                                                  `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
1374
-                                                   WHERE `user_id` = ?');
1375
-            $getgrpsres = $getgrps->execute([$userId]);
1376
-            $getgrpsusr = $getgrpsres->fetch();
1377
-            $getgrpsres->closeCursor();
1378
-
1379
-            if ($getgrpsusr) {
1380
-
1381
-                if ($getgrpsusr['tnx_users_allowed']) { $tnxusers = explode("|", $getgrpsusr['tnx_users_allowed']); } else { $tnxusers = []; }
1382
-                if ($getgrpsusr['plv_users_allowed']) { $plvusers = explode("|", $getgrpsusr['plv_users_allowed']); } else { $plvusers = []; }
1383
-                if ($getgrpsusr['twl_users_allowed']) { $twlusers = explode("|", $getgrpsusr['twl_users_allowed']); } else { $twlusers = []; }
1384
-                if ($getgrpsusr['flr_users_allowed']) { $flrusers = explode("|", $getgrpsusr['flr_users_allowed']); } else { $flrusers = []; }
1385
-
1386
-                $allwdusersarr = array_merge($tnxusers, $plvusers, $twlusers, $flrusers);
1387
-                $allwdusersunq = array_filter(array_unique($allwdusersarr));
1388
-
1389
-                if ($getgrpsusr['tnx_groups_allowed']) { $tnxgroups = explode("|", $getgrpsusr['tnx_groups_allowed']); } else { $tnxgroups = []; }
1390
-                if ($getgrpsusr['plv_groups_allowed']) { $plvgroups = explode("|", $getgrpsusr['plv_groups_allowed']); } else { $plvgroups = []; }
1391
-                if ($getgrpsusr['twl_groups_allowed']) { $twlgroups = explode("|", $getgrpsusr['twl_groups_allowed']); } else { $twlgroups = []; }
1392
-                if ($getgrpsusr['flr_groups_allowed']) { $flrgroups = explode("|", $getgrpsusr['flr_groups_allowed']); } else { $flrgroups = []; }
1393
-
1394
-                $allwdgroupsarr = array_merge($tnxgroups, $plvgroups, $twlgroups, $flrgroups);
1395
-                $allwdgroupsunq = array_filter(array_unique($allwdgroupsarr));
1396
-
1397
-            } else {
1398
-                $allwdusersunq = [];
1399
-                $allwdgroupsunq = [];
1400
-            }
1401
-
1402
-            // Get the username for each Display Name of the allowed users
1403
-            $allwdusersfnl = [];
1404
-            foreach ($allwdusersunq as $alwdusrkey => $alwdusrvalue) {
1405
-
1406
-                         $getacdatausrnm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
1407
-		         $getacdatausrnmres = $getacdatausrnm->execute(['displayname', $alwdusrvalue]);
1408
-		         $acdatausrname = $getacdatausrnmres->fetch();
1409
-                         if ($acdatausrname) {
1410
-                             $allwdusersfnl[] = $acdatausrname['uid'];
1411
-                         }
1412
-                         $getacdatausrnmres->closeCursor();
1413
-            }
1414
-
1415
-            // Get the users from all the allowed groups
1416
-            $allwdusersgrpmlt = [];
1417
-            foreach ($allwdgroupsunq as $prgrpkey => $prgrpvalue) {
1418
-
1419
-                         // Get all the users that belong to the current group
1420
-                         $getusringroup = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
1421
-		         $getusringroupres = $getusringroup->execute([$prgrpvalue]);
1422
-
1423
-		         while ($getusrname = $getusringroupres->fetch()) {
1424
-
1425
-	                        // Ensure the current user is not an admin
1426
-                                if (!in_array($getusrname['uid'], $usersadminsd)) {
1427
-                                     $allwdusersgrpmlt[] = $getusrname['uid'];
1428
-                                }
1429
-                         }
1430
-		         $getusringroupres->closeCursor();
1431
-            }
1432
-            $allwdusersgrpfnl = array_unique($allwdusersgrpmlt);
1433
-            
1434
-            $allusr = array_merge($allwdusersfnl, $allwdusersgrpfnl);
1435
-            $allusruniquest = array_unique($allusr);
1436
-
1437
-            if ($allusruniquest) {
1438
-                array_unshift($allusruniquest, $userId);
1439
-                $allusruniquerp = $allusruniquest;
1440
-            } else { $allusruniquerp = [$userId]; }
1441
-
1442
-            $allusruniquerpst = $allusruniquerp;
1443
-
1444
-            $procardatarp = implode(',', array_fill(0, count($allusruniquerp), '?'));
1445
-
1446
-            array_unshift($allusruniquerp, $phoneNmbrFrom, $phoneNmbrTopr, $phoneNmbrTo, $phoneNmbrFrompr);
1447
-            $allusruniqueadrp = $allusruniquerp;
1448
-
1449
-            array_unshift($allusruniquerpst, $phoneNmbrFrompr, $phoneNmbrTo, $phoneNmbrTopr, $phoneNmbrFrom);
1450
-            $allusruniqueadrpst = $allusruniquerpst;
1451
-        }
1452
-
1453
-
1454
-        // Get the received messages for the current numbers
1455
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1456
-
1457
-            $getrecmsgs = $this->connection->prepare('
1458
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1459
-			FROM  `*PREFIX*sms_relent_received` WHERE ((`from` = ? AND `to` LIKE ?) OR (`from` = ? AND `to` LIKE ?)) AND `user_id` IN (' . $procardatarp . ')');
1460
-	    $getrecmsgsres = $getrecmsgs->execute($allusruniqueadrp);
1461
-
1462
-        } else {
1463
-
1464
-            $getrecmsgs = $this->connection->prepare('
1465
-			SELECT `id`, `user_id`, `date`, `from`, `to`, `message`, `author_displayname`
1466
-			FROM  `*PREFIX*sms_relent_received`
1467
-			WHERE `user_id` = ? AND ((`from` = ? AND `to` LIKE ?) OR (`from` = ? AND `to` LIKE ?))');
1468
-	    $getrecmsgsres = $getrecmsgs->execute([$userId, $phoneNmbrFrom, $phoneNmbrTopr, $phoneNmbrTo, $phoneNmbrFrompr]);
1469
-        }
1470
-
1471
-        $recmsgs = [];
1472
-        while ($rcrowsfetch = $getrecmsgsres->fetch()) {
1473
-               $rcrowsfetch['deliveryreceipt'] = '';
1474
-               $rcrowsfetch['table'] = 'received';
1475
-               $recmsgs[] = $rcrowsfetch;
1476
-        }
1477
-	$getrecmsgsres->closeCursor();
1478
-
1479
-
1480
-        // Get the sent messages for the current numbers
1481
-        if ($crsampref == 1 && $this->groupManager->isAdmin($userId)) {
1482
-
1483
-            $getsentmsgs = $this->connection->prepare('
1484
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1485
-		       FROM  `*PREFIX*sms_relent_sent` WHERE ((`from` LIKE ? AND `to` = ?) OR (`from` LIKE ? AND `to` = ?)) AND `user_id` IN (' . $procardatarp . ')');
1486
-            $getsentmsgsres = $getsentmsgs->execute($allusruniqueadrpst);
1487
-
1488
-        } else {
1489
-
1490
-            $getsentmsgs = $this->connection->prepare('
1491
-		       SELECT `id`, `user_id`, `date`, `from`, `to`,`message`, `author_displayname`, `deliveryreceipt`
1492
-		       FROM  `*PREFIX*sms_relent_sent`
1493
-		       WHERE `user_id` = ? AND ((`from` LIKE ? AND `to` = ?) OR (`from` LIKE ? AND `to` = ?))');
1494
-            $getsentmsgsres = $getsentmsgs->execute([$userId, $phoneNmbrFrompr, $phoneNmbrTo, $phoneNmbrTopr, $phoneNmbrFrom]);
1495
-        }
1496
-
1497
-        $sentmsgs = [];
1498
-        while ($rowfetchedsmsg = $getsentmsgsres->fetch()) {
1499
-               $rowfetchedsmsg['table'] = 'sent';
1500
-               $sentmsgs[] = $rowfetchedsmsg;
1501
-        }
1502
-        $getsentmsgsres->closeCursor();
1503
-
1504
-        $groupedpernb = array_merge($recmsgs, $sentmsgs);
1505
-
1506
-        if ($this->groupManager->isAdmin($userId)) {
1507
-
1508
-            return $groupedpernb;
1509
-
1510
-        } else {
1511
-
1512
-            // Get the restrictions from the 'sms_relent_restrict' table
1513
-            $getrestr = $this->connection->prepare('
1514
-		       SELECT `phone_number`, `groups`, `users`
1515
-		       FROM  `*PREFIX*sms_relent_restrict`');
1516
-            $getrestrres = $getrestr->execute();
1517
-
1518
-            $restrdata = [];
1519
-            while ($restrfetched = $getrestrres->fetch()) {
1520
-                   $restrdata[] = $restrfetched;
1521
-            }
1522
-            $getrestrres->closeCursor();
1523
-
1524
-            if ($restrdata) {
1525
-
1526
-                // Get the groups to which the current user belongs
1527
-                $getusrgrp = $this->connection->prepare('
1528
-		       SELECT `gid`, `uid`
1529
-		       FROM  `*PREFIX*group_user`
1530
-                       WHERE `uid` = ?');
1531
-                $getusrgrpres = $getusrgrp->execute([$userId]);
1532
-
1533
-                $usergrps = [];
1534
-                while ($fetchedgrps = $getusrgrpres->fetch()) {
1535
-                       $usergrps[] = $fetchedgrps['gid'];
1536
-                }
1537
-                $getusrgrpres->closeCursor();
1538
-
1539
-		// Get the Display Name of the current user
1540
-		$getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
1541
-		$getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
1542
-		$acdatausrdnadm = $getacdatadnres->fetch();
1543
-		$cruserdname = $acdatausrdnadm['value'];
1544
-		$getacdatadnres->closeCursor();
1545
-
1546
-                // Get the phone numbers that are not allowed for the current user
1547
-                $restrPhoneNb = [];
1548
-                foreach ($restrdata as $rskey => $rsvalue) {
1549
-
1550
-                       $restrgrparr = explode("|", $rsvalue['groups']);
1551
-                       $chck = 0;
1552
-                       foreach ($restrgrparr as $rkey => $rvalue) {
1553
-                                if (str_contains(implode("|", $usergrps), $rvalue)) { $chck++; }
1554
-                       }
1555
-                       if (str_contains($rsvalue['users'], $cruserdname)) { $chck++; }
1556
-
1557
-                       if ($chck == 0) { $restrPhoneNb[] = $rsvalue['phone_number']; }
1558
-                }
1559
-
1560
-                $restrPhoneNmbrs = array_unique($restrPhoneNb);
1561
-
1562
-                // Clean the phone numbers from tags
1563
-                $restrPhfin = [];
1564
-                foreach ($restrPhoneNmbrs as $phkey => $phvalue) {
1565
-
1566
-                    $restrpharr = explode(": ", $phvalue);
1567
-                    $restrPhfin[] = $restrpharr[1];
1568
-                }
1569
-
1570
-                // Assemble the array of message rows that excludes the rows for the restricted phone numbers
1571
-                foreach ($groupedpernb as $gmdkey => $gmdvalue) {
1572
-
1573
-                    if ($gmdvalue['user_id'] == $userId) {
1574
-
1575
-                        if ($gmdvalue['table'] == 'sent') {
1576
-
1577
-                            if (str_contains($gmdvalue['from'], "+")) {
1578
-                                $fromnmbrarr = explode("+", $gmdvalue['from']);
1579
-                                if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1580
-                                    unset($groupedpernb[$gmdkey]);
1581
-                                }
1582
-                            } else {
1583
-                                $frmnmbrarr = explode(": ", $gmdvalue['from']);
1584
-                                if (count($frmnmbrarr) == 2) {
1585
-                                    $nmbtbcmprd = $frmnmbrarr[1];
1586
-                                } else { 
1587
-                                    $nmbtbcmprd = $frmnmbrarr[0];
1588
-                                }
1589
-                                if (in_array($nmbtbcmprd, $restrPhfin)) {
1590
-                                    unset($groupedpernb[$gmdkey]);
1591
-                                }
1592
-                            }
1593
-
1594
-                        } elseif ($gmdvalue['table'] == 'received') {
1595
-
1596
-                            if (str_contains($gmdvalue['to'], "+")) {
1597
-                                $fromnmbrarr = explode("+", $gmdvalue['to']);
1598
-                                if (in_array("+" . $fromnmbrarr[1], $restrPhfin)) {
1599
-                                    unset($groupedpernb[$gmdkey]);
1600
-                                }
1601
-                            } else {
1602
-                                $tonmbrarr = explode(": ", $gmdvalue['to']);
1603
-                                if (count($tonmbrarr) == 2) {
1604
-                                    $tonmbrtbcmprd = $tonmbrarr[1];
1605
-                                } else {
1606
-                                    $tonmbrtbcmprd = $tonmbrarr[0];
1607
-                                }
1608
-                                if (in_array($tonmbrtbcmprd, $restrPhfin)) {
1609
-                                    unset($groupedpernb[$gmdkey]);
1610
-                                }
1611
-                            }
1612
-                        }
1613
-
1614
-                    } else { unset($groupedpernb[$gmdkey]); }
1615
-                }
1616
-
1617
-                $groupedperconv = array_values($groupedpernb);
1618
-
1619
-                return $groupedperconv;
1620
-            }
1621
-        }
1622
-     }
1623
-
1624
-
1625
-
1626
-     /**
1627
-      * @NoAdminRequired
1628
-      */
1629
-     public function savedisplayname($userId, $authorDisplayname, $from) {
1630
-
1631
-        if ($this->groupManager->isAdmin($userId)) {
1632
-
1633
-	    $updatedispnm = $this->connection->prepare('
1634
-			UPDATE `*PREFIX*sms_relent_received`
1635
-			SET `author_displayname` = ?
1636
-                        WHERE `from` = ?');
1637
-	    $updatedispnmres = $updatedispnm->execute([$authorDisplayname, $from]);
1638
-
1639
-            if ($updatedispnmres) {
1640
-                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.";
1641
-            } else {
1642
-                return $respupdname = "Error while trying to save the new Display Name to the database.";
1643
-            }
1644
-	    $updatedispnmres->closeCursor();
1645
-
1646
-        } else { return $respupdname = "Only admins can save Display Names for phone numbers that are not associated with Nextcloud users."; }
1647
-     }
1648
-
1649
-     /**
1650
-      * @NoAdminRequired
1651
-      */
1652
-     public function getmessagesperpage($userId) {
1653
-
1654
-        $sqlmpp = $this->connection->prepare('
1655
-	       SELECT `user_id`, `messagesperpage` 
1656
-               FROM `*PREFIX*sms_relent_settings`
1657
-               WHERE `user_id` = ?');
1658
-	$result = $sqlmpp->execute([$userId]);
1659
-        $mesppdata = $result->fetch();
1660
-        $result->closeCursor();
1661
-        if ($mesppdata) {
1662
-            $mesperpagedb = $mesppdata['messagesperpage'];
1663
-            return $mesperpagedb;
1664
-        }
1665
-     }
1666
-
1667
-
1668
-     /**
1669
-      * @NoAdminRequired
1670
-      */
1671
-     public function getsettings($userId) {
1672
-
1673
-        $getsettings = $this->connection->prepare('
1674
-                    SELECT `id`, `user_id`, `telapi_url_rec`, `telapi_url`, `nexapi_url_rec`, `nexapi_url`, `twilapi_url_rec`, `twilapi_url`, `flowapi_url_rec`, `flowapi_url`, 
1675
-                           `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `show_display_names`                           
1676
-		    FROM  `*PREFIX*sms_relent_settings`
1677
-		    WHERE `user_id` = ?');
1678
-        $resultsettings = $getsettings->execute([$userId]);
1679
-
1680
-        $settingsfromdb = $resultsettings->fetch();
1681
-
1682
-        $resultsettings->closeCursor();
1683
-
1684
-        if ($settingsfromdb) {
1685
-
1686
-            if ($this->groupManager->isAdmin($userId)) { $adminreguser = 'admin'; } else { $adminreguser = 'reguser'; }
1687
-            $settingsfromdb['adminornot'] = $adminreguser;
1688
-
1689
-            return $settingsfromdb;
1690
-        }
1691
-
1692
-     }
1693
-
1694
-
1695
-     public function updatenumberrestrictions($userId, $savedByDsplname, $phoneNumber, $groups, $users) {
1696
-
1697
-        if ($this->groupManager->isAdmin($userId)) {
1698
-
1699
-            $groupsproc = implode("|", $groups);
1700
-            $usersproc = implode("|", $users);
1701
-
1702
-            // Get the restrictions for the current number from the 'sms_relent_restrict' table
1703
-            $getrestr = $this->connection->prepare('SELECT `user_id`, `saved_by_dsplname`, `phone_number`, `groups`, `users` FROM `*PREFIX*sms_relent_restrict` WHERE
1704
-                                                   `phone_number` = ?');
1705
-            $getrestrresult = $getrestr->execute([$phoneNumber]);
1706
-            $crntrestr = $getrestrresult->fetch();
1707
-            $getrestrresult->closeCursor();
1708
-
1709
-            if ($getrestrresult && !$crntrestr) {
1710
-
1711
-	        $insertphrestr = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_restrict` (`user_id`, `saved_by_dsplname`, `phone_number`, `groups`, `users`) VALUES
1712
-                                                             (?, ?, ?, ?, ?)');
1713
-	        if ($insertphrestr->execute([$userId, $savedByDsplname, $phoneNumber, $groupsproc, $usersproc])) { $messagetosend = 'success'; } else { $messagetosend = 'failure'; }  
1714
-         
1715
-            } elseif ($getrestrresult && $crntrestr) {
1716
-
1717
-	        $updatephrestr = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_restrict` SET `user_id` = ?, `saved_by_dsplname` = ?, `groups` = ?, `users` = ? WHERE 
1718
-                                                            `phone_number` = ?');
1719
-	        if ($admupdatephonerestr = $updatephrestr->execute([$userId, $savedByDsplname, $groupsproc, $usersproc, $phoneNumber])) { 
1720
-                    $messagetosend = 'success';
1721
-                } else { 
1722
-                    $messagetosend = 'failure'; 
1723
-                }
1724
-
1725
-	        $admupdatephonerestr->closeCursor();
1726
-            }
1727
-            return $messagetosend;
1728
-        }
1729
-     }
1730
-
1731
-
1732
-     private function updateusercredentials($userId, $usersarr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, $plivoapisecret, $plivosendernm, 
1733
-                                            $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret) {
1734
-
1735
-        $msgtosend = 'success';
1736
-
1737
-        foreach ($usersarr as $usrkey => $usrvalue) {
1738
-
1739
-            $getusrset = $this->connection->prepare('SELECT `user_id` FROM `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
1740
-	    $getusrsetres = $getusrset->execute([$usrvalue]);
1741
-	    $getcrunmdata = $getusrsetres->fetch();
1742
-	    $getusrsetres->closeCursor();
1743
-
1744
-            if ($getcrunmdata) {
1745
-
1746
-                if ($provider == "tnx") {
1747
-
1748
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `telapi_key` = ?, `tel_pub_key` = ?, `messaging_profile_id` = ?,
1749
-                                                           `tel_sender_name` = ? WHERE `user_id` = ?');
1750
-                    if ($upusrsetres = $upusrset->execute([$telapiKey, $telpubKey, $telmsgprofid, $telsendername, $usrvalue])) {
1751
-                        $msgtosend = 'success';
1752
-                    } else { $msgtosend = 'failure'; }
1753
-                    $upusrsetres->closeCursor();
1754
-
1755
-                } elseif ($provider == "plv") {
1756
-
1757
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `nexapi_key` = ?, `nexapi_secret` = ?, `nex_sender_name` = ?
1758
-                                                            WHERE `user_id` = ?');
1759
-                    if ($upusrsetres = $upusrset->execute([$plivoapikey, $plivoapisecret, $plivosendernm, $usrvalue])) {
1760
-                        $msgtosend = 'success';
1761
-                    } else { $msgtosend = 'failure'; }
1762
-                    $upusrsetres->closeCursor();
1763
-
1764
-                } elseif ($provider == "twl") {
1765
-
1766
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `twilapi_key` = ?, `twilapi_secret` = ?, `twil_sender_name` = ?
1767
-                                                            WHERE `user_id` = ?');
1768
-                    if ($upusrsetres = $upusrset->execute([$twilapikey, $twilapisecret, $twilsendernm, $usrvalue])) {
1769
-                        $msgtosend = 'success';
1770
-                    } else { $msgtosend = 'failure'; }
1771
-                    $upusrsetres->closeCursor();
1772
-
1773
-                } elseif ($provider == "flr") {
1774
-
1775
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `flowapi_key` = ?, `flowapi_secret` = ? WHERE `user_id` = ?');
1776
-                    if ($upusrsetres = $upusrset->execute([$flowapikey, $flowapisecret, $usrvalue])) {
1777
-                        $msgtosend = 'success';
1778
-                    } else { $msgtosend = 'failure'; }
1779
-                    $upusrsetres->closeCursor();
1780
-                }
1781
-
1782
-            } else {
1783
-
1784
-                $emptfld = "";
1785
-
1786
-                if ($provider == "tnx") {
1787
-
1788
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
1789
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
1790
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `tel_sender_name`) 
1791
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
1792
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, 
1793
-                                                           $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $telsendername])) {
1794
-                        $msgtosend = 'success';
1795
-                    } else { $msgtosend = 'failure'; }
1796
-                    $upusrsetres->closeCursor();
1797
-
1798
-                } elseif ($provider == "plv") {
1799
-
1800
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
1801
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
1802
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `nex_sender_name`)
1803
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
1804
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $plivoapikey, $plivoapisecret, $emptfld, $emptfld, 
1805
-                                                           $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $plivosendernm])) {
1806
-                        $msgtosend = 'success';
1807
-                    } else { $msgtosend = 'failure'; }
1808
-                    $upusrsetres->closeCursor();
1809
-
1810
-                } elseif ($provider == "twl") {
1811
-
1812
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
1813
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
1814
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `twil_sender_name`)
1815
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
1816
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $plivoapikey, $plivoapisecret, $emptfld, $emptfld, 
1817
-                                                           $twilapikey, $twilapisecret, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $emptfld, $twilsendernm])) {
1818
-                        $msgtosend = 'success';
1819
-                    } else { $msgtosend = 'failure'; }
1820
-                    $upusrsetres->closeCursor();
1821
-
1822
-                } elseif ($provider == "flr") {
1823
-
1824
-                    $upusrset = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`,
1825
-                                                           `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, `nexapi_url`, `twilapi_key`, `twilapi_secret`,
1826
-                                                           `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`)
1827
-                                                            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
1828
-                    if ($upusrsetres = $upusrset->execute([$usrvalue, $telapiKey, $telpubKey, $emptfld, $emptfld, $telmsgprofid, $plivoapikey, $plivoapisecret, $emptfld, $emptfld, 
1829
-                                                           $twilapikey, $twilapisecret, $emptfld, $emptfld, $flowapikey, $flowapisecret, $emptfld, $emptfld])) {
1830
-                        $msgtosend = 'success';
1831
-                    } else { $msgtosend = 'failure'; }
1832
-                    $upusrsetres->closeCursor();
1833
-                }
1834
-
1835
-            }                 
1836
-        }
1837
-
1838
-        return $msgtosend;
1839
-     }
1840
-
1841
-
1842
-     private function removeusercredentials($userId, $usersarr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, $plivoapisecret, $plivosendernm, 
1843
-                                            $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret) {
1844
-
1845
-        $msgtosend = 'success';
1846
-
1847
-        foreach ($usersarr as $usrkey => $usrvalue) {
1848
-
1849
-                $emptyfld = "";
1850
-
1851
-                if ($provider == "tnx") {
1852
-
1853
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `telapi_key` = ?, `tel_pub_key` = ?, `messaging_profile_id` = ?,
1854
-                                                           `tel_sender_name` = ? WHERE `user_id` = ?');
1855
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $emptyfld, $emptyfld, $usrvalue])) {
1856
-                        $msgtosend = 'success';
1857
-                    } else { $msgtosend = 'failure'; }
1858
-                    $upusrsetres->closeCursor();
1859
-
1860
-                } elseif ($provider == "plv") {
1861
-
1862
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `nexapi_key` = ?, `nexapi_secret` = ?, `nex_sender_name` = ?
1863
-                                                            WHERE `user_id` = ?');
1864
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $emptyfld, $usrvalue])) {
1865
-                        $msgtosend = 'success';
1866
-                    } else { $msgtosend = 'failure'; }
1867
-                    $upusrsetres->closeCursor();
1868
-
1869
-                } elseif ($provider == "twl") {
1870
-
1871
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `twilapi_key` = ?, `twilapi_secret` = ?, `twil_sender_name` = ?
1872
-                                                            WHERE `user_id` = ?');
1873
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $emptyfld, $usrvalue])) {
1874
-                        $msgtosend = 'success';
1875
-                    } else { $msgtosend = 'failure'; }
1876
-                    $upusrsetres->closeCursor();
1877
-
1878
-                } elseif ($provider == "flr") {
1879
-
1880
-                    $upusrset = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_settings` SET `flowapi_key` = ?, `flowapi_secret` = ? WHERE `user_id` = ?');
1881
-                    if ($upusrsetres = $upusrset->execute([$emptyfld, $emptyfld, $usrvalue])) {
1882
-                        $msgtosend = 'success';
1883
-                    } else { $msgtosend = 'failure'; }
1884
-                    $upusrsetres->closeCursor();
1885
-                }
1886
-        }
1887
-
1888
-        return $msgtosend;
1889
-     }
1890
-
1891
-
1892
-     public function updatekeysallowedusers($userId, $groups, $users, $provider) {
1893
-
1894
-       if ($this->groupManager->isAdmin($userId)) {
1895
-
1896
-          $msgtosend = 'success';
1897
-
1898
-          // Get the users that belong to the 'admin' group
1899
-          $getadmn = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
1900
-          $getadmnres = $getadmn->execute(['admin']);
1901
-
1902
-          $usersadmin = [];
1903
-          while ($getadmnusrs = $getadmnres->fetch()) {
1904
-                 $usersadmin[] = $getadmnusrs['uid'];
1905
-          }
1906
-          $getadmnres->closeCursor();
1907
-          
1908
-          // Get the API keys and alphanumeric sender IDs for the current admin, from the 'sms_relent_settings' table
1909
-          $getadmset = $this->connection->prepare('SELECT `user_id`, `telapi_key`, `tel_pub_key`, `messaging_profile_id`, `tel_sender_name`, `nexapi_key`, `nexapi_secret`,
1910
-                                                  `nex_sender_name`, `twilapi_key`, `twilapi_secret`, `twil_sender_name`, `flowapi_key`, `flowapi_secret` 
1911
-                                                   FROM `*PREFIX*sms_relent_settings` WHERE `user_id` = ?');
1912
-	  $getadmsetres = $getadmset->execute([$userId]);
1913
-	  $getcradmdata = $getadmsetres->fetch();
1914
-          $telapiKey = $getcradmdata['telapi_key'];
1915
-          $telpubKey = $getcradmdata['tel_pub_key'];
1916
-          $telmsgprofid = $getcradmdata['messaging_profile_id'];
1917
-          $telsendername = $getcradmdata['tel_sender_name'];
1918
-          $plivoapikey = $getcradmdata['nexapi_key'];
1919
-          $plivoapisecret = $getcradmdata['nexapi_secret'];
1920
-          $plivosendernm = $getcradmdata['nex_sender_name'];
1921
-          $twilapikey = $getcradmdata['twilapi_key'];
1922
-          $twilapisecret = $getcradmdata['twilapi_secret'];
1923
-          $twilsendernm = $getcradmdata['twil_sender_name'];
1924
-          $flowapikey = $getcradmdata['flowapi_key'];
1925
-          $flowapisecret = $getcradmdata['flowapi_secret'];
1926
-	  $getadmsetres->closeCursor();
1927
-
1928
-          if ($getcradmdata) {
1929
-
1930
-            if ($provider == "tnx") {
1931
-
1932
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed` FROM `*PREFIX*sms_relent_subac`');
1933
-                $getalwdres = $getalwd->execute();
1934
-
1935
-                $upchck = 0;
1936
-                $seldataarr = [];
1937
-                $groupsPerProvider = '';
1938
-                $usersPerProvider = '';
1939
-                while ($crntrestr = $getalwdres->fetch()) {
1940
-                       if ($crntrestr['user_id'] != $userId) {
1941
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['tnx_groups_allowed'], 'usersallowed' => $crntrestr['tnx_users_allowed']];
1942
-                       } else {
1943
-                           $upchck++;
1944
-                           $groupsPerProvider = $crntrestr['tnx_groups_allowed'];
1945
-                           $usersPerProvider = $crntrestr['tnx_users_allowed'];
1946
-                       }
1947
-                }
1948
-                $getalwdres->closeCursor();
1949
-
1950
-
1951
-            } elseif ($provider == "plv") {
1952
-
1953
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `plv_groups_allowed`, `plv_users_allowed` FROM `*PREFIX*sms_relent_subac`');
1954
-                $getalwdres = $getalwd->execute();
1955
-
1956
-                $upchck = 0;
1957
-                $seldataarr = [];
1958
-                $groupsPerProvider = '';
1959
-                $usersPerProvider = '';
1960
-                while ($crntrestr = $getalwdres->fetch()) {
1961
-                       if ($crntrestr['user_id'] != $userId) {
1962
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['plv_groups_allowed'], 'usersallowed' => $crntrestr['plv_users_allowed']];
1963
-                       } else {
1964
-                           $upchck++;
1965
-                           $groupsPerProvider = $crntrestr['plv_groups_allowed'];
1966
-                           $usersPerProvider = $crntrestr['plv_users_allowed'];
1967
-                       }
1968
-                }
1969
-                $getalwdres->closeCursor();
1970
-
1971
-            } elseif ($provider == "twl") {
1972
-
1973
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `twl_groups_allowed`, `twl_users_allowed` FROM `*PREFIX*sms_relent_subac`');
1974
-                $getalwdres = $getalwd->execute();
1975
-
1976
-                $upchck = 0;
1977
-                $seldataarr = [];
1978
-                $groupsPerProvider = '';
1979
-                $usersPerProvider = '';
1980
-                while ($crntrestr = $getalwdres->fetch()) {
1981
-                       if ($crntrestr['user_id'] != $userId) {
1982
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['twl_groups_allowed'], 'usersallowed' => $crntrestr['twl_users_allowed']];
1983
-                       } else {
1984
-                           $upchck++;
1985
-                           $groupsPerProvider = $crntrestr['twl_groups_allowed'];
1986
-                           $usersPerProvider = $crntrestr['twl_users_allowed'];
1987
-                       }
1988
-                }
1989
-                $getalwdres->closeCursor();
1990
-
1991
-            } elseif ($provider == "flr") {
1992
-
1993
-                $getalwd = $this->connection->prepare('SELECT `user_id`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`');
1994
-                $getalwdres = $getalwd->execute();
1995
-
1996
-                $upchck = 0;
1997
-                $seldataarr = [];
1998
-                $groupsPerProvider = '';
1999
-                $usersPerProvider = '';
2000
-                while ($crntrestr = $getalwdres->fetch()) {
2001
-                       if ($crntrestr['user_id'] != $userId) {
2002
-                           $seldataarr[] = ['userid' => $crntrestr['user_id'], 'groupsallowed' => $crntrestr['flr_groups_allowed'], 'usersallowed' => $crntrestr['flr_users_allowed']];
2003
-                       } else {
2004
-                           $upchck++;
2005
-                           $groupsPerProvider = $crntrestr['flr_groups_allowed'];
2006
-                           $usersPerProvider = $crntrestr['flr_users_allowed'];
2007
-                       }
2008
-                }
2009
-                $getalwdres->closeCursor();
2010
-
2011
-            }
2012
-
2013
-
2014
-            if ($seldataarr) {
2015
-
2016
-                // Check if any of the current users are among the already saved ones (for the same provider)
2017
-                $usrchck = 0;
2018
-                $usrmsgarr = [];
2019
-                foreach ($users as $ukey => $uvalue) {
2020
-                         if ($uvalue != '') {
2021
-                             for ($j = 0; $j < count($seldataarr); $j++) {
2022
-                                  if (str_contains($seldataarr[$j]['usersallowed'], $uvalue)) {
2023
-                                      $usrchck++;
2024
-                                      $usrmsgarr[] = "The admin " . $seldataarr[$j]['userid'] . " has already allowed the user " . $uvalue . " to access his API keys for this provider.";
2025
-                                  }
2026
-                             }
2027
-                         }
2028
-                }
2029
-
2030
-                // Check if any of the current groups are among the already saved ones (for the same provider)
2031
-                $grchck = 0;
2032
-                $grmsgarr = [];
2033
-                foreach ($groups as $gkey => $gvalue) {
2034
-                         if ($gvalue != '') {
2035
-                             for ($k = 0; $k < count($seldataarr); $k++) {
2036
-                                  if (str_contains($seldataarr[$k]['groupsallowed'], $gvalue)) {
2037
-                                      $grchck++;
2038
-                                      $grmsgarr[] = "The admin " . $seldataarr[$k]['userid'] . " has already allowed the group " . $gvalue . " to access his API keys for this provider.";
2039
-                                  }
2040
-                             }
2041
-                         }
2042
-                }
2043
-
2044
-                if ($usrchck == 0 && $grchck == 0) {
2045
-
2046
-
2047
-                    // Remove the previously saved API keys for each user in the specified groups, for the current provider
2048
-                    if ($groupsPerProvider != '') {
2049
-
2050
-                        $groupsPerProvarr = explode("|", $groupsPerProvider);
2051
-                        foreach ($groupsPerProvarr as $prgrkey => $prgrvalue) {
2052
-
2053
-                                 if ($prgrvalue != "admin" && $prgrvalue != '') {
2054
-
2055
-                                     // Get all the users that belong to the group
2056
-	                             $getusringrp = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2057
-			             $getusringrpres = $getusringrp->execute([$prgrvalue]);
2058
-
2059
-                                     $usersingroup = [];
2060
-			             while ($getusrnm = $getusringrpres->fetch()) {
2061
-                                            if ($getusrnm['uid'] != $userId) {
2062
-
2063
-		                                // Ensure the current user is not an admin
2064
-                                                if (!in_array($getusrnm['uid'], $usersadmin)) {
2065
-                                                     $usersingroup[] = $getusrnm['uid'];
2066
-                                                }
2067
-                                            }
2068
-                                     }
2069
-			             $getusringrpres->closeCursor();
2070
-
2071
-                                     if ($usersingroup) {
2072
-                                         $msgtosend = $this->removeusercredentials($userId, $usersingroup, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2073
-                                                                               $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2074
-                                     }
2075
-                                 }
2076
-
2077
-                        }
2078
-                    }
2079
-
2080
-
2081
-                    // Remove the previously saved API keys for each user, for the current provider
2082
-                    if ($usersPerProvider != '') {
2083
-
2084
-                        $usersPerProvarr = explode("|", $usersPerProvider);
2085
-                        if ($usersPerProvarr) {
2086
-
2087
-                            $ctusernamearrpr = [];
2088
-                            foreach ($usersPerProvarr as $usrKeypr => $usrValuepr) {
2089
-
2090
-		                 // Get the username for this Display Name
2091
-		                 $getacdataunmpr = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
2092
-		                 $getacdataunmprres = $getacdataunmpr->execute(['displayname', $usrValuepr]);
2093
-		                 $acdatausrnamepr = $getacdataunmprres->fetch();
2094
-                                 if ($acdatausrnamepr['uid'] != $userId) {
2095
-
2096
-		                     // Ensure the current user is not an admin
2097
-                                     if (!in_array($acdatausrnamepr['uid'], $usersadmin)) {
2098
-                                          $ctusernamearrpr[] = $acdatausrnamepr['uid'];
2099
-                                     }
2100
-
2101
-                                 }
2102
-		                 $getacdataunmprres->closeCursor();
2103
-                            }
2104
-
2105
-                            $msgtosend = $this->removeusercredentials($userId, $ctusernamearrpr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey,
2106
-                                                                      $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2107
-                        }
2108
-                    }
2109
-
2110
-
2111
-                    // Insert the provider's API keys for the allowed users
2112
-                    if ($users) {
2113
-
2114
-                        $ctusernamearruid = [];
2115
-                        $ctusernamearr = [];
2116
-                        foreach ($users as $usrKey => $usrValue) {
2117
-                             if ($usrValue != '') {
2118
-		                 // Get the username for this Display Name
2119
-		                 $getacdataunm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
2120
-		                 $getacdataunmres = $getacdataunm->execute(['displayname', $usrValue]);
2121
-		                 $acdatausrname = $getacdataunmres->fetch();
2122
-                                 if ($acdatausrname['uid'] != $userId) {
2123
-
2124
-		                     // Ensure the current user is not an admin
2125
-                                     if (!in_array($acdatausrname['uid'], $usersadmin)) {
2126
-                                         $ctusernamearruid[] = $acdatausrname['uid'];
2127
-                                         $ctusernamearr[] = $usrValue;
2128
-                                     }
2129
-
2130
-                                 }
2131
-		                 $getacdataunmres->closeCursor();
2132
-                             }
2133
-                        }
2134
-
2135
-
2136
-                        // Insert/update the allowed users in the 'sms_relent_subac' table
2137
-                        $usersalwdrs = implode("|", $ctusernamearr);
2138
-
2139
-                        if ($upchck == 0) {
2140
-
2141
-		            if ($provider == "tnx") {
2142
-
2143
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_users_allowed`) VALUES (?, ?)');
2144
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2145
-                                $upchck++;
2146
-
2147
-		            } elseif ($provider == "plv") {
2148
-
2149
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_users_allowed`) VALUES (?, ?)');
2150
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
2151
-                                $upchck++;
2152
-
2153
-		            } elseif ($provider == "twl") {
2154
-
2155
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_users_allowed`) VALUES (?, ?)');
2156
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
2157
-                                $upchck++;
2158
-
2159
-		            } elseif ($provider == "flr") {
2160
-
2161
-	                        $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_users_allowed`) VALUES (?, ?)');
2162
-	                        if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2163
-                                $upchck++;
2164
-		            }
2165
-
2166
-                        } else {
2167
-
2168
-		            if ($provider == "tnx") {
2169
-
2170
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_users_allowed` = ? WHERE `user_id` = ?');
2171
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2172
-
2173
-		            } elseif ($provider == "plv") {
2174
-
2175
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_users_allowed` = ? WHERE `user_id` = ?');
2176
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2177
-
2178
-		            } elseif ($provider == "twl") {
2179
-
2180
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_users_allowed` = ? WHERE `user_id` = ?');
2181
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2182
-
2183
-		            } elseif ($provider == "flr") {
2184
-
2185
-	                        $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_users_allowed` = ? WHERE `user_id` = ?');
2186
-	                        if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2187
-		            }
2188
-                        }
2189
-
2190
-                        $datalwdres->closeCursor();
2191
-
2192
-
2193
-                        // Insert/update the credentials in the 'sms_relent_settings' table, for each allowed user
2194
-                        $msgtosend = $this->updateusercredentials($userId, $ctusernamearruid, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2195
-                                                                  $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2196
-                    }
2197
-
2198
-                    // Insert the provider's API keys for the allowed groups
2199
-                    if ($groups) {
2200
-
2201
-                        $allwdgrps = [];
2202
-                        foreach ($groups as $groupkey => $groupvalue) {
2203
-
2204
-                                 if ($groupvalue != "admin" && $groupvalue != '') {
2205
-
2206
-                                     $allwdgrps[] = $groupvalue;
2207
-
2208
-                                     // Get all the users that belong to the group
2209
-			             $getacdusr = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2210
-			             $getacdusrres = $getacdusr->execute([$groupvalue]);
2211
-
2212
-                                     $usersingrp = [];
2213
-			             while ($getacdusrnm = $getacdusrres->fetch()) {
2214
-                                            if ($getacdusrnm['uid'] != $userId) {
2215
-
2216
-		                                // Ensure the current user is not an admin
2217
-                                                if (!in_array($getacdusrnm['uid'], $usersadmin)) {
2218
-                                                     $usersingrp[] = $getacdusrnm['uid'];
2219
-                                                }
2220
-                                            }
2221
-                                     }
2222
-			             $getacdusrres->closeCursor();
2223
-
2224
-                                     // Insert the provider's API keys for each user of the allowed groups
2225
-                                     if ($usersingrp) {
2226
-                                         $msgtosend = $this->updateusercredentials($userId, $usersingrp, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2227
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2228
-                                     }
2229
-                                 }
2230
-
2231
-
2232
-		                // Insert/update the allowed groups in the 'sms_relent_subac' table
2233
-		                $groupsalwdrs = implode("|", $allwdgrps);
2234
-
2235
-		                if ($upchck == 0) {
2236
-
2237
-				    if ($provider == "tnx") {
2238
-
2239
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_groups_allowed`) VALUES (?, ?)');
2240
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2241
-                                        $upchck++;
2242
-
2243
-				    } elseif ($provider == "plv") {
2244
-
2245
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_groups_allowed`) VALUES (?, ?)');
2246
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2247
-                                        $upchck++;
2248
-
2249
-				    } elseif ($provider == "twl") {
2250
-
2251
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_groups_allowed`) VALUES (?, ?)');
2252
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2253
-                                        $upchck++;
2254
-
2255
-				    } elseif ($provider == "flr") {
2256
-
2257
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_groups_allowed`) VALUES (?, ?)');
2258
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2259
-                                        $upchck++;
2260
-				    }
2261
-
2262
-		                } else {
2263
-
2264
-				    if ($provider == "tnx") {
2265
-
2266
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_groups_allowed` = ? WHERE `user_id` = ?');
2267
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2268
-
2269
-				    } elseif ($provider == "plv") {
2270
-
2271
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_groups_allowed` = ? WHERE `user_id` = ?');
2272
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2273
-
2274
-				    } elseif ($provider == "twl") {
2275
-
2276
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_groups_allowed` = ? WHERE `user_id` = ?');
2277
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2278
-
2279
-				    } elseif ($provider == "flr") {
2280
-
2281
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_groups_allowed` = ? WHERE `user_id` = ?');
2282
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2283
-				    }
2284
-		                }
2285
-
2286
-		                $datalwdres->closeCursor();
2287
-                        }
2288
-
2289
-                    }
2290
-
2291
-                } else {
2292
-
2293
-                        if ($grmsgarr) {
2294
-                            $grppart = implode(" ", $grmsgarr) . " A group cannot be allowed access to 2 different sets of API keys for the same SMS provider.";
2295
-                        } else { $grppart = ''; }
2296
-
2297
-                        if ($usrmsgarr) {
2298
-                            $usrpart = implode(" ", $usrmsgarr) . " A user cannot be allowed access to 2 different sets of API keys for the same SMS provider.";
2299
-                        } else { $usrpart = ''; }
2300
-
2301
-                    $msgtosend = $grppart . $usrpart;
2302
-                }
2303
-
2304
-
2305
-            } else {
2306
-
2307
-                if ($upchck == 0) {
2308
-
2309
-                    // Insert the provider's API keys for the allowed users
2310
-                    if ($users) {
2311
-
2312
-                        $ctusernamearruid = [];
2313
-                        $ctusernamearr = [];
2314
-                        foreach ($users as $usrKey => $usrValue) {
2315
-                             if ($usrValue != '') {
2316
-		                 // Get the username for this Display Name
2317
-		                 $getacdataunm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
2318
-		                 $getacdataunmres = $getacdataunm->execute(['displayname', $usrValue]);
2319
-		                 $acdatausrname = $getacdataunmres->fetch();
2320
-                                 if ($acdatausrname['uid'] != $userId) {
2321
-
2322
-		                     // Ensure the current user is not an admin
2323
-                                     if (!in_array($acdatausrname['uid'], $usersadmin)) {
2324
-                                         $ctusernamearruid[] = $acdatausrname['uid'];
2325
-                                         $ctusernamearr[] = $usrValue;
2326
-                                     }
2327
-
2328
-                                 }
2329
-		                 $getacdataunmres->closeCursor();
2330
-                             }
2331
-                        }
2332
-
2333
-
2334
-                        // Insert the allowed users into the 'sms_relent_subac' table
2335
-                        $usersalwdrs = implode("|", $ctusernamearr);
2336
-
2337
-		        if ($provider == "tnx") {
2338
-
2339
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_users_allowed`) VALUES (?, ?)');
2340
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
2341
-                            $upchck++;
2342
-
2343
-		        } elseif ($provider == "plv") {
2344
-
2345
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_users_allowed`) VALUES (?, ?)');
2346
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2347
-                            $upchck++;
2348
-
2349
-		        } elseif ($provider == "twl") {
2350
-
2351
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_users_allowed`) VALUES (?, ?)');
2352
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2353
-                            $upchck++;
2354
-
2355
-		        } elseif ($provider == "flr") {
2356
-
2357
-	                    $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_users_allowed`) VALUES (?, ?)');
2358
-	                    if ($datalwdres = $insertalwd->execute([$userId, $usersalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2359
-                            $upchck++;
2360
-		        }
2361
-
2362
-                        $datalwdres->closeCursor();
2363
-
2364
-
2365
-                        // Insert/update the credentials in the 'sms_relent_settings' table, for each allowed user
2366
-                        $msgtosend = $this->updateusercredentials($userId, $ctusernamearruid, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2367
-                                                                  $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2368
-                    }
2369
-
2370
-                    // Insert the provider's API keys for the allowed groups
2371
-                    if ($groups) {
2372
-
2373
-                        $allwdgrps = [];
2374
-                        foreach ($groups as $groupkey => $groupvalue) {
2375
-
2376
-                                 if ($groupvalue != "admin" && $groupvalue != '') {
2377
-
2378
-                                     $allwdgrps[] = $groupvalue;
2379
-
2380
-                                     // Get all the users that belong to the group
2381
-			             $getacdusr = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2382
-			             $getacdusrres = $getacdusr->execute([$groupvalue]);
2383
-
2384
-                                     $usersingrp = [];
2385
-			             while ($getacdusrnm = $getacdusrres->fetch()) {
2386
-                                            if ($getacdusrnm['uid'] != $userId) {
2387
-
2388
-		                                // Ensure the current user is not an admin
2389
-                                                if (!in_array($getacdusrnm['uid'], $usersadmin)) {
2390
-                                                     $usersingrp[] = $getacdusrnm['uid'];
2391
-                                                }
2392
-                                            }
2393
-                                     }
2394
-			             $getacdusrres->closeCursor();
2395
-
2396
-                                     // Insert the provider's API keys for each user of the allowed groups
2397
-                                     if ($usersingrp) {
2398
-                                         $msgtosend = $this->updateusercredentials($userId, $usersingrp, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2399
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2400
-                                     }
2401
-                                 }
2402
-
2403
-
2404
-		                // Insert the allowed groups into the 'sms_relent_subac' table
2405
-		                $groupsalwdrs = implode("|", $allwdgrps);
2406
-
2407
-                                if ($upchck == 0) {
2408
-
2409
-				    if ($provider == "tnx") {
2410
-
2411
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `tnx_groups_allowed`) VALUES (?, ?)');
2412
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
2413
-
2414
-				    } elseif ($provider == "plv") {
2415
-
2416
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `plv_groups_allowed`) VALUES (?, ?)');
2417
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
2418
-
2419
-				    } elseif ($provider == "twl") {
2420
-
2421
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `twl_groups_allowed`) VALUES (?, ?)');
2422
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
2423
-
2424
-				    } elseif ($provider == "flr") {
2425
-
2426
-			                $insertalwd = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_subac` (`user_id`, `flr_groups_allowed`) VALUES (?, ?)');
2427
-			                if ($datalwdres = $insertalwd->execute([$userId, $groupsalwdrs])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; } 
2428
-				    }
2429
-
2430
-                                } else {
2431
-
2432
-				    if ($provider == "tnx") {
2433
-
2434
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_groups_allowed` = ? WHERE `user_id` = ?');
2435
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2436
-
2437
-				    } elseif ($provider == "plv") {
2438
-
2439
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_groups_allowed` = ? WHERE `user_id` = ?');
2440
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2441
-
2442
-				    } elseif ($provider == "twl") {
2443
-
2444
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_groups_allowed` = ? WHERE `user_id` = ?');
2445
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2446
-
2447
-				    } elseif ($provider == "flr") {
2448
-
2449
-			                $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_groups_allowed` = ? WHERE `user_id` = ?');
2450
-			                if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2451
-				    }
2452
-
2453
-                                }
2454
-
2455
-		                $datalwdres->closeCursor();
2456
-                        }
2457
-
2458
-                    }
2459
-
2460
-                } else {
2461
-
2462
-                    // Remove the previously saved API keys for each user in the specified groups, for the current provider
2463
-                    if ($groupsPerProvider != '') {
2464
-
2465
-                        $groupsPerProvarr = explode("|", $groupsPerProvider);
2466
-                        foreach ($groupsPerProvarr as $prgrkey => $prgrvalue) {
2467
-
2468
-                                 if ($prgrvalue != "admin" && $prgrvalue != '') {
2469
-
2470
-                                     // Get all the users that belong to the group
2471
-	                             $getusringrp = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2472
-			             $getusringrpres = $getusringrp->execute([$prgrvalue]);
2473
-
2474
-                                     $usersingroup = [];
2475
-			             while ($getusrnm = $getusringrpres->fetch()) {
2476
-                                            if ($getusrnm['uid'] != $userId) {
2477
-
2478
-		                                // Ensure the current user is not an admin
2479
-                                                if (!in_array($getusrnm['uid'], $usersadmin)) {
2480
-                                                     $usersingroup[] = $getusrnm['uid'];
2481
-                                                }
2482
-                                            }
2483
-                                     }
2484
-			             $getusringrpres->closeCursor();
2485
-
2486
-                                     if ($usersingroup) {
2487
-                                         $msgtosend = $this->removeusercredentials($userId, $usersingroup, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2488
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2489
-                                     }
2490
-                                 }
2491
-
2492
-                        }
2493
-                    }
2494
-
2495
-
2496
-                    // Remove the previously saved API keys for each user, for the current provider
2497
-                    if ($usersPerProvider != '') {
2498
-
2499
-                        $usersPerProvarr = explode("|", $usersPerProvider);
2500
-                        if ($usersPerProvarr) {
2501
-
2502
-                            $ctusernamearrpr = [];
2503
-                            foreach ($usersPerProvarr as $usrKeypr => $usrValuepr) {
2504
-
2505
-		                 // Get the username for this Display Name
2506
-		                 $getacdataunmpr = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
2507
-		                 $getacdataunmprres = $getacdataunmpr->execute(['displayname', $usrValuepr]);
2508
-		                 $acdatausrnamepr = $getacdataunmprres->fetch();
2509
-                                 if ($acdatausrnamepr['uid'] != $userId) {
2510
-
2511
-		                     // Ensure the current user is not an admin
2512
-                                     if (!in_array($acdatausrnamepr['uid'], $usersadmin)) {
2513
-                                          $ctusernamearrpr[] = $acdatausrnamepr['uid'];
2514
-                                     }
2515
-
2516
-                                 }
2517
-		                 $getacdataunmprres->closeCursor();
2518
-                            }
2519
-
2520
-                            $msgtosend = $this->removeusercredentials($userId, $ctusernamearrpr, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey,
2521
-                                                                      $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2522
-                        }
2523
-                    }
2524
-
2525
-
2526
-
2527
-                    // Insert the provider's API keys for the allowed users
2528
-                    if ($users) {
2529
-
2530
-                        $ctusernamearruid = [];
2531
-                        $ctusernamearr = [];
2532
-                        foreach ($users as $usrKey => $usrValue) {
2533
-                             if ($usrValue != '') {
2534
-		                 // Get the username for this Display Name
2535
-		                 $getacdataunm = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ? AND `value` = ?');
2536
-		                 $getacdataunmres = $getacdataunm->execute(['displayname', $usrValue]);
2537
-		                 $acdatausrname = $getacdataunmres->fetch();
2538
-                                 if ($acdatausrname['uid'] != $userId) {
2539
-
2540
-		                     // Ensure the current user is not an admin
2541
-                                     if (!in_array($acdatausrname['uid'], $usersadmin)) {
2542
-                                         $ctusernamearruid[] = $acdatausrname['uid'];
2543
-                                         $ctusernamearr[] = $usrValue;
2544
-
2545
-                                     }
2546
-
2547
-                                 }
2548
-		                 $getacdataunmres->closeCursor();
2549
-                             }
2550
-                        }
2551
-
2552
-
2553
-                        // Update the allowed users in the 'sms_relent_subac' table
2554
-                        $usersalwdrs = implode("|", $ctusernamearr);
2555
-
2556
-		        if ($provider == "tnx") {
2557
-
2558
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_users_allowed` = ? WHERE `user_id` = ?');
2559
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2560
-
2561
-		        } elseif ($provider == "plv") {
2562
-
2563
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_users_allowed` = ? WHERE `user_id` = ?');
2564
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2565
-
2566
-		        } elseif ($provider == "twl") {
2567
-
2568
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_users_allowed` = ? WHERE `user_id` = ?');
2569
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2570
-
2571
-		        } elseif ($provider == "flr") {
2572
-
2573
-	                    $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_users_allowed` = ? WHERE `user_id` = ?');
2574
-	                    if ($datalwdres = $updatealwd->execute([$usersalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2575
-		        }
2576
-
2577
-                        $datalwdres->closeCursor();
2578
-
2579
-
2580
-                        // Insert/update the credentials in the 'sms_relent_settings' table, for each allowed user
2581
-                        $msgtosend = $this->updateusercredentials($userId, $ctusernamearruid, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2582
-                                                                  $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2583
-                    }
2584
-
2585
-                    // Insert the provider's API keys for the allowed groups
2586
-                    if ($groups) {
2587
-
2588
-                        $allwdgrps = [];
2589
-                        foreach ($groups as $groupkey => $groupvalue) {
2590
-
2591
-                                 if ($groupvalue != "admin" && $groupvalue != '') {
2592
-
2593
-                                     $allwdgrps[] = $groupvalue;
2594
-
2595
-                                     // Get all the users that belong to the group
2596
-			             $getacdusr = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2597
-			             $getacdusrres = $getacdusr->execute([$groupvalue]);
2598
-
2599
-                                     $usersingrp = [];
2600
-			             while ($getacdusrnm = $getacdusrres->fetch()) {
2601
-                                            if ($getacdusrnm['uid'] != $userId) {
2602
-
2603
-		                                // Ensure the current user is not an admin
2604
-                                                if (!in_array($getacdusrnm['uid'], $usersadmin)) {
2605
-                                                     $usersingrp[] = $getacdusrnm['uid'];
2606
-                                                }
2607
-                                            }
2608
-                                     }
2609
-			             $getacdusrres->closeCursor();
2610
-
2611
-                                     // Insert the provider's API keys for each user of the allowed groups
2612
-                                     if ($usersingrp) {
2613
-                                         $msgtosend = $this->updateusercredentials($userId, $usersingrp, $provider, $telapiKey, $telpubKey, $telmsgprofid, $telsendername, $plivoapikey, 
2614
-                                                             $plivoapisecret, $plivosendernm, $twilapikey, $twilapisecret, $twilsendernm, $flowapikey, $flowapisecret);
2615
-                                     }
2616
-                                 }
2617
-
2618
-
2619
-		                 // Update the allowed groups in the 'sms_relent_subac' table
2620
-		                 $groupsalwdrs = implode("|", $allwdgrps);
2621
-
2622
-				 if ($provider == "tnx") {
2623
-
2624
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `tnx_groups_allowed` = ? WHERE `user_id` = ?');
2625
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2626
-
2627
-				 } elseif ($provider == "plv") {
2628
-
2629
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `plv_groups_allowed` = ? WHERE `user_id` = ?');
2630
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2631
-
2632
-				 } elseif ($provider == "twl") {
2633
-
2634
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `twl_groups_allowed` = ? WHERE `user_id` = ?');
2635
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2636
-
2637
-				 } elseif ($provider == "flr") {
2638
-
2639
-			             $updatealwd = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_subac` SET `flr_groups_allowed` = ? WHERE `user_id` = ?');
2640
-			             if ($datalwdres = $updatealwd->execute([$groupsalwdrs, $userId])) { $msgtosend = 'success'; } else { $msgtosend = 'failure'; }
2641
-				 }
2642
-
2643
-		                 $datalwdres->closeCursor();
2644
-                        }
2645
-
2646
-                    }
2647
-
2648
-                }
2649
-
2650
-            }
2651
-
2652
-          } 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."; }
2653
-
2654
-          return $msgtosend;
2655
-       }
2656
-     }
2657
-
2658
-
2659
-     public function removenumberrestrictions($userId, $phoneNumber) {
2660
-
2661
-        if ($this->groupManager->isAdmin($userId)) {
2662
-
2663
-                // Remove the restrictions for the given phone number
2664
-		$delrstr = $this->connection->prepare('
2665
-		       DELETE FROM `*PREFIX*sms_relent_restrict`
2666
-		       WHERE `phone_number` = ?');
2667
-                if ($delrstrres = $delrstr->execute([$phoneNumber])) { $delresult = "success"; } else { $delresult = "failure"; }
2668
-		$delrstrres->closeCursor();
2669
-
2670
-	        $updateind = $this->connection->prepare('
2671
-                       SET @resetrec = 0;
2672
-		       UPDATE `*PREFIX*sms_relent_restrict`
2673
-		       SET `id` = @resetrec := @resetrec + 1;
2674
-                       ALTER TABLE `*PREFIX*sms_relent_restrict` auto_increment=1;');
2675
-	        $updateindres = $updateind->execute();
2676
-	        $updateindres->closeCursor();
2677
-
2678
-                return $delresult;
2679
-        }
2680
-     }
2681
-
2682
-
2683
-    /**
2684
-     * @NoAdminRequired
2685
-     */
2686
-    public function updateautoreplies($userId, $savedByDsplname, $phoneNumber, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText) {
2687
-
2688
-        // Get the auto-reply for the current number from the 'sms_relent_autorply' table
2689
-        $getarpl = $this->connection->prepare('SELECT `user_id`, `saved_by_dsplname`, `phone_number`, `days_of_week`, `daily_start`, `daily_end`, `vacation_start`,
2690
-                                              `vacation_end`, `message_text` FROM `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
2691
-        $getarplresult = $getarpl->execute([$phoneNumber]);
2692
-        $crntarpl = $getarplresult->fetch();
2693
-        $getarplresult->closeCursor();
2694
-
2695
-        if ($getarplresult && !$crntarpl) {
2696
-
2697
-	    $insertpharpl = $this->connection->prepare('INSERT INTO `*PREFIX*sms_relent_autorply` (`user_id`, `saved_by_dsplname`, `phone_number`, `days_of_week`, 
2698
-                                                       `daily_start`, `daily_end`, `vacation_start`, `vacation_end`, `message_text`) VALUES
2699
-                                                        (?, ?, ?, ?, ?, ?, ?, ?, ?)');
2700
-	    if ($insertpharpl->execute([$userId, $savedByDsplname, $phoneNumber, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText])) { 
2701
-                $messagetosend = 'success'; 
2702
-            } else { 
2703
-                $messagetosend = 'failure'; 
2704
-            }
2705
-         
2706
-        } elseif ($getarplresult && $crntarpl) {
2707
-
2708
-            if ($this->groupManager->isAdmin($userId)) {
2709
-
2710
-                $updatepharpl = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_autorply` SET `user_id` = ?, `saved_by_dsplname` = ?, `days_of_week` = ?, `daily_start` = ?,
2711
-                                                           `daily_end` = ?, `vacation_start` = ?, `vacation_end` = ?, `message_text` = ?  WHERE `phone_number` = ?');
2712
-	        if ($updatephnmbrarpl = $updatepharpl->execute([$userId, $savedByDsplname, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText,
2713
-                                                                $phoneNumber])) { 
2714
-                    $messagetosend = 'success';
2715
-                } else { 
2716
-                    $messagetosend = 'failure'; 
2717
-                }
2718
-	        $updatephnmbrarpl->closeCursor();
2719
-
2720
-            } else {
2721
-
2722
-                // Check if the current user is the author of the existing version of the auto-reply
2723
-                if ($userId == $crntarpl['user_id']) {
2724
-
2725
-                    $updatepharpl = $this->connection->prepare('UPDATE `*PREFIX*sms_relent_autorply` SET `user_id` = ?, `saved_by_dsplname` = ?, `days_of_week` = ?, `daily_start` = ?,
2726
-                                                               `daily_end` = ?, `vacation_start` = ?, `vacation_end` = ?, `message_text` = ?  WHERE `phone_number` = ?');
2727
-	            if ($updatephnmbrarpl = $updatepharpl->execute([$userId, $savedByDsplname, $daysOfWeek, $dailyStart, $dailyEnd, $vacationStart, $vacationEnd, $messageText,
2728
-                                                                    $phoneNumber])) { 
2729
-                        $messagetosend = 'success';
2730
-                    } else { 
2731
-                        $messagetosend = 'failure'; 
2732
-                    }
2733
-	            $updatephnmbrarpl->closeCursor();
2734
-
2735
-                } else { $messagetosend = 'not allowed'; }
2736
-            }
2737
-        }
2738
-
2739
-        return $messagetosend;
2740
-    }
2741
-
2742
-
2743
-    /**
2744
-     * @NoAdminRequired
2745
-     */
2746
-    public function removeautoreplies($userId, $phoneNumber) {
2747
-
2748
-        if ($this->groupManager->isAdmin($userId)) {
2749
-
2750
-                // Remove the auto-reply for the given phone number
2751
-		$delarpl = $this->connection->prepare('
2752
-		       DELETE FROM `*PREFIX*sms_relent_autorply`
2753
-		       WHERE `phone_number` = ?');
2754
-                if ($delarplres = $delarpl->execute([$phoneNumber])) { $delarplresult = "success"; } else { $delarplresult = "failure"; }
2755
-		$delarplres->closeCursor();
2756
-
2757
-	        $updateindarpl = $this->connection->prepare('
2758
-                       SET @resetarpl = 0;
2759
-		       UPDATE `*PREFIX*sms_relent_autorply`
2760
-		       SET `id` = @resetarpl := @resetarpl + 1;
2761
-                       ALTER TABLE `*PREFIX*sms_relent_autorply` auto_increment=1;');
2762
-	        $updateindarplres = $updateindarpl->execute();
2763
-	        $updateindarplres->closeCursor();
2764
-
2765
-                return $delarplresult;
2766
-
2767
-        } else {
2768
-                // Get the author of the auto-reply for the given phone number
2769
-		$getarplusr = $this->connection->prepare('SELECT `user_id`, `phone_number` FROM `*PREFIX*sms_relent_autorply` WHERE `phone_number` = ?');
2770
-		$getarplusrres = $getarplusr->execute([$phoneNumber]);
2771
-		$crntarpldata = $getarplusrres->fetch();
2772
-                $crntarpluser = $crntarpldata['user_id'];
2773
-		$getarplusrres->closeCursor();
2774
-
2775
-                // If the author of the auto-reply is the current user, allow the removal
2776
-                if ($crntarpluser == $userId) {
2777
-
2778
-                    // Remove the auto-reply for the given phone number
2779
-		    $delarpl = $this->connection->prepare('
2780
-		           DELETE FROM `*PREFIX*sms_relent_autorply`
2781
-		           WHERE `phone_number` = ?');
2782
-                    if ($delarplres = $delarpl->execute([$phoneNumber])) { $delarplresult = "success"; } else { $delarplresult = "failure"; }
2783
-		    $delarplres->closeCursor();
2784
-
2785
-	            $updateindarpl = $this->connection->prepare('
2786
-                           SET @resetarpl = 0;
2787
-		           UPDATE `*PREFIX*sms_relent_autorply`
2788
-		           SET `id` = @resetarpl := @resetarpl + 1;
2789
-                           ALTER TABLE `*PREFIX*sms_relent_autorply` auto_increment=1;');
2790
-	            $updateindarplres = $updateindarpl->execute();
2791
-	            $updateindarplres->closeCursor();
2792
-
2793
-                    return $delarplresult;
2794
-
2795
-                } else { 
2796
-                    return $delarplresult = 'not allowed';
2797
-                }
2798
-        }
2799
-    }
2800
-
2801
-
2802
-    public function getadminsettings($userId) {
2803
-
2804
-        if ($this->groupManager->isAdmin($userId)) {
2805
-
2806
-
2807
-	    $getsettings = $this->connection->prepare('
2808
-                            SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
2809
-                                   `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
2810
-                                   `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
2811
-                                   `show_all_messages`
2812
-			    FROM  `*PREFIX*sms_relent_settings`
2813
-			    WHERE `user_id` = ?');
2814
-
2815
-	    $resultsettings = $getsettings->execute([$userId]);
2816
-
2817
-            $settingsadm = $resultsettings->fetch();
2818
-
2819
-	    $resultsettings->closeCursor();
2820
-
2821
-	    if ($settingsadm) {
2822
-
2823
-		    if ($settingsadm['telapi_key'] != '') {
2824
-
2825
-		        // Send a placeholder to the browser, instead of the real API key
2826
-		        $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";
2827
-		    }
2828
-		    if ($settingsadm['tel_pub_key'] != '') {
2829
-		        $settingsadm['tel_pub_key'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
2830
-		    }
2831
-		    if ($settingsadm['messaging_profile_id'] != '') {
2832
-		        $settingsadm['messaging_profile_id'] = "%20%20%20%20%20%20%20%20%20%20%20%20";
2833
-		    }
2834
-		    if ($settingsadm['nexapi_key'] != '') {
2835
-		        $settingsadm['nexapi_key'] = "%20%20%20%20%20%20%20%20%20";
2836
-		    }
2837
-		    if ($settingsadm['nexapi_secret'] != '') {
2838
-		        $settingsadm['nexapi_secret'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
2839
-		    }
2840
-		    if ($settingsadm['twilapi_key'] != '') {
2841
-		        $settingsadm['twilapi_key'] = "%20%20%20%20%20%20%20%20%20";
2842
-		    }
2843
-		    if ($settingsadm['twilapi_secret'] != '') {
2844
-		        $settingsadm['twilapi_secret'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
2845
-		    }
2846
-		    if ($settingsadm['flowapi_key'] != '') {
2847
-		        $settingsadm['flowapi_key'] = "%20%20%20%20%20%20%20%20%20";
2848
-		    }
2849
-		    if ($settingsadm['flowapi_secret'] != '') {
2850
-		        $settingsadm['flowapi_secret'] = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20";
2851
-		    }
2852
-
2853
-
2854
-		    // Get the Display Name of the current admin
2855
-		    $getacdatadn = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `uid` = ? AND `name` = ?');
2856
-		    $getacdatadnres = $getacdatadn->execute([$userId, 'displayname']);
2857
-		    $acdatausrdnadm = $getacdatadnres->fetch();
2858
-		    $cruserdname = $acdatausrdnadm['value'];
2859
-		    $getacdatadnres->closeCursor();
2860
-
2861
-		    // Get all the restrictions on phone numbers
2862
-		    $getrestr = $this->connection->prepare('SELECT `saved_by_dsplname`, `phone_number`, `groups`, `users` FROM `*PREFIX*sms_relent_restrict`');
2863
-		    $getrestres = $getrestr->execute();
2864
-
2865
-		    $restrictedArr = [];
2866
-		    while ($restrfetched = $getrestres->fetch()) {
2867
-		           $restrictedArr[] = $restrfetched;
2868
-		    }
2869
-		    $getrestres->closeCursor();
2870
-
2871
-		    if ($restrictedArr) { $restrictedUsers = $restrictedArr; } else { $restrictedUsers = ''; }
2872
-
2873
-
2874
-		    // Get the name of all the groups
2875
-		    $getgroups = $this->connection->prepare('SELECT `gid`, `displayname` FROM `*PREFIX*groups`');
2876
-		    $getgroupsres = $getgroups->execute();
2877
-
2878
-		    $groupsArr = [];
2879
-                    $allgroupswadmarr = [];
2880
-		    while ($groupsfetched = $getgroupsres->fetch()) {
2881
-
2882
-		           $groupsArr[] = $groupsfetched['gid'];
2883
-                           if ($groupsfetched['gid'] != 'admin') { $allgroupswadmarr[] = $groupsfetched['gid']; }
2884
-		    }
2885
-		    $getgroupsres->closeCursor();
2886
-
2887
-		    if ($groupsArr) { $allgroups = $groupsArr; } else { $allgroups = ''; }
2888
-                    if ($allgroupswadmarr) { $allgroupswadm = $allgroupswadmarr; } else { $allgroupswadm = ''; }
2889
-
2890
-		    // Get the users that belong to the 'admin' group
2891
-		    $getadmnsc = $this->connection->prepare('SELECT `gid`, `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?');
2892
-		    $getadmnscres = $getadmnsc->execute(['admin']);
2893
-
2894
-		    $usersadminsc = [];
2895
-		    while ($getadmnusrsc = $getadmnscres->fetch()) {
2896
-		           $usersadminsc[] = $getadmnusrsc['uid'];
2897
-		    }
2898
-		    $getadmnscres->closeCursor();
2899
-
2900
-
2901
-		    // Get the display name of all the users
2902
-		    $getusers = $this->connection->prepare('SELECT `uid`, `name`, `value` FROM `*PREFIX*accounts_data` WHERE `name` = ?');
2903
-		    $getusersres = $getusers->execute(['displayname']);
2904
-
2905
-		    $usersArr = [];
2906
-                    $alluserswadmarr = [];
2907
-		    while ($usersfetched = $getusersres->fetch()) {
2908
-
2909
-		           $usersArr[] = $usersfetched['value'];
2910
-                           if (!in_array($usersfetched['uid'], $usersadminsc)) { $alluserswadmarr[] = $usersfetched['value']; }
2911
-		    }
2912
-		    $getusersres->closeCursor();
2913
-
2914
-		    if ($usersArr) { $allusers = $usersArr; } else { $allusers = ''; }
2915
-                    if ($alluserswadmarr) { $alluserswadm = $alluserswadmarr; } else { $alluserswadm = ''; }
2916
-
2917
-                    // Get the groups and users that are allowed to use the API Keys, for each provider
2918
-                    $getalwdall = $this->connection->prepare('SELECT `user_id`, `tnx_groups_allowed`, `tnx_users_allowed`, `plv_groups_allowed`, `plv_users_allowed`,
2919
-                                                             `twl_groups_allowed`, `twl_users_allowed`, `flr_groups_allowed`, `flr_users_allowed` FROM `*PREFIX*sms_relent_subac`
2920
-                                                              WHERE `user_id` = ?');
2921
-                    $getalwdallres = $getalwdall->execute([$userId]);
2922
-                    $crtdtrow = $getalwdallres->fetch();
2923
-                    if ($crtdtrow) {
2924
-                        $allowedgrps = ['tnx_groups_allowed' => $crtdtrow['tnx_groups_allowed'], 'tnx_users_allowed' => $crtdtrow['tnx_users_allowed'], 
2925
-                                        'plv_groups_allowed' => $crtdtrow['plv_groups_allowed'], 'plv_users_allowed' => $crtdtrow['plv_users_allowed'],
2926
-                                        'twl_groups_allowed' => $crtdtrow['twl_groups_allowed'], 'twl_users_allowed' => $crtdtrow['twl_users_allowed'],
2927
-                                        'flr_groups_allowed' => $crtdtrow['flr_groups_allowed'], 'flr_users_allowed' => $crtdtrow['flr_users_allowed']];
2928
-                        $getalwdallres->closeCursor();
2929
-                    } else { $allowedgrps = []; }
2930
-
2931
-
2932
-                    $settingsadm['admdisplayname'] = $cruserdname;
2933
-                    $settingsadm['restrictions'] = $restrictedUsers;
2934
-                    $settingsadm['allgroups'] = $allgroups;
2935
-                    $settingsadm['allusers'] = $allusers;
2936
-                    $settingsadm['allgroupswadm'] = $allgroupswadm;
2937
-                    $settingsadm['alluserswadm'] = $alluserswadm;  
2938
-                    $settingsadm['allowedkeysuse'] = $allowedgrps;
2939
-
2940
-		    return $settingsadm;
2941
-	    }
2942
-        }
2943
-     }
2944
-
2945
-
2946
-     /**
2947
-      * @NoAdminRequired
2948
-      *
2949
-      */
2950
-     public function updatesettings($userId, $telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, 
2951
-                                    $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames) {
2952
-        $upsettings = $this->connection->prepare('
2953
-                        SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
2954
-                           `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
2955
-                           `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
2956
-                           `show_all_messages`, `show_display_names`
2957
-		        FROM  `*PREFIX*sms_relent_settings`
2958
-		        WHERE `user_id` = ?');
2959
-
2960
-        $resultstng = $upsettings->execute([$userId]);
2961
-
2962
-        $rowup = $resultstng->fetch();
2963
-
2964
-        $resultstng->closeCursor();
2965
-
2966
-        if ($resultstng && !$rowup) {
2967
-
2968
-	    $sql = $this->connection->prepare('
2969
-				INSERT INTO `*PREFIX*sms_relent_settings`
2970
-					(`user_id`, `telapi_url_rec`, `telapi_url`, `nexapi_url_rec`, `nexapi_url`, `twilapi_url_rec`, `twilapi_url`, `flowapi_url_rec`, `flowapi_url`, 
2971
-                                         `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `show_display_names`)
2972
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2973
-			');
2974
-	    $sql->execute([$userId, $telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, $getNotify, 
2975
-                           $notificationEmail, $getsmsinemail, $showDisplayNames]);
2976
-
2977
-        } elseif ($resultstng && $rowup) {
2978
-
2979
-	    $sqlupdatedb = $this->connection->prepare('
2980
-			UPDATE `*PREFIX*sms_relent_settings`
2981
-			SET `telapi_url_rec` = ?, `telapi_url` = ?, `nexapi_url_rec` = ?, `nexapi_url` = ?, `twilapi_url_rec` = ?, `twilapi_url` = ?, `flowapi_url_rec` = ?, 
2982
-                            `flowapi_url` = ?, `messagesperpage` = ?, `get_notify` = ?, `notification_email` = ?, `getsmsinemail` = ?, `show_display_names` = ?
2983
-	                WHERE `user_id` = ?');
2984
-	    $updateRes = $sqlupdatedb->execute([$telapiUrlRec, $telapiUrl, $nexapiUrlRec, $nexapiUrl, $twilapiUrlRec, $twilapiUrl, $flowapiUrlRec, $flowapiUrl, $messagesperpage, 
2985
-                                                $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $userId]);
2986
-	    $updateRes->closeCursor();
2987
-
2988
-	}
2989
-     }
2990
-
2991
-
2992
-     public function updateadminsettings($userId, $telapiKey, $telPubKey, $telapiUrlRec, $telapiUrl, $messagingProfileId, $nexapiKey, $nexapiSecret, $nexapiUrlRec, $nexapiUrl,
2993
-                                         $telSenderName, $nexSenderName, $twilapiKey, $twilapiSecret,
2994
-                                         $twilapiUrlRec, $twilapiUrl, $twilSenderName, $flowapiKey, $flowapiSecret, $flowapiUrlRec, $flowapiUrl, $showAllMessages) {
2995
-
2996
-        if ($this->groupManager->isAdmin($userId)) {
2997
-
2998
-            $upsettings = $this->connection->prepare('
2999
-                        SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
3000
-                           `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
3001
-                           `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
3002
-                           `show_all_messages`, `show_display_names`
3003
-		        FROM  `*PREFIX*sms_relent_settings`
3004
-		        WHERE `user_id` = ?');
3005
-
3006
-            $resultstng = $upsettings->execute([$userId]);
3007
-
3008
-            $rowup = $resultstng->fetch();
3009
-
3010
-            $resultstng->closeCursor();
3011
-
3012
-            if ($resultstng && !$rowup) {
3013
-
3014
-	        if ($telapiKey != '') {
3015
-	            $telapikeystrenc = $this->crypto->encrypt($telapiKey);             
3016
-	        } else { $telapikeystrenc = ''; }
3017
-
3018
-	        if ($telPubKey != '') {
3019
-	            $telpubkeystrenc =  $this->crypto->encrypt($telPubKey);             
3020
-	        } else { $telpubkeystrenc = ''; }
3021
-
3022
-	        if ($messagingProfileId != '') {
3023
-	            $messagingprofenc = $this->crypto->encrypt($messagingProfileId);             
3024
-	        } else { $messagingprofenc = ''; }
3025
-
3026
-	        if ($nexapiKey != '') {
3027
-	            $nexapikeystrenc = $this->crypto->encrypt($nexapiKey);             
3028
-	        } else { $nexapikeystrenc = ''; }
3029
-
3030
-	        if ($nexapiSecret != '') {
3031
-	            $nexapisecretstrenc = $this->crypto->encrypt($nexapiSecret);             
3032
-	        } else { $nexapisecretstrenc = ''; }
3033
-
3034
-	        if ($twilapiKey != '') {
3035
-	            $twilapikeystrenc = $this->crypto->encrypt($twilapiKey);             
3036
-	        } else { $twilapikeystrenc = ''; }
3037
-
3038
-	        if ($twilapiSecret != '') {
3039
-	            $twilapisecretstrenc = $this->crypto->encrypt($twilapiSecret);             
3040
-	        } else { $twilapisecretstrenc = ''; }
3041
-
3042
-	        if ($flowapiKey != '') {
3043
-	            $flowapikeystrenc = $this->crypto->encrypt($flowapiKey);             
3044
-	        } else { $flowapikeystrenc = ''; }
3045
-
3046
-	        if ($flowapiSecret != '') {
3047
-	            $flowapisecretstrenc = $this->crypto->encrypt($flowapiSecret);             
3048
-	        } else { $flowapisecretstrenc = ''; }
3049
-
3050
-
3051
-	        $sql = $this->connection->prepare('
3052
-				INSERT INTO `*PREFIX*sms_relent_settings`
3053
-					(`user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`, 
3054
-	                                 `nexapi_url`, `tel_sender_name`, `nex_sender_name`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `twil_sender_name`, 
3055
-                                         `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, `show_all_messages`)
3056
-				VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
3057
-			');
3058
-	        $sql->execute([$userId, $telapikeystrenc, $telpubkeystrenc, $telapiUrlRec, $telapiUrl, $messagingprofenc, $nexapikeystrenc, $nexapisecretstrenc, $nexapiUrlRec, 
3059
-                               $nexapiUrl, $telSenderName, $nexSenderName, $twilapikeystrenc, $twilapisecretstrenc, $twilapiUrlRec, $twilapiUrl, $twilSenderName, $flowapikeystrenc, 
3060
-                               $flowapisecretstrenc, $flowapiUrlRec, $flowapiUrl, $showAllMessages]);
3061
-
3062
-            } elseif ($resultstng && $rowup) {
3063
-
3064
-	        // Check if the value of the field is the placeholder or an empty string
3065
-	        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") {
3066
-	            $telapikeystrenc = $this->crypto->encrypt($telapiKey);                
3067
-	        } 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") {
3068
-	            $telapikeystrenc = $rowup['telapi_key'];
3069
-	        } elseif ($telapiKey == '') {
3070
-	            $telapikeystrenc = '';
3071
-	        }
3072
-
3073
-	        if ($telPubKey != '' && $telPubKey != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3074
-	            $telpubkeystrenc = $this->crypto->encrypt($telPubKey);                
3075
-	        } elseif ($telPubKey == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3076
-	            $telpubkeystrenc = $rowup['tel_pub_key'];
3077
-	        } elseif ($telPubKey == '') {
3078
-	            $telpubkeystrenc = '';
3079
-	        }
3080
-
3081
-	        if ($messagingProfileId != '' && $messagingProfileId != "%20%20%20%20%20%20%20%20%20%20%20%20") {
3082
-	            $messagingprofenc = $this->crypto->encrypt($messagingProfileId);                
3083
-	        } elseif ($messagingProfileId == "%20%20%20%20%20%20%20%20%20%20%20%20") {
3084
-	            $messagingprofenc = $rowup['messaging_profile_id'];
3085
-	        } elseif ($messagingProfileId == '') {
3086
-	            $messagingprofenc = '';
3087
-	        }
3088
-
3089
-	        if ($nexapiKey != '' && $nexapiKey != "%20%20%20%20%20%20%20%20%20") {
3090
-	            $nexapikeystrenc = $this->crypto->encrypt($nexapiKey);                
3091
-	        } elseif ($nexapiKey == "%20%20%20%20%20%20%20%20%20") {
3092
-	            $nexapikeystrenc = $rowup['nexapi_key'];
3093
-	        } elseif ($nexapiKey == '') {
3094
-	            $nexapikeystrenc = '';
3095
-	        }
3096
-
3097
-	        if ($twilapiKey != '' && $twilapiKey != "%20%20%20%20%20%20%20%20%20") {
3098
-	            $twilapikeystrenc = $this->crypto->encrypt($twilapiKey);                
3099
-	        } elseif ($twilapiKey == "%20%20%20%20%20%20%20%20%20") {
3100
-	            $twilapikeystrenc = $rowup['twilapi_key'];
3101
-	        } elseif ($twilapiKey == '') {
3102
-	            $twilapikeystrenc = '';
3103
-	        }
3104
-
3105
-	        if ($flowapiKey != '' && $flowapiKey != "%20%20%20%20%20%20%20%20%20") {
3106
-	            $flowapikeystrenc = $this->crypto->encrypt($flowapiKey);                
3107
-	        } elseif ($flowapiKey == "%20%20%20%20%20%20%20%20%20") {
3108
-	            $flowapikeystrenc = $rowup['flowapi_key'];
3109
-	        } elseif ($flowapiKey == '') {
3110
-	            $flowapikeystrenc = '';
3111
-	        }
3112
-
3113
-	        if ($nexapiSecret != '' && $nexapiSecret != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3114
-	            $nexapisecretstrenc = $this->crypto->encrypt($nexapiSecret);                
3115
-	        } elseif ($nexapiSecret == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3116
-	            $nexapisecretstrenc = $rowup['nexapi_secret'];
3117
-	        } elseif ($nexapiSecret == '') {
3118
-	            $nexapisecretstrenc = '';
3119
-	        }
3120
-
3121
-	        if ($twilapiSecret != '' && $twilapiSecret != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3122
-	            $twilapisecretstrenc = $this->crypto->encrypt($twilapiSecret);                
3123
-	        } elseif ($twilapiSecret == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3124
-	            $twilapisecretstrenc = $rowup['twilapi_secret'];
3125
-	        } elseif ($twilapiSecret == '') {
3126
-	            $twilapisecretstrenc = '';
3127
-	        }
3128
-
3129
-	        if ($flowapiSecret != '' && $flowapiSecret != "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3130
-	            $flowapisecretstrenc = $this->crypto->encrypt($flowapiSecret);                
3131
-	        } elseif ($flowapiSecret == "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20") {
3132
-	            $flowapisecretstrenc = $rowup['flowapi_secret'];
3133
-	        } elseif ($flowapiSecret == '') {
3134
-	            $flowapisecretstrenc = '';
3135
-	        }
3136
-
3137
-	        $sqlupdatedb = $this->connection->prepare('
3138
-			UPDATE `*PREFIX*sms_relent_settings`
3139
-			SET `telapi_key` = ?, `tel_pub_key` = ?, `telapi_url_rec` = ?, `telapi_url` = ?, `messaging_profile_id` = ?, `nexapi_key` = ?, `nexapi_secret` = ?,
3140
-	                    `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` = ?, 
3141
-	                    `flowapi_secret` = ?, `flowapi_url_rec` = ?, `flowapi_url` = ?, `show_all_messages` = ?
3142
-	                WHERE `user_id` = ?');
3143
-	        $updateRes = $sqlupdatedb->execute([$telapikeystrenc, $telpubkeystrenc, $telapiUrlRec, $telapiUrl, $messagingprofenc, $nexapikeystrenc, $nexapisecretstrenc, 
3144
-                                                    $nexapiUrlRec, $nexapiUrl, $telSenderName, $nexSenderName, $twilapikeystrenc, $twilapisecretstrenc, $twilapiUrlRec, $twilapiUrl, 
3145
-                                                    $twilSenderName, $flowapikeystrenc, $flowapisecretstrenc, $flowapiUrlRec, $flowapiUrl, $showAllMessages, $userId]);
3146
-	        $updateRes->closeCursor();
3147
-
3148
-	    }
3149
-        }
3150
-     }
3151
-
3152
-
3153
-     public function updatepersadmnsettings($userId, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames) {
3154
-
3155
-        if ($this->groupManager->isAdmin($userId)) {
3156
-
3157
-            $upsettings = $this->connection->prepare('
3158
-                        SELECT `id`, `user_id`, `telapi_key`, `tel_pub_key`, `telapi_url_rec`, `telapi_url`, `messaging_profile_id`, `nexapi_key`, `nexapi_secret`, `nexapi_url_rec`,
3159
-                           `nexapi_url`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, `twilapi_url`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url`, 
3160
-                           `tel_sender_name`, `nex_sender_name`, `twil_sender_name`, `flow_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, 
3161
-                           `show_all_messages`, `show_display_names`
3162
-		        FROM  `*PREFIX*sms_relent_settings`
3163
-		        WHERE `user_id` = ?');
3164
-
3165
-            $resultstng = $upsettings->execute([$userId]);
3166
-
3167
-            $rowup = $resultstng->fetch();
3168
-
3169
-            $resultstng->closeCursor();
3170
-
3171
-            if ($resultstng && !$rowup) {
3172
-
3173
-	        $sql = $this->connection->prepare('
3174
-				INSERT INTO `*PREFIX*sms_relent_settings` (`user_id`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `show_display_names`)
3175
-				VALUES (?, ?, ?, ?, ?, ?)');
3176
-	        $sql->execute([$userId, $messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames]);
3177
-
3178
-            } elseif ($resultstng && $rowup) {
3179
-
3180
-	        $sqlupdatedb = $this->connection->prepare('
3181
-			UPDATE `*PREFIX*sms_relent_settings`
3182
-			SET `messagesperpage` = ?, `get_notify` = ?, `notification_email` = ?, `getsmsinemail` = ?, `show_display_names` = ?
3183
-	                WHERE `user_id` = ?');
3184
-	        $updateRes = $sqlupdatedb->execute([$messagesperpage, $getNotify, $notificationEmail, $getsmsinemail, $showDisplayNames, $userId]);
3185
-	        $updateRes->closeCursor();
3186
-            }
3187
-        }
3188
-     }
3189
-
3190
-
3191
-     /**
3192
-      * @NoAdminRequired
3193
-      */
3194
-     public function getapicredentials($userId) {
3195
-
3196
-        $sqlcr = $this->connection->prepare('
3197
-              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`,
3198
-                     `tel_sender_name`, `nex_sender_name`, `messagesperpage`, `get_notify`, `notification_email`, `getsmsinemail`, `twilapi_key`, `twilapi_secret`, `twilapi_url_rec`, 
3199
-                     `twilapi_url`, `twil_sender_name`, `flowapi_key`, `flowapi_secret`, `flowapi_url_rec`, `flowapi_url` FROM `*PREFIX*sms_relent_settings`
3200
-	      WHERE `user_id` = ?');
3201
-	$resultcr = $sqlcr->execute([$userId]);
3202
-        $settingsfrdb = $resultcr->fetch();
3203
-        $resultcr->closeCursor();
3204
-
3205
-        if (($settingsfrdb['telapi_key'] != '') && ($settingsfrdb['telapi_key'] != 'undefined') && ($settingsfrdb['telapi_key'] != null)) { 
3206
-             $telapikeystrdec = $this->crypto->decrypt($settingsfrdb['telapi_key']); 
3207
-        } else { $telapikeystrdec = ''; }
3208
-
3209
-        if (($settingsfrdb['tel_pub_key'] != '') && ($settingsfrdb['tel_pub_key'] != 'undefined') && ($settingsfrdb['tel_pub_key'] != null)) {
3210
-             $telpubkeystrdec = $this->crypto->decrypt($settingsfrdb['tel_pub_key']); 
3211
-        } else { $telpubkeystrdec = ''; }
3212
-
3213
-        $telapiurlrec = $settingsfrdb['telapi_url_rec'];
3214
-        $telapiurlstr = $settingsfrdb['telapi_url'];
3215
-
3216
-        if (($settingsfrdb['messaging_profile_id'] != '') && ($settingsfrdb['messaging_profile_id'] != 'undefined') && ($settingsfrdb['messaging_profile_id'] != null)) {
3217
-             $messagingprofid = $this->crypto->decrypt($settingsfrdb['messaging_profile_id']); 
3218
-        } else { $messagingprofid = ''; }
3219
-
3220
-        if (($settingsfrdb['nexapi_key'] != '') && ($settingsfrdb['nexapi_key'] != 'undefined') && ($settingsfrdb['nexapi_key'] != null)) { 
3221
-             $nexapikeystr = $this->crypto->decrypt($settingsfrdb['nexapi_key']); 
3222
-        } else { $nexapikeystr = ''; }
3223
-
3224
-        if (($settingsfrdb['nexapi_secret'] != '') && ($settingsfrdb['nexapi_secret'] != 'undefined') && ($settingsfrdb['nexapi_secret'] != null)) { 
3225
-             $nexapisecretstr = $this->crypto->decrypt($settingsfrdb['nexapi_secret']); 
3226
-        } else { $nexapisecretstr = ''; }
3227
-
3228
-        if (($settingsfrdb['twilapi_key'] != '') && ($settingsfrdb['twilapi_key'] != 'undefined') && ($settingsfrdb['twilapi_key'] != null)) { 
3229
-             $twilapikeystr = $this->crypto->decrypt($settingsfrdb['twilapi_key']); 
3230
-        } else { $twilapikeystr = ''; }
3231
-
3232
-        if (($settingsfrdb['twilapi_secret'] != '') && ($settingsfrdb['twilapi_secret'] != 'undefined') && ($settingsfrdb['twilapi_secret'] != null)) { 
3233
-             $twilapisecretstr = $this->crypto->decrypt($settingsfrdb['twilapi_secret']); 
3234
-        } else { $twilapisecretstr = ''; }
3235
-
3236
-        if (($settingsfrdb['flowapi_key'] != '') && ($settingsfrdb['flowapi_key'] != 'undefined') && ($settingsfrdb['flowapi_key'] != null)) { 
3237
-             $flowapikeystr = $this->crypto->decrypt($settingsfrdb['flowapi_key']); 
3238
-        } else { $flowapikeystr = ''; }
3239
-
3240
-        if (($settingsfrdb['flowapi_secret'] != '') && ($settingsfrdb['flowapi_secret'] != 'undefined') && ($settingsfrdb['flowapi_secret'] != null)) { 
3241
-             $flowapisecretstr = $this->crypto->decrypt($settingsfrdb['flowapi_secret']); 
3242
-        } else { $flowapisecretstr = ''; }
3243
-
3244
-        $nexapiurlrecsms = $settingsfrdb['nexapi_url_rec'];
3245
-        $nexapiurldelrcpt = $settingsfrdb['nexapi_url'];
3246
-        $twilapiurlrecsms = $settingsfrdb['twilapi_url_rec'];
3247
-        $twilapiurldelrcpt = $settingsfrdb['twilapi_url'];
3248
-        $flowapiurlrecsms = $settingsfrdb['flowapi_url_rec'];
3249
-        $flowapiurldelrcpt = $settingsfrdb['flowapi_url'];
3250
-        $gettelsendername = $settingsfrdb['tel_sender_name'];
3251
-        $getnexsendername = $settingsfrdb['nex_sender_name'];
3252
-        $gettwilsendername = $settingsfrdb['twil_sender_name'];
3253
-        $getmessagesperpage = $settingsfrdb['messagesperpage'];
3254
-        $getnotification = $settingsfrdb['get_notify'];
3255
-        $notifyemail = $settingsfrdb['notification_email'];
3256
-        $includesmsinemail = $settingsfrdb['getsmsinemail'];
3257
-
3258
-        return [$telapikeystrdec, $telpubkeystrdec, $telapiurlrec, $telapiurlstr, $messagingprofid, $nexapikeystr, $nexapisecretstr, $nexapiurlrecsms, $nexapiurldelrcpt,
3259
-                $gettelsendername, $getnexsendername, $getmessagesperpage, $getnotification, $notifyemail, $includesmsinemail, $twilapikeystr, $twilapisecretstr, $twilapiurlrecsms, 
3260
-                $twilapiurldelrcpt, $gettwilsendername,  $flowapikeystr, $flowapisecretstr, $flowapiurlrecsms, $flowapiurldelrcpt];
3261
-     }
3262
-
3263
-     /**
3264
-      * @NoAdminRequired
3265
-      */
3266
-     public function getuserbytelrecwhurl($recsmswebhookurl) {
3267
-
3268
-        $sqlrec = $this->connection->prepare('SELECT `user_id`, `telapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `telapi_url_rec` = ?');
3269
-	$result = $sqlrec->execute([$recsmswebhookurl]);
3270
-        $datafromdb = $result->fetch();
3271
-        $result->closeCursor();
3272
-        $ncusertelrec = $datafromdb['user_id'];
3273
-
3274
-        return $ncusertelrec;
3275
-     }
3276
-
3277
-     /**
3278
-      * @NoAdminRequired
3279
-      */
3280
-     public function getuserbyteldelrwhurl($delsmswebhookurl) {
3281
-
3282
-        $sqldel = $this->connection->prepare('SELECT `user_id`, `telapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `telapi_url` = ?');
3283
-	$ressqldel = $sqldel->execute([$delsmswebhookurl]);
3284
-        $datafromdbdel = $ressqldel->fetch();
3285
-        $ressqldel->closeCursor();
3286
-        $ncuserteldel = $datafromdbdel['user_id'];
3287
-
3288
-        return $ncuserteldel;
3289
-     }
3290
-
3291
-     /**
3292
-      * @NoAdminRequired
3293
-      */
3294
-     public function getuserbyplivorecwhurl($plivorecurl) {
3295
-
3296
-        $sqlrecpl = $this->connection->prepare('SELECT `user_id`, `nexapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `nexapi_url_rec` = ?');
3297
-	$plresrecsql = $sqlrecpl->execute([$plivorecurl]);
3298
-        $pldatafromdb = $plresrecsql->fetch();
3299
-        $plresrecsql->closeCursor();
3300
-        $ncuserplrec = $pldatafromdb['user_id'];
3301
-
3302
-        return $ncuserplrec;
3303
-     }
3304
-
3305
-     /**
3306
-      * @NoAdminRequired
3307
-      */
3308
-     public function getuserbyplivodelrwhurl($plivodrurl) {
3309
-
3310
-        $sqldrpl = $this->connection->prepare('SELECT `user_id`, `nexapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `nexapi_url` = ?');
3311
-	$ressqldelrec = $sqldrpl->execute([$plivodrurl]);
3312
-        $datafromdbdr = $ressqldelrec->fetch();
3313
-        $ressqldelrec->closeCursor();
3314
-        $ncuserplivodel = $datafromdbdr['user_id'];
3315
-
3316
-        return $ncuserplivodel;
3317
-     }
3318
-
3319
-     /**
3320
-      * @NoAdminRequired
3321
-      */
3322
-     public function getuserbytwilrecwhurl($twilrecurl) {
3323
-
3324
-        $sqlrectw = $this->connection->prepare('SELECT `user_id`, `twilapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `twilapi_url_rec` = ?');
3325
-	$twresrecsql = $sqlrectw->execute([$twilrecurl]);
3326
-        $twdatafromdb = $twresrecsql->fetch();
3327
-        $twresrecsql->closeCursor();
3328
-        $ncusertwrec = $twdatafromdb['user_id'];
3329
-
3330
-        return $ncusertwrec;
3331
-     }
3332
-
3333
-     /**
3334
-      * @NoAdminRequired
3335
-      */
3336
-     public function getuserbytwildelrwhurl($twildrurl) {
3337
-
3338
-        $sqldrtw = $this->connection->prepare('SELECT `user_id`, `twilapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `twilapi_url` = ?');
3339
-	$ressqldelrectw = $sqldrtw->execute([$twildrurl]);
3340
-        $datafromdbdrtw = $ressqldelrectw->fetch();
3341
-        $ressqldelrectw->closeCursor();
3342
-        $ncusertwildel = $datafromdbdrtw['user_id'];
3343
-
3344
-        return $ncusertwildel;
3345
-     }
3346
-
3347
-     /**
3348
-      * @NoAdminRequired
3349
-      */
3350
-     public function getuserbyflowrecwhurl($flowrecurl) {
3351
-
3352
-        $sqlrecfl = $this->connection->prepare('SELECT `user_id`, `flowapi_url_rec` FROM `*PREFIX*sms_relent_settings` WHERE `flowapi_url_rec` = ?');
3353
-	$flresrecsql = $sqlrecfl->execute([$flowrecurl]);
3354
-        $fldatafromdb = $flresrecsql->fetch();
3355
-        $flresrecsql->closeCursor();
3356
-        $ncuserflrec = $fldatafromdb['user_id'];
3357
-
3358
-        return $ncuserflrec;
3359
-     }
3360
-
3361
-     /**
3362
-      * @NoAdminRequired
3363
-      */
3364
-     public function getuserbyflowdelrwhurl($flowdrurl) {
3365
-
3366
-        $sqldrfl = $this->connection->prepare('SELECT `user_id`, `flowapi_url` FROM `*PREFIX*sms_relent_settings` WHERE `flowapi_url` = ?');
3367
-	$ressqldelrecfl = $sqldrfl->execute([$flowdrurl]);
3368
-        $datafromdbdrfl = $ressqldelrecfl->fetch();
3369
-        $ressqldelrecfl->closeCursor();
3370
-        $ncuserflowdel = $datafromdbdrfl['user_id'];
3371
-
3372
-        return $ncuserflowdel;
3373
-     }
3374
-}