Browse code

added Conversations page and improved mobile compatibility

DoubleBastionAdmin authored on 02/04/2024 00:47:37
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,260 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
+            </select>
41
+            <span id="currentbalance"></span>
42
+            <div class="tooltipbalanceid">
43
+                <div id="infobalance">i</div>
44
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
+                      rel="noreferrer noopener">here</a>.
50
+                </span>
51
+            </div>
52
+       </div>
53
+
54
+       <div id="smsnumbersdiv" class="cllridcls">
55
+            <div id="pickid">Set ID:</div>
56
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
+                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
+            </select>
59
+            <button id="refreshSenderIDs" title="Refresh the list of Sender IDs."></button>
60
+            <div class="tooltipsetid">
61
+                <div id="infotipid">i</div>
62
+                <div id="setcalleridtp">
63
+                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
64
+                        the 'From' field that is displayed on the phone of the receivers, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
65
+                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
66
+                        alphanumeric Sender ID' field. 
67
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
68
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
69
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
70
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
71
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
72
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
73
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
74
+                        associated with that phone number.
75
+                    </span>
76
+                </div>
77
+            </div>
78
+       </div>
79
+
80
+       <div  class="srheader">
81
+            Enter the recipient's number as:
82
+       </div>
83
+       <div class="smsnbformat">
84
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
85
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
86
+       </div>
87
+       <div class="fortooltip"><font class="texttooltip">i</font>
88
+         <div id="tonmbrformat">
89
+            <span class="fortooltiptext">
90
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
91
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
92
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
93
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
94
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
95
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
96
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
97
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
98
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
99
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
100
+            </span>
101
+         </div>
102
+       </div>
103
+
104
+   <div id="smstodiv">
105
+       <input type="text" id="smsto" name="smsto" />
106
+   </div>
107
+
108
+   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
109
+
110
+   <div id="multiplerecivers">
111
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
112
+          <div id="uploadfileinfo">
113
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
114
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
115
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
116
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
117
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
118
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
119
+              Canadian long code numbers (10 digit numbers) is 
120
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
121
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
122
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
123
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
124
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
125
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
126
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
127
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
128
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
129
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
130
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
131
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
132
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
133
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
134
+              campaign via
135
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
136
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
137
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
138
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
139
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
140
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
141
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
142
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
143
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
144
+              in the text box from below.
145
+          </span>
146
+          </div>
147
+       </div>
148
+       <div id="multsetrows">
149
+          <div id="fileuploadednm" class="fileuploadstl"></div>
150
+          <div class="uploadphnfiledv">
151
+              <form class="uploadflbt"  enctype="multipart/form-data" >
152
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt">Upload the file</span></label>
153
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
154
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
155
+              </form>
156
+          </div>
157
+          <span id="sms_upload_msg"></span>
158
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
159
+          id="multsmsinterval" placeholder="Eg.: 1000" />
160
+       </div>
161
+   </div>
162
+
163
+   <div id="entermessage">Enter message:</div>
164
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
165
+
166
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
167
+       <div id="maxlengthinfo">
168
+           <span class="maxlengthtooltip">
169
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
170
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
171
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
172
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
173
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
174
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
175
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
176
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
177
+           </span>
178
+       </div>
179
+   </div>
180
+
181
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
182
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
183
+
184
+   <div id="sendmediafl">
185
+        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
186
+   </div>
187
+
188
+   <div id="upmediafiles">
189
+
190
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
191
+          <div id="uploadmmfileinfo">
192
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
193
+          </div>
194
+       </div>
195
+
196
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
197
+
198
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
199
+
200
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
201
+          <div class="uploadfiledv">
202
+               <form class="uploadflbt"  enctype="multipart/form-data" >
203
+                     <span id="uploadFile">Upload file</span>
204
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
205
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
206
+               </form>
207
+          </div>
208
+
209
+       <span id="pf_upload_msg"></span>
210
+
211
+       <div id="filespickednc" class="filesfromnc"></div>
212
+  
213
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
214
+
215
+       <span id="pf_choose_msg"></span>
216
+
217
+       <p class="pickedflnm"></p>
218
+
219
+   </div>
220
+
221
+   <input type="submit" id="submitsms" value="Send SMS" />
222
+   <span id="sms_submit_msg"></span>
223
+
224
+   <div id="dirbuttons">
225
+       <button id="receivedsmstableshow" class="opensmsfolder">Received Messages</button>
226
+       <button id="sentsmstableshow" class="opensmsfolder">Sent Messages</button>
227
+       <button id="conversationsshow" class="opensmsfolder">Conversations</button>
228
+       <button id="groupedtableshow" class="opensmsfolder">Grouped by Number</button>
229
+   </div>
230
+
231
+
232
+   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
233
+
234
+   <div id="deleteoldsms">
235
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
236
+          <div id="deleteoldinfo">
237
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
238
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
239
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
240
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
241
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
242
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
243
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
244
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
245
+          </span>
246
+          </div>
247
+       </div>
248
+       <div id="delsetrows">
249
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
250
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
251
+          <span id="sms_deleterecmsg"></span><br><br>
252
+
253
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
254
+          <span class="deletesmsolder"> days.</span>
255
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
256
+          <span id="sms_deletesentmsg"></span>
257
+       </div>
258
+   </div>
259
+
260
+</div>
Browse code

removed appinfo/info.xml appinfo/signature.json appinfo/routes.php CHANGELOG.txt README.md css/style.css js/showsmstables.js js/settings.js js/sendsms.js lib/Controller/AuthorApiController.php lib/Controller/SmsrelentlessController.php lib/Service/SmsrelentlessService.php templates/navigation/index.php templates/settings/personal.php img/arrow-top.svg

DoubleBastionAdmin authored on 02/04/2024 00:07:07
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,259 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
-            </select>
41
-            <span id="currentbalance"></span>
42
-            <div class="tooltipbalanceid">
43
-                <div id="infobalance">i</div>
44
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
-                      rel="noreferrer noopener">here</a>.
50
-                </span>
51
-            </div>
52
-       </div>
53
-
54
-       <div id="smsnumbersdiv" class="cllridcls">
55
-            <div id="pickid">Set ID:</div>
56
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
-                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
-            </select>
59
-            <button id="refreshSenderIDs" title="Refresh the list of Sender IDs."></button>
60
-            <div class="tooltipsetid">
61
-                <div id="infotipid">i</div>
62
-                <div id="setcalleridtp">
63
-                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
64
-                        the 'From' field that is displayed on the phone of the receivers, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
65
-                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
66
-                        alphanumeric Sender ID' field. 
67
-                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
68
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
69
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
70
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
71
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
72
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
73
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
74
-                        associated with that phone number.
75
-                    </span>
76
-                </div>
77
-            </div>
78
-       </div>
79
-
80
-       <div  class="srheader">
81
-            Enter the recipient's number as:
82
-       </div>
83
-       <div class="smsnbformat">
84
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
85
-               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
86
-       </div>
87
-       <div class="fortooltip"><font class="texttooltip">i</font>
88
-         <div id="tonmbrformat">
89
-            <span class="fortooltiptext">
90
-               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
91
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
92
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
93
-               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
94
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
95
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
96
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
97
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
98
-               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
99
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
100
-            </span>
101
-         </div>
102
-       </div>
103
-
104
-   <div id="smstodiv">
105
-       <input type="text" id="smsto" name="smsto" />
106
-   </div>
107
-
108
-   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
109
-
110
-   <div id="multiplerecivers">
111
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
112
-          <div id="uploadfileinfo">
113
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
114
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
115
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
116
-              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
117
-              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
118
-              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
119
-              Canadian long code numbers (10 digit numbers) is 
120
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
121
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
122
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
123
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
124
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
125
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
126
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
127
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
128
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
129
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
130
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
131
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
132
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
133
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
134
-              campaign via
135
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
136
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
137
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
138
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
139
-              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
140
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
141
-              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
142
-              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
143
-              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
144
-              in the text box from below.
145
-          </span>
146
-          </div>
147
-       </div>
148
-       <div id="multsetrows">
149
-          <div id="fileuploadednm" class="fileuploadstl"></div>
150
-          <div class="uploadfiledv">
151
-              <form class="uploadflbt"  enctype="multipart/form-data" >
152
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
153
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
154
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
155
-              </form>
156
-          </div>
157
-          <span id="sms_upload_msg"></span>
158
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
159
-          id="multsmsinterval" placeholder="Eg.: 1000" />
160
-       </div>
161
-   </div>
162
-
163
-   <div id="entermessage">Enter message:</div>
164
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
165
-
166
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
167
-       <div id="maxlengthinfo">
168
-           <span class="maxlengthtooltip">
169
-                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
170
-                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
171
-                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
172
-                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
173
-                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
174
-                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
175
-                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
176
-                for MMS messages is different. MMS messages can be up to 1600 characters long.
177
-           </span>
178
-       </div>
179
-   </div>
180
-
181
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
182
-   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
183
-
184
-   <div id="sendmediafl">
185
-        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
186
-   </div>
187
-
188
-   <div id="upmediafiles">
189
-
190
-       <div class="fortooltipfourth"><div id="infotipmms">i</div>
191
-          <div id="uploadmmfileinfo">
192
-             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
193
-          </div>
194
-       </div>
195
-
196
-       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
197
-
198
-          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
199
-
200
-          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
201
-          <div class="uploadfiledv">
202
-               <form class="uploadflbt"  enctype="multipart/form-data" >
203
-                     <span id="uploadFile">Upload file</span>
204
-                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
205
-                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
206
-               </form>
207
-          </div>
208
-
209
-       <span id="pf_upload_msg"></span>
210
-
211
-       <div id="filespickednc" class="filesfromnc"></div>
212
-  
213
-       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
214
-
215
-       <span id="pf_choose_msg"></span>
216
-
217
-       <p class="pickedflnm"></p>
218
-
219
-   </div>
220
-
221
-   <input type="submit" id="submitsms" value="Send SMS" />
222
-   <span id="sms_submit_msg"></span>
223
-
224
-   <div id="dirbuttons">
225
-       <button id="receivedsmstableshow" class="opensmsfolder">Received Messages</button>
226
-       <button id="sentsmstableshow" class="opensmsfolder">Sent Messages</button>
227
-       <button id="groupedtableshow" class="opensmsfolder">Messages Grouped by Number</button>
228
-   </div>
229
-
230
-
231
-   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
232
-
233
-   <div id="deleteoldsms">
234
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
235
-          <div id="deleteoldinfo">
236
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
237
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
238
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
239
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
240
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
241
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
242
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
243
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
244
-          </span>
245
-          </div>
246
-       </div>
247
-       <div id="delsetrows">
248
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
249
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
250
-          <span id="sms_deleterecmsg"></span><br><br>
251
-
252
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
253
-          <span class="deletesmsolder"> days.</span>
254
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
255
-          <span id="sms_deletesentmsg"></span>
256
-       </div>
257
-   </div>
258
-
259
-</div>
Browse code

added appinfo/info.xml appinfo/signature.json appinfo/routes.php CHANGELOG.txt README.md css/style.css js/settings.js js/sendsms.js js/adminsettings.js js/showsmstables.js templates/settings/admin.php templates/settings/personal.php templates/navigation/index.php lib/Controller/SmsrelentlessController.php lib/Service/SmsrelentlessService.php l10n/en_GB.js l10n/en_GB.json l10n/en_US.js l10n/en_US.json lib/Migration/Version133Date20240215094712.php

DoubleBastionAdmin authored on 14/02/2024 22:47:20
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,259 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
+            </select>
41
+            <span id="currentbalance"></span>
42
+            <div class="tooltipbalanceid">
43
+                <div id="infobalance">i</div>
44
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
+                      rel="noreferrer noopener">here</a>.
50
+                </span>
51
+            </div>
52
+       </div>
53
+
54
+       <div id="smsnumbersdiv" class="cllridcls">
55
+            <div id="pickid">Set ID:</div>
56
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
+                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
+            </select>
59
+            <button id="refreshSenderIDs" title="Refresh the list of Sender IDs."></button>
60
+            <div class="tooltipsetid">
61
+                <div id="infotipid">i</div>
62
+                <div id="setcalleridtp">
63
+                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
64
+                        the 'From' field that is displayed on the phone of the receivers, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
65
+                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
66
+                        alphanumeric Sender ID' field. 
67
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
68
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
69
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
70
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
71
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
72
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
73
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
74
+                        associated with that phone number.
75
+                    </span>
76
+                </div>
77
+            </div>
78
+       </div>
79
+
80
+       <div  class="srheader">
81
+            Enter the recipient's number as:
82
+       </div>
83
+       <div class="smsnbformat">
84
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
85
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
86
+       </div>
87
+       <div class="fortooltip"><font class="texttooltip">i</font>
88
+         <div id="tonmbrformat">
89
+            <span class="fortooltiptext">
90
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
91
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
92
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
93
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
94
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
95
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
96
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
97
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
98
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
99
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
100
+            </span>
101
+         </div>
102
+       </div>
103
+
104
+   <div id="smstodiv">
105
+       <input type="text" id="smsto" name="smsto" />
106
+   </div>
107
+
108
+   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
109
+
110
+   <div id="multiplerecivers">
111
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
112
+          <div id="uploadfileinfo">
113
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
114
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
115
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
116
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
117
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
118
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
119
+              Canadian long code numbers (10 digit numbers) is 
120
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
121
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
122
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
123
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
124
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
125
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
126
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
127
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
128
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
129
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
130
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
131
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
132
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
133
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
134
+              campaign via
135
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
136
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
137
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
138
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
139
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
140
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
141
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
142
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
143
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
144
+              in the text box from below.
145
+          </span>
146
+          </div>
147
+       </div>
148
+       <div id="multsetrows">
149
+          <div id="fileuploadednm" class="fileuploadstl"></div>
150
+          <div class="uploadfiledv">
151
+              <form class="uploadflbt"  enctype="multipart/form-data" >
152
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
153
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
154
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
155
+              </form>
156
+          </div>
157
+          <span id="sms_upload_msg"></span>
158
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
159
+          id="multsmsinterval" placeholder="Eg.: 1000" />
160
+       </div>
161
+   </div>
162
+
163
+   <div id="entermessage">Enter message:</div>
164
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
165
+
166
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
167
+       <div id="maxlengthinfo">
168
+           <span class="maxlengthtooltip">
169
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
170
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
171
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
172
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
173
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
174
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
175
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
176
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
177
+           </span>
178
+       </div>
179
+   </div>
180
+
181
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
182
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
183
+
184
+   <div id="sendmediafl">
185
+        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
186
+   </div>
187
+
188
+   <div id="upmediafiles">
189
+
190
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
191
+          <div id="uploadmmfileinfo">
192
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
193
+          </div>
194
+       </div>
195
+
196
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
197
+
198
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
199
+
200
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
201
+          <div class="uploadfiledv">
202
+               <form class="uploadflbt"  enctype="multipart/form-data" >
203
+                     <span id="uploadFile">Upload file</span>
204
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
205
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
206
+               </form>
207
+          </div>
208
+
209
+       <span id="pf_upload_msg"></span>
210
+
211
+       <div id="filespickednc" class="filesfromnc"></div>
212
+  
213
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
214
+
215
+       <span id="pf_choose_msg"></span>
216
+
217
+       <p class="pickedflnm"></p>
218
+
219
+   </div>
220
+
221
+   <input type="submit" id="submitsms" value="Send SMS" />
222
+   <span id="sms_submit_msg"></span>
223
+
224
+   <div id="dirbuttons">
225
+       <button id="receivedsmstableshow" class="opensmsfolder">Received Messages</button>
226
+       <button id="sentsmstableshow" class="opensmsfolder">Sent Messages</button>
227
+       <button id="groupedtableshow" class="opensmsfolder">Messages Grouped by Number</button>
228
+   </div>
229
+
230
+
231
+   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
232
+
233
+   <div id="deleteoldsms">
234
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
235
+          <div id="deleteoldinfo">
236
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
237
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
238
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
239
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
240
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
241
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
242
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
243
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
244
+          </span>
245
+          </div>
246
+       </div>
247
+       <div id="delsetrows">
248
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
249
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
250
+          <span id="sms_deleterecmsg"></span><br><br>
251
+
252
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
253
+          <span class="deletesmsolder"> days.</span>
254
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
255
+          <span id="sms_deletesentmsg"></span>
256
+       </div>
257
+   </div>
258
+
259
+</div>
Browse code

removed appinfo/info.xml appinfo/signature.json appinfo/routes.php CHANGELOG.txt README.md css/style.css js/settings.js js/sendsms.js js/adminsettings.js js/showsmstables.js templates/settings/admin.php templates/settings/personal.php templates/navigation/index.php lib/Controller/SmsrelentlessController.php lib/Service/SmsrelentlessService.php l10n/en_GB.js l10n/en_GB.json l10n/en_US.js l10n/en_US.json

DoubleBastionAdmin authored on 14/02/2024 22:37:16
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,258 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
-            </select>
41
-            <span id="currentbalance"></span>
42
-            <div class="tooltipbalanceid">
43
-                <div id="infobalance">i</div>
44
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
-                      rel="noreferrer noopener">here</a>.
50
-                </span>
51
-            </div>
52
-       </div>
53
-
54
-       <div id="smsnumbersdiv" class="cllridcls">
55
-            <div id="pickid">Set ID:</div>
56
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
-                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
-            </select>
59
-            <div class="tooltipsetid">
60
-                <div id="infotipid">i</div>
61
-                <div id="setcalleridtp">
62
-                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
63
-                        the 'From' field that is displayed on the phone of the receivers, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
64
-                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
65
-                        alphanumeric Sender ID' field. 
66
-                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
67
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
68
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
69
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
70
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
71
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
72
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
73
-                        associated with that phone number.
74
-                    </span>
75
-                </div>
76
-            </div>
77
-       </div>
78
-
79
-       <div  class="srheader">
80
-            Enter the recipient's number as:
81
-       </div>
82
-       <div class="smsnbformat">
83
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
84
-               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
85
-       </div>
86
-       <div class="fortooltip"><font class="texttooltip">i</font>
87
-         <div id="tonmbrformat">
88
-            <span class="fortooltiptext">
89
-               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
90
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
91
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
92
-               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
93
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
94
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
95
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
96
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
97
-               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
98
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
99
-            </span>
100
-         </div>
101
-       </div>
102
-
103
-   <div id="smstodiv">
104
-       <input type="text" id="smsto" name="smsto" />
105
-   </div>
106
-
107
-   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
108
-
109
-   <div id="multiplerecivers">
110
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
111
-          <div id="uploadfileinfo">
112
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
113
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
114
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
115
-              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
116
-              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
117
-              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
118
-              Canadian long code numbers (10 digit numbers) is 
119
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
120
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
121
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
122
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
123
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
124
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
125
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
126
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
127
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
128
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
129
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
130
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
131
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
132
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
133
-              campaign via
134
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
135
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
136
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
137
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
138
-              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
139
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
140
-              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
141
-              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
142
-              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
143
-              in the text box from below.
144
-          </span>
145
-          </div>
146
-       </div>
147
-       <div id="multsetrows">
148
-          <div id="fileuploadednm" class="fileuploadstl"></div>
149
-          <div class="uploadfiledv">
150
-              <form class="uploadflbt"  enctype="multipart/form-data" >
151
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
152
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
153
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
154
-              </form>
155
-          </div>
156
-          <span id="sms_upload_msg"></span>
157
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
158
-          id="multsmsinterval" placeholder="Eg.: 1000" />
159
-       </div>
160
-   </div>
161
-
162
-   <div id="entermessage">Enter message:</div>
163
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
164
-
165
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
166
-       <div id="maxlengthinfo">
167
-           <span class="maxlengthtooltip">
168
-                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
169
-                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
170
-                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
171
-                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
172
-                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
173
-                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
174
-                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
175
-                for MMS messages is different. MMS messages can be up to 1600 characters long.
176
-           </span>
177
-       </div>
178
-   </div>
179
-
180
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
181
-   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
182
-
183
-   <div id="sendmediafl">
184
-        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
185
-   </div>
186
-
187
-   <div id="upmediafiles">
188
-
189
-       <div class="fortooltipfourth"><div id="infotipmms">i</div>
190
-          <div id="uploadmmfileinfo">
191
-             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
192
-          </div>
193
-       </div>
194
-
195
-       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
196
-
197
-          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
198
-
199
-          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
200
-          <div class="uploadfiledv">
201
-               <form class="uploadflbt"  enctype="multipart/form-data" >
202
-                     <span id="uploadFile">Upload file</span>
203
-                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
204
-                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
205
-               </form>
206
-          </div>
207
-
208
-       <span id="pf_upload_msg"></span>
209
-
210
-       <div id="filespickednc" class="filesfromnc"></div>
211
-  
212
-       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
213
-
214
-       <span id="pf_choose_msg"></span>
215
-
216
-       <p class="pickedflnm"></p>
217
-
218
-   </div>
219
-
220
-   <input type="submit" id="submitsms" value="Send SMS" />
221
-   <span id="sms_submit_msg"></span>
222
-
223
-   <div id="dirbuttons">
224
-       <button id="receivedsmstableshow" class="opensmsfolder">Received Messages</button>
225
-       <button id="sentsmstableshow" class="opensmsfolder">Sent Messages</button>
226
-       <button id="groupedtableshow" class="opensmsfolder">Messages Grouped by Number</button>
227
-   </div>
228
-
229
-
230
-   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
231
-
232
-   <div id="deleteoldsms">
233
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
234
-          <div id="deleteoldinfo">
235
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
236
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
237
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
238
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
239
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
240
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
241
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
242
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
243
-          </span>
244
-          </div>
245
-       </div>
246
-       <div id="delsetrows">
247
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
248
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
249
-          <span id="sms_deleterecmsg"></span><br><br>
250
-
251
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
252
-          <span class="deletesmsolder"> days.</span>
253
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
254
-          <span id="sms_deletesentmsg"></span>
255
-       </div>
256
-   </div>
257
-
258
-</div>
Browse code

added files to implement CSS changes required by Nextcloud 28

DoubleBastionAdmin authored on 17/12/2023 01:12:45
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,258 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
+            </select>
41
+            <span id="currentbalance"></span>
42
+            <div class="tooltipbalanceid">
43
+                <div id="infobalance">i</div>
44
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
+                      rel="noreferrer noopener">here</a>.
50
+                </span>
51
+            </div>
52
+       </div>
53
+
54
+       <div id="smsnumbersdiv" class="cllridcls">
55
+            <div id="pickid">Set ID:</div>
56
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
+                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
+            </select>
59
+            <div class="tooltipsetid">
60
+                <div id="infotipid">i</div>
61
+                <div id="setcalleridtp">
62
+                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
63
+                        the 'From' field that is displayed on the phone of the receivers, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
64
+                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
65
+                        alphanumeric Sender ID' field. 
66
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
67
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
68
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
69
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
70
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
71
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
72
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
73
+                        associated with that phone number.
74
+                    </span>
75
+                </div>
76
+            </div>
77
+       </div>
78
+
79
+       <div  class="srheader">
80
+            Enter the recipient's number as:
81
+       </div>
82
+       <div class="smsnbformat">
83
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
84
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
85
+       </div>
86
+       <div class="fortooltip"><font class="texttooltip">i</font>
87
+         <div id="tonmbrformat">
88
+            <span class="fortooltiptext">
89
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
90
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
91
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
92
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
93
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
94
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
95
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
96
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
97
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
98
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
99
+            </span>
100
+         </div>
101
+       </div>
102
+
103
+   <div id="smstodiv">
104
+       <input type="text" id="smsto" name="smsto" />
105
+   </div>
106
+
107
+   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
108
+
109
+   <div id="multiplerecivers">
110
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
111
+          <div id="uploadfileinfo">
112
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
113
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
114
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
115
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
116
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
117
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
118
+              Canadian long code numbers (10 digit numbers) is 
119
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
120
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
121
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
122
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
123
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
124
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
125
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
126
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
127
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
128
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
129
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
130
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
131
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
132
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
133
+              campaign via
134
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
135
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
136
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
137
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
138
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
139
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
140
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
141
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
142
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
143
+              in the text box from below.
144
+          </span>
145
+          </div>
146
+       </div>
147
+       <div id="multsetrows">
148
+          <div id="fileuploadednm" class="fileuploadstl"></div>
149
+          <div class="uploadfiledv">
150
+              <form class="uploadflbt"  enctype="multipart/form-data" >
151
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
152
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
153
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
154
+              </form>
155
+          </div>
156
+          <span id="sms_upload_msg"></span>
157
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
158
+          id="multsmsinterval" placeholder="Eg.: 1000" />
159
+       </div>
160
+   </div>
161
+
162
+   <div id="entermessage">Enter message:</div>
163
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
164
+
165
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
166
+       <div id="maxlengthinfo">
167
+           <span class="maxlengthtooltip">
168
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
169
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
170
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
171
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
172
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
173
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
174
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
175
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
176
+           </span>
177
+       </div>
178
+   </div>
179
+
180
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
181
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
182
+
183
+   <div id="sendmediafl">
184
+        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
185
+   </div>
186
+
187
+   <div id="upmediafiles">
188
+
189
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
190
+          <div id="uploadmmfileinfo">
191
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
192
+          </div>
193
+       </div>
194
+
195
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
196
+
197
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
198
+
199
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
200
+          <div class="uploadfiledv">
201
+               <form class="uploadflbt"  enctype="multipart/form-data" >
202
+                     <span id="uploadFile">Upload file</span>
203
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
204
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
205
+               </form>
206
+          </div>
207
+
208
+       <span id="pf_upload_msg"></span>
209
+
210
+       <div id="filespickednc" class="filesfromnc"></div>
211
+  
212
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
213
+
214
+       <span id="pf_choose_msg"></span>
215
+
216
+       <p class="pickedflnm"></p>
217
+
218
+   </div>
219
+
220
+   <input type="submit" id="submitsms" value="Send SMS" />
221
+   <span id="sms_submit_msg"></span>
222
+
223
+   <div id="dirbuttons">
224
+       <button id="receivedsmstableshow" class="opensmsfolder">Received Messages</button>
225
+       <button id="sentsmstableshow" class="opensmsfolder">Sent Messages</button>
226
+       <button id="groupedtableshow" class="opensmsfolder">Messages Grouped by Number</button>
227
+   </div>
228
+
229
+
230
+   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
231
+
232
+   <div id="deleteoldsms">
233
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
234
+          <div id="deleteoldinfo">
235
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
236
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
237
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
238
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
239
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
240
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
241
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
242
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
243
+          </span>
244
+          </div>
245
+       </div>
246
+       <div id="delsetrows">
247
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
248
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
249
+          <span id="sms_deleterecmsg"></span><br><br>
250
+
251
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
252
+          <span class="deletesmsolder"> days.</span>
253
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
254
+          <span id="sms_deletesentmsg"></span>
255
+       </div>
256
+   </div>
257
+
258
+</div>
Browse code

removed files to implement CSS changes required by Nextcloud 28

DoubleBastionAdmin authored on 17/12/2023 00:56:54
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,258 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
-            </select>           
41
-            <span id="currentbalance"></span>
42
-            <div class="tooltipbalanceid">
43
-                <div id="infobalance">i</div>
44
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
-                      rel="noreferrer noopener">here</a>.
50
-                </span>
51
-            </div>
52
-       </div>
53
-
54
-       <div id="smsnumbersdiv" class="cllridcls">
55
-            <div id="pickid">Set ID:</div>
56
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
-                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
-            </select>
59
-            <div class="tooltipsetid">
60
-                <div id="infotipid">i</div>
61
-                <div id="setcalleridtp">
62
-                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
63
-                        the 'From' field that is displayed on the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
64
-                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
65
-                        alphanumeric Sender ID' field. 
66
-                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
67
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
68
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
69
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
70
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
71
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
72
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
73
-                        associated with that phone number.
74
-                    </span>
75
-                </div>
76
-            </div>
77
-       </div>
78
-
79
-       <div  class="srheader">
80
-            Enter the recipient's number as:
81
-       </div>
82
-       <div class="smsnbformat">
83
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
84
-               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
85
-       </div>
86
-       <div class="fortooltip"><font class="texttooltip">i</font>
87
-         <div id="tonmbrformat">
88
-            <span class="fortooltiptext">
89
-               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
90
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
91
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
92
-               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
93
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
94
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
95
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
96
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
97
-               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
98
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
99
-            </span>
100
-         </div>
101
-       </div>
102
-
103
-   <div id="smstodiv">
104
-       <input type="text" id="smsto" name="smsto" />
105
-   </div>
106
-
107
-   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
108
-
109
-   <div id="multiplerecivers">
110
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
111
-          <div id="uploadfileinfo">
112
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
113
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
114
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
115
-              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
116
-              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
117
-              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
118
-              Canadian long code numbers (10 digit numbers) is 
119
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
120
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
121
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
122
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
123
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
124
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
125
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
126
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
127
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
128
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
129
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
130
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
131
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
132
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
133
-              campaign via
134
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
135
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
136
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
137
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
138
-              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
139
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
140
-              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
141
-              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
142
-              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
143
-              in the text box from below.
144
-          </span>
145
-          </div>
146
-       </div>
147
-       <div id="multsetrows">
148
-          <div id="fileuploadednm" class="fileuploadstl"></div>
149
-          <div class="uploadfiledv">
150
-              <form class="uploadflbt"  enctype="multipart/form-data" >
151
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
152
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
153
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
154
-              </form>
155
-          </div>
156
-          <span id="sms_upload_msg"></span>
157
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
158
-          id="multsmsinterval" placeholder="Eg.: 1000" />
159
-       </div>
160
-   </div>
161
-
162
-   <div id="entermessage">Enter message:</div>
163
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
164
-
165
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
166
-       <div id="maxlengthinfo">
167
-           <span class="maxlengthtooltip">
168
-                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
169
-                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
170
-                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
171
-                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
172
-                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
173
-                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
174
-                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
175
-                for MMS messages is different. MMS messages can be up to 1600 characters long.
176
-           </span>
177
-       </div>
178
-   </div>
179
-
180
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
181
-   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
182
-
183
-   <div id="sendmediafl">
184
-        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
185
-   </div>
186
-
187
-   <div id="upmediafiles">
188
-
189
-       <div class="fortooltipfourth"><div id="infotipmms">i</div>
190
-          <div id="uploadmmfileinfo">
191
-             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
192
-          </div>
193
-       </div>
194
-
195
-       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
196
-
197
-          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
198
-
199
-          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
200
-          <div class="uploadfiledv">
201
-               <form class="uploadflbt"  enctype="multipart/form-data" >
202
-                     <span id="uploadFile">Upload file</span>
203
-                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
204
-                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
205
-               </form>
206
-          </div>
207
-
208
-       <span id="pf_upload_msg"></span>
209
-
210
-       <div id="filespickednc" class="filesfromnc"></div>
211
-  
212
-       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
213
-
214
-       <span id="pf_choose_msg"></span>
215
-
216
-       <p class="pickedflnm"></p>
217
-
218
-   </div>
219
-
220
-   <input type="submit" id="submitsms" value="Send SMS" />
221
-   <span id="sms_submit_msg"></span>
222
-
223
-   <div id="dirbuttons">
224
-       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
225
-       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
226
-       <button id="groupedtableshow" class="opensmsfolder">Group Messages by Number</button>
227
-   </div>
228
-
229
-
230
-   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
231
-
232
-   <div id="deleteoldsms">
233
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
234
-          <div id="deleteoldinfo">
235
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
236
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
237
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
238
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
239
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
240
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
241
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
242
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
243
-          </span>
244
-          </div>
245
-       </div>
246
-       <div id="delsetrows">
247
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
248
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
249
-          <span id="sms_deleterecmsg"></span><br><br>
250
-
251
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
252
-          <span class="deletesmsolder"> days.</span>
253
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
254
-          <span id="sms_deletesentmsg"></span>
255
-       </div>
256
-   </div>
257
-
258
-</div>
Browse code

added CHANGELOG.txt README.md appinfo/info.xml appinfo/signature.json img/sms_relentless_screenshot.png css/style.css js/showsmstables.js js/settings.js templates/settings/admin.php templates/settings/personal.php templates/navigation/index.php

DoubleBastionAdmin authored on 30/10/2023 14:55:39
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,258 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
+            </select>           
41
+            <span id="currentbalance"></span>
42
+            <div class="tooltipbalanceid">
43
+                <div id="infobalance">i</div>
44
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
+                      rel="noreferrer noopener">here</a>.
50
+                </span>
51
+            </div>
52
+       </div>
53
+
54
+       <div id="smsnumbersdiv" class="cllridcls">
55
+            <div id="pickid">Set ID:</div>
56
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
+                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
+            </select>
59
+            <div class="tooltipsetid">
60
+                <div id="infotipid">i</div>
61
+                <div id="setcalleridtp">
62
+                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
63
+                        the 'From' field that is displayed on the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
64
+                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
65
+                        alphanumeric Sender ID' field. 
66
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
67
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
68
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
69
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
70
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
71
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
72
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
73
+                        associated with that phone number.
74
+                    </span>
75
+                </div>
76
+            </div>
77
+       </div>
78
+
79
+       <div  class="srheader">
80
+            Enter the recipient's number as:
81
+       </div>
82
+       <div class="smsnbformat">
83
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
84
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
85
+       </div>
86
+       <div class="fortooltip"><font class="texttooltip">i</font>
87
+         <div id="tonmbrformat">
88
+            <span class="fortooltiptext">
89
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
90
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
91
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
92
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
93
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
94
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
95
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
96
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
97
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
98
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
99
+            </span>
100
+         </div>
101
+       </div>
102
+
103
+   <div id="smstodiv">
104
+       <input type="text" id="smsto" name="smsto" />
105
+   </div>
106
+
107
+   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
108
+
109
+   <div id="multiplerecivers">
110
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
111
+          <div id="uploadfileinfo">
112
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
113
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
114
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
115
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
116
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
117
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
118
+              Canadian long code numbers (10 digit numbers) is 
119
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
120
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
121
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
122
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
123
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
124
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
125
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
126
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
127
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
128
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
129
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
130
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
131
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
132
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
133
+              campaign via
134
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
135
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
136
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
137
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
138
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
139
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
140
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
141
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
142
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
143
+              in the text box from below.
144
+          </span>
145
+          </div>
146
+       </div>
147
+       <div id="multsetrows">
148
+          <div id="fileuploadednm" class="fileuploadstl"></div>
149
+          <div class="uploadfiledv">
150
+              <form class="uploadflbt"  enctype="multipart/form-data" >
151
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
152
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
153
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
154
+              </form>
155
+          </div>
156
+          <span id="sms_upload_msg"></span>
157
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
158
+          id="multsmsinterval" placeholder="Eg.: 1000" />
159
+       </div>
160
+   </div>
161
+
162
+   <div id="entermessage">Enter message:</div>
163
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
164
+
165
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
166
+       <div id="maxlengthinfo">
167
+           <span class="maxlengthtooltip">
168
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
169
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
170
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
171
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
172
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
173
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
174
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
175
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
176
+           </span>
177
+       </div>
178
+   </div>
179
+
180
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
181
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
182
+
183
+   <div id="sendmediafl">
184
+        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
185
+   </div>
186
+
187
+   <div id="upmediafiles">
188
+
189
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
190
+          <div id="uploadmmfileinfo">
191
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
192
+          </div>
193
+       </div>
194
+
195
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
196
+
197
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
198
+
199
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
200
+          <div class="uploadfiledv">
201
+               <form class="uploadflbt"  enctype="multipart/form-data" >
202
+                     <span id="uploadFile">Upload file</span>
203
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
204
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
205
+               </form>
206
+          </div>
207
+
208
+       <span id="pf_upload_msg"></span>
209
+
210
+       <div id="filespickednc" class="filesfromnc"></div>
211
+  
212
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
213
+
214
+       <span id="pf_choose_msg"></span>
215
+
216
+       <p class="pickedflnm"></p>
217
+
218
+   </div>
219
+
220
+   <input type="submit" id="submitsms" value="Send SMS" />
221
+   <span id="sms_submit_msg"></span>
222
+
223
+   <div id="dirbuttons">
224
+       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
225
+       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
226
+       <button id="groupedtableshow" class="opensmsfolder">Group Messages by Number</button>
227
+   </div>
228
+
229
+
230
+   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
231
+
232
+   <div id="deleteoldsms">
233
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
234
+          <div id="deleteoldinfo">
235
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
236
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
237
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
238
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
239
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
240
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
241
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
242
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
243
+          </span>
244
+          </div>
245
+       </div>
246
+       <div id="delsetrows">
247
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
248
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
249
+          <span id="sms_deleterecmsg"></span><br><br>
250
+
251
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
252
+          <span class="deletesmsolder"> days.</span>
253
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
254
+          <span id="sms_deletesentmsg"></span>
255
+       </div>
256
+   </div>
257
+
258
+</div>
Browse code

removed CHANGELOG.txt README.md appinfo/info.xml appinfo/signature.json img/sms_relentless_screenshot.png css/style.css js/showsmstables.js js/settings.js templates/settings/admin.php templates/settings/personal.php templates/navigation/index.php

DoubleBastionAdmin authored on 30/10/2023 14:44:44
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,258 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
-            </select>           
41
-            <span id="currentbalance"></span>
42
-            <div class="tooltipbalanceid">
43
-                <div id="infobalance">i</div>
44
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
-                      rel="noreferrer noopener">here</a>.
50
-                </span>
51
-            </div>
52
-       </div>
53
-
54
-       <div id="smsnumbersdiv" class="cllridcls">
55
-            <div id="pickid">Set ID:</div>
56
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
-                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
-            </select>
59
-            <div class="tooltipsetid">
60
-                <div id="infotipid">i</div>
61
-                <div id="setcalleridtp">
62
-                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
63
-                        the 'From' field that is displayed on the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
64
-                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
65
-                        alphanumeric Sender ID' field. 
66
-                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
67
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
68
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
69
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
70
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
71
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
72
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
73
-                        associated with that phone number.
74
-                    </span>
75
-                </div>
76
-            </div>
77
-       </div>
78
-
79
-       <div  class="srheader">
80
-            Enter the recipient's number as:
81
-       </div>
82
-       <div class="smsnbformat">
83
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
84
-               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
85
-       </div>
86
-       <div class="fortooltip"><font class="texttooltip">i</font>
87
-         <div id="tonmbrformat">
88
-            <span class="fortooltiptext">
89
-               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
90
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
91
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
92
-               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
93
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
94
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
95
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
96
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
97
-               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
98
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
99
-            </span>
100
-         </div>
101
-       </div>
102
-
103
-   <div id="smstodiv">
104
-       <input type="text" id="smsto" name="smsto" />
105
-   </div>
106
-
107
-   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
108
-
109
-   <div id="multiplerecivers">
110
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
111
-          <div id="uploadfileinfo">
112
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
113
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
114
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
115
-              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
116
-              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
117
-              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
118
-              Canadian long code numbers (10 digit numbers) is 
119
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
120
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
121
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
122
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
123
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
124
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
125
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
126
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
127
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
128
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
129
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
130
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
131
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
132
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
133
-              campaign via
134
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
135
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
136
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
137
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
138
-              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
139
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
140
-              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
141
-              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
142
-              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
143
-              in the text box from below.
144
-          </span>
145
-          </div>
146
-       </div>
147
-       <div id="multsetrows">
148
-          <div id="fileuploadednm" class="fileuploadstl"></div>
149
-          <div class="uploadfiledv">
150
-              <form class="uploadflbt"  enctype="multipart/form-data" >
151
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
152
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
153
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
154
-              </form>
155
-          </div>
156
-          <span id="sms_upload_msg"></span>
157
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
158
-          id="multsmsinterval" placeholder="Eg.: 1000" />
159
-       </div>
160
-   </div>
161
-
162
-   <div id="entermessage">Enter message:</div>
163
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
164
-
165
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
166
-       <div id="maxlengthinfo">
167
-           <span class="maxlengthtooltip">
168
-                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
169
-                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
170
-                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
171
-                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
172
-                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
173
-                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
174
-                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
175
-                for MMS messages is different. MMS messages can be up to 1600 characters long.
176
-           </span>
177
-       </div>
178
-   </div>
179
-
180
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
181
-   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
182
-
183
-   <div id="sendmediafl">
184
-        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
185
-   </div>
186
-
187
-   <div id="upmediafiles">
188
-
189
-       <div class="fortooltipfourth"><div id="infotipmms">i</div>
190
-          <div id="uploadmmfileinfo">
191
-             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
192
-          </div>
193
-       </div>
194
-
195
-       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
196
-
197
-          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
198
-
199
-          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
200
-          <div class="uploadfiledv">
201
-               <form class="uploadflbt"  enctype="multipart/form-data" >
202
-                     <span id="uploadFile">Upload file</span>
203
-                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
204
-                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
205
-               </form>
206
-          </div>
207
-
208
-       <span id="pf_upload_msg"></span>
209
-
210
-       <div id="filespickednc" class="filesfromnc"></div>
211
-  
212
-       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
213
-
214
-       <span id="pf_choose_msg"></span>
215
-
216
-       <p class="pickedflnm"></p>
217
-
218
-   </div>
219
-
220
-   <input type="submit" id="submitsms" value="Send SMS" />
221
-   <span id="sms_submit_msg"></span>
222
-
223
-   <div id="dirbuttons">
224
-       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
225
-       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
226
-       <button id="groupedtableshow" class="opensmsfolder">Group Messages by Number</button>
227
-   </div>
228
-
229
-
230
-   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
231
-
232
-   <div id="deleteoldsms">
233
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
234
-          <div id="deleteoldinfo">
235
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
236
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
237
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
238
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
239
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
240
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
241
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
242
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
243
-          </span>
244
-          </div>
245
-       </div>
246
-       <div id="delsetrows">
247
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
248
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
249
-          <span id="sms_deleterecmsg"></span><br><br>
250
-
251
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
252
-          <span class="deletesmsolder"> days.</span>
253
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
254
-          <span id="sms_deletesentmsg"></span>
255
-       </div>
256
-   </div>
257
-
258
-</div>
Browse code

added files to implement pop-up windows, etc.

DoubleBastionAdmin authored on 20/05/2023 01:06:57
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,258 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">see balance</option>
40
+            </select>           
41
+            <span id="currentbalance"></span>
42
+            <div class="tooltipbalanceid">
43
+                <div id="infobalance">i</div>
44
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
45
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
46
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
47
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
48
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
49
+                      rel="noreferrer noopener">here</a>.
50
+                </span>
51
+            </div>
52
+       </div>
53
+
54
+       <div id="smsnumbersdiv" class="cllridcls">
55
+            <div id="pickid">Set ID:</div>
56
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
+                  <option value='' class="optselectsmsnb" selected disabled hidden>getting numbers ...</option>
58
+            </select>
59
+            <div class="tooltipsetid">
60
+                <div id="infotipid">i</div>
61
+                <div id="setcalleridtp">
62
+                    <span class="calleridtooltip">If you see more than one phone number in the drop-down list, select a number or an alphanumeric ID as Sender ID. The Sender ID is 
63
+                        the 'From' field that is displayed on the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. To 
64
+                        choose an alphanumeric sequence as Sender ID, it must be first saved in 'Administration settings' > 'Administration' > 'SMS Relentless' > 'Telnyx/Plivo/Twilio 
65
+                        alphanumeric Sender ID' field. 
66
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
67
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
68
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
69
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
70
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
71
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
72
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
73
+                        associated with that phone number.
74
+                    </span>
75
+                </div>
76
+            </div>
77
+       </div>
78
+
79
+       <div  class="srheader">
80
+            Enter the recipient's number as:
81
+       </div>
82
+       <div class="smsnbformat">
83
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
84
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
85
+       </div>
86
+       <div class="fortooltip"><font class="texttooltip">i</font>
87
+         <div id="tonmbrformat">
88
+            <span class="fortooltiptext">
89
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
90
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
91
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
92
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
93
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
94
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
95
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
96
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
97
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
98
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
99
+            </span>
100
+         </div>
101
+       </div>
102
+
103
+   <div id="smstodiv">
104
+       <input type="text" id="smsto" name="smsto" />
105
+   </div>
106
+
107
+   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
108
+
109
+   <div id="multiplerecivers">
110
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
111
+          <div id="uploadfileinfo">
112
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
113
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
114
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
115
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
116
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
117
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
118
+              Canadian long code numbers (10 digit numbers) is 
119
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
120
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
121
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
122
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
123
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
124
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
125
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
126
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
127
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
128
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
129
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
130
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
131
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
132
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
133
+              campaign via
134
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
135
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
136
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
137
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
138
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
139
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
140
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
141
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
142
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
143
+              in the text box from below.
144
+          </span>
145
+          </div>
146
+       </div>
147
+       <div id="multsetrows">
148
+          <div id="fileuploadednm" class="fileuploadstl"></div>
149
+          <div class="uploadfiledv">
150
+              <form class="uploadflbt"  enctype="multipart/form-data" >
151
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
152
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
153
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
154
+              </form>
155
+          </div>
156
+          <span id="sms_upload_msg"></span>
157
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
158
+          id="multsmsinterval" placeholder="Eg.: 1000" />
159
+       </div>
160
+   </div>
161
+
162
+   <div id="entermessage">Enter message:</div>
163
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
164
+
165
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
166
+       <div id="maxlengthinfo">
167
+           <span class="maxlengthtooltip">
168
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
169
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
170
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
171
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
172
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
173
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
174
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
175
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
176
+           </span>
177
+       </div>
178
+   </div>
179
+
180
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
181
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
182
+
183
+   <div id="sendmediafl">
184
+        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
185
+   </div>
186
+
187
+   <div id="upmediafiles">
188
+
189
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
190
+          <div id="uploadmmfileinfo">
191
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
192
+          </div>
193
+       </div>
194
+
195
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
196
+
197
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
198
+
199
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
200
+          <div class="uploadfiledv">
201
+               <form class="uploadflbt"  enctype="multipart/form-data" >
202
+                     <span id="uploadFile">Upload file</span>
203
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
204
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
205
+               </form>
206
+          </div>
207
+
208
+       <span id="pf_upload_msg"></span>
209
+
210
+       <div id="filespickednc" class="filesfromnc"></div>
211
+  
212
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
213
+
214
+       <span id="pf_choose_msg"></span>
215
+
216
+       <p class="pickedflnm"></p>
217
+
218
+   </div>
219
+
220
+   <input type="submit" id="submitsms" value="Send SMS" />
221
+   <span id="sms_submit_msg"></span>
222
+
223
+   <div id="dirbuttons">
224
+       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
225
+       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
226
+       <button id="groupedtableshow" class="opensmsfolder">Group Messages by Number</button>
227
+   </div>
228
+
229
+
230
+   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
231
+
232
+   <div id="deleteoldsms">
233
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
234
+          <div id="deleteoldinfo">
235
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
236
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
237
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
238
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
239
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
240
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
241
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
242
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
243
+          </span>
244
+          </div>
245
+       </div>
246
+       <div id="delsetrows">
247
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
248
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
249
+          <span id="sms_deleterecmsg"></span><br><br>
250
+
251
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
252
+          <span class="deletesmsolder"> days.</span>
253
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
254
+          <span id="sms_deletesentmsg"></span>
255
+       </div>
256
+   </div>
257
+
258
+</div>
Browse code

removed files to implement auto-reply fix, etc.

DoubleBastionAdmin authored on 20/05/2023 00:46:30
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,262 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
-                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
-                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
-                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
-                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
-            </select>           
45
-            <span id="currentbalance"></span>
46
-            <div class="tooltipbalanceid">
47
-                <div id="infobalance">i</div>
48
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
-                      rel="noreferrer noopener">here</a>.
54
-                </span>
55
-            </div>
56
-       </div>
57
-
58
-       <div id="smsnumbersdiv" class="cllridcls">
59
-            <div id="pickid">Set ID:</div>
60
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
-                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
-            </select>
63
-            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
-            <div class="tooltipsetid">
65
-                <div id="infotipid">i</div>
66
-                <div id="setcalleridtp">
67
-                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
-                        the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
-                        your numbers, or an alphanumeric sequence that you have entered in Personal settings > SMS Relentless > 'Telnyx/Plivo/Twilio alphanumeric Sender ID' field. 
70
-                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
-                        associated with that phone number.
78
-                    </span>
79
-                </div>
80
-            </div>
81
-       </div>
82
-
83
-       <div  class="srheader">
84
-            Enter the recipient's number as:
85
-       </div>
86
-       <div class="smsnbformat">
87
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
88
-               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
89
-       </div>
90
-       <div class="fortooltip"><font class="texttooltip">i</font>
91
-         <div id="tonmbrformat">
92
-            <span class="fortooltiptext">
93
-               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
94
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
95
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
96
-               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
97
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
-               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
103
-            </span>
104
-         </div>
105
-       </div>
106
-
107
-   <div id="smstodiv">
108
-       <input type="text" id="smsto" name="smsto" />
109
-   </div>
110
-
111
-   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
112
-
113
-   <div id="multiplerecivers">
114
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
115
-          <div id="uploadfileinfo">
116
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
117
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
118
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
119
-              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
120
-              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
121
-              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
122
-              Canadian long code numbers (10 digit numbers) is 
123
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
124
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
125
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
126
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
127
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
128
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
129
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
130
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
131
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
132
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
133
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
134
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
135
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
136
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
137
-              campaign via
138
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
139
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
140
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
141
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
142
-              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
143
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
144
-              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
145
-              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
146
-              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
147
-              in the text box from below.
148
-          </span>
149
-          </div>
150
-       </div>
151
-       <div id="multsetrows">
152
-          <div id="fileuploadednm" class="fileuploadstl"></div>
153
-          <div class="uploadfiledv">
154
-              <form class="uploadflbt"  enctype="multipart/form-data" >
155
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
156
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
157
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
158
-              </form>
159
-          </div>
160
-          <span id="sms_upload_msg"></span>
161
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
162
-          id="multsmsinterval" placeholder="Eg.: 1000" />
163
-       </div>
164
-   </div>
165
-
166
-   <div id="entermessage">Enter message:</div>
167
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
168
-
169
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
170
-       <div id="maxlengthinfo">
171
-           <span class="maxlengthtooltip">
172
-                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
173
-                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
174
-                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
175
-                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
176
-                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
177
-                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
178
-                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
179
-                for MMS messages is different. MMS messages can be up to 1600 characters long.
180
-           </span>
181
-       </div>
182
-   </div>
183
-
184
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
185
-   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
186
-
187
-   <div id="sendmediafl">
188
-        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
189
-   </div>
190
-
191
-   <div id="upmediafiles">
192
-
193
-       <div class="fortooltipfourth"><div id="infotipmms">i</div>
194
-          <div id="uploadmmfileinfo">
195
-             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
196
-          </div>
197
-       </div>
198
-
199
-       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
200
-
201
-          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
202
-
203
-          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
204
-          <div class="uploadfiledv">
205
-               <form class="uploadflbt"  enctype="multipart/form-data" >
206
-                     <span id="uploadFile">Upload file</span>
207
-                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
208
-                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
209
-               </form>
210
-          </div>
211
-
212
-       <span id="pf_upload_msg"></span>
213
-
214
-       <div id="filespickednc" class="filesfromnc"></div>
215
-  
216
-       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
217
-
218
-       <span id="pf_choose_msg"></span>
219
-
220
-       <p class="pickedflnm"></p>
221
-
222
-   </div>
223
-
224
-   <input type="submit" id="submitsms" value="Send SMS" />
225
-   <span id="sms_submit_msg"></span>
226
-
227
-   <div id="dirbuttons">
228
-       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
229
-       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
230
-       <button id="groupedtableshow" class="opensmsfolder">Group Messages by Number</button>
231
-   </div>
232
-
233
-
234
-   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
235
-
236
-   <div id="deleteoldsms">
237
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
238
-          <div id="deleteoldinfo">
239
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
240
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
241
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
242
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
243
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
244
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
245
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
246
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
247
-          </span>
248
-          </div>
249
-       </div>
250
-       <div id="delsetrows">
251
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
252
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
253
-          <span id="sms_deleterecmsg"></span><br><br>
254
-
255
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
256
-          <span class="deletesmsolder"> days.</span>
257
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
258
-          <span id="sms_deletesentmsg"></span>
259
-       </div>
260
-   </div>
261
-
262
-</div>
Browse code

added changes for origination, auto-reply, etc.

DoubleBastionAdmin authored on 08/05/2023 20:50:18
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,262 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
+                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
+                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
+                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
+                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
+            </select>           
45
+            <span id="currentbalance"></span>
46
+            <div class="tooltipbalanceid">
47
+                <div id="infobalance">i</div>
48
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
+                      rel="noreferrer noopener">here</a>.
54
+                </span>
55
+            </div>
56
+       </div>
57
+
58
+       <div id="smsnumbersdiv" class="cllridcls">
59
+            <div id="pickid">Set ID:</div>
60
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
+                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
+            </select>
63
+            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
+            <div class="tooltipsetid">
65
+                <div id="infotipid">i</div>
66
+                <div id="setcalleridtp">
67
+                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
+                        the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
+                        your numbers, or an alphanumeric sequence that you have entered in Personal settings > SMS Relentless > 'Telnyx/Plivo/Twilio alphanumeric Sender ID' field. 
70
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
+                        associated with that phone number.
78
+                    </span>
79
+                </div>
80
+            </div>
81
+       </div>
82
+
83
+       <div  class="srheader">
84
+            Enter the recipient's number as:
85
+       </div>
86
+       <div class="smsnbformat">
87
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order" style="color:#1b60ba"
88
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
89
+       </div>
90
+       <div class="fortooltip"><font class="texttooltip">i</font>
91
+         <div id="tonmbrformat">
92
+            <span class="fortooltiptext">
93
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
94
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_order"
95
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
96
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
97
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
103
+            </span>
104
+         </div>
105
+       </div>
106
+
107
+   <div id="smstodiv">
108
+       <input type="text" id="smsto" name="smsto" />
109
+   </div>
110
+
111
+   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
112
+
113
+   <div id="multiplerecivers">
114
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
115
+          <div id="uploadfileinfo">
116
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
117
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
118
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
119
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
120
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
121
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
122
+              Canadian long code numbers (10 digit numbers) is 
123
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
124
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
125
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
126
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
127
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
128
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
129
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
130
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
131
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
132
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
133
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
134
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
135
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
136
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
137
+              campaign via
138
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
139
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
140
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
141
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
142
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
143
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
144
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
145
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
146
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
147
+              in the text box from below.
148
+          </span>
149
+          </div>
150
+       </div>
151
+       <div id="multsetrows">
152
+          <div id="fileuploadednm" class="fileuploadstl"></div>
153
+          <div class="uploadfiledv">
154
+              <form class="uploadflbt"  enctype="multipart/form-data" >
155
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
156
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
157
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
158
+              </form>
159
+          </div>
160
+          <span id="sms_upload_msg"></span>
161
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
162
+          id="multsmsinterval" placeholder="Eg.: 1000" />
163
+       </div>
164
+   </div>
165
+
166
+   <div id="entermessage">Enter message:</div>
167
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
168
+
169
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
170
+       <div id="maxlengthinfo">
171
+           <span class="maxlengthtooltip">
172
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
173
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
174
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
175
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
176
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
177
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
178
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
179
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
180
+           </span>
181
+       </div>
182
+   </div>
183
+
184
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
185
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
186
+
187
+   <div id="sendmediafl">
188
+        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
189
+   </div>
190
+
191
+   <div id="upmediafiles">
192
+
193
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
194
+          <div id="uploadmmfileinfo">
195
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
196
+          </div>
197
+       </div>
198
+
199
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
200
+
201
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
202
+
203
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
204
+          <div class="uploadfiledv">
205
+               <form class="uploadflbt"  enctype="multipart/form-data" >
206
+                     <span id="uploadFile">Upload file</span>
207
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
208
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
209
+               </form>
210
+          </div>
211
+
212
+       <span id="pf_upload_msg"></span>
213
+
214
+       <div id="filespickednc" class="filesfromnc"></div>
215
+  
216
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
217
+
218
+       <span id="pf_choose_msg"></span>
219
+
220
+       <p class="pickedflnm"></p>
221
+
222
+   </div>
223
+
224
+   <input type="submit" id="submitsms" value="Send SMS" />
225
+   <span id="sms_submit_msg"></span>
226
+
227
+   <div id="dirbuttons">
228
+       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
229
+       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
230
+       <button id="groupedtableshow" class="opensmsfolder">Group Messages by Number</button>
231
+   </div>
232
+
233
+
234
+   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
235
+
236
+   <div id="deleteoldsms">
237
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
238
+          <div id="deleteoldinfo">
239
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
240
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
241
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
242
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
243
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
244
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
245
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
246
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
247
+          </span>
248
+          </div>
249
+       </div>
250
+       <div id="delsetrows">
251
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
252
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
253
+          <span id="sms_deleterecmsg"></span><br><br>
254
+
255
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
256
+          <span class="deletesmsolder"> days.</span>
257
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
258
+          <span id="sms_deletesentmsg"></span>
259
+       </div>
260
+   </div>
261
+
262
+</div>
Browse code

removed a substantial number of files

DoubleBastionAdmin authored on 08/05/2023 20:27:04
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,261 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
-                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
-                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
-                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
-                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
-            </select>           
45
-            <span id="currentbalance"></span>
46
-            <div class="tooltipbalanceid">
47
-                <div id="infobalance">i</div>
48
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
-                      rel="noreferrer noopener">here</a>.
54
-                </span>
55
-            </div>
56
-       </div>
57
-
58
-       <div id="smsnumbersdiv" class="cllridcls">
59
-            <div id="pickid">Set ID:</div>
60
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
-                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
-            </select>
63
-            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
-            <div class="tooltipsetid">
65
-                <div id="infotipid">i</div>
66
-                <div id="setcalleridtp">
67
-                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
-                        the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
-                        your numbers, or an alphanumeric sequence that you have entered in Personal settings > SMS Relentless > 'Telnyx/Plivo/Twilio alphanumeric Sender ID' field. 
70
-                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
-                        associated with that phone number.
78
-                    </span>
79
-                </div>
80
-            </div>
81
-       </div>
82
-
83
-       <div  class="srheader">
84
-            Enter the recipient's number as:
85
-       </div>
86
-       <div class="smsnbformat">
87
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
88
-               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
89
-       </div>
90
-       <div class="fortooltip"><font class="texttooltip">i</font>
91
-         <div id="tonmbrformat">
92
-            <span class="fortooltiptext">
93
-               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
94
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
95
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
96
-               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
97
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
-               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
103
-            </span>
104
-         </div>
105
-       </div>
106
-
107
-   <div id="smstodiv">
108
-       <input type="text" id="smsto" name="smsto" />
109
-   </div>
110
-
111
-   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
112
-
113
-   <div id="multiplerecivers">
114
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
115
-          <div id="uploadfileinfo">
116
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
117
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
118
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
119
-              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
120
-              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
121
-              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
122
-              Canadian long code numbers (10 digit numbers) is 
123
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
124
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
125
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
126
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
127
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
128
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
129
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
130
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
131
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
132
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
133
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
134
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
135
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
136
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
137
-              campaign via
138
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
139
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
140
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
141
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
142
-              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
143
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
144
-              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
145
-              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
146
-              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
147
-              in the text box from below.
148
-          </span>
149
-          </div>
150
-       </div>
151
-       <div id="multsetrows">
152
-          <div id="fileuploadednm" class="fileuploadstl"></div>
153
-          <div class="uploadfiledv">
154
-              <form class="uploadflbt"  enctype="multipart/form-data" >
155
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
156
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
157
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
158
-              </form>
159
-          </div>
160
-          <span id="sms_upload_msg"></span>
161
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
162
-          id="multsmsinterval" placeholder="Eg.: 1000" />
163
-       </div>
164
-   </div>
165
-
166
-   <div id="entermessage">Enter message:</div>
167
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
168
-
169
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
170
-       <div id="maxlengthinfo">
171
-           <span class="maxlengthtooltip">
172
-                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
173
-                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
174
-                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
175
-                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
176
-                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
177
-                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
178
-                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
179
-                for MMS messages is different. MMS messages can be up to 1600 characters long.
180
-           </span>
181
-       </div>
182
-   </div>
183
-
184
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
185
-   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
186
-
187
-   <div id="sendmediafl">
188
-        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
189
-   </div>
190
-
191
-   <div id="upmediafiles">
192
-
193
-       <div class="fortooltipfourth"><div id="infotipmms">i</div>
194
-          <div id="uploadmmfileinfo">
195
-             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
196
-          </div>
197
-       </div>
198
-
199
-       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
200
-
201
-          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
202
-
203
-          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
204
-          <div class="uploadfiledv">
205
-               <form class="uploadflbt"  enctype="multipart/form-data" >
206
-                     <span id="uploadFile">Upload file</span>
207
-                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
208
-                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
209
-               </form>
210
-          </div>
211
-
212
-       <span id="pf_upload_msg"></span>
213
-
214
-       <div id="filespickednc" class="filesfromnc"></div>
215
-  
216
-       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
217
-
218
-       <span id="pf_choose_msg"></span>
219
-
220
-       <p class="pickedflnm"></p>
221
-
222
-   </div>
223
-
224
-   <input type="submit" id="submitsms" value="Send SMS" />
225
-   <span id="sms_submit_msg"></span>
226
-
227
-   <div id="dirbuttons">
228
-       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
229
-       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
230
-   </div>
231
-
232
-
233
-   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
234
-
235
-   <div id="deleteoldsms">
236
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
237
-          <div id="deleteoldinfo">
238
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
239
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
240
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
241
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
242
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
243
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
244
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
245
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
246
-          </span>
247
-          </div>
248
-       </div>
249
-       <div id="delsetrows">
250
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
251
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
252
-          <span id="sms_deleterecmsg"></span><br><br>
253
-
254
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
255
-          <span class="deletesmsolder"> days.</span>
256
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
257
-          <span id="sms_deletesentmsg"></span>
258
-       </div>
259
-   </div>
260
-
261
-</div>
Browse code

added appinfo/info.xml appinfo/signature.json Contributors.txt CHANGELOG.txt lib/Settings/Personal.php templates/navigation/index.php css/style.css js/arrowup.js js/showsmstables.js

DoubleBastionAdmin authored on 27/10/2022 17:45:55
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,261 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
+                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
+                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
+                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
+                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
+            </select>           
45
+            <span id="currentbalance"></span>
46
+            <div class="tooltipbalanceid">
47
+                <div id="infobalance">i</div>
48
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
+                      rel="noreferrer noopener">here</a>.
54
+                </span>
55
+            </div>
56
+       </div>
57
+
58
+       <div id="smsnumbersdiv" class="cllridcls">
59
+            <div id="pickid">Set ID:</div>
60
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
+                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
+            </select>
63
+            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
+            <div class="tooltipsetid">
65
+                <div id="infotipid">i</div>
66
+                <div id="setcalleridtp">
67
+                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
+                        the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
+                        your numbers, or an alphanumeric sequence that you have entered in Personal settings > SMS Relentless > 'Telnyx/Plivo/Twilio alphanumeric Sender ID' field. 
70
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
+                        associated with that phone number.
78
+                    </span>
79
+                </div>
80
+            </div>
81
+       </div>
82
+
83
+       <div  class="srheader">
84
+            Enter the recipient's number as:
85
+       </div>
86
+       <div class="smsnbformat">
87
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
88
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
89
+       </div>
90
+       <div class="fortooltip"><font class="texttooltip">i</font>
91
+         <div id="tonmbrformat">
92
+            <span class="fortooltiptext">
93
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
94
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
95
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
96
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
97
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
103
+            </span>
104
+         </div>
105
+       </div>
106
+
107
+   <div id="smstodiv">
108
+       <input type="text" id="smsto" name="smsto" />
109
+   </div>
110
+
111
+   <div id="sendtomultiple">Upload file with phone numbers:</div><input type="checkbox" id="tomultchckbx" />
112
+
113
+   <div id="multiplerecivers">
114
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
115
+          <div id="uploadfileinfo">
116
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
117
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
118
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
119
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
120
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
121
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
122
+              Canadian long code numbers (10 digit numbers) is 
123
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
124
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
125
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
126
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
127
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
128
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
129
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
130
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
131
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
132
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
133
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
134
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
135
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
136
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
137
+              campaign via
138
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
139
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
140
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
141
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
142
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
143
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
144
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
145
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
146
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
147
+              in the text box from below.
148
+          </span>
149
+          </div>
150
+       </div>
151
+       <div id="multsetrows">
152
+          <div id="fileuploadednm" class="fileuploadstl"></div>
153
+          <div class="uploadfiledv">
154
+              <form class="uploadflbt"  enctype="multipart/form-data" >
155
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
156
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
157
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
158
+              </form>
159
+          </div>
160
+          <span id="sms_upload_msg"></span>
161
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
162
+          id="multsmsinterval" placeholder="Eg.: 1000" />
163
+       </div>
164
+   </div>
165
+
166
+   <div id="entermessage">Enter message:</div>
167
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
168
+
169
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
170
+       <div id="maxlengthinfo">
171
+           <span class="maxlengthtooltip">
172
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
173
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
174
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
175
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
176
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
177
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
178
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
179
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
180
+           </span>
181
+       </div>
182
+   </div>
183
+
184
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
185
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
186
+
187
+   <div id="sendmediafl">
188
+        <span>Select file(s) to send as MMS:</span><input type="checkbox" id="mediafilechckbx" />
189
+   </div>
190
+
191
+   <div id="upmediafiles">
192
+
193
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
194
+          <div id="uploadmmfileinfo">
195
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
196
+          </div>
197
+       </div>
198
+
199
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
200
+
201
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
202
+
203
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
204
+          <div class="uploadfiledv">
205
+               <form class="uploadflbt"  enctype="multipart/form-data" >
206
+                     <span id="uploadFile">Upload file</span>
207
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
208
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
209
+               </form>
210
+          </div>
211
+
212
+       <span id="pf_upload_msg"></span>
213
+
214
+       <div id="filespickednc" class="filesfromnc"></div>
215
+  
216
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
217
+
218
+       <span id="pf_choose_msg"></span>
219
+
220
+       <p class="pickedflnm"></p>
221
+
222
+   </div>
223
+
224
+   <input type="submit" id="submitsms" value="Send SMS" />
225
+   <span id="sms_submit_msg"></span>
226
+
227
+   <div id="dirbuttons">
228
+       <button id="receivedsmstableshow" class="opensmsfolder">Received SMS Messages</button>
229
+       <button id="sentsmstableshow" class="opensmsfolder">Sent SMS Messages</button>
230
+   </div>
231
+
232
+
233
+   <div id="deleteoldmssgs">Remove old messages:</div><input type="checkbox" id="deleteoldchckbox" />
234
+
235
+   <div id="deleteoldsms">
236
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
237
+          <div id="deleteoldinfo">
238
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
239
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
240
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
241
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
242
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
243
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
244
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
245
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
246
+          </span>
247
+          </div>
248
+       </div>
249
+       <div id="delsetrows">
250
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
251
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
252
+          <span id="sms_deleterecmsg"></span><br><br>
253
+
254
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
255
+          <span class="deletesmsolder"> days.</span>
256
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
257
+          <span id="sms_deletesentmsg"></span>
258
+       </div>
259
+   </div>
260
+
261
+</div>
Browse code

removed appinfo/info.xml appinfo/signature.json Contributors.txt CHANGELOG.txt lib/Settings/Personal.php templates/navigation/index.php css/style.css js/arrowup.js js/showsmstables.js

DoubleBastionAdmin authored on 27/10/2022 17:41:14
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,274 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
-                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
-                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
-                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
-                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
-            </select>           
45
-            <span id="currentbalance"></span>
46
-            <div class="tooltipbalanceid">
47
-                <div id="infobalance">i</div>
48
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
-                      rel="noreferrer noopener">here</a>.
54
-                </span>
55
-            </div>
56
-       </div>
57
-
58
-       <div id="smsnumbersdiv" class="cllridcls">
59
-            <div id="pickid">Set ID:</div>
60
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
-                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
-            </select>
63
-            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
-            <div class="tooltipsetid">
65
-                <div id="infotipid">i</div>
66
-                <div id="setcalleridtp">
67
-                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
-                        the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
-                        your numbers, or an alphanumeric sequence that you have entered in Settings > SMS Relentless > 'Telnyx/Plivo/Twilio/Flowroute alphanumeric Sender ID' field. 
70
-                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
-                        associated with that phone number.
78
-                    </span>
79
-                </div>
80
-            </div>
81
-       </div>
82
-
83
-       <div  class="srheader">
84
-            Enter the recipient's number as:
85
-       </div>
86
-       <div class="smsnbformat">
87
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
88
-               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
89
-       </div>
90
-       <div class="fortooltip"><font class="texttooltip">i</font>
91
-         <div id="tonmbrformat">
92
-            <span class="fortooltiptext">
93
-               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
94
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
95
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
96
-               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
97
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
-               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
103
-            </span>
104
-         </div>
105
-       </div>
106
-
107
-   <div id="smstodiv">
108
-       <input type="text" id="smsto" name="smsto" />
109
-   </div>
110
-
111
-   <div id="sendtomultiple">
112
-      Upload file with phone numbers:
113
-   </div>
114
-
115
-   <div id="tomultiplechck">
116
-      <input type="checkbox" id="tomultchckbx"/>
117
-   </div>
118
-
119
-   <div id="multiplerecivers">
120
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
121
-          <div id="uploadfileinfo">
122
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
123
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
124
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
125
-              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
126
-              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
127
-              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
128
-              Canadian long code numbers (10 digit numbers) is 
129
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
130
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
131
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
132
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
133
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
134
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
135
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
136
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
137
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
138
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
139
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
140
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
141
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
142
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
143
-              campaign via
144
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
145
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
146
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
147
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
148
-              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
149
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
150
-              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
151
-              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
152
-              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
153
-              in the text box from below.
154
-          </span>
155
-          </div>
156
-       </div>
157
-       <div id="multsetrows">
158
-          <div id="fileuploadednm" class="fileuploadstl"></div>
159
-          <div class="uploadfiledv">
160
-              <form class="uploadflbt"  enctype="multipart/form-data" >
161
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
162
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
163
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
164
-              </form>
165
-          </div>
166
-          <span id="sms_upload_msg"></span>
167
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
168
-          id="multsmsinterval" placeholder="Eg.: 1000" />
169
-       </div>
170
-   </div>
171
-
172
-   <div id="entermessage">Enter message:</div>
173
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
174
-
175
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
176
-       <div id="maxlengthinfo">
177
-           <span class="maxlengthtooltip">
178
-                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
179
-                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
180
-                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
181
-                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
182
-                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
183
-                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
184
-                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
185
-                for MMS messages is different. MMS messages can be up to 1600 characters long.
186
-           </span>
187
-       </div>
188
-   </div>
189
-
190
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
191
-   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
192
-
193
-   <div id="sendmediafl">
194
-        <span>Select file(s) to send as MMS:</span>
195
-        <input type="checkbox" id="mediafilechckbx"/>
196
-   </div>
197
-
198
-   <div id="upmediafiles">
199
-
200
-       <div class="fortooltipfourth"><div id="infotipmms">i</div>
201
-          <div id="uploadmmfileinfo">
202
-             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
203
-          </div>
204
-       </div>
205
-
206
-       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
207
-
208
-          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
209
-
210
-          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
211
-          <div class="uploadfiledv">
212
-               <form class="uploadflbt"  enctype="multipart/form-data" >
213
-                     <span id="uploadFile">Upload file</span>
214
-                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
215
-                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
216
-               </form>
217
-          </div>
218
-
219
-       <span id="pf_upload_msg"></span>
220
-
221
-       <div id="filespickednc" class="filesfromnc"></div>
222
-  
223
-       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
224
-
225
-       <span id="pf_choose_msg"></span>
226
-
227
-       <p class="pickedflnm"></p>
228
-
229
-   </div>
230
-
231
-   <input type="submit" id="submitsms" value="Send SMS" />
232
-   <span id="sms_submit_msg"></span>
233
-
234
-   <div id="dirbuttons">
235
-       <button id="receivedsmstable" class="opensmsfolder">Received SMS Messages</button>
236
-       <button id="sentsmstable" class="opensmsfolder">Sent SMS Messages</button>
237
-   </div>
238
-
239
-
240
-   <div id="deleteoldmssgs">
241
-      Remove old messages:
242
-   </div>
243
-
244
-   <div id="deleteoldchck">
245
-      <input type="checkbox" id="deleteoldchckbox" />
246
-   </div>
247
-
248
-   <div id="deleteoldsms">
249
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
250
-          <div id="deleteoldinfo">
251
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
252
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
253
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
254
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
255
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
256
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
257
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
258
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
259
-          </span>
260
-          </div>
261
-       </div>
262
-       <div id="delsetrows">
263
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
264
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
265
-          <span id="sms_deleterecmsg"></span><br><br>
266
-
267
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
268
-          <span class="deletesmsolder"> days.</span>
269
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
270
-          <span id="sms_deletesentmsg"></span>
271
-       </div>
272
-   </div>
273
-
274
-</div>
Browse code

added README.md CHANGELOG.txt appinfo/info.xml appinfo/routes.php appinfo/signature.json css/style.css js/settings.js js/sendsms.js js/showsmstables.js lib/Controller/AuthorApiController.php lib/Controller/SmsrelentlessController.php templates/navigation/index.php templates/content/index.php templates/settings.php js/tiff.min.js img/nextcloud_logo.svg img/nextcloud_logo_bright.svg img/sms_relentless_mms_sending.png

DoubleBastionAdmin authored on 02/09/2022 23:19:37
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,274 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
+                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
+                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
+                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
+                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
+            </select>           
45
+            <span id="currentbalance"></span>
46
+            <div class="tooltipbalanceid">
47
+                <div id="infobalance">i</div>
48
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
+                      rel="noreferrer noopener">here</a>.
54
+                </span>
55
+            </div>
56
+       </div>
57
+
58
+       <div id="smsnumbersdiv" class="cllridcls">
59
+            <div id="pickid">Set ID:</div>
60
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
+                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
+            </select>
63
+            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
+            <div class="tooltipsetid">
65
+                <div id="infotipid">i</div>
66
+                <div id="setcalleridtp">
67
+                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
+                        the phone of the receiver, when they receive your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
+                        your numbers, or an alphanumeric sequence that you have entered in Settings > SMS Relentless > 'Telnyx/Plivo/Twilio/Flowroute alphanumeric Sender ID' field. 
70
+                        <font style="color:#aa2e4b">There are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
+                        associated with that phone number.
78
+                    </span>
79
+                </div>
80
+            </div>
81
+       </div>
82
+
83
+       <div  class="srheader">
84
+            Enter the recipient's number as:
85
+       </div>
86
+       <div class="smsnbformat">
87
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
88
+               target="_blank" rel="noreferrer noopener">CountryCallingCode</a><font style="color:#aa2e4b">PhoneNumber</font>
89
+       </div>
90
+       <div class="fortooltip"><font class="texttooltip">i</font>
91
+         <div id="tonmbrformat">
92
+            <span class="fortooltiptext">
93
+               For example, to send an SMS to the German number 1212121212, enter 491212121212, where 49 is the country calling code of Germany. The
94
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
95
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. You don't need to add 
96
+               the '+' sign or '00' in front of the number. <font style="color:#aa2e4b">In different countries there are market regulations and restrictions that
97
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
+               in the phone number field. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers.
103
+            </span>
104
+         </div>
105
+       </div>
106
+
107
+   <div id="smstodiv">
108
+       <input type="text" id="smsto" name="smsto" />
109
+   </div>
110
+
111
+   <div id="sendtomultiple">
112
+      Upload file with phone numbers:
113
+   </div>
114
+
115
+   <div id="tomultiplechck">
116
+      <input type="checkbox" id="tomultchckbx"/>
117
+   </div>
118
+
119
+   <div id="multiplerecivers">
120
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
121
+          <div id="uploadfileinfo">
122
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
123
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
124
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
125
+              After uploading the file, enter the time interval in milliseconds (1 second has 1000 milliseconds) between two consecutive message sending requests,
126
+              in the text box from below. It's important to note that SMS providers impose restrictions upon the message sending rate and there are also country specific and 
127
+              carrier specific restrictions regarding the frequency of outgoing/incoming messages. For Telnyx, the allowed SMS sending rate for US or 
128
+              Canadian long code numbers (10 digit numbers) is 
129
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
130
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
131
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
132
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
133
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
134
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
135
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
136
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
137
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
138
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
139
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
140
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
141
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
142
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
143
+              campaign via
144
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
145
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
146
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
147
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
148
+              Registered campaigns also benefit from a much higher message sending rate, which differs from one use case to another. If you leave the text box from below empty, the 
149
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
150
+              surpass the limit of 1 message per 6 seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute,
151
+              Telnyx/Plivo/Twilio/Flowroute respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large 
152
+              number of messages, when the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate 
153
+              in the text box from below.
154
+          </span>
155
+          </div>
156
+       </div>
157
+       <div id="multsetrows">
158
+          <div id="fileuploadednm" class="fileuploadstl"></div>
159
+          <div class="uploadfiledv">
160
+              <form class="uploadflbt"  enctype="multipart/form-data" >
161
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
162
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
163
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
164
+              </form>
165
+          </div>
166
+          <span id="sms_upload_msg"></span>
167
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
168
+          id="multsmsinterval" placeholder="Eg.: 1000" />
169
+       </div>
170
+   </div>
171
+
172
+   <div id="entermessage">Enter message:</div>
173
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
174
+
175
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
176
+       <div id="maxlengthinfo">
177
+           <span class="maxlengthtooltip">
178
+                The maximum length allowed for SMS messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
179
+                while for Unicode encoded messages is 70 characters. If you send an SMS message longer than 160 characters for standard GSM encoding or longer than 70 
180
+                characters for Unicode encoding, the message will be sent as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute 
181
+                and it will be reassembled as one message at its destination. However, you will be charged for each piece as for a separate SMS. Thus, if the initial message 
182
+                is 385 GSM encoded characters in length, you will be charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller 
183
+                than the standard 160 for GSM encoded characters and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet 
184
+                table (like "£" or "€") will count as two characters, therefore, not always 160 characters will fit into a single GSM encoded SMS message. The maximum length 
185
+                for MMS messages is different. MMS messages can be up to 1600 characters long.
186
+           </span>
187
+       </div>
188
+   </div>
189
+
190
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
191
+   <div id="mtextSize"><span id="textsizeinkb"></span><span> KB</span></div>
192
+
193
+   <div id="sendmediafl">
194
+        <span>Select file(s) to send as MMS:</span>
195
+        <input type="checkbox" id="mediafilechckbx"/>
196
+   </div>
197
+
198
+   <div id="upmediafiles">
199
+
200
+       <div class="fortooltipfourth"><div id="infotipmms">i</div>
201
+          <div id="uploadmmfileinfo">
202
+             <span id="tooltiptextfourth">To send an MMS message, you can upload media files or pick them from Nextcloud.</span>
203
+          </div>
204
+       </div>
205
+
206
+       <div class="srheaderch">Choose the file(s) that you want to send as MMS:</div>
207
+
208
+          <div id="filestotsize">Total files size:<span id="filessizetext"></span> KB</div>
209
+
210
+          <div id="mmsfileuploadednm" class="fileuploadstl"></div>
211
+          <div class="uploadfiledv">
212
+               <form class="uploadflbt"  enctype="multipart/form-data" >
213
+                     <span id="uploadFile">Upload file</span>
214
+                     <input id="uploadfileformms" class="fileupload" name="uploadedtomms[]" type="file" multiple />
215
+                     <label for="uploadfileformms" class="button icon-upload svg" id="uploadfileformms" </label>
216
+               </form>
217
+          </div>
218
+
219
+       <span id="pf_upload_msg"></span>
220
+
221
+       <div id="filespickednc" class="filesfromnc"></div>
222
+  
223
+       <div id="pickfilesNext"><span id="pickFromNext">Pick from Nextcloud</span><button id="choosefilen"></button></div>
224
+
225
+       <span id="pf_choose_msg"></span>
226
+
227
+       <p class="pickedflnm"></p>
228
+
229
+   </div>
230
+
231
+   <input type="submit" id="submitsms" value="Send SMS" />
232
+   <span id="sms_submit_msg"></span>
233
+
234
+   <div id="dirbuttons">
235
+       <button id="receivedsmstable" class="opensmsfolder">Received SMS Messages</button>
236
+       <button id="sentsmstable" class="opensmsfolder">Sent SMS Messages</button>
237
+   </div>
238
+
239
+
240
+   <div id="deleteoldmssgs">
241
+      Remove old messages:
242
+   </div>
243
+
244
+   <div id="deleteoldchck">
245
+      <input type="checkbox" id="deleteoldchckbox" />
246
+   </div>
247
+
248
+   <div id="deleteoldsms">
249
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
250
+          <div id="deleteoldinfo">
251
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
252
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
253
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
254
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
255
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
256
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
257
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
258
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
259
+          </span>
260
+          </div>
261
+       </div>
262
+       <div id="delsetrows">
263
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
264
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
265
+          <span id="sms_deleterecmsg"></span><br><br>
266
+
267
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
268
+          <span class="deletesmsolder"> days.</span>
269
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
270
+          <span id="sms_deletesentmsg"></span>
271
+       </div>
272
+   </div>
273
+
274
+</div>
Browse code

removed README.md CHANGELOG.txt appinfo/info.xml appinfo/routes.php appinfo/signature.json css/style.css js/settings.js js/sendsms.js js/showsmstables.js lib/Controller/AuthorApiController.php lib/Controller/SmsrelentlessController.php templates/navigation/index.php templates/content/index.php templates/settings.php

DoubleBastionAdmin authored on 02/09/2022 23:09:46
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,233 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
-                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
-                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
-                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
-                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
-            </select>           
45
-            <span id="currentbalance"></span>
46
-            <div class="tooltipbalanceid">
47
-                <div id="infobalance">i</div>
48
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
-                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
-                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
-                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
-                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
-                      rel="noreferrer noopener">here</a>.
54
-                </span>
55
-            </div>
56
-       </div>
57
-
58
-       <div id="smsnumbersdiv" class="cllridcls">
59
-            <div id="pickid">Set ID:</div>
60
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
-                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
-            </select>
63
-            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
-            <div class="tooltipsetid">
65
-                <div id="infotipid">i</div>
66
-                <div id="setcalleridtp">
67
-                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
-                        the user's phone when receiving your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
-                        your numbers, or an alphanumeric sequence that you have entered in Settings > SMS Relentless > 'Telnyx/Plivo/Twilio/Flowroute alphanumeric Sender ID' field. 
70
-                        Please note that <font style="color:#aa2e4b">there are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
-                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
-                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
-                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
-                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
-                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
-                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
-                        associated with that phone number.
78
-                    </span>
79
-                </div>
80
-            </div>
81
-       </div>
82
-
83
-       <div  class="srheader">
84
-            Enter the recipient's number as:
85
-       </div>
86
-       <div class="smsnbformat">
87
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
88
-               target="_blank" rel="noreferrer noopener">country_code</a><font style="color:#aa2e4b">phone_number</font>
89
-       </div>
90
-       <div class="fortooltip"><font class="texttooltip">i</font>
91
-         <div id="tonmbrformat">
92
-            <span class="fortooltiptext">
93
-               For example, to send an SMS to the German number 1212121212 you should enter 491212121212, where 49 is the calling code of Germany. The
94
-               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
95
-               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. Don't add the '+'
96
-               sign or '00' in front of the number. Please note that <font style="color:#aa2e4b">in different countries there are market regulations and restrictions that
97
-               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
-               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
-               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
-               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
-               in the phone number box. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
-               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers, and set up a sending rate different 
103
-               from the default 1 message per second. The info note will explain what are the sending rate restrictions that you will have to consider.
104
-            </span>
105
-         </div>
106
-       </div>
107
-
108
-   <div id="smstodiv">
109
-       <input type="text" id="smsto" name="smsto" />
110
-   </div>
111
-
112
-   <div id="sendtomultiple">
113
-      Upload file with phone numbers:
114
-   </div>
115
-
116
-   <div id="tomultiplechck">
117
-      <input type="checkbox" id="tomultchckbx"/>
118
-   </div>
119
-
120
-   <div id="multiplerecivers">
121
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
122
-          <div id="uploadfileinfo">
123
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
124
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
125
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
126
-              After uploading the file, enter the time interval (in milliseconds; 1 second has 1000 milliseconds) between two consecutive message sending requests,
127
-              in the box from below. Please note that there are country specific and carrier imposed sending rate restrictions. For Telnyx, the allowed SMS sending rate of US or 
128
-              Canadian long code numbers (10 digit numbers) is 
129
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
130
-              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
131
-              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
132
-              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
133
-              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
134
-              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
135
-              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
136
-              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
137
-              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
138
-              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
139
-              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
140
-              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
141
-              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
142
-              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
143
-              campaign via
144
-              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
145
-              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
146
-              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
147
-              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
148
-              Registered campaigns also benefit from a much higher message throughput. If you leave the box from below empty, the application will try to send all the 
149
-              messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you surpass the limit of 1 message per 6 
150
-              seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute, Telnyx/Plivo/Twilio/Flowroute 
151
-              respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large number of messages, when 
152
-              the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate in the box from below.
153
-          </span>
154
-          </div>
155
-       </div>
156
-       <div id="multsetrows">
157
-          <div id="fileuploadednm" class="fileuploadstl"></div>
158
-          <div class="uploadfiledv">
159
-              <form class="uploadflbt"  enctype="multipart/form-data" >
160
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
161
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
162
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
163
-              </form>
164
-          </div>
165
-          <span id="sms_upload_msg"></span>
166
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
167
-          id="multsmsinterval" placeholder="Eg.: 10000" />
168
-       </div>
169
-   </div>
170
-
171
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
172
-
173
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
174
-       <div id="maxlengthinfo">
175
-           <span class="maxlengthtooltip">
176
-                The maximum length allowed for messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
177
-                while for Unicode encoded messages is 70 characters (fewer in some countries).
178
-                If you send a message longer than 160 characters for standard GSM encoding or longer than 70 characters for Unicode encoding, the message will be sent
179
-                as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute and it will be reassembled as one message at its destination. 
180
-                However, you will be charged for each piece as for a separate SMS. Thus, if the initial message is 385 GSM encoded characters in length, you will be 
181
-                charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller than the standard 160 for GSM encoded characters 
182
-                and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet table (like "£" or "€") will count as two characters, 
183
-                so, not always 160 characters will fit into a single GSM encoded SMS.
184
-           </span>
185
-       </div>
186
-   </div>
187
-
188
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
189
-
190
-   <input type="submit" id="submitsms" value="Send SMS" />
191
-   <span id="sms_submit_msg"></span>
192
-
193
-   <div id="dirbuttons">
194
-       <button id="receivedsmstable" class="opensmsfolder">Received SMS Messages</button>
195
-       <button id="sentsmstable" class="opensmsfolder">Sent SMS Messages</button>
196
-   </div>
197
-
198
-
199
-   <div id="deleteoldmssgs">
200
-      Remove old messages:
201
-   </div>
202
-
203
-   <div id="deleteoldchck">
204
-      <input type="checkbox" id="deleteoldchckbox" />
205
-   </div>
206
-
207
-   <div id="deleteoldsms">
208
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
209
-          <div id="deleteoldinfo">
210
-             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
211
-                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
212
-                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
213
-                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
214
-                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
215
-                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
216
-                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
217
-                 rows and clicking on the 'Permanently delete' upper-left corner icon).
218
-          </span>
219
-          </div>
220
-       </div>
221
-       <div id="delsetrows">
222
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
223
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
224
-          <span id="sms_deleterecmsg"></span><br><br>
225
-
226
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
227
-          <span class="deletesmsolder"> days.</span>
228
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
229
-          <span id="sms_deletesentmsg"></span>
230
-       </div>
231
-   </div>
232
-
233
-</div>
Browse code

added CHANGELOG.txt README.md appinfo/info.xml appinfo/routes.php appinfo/signature.json css/style.css js/sendsms.js js/settings.js lib/AppInfo/Application.php lib/Controller/AuthorApiController.php lib/Controller/SmsrelentlessController.php lib/Service/SmsrelentlessService.php templates/navigation/index.php templates/settings.php lib/Migration/Version108Date20220818235106.php

DoubleBastionAdmin authored on 18/08/2022 21:30:17
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,233 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
+                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
+                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
+                    <option value="Twilio" class='selectsmsprov'>Twilio</option>
43
+                    <option value="Flowroute" class='selectsmsprov'>Flowroute</option>
44
+            </select>           
45
+            <span id="currentbalance"></span>
46
+            <div class="tooltipbalanceid">
47
+                <div id="infobalance">i</div>
48
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
49
+                      currency will be that of the respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
50
+                      target="_blank" rel="noreferrer noopener">here</a>, Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
51
+                      rel="noreferrer noopener">here</a>, Twilio prices <a href="https://www.twilio.com/sms/pricing/ro" style="color:#1b60ba" target="_blank" 
52
+                      rel="noreferrer noopener">here</a> and Flowroute prices <a href="https://flowroute.com/pricing-details/"  style="color:#1b60ba" target="_blank" 
53
+                      rel="noreferrer noopener">here</a>.
54
+                </span>
55
+            </div>
56
+       </div>
57
+
58
+       <div id="smsnumbersdiv" class="cllridcls">
59
+            <div id="pickid">Set ID:</div>
60
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
61
+                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
62
+            </select>
63
+            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
64
+            <div class="tooltipsetid">
65
+                <div id="infotipid">i</div>
66
+                <div id="setcalleridtp">
67
+                    <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
68
+                        the user's phone when receiving your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
69
+                        your numbers, or an alphanumeric sequence that you have entered in Settings > SMS Relentless > 'Telnyx/Plivo/Twilio/Flowroute alphanumeric Sender ID' field. 
70
+                        Please note that <font style="color:#aa2e4b">there are local restrictions based on market regulations or carrier-specific, that can prevent SMS
71
+                        messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
72
+                        are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
73
+                        it's recommended to read about the <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" 
74
+                        style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Sender ID restrictions</a> specific to that country. If you use alphanumeric Sender IDs, 
75
+                        there are even <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> 
76
+                        that require that you preregister your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' 
77
+                        associated with that phone number.
78
+                    </span>
79
+                </div>
80
+            </div>
81
+       </div>
82
+
83
+       <div  class="srheader">
84
+            Enter the recipient's number as:
85
+       </div>
86
+       <div class="smsnbformat">
87
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
88
+               target="_blank" rel="noreferrer noopener">country_code</a><font style="color:#aa2e4b">phone_number</font>
89
+       </div>
90
+       <div class="fortooltip"><font class="texttooltip">i</font>
91
+         <div id="tonmbrformat">
92
+            <span class="fortooltiptext">
93
+               For example, to send an SMS to the German number 1212121212 you should enter 491212121212, where 49 is the calling code of Germany. The
94
+               <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
95
+               style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. Don't add the '+'
96
+               sign or '00' in front of the number. Please note that <font style="color:#aa2e4b">in different countries there are market regulations and restrictions that
97
+               can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal (such as when sending messages that 
98
+               advertise money-lending services).</font> Before sending SMS messages to a country, it's recommended to read about the 
99
+               <a href="https://support.twilio.com/hc/en-us/articles/223133767-International-support-for-Alphanumeric-Sender-ID" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
100
+               restrictions</a> that apply to that country. To send the same message to multiple recipients, you can enter their phone numbers one after the other separated by comma, 
101
+               in the phone number box. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file containing the recipients' 
102
+               phone numbers, by using the option from below. If you check that checkbox, you will be able to upload a file containing phone numbers, and set up a sending rate different 
103
+               from the default 1 message per second. The info note will explain what are the sending rate restrictions that you will have to consider.
104
+            </span>
105
+         </div>
106
+       </div>
107
+
108
+   <div id="smstodiv">
109
+       <input type="text" id="smsto" name="smsto" />
110
+   </div>
111
+
112
+   <div id="sendtomultiple">
113
+      Upload file with phone numbers:
114
+   </div>
115
+
116
+   <div id="tomultiplechck">
117
+      <input type="checkbox" id="tomultchckbx"/>
118
+   </div>
119
+
120
+   <div id="multiplerecivers">
121
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
122
+          <div id="uploadfileinfo">
123
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, upload a file containing the recipients' phone numbers.
124
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line (by listing one number per line).
125
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
126
+              After uploading the file, enter the time interval (in milliseconds; 1 second has 1000 milliseconds) between two consecutive message sending requests,
127
+              in the box from below. Please note that there are country specific and carrier imposed sending rate restrictions. For Telnyx, the allowed SMS sending rate of US or 
128
+              Canadian long code numbers (10 digit numbers) is 
129
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
130
+              message per 6 seconds per number</a> . If you need a higher throughput per number, you can rent toll-free numbers (with sending rates of 20 messages per second per number)
131
+              or short codes (with sending rates of 1000 messages per second per number). For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at 
132
+              a rate of <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
133
+              rel="noreferrer noopener">1 message per 4 seconds per number</a>. If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
134
+              number) or short codes (with rates of 100 messages per second per number). For Twilio, a US or Canadian 10 digit number can send 
135
+              <a href="https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues" style="color:#1b60ba" target="_blank"
136
+              rel="noreferrer noopener">1 message per second</a>. If you need a higher throughput, you can send 3 messages per second per number with toll-free numbers, or 100 messages 
137
+              per second per number with short codes. For Flowroute, using a US or Canadian 10 digit number or toll-free number, you can send 
138
+              <a href="https://developer.flowroute.com/docs/flowroute-messaging-rate-limits/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">4 messages per second
139
+              per account</a> (accross all phone numbers). These sending rate limits don't necessarily apply when using non-US and non-Canadian phone numbers to send SMS messages to 
140
+              non-US and non-Canadian numbers. Also, in general, custom sending rates may be obtained by contacting Telnyx/Plivo/Twilio/Flowroute support. Starting from 2021, if you 
141
+              want to send A2P (<a href="https://www.plivo.com/docs/sms/concepts/terminology" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Application-To-Person</a>) 
142
+              SMS messages to phone numbers or from phone numbers belonging to certain carriers in the US, such as AT&T and T-Mobile, you will need to register your brand and your 
143
+              campaign via
144
+              <a href="https://support.telnyx.com/en/articles/3679260-frequently-asked-questions-about-10dlc" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a>/
145
+              <a href="https://support.plivo.com/hc/en-us/articles/4682352262809-How-to-Register-10DLC-Brands-and-Campaigns" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>/
146
+              <a href="https://support.twilio.com/hc/en-us/articles/1260801864489-How-do-I-register-to-use-A2P-10DLC-messaging-" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Twilio</a>/ 
147
+              <a href="https://support.flowroute.com/265034-Messaging-Guidelines---10DLC-Carrier-Fees-and-Registration" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Flowroute</a>. 
148
+              Registered campaigns also benefit from a much higher message throughput. If you leave the box from below empty, the application will try to send all the 
149
+              messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you surpass the limit of 1 message per 6 
150
+              seconds for Telnyx or 1 message per 4 seconds for Plivo, or 1 message per 1 second for Twilio, or 4 messages per second for Flowroute, Telnyx/Plivo/Twilio/Flowroute 
151
+              respectively will queue your messages and will send them at the specified rates in the order they were received. However, if you send a large number of messages, when 
152
+              the queue becomes full, new messages can be rejected and lost, therefore, to prevent message loss, it's recommended to set the right sending rate in the box from below.
153
+          </span>
154
+          </div>
155
+       </div>
156
+       <div id="multsetrows">
157
+          <div id="fileuploadednm" class="fileuploadstl"></div>
158
+          <div class="uploadfiledv">
159
+              <form class="uploadflbt"  enctype="multipart/form-data" >
160
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
161
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
162
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
163
+              </form>
164
+          </div>
165
+          <span id="sms_upload_msg"></span>
166
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
167
+          id="multsmsinterval" placeholder="Eg.: 10000" />
168
+       </div>
169
+   </div>
170
+
171
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message here, then press 'Send SMS'."></textarea>
172
+
173
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
174
+       <div id="maxlengthinfo">
175
+           <span class="maxlengthtooltip">
176
+                The maximum length allowed for messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
177
+                while for Unicode encoded messages is 70 characters (fewer in some countries).
178
+                If you send a message longer than 160 characters for standard GSM encoding or longer than 70 characters for Unicode encoding, the message will be sent
179
+                as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo/Twilio/Flowroute and it will be reassembled as one message at its destination. 
180
+                However, you will be charged for each piece as for a separate SMS. Thus, if the initial message is 385 GSM encoded characters in length, you will be 
181
+                charged for 3 SMS messages. The maximum number of characters per concatenated message is slightly smaller than the standard 160 for GSM encoded characters 
182
+                and 70 for Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet table (like "£" or "€") will count as two characters, 
183
+                so, not always 160 characters will fit into a single GSM encoded SMS.
184
+           </span>
185
+       </div>
186
+   </div>
187
+
188
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
189
+
190
+   <input type="submit" id="submitsms" value="Send SMS" />
191
+   <span id="sms_submit_msg"></span>
192
+
193
+   <div id="dirbuttons">
194
+       <button id="receivedsmstable" class="opensmsfolder">Received SMS Messages</button>
195
+       <button id="sentsmstable" class="opensmsfolder">Sent SMS Messages</button>
196
+   </div>
197
+
198
+
199
+   <div id="deleteoldmssgs">
200
+      Remove old messages:
201
+   </div>
202
+
203
+   <div id="deleteoldchck">
204
+      <input type="checkbox" id="deleteoldchckbox" />
205
+   </div>
206
+
207
+   <div id="deleteoldsms">
208
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
209
+          <div id="deleteoldinfo">
210
+             <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
211
+                 can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
212
+                 a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
213
+                 before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
214
+                 stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
215
+                 the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
216
+                 the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
217
+                 rows and clicking on the 'Permanently delete' upper-left corner icon).
218
+          </span>
219
+          </div>
220
+       </div>
221
+       <div id="delsetrows">
222
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
223
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
224
+          <span id="sms_deleterecmsg"></span><br><br>
225
+
226
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
227
+          <span class="deletesmsolder"> days.</span>
228
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
229
+          <span id="sms_deletesentmsg"></span>
230
+       </div>
231
+   </div>
232
+
233
+</div>
Browse code

deleted CHANGELOG.txt README.md appinfo/info.xml appinfo/routes.php appinfo/signature.json css/style.css js/sendsms.js js/settings.js lib/AppInfo/Application.php lib/Controller/AuthorApiController.php lib/Controller/SmsrelentlessController.php lib/Service/SmsrelentlessService.php templates/navigation/index.php templates/settings.php

DoubleBastionAdmin authored on 18/08/2022 21:08:00
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,229 +0,0 @@
1
-<?php
2
-/**
3
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
- *
5
- * @author Double Bastion LLC
6
- *
7
- * @license GNU AGPL version 3 or any later version
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
- * License as published by the Free Software Foundation; either
12
- * version 3 of the License, or any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public
20
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
-
24
-declare(strict_types=1);
25
-
26
-script('sms_relentless', 'sendsms');
27
-script('sms_relentless', 'showsmstables');
28
-script('sms_relentless', 'deleteoldsms');
29
-style('sms_relentless', 'style');
30
-
31
-?>
32
-
33
-
34
-<div id="smsrelentless_vbar">
35
-
36
-       <div id="currentbaldiv" class="cllridcls">
37
-            <div id="showsum">Balance:</div>
38
-            <select id="smsprovider" class="optselectprov">
39
-                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
-                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
-                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
-            </select>           
43
-            <span id="currentbalance"></span>
44
-            <div class="tooltipbalanceid">
45
-                <div id="infobalance">i</div>
46
-                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
47
-                      currency will be the one set up in that respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
48
-                      target="_blank" rel="noreferrer noopener">here</a> and Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
49
-                      rel="noreferrer noopener">here</a>.
50
-                </span>
51
-            </div>
52
-       </div>
53
-
54
-       <div id="smsnumbersdiv" class="cllridcls">
55
-            <div id="pickid">Set ID:</div>
56
-            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
-                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
58
-            </select>
59
-            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
60
-            <div class="tooltipsetid">
61
-                <div id="infotipid">i</div>
62
-                <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
63
-                    the user's phone when receiving your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
64
-                    your numbers, or an alphanumeric sequence that you have set in Settings > SMS Relentless > 'Telnyx/Plivo alphanumeric Sender ID' field. Please note that
65
-                    <font style="color:#aa2e4b">there are local restrictions based on market regulations or carrier-specific, that can prevent SMS
66
-                    messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
67
-                    are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
68
-                    please read about the Sender ID restrictions specific to that country, on websites like
69
-                    <a href="https://help.nexmo.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions" style="color:#1b60ba" target="_blank" 
70
-                    rel="noreferrer noopener">this</a>. If you use alphanumeric Sender IDs, there are even
71
-                    <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> that require
72
-                    that you pre-register your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' associated
73
-                    with that phone number.
74
-               </span>
75
-            </div>
76
-       </div>
77
-
78
-       <div  class="srheader">
79
-            Enter the recipient's number as:
80
-       </div>
81
-       <div class="smsnbformat">
82
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
83
-               target="_blank" rel="noreferrer noopener">country_code</a><font style="color:#aa2e4b">phone_number</font>
84
-       </div>
85
-       <div class="fortooltip"><font class="texttooltip">i</font>
86
-         <span class="fortooltiptext">
87
-            For example, to send an SMS to the German number 1212121212 you should enter 491212121212, where 49 is the calling code of Germany. The
88
-            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
89
-            style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. Don't add the '+'
90
-            sign or '00' in front of the number. Please note that <font style="color:#aa2e4b">in different countries there are market regulations and restrictions that
91
-            can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal
92
-            (such as when sending messages that advertise money-lending services).</font> Before sending SMS messages to a country, please read about the
93
-            restrictions that apply to that country, on websites like
94
-            <a href="https://help.nexmo.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
95
-            this</a>. You cannot send SMS messages from a Plivo 10 digit number to itself. To send the same message to multiple recipients, you can enter their phone numbers one after 
96
-            the other separated by comma, in the phone number box. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file 
97
-            containing the recipients' phone numbers, by using the option from below. If you check the checkbox from below, you will be able to upload a file containing phone numbers, 
98
-            to set up a sending rate different from the default 1 message per second and the info note will explain what are the sending rate restrictions that you will have to 
99
-            consider.
100
-         </span>
101
-       </div>
102
-
103
-   <div id="smstodiv">
104
-       <input type="text" id="smsto" name="smsto" />
105
-   </div>
106
-
107
-   <div id="sendtomultiple">
108
-      Upload file with phone numbers:
109
-   </div>
110
-
111
-   <div id="tomultiplechck">
112
-      <input type="checkbox" id="tomultchckbx"/>
113
-   </div>
114
-
115
-   <div id="multiplerecivers">
116
-       <div class="fortooltipsec"><font class="texttooltip">i</font>
117
-          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, please upload a file containing the recipients' phone numbers.
118
-              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line.
119
-              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
120
-              After uploading the file, enter the time interval (in milliseconds; 1 second has 1000 milliseconds) between two consecutive message sending requests,
121
-              in the box from below. Please note that there are country specific and carrier imposed sending rate restrictions. For Telnyx, if you have rented a US or Canadian long 
122
-              code (10 digit number), the allowed SMS sending rate will be 
123
-              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
124
-              message per 6 seconds per number</a> and 200 messages per day per number (imposed by cell phone carriers). If you need a higher throughput, you can rent toll-free numbers 
125
-              (with sending rates of 20 messages per second per number and no daily limit) or short codes (with sending rates of 1000 messages per second per number and no daily limit). 
126
-              For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at a rate of 
127
-              <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
128
-              rel="noreferrer noopener">1 message per 4 seconds</a> and 
129
-              <a href="https://support.plivo.com/hc/en-us/articles/360041799611-How-do-I-send-6000-or-more-SMS-per-day-using-a-long-code-in-the-US-" style="color:#1b60ba" target="_blank"
130
-              rel="noreferrer noopener">200 messages per day per number.</a> If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
131
-              number and no daily limit) or short codes (with rates of 100 messages per second per number and no daily limit). These sending rate limits don't necessarily apply when 
132
-              using non-US and non-Canadian phone numbers to send SMS messages to non-US and non-Canadian phone numbers. Also, in general, custom sending rates may be obtained if you 
133
-              contact Telnyx/Plivo support and explain your use case. Starting from 2021, if you want to send A2P (Application-To-Person) SMS messages to phone numbers belonging to 
134
-              certain carriers in the US, such as AT&T, you will need to register your brand and your campaign with those carriers via 
135
-              <a href="https://support.telnyx.com/en/articles/3679260-10dlc-faq-s" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a> or
136
-              <a href="https://www.plivo.com/blog/a2p-10dlc/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>. If you leave the box from below empty, the 
137
-              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
138
-              surpass the limit of 1 message per 6 seconds for Telnyx and 1 message per 4 seconds for Plivo, both Telnyx and Plivo will queue your messages and will send them at the
139
-              specified rates in the order they were received. However, if you send a large number of messages, when the queue becomes full, new messages can be rejected and lost, 
140
-              therefore, to prevent message loss, it's recommended to set the right sending rate in the box from below.
141
-          </span>
142
-       </div>
143
-       <div id="multsetrows">
144
-          <div id="fileuploadednm" class="fileuploadstl"></div>
145
-          <div class="uploadfiledv">
146
-              <form class="uploadflbt"  enctype="multipart/form-data" >
147
-                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
148
-                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
149
-                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
150
-              </form>
151
-          </div>
152
-          <span id="sms_upload_msg"></span>
153
-          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
154
-          id="multsmsinterval" placeholder="Eg.: 10000" />
155
-       </div>
156
-   </div>
157
-   <div id="unicodesection">
158
-     <div class="sendunicodedv"><font class="texttooltip">i</font>
159
-         <span class="unicodedescr">If you use Telnyx, check this option to encode your message in Unicode, only if your message contains special characters (such as "ë" or "â")
160
-            that don't exist in the
161
-            <a href="https://en.wikipedia.org/wiki/GSM_03.38#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_.2F_GSM_03.38" style="color:#1b60ba"
162
-            target="_blank" rel="noreferrer noopener"> GSM 7-bit default alphabet table.</a> If your message contains the specified type of characters and you don't encode it in Unicode,
163
-            the respective characters will be replaced with '?' or other symbols. If you use Plivo, you don't need to check this option because if your message contains
164
-            characters that are not in the GSM 7-bit default alphabet table, the entire message will be automatically encoded using the UCS-2 character encoding (similar to Unicode).
165
-         </span>
166
-     </div>
167
-     <div id="sendinunicode">Send SMS in Unicode:</div>
168
-     <div id="sendunicodesms"><input type="checkbox" id="unicodechckbx"/></div>
169
-   </div>
170
-
171
-   <textarea id="smstext"  name="smstext" placeholder="Enter a message, then press 'Send SMS'."></textarea>
172
-
173
-   <div class="maxmessagelength"><font class="texttooltip">i</font>
174
-       <span class="maxlengthtooltip">
175
-            The maximum length allowed for messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
176
-            while for Unicode encoded messages is 70 characters (fewer in some countries).
177
-            If you send a message longer than 160 characters for standard GSM encoding or longer than 70 characters for Unicode encoding, the message will be sent
178
-            as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo and it will be reassembled as one message at its destination. However, you
179
-            will be charged for each piece as for a separate SMS. Thus, if the initial message is 385 GSM encoded characters in length, you will be charged for 3
180
-            SMS messages. The maximum number of characters per concatenated message is slightly smaller than the standard 160 for GSM encoded characters and 70 for
181
-            Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet table (like "£" or "€") will count as two characters, so
182
-            not always 160 characters will fit into a single GSM encoded SMS.
183
-       </span>
184
-   </div>
185
-
186
-   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
187
-
188
-   <input type="submit" id="submitsms" value="Send SMS" />
189
-   <span id="sms_submit_msg"></span>
190
-
191
-   <div id="dirbuttons">
192
-       <button id="receivedsmstable" class="opensmsfolder">Received SMS Messages</button>
193
-       <button id="sentsmstable" class="opensmsfolder">Sent SMS Messages</button>
194
-   </div>
195
-
196
-
197
-   <div id="deleteoldmssgs">
198
-      Remove old messages:
199
-   </div>
200
-
201
-   <div id="deleteoldchck">
202
-      <input type="checkbox" id="deleteoldchckbox" />
203
-   </div>
204
-
205
-   <div id="deleteoldsms">
206
-       <div class="fortooltiptert"><font class="texttooltip">i</font>
207
-          <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
208
-              can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
209
-              a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
210
-              before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
211
-              stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
212
-              the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
213
-              the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
214
-              rows and clicking on the 'Permanently delete' upper-left corner icon).
215
-          </span>
216
-       </div>
217
-       <div id="delsetrows">
218
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
219
-          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
220
-          <span id="sms_deleterecmsg"></span><br><br>
221
-
222
-          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
223
-          <span class="deletesmsolder"> days.</span>
224
-          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
225
-          <span id="sms_deletesentmsg"></span>
226
-       </div>
227
-   </div>
228
-
229
-</div>
Browse code

Created repository.

DoubleBastionAdmin authored on 01/03/2022 23:47:00
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,229 @@
1
+<?php
2
+/**
3
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
4
+ *
5
+ * @author Double Bastion LLC
6
+ *
7
+ * @license GNU AGPL version 3 or any later version
8
+ *
9
+ * This program is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public
20
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+declare(strict_types=1);
25
+
26
+script('sms_relentless', 'sendsms');
27
+script('sms_relentless', 'showsmstables');
28
+script('sms_relentless', 'deleteoldsms');
29
+style('sms_relentless', 'style');
30
+
31
+?>
32
+
33
+
34
+<div id="smsrelentless_vbar">
35
+
36
+       <div id="currentbaldiv" class="cllridcls">
37
+            <div id="showsum">Balance:</div>
38
+            <select id="smsprovider" class="optselectprov">
39
+                    <option value="" selected="selected" disabled hidden class="selectsmsprov">select</option>
40
+                    <option value="Telnyx" class='selectsmsprov'>Telnyx</option>
41
+                    <option value="Plivo" class='selectsmsprov'>Plivo</option>
42
+            </select>           
43
+            <span id="currentbalance"></span>
44
+            <div class="tooltipbalanceid">
45
+                <div id="infobalance">i</div>
46
+                <span class="balancetooltip">To see the current balance, select a provider from the drop-down list. The balance will be rounded to 3 decimal places and the
47
+                      currency will be the one set up in that respective account. You can see Telnyx prices <a href="https://telnyx.com/pricing/messaging" style="color:#1b60ba"
48
+                      target="_blank" rel="noreferrer noopener">here</a> and Plivo prices <a href="https://www.plivo.com/sms/pricing/us/" style="color:#1b60ba" target="_blank"
49
+                      rel="noreferrer noopener">here</a>.
50
+                </span>
51
+            </div>
52
+       </div>
53
+
54
+       <div id="smsnumbersdiv" class="cllridcls">
55
+            <div id="pickid">Set ID:</div>
56
+            <select id="currentsmsnmbrs" class="optselectsmsnb">
57
+                  <option value='' selected="selected" disabled hidden class="optselectsmsnb">click refresh button</option>
58
+            </select>
59
+            <button id="selectcalleridbttn" title="Refresh the list of Sender IDs."></button>
60
+            <div class="tooltipsetid">
61
+                <div id="infotipid">i</div>
62
+                <span class="calleridtooltip">First refresh the list, then select a Sender ID from the drop-down list. The Sender ID is the 'From' field that is displayed on
63
+                    the user's phone when receiving your message. It can be a phone number or an alphanumeric sequence. You must choose as Sender ID one of
64
+                    your numbers, or an alphanumeric sequence that you have set in Settings > SMS Relentless > 'Telnyx/Plivo alphanumeric Sender ID' field. Please note that
65
+                    <font style="color:#aa2e4b">there are local restrictions based on market regulations or carrier-specific, that can prevent SMS
66
+                    messages to reach their destination because of their Sender ID.</font> For example, in USA and Canada, incoming SMS messages with alphanumeric Sender IDs
67
+                    are not accepted. All messages to phone numbers in USA and Canada must have a phone number as Sender ID. Before sending SMS messages to a country,
68
+                    please read about the Sender ID restrictions specific to that country, on websites like
69
+                    <a href="https://help.nexmo.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions" style="color:#1b60ba" target="_blank" 
70
+                    rel="noreferrer noopener">this</a>. If you use alphanumeric Sender IDs, there are even
71
+                    <a href="https://support.plivo.com/hc/en-us/articles/360048268071" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">countries</a> that require
72
+                    that you pre-register your Sender ID. If you use Telnyx, to be able to select a phone number as Sender ID, you must have a 'Messaging Profile' associated
73
+                    with that phone number.
74
+               </span>
75
+            </div>
76
+       </div>
77
+
78
+       <div  class="srheader">
79
+            Enter the recipient's number as:
80
+       </div>
81
+       <div class="smsnbformat">
82
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region" style="color:#1b60ba"
83
+               target="_blank" rel="noreferrer noopener">country_code</a><font style="color:#aa2e4b">phone_number</font>
84
+       </div>
85
+       <div class="fortooltip"><font class="texttooltip">i</font>
86
+         <span class="fortooltiptext">
87
+            For example, to send an SMS to the German number 1212121212 you should enter 491212121212, where 49 is the calling code of Germany. The
88
+            <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region"
89
+            style="color:#1b60ba" target="_blank" rel="noreferrer noopener">country calling code</a> must be always included, even if the SMS is sent locally. Don't add the '+'
90
+            sign or '00' in front of the number. Please note that <font style="color:#aa2e4b">in different countries there are market regulations and restrictions that
91
+            can prevent certain SMS messages to reach their destination (such as when the text contains repetitive URLs) or can make them illegal
92
+            (such as when sending messages that advertise money-lending services).</font> Before sending SMS messages to a country, please read about the
93
+            restrictions that apply to that country, on websites like
94
+            <a href="https://help.nexmo.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">
95
+            this</a>. You cannot send SMS messages from a Plivo 10 digit number to itself. To send the same message to multiple recipients, you can enter their phone numbers one after 
96
+            the other separated by comma, in the phone number box. If you want to send the same message to more than 10 phone numbers at once, it's recommended to upload a txt/csv file 
97
+            containing the recipients' phone numbers, by using the option from below. If you check the checkbox from below, you will be able to upload a file containing phone numbers, 
98
+            to set up a sending rate different from the default 1 message per second and the info note will explain what are the sending rate restrictions that you will have to 
99
+            consider.
100
+         </span>
101
+       </div>
102
+
103
+   <div id="smstodiv">
104
+       <input type="text" id="smsto" name="smsto" />
105
+   </div>
106
+
107
+   <div id="sendtomultiple">
108
+      Upload file with phone numbers:
109
+   </div>
110
+
111
+   <div id="tomultiplechck">
112
+      <input type="checkbox" id="tomultchckbx"/>
113
+   </div>
114
+
115
+   <div id="multiplerecivers">
116
+       <div class="fortooltipsec"><font class="texttooltip">i</font>
117
+          <span class="fortooltiptextsec">To send an SMS to a large number of recipients, please upload a file containing the recipients' phone numbers.
118
+              Supported formats are txt and csv. The phone numbers can be separated by comma (,) , semicolon (;) , vertical bar (|) , or by new line.
119
+              The duplicate phone numbers will be automatically removed. If the numbers contain dots, hyphens or plus signs, they will be also automatically removed.
120
+              After uploading the file, enter the time interval (in milliseconds; 1 second has 1000 milliseconds) between two consecutive message sending requests,
121
+              in the box from below. Please note that there are country specific and carrier imposed sending rate restrictions. For Telnyx, if you have rented a US or Canadian long 
122
+              code (10 digit number), the allowed SMS sending rate will be 
123
+              <a href="https://support.telnyx.com/en/articles/96934-throughput-limit-for-outbound-long-code-sms" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">1 
124
+              message per 6 seconds per number</a> and 200 messages per day per number (imposed by cell phone carriers). If you need a higher throughput, you can rent toll-free numbers 
125
+              (with sending rates of 20 messages per second per number and no daily limit) or short codes (with sending rates of 1000 messages per second per number and no daily limit). 
126
+              For Plivo, if you have rented a US or Canadian 10 digit number, you can send SMS messages at a rate of 
127
+              <a href="https://support.plivo.com/hc/en-us/articles/360041314852-What-s-the-outgoing-rate-limit-for-SMS-messages-" style="color:#1b60ba" target="_blank" 
128
+              rel="noreferrer noopener">1 message per 4 seconds</a> and 
129
+              <a href="https://support.plivo.com/hc/en-us/articles/360041799611-How-do-I-send-6000-or-more-SMS-per-day-using-a-long-code-in-the-US-" style="color:#1b60ba" target="_blank"
130
+              rel="noreferrer noopener">200 messages per day per number.</a> If you need a higher throughput, you can rent toll-free numbers (with rates of 10 messages per second per 
131
+              number and no daily limit) or short codes (with rates of 100 messages per second per number and no daily limit). These sending rate limits don't necessarily apply when 
132
+              using non-US and non-Canadian phone numbers to send SMS messages to non-US and non-Canadian phone numbers. Also, in general, custom sending rates may be obtained if you 
133
+              contact Telnyx/Plivo support and explain your use case. Starting from 2021, if you want to send A2P (Application-To-Person) SMS messages to phone numbers belonging to 
134
+              certain carriers in the US, such as AT&T, you will need to register your brand and your campaign with those carriers via 
135
+              <a href="https://support.telnyx.com/en/articles/3679260-10dlc-faq-s" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Telnyx</a> or
136
+              <a href="https://www.plivo.com/blog/a2p-10dlc/" style="color:#1b60ba" target="_blank" rel="noreferrer noopener">Plivo</a>. If you leave the box from below empty, the 
137
+              application will try to send all the messages with the default sending rate of 1 message per second. If you send messages from a US or Canadian long code number and you 
138
+              surpass the limit of 1 message per 6 seconds for Telnyx and 1 message per 4 seconds for Plivo, both Telnyx and Plivo will queue your messages and will send them at the
139
+              specified rates in the order they were received. However, if you send a large number of messages, when the queue becomes full, new messages can be rejected and lost, 
140
+              therefore, to prevent message loss, it's recommended to set the right sending rate in the box from below.
141
+          </span>
142
+       </div>
143
+       <div id="multsetrows">
144
+          <div id="fileuploadednm" class="fileuploadstl"></div>
145
+          <div class="uploadfiledv">
146
+              <form class="uploadflbt"  enctype="multipart/form-data" >
147
+                  <label for="uploadfileforsms" class="pfprompt"><span id="uploadflprmpt"><?php p($l->t('Upload the file ')) ?></span></label>
148
+                  <input id="uploadfileforsms" class="fileupload" name="uploadedtosms" type="file" />
149
+                  <label for="uploadfileforsms" class="button icon-upload svg" id="uploadfileforsms" </label>
150
+              </form>
151
+          </div>
152
+          <span id="sms_upload_msg"></span>
153
+          <span class="entertime">Enter the time interval between consecutive messages, in milliseconds:</span><input type="text"
154
+          id="multsmsinterval" placeholder="Eg.: 10000" />
155
+       </div>
156
+   </div>
157
+   <div id="unicodesection">
158
+     <div class="sendunicodedv"><font class="texttooltip">i</font>
159
+         <span class="unicodedescr">If you use Telnyx, check this option to encode your message in Unicode, only if your message contains special characters (such as "ë" or "â")
160
+            that don't exist in the
161
+            <a href="https://en.wikipedia.org/wiki/GSM_03.38#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_.2F_GSM_03.38" style="color:#1b60ba"
162
+            target="_blank" rel="noreferrer noopener"> GSM 7-bit default alphabet table.</a> If your message contains the specified type of characters and you don't encode it in Unicode,
163
+            the respective characters will be replaced with '?' or other symbols. If you use Plivo, you don't need to check this option because if your message contains
164
+            characters that are not in the GSM 7-bit default alphabet table, the entire message will be automatically encoded using the UCS-2 character encoding (similar to Unicode).
165
+         </span>
166
+     </div>
167
+     <div id="sendinunicode">Send SMS in Unicode:</div>
168
+     <div id="sendunicodesms"><input type="checkbox" id="unicodechckbx"/></div>
169
+   </div>
170
+
171
+   <textarea id="smstext"  name="smstext" placeholder="Enter a message, then press 'Send SMS'."></textarea>
172
+
173
+   <div class="maxmessagelength"><font class="texttooltip">i</font>
174
+       <span class="maxlengthtooltip">
175
+            The maximum length allowed for messages using the standard GSM 03.38 encoding is 160 characters (fewer in some countries),
176
+            while for Unicode encoded messages is 70 characters (fewer in some countries).
177
+            If you send a message longer than 160 characters for standard GSM encoding or longer than 70 characters for Unicode encoding, the message will be sent
178
+            as a 'concatenated' message: it will be split into smaller pieces by Telnyx/Plivo and it will be reassembled as one message at its destination. However, you
179
+            will be charged for each piece as for a separate SMS. Thus, if the initial message is 385 GSM encoded characters in length, you will be charged for 3
180
+            SMS messages. The maximum number of characters per concatenated message is slightly smaller than the standard 160 for GSM encoded characters and 70 for
181
+            Unicode, due to the inclusion of concatenation headers. Some symbols in the GSM 7-bit alphabet table (like "£" or "€") will count as two characters, so
182
+            not always 160 characters will fit into a single GSM encoded SMS.
183
+       </span>
184
+   </div>
185
+
186
+   <div id="char_count"><span id="countchnb"></span><span> characters</span></div>
187
+
188
+   <input type="submit" id="submitsms" value="Send SMS" />
189
+   <span id="sms_submit_msg"></span>
190
+
191
+   <div id="dirbuttons">
192
+       <button id="receivedsmstable" class="opensmsfolder">Received SMS Messages</button>
193
+       <button id="sentsmstable" class="opensmsfolder">Sent SMS Messages</button>
194
+   </div>
195
+
196
+
197
+   <div id="deleteoldmssgs">
198
+      Remove old messages:
199
+   </div>
200
+
201
+   <div id="deleteoldchck">
202
+      <input type="checkbox" id="deleteoldchckbox" />
203
+   </div>
204
+
205
+   <div id="deleteoldsms">
206
+       <div class="fortooltiptert"><font class="texttooltip">i</font>
207
+          <span class="fortooltiptexttert">Since this application records all incoming and outgoing SMS messages, in time, its database can become very large, which
208
+              can slow it down. To avoid having to work with extremely large tables, it's recommended that you delete from time to time all the sent/received messages older than 
209
+              a specified number of days (for example 180 days). All the messages deleted using the options from below will be preserved, because they will be saved as csv files
210
+              before being deleted from the database. The csv files will contain all the data of the deleted messages, they will bear the date of the removal and they will be
211
+              stored in the 'SMS_Relentless/ removed_sent_messages' and 'SMS_Relentless/ removed_received_messages' directories. Being structured as 'csv',
212
+              the data can then be viewed and analyzed with other applications to create statistics, graphs etc. Therefore, as long as the 'csv' files are preserved,
213
+              the deleted messages are not lost. (Please note that this 'save before delete' mechanism is not used when messages are deleted by selecting their respective table 
214
+              rows and clicking on the 'Permanently delete' upper-left corner icon).
215
+          </span>
216
+       </div>
217
+       <div id="delsetrows">
218
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">received</font> messages that are older than <input type="text" id="oldrecSmsInterval" title="Enter the number of days." /> days.</span>
219
+          <input type="submit" id="delOldrecSMS" value="Delete received messages" />
220
+          <span id="sms_deleterecmsg"></span><br><br>
221
+
222
+          <span class="deletesmsolder">Delete from the database all the <font style="color: #ba3555;">sent</font> messages that are older than </span><input type="text" id="oldsentSmsInterval" title="Enter the number of days."/>
223
+          <span class="deletesmsolder"> days.</span>
224
+          <input type="submit" id="delOldsentSMS" value="Delete sent messages" />
225
+          <span id="sms_deletesentmsg"></span>
226
+       </div>
227
+   </div>
228
+
229
+</div>