[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [4IceG]\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "## Luci-app-sms-tool\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/4IceG/luci-app-sms-tool?style=flat-square)\n![GitHub stars](https://img.shields.io/github/stars/4IceG/luci-app-sms-tool?style=flat-square)\n![GitHub forks](https://img.shields.io/github/forks/4IceG/luci-app-sms-tool?style=flat-square)\n![GitHub All Releases](https://img.shields.io/github/downloads/4IceG/luci-app-sms-tool/total)\n\n#### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_United_Kingdom.png\" height=\"24\"> Luci-app-sms-tool is a mini gui for handling messages via sms_tool application/project https://eko.one.pl/?p=openwrt-sms_tool. Works with mPCI-E and USB 3G/LTE modems. Don't work with HiLink/RNDIS modems.\n\n#### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_Poland.png\" height=\"24\"> Luci-app-sms-tool jest prostym interfejsem użytkownika dla projetu/aplikacji sms_tool https://eko.one.pl/?p=openwrt-sms_tool. Aplikacji umożliwia obsługę wiadomości sms i kodów ussd. Działa z modemami mPCI-E oraz USB 3G/LTE. Nie działa z modemami HiLink/RNDIS.\n\n### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_United_Kingdom.png\" height=\"24\"> What You Should Know / <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_Poland.png\" height=\"24\"> Co powinieneś wiedzieć\n> Preferred version OpenWrt =< 19.07 | Package may run with incomplete functionality on 21.02.0 (+luci-compat).   \n> For OpenWrt versions >= 21.02 it is recommended to use the JS version (https://github.com/4IceG/luci-app-sms-tool-js).\n\n> Preferowana wersja OpenWrt =< 19.07 | Pakiet może działać z niepełną funkcjonalnością na 21.02.0 (+luci-compat).   \n> W przypadku wersji OpenWrt >= 21.02 zalecane jest używanie wersji JS (https://github.com/4IceG/luci-app-sms-tool-js).\n\n\n#### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_United_Kingdom.png\" height=\"24\"> Preview and quick configuration (modem Quectel EM160R-GL) / <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_Poland.png\" height=\"24\"> Podgląd oraz szybka konfiguracja (modem Quectel EM160R-GL)\n\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/1.9.4-20220325.gif?raw=true)\n\n### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_United_Kingdom.png\" height=\"24\"> Installation / <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_Poland.png\" height=\"24\"> Instalacja\n\n<details>\n   <summary>Pokaż | Show me</summary>\n\n#### Package dependencies for conventional modems.\nModem drivers are required for proper operation.\n``` bash\nopkg install kmod-usb-serial kmod-usb-serial-option sms-tool\n```\nThe sms-tool package is available in the OpenWrt Master repository.\n\n\n#### Step 1a. Install sms-tool from Master (Only the current snapshot image).\n``` bash\nopkg update\nopkg install sms-tool\n```\n\n#### Step 1b. Download the sms-tool package and install manualy (For older stable version images).\n\n   #### To install the sms-tool package, we need to know the architecture name for router.\n\n<details>\n   <summary>Pokaż jak znaleźć architekturę routera | Show how to find a router architecture.</summary>\n   \n\n   \n   > For example, we are looking for sms-tool for Zbtlink router ZBT-WE3526.   \n   \n   #### Step 1.\n   > We go to the page and enter the name of our router.  \n   https://firmware-selector.openwrt.org/\n   \n   \n   #### Step 2.\n   > Click on the folder icon and go to the image download page.   \n   \n   ![](https://github.com/4IceG/Personal_data/blob/master/OpenWrt%20Firmware%20Selector.png?raw=true)\n   \n   > It should take us to a page   \n   https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/\n   \n   #### Step 3.\n   > Then go into the \"packages\" folder at the bottom of the page.   \n   https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/\n   \n   > We check what the architecture name is for our router. All packets have names ending in mipsel_24kc.ipk, so the architecture we are looking for is mipsel_24kc.\n   \n\n</details>\n\n#### Example of sms-tool installation using the command line.\n> In the link below, replace ```*architecture*``` with the architecture of your router, e.g. arm_cortex-a7_neon-vfpv4, mipsel_24kc.\n\n``` bash\nwget https://downloads.openwrt.org/snapshots/packages/*architecture*/packages/sms-tool_2023-09-21-1b6ca032-1_*architecture*.ipk -O /tmp/sms-tool_2023-09-21.ipk\nopkg install /tmp/sms-tool_2023-09-21.ipk\n```\n\n#### Another way is to download the package manually.\n> To do this, we go to the page.   \nhttps://downloads.openwrt.org/snapshots/packages/\n\n> We choose our architecture, e.g. arm_cortex-a7_neon-vfpv4, mipsel_24kc.   \nhttps://downloads.openwrt.org/snapshots/packages/mipsel_24kc/\n\n> Go to the \"packages\" folder.   \nhttps://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/\n\n> Looking for \"sms-tool_2023-09-21\". We can use search by using Ctr + F and typing \"sms-tool\".\nSave the package to your computer for further installation on the router.\n\n#### Step 2. Add my repository (https://github.com/4IceG/Modem-extras) to the image and follow the commands.\n``` bash\nopkg update\nopkg install luci-app-sms-tool\n```\nFor images downloaded from eko.one.pl.\nInstallation procedure is similar, only there is no need to manually download the sms-tool package.\n   \n</details>\n\n### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_United_Kingdom.png\" height=\"24\"> User compilation / <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_Poland.png\" height=\"24\"> Kompilacja przez użytkownika\n\n<details>\n   <summary>Pokaż | Show me</summary>\n\n``` bash\n#The package can be added to Openwrt sources in two ways:\n\ncd feeds/luci/applications/\ngit clone https://github.com/4IceG/luci-app-sms-tool.git\ncd ../../..\n./scripts/feeds update -a; ./scripts/feeds install -a\nmake menuconfig\n\nor e.g.\n\ncd packages/\ngit clone https://github.com/4IceG/luci-app-sms-tool.git\ngit pull\nmake package/symlinks\nmake menuconfig\n\n#You may need to correct the file paths and the number of folders to look like this:\nfeeds/luci/applications/luci-app-sms-tool/Makefile\nor\npackages/luci-app-sms-tool/Makefile\n\n#Then you can compile the packages one by one, an example command:\nmake V=s -j1 feeds/luci/applications/luci-app-sms-tool/compile\n```\n   \n</details>\n\n### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_United_Kingdom.png\" height=\"24\"> Screenshots / <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_Poland.png\" height=\"24\"> Zrzuty ekranu\n\n- \"Received Messages\" window / Okno odebranych wiadomości:\n\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Odebrane%20wiadomo%C5%9Bci%20-%20LuCI.png?raw=true)\n\n- \"Sending Message\" window / Okno wysyłania wiadomości:\n\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Wysy%C5%82anie%20wiadomo%C5%9Bci%20-%20LuCI.png?raw=true)\n\n- \"USSD Codes\" window / Okno kodów USSD:\n\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Kody%20USSD%20-%20LuCI.png?raw=true)\n\n- \"AT Commands\" window / Okno poleceń AT:\n\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Polecenia%20AT%20-%20LuCI.png?raw=true)\n\n- \"Configuration\" window / Okno konfiguracji:\n\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Konfiguracja%20-%20LuCI1.png?raw=true)\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Konfiguracja%20-%20LuCI2.png?raw=true)\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Konfiguracja%20-%20LuCI3.png?raw=true)\n![](https://github.com/4IceG/Personal_data/blob/master/zrzuty/1.9.4-20220325/Konfiguracja%20-%20LuCI4.png?raw=true)\n\n### <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_United_Kingdom.png\" height=\"24\"> Thanks to / <img src=\"https://raw.githubusercontent.com/4IceG/Personal_data/master/dooffy_design_icons_EU_flags_Poland.png\" height=\"24\"> Podziękowania dla\n- [obsy (Cezary Jackiewicz)](https://github.com/obsy)\n- [Users of the eko.one.pl forum](https://eko.one.pl/forum/viewtopic.php?id=20096)\n"
  },
  {
    "path": "luci-app-sms-tool/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "luci-app-sms-tool/Makefile",
    "content": "#\r\n# Copyright 2020-2023 Rafał Wabik - IceG - From eko.one.pl forum\r\n# Licensed to the GNU General Public License v3.0.\r\n#\r\n\r\ninclude $(TOPDIR)/rules.mk\r\n\r\nPKG_NAME:=luci-app-sms-tool\r\nLUCI_TITLE:=LuCI Support for sms-tool\r\nLUCI_DESCRIPTION:=LuCI interface for the sms-tool. The user interface supports SMS/USSD Codes/AT Commands.\r\nLUCI_PKGARCH:=all\r\nLUCI_DEPENDS:=+sms-tool +kmod-usb-serial +kmod-usb-serial-option +comgt\r\nPKG_VERSION:=1.9.6\r\nPKG_RELEASE:=20230501\r\n\r\ninclude $(TOPDIR)/feeds/luci/luci.mk\r\n\r\n# call BuildPackage - OpenWrt buildroot signature\r\n"
  },
  {
    "path": "luci-app-sms-tool/luasrc/controller/modem/sms.lua",
    "content": "-- Copyright 2020-2022 Rafa Wabik (IceG) - From eko.one.pl forum\n-- Licensed to the GNU General Public License v3.0.\n\n\n\tlocal util = require \"luci.util\"\n\tlocal fs = require \"nixio.fs\"\n\tlocal sys = require \"luci.sys\"\n\tlocal http = require \"luci.http\"\n\tlocal dispatcher = require \"luci.dispatcher\"\n\tlocal http = require \"luci.http\"\n\tlocal sys = require \"luci.sys\"\n\tlocal uci = require \"luci.model.uci\".cursor()\n\nmodule(\"luci.controller.modem.sms\", package.seeall)\n\nfunction index()\n\tentry({\"admin\", \"modem\"}, firstchild(), \"Modem\", 30).dependent=false\n\tentry({\"admin\", \"modem\", \"sms\"}, alias(\"admin\", \"modem\", \"sms\", \"readsms\"), translate(\"SMS Messages\"), 20).acl_depends={ \"luci-app-sms-tool\" }\n\tentry({\"admin\", \"modem\", \"sms\", \"readsms\"},template(\"modem/readsms\"),translate(\"Received Messages\"), 10)\n \tentry({\"admin\", \"modem\", \"sms\", \"sendsms\"},template(\"modem/sendsms\"),translate(\"Send Messages\"), 20)\n \tentry({\"admin\", \"modem\", \"sms\", \"ussd\"},template(\"modem/ussd\"),translate(\"USSD Codes\"), 30)\n\tentry({\"admin\", \"modem\", \"sms\", \"atcommands\"},template(\"modem/atcommands\"),translate(\"AT Commands\"), 40)\n\tentry({\"admin\", \"modem\", \"sms\", \"smsconfig\"},cbi(\"modem/smsconfig\"),translate(\"Configuration\"), 50)\n\tentry({\"admin\", \"modem\", \"sms\", \"delete_one\"}, call(\"delete_sms\", smsindex), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"delete_all\"}, call(\"delete_all_sms\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"run_ussd\"}, call(\"ussd\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"run_at\"}, call(\"at\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"run_sms\"}, call(\"sms\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"readsim\"}, call(\"slots\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"countsms\"}, call(\"count_sms\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"user_ussd\"}, call(\"userussd\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"user_atc\"}, call(\"useratc\"), nil).leaf = true\n\tentry({\"admin\", \"modem\", \"sms\", \"user_phonebook\"}, call(\"userphb\"), nil).leaf = true\nend\n\n\nfunction delete_sms(smsindex)\nlocal devv = tostring(uci:get(\"sms_tool\", \"general\", \"readport\"))\nlocal s = smsindex\nfor d in s:gmatch(\"%d+\") do \n\tos.execute(\"sms_tool -d \" .. devv .. \" delete \" .. d .. \"\")\nend\nend\n\nfunction delete_all_sms()\n\tlocal devv = tostring(uci:get(\"sms_tool\", \"general\", \"readport\"))\n\tos.execute(\"sms_tool -d \" .. devv .. \" delete all\")\nend\n\nfunction get_ussd()\n    local cursor = luci.model.uci.cursor()\n    if cursor:get(\"sms_tool\", \"general\", \"ussd\") == \"1\" then\n        return \" -R\"\n    else\n        return \"\"\n    end\nend\n\n\nfunction get_pdu()\n    local cursor = luci.model.uci.cursor()\n    if cursor:get(\"sms_tool\", \"general\", \"pdu\") == \"1\" then\n        return \" -r\"\n    else\n        return \"\"\n    end\nend\n\n\nfunction ussd()\n    local devv = tostring(uci:get(\"sms_tool\", \"general\", \"ussdport\"))\n\n\tlocal ussd = get_ussd()\n\tlocal pdu = get_pdu()\n\n    local ussd_code = http.formvalue(\"code\")\n    if ussd_code then\n\t    local odpall = io.popen(\"sms_tool -d \" .. devv .. ussd .. pdu .. \" ussd \" .. ussd_code ..\" 2>&1\")\n\t    local odp =  odpall:read(\"*a\")\n\t    odpall:close()\n        http.write(tostring(odp))\n    else\n        http.write_json(http.formvalue())\n    end\nend\n\n\nfunction at()\n    local devv = tostring(uci:get(\"sms_tool\", \"general\", \"atport\"))\n\n    local at_code = http.formvalue(\"code\")\n    if at_code then\n\t    local odpall = io.popen(\"sms_tool -d \" .. devv .. \" at \"  ..at_code:gsub(\"[$]\", \"\\\\\\$\"):gsub(\"\\\"\", \"\\\\\\\"\")..\" 2>&1\")\n\t    local odp =  odpall:read(\"*a\")\n\t    odpall:close()\n        http.write(tostring(odp))\n    else\n        http.write_json(http.formvalue())\n    end\nend\n\n\nfunction sms()\n    local devv = tostring(uci:get(\"sms_tool\", \"general\", \"sendport\"))\n    local sms_code = http.formvalue(\"scode\")\n\n    nr = (string.sub(sms_code, 1, 20))\n    msgall = string.sub(sms_code, 21)\n    msg = string.gsub(msgall, \"\\n\", \" \")\n\n    if sms_code then\n\t    local odpall = io.popen(\"sms_tool -d \" .. devv .. \" send \" .. nr ..\" '\".. msg ..\"'\")\n\t    local odp =  odpall:read(\"*a\")\n\t    odpall:close()\n        http.write(tostring(odp))\n    else\n        http.write_json(http.formvalue())\n    end\n\nend\n\nfunction slots()\n\tlocal sim = { }\n\tlocal devv = tostring(uci:get(\"sms_tool\", \"general\", \"readport\"))\n\tlocal led = tostring(uci:get(\"sms_tool\", \"general\", \"smsled\"))\n\tlocal dsled = tostring(uci:get(\"sms_tool\", \"general\", \"ledtype\"))\n\tlocal ln = tostring(uci:get(\"sms_tool\", \"general\", \"lednotify\"))\n\n\tlocal smsmem = tostring(uci:get(\"sms_tool\", \"general\", \"storage\"))\n\n\tlocal statusb = luci.util.exec(\"sms_tool -s\" .. smsmem .. \" -d \".. devv .. \" status\")\n\tlocal usex = string.sub (statusb, 23, 27)\n\tlocal max = statusb:match('[^: ]+$')\n\tsim[\"use\"] = string.match(usex, '%d+')\n\tlocal smscount = string.match(usex, '%d+')\n\tif ln == \"1\" then\n      \t\tluci.sys.call(\"echo \" .. smscount .. \" > /etc/config/sms_count\")\n\t\tif dsled == \"S\" then\n\t\tluci.util.exec(\"/etc/init.d/led restart\")\n\t\tend\n\t\tif dsled == \"D\" then\n\t\tluci.sys.call(\"echo 0 > '/sys/class/leds/\" .. led .. \"/brightness'\")\n\t\tend\n \tend\n\tsim[\"all\"] = string.match(max, '%d+')\n\tluci.http.prepare_content(\"application/json\")\n\tluci.http.write_json(sim)\nend\n\n\nfunction count_sms()\n    os.execute(\"sleep 3\")\n    local cursor = luci.model.uci.cursor()\n    if cursor:get(\"sms_tool\", \"general\", \"lednotify\") == \"1\" then\n        local devv = tostring(uci:get(\"sms_tool\", \"general\", \"readport\"))\n\n\t local smsmem = tostring(uci:get(\"sms_tool\", \"general\", \"storage\"))\n\n        local statusb = luci.util.exec(\"sms_tool -s\" .. smsmem .. \" -d \".. devv .. \" status\")\n        local smsnum = string.sub (statusb, 23, 27)\n        local smscount = string.match(smsnum, '%d+')\n        os.execute(\"echo \" .. smscount .. \" > /etc/config/sms_count\")\n    end\nend\n\n\nfunction uussd(rv)\n\tlocal c = nixio.fs.access(\"/etc/config/ussd.user\") and\n\t\tio.popen(\"cat /etc/config/ussd.user\")\n\n\tif c then\n\t\tfor l in c:lines() do\n\t\t\tlocal i = l\n\t\t\tif i then\n\t\t\t\trv[#rv + 1] = {\n\t\t\t\t\tusd = i\n\t\t\t\t}\n\t\t\tend\n\t\tend\n\t\tc:close()\n\tend\nend\n\n\n\nfunction userussd()\n\tlocal usd = { }\n\tuussd(usd)\n\tluci.http.prepare_content(\"application/json\")\n\tluci.http.write_json(usd)\nend\n\n\nfunction uat(rv)\n\tlocal c = nixio.fs.access(\"/etc/config/atcmds.user\") and\n\t\tio.popen(\"cat /etc/config/atcmds.user\")\n\n\tif c then\n\t\tfor l in c:lines() do\n\t\t\tlocal i = l\n\t\t\tif i then\n\t\t\t\trv[#rv + 1] = {\n\t\t\t\t\tatu = i\n\t\t\t\t}\n\t\t\tend\n\t\tend\n\t\tc:close()\n\tend\nend\n\n\n\nfunction useratc()\n\tlocal atu = { }\n\tuat(atu)\n\tluci.http.prepare_content(\"application/json\")\n\tluci.http.write_json(atu)\nend\n\n\n\nfunction uphb(rv)\n\tlocal c = nixio.fs.access(\"/etc/config/phonebook.user\") and\n\t\tio.popen(\"cat /etc/config/phonebook.user\")\n\n\tif c then\n\t\tfor l in c:lines() do\n\t\t\tlocal i = l\n\t\t\tif i then\n\t\t\t\trv[#rv + 1] = {\n\t\t\t\t\tphb = i\n\t\t\t\t}\n\t\t\tend\n\t\tend\n\t\tc:close()\n\tend\nend\n\n\n\nfunction userphb()\n\tlocal phb = { }\n\tuphb(phb)\n\tluci.http.prepare_content(\"application/json\")\n\tluci.http.write_json(phb)\nend\n"
  },
  {
    "path": "luci-app-sms-tool/luasrc/model/cbi/modem/smsconfig.lua",
    "content": "-- Copyright 2020-2023 Rafa� Wabik (IceG) - From eko.one.pl forum\n-- Licensed to the GNU General Public License v3.0.\n\nlocal util = require \"luci.util\"\nlocal fs = require \"nixio.fs\"\nlocal sys = require \"luci.sys\"\nlocal http = require \"luci.http\"\nlocal dispatcher = require \"luci.dispatcher\"\nlocal http = require \"luci.http\"\nlocal sys = require \"luci.sys\"\nlocal uci = require \"luci.model.uci\".cursor()\n\nlocal USSD_FILE_PATH = \"/etc/config/ussd.user\"\nlocal PHB_FILE_PATH = \"/etc/config/phonebook.user\"\nlocal SMSC_FILE_PATH = \"/etc/config/smscommands.user\"\nlocal AT_FILE_PATH = \"/etc/config/atcmds.user\"\n\nlocal led = tostring(uci:get(\"sms_tool\", \"general\", \"smsled\"))\nlocal dsled = tostring(uci:get(\"sms_tool\", \"general\", \"ledtype\"))\nlocal ledtime = tostring(uci:get(\"sms_tool\", \"general\", \"checktime\"))\n\nlocal m\nlocal s\nlocal dev1, dev2, dev3, dev4, leds\nlocal try_devices1 = nixio.fs.glob(\"/dev/tty[A-Z][A-Z]*\")\nlocal try_devices2 = nixio.fs.glob(\"/dev/tty[A-Z][A-Z]*\")\nlocal try_devices3 = nixio.fs.glob(\"/dev/tty[A-Z][A-Z]*\")\nlocal try_devices4 = nixio.fs.glob(\"/dev/tty[A-Z][A-Z]*\")\nlocal try_leds = nixio.fs.glob(\"/sys/class/leds/*\")\n\n\nlocal devv = tostring(uci:get(\"sms_tool\", \"general\", \"readport\"))\n\nlocal smsmem = tostring(uci:get(\"sms_tool\", \"general\", \"storage\"))\n\nlocal statusb = luci.util.exec(\"sms_tool -s\".. smsmem .. \" -d \".. devv .. \" status\")\n\nlocal smsnum = string.sub (statusb, 23, 27)\n\nlocal smscount = string.match(smsnum, '%d+')\n\nm = Map(\"sms_tool\", translate(\"Configuration sms-tool\"),\n\ttranslate(\"Configuration panel for sms_tool and gui application.\"))\n\ns = m:section(NamedSection, 'general' , \"sms_tool\" , \"\" .. translate(\"\"))\ns.anonymous = true\ns:tab(\"sms\", translate(\"SMS Settings\"))\ns:tab(\"ussd\", translate(\"USSD Codes Settings\"))\ns:tab(\"at\", translate(\"AT Commands Settings\"))\ns:tab(\"info\", translate(\"Notification Settings\"))\n\nthis_tab = \"sms\"\n\ndev1 = s:taboption(this_tab, Value, \"readport\", translate(\"SMS Reading Port\"))\nif try_devices1 then\nlocal node\nfor node in try_devices1 do\ndev1:value(node, node)\nend\nend\n\nmem = s:taboption(this_tab, ListValue, \"storage\", translate(\"Message storage area\"), translate(\"Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device.\"))\nmem.default = \"SM\"\nmem:value(\"SM\", translate(\"SIM card\"))\nmem:value(\"ME\", translate(\"Modem memory\"))\nmem.rmempty = true\n\nlocal msm = s:taboption(this_tab, Flag, \"mergesms\", translate(\"Merge split messages\"), translate(\"Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received.\"))\nmsm.rmempty = false\n\nmsma = s:taboption(this_tab, ListValue, \"algorithm\", translate(\"Merge algorithm\"), translate(\"\"))\nmsma.default = \"Simple\"\nmsma:value(\"Simple\", translate(\"Simple (merge without sorting)\"))\nmsma:value(\"Advanced\", translate(\"Advanced (merges with sorting)\"))\nmsma:depends(\"mergesms\", \"1\")\nmsma.rmempty = true\n\nmsmd = s:taboption(this_tab, ListValue, \"direction\", translate(\"Direction of message merging\"), translate(\"\"))\nmsmd.default = \"Start\"\nmsmd:value(\"Start\", translate(\"From beginning to end\"))\nmsmd:value(\"End\", translate(\"From end to beginning\"))\nmsmd:depends(\"algorithm\", \"Advanced\")\nmsmd.rmempty = true\n\ndev2 = s:taboption(this_tab, Value, \"sendport\", translate(\"SMS Sending Port\"))\nif try_devices2 then\nlocal node\nfor node in try_devices2 do\ndev2:value(node, node)\nend\nend\n\nlocal t = s:taboption(this_tab, Value, \"pnumber\", translate(\"Prefix Number\"), translate(\"The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix.\"))\nt.rmempty = true\nt.default = 48\n\nlocal f = s:taboption(this_tab, Flag, \"prefix\", translate(\"Add Prefix to Phone Number\"), translate(\"Automatically add prefix to the phone number field.\"))\nf.rmempty = false\n\n\nlocal i = s:taboption(this_tab, Flag, \"information\", translate(\"Explanation of number and prefix\"), translate(\"In the tab for sending SMSes, show an explanation of the prefix and the correct phone number.\"))\ni.rmempty = false\n\nlocal ta = s:taboption(this_tab, TextValue, \"user_phonebook\", translate(\"User Phonebook\"), translate(\"Each line must have the following format: 'Contact name;Phone number'. Save to file '/etc/config/phonebook.user'.\"))\nta.rows = 7\nta.rmempty = false\n\nfunction ta.cfgvalue(self, section)\n    return fs.readfile(PHB_FILE_PATH)\nend\n\nfunction ta.write(self, section, value)\n    \t\tvalue = value:gsub(\"\\r\\n\", \"\\n\")\n    \t\tfs.writefile(PHB_FILE_PATH, value)\nend\n\nthis_taba = \"ussd\"\n\ndev3 = s:taboption(this_taba, Value, \"ussdport\", translate(\"USSD Sending Port\"))\nif try_devices3 then\nlocal node\nfor node in try_devices3 do\ndev3:value(node, node)\nend\nend\n\nlocal u = s:taboption(this_taba, Flag, \"ussd\", translate(\"Sending USSD Code in plain text\"), translate(\"Send the USSD code in plain text. Command is not being coded to the PDU.\"))\nu.rmempty = false\n\nlocal p = s:taboption(this_taba, Flag, \"pdu\", translate(\"Receive message without PDU decoding\"), translate(\"Receive and display the message without decoding it as a PDU.\"))\np.rmempty = false\n\nlocal tb = s:taboption(this_taba, TextValue, \"user_ussd\", translate(\"User USSD Codes\"), translate(\"Each line must have the following format: 'Code name;Code'. Save to file '/etc/config/ussd.user'.\"))\ntb.rows = 7\ntb.rmempty = true\n\nfunction tb.cfgvalue(self, section)\n    return fs.readfile(USSD_FILE_PATH)\nend\n\nfunction tb.write(self, section, value)\n    \t\tvalue = value:gsub(\"\\r\\n\", \"\\n\")\n    \t\tfs.writefile(USSD_FILE_PATH, value)\nend\n\nthis_tabc = \"at\"\n\ndev4 = s:taboption(this_tabc, Value, \"atport\", translate(\"AT Commands Sending Port\"))\nif try_devices4 then\nlocal node\nfor node in try_devices4 do\ndev4:value(node, node)\nend\nend\n\nlocal tat = s:taboption(this_tabc, TextValue, \"user_at\", translate(\"User AT Commands\"), translate(\"Each line must have the following format: 'AT Command name;AT Command'. Save to file '/etc/config/atcmds.user'.\"))\ntat.rows = 20\ntat.rmempty = true\n\nfunction tat.cfgvalue(self, section)\n    return fs.readfile(AT_FILE_PATH)\nend\n\nfunction tat.write(self, section, value)\n    \t\tvalue = value:gsub(\"\\r\\n\", \"\\n\")\n    \t\tfs.writefile(AT_FILE_PATH, value)\nend\n\nthis_tabb = \"info\"\n\nlocal uw = s:taboption(this_tabb, Flag, \"lednotify\", translate(\"Notify new messages\"), translate(\"The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED.\"))\nuw.rmempty = false\n\nfunction uw.write(self, section, value)\nif devv ~= nil or devv ~= '' then\nif ( smscount ~= nil and led ~= nil ) then\n    if value == '1' then\n\n       luci.sys.call(\"echo \" .. smscount .. \" > /etc/config/sms_count\")\n\tluci.sys.call(\"uci set sms_tool.general.lednotify=\" .. 1 .. \";/etc/init.d/smsled enable;/etc/init.d/smsled start\")\n\tluci.sys.call(\"/sbin/cronsync.sh\")\n\n    elseif value == '0' then\n       luci.sys.call(\"uci set sms_tool.general.lednotify=\" .. 0 .. \";/etc/init.d/smsled stop;/etc/init.d/smsled disable\")\n\t    if dsled == 'D' then\n\t\tluci.sys.call(\"echo 0 > '/sys/class/leds/\" .. led .. \"/brightness'\")\n\t    end\n\tluci.sys.call(\"/sbin/cronsync.sh\")\n\n    end\nreturn Flag.write(self, section ,value)\n  end\nend\nend\n\nlocal time = s:taboption(this_tabb, Value, \"checktime\", translate(\"Check inbox every minute(s)\"), translate(\"Specify how many minutes you want your inbox to be checked.\"))\ntime.rmempty = false\ntime.maxlength = 2\ntime.default = 5\n\nfunction time.validate(self, value)\n\tif ( tonumber(value) < 60 and tonumber(value) > 0 ) then\n\treturn value\n\tend\nend\n\nsync = s:taboption(this_tabb, ListValue, \"prestart\", translate(\"Restart the inbox checking process every\"), translate(\"The process will restart at the selected time interval. This will eliminate the delay in checking your inbox.\"))\nsync.default = \"6\"\nsync:value(\"4\", translate(\"4h\"))\nsync:value(\"6\", translate(\"6h\"))\nsync:value(\"8\", translate(\"8h\"))\nsync:value(\"12\", translate(\"12h\"))\nsync.rmempty = true\n\n\nleds = s:taboption(this_tabb, Value, \"smsled\", translate(\"Notification LED\"), translate(\"Select the notification LED.\"))\nif try_leds then\nlocal node\nlocal status\nfor node in try_leds do\nlocal status = node\nlocal all = string.sub (status, 17)\nleds:value(all, all)\nend\nend\n\noled = s:taboption(this_tabb, ListValue, \"ledtype\", translate(\"The diode is dedicated only to these notifications\"), translate(\"Select 'No' in case the router has only one LED or if the LED is multi-tasking.\"))\noled.default = \"D\"\noled:value(\"S\", translate(\"No\"))\noled:value(\"D\", translate(\"Yes\"))\noled.rmempty = true\n\nlocal timeon = s:taboption(this_tabb, Value, \"ledtimeon\", translate(\"Turn on the LED for seconds(s)\"), translate(\"Specify for how long the LED should be on.\"))\ntimeon.rmempty = false\ntimeon.maxlength = 3\ntimeon.default = 1\n\nlocal timeoff = s:taboption(this_tabb, Value, \"ledtimeoff\", translate(\"Turn off the LED for seconds(s)\"), translate(\"Specify for how long the LED should be off.\"))\ntimeoff.rmempty = false\ntimeoff.maxlength = 3\ntimeoff.default = 5\n\nreturn m\n"
  },
  {
    "path": "luci-app-sms-tool/luasrc/view/modem/atcommands.htm",
    "content": "<%+header%>\n\n<!--\n-- Copyright 2020-2022 Rafał Wabik (IceG) - From eko.one.pl forum\n-- Licensed to the GNU General Public License v3.0.\n-->\n\n\t<h2><%:AT Commands%></h2>\n\t<div class=\"cbi-map-descr\"><%:Web UI for handling AT commands via sms_tool. More information about the sms-tool on the%> <a href=\"https://eko.one.pl/?p=openwrt-sms_tool\" target=\"_blank\"><%:eko.one.pl forum%></a>.</div>\n\t<p></p>\n\t<h4><%:Sending commands to modem%></h4>\n\t<div class=\"table\" width=\"100%\">\n\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\"><%:User AT Commands%>:</div>\n\n\t\t\t<div class=\"td left\";\">\n\t\t\t\t<select name=\"ussd\" id=\"pl\" onclick=\"copyFunction()\">\n\n \t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class=\"td left\"\"></div>\n\t\t\t</div>\n\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" ><%:Command to send%>:</div>\n\t\t\t<div class=\"td left\" ><input type=\"text\" id=\"code\"></div>\n\t\t</div>\n\n\t</div>\n\n\t<div class=\"table\" width=\"100%\">\n\t\t<div class=\"td left\";\"><%:Reply%>:\n\t\t<p>\n\t\t<pre id=\"odp\" style=\"visibility: hidden;\"></pre></div>\n\n\t\t<div class=\"tr cbi-rowstyle-2\">\n\t\t<div class=\"td right\"><input type=\"button\" style=\"margin-right: 5%\"; id=\"sendcmd\" class=\"btn cbi-button cbi-button-neutral\" value=\"<%:Send Command%>\" /></div>\n\t\t</div>\n\n\t</div>\n\n<script type=\"text/javascript\">\n\nwindow.onload = function readUSER() {\n\n\n\t\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"user_atc\")%>', null,\n\t\t\tfunction(x, json)\n\t\t\t{\n\t\t\t\tselect = document.getElementById('pl');\n\n\t\t\t\tvar count = Object.keys(json).length;\n\n\n\t\t\t\t\tfor(var d=0;d<=count;d++)\n\t\t\t\t\t\t{\n    \t\t\t    \t\t\t\tvar opt = document.createElement('option');\n\t\t\t\t\t\t\tvar s = json[d].atu;\n\t\t\t\t\t\t\tvar fields = s.split(/;/);\n\t\t\t\t\t\t\tvar name = fields[0];\n\t\t\t\t\t\t\tvar code = fields[1];\n\t\t\t\t\t\t\topt.text = name;\n\t\t\t\t\t\t\topt.value = code.trim();\n    \t\t\t\t\t    \t\topt.innerHTML = name;\n    \t\t\t\t\t\t\tselect.appendChild(opt);\n\t\t\t\t\t\t}\n\n\t\t\t}\n\t\t\t);\n\n\n\n}\n\nfunction copyFunction() {\n\n  var node = document.getElementById('odp');\n  node.style.visibility = 'hidden';\n\n  var x = document.getElementById(\"pl\").value;\n  document.getElementById(\"code\").value = x;\n  document.getElementById(\"odp\").innerHTML = \"\";\n}\n\n\nfunction postcmd(cmd) {\n    (new XHR()).post(\"<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"run_at\")%>\", {\"code\":cmd}, function(x) {\n        console.log(x.response)\n        console.log(x)\n\n        var aStr = x.response;\n\t var myre = /^[\\s\\t]*(\\r\\n|\\n|\\r)/gm;\n\t var bStr = aStr.replace(myre,\"\");\n        document.getElementById(\"odp\").innerHTML = bStr;\n\t var el = document.getElementsByName(\"odp\")[0];\n\t el.value.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n\n\n    });\n    return false;\n}\n\n\ndocument.addEventListener('DOMContentLoaded', function (ev) {var button = document.getElementById(\"sendcmd\");\n        button.addEventListener(\"click\", function () {\n\n\n\t\tvar s = document.getElementById(\"code\").value;\n\t\tif ( s.length == 0 )\n\t\t{\n  \t\t\tdocument.getElementById(\"odp\").innerHTML = \"\";\n\t\t\talert(\"<%:Please enter a AT Command%>\");\n\t\t\treturn false;\n\t\t}\n\n        var cmd = document.getElementById(\"code\");\n        postcmd(cmd.value);\n        cmd.value = \"\";\n\n\t    var node = document.getElementById('odp');\n    \tif (node.style.visibility=='visible') {\n        node.style.visibility = 'hidden';\n    \t}\n    \telse\n        node.style.visibility = 'visible'\n\n        return true;\n        });\n    }, true);\n\n\n</script>\n\n<%+footer%>\n\n"
  },
  {
    "path": "luci-app-sms-tool/luasrc/view/modem/readsms.htm",
    "content": "<%\n\tlocal util = require \"luci.util\"\n\tlocal fs = require \"nixio.fs\"\n\tlocal sys = require \"luci.sys\"\n\tlocal http = require \"luci.http\"\n\tlocal dispatcher = require \"luci.dispatcher\"\n\tlocal uci = require \"luci.model.uci\".cursor()\n\n\tlocal devv = tostring(uci:get(\"sms_tool\", \"general\", \"readport\"))\n\tlocal smsmem = tostring(uci:get(\"sms_tool\", \"general\", \"storage\"))\n\tlocal sms = tostring(luci.sys.exec(\"sms_tool -s\" .. smsmem .. \" -d \" .. devv .. \" -f '%Y-%m-%d %H:%M' -j recv 2>/dev/null\"))\n\tlocal smsmer = tostring(uci:get(\"sms_tool\", \"general\", \"mergesms\"))\n\tlocal directx = tostring(uci:get(\"sms_tool\", \"general\", \"direction\"))\n\tlocal algox = tostring(uci:get(\"sms_tool\", \"general\", \"algorithm\"))\n\tlocal smscuta = string.sub (sms, 8)\n\tlocal smscut = smscuta:sub(1, #smscuta - 2)\n\tlocal statusb = luci.util.exec(\"sms_tool -s\" .. smsmem .. \" -d \".. devv .. \" status\")\n\tlocal all = statusb:match('[^: ]+$')\n\tlocal location = \"\"\n\n\tlocal l = string.sub (statusb, 15, 16)\n\tif l == \"SM\" then\n      \t\tlocation = translate(\"SIM card\")\n \tend\n\tif l == \"ME\" then\n      \t\tlocation = translate(\"Modem memory\")\n \tend\n-%>\n\t\n<%+header%>\n\n<!--\n-- Copyright 2020-2023 Rafał Wabik (IceG) - From eko.one.pl forum\n-- Licensed to the GNU General Public License v3.0.\n-->\n\n<style>\n\ntable {\n  border-collapse: collapse;\n  width: 100%;\n}\n\nth, td {\n  border-bottom: 1px solid var(--border-color-medium);\n  font-size: 12px;\n  padding: 10px;\n  text-align: justify;\n  display: table-cell;\n  vertical-align: top;\n}\n\ntd input[type=\"checkbox\"] {\n    float: left;\n    margin: 0 auto;\n    width: 40%;\n}\n\ntr:nth-child(odd) {background-color: var(--background-color-medium)}\n\n</style>\n\n<script type=\"text/javascript\">//<![CDATA[\n\n\twindow.onload = function readSMS() {\n\n\t\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"readsim\")%>', null,\n\t\t\tfunction(x, sim)\n\t\t\t{\n\t\t\tvar vn = parseInt(sim.use) || 0;\n\t\t\tvar mn = parseInt(sim.all) || 100;\n\t\t\tvar pc = Math.floor((100 / mn) * vn);\n\t\t\tdocument.getElementById('usse').innerHTML=sim.use  + \" / \" + sim.all + \" \" + '('+ pc + '%)';\n\t\t\t}\n\t\t\t);\n\n\t\t\tvar msgm = <%=smsmer%>;\n\t\t\tvar algo = \"<%=algox%>\";\n\t\t\tvar direct = \"<%=directx%>\";\n\n\t\t\tif ( msgm == \"0\" ) {\n\n\t\t\tvar array = <%=smscut%>;\n\t\t\tvar sortedData = array .sort((function (a, b) { return new Date(b.timestamp) - new Date(a.timestamp) }));\n\t\t\tvar table = document.getElementById(\"smsTable\");\n\t\t\tvar data = JSON.stringify(sortedData);\n\t\t\tvar json = JSON.parse(data);\n\n\t\t\tvar x = <%=all%>;\n        \t\tfor (var d = 0; d < json.length; d++) {\n\n            \t\t\t\t\trow = table.insertRow(-1);\n  \t\t\t\t\t\tvar cell1 = row.insertCell(0);\n  \t\t\t\t\t\tvar cell2 = row.insertCell(0);\n  \t\t\t\t\t\tvar cell3 = row.insertCell(0);\n  \t\t\t\t\t\tvar cell4 = row.insertCell(0);\n\t\t\t\t\t\tcell4.innerHTML = \"<input type='checkbox' name='smsn' id=\"+\"btn\"+json[d].index+\" /><img src='<%=resource%>/icons/delsms.png'>\"\n \t\t\t\t \t\tcell3.innerHTML = json[d].sender;\n  \t\t\t\t\t\tcell2.innerHTML = json[d].timestamp;\n    \t\t\t\t\t\tcell1.innerHTML = json[d].content;\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( msgm == \"1\" ) {\n\n\t\t\t\tif (algo == 'Simple') {\n\n\t\t\t\t\tvar array = <%=smscut%>;\n\t\t\t\t\tvar sortedData = array .sort((function (a, b) { return new Date(b.timestamp) - new Date(a.timestamp) }));\n\t\t\t\t\tvar table = document.getElementById(\"smsTable\");\n\n\t\t\t\t\tvar MergeMySMS = sortedData;\n    \t\t\t\t\tresult = [];\n\n\t\t\t\t\tMergeMySMS.forEach(function (o) {\n    \t\t\t\t\tif (!this[o.sender]) {\n        \t\t\t\tthis[o.sender] = { index: o.index, sender: o.sender, timestamp: o.timestamp, part: o.part, total: o.total, content: o.content };\n        \t\t\t\tresult.push(this[o.sender]);\n        \t\t\t\treturn;\n    \t\t\t\t\t}\n\t\t\t\t\tif (this[o.sender].total == o.total && this[o.sender].part > 0) {\n    \t\t\t\t\tthis[o.sender].content += o.content;\n    \t\t\t\t\tthis[o.sender].index += '-' + o.index;}\n\t\t\t\t\telse {\n\t\t\t\t\tthis[o.sender] = { index: o.index, sender: o.sender, timestamp: o.timestamp, part: o.part, total: o.total, content: o.content };\n        \t\t\t\tresult.push(this[o.sender]);\n        \t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t}, Object.create(null));\n\n\t\t\t\t\tvar data = JSON.stringify(result);\n\t\t\t\t\tvar json = JSON.parse(data);\n\n\t\t\t\t}\n\n\t\t\t\tif (algo == 'Advanced') {\n\n\t\t\t\t\tvar array = <%=smscut%>;\n\t\t\t\t\tvar table = document.getElementById(\"smsTable\");\n\n    \t\t\t\t\tresult = [];\n\n\t\t\t\t\t\t\t\t\t\t\t\tswitch (direct) {\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'Start':\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar Data = array.sort((a, b) => {\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (a.timestamp === b.timestamp && a.sender === b.sender) {\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn a.part - b.part;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (a.timestamp === b.timestamp) {\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn a.sender - b.sender;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn a.timestamp.localeCompare(b.timestamp);\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'End':\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar Data = array.sort((a, b) => {\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (a.timestamp === b.timestamp && a.sender === b.sender) {\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn b.part - a.part;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (a.timestamp === b.timestamp) {\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn a.sender - b.sender;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn a.timestamp.localeCompare(b.timestamp);\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar SortedSMS = Data.sort((function (a, b) { return new Date(b.timestamp) - new Date(a.timestamp) }));\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar combinedjson = {};\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (const parts of SortedSMS) {\n  \t\t\t\t\t\t\t\t\t\t\t\t\tconst { sender, timestamp, total, content, index } = parts;\n  \t\t\t\t\t\t\t\t\t\t\t\t\tconst key = `${sender}-${timestamp}-${total}`;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\tif (combinedjson[key]) {\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcombinedjson[key].content += content;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcombinedjson[key].index += '-'+index;\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcombinedjson[key] = { sender, timestamp, total, content, index };\n  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvar result = Object.values(combinedjson);\n\n\t\t\t\t\tvar data = JSON.stringify(result);\n\t\t\t\t\tvar json = JSON.parse(data);\n\n\t\t\t\t}\n\n\t\t\tvar x = <%=all%>;\n        \t\tfor (var d = 0; d < json.length; d++) {\n\n            \t\t\t\t\trow = table.insertRow(-1);\n  \t\t\t\t\t\tvar cell1 = row.insertCell(0);\n  \t\t\t\t\t\tvar cell2 = row.insertCell(0);\n  \t\t\t\t\t\tvar cell3 = row.insertCell(0);\n  \t\t\t\t\t\tvar cell4 = row.insertCell(0);\n\t\t\t\t\t\tcell4.innerHTML = \"<input type='checkbox' name='smsn' id=\"+\"btn\"+json[d].index+\" /><img src='<%=resource%>/icons/delsms.png'>\"\n \t\t\t\t \t\tcell3.innerHTML = json[d].sender;\n  \t\t\t\t\t\tcell2.innerHTML = json[d].timestamp;\n    \t\t\t\t\t\tcell1.innerHTML = json[d].content;\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\n\t}\n\n\nfunction refreshSMS() {\nwindow.location.reload();\n}\n\nfunction toggle(source) {\n    var checkboxes = document.querySelectorAll('input[type=\"checkbox\"]');\n    for (var i = 0; i < checkboxes.length; i++) {\n        if (checkboxes[i] != source)\n            checkboxes[i].checked = source.checked;\n    }\n}\n\n\nfunction delete_new()\n{\nif (document.querySelectorAll('input[name=\"smsn\"]:checked').length === document.querySelectorAll('input[name=\"smsn\"]').length) {\n\n            \tif (confirm(\"<%:Delete all the messages?%>\")) {\n\t\tvar rowCount = smsTable.rows.length;\n\t\tdocument.getElementById('usse').innerHTML = \"0\"  + \" / \" + <%=all%>;\n\t\tfor (var i = rowCount - 1; i > 0; i--) {\n            \t\tsmsTable.deleteRow(i);}\n\n\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"delete_all\")%>/' , null,\n\n\t\t\tfunction()\n\t\t\t{\n\t\t\tdocument.getElementById('usse').innerHTML = \"0\"  + \" / \" + <%=all%> + \" \" + '(0%)';\n\t\t\t}\n\t\t);\n\n\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"countsms\")%>/' , null,\n\n\t\t\tfunction()\n\t\t\t{\n\t\t\t}\n\t\t);\n\t\treturn false;\n\t\t}\n\n\n        } else {\n\n\t\tif (document.querySelectorAll('input[name=\"smsn\"]:checked').length == 0){\n    \t\talert('<%:Please select the message(s) to be deleted%>');   \n\t\t} else {\n\n                var items = document.getElementsByName(\"smsn\");\n                var selectedItems = \"\";\n                for (var i = 0; i < items.length; i++) {\n                    if (items[i].type == \"checkbox\" && items[i].checked == true) selectedItems += items[i].id + \"\\n\";\n                }\n\t\t  smsindex = selectedItems.replace(/\\s/g, '');\n\n\tif (confirm(\"<%:Delete selected message(s)?%>\")) {\n\n\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"delete_one\")%>/' + smsindex, null,\n\n\t\t\tfunction()\n\t\t\t{\n       \t\t\tvar table = document.getElementById(\"smsTable\");\n  \t\t\tvar index = 1;\n  \t\t\twhile (index < table.rows.length) {\n\n    \t\t\tvar input = table.rows[index].cells[0].children[0];\n      \t\t\tif (input && input.checked) {\n      \t\t\ttable.deleteRow(index);\n    \t\t\t}\n    \t\t\telse {\n      \t\t\tindex++;\n  \t\t\t}\n        \t\t}\n\n\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"readsim\")%>', null,\n\t\t\tfunction(x, sim)\n\t\t\t{\n\t\t\tvar vn = parseInt(sim.use) || 0;\n\t\t\tvar mn = parseInt(sim.all) || 100;\n\t\t\tvar pc = Math.floor((100 / mn) * vn);\n\t\t\tdocument.getElementById('usse').innerHTML=sim.use  + \" / \" + sim.all + \" \" + '('+ pc + '%)';\n\n\t\t\t}\n\t\t\t);\n\t\t\t}\n\n\t\t);\n\n\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"countsms\")%>/' , null,\n\n\t\t\tfunction()\n\t\t\t{\n\t\t\t}\n\t\t);\n\t\treturn false;\n\t\t}\n        }\n\t}\n}\n\n//]]></script>\n\n<h2><%:SMS Messages%></h2>\n\t<div class=\"cbi-map-descr\"><%:Web UI for receiveling messages via sms_tool. More information about the sms-tool on the%> <a href=\"https://eko.one.pl/?p=openwrt-sms_tool\" target=\"_blank\"><%:eko.one.pl forum%></a>.</div>\n\t<p></p>\n\t<h4><%:Received Messages%></h4>\n\t<div class=\"table\" width=\"100%\">\n\t<div class=\"tr\"><div class=\"td left\" width=\"33%\"><%:Messages store in%>:</div><div class=\"td left\"><%=location%></div></div>\n\t<div class=\"tr\"><div class=\"td left\" width=\"33%\"><%:Messages (Inbox / Maximum)%>:</div><div class=\"td left\" id=\"usse\"></div></div>\n\t</div>\n\n\t<table id=\"smsTable\" width=\"100%\" class=\"table\">\n  \t<tr class=\"tr cbi-rowstyle-2\">\n\n    \t<td class=\"td left\" width=\"7%\"><input type='checkbox' id='allcheck' onclick='toggle(this);'/></td>\n    \t<td class=\"td left\" width=\"11%\"><strong><%:From%></strong></td>\n    \t<td class=\"td left\" width=\"15%\"><strong><%:Received%></strong></td>\n    \t<td class=\"td center\" width=\"66%\" ><strong><%:Message%></strong></td>\n\n \t</tr>\n\t</table>\n\n\t<div class=\"table\" width=\"100%\" >\n    \t<div class=\"tr cbi-rowstyle-2\">\n\t\n\t<div class=\"td right\" style=\"width:100%;\">\n\t<div style=\"float: left;\"></div>\n\t<input type=\"button\" id=\"delbtn\" class=\"btn cbi-button cbi-button-neutral\" value=\"<%:Refresh SMS%>\" onclick=\"refreshSMS()\" />&nbsp;&nbsp;&nbsp;<input type=\"button\" id=\"delabtn\" class=\"btn cbi-button cbi-button-neutral\" value=\"<%:Delete message(s)%>\" onclick=\"delete_new()\" />\n\n\t</div>\n\t</div>\n\n<%+footer%>\n\n"
  },
  {
    "path": "luci-app-sms-tool/luasrc/view/modem/sendsms.htm",
    "content": "<%\n\tlocal util = require \"luci.util\"\n\tlocal sys = require \"luci.sys\"\n\tlocal uci = require \"luci.model.uci\".cursor()\n\n\tlocal pon = tostring(uci:get(\"sms_tool\", \"general\", \"prefix\"))\n\tlocal pnumber = tostring(uci:get(\"sms_tool\", \"general\", \"pnumber\"))\n\tlocal info = tostring(uci:get(\"sms_tool\", \"general\", \"information\"))\n\n-%>\n\n<%+header%>\n\n<!--\n-- Copyright 2020-2022 Rafał Wabik (IceG) - From eko.one.pl forum\n-- Licensed to the GNU General Public License v3.0.\n-->\n\n<style>\n\ntextarea {\n   height:120px;\n   max-height:120px;\n   min-height:120px;\n   min-width:100%;\n   resize:vertical;\n   }\n\n}\n\n</style>\n\n<script type=\"text/javascript\">//<![CDATA[\n\n\nwindow.onload = function prefiksSMS() {\n\n\t\tvar phk = document.getElementById(\"numer\").value;\n\t\tvar on = <%=pon%>;\n\n\t\tvar msg = <%=info%>;\n\n\t\tvar pfixnum = document.getElementById(\"numer\");\n\t\tif ( on == \"1\" ) {\n\t\tvar phn2 = <%=pnumber%>;\n\t\tpfixnum.value = phn2;\n\t\t}\n\n\t\tif ( msg == \"1\" ) {\n\t\talert(\"<%:The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix.%>\");\n\t\t}\n\n\n\nXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"user_phonebook\")%>', null,\n\t\t\tfunction(x, json)\n\t\t\t{\n\t\t\t\tselect = document.getElementById('pb');\n\t\t\t\tvar opt = document.createElement('option');\n\t\t\t\topt.text = phn2;\n\t\t\t\topt.value = phn2;\n    \t\t\topt.innerHTML = \">\";\n    \t\t\tselect.appendChild(opt);\n    \t\t\t    \t\n\t\t\t\tvar countpb = Object.keys(json).length;\n\n\n\t\t\t\t\tfor(var d=0;d<=countpb;d++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar opt = document.createElement('option');\n\t\t\t\t\t\t\tvar s = json[d].phb;\n\t\t\t\t\t\t\tvar fields = s.split(/;/);\n\t\t\t\t\t\t\tvar name = fields[0];\n\t\t\t\t\t\t\tvar number = fields[1];\n\t\t\t\t\t\t\topt.text = name;\n\t\t\t\t\t\t\topt.value = number.trim();\n    \t\t\t\t\t\t\topt.innerHTML = name;\n    \t\t\t\t\t\t\tselect.appendChild(opt);\n\t\t\t\t\t\t}\n\n\t\t\t}\n\t\t\t);\n\n\n\n\n}\n\n\nfunction copyFunction2() {\n\n \tvar x = document.getElementById(\"pb\").value;\n     \tdocument.getElementById(\"numer\").value = x;\n     \tdocument.getElementById(\"odp\").innerHTML = \"\";\n\n\n}\n\n\nfunction count_replace(obj) {\n\n        document.getElementById('counter').innerHTML = (160 - document.getElementById('smstxt').value.length);\n\n\tobj.value = obj.value.replace(/ą/g, 'a').replace(/Ą/g, 'A');\n        obj.value = obj.value.replace(/ć/g, 'c').replace(/Ć/g, 'C')\n        obj.value = obj.value.replace(/ę/g, 'e').replace(/Ę/g, 'E')\n        obj.value = obj.value.replace(/ł/g, 'l').replace(/Ł/g, 'L')\n        obj.value = obj.value.replace(/ń/g, 'n').replace(/Ń/g, 'N')\n        obj.value = obj.value.replace(/ó/g, 'o').replace(/Ó/g, 'O')\n        obj.value = obj.value.replace(/ś/g, 's').replace(/Ś/g, 'S')\n        obj.value = obj.value.replace(/ż/g, 'z').replace(/Ż/g, 'Z')\n        obj.value = obj.value.replace(/ź/g, 'z').replace(/Ź/g, 'Z');\n\tdocument.getElementById(\"odp\").innerHTML = \"\";\n\n}\n\nfunction codsp() {\n\n\t\tdocument.getElementById(\"odp\").innerHTML = \"\";\n\n}\n\n\n\nfunction postcmd(cmd) {\n    (new XHR()).post(\"<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"run_sms\")%>\", {\"scode\":cmd}, function(x) {\n        console.log(x.response)\n        console.log(x)\n\t \tvar cut = x.response;\n\t\tcut = cut.substr(0, 20);\n\tif ( cut == \"sms sent sucessfully\" ) {\n        document.getElementById(\"odp\").innerHTML = \"<%:SMS sent sucessfully%>\"};\n\n    });\n    return false;\n}\n\n\ndocument.addEventListener('DOMContentLoaded', function (ev) {var button = document.getElementById(\"sendsms\");\n        button.addEventListener(\"click\", function () {\n\n\n\t\tvar ph = document.getElementById(\"numer\").value;\n\t\tif ( ph.length < 2 || ph.length == 0 )\n\t\t{\n  \t\t\tdocument.getElementById(\"odp\").innerHTML = \"\";\n\t\t\talert(\"<%:Please enter phone number%>\");\n\t\t\treturn false;\n\t\t}\n\n\t\tph = ph.trim();\n\n\t\tif ( isNaN(ph) )\n\t\t{\n\t\t\talert(\"<%:Please correct phone number%>\");\n\t\t\treturn false;\n\t\t}\n\n\t\tvar num = ph.concat(\"                    \");\n\t\tnum = num.substr(0, 20);\n\n\t\tvar tm = document.getElementById(\"smstxt\").value;\n\t\tif ( tm.length == 0 )\n\t\t{\n\t\t\talert(\"<%:Please enter a message text%>\");\n\t\t\treturn false;\n\t\t}\n\t\tnum = num.concat(tm);\n        \tpostcmd(num);\n\t \t    var delsms = document.getElementById(\"smstxt\");\n\t\t    var delnum = document.getElementById(\"numer\");\n\t\t\tdocument.getElementById('counter').innerHTML = \"160\";\n\t\t    delsms.value = \"\";\n\t\t    delnum.value = \"\";\n\n\t\tvar on = <%=pon%>;\n\t\tvar pfixnum = document.getElementById(\"numer\");\n\t\tif ( on == \"1\" ) {\n\t\tvar phn2 = <%=pnumber%>;\n\t\tpfixnum.value = phn2;\n\t\t}\n\n        \treturn true;\n        });\n    }, true);\n\n\n//]]></script>\n\n\n\t<h2><%:SMS Messages%></h2>\n\t<div class=\"cbi-map-descr\"><%:Web UI for sending messages via sms_tool. More information about the sms-tool on the%> <a href=\"https://eko.one.pl/?p=openwrt-sms_tool\" target=\"_blank\"><%:eko.one.pl forum%></a>.</div>\n\t<p></p>\n\t\n\t<h4><%:Send Messages%></h4>\n\n\t<div class=\"table\">\n\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" ><%:User Phonebook%>:</div>\n\t\t\t<div class=\"td left\" >\n\n\t\t\t\t<select name=\"ussd\" id=\"pb\" onchange=\"copyFunction2()\">\n\n \t\t\t\t</select>\n</div>\n\t\t\t<div class=\"td left\" ></div>\n\t\t</div>\n\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" ><%:Send to%>:</div>\n\t\t\t<div class=\"td left\" ><input type=\"text\" id=\"numer\" onKeyUp=\"codsp()\" placeholder=\"<%:PHONE_NUMBER%>\" required minlength=\"3\" maxlength=\"24\" size=\"11\"></div>\n\t\t\t<div class=\"td left\" ></div>\n\t\t</div>\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" ><%:Message text%>:</div>\n\t\t\t<div class=\"td left\" ><textarea id=\"smstxt\" onKeyUp=\"count_replace(this)\" required></textarea><div id=\"counter\">160</div></div>\n\t\t\t<div class=\"td left\" ></div>\n\t\t</div>\n\t\t\t\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" ><%:Status%>:</div><div class=\"td left\" id=\"odp\"></div>\n\n\t\t</div>\n\n\t</div>\n\t<div class=\"table\">\n\n\t\t<div class=\"tr cbi-rowstyle-2\">\n\t\t<div class=\"td right\"><input type=\"button\" style=\"margin-right: 5%\"; id=\"sendsms\" class=\"btn cbi-button cbi-button-neutral\" value=\"<%:Send Message%>\" /></div>\n\t\t</div>\n\n\t</div>\n\n\n\n<%+footer%>\n"
  },
  {
    "path": "luci-app-sms-tool/luasrc/view/modem/ussd.htm",
    "content": "<%\n\tlocal util = require \"luci.util\"\n\tlocal fs = require \"nixio.fs\"\n\tlocal sys = require \"luci.sys\"\n\tlocal http = require \"luci.http\"\n\tlocal dispatcher = require \"luci.dispatcher\"\n\tlocal uci = require \"luci.model.uci\".cursor()\n\n-%>\n\n\n<%+header%>\n\n<!--\n-- Copyright 2020-2022 Rafał Wabik (IceG) - From eko.one.pl forum\n-- Licensed to the GNU General Public License v3.0.\n-->\n\n\t<h2><%:USSD Codes%></h2>\n\t<div class=\"cbi-map-descr\"><%:Web UI for handling USSD codes via sms_tool. More information about the sms-tool on the%> <a href=\"https://eko.one.pl/?p=openwrt-sms_tool\" target=\"_blank\"><%:eko.one.pl forum%></a>.</div>\n\t<p></p>\n\t<h4><%:Sending USSD codes%></h4>\n\t<div class=\"table\" width=\"100%\">\n\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" width=\"25%\"><%:User USSD Codes%>:</div>\n\n\t\t\t<div class=\"td left\" >\n\t\t\t\t<select name=\"ussd\" id=\"pl\" onclick=\"copyFunction()\">\n\n \t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class=\"td left\" ></div>\n\t\t\t</div>\n\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" ><%:Code to send%>:</div>\n\t\t\t<div class=\"td left\" ><input type=\"text\" id=\"code\" required size=\"20\"></div>\n\n\t\t</div>\n\t\t<div class=\"tr\">\n\t\t\t<div class=\"td left\" ><%:Reply%>:</div><div class=\"td left\" ><pre id=\"odp\" style=\"visibility: hidden;\"></pre></div>\n\n\t\t</div>\n\t</div>\n\n\t<div class=\"table\" width=\"100%\">\n\t\t<div class=\"tr cbi-rowstyle-2\">\n\t\t<div class=\"td right\"><input type=\"button\" style=\"margin-right: 5%\"; id=\"sendussd\" class=\"btn cbi-button cbi-button-neutral\" value=\"<%:Send Code%>\" /></div>\n\t\t</div>\n\n\t</div>\n\n<script type=\"text/javascript\">//<![CDATA[\n\n\nwindow.onload = function readUSER() {\n\n\n\t\t\tXHR.get('<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"user_ussd\")%>', null,\n\t\t\tfunction(x, json)\n\t\t\t{\n\t\t\t\tselect = document.getElementById('pl');\n\n\t\t\t\tvar count = Object.keys(json).length;\n\n\n\t\t\t\t\tfor(var d=0;d<=count;d++)\n\t\t\t\t\t\t{\n    \t\t\t    \t\t\t\tvar opt = document.createElement('option');\n\t\t\t\t\t\t\tvar s = json[d].usd;\n\t\t\t\t\t\t\tvar fields = s.split(/;/);\n\t\t\t\t\t\t\tvar name = fields[0];\n\t\t\t\t\t\t\tvar code = fields[1];\n\t\t\t\t\t\t\topt.text = name;\n\t\t\t\t\t\t\topt.value = code.trim();\n    \t\t\t\t\t    \t\topt.innerHTML = name;\n    \t\t\t\t\t\t\tselect.appendChild(opt);\n\t\t\t\t\t\t}\n\n\t\t\t}\n\t\t\t);\n\n\n\n}\n\nfunction copyFunction() {\n  var node = document.getElementById('odp');\n  node.style.visibility = 'hidden';\n  \n  var x = document.getElementById(\"pl\").value;\n  document.getElementById(\"code\").value = x;\n  document.getElementById(\"odp\").innerHTML = \"\";\n}\n\nfunction postcmd(cmd) {\n    (new XHR()).post(\"<%=luci.dispatcher.build_url(\"admin\", \"modem\", \"sms\", \"run_ussd\")%>\", {\"code\":cmd}, function(x) {\n        console.log(x.response)\n        console.log(x)\n\t \tvar cut = x.response;\n\t\tif ( true == cut.includes(\"error: 0\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Phone/Modem failure.%>\"};\n\t\tif ( true == cut.includes(\"error: 1\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:No connection to phone.%>\"};\n\t\tif ( true == cut.includes(\"error: 2\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Phone/Modem adapter link reserved.%>\"};\n\t\tif ( true == cut.includes(\"error: 3\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Operation not allowed.%>\"};\n\t\tif ( true == cut.includes(\"error: 4\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Operation not supported.%>\"};\n\t\tif ( true == cut.includes(\"error: 5\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:PH_SIM PIN required.%>\"};\n\t\tif ( true == cut.includes(\"error: 6\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:PH_FSIM PIN required.%>\"};\n\t\tif ( true == cut.includes(\"error: 7\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:PH_FSIM PUK required.%>\"};\n\t\tif ( true == cut.includes(\"error: 10\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM not inserted.%>\"};\n\t\tif ( true == cut.includes(\"error: 11\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM PIN required.%>\"};\n\t\tif ( true == cut.includes(\"error: 12\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM PUK required.%>\"};\n\t\tif ( true == cut.includes(\"error: 13\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM failure.%>\"};\n\t\tif ( true == cut.includes(\"error: 14\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM busy.%>\"};\n\t\tif ( true == cut.includes(\"error: 15\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM wrong.%>\"};\n\t\tif ( true == cut.includes(\"error: 16\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Incorrect password.%>\"};\n\t\tif ( true == cut.includes(\"error: 17\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM PIN2 required.%>\"};\n\t\tif ( true == cut.includes(\"error: 18\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM PUK2 required.%>\"};\n\t\tif ( true == cut.includes(\"error: 20\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Memory full.%>\"};\n\t\tif ( true == cut.includes(\"error: 21\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Invalid index.%>\"};\n\t\tif ( true == cut.includes(\"error: 22\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Not found.%>\"};\n\t\tif ( true == cut.includes(\"error: 23\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Memory failure.%>\"};\n\t\tif ( true == cut.includes(\"error: 24\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Text string too long.%>\"};\n\t\tif ( true == cut.includes(\"error: 25\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Invalid characters in text string.%>\"};\n\t\tif ( true == cut.includes(\"error: 26\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Dial string too long.%>\"};\n\t\tif ( true == cut.includes(\"error: 27\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Invalid characters in dial string.%>\"};\n\t\tif ( true == cut.includes(\"error: 30\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:No network service.%>\"};\n\t\tif ( true == cut.includes(\"error: 31\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Network timeout.%>\"};\n\t\tif ( true == cut.includes(\"error: 32\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Network not allowed, emergency calls only.%>\"};\n\t\tif ( true == cut.includes(\"error: 40\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Network personalization PIN required.%>\"};\n\t\tif ( true == cut.includes(\"error: 41\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Network personalization PUK required.%>\"};\n\t\tif ( true == cut.includes(\"error: 42\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Network subset personalization PIN required.%>\"};\n\t\tif ( true == cut.includes(\"error: 43\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Network subset personalization PUK required.%>\"};\n\t\tif ( true == cut.includes(\"error: 44\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Service provider personalization PIN required.%>\"};\n\t\tif ( true == cut.includes(\"error: 45\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Service provider personalization PUK required.%>\"};\n\t\tif ( true == cut.includes(\"error: 46\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Corporate personalization PIN required.%>\"};\n\t\tif ( true == cut.includes(\"error: 47\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Corporate personalization PUK required.%>\"};\n\t\tif ( true == cut.includes(\"error: 48\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:PH-SIM PUK required.%>\"};\n\t\tif ( true == cut.includes(\"error: 100\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Unknown error.%>\"};\n\t\tif ( true == cut.includes(\"error: 103\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Illegal MS.%>\"};\n\t\tif ( true == cut.includes(\"error: 106\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Illegal ME.%>\"};\n\t\tif ( true == cut.includes(\"error: 107\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:GPRS services not allowed.%>\"};\n\t\tif ( true == cut.includes(\"error: 111\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:PLMN not allowed.%>\"};\n\t\tif ( true == cut.includes(\"error: 112\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Location area not allowed.%>\"};\n\t\tif ( true == cut.includes(\"error: 113\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Roaming not allowed in this location area.%>\"};\n\t\tif ( true == cut.includes(\"error: 126\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Operation temporary not allowed.%>\"};\n\t\tif ( true == cut.includes(\"error: 132\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Service operation not supported.%>\"};\n\t\tif ( true == cut.includes(\"error: 133\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Requested service option not subscribed.%>\"};\n\t\tif ( true == cut.includes(\"error: 134\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Service option temporary out of order.%>\"};\n\t\tif ( true == cut.includes(\"error: 148\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Unspecified GPRS error.%>\"};\n\t\tif ( true == cut.includes(\"error: 149\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:PDP authentication failure.%>\"};\n\t\tif ( true == cut.includes(\"error: 150\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Invalid mobile class.%>\"};\n\t\tif ( true == cut.includes(\"error: 256\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Operation temporarily not allowed.%>\"};\n\t\tif ( true == cut.includes(\"error: 257\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Call barred.%>\"};\n\t\tif ( true == cut.includes(\"error: 258\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Phone/Modem is busy.%>\"};\n\t\tif ( true == cut.includes(\"error: 259\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:User abort.%>\"};\n\t\tif ( true == cut.includes(\"error: 260\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Invalid dial string.%>\"};\n\t\tif ( true == cut.includes(\"error: 261\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SS not executed.%>\"};\n\t\tif ( true == cut.includes(\"error: 262\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM Blocked.%>\"};\n\t\tif ( true == cut.includes(\"error: 263\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Invalid block.%>\"};\n\t\tif ( true == cut.includes(\"error: 527\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Please wait, and retry your selection later (Specific Modem Sierra).%>\"};\n\t\tif ( true == cut.includes(\"error: 528\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Location update failure – emergency calls only (Specific Modem Sierra).%>\"};\n\t\tif ( true == cut.includes(\"error: 529\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:Selection failure – emergency calls only (Specific Modem Sierra).%>\"};\n\t\tif ( true == cut.includes(\"error: 772\") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = \"<%:SIM powered down.%>\"};\n\t\tif ( true != cut.includes(\"error: \") ) {\n        \t\tdocument.getElementById(\"odp\").innerHTML = x.response};\n\n    });\n    return false;\n}\n\ndocument.addEventListener('DOMContentLoaded', function (ev) {var button = document.getElementById(\"sendussd\");\n        button.addEventListener(\"click\", function () {\n\n\n\t\tvar s = document.getElementById(\"code\").value;\n\t\tif ( s.length == 0 )\n\t\t{\n  \t\t\tdocument.getElementById(\"odp\").innerHTML = \"\";\n\t\t\talert(\"<%:Please enter a USSD code%>\");\n\t\t\treturn false;\n\t\t}\n\n        var cmd = document.getElementById(\"code\");\n        postcmd(cmd.value);\n        cmd.value = \"\";\n\n        var node = document.getElementById('odp');\n    \tif (node.style.visibility=='visible') {\n        node.style.visibility = 'hidden';\n    \t}\n    \telse\n        node.style.visibility = 'visible'\n\n        return true;\n        });\n    }, true);\n\n\n//]]></script>\n\n<%+footer%>\n"
  },
  {
    "path": "luci-app-sms-tool/po/pl/sms-tool.po",
    "content": "﻿msgid \"\"\r\nmsgstr \"Content-Type: text/plain; charset=UTF-8\"\r\n\r\n\"Language: pl\\n\"\r\n\"Last-Translator: Rafał Wabik (IceG) - From eko.one.pl forum\\n\"\r\n\r\nmsgid \"SMS Messages\"\r\nmsgstr \"Wiadomości SMS\"\r\n\r\nmsgid \"Received Messages\"\r\nmsgstr \"Odebrane wiadomości\"\r\n\r\nmsgid \"Send Messages\"\r\nmsgstr \"Wysyłanie wiadomości\"\r\n\r\nmsgid \"USSD\"\r\nmsgstr \"USSD\"\r\n\r\nmsgid \"From\"\r\nmsgstr \"Nadawca\"\r\n\r\nmsgid \"Received\"\r\nmsgstr \"Odebrano\"\r\n\r\nmsgid \"Message\"\r\nmsgstr \"Wiadomość\"\r\n\r\nmsgid \"Configuration\"\r\nmsgstr \"Ustawienia\"\r\n\r\nmsgid \"Sample codes\"\r\nmsgstr \"Przykładowe kody\"\r\n\r\nmsgid \"Sending USSD codes\"\r\nmsgstr \"Wysyłanie kodów USSD\"\r\n\r\nmsgid \"Please enter phone number\"\r\nmsgstr \"Proszę podać numer telefonu\"\r\n\r\nmsgid \"Please correct phone number\"\r\nmsgstr \"Proszę poprawić numer telefonu\"\r\n\r\nmsgid \"Please enter a message text\"\r\nmsgstr \"Proszę podać treść wiadomości\"\r\n\r\nmsgid \"Please select the message(s) to be deleted\"\r\nmsgstr \"Proszę wybrać wiadomość(-ci) do usunięcia\"\r\n\r\nmsgid \"Reply\"\r\nmsgstr \"Odpowiedź\"\r\n\r\nmsgid \"SMS sent sucessfully\"\r\nmsgstr \"SMS został wysłany\"\r\n\r\nmsgid \"Please enter a USSD code\"\r\nmsgstr \"Proszę podać kod do wysłania\"\r\n\r\nmsgid \"Delete selected message(s)?\"\r\nmsgstr \"Usunąć wybraną(-e) wiadomość(-ci)?\"\r\n\r\nmsgid \"Delete all the messages?\"\r\nmsgstr \"Usunąć wszystkie wiadomości?\"\r\n\r\nmsgid \"Configuration sms-tool\"\r\nmsgstr \"Konfiguracja sms-tool\"\r\n\r\nmsgid \"Configuration panel for sms_tool and gui application.\"\r\nmsgstr \"Panel ustawień dla aplikacji sms_tool oraz dla interfejsu użytkownika.\"\r\n\r\nmsgid \"Device\"\r\nmsgstr \"Urządzenie\"\r\n\r\nmsgid \"Web UI for receiveling messages via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Interfejs użytkownika dla sms_tool do odbierania wiadomości SMS. Więcej informacji o sms-tool na\"\r\n\r\nmsgid \"Web UI for sending messages via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Interfejs użytkownika dla sms_tool do wysyłania wiadomości SMS. Więcej informacji o sms-tool na\"\r\n\r\nmsgid \"Web UI for handling USSD codes via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Interfejs użytkownika dla sms_tool do obsługi kodów USSD. Więcej informacji o sms-tool na\"\r\n\r\nmsgid \"eko.one.pl forum\"\r\nmsgstr \"forum eko.one.pl\"\r\n\r\nmsgid \"SIM card\"\r\nmsgstr \"Karta SIM\"\r\n\r\nmsgid \"Modem memory\"\r\nmsgstr \"Pamięć modemu\"\r\n\r\nmsgid \"Messages store in\"\r\nmsgstr \"Miejsce przechowywania wiadomości\"\r\n\r\nmsgid \"Messages (Inbox / Maximum)\"\r\nmsgstr \"Wiadomości (Odebrane / Maksymalnie)\"\r\n\r\nmsgid \"Delete Selected\"\r\nmsgstr \"Usuń wybraną\"\r\n\r\nmsgid \"Delete message(s)\"\r\nmsgstr \"Usuń wiadomość(-ci)\"\r\n\r\nmsgid \"Delete All\"\r\nmsgstr \"Usuń wszystkie\"\r\n\r\nmsgid \"USSD Codes\"\r\nmsgstr \"Kody USSD\"\r\n\r\nmsgid \"Send to\"\r\nmsgstr \"Wyślij do\"\r\n\r\nmsgid \"Message text\"\r\nmsgstr \"Treść wiadomości\"\r\n\r\nmsgid \"Send Message\"\r\nmsgstr \"Wyślij SMS\"\r\n\r\nmsgid \"Code to send\"\r\nmsgstr \"Kod do wysłania\"\r\n\r\nmsgid \"Send Code\"\r\nmsgstr \"Wyślij kod\"\r\n\r\nmsgid \"SMS Settings\"\r\nmsgstr \"Ustawienia dla wiadomości SMS\"\r\n\r\nmsgid \"USSD Codes Settings\"\r\nmsgstr \"Ustawienia dla kodów USSD\"\r\n\r\nmsgid \"SMS Reading Port\"\r\nmsgstr \"Port do odczytu SMS\"\r\n\r\nmsgid \"SMS Sending Port\"\r\nmsgstr \"Port do wysyłania SMS\"\r\n\r\nmsgid \"USSD Sending Port\"\r\nmsgstr \"Port do wysyłania kodów USSD\"\r\n\r\nmsgid \"Add Prefix to Phone Number\"\r\nmsgstr \"Dodaj prefiks do numeru telefonu\"\r\n\r\nmsgid \"Automatically add prefix to the phone number field.\"\r\nmsgstr \"Automatycznie uzupełnij pole numeru telefonu o prefiks.\"\r\n\r\nmsgid \"Prefix Number\"\r\nmsgstr \"Numer prefiks\"\r\n\r\nmsgid \"PHONE_NUMBER\"\r\nmsgstr \"48NumerTelefonu\"\r\n\r\nmsgid \"Refresh SMS\"\r\nmsgstr \"Odśwież\"\r\n\r\nmsgid \"Sending USSD Code in plain text\"\r\nmsgstr \"Wysyłaj kod USSD jawnym tekstem\"\r\n\r\nmsgid \"Receive message without PDU decoding\"\r\nmsgstr \"Odbierz wiadomość bez dekodowania jej jako PDU\"\r\n\r\nmsgid \"Send the USSD code in plain text. Command is not being coded to the PDU.\"\r\nmsgstr \"Wysyła kod USSD jawnym tekstem. Polecenie nie jest dekodowane na PDU.\"\r\n\r\nmsgid \"Receive and display the message without decoding it as a PDU.\"\r\nmsgstr \"Odebrana wiadomość wyświetlana jest bez dekodowania jej jako PDU.\"\r\n\r\nmsgid \"Explanation of number and prefix\"\r\nmsgstr \"Wyjaśnienie dot. numeru i prefiksu\"\r\n\r\nmsgid \"In the tab for sending SMSes, show an explanation of the prefix and the correct phone number.\"\r\nmsgstr \"W zakładce umożliwiającej wysyłanie SMS-ów pokaż wyjaśnienie dotyczące prefiksu i poprawnego numeru telefonu.\"\r\n\r\nmsgid \"The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix.\"\r\nmsgstr \"Numer telefonu należy poprzedzić prefiksem kraju (dla Polski jest to 48, bez znaku '+'). Jeżeli numer jest 5, 4 lub 3 znakowy to jest on traktowany jako 'krótki' i nie należy go poprzedzać prefiksem kraju.\"\r\n\r\nmsgid \"The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix.\"\r\nmsgstr \"Numer telefonu należy poprzedzić prefiksem kraju (dla Polski jest to 48, bez znaku +). Jeżeli numer jest 5, 4 lub 3 znakowy to jest on traktowany jako krótki i nie należy go poprzedzać prefiksem kraju.\"\r\n\r\nmsgid \"Each line must have the following format: 'Contact name;Phone number'. Save to file '/etc/config/phonebook.user'.\"\r\nmsgstr \"Każda linijka powinna mieć następujący format: 'Nazwa kontaktu;Numer telefonu'. Dla wygody kontakty użytkownika zapisywane są w pliku '/etc/config/phonebook.user'.\"\r\n\r\nmsgid \"User Phonebook\"\r\nmsgstr \"Kontakty użytkownika\"\r\n\r\nmsgid \"User USSD Codes\"\r\nmsgstr \"Kody USSD użytkownika\"\r\n\r\nmsgid \"Each line must have the following format: 'Code name;Code'. Save to file '/etc/config/ussd.user'.\"\r\nmsgstr \"Każda linijka powinna mieć następujący format: 'Etykieta kodu;Kod'. Dla wygody kody użytkownika zapisywane są w pliku '/etc/config/ussd.user'.\"\r\n\r\nmsgid \"Notification Settings\"\r\nmsgstr \"Ustawienia powiadomień\"\r\n\r\nmsgid \"The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED.\"\r\nmsgstr \"Powiadomienie diodą o nowej wiadomości. Przed uruchomieniem tej funkcji proszę ustawić port odczytu wiadomości, czas sprawdzania skrzynki odbiorczej oraz wybrać diodę powiadomień.\"\r\n\r\nmsgid \"Check inbox every minute(s)\"\r\nmsgstr \"Sprawdzaj skrzynkę odbiorczą co minut(-y)\"\r\n\r\nmsgid \"Specify how many minutes you want your inbox to be checked.\"\r\nmsgstr \"Podaj co ile minut ma być sprawdzana skrzynka odbiorcza w poszukiwaniu nowych wiadomości.\"\r\n\r\nmsgid \"Notification LED\"\r\nmsgstr \"Dioda powiadomień\"\r\n\r\nmsgid \"Select the notification LED.\"\r\nmsgstr \"Wybierz diodę powiadomień.\"\r\n\r\nmsgid \"Notify new messages\"\r\nmsgstr \"Powiadomienie o nowych wiadomościach\"\r\n\r\nmsgid \"Turn on the LED for seconds(s)\"\r\nmsgstr \"Włącz diodę na sekund(-y)\"\r\n\r\nmsgid \"Turn off the LED for seconds(s)\"\r\nmsgstr \"Wyłącz diodę na sekund(-y)\"\r\n\r\nmsgid \"Specify for how long the LED should be on.\"\r\nmsgstr \"Podaj przez jaki czas dioda ma być włączona.\"\r\n\r\nmsgid \"Specify for how long the LED should be off.\"\r\nmsgstr \"Podaj przez jaki czas dioda ma być wyłączona.\"\r\n\r\nmsgid \"Merge split messages\"\r\nmsgstr \"Połącz podzielone wiadomości\"\r\n\r\nmsgid \"Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received.\"\r\nmsgstr \"Podzielone wiadomości zostaną złączone. Zaznaczenie tej opcji ułatwi czytanie SMS-ów, ale spowoduje niezgodność w ilości pokazanych, odebranych wiadomości.\"\r\n\r\nmsgid \"Message storage area\"\r\nmsgstr \"Miejsce przechowywania wiadomości\"\r\n\r\nmsgid \"Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device.\"\r\nmsgstr \"Wiadomości przechowywane są w określonym miejscu (np. na karcie SIM lub pamięci modemu), ale w zależności od typu urządzenia mogą być dostępne także inne obszary.\"\r\n\r\nmsgid \"AT Commands\"\r\nmsgstr \"Polecenia AT\"\r\n\r\nmsgid \"Web UI for handling AT commands via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Interfejs użytkownika dla sms_tool do obsługi poleceń AT. Więcej informacji o sms-tool na\"\r\n\r\nmsgid \"Sending commands to modem\"\r\nmsgstr \"Wysyłanie poleceń do modemu\"\r\n\r\nmsgid \"User AT Commands\"\r\nmsgstr \"Polecenia AT użytkownika\"\r\n\r\nmsgid \"Command to send\"\r\nmsgstr \"Polecenie do wysłania\"\r\n\r\nmsgid \"Please enter a AT Command\"\r\nmsgstr \"Proszę podać polecenie AT do wysłania\"\r\n\r\nmsgid \"AT Commands Sending Port\"\r\nmsgstr \"Port do wysyłania poleceń AT\"\r\n\r\nmsgid \"Send Command\"\r\nmsgstr \"Wyślij polecenie\"\r\n\r\nmsgid \"AT Commands Settings\"\r\nmsgstr \"Ustawienia dla poleceń AT\"\r\n\r\nmsgid \"Each line must have the following format: 'AT Command name;AT Command'. Save to file '/etc/config/atcmds.user'.\"\r\nmsgstr \"Każda linijka powinna mieć następujący format: 'Etykieta polecenia;polecenie AT'. Dla wygody polecenia użytkownika zapisywane są w pliku '/etc/config/atcmds.user'.\"\r\n\r\nmsgid \"Restart the inbox checking process every\"\r\nmsgstr \"Uruchom proces ponownie po\"\r\n\r\nmsgid \"The process will restart at the selected time interval. This will eliminate the delay in checking your inbox.\"\r\nmsgstr \"Proces zostanie uruchomiony ponownie po wybranym przez użytkownika czasie. Pozwoli to wyeliminować opóźnienie w sprawdzaniu skrzynki odbiorczej.\"\r\n\r\nmsgid \"4h\"\r\nmsgstr \"4 godz.\"\r\n\r\nmsgid \"6h\"\r\nmsgstr \"6 godz.\"\r\n\r\nmsgid \"8h\"\r\nmsgstr \"8 godz.\"\r\n\r\nmsgid \"12h\"\r\nmsgstr \"12 godz.\"\r\n\r\nmsgid \"The diode is dedicated only to these notifications\"\r\nmsgstr \"Dioda jest dedykowana tylko tym powiadomieniom\"\r\n\r\nmsgid \"Select 'No' in case the router has only one LED or if the LED is multi-tasking.\"\r\nmsgstr \"Wybierz 'Nie' w przypadku, kiedy router ma tylko jedną diodę lub gdy dioda obsługuje wiele zadań.\"\r\n\r\nmsgid \"No\"\r\nmsgstr \"Nie\"\r\n\r\nmsgid \"Yes\"\r\nmsgstr \"Tak\"\r\n\r\nmsgid \"Merge algorithm\"\r\nmsgstr \"Algorytm scalania\"\r\n\r\nmsgid \"Simple (merge without sorting)\"\r\nmsgstr \"Prosty (scala bez sortowania)\"\r\n\r\nmsgid \"Advanced (merges with sorting)\"\r\nmsgstr \"Zaawansowany (scala z sortowaniem)\"\r\n\r\nmsgid \"Direction of message merging\"\r\nmsgstr \"Kierunek łączenia wiadomości\"\r\n\r\nmsgid \"From beginning to end\"\r\nmsgstr \"Od początku do końca\"\r\n\r\nmsgid \"From end to beginning\"\r\nmsgstr \"Od końca do początku\"\r\n"
  },
  {
    "path": "luci-app-sms-tool/po/ru/sms-tool.po",
    "content": "msgid \"\"\r\nmsgstr \"Content-Type: text/plain; charset=UTF-8\"\r\n\r\n\"Language: pl\\n\"\r\n\"Last-Translator: alextuldi - From OpenWrt forum\\n\"\r\n\r\nmsgid \"SMS Messages\"\r\nmsgstr \"SMS-сообщения\"\r\n\r\nmsgid \"Received Messages\"\r\nmsgstr \"Полученные сообщения\"\r\n\r\nmsgid \"Send Messages\"\r\nmsgstr \"Отправленные сообщения\"\r\n\r\nmsgid \"USSD\"\r\nmsgstr \"USSD\"\r\n\r\nmsgid \"From\"\r\nmsgstr \"От кого\"\r\n\r\nmsgid \"Received\"\r\nmsgstr \"Получено\"\r\n\r\nmsgid \"Message\"\r\nmsgstr \"Сообщение\"\r\n\r\nmsgid \"Configuration\"\r\nmsgstr \"Настройки\"\r\n\r\nmsgid \"Sample codes\"\r\nmsgstr \"Примеры кодов\"\r\n\r\nmsgid \"Sending USSD codes\"\r\nmsgstr \"Отправка USSD кодов\"\r\n\r\nmsgid \"Please enter phone number\"\r\nmsgstr \"Пожалуйста, введите номер телефона\"\r\n\r\nmsgid \"Please correct phone number\"\r\nmsgstr \"Проверьте номер телефона\"\r\n\r\nmsgid \"Please enter a message text\"\r\nmsgstr \"Пожалуйста, введите текст сообщения\"\r\n\r\nmsgid \"Please select the message(s) to be deleted\"\r\nmsgstr \"Пожалуйста, выберите сообщение(я) для удаления\"\r\n\r\nmsgid \"Reply\"\r\nmsgstr \"Ответить\"\r\n\r\nmsgid \"SMS sent sucessfully\"\r\nmsgstr \"SMS отправлено успешно\"\r\n\r\nmsgid \"Please enter a USSD code\"\r\nmsgstr \"Пожалуйста, введите USSD-код\"\r\n\r\nmsgid \"Delete selected message(s)?\"\r\nmsgstr \"Удалить выбранные сообщения?\"\r\n\r\nmsgid \"Delete all the messages?\"\r\nmsgstr \"Удалить все сообщения?\"\r\n\r\nmsgid \"Configuration sms-tool\"\r\nmsgstr \"Настройки sms-tool\"\r\n\r\nmsgid \"Configuration panel for sms_tool and gui application.\"\r\nmsgstr \"Панель настроек для sms_tool и графического интерфейса приложения.\"\r\n\r\nmsgid \"Device\"\r\nmsgstr \"Устройство\"\r\n\r\nmsgid \"Web UI for receiveling messages via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Веб-интерфейс для приема сообщений через sms_tool. Подробнее о sms-tool на сайте\"\r\n\r\nmsgid \"Web UI for sending messages via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Веб-интерфейс для отправки сообщений через sms_tool. Подробнее о sms-tool на сайте\"\r\n\r\nmsgid \"Web UI for handling USSD codes via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Веб-интерфейс для обработки USSD-кодов через sms_tool. Подробнее о sms-tool на сайте\"\r\n\r\nmsgid \"eko.one.pl forum\"\r\nmsgstr \"eko.one.pl форум\"\r\n\r\nmsgid \"SIM card\"\r\nmsgstr \"SIM-карта\"\r\n\r\nmsgid \"Modem memory\"\r\nmsgstr \"Память модема\"\r\n\r\nmsgid \"Messages store in\"\r\nmsgstr \"Хранить сообщения в\"\r\n\r\nmsgid \"Messages (Inbox / Maximum)\"\r\nmsgstr \"Сообщения (Входящие / Максимум)\"\r\n\r\nmsgid \"Delete Selected\"\r\nmsgstr \"Удалить выбранное\"\r\n\r\nmsgid \"Delete message(s)\"\r\nmsgstr \"Удалить сообщение(я)\"\r\n\r\nmsgid \"Delete All\"\r\nmsgstr \"Удалить все\"\r\n\r\nmsgid \"USSD Codes\"\r\nmsgstr \"Коды USSD\"\r\n\r\nmsgid \"Send to\"\r\nmsgstr \"Отправить\"\r\n\r\nmsgid \"Message text\"\r\nmsgstr \"Текст сообщения\"\r\n\r\nmsgid \"Send Message\"\r\nmsgstr \"Отправить сообщение\"\r\n\r\nmsgid \"Code to send\"\r\nmsgstr \"Код для отправки\"\r\n\r\nmsgid \"Send Code\"\r\nmsgstr \"Отправить код\"\r\n\r\nmsgid \"SMS Settings\"\r\nmsgstr \"Настройки SMS\"\r\n\r\nmsgid \"USSD Codes Settings\"\r\nmsgstr \"Настройки USSD-кодов\"\r\n\r\nmsgid \"SMS Reading Port\"\r\nmsgstr \"Порт чтения SMS\"\r\n\r\nmsgid \"SMS Sending Port\"\r\nmsgstr \"Порт отправки SMS\"\r\n\r\nmsgid \"USSD Sending Port\"\r\nmsgstr \"Порт отправки USSD\"\r\n\r\nmsgid \"Add Prefix to Phone Number\"\r\nmsgstr \"Добавить префикс к номеру телефона\"\r\n\r\nmsgid \"Automatically add prefix to the phone number field.\"\r\nmsgstr \"Автоматически добавлять префикс в поле номера телефона.\"\r\n\r\nmsgid \"Prefix Number\"\r\nmsgstr \"Номер префикса\"\r\n\r\nmsgid \"PHONE_NUMBER\"\r\nmsgstr \"Номер телефона\"\r\n\r\nmsgid \"Refresh SMS\"\r\nmsgstr \"Обновить SMS\"\r\n\r\nmsgid \"Sending USSD Code in plain text\"\r\nmsgstr \"Отправка кода USSD в виде обычного текста\"\r\n\r\nmsgid \"Receive message without PDU decoding\"\r\nmsgstr \"Получить сообщение без декодирования PDU\"\r\n\r\nmsgid \"Send the USSD code in plain text. Command is not being coded to the PDU.\"\r\nmsgstr \"Отправить код USSD в виде обычного текста. Команда не кодируется в PDU.\"\r\n\r\nmsgid \"Receive and display the message without decoding it as a PDU.\"\r\nmsgstr \"Получить и отобразить сообщение, не расшифровывая его как PDU.\"\r\n\r\nmsgid \"Explanation of number and prefix\"\r\nmsgstr \"Расшифровка номера и префикса\"\r\n\r\nmsgid \"In the tab for sending SMSes, show an explanation of the prefix and the correct phone number.\"\r\nmsgstr \"На вкладке для отправки SMS-сообщений покажите объяснение префикса и правильный номер телефона.\"\r\n\r\nmsgid \"The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix.\"\r\nmsgstr \"Перед номером телефона должен стоять префикс страны (для Польши это 48 без '+'). Если номер состоит из 5, 4 или 3 символов, он рассматривается как 'короткий' и не должен предшествовать префикс страны.\"\r\n\r\nmsgid \"The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix.\"\r\nmsgstr \"Перед номером телефона должен стоять префикс страны (для Польши это 48 без + ). Если номер состоит из 5, 4 или 3 символов, он рассматривается как 'короткий' и поэтому не должен предшествовать префикс страны.\"\r\n\r\nmsgid \"Each line must have the following format: 'Contact name;Phone number'. Save to file '/etc/config/phonebook.user'.\"\r\nmsgstr \"Каждая строка должна иметь следующий формат: 'Имя контакта;Номер телефона'. Сохраните в файл '/etc/config/phonebook.user'.\"\r\n\r\nmsgid \"User Phonebook\"\r\nmsgstr \"Телефонная книга пользователя\"\r\n\r\nmsgid \"User USSD Codes\"\r\nmsgstr \"Пользовательские USSD-коды\"\r\n\r\nmsgid \"Each line must have the following format: 'Code name;Code'. Save to file '/etc/config/ussd.user'.\"\r\nmsgstr \"Каждая строка должна иметь следующий формат: 'Название кода;Код'. Сохраните в файл '/etc/config/ussd.user'.\"\r\n\r\nmsgid \"Notification Settings\"\r\nmsgstr \"Настройки уведомлений\"\r\n\r\nmsgid \"The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED.\"\r\nmsgstr \"Светодиод информирует о новом сообщении. Перед активацией этой функции, пожалуйста, настройте и сохраните порт чтения SMS, время, чтобы проверить входящие SMS и выбрать индикатор уведомления.\"\r\n\r\nmsgid \"Check inbox every minute(s)\"\r\nmsgstr \"Проверять входящие каждую(ые) минуту(ы)\"\r\n\r\nmsgid \"Specify how many minutes you want your inbox to be checked.\"\r\nmsgstr \"Укажите, сколько минут вы хотите, чтобы ваши входящие проверялись.\"\r\n\r\nmsgid \"Notification LED\"\r\nmsgstr \"Индикатор уведомления\"\r\n\r\nmsgid \"Select the notification LED.\"\r\nmsgstr \"Выберите индикатор уведомления.\"\r\n\r\nmsgid \"Notify new messages\"\r\nmsgstr \"Уведомлять о новых сообщениях\"\r\n\r\nmsgid \"Turn on the LED for seconds(s)\"\r\nmsgstr \"Включить светодиод на секунду(ы)\"\r\n\r\nmsgid \"Turn off the LED for seconds(s)\"\r\nmsgstr \"Выключить светодиод на секунду(ы)\"\r\n\r\nmsgid \"Specify for how long the LED should be on.\"\r\nmsgstr \"Укажите, как долго светодиод должен гореть.\"\r\n\r\nmsgid \"Specify for how long the LED should be off.\"\r\nmsgstr \"Укажите, как долго светодиод должен быть выключен.\"\r\n\r\nmsgid \"Merge split messages\"\r\nmsgstr \"Объединить разделенные сообщения\"\r\n\r\nmsgid \"Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received.\"\r\nmsgstr \"Выбор этой опции упростит чтение сообщений, но вызовет несоответствие в количестве показанных и полученных сообщений.\"\r\n\r\nmsgid \"Message storage area\"\r\nmsgstr \"Область хранения сообщений\"\r\n\r\nmsgid \"Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device.\"\r\nmsgstr \"Сообщения хранятся в определенном месте (например, на SIM-карте или в памяти модема), но другие области также могут быть доступны в зависимости от типа устройства».\"\r\n\r\nmsgid \"AT Commands\"\r\nmsgstr \"AT-команды\"\r\n\r\nmsgid \"Web UI for handling AT commands via sms_tool. More information about the sms-tool on the\"\r\nmsgstr \"Веб-интерфейс для обработки AT-команд через sms_tool. Подробнее о sms-tool на сайте\"\r\n\r\nmsgid \"Sending commands to modem\"\r\nmsgstr \"Отправка команд модему\"\r\n\r\nmsgid \"User AT Commands\"\r\nmsgstr \"Пользовательские AT-команды\"\r\n\r\nmsgid \"Command to send\"\r\nmsgstr \"Команда на отправку\"\r\n\r\nmsgid \"Please enter a AT Command\"\r\nmsgstr \"Пожалуйста, введите AT-команду\"\r\n\r\nmsgid \"AT Commands Sending Port\"\r\nmsgstr \"Порт отправки AT-команд\"\r\n\r\nmsgid \"Send Command\"\r\nmsgstr \"Отправить команду\"\r\n\r\nmsgid \"AT Commands Settings\"\r\nmsgstr \"Настройки AT-команд\"\r\n\r\nmsgid \"Each line must have the following format: 'AT Command name;AT Command'. Save to file '/etc/config/atcmds.user'.\"\r\nmsgstr \"Каждая строка должна иметь следующий формат: 'Название AT-команды;AT-команда'. Сохраните в файл '/etc/config/atcmds.user'.\"\r\n\r\nmsgid \"Restart the inbox checking process every\"\r\nmsgstr \"Перезапускать процесс проверки входящих сообщений каждые\"\r\n\r\nmsgid \"The process will restart at the selected time interval. This will eliminate the delay in checking your inbox.\"\r\nmsgstr \"Процесс перезапустится через выбранный интервал времени. Это устранит задержку при проверке ваших сообщений.\"\r\n\r\nmsgid \"4h\"\r\nmsgstr \"4 часа.\"\r\n\r\nmsgid \"6h\"\r\nmsgstr \"6 часов.\"\r\n\r\nmsgid \"8h\"\r\nmsgstr \"8 часов.\"\r\n\r\nmsgid \"12h\"\r\nmsgstr \"12 часов.\"\r\n\r\nmsgid \"The diode is dedicated only to these notifications\"\r\nmsgstr \"Светодиод предназначен только для этих уведомлений\"\r\n\r\nmsgid \"Select 'No' in case the router has only one LED or if the LED is multi-tasking.\"\r\nmsgstr \"Выберите« Нет », если на маршрутизаторе есть только один индикатор или если индикатор работает в многозадачном режиме.\"\r\n\r\nmsgid \"No\"\r\nmsgstr \"Нет\"\r\n\r\nmsgid \"Yes\"\r\nmsgstr \"Да\"\r\n"
  },
  {
    "path": "luci-app-sms-tool/po/zh-cn/sms-tool.po",
    "content": "msgid \"\"\nmsgstr \"Content-Type: text/plain; charset=UTF-8\"\n\nmsgid \"SMS Messages\"\nmsgstr \"短信\"\n\nmsgid \"Received Messages\"\nmsgstr \"收件箱\"\n\nmsgid \"Send Messages\"\nmsgstr \"发短信\"\n\nmsgid \"USSD\"\nmsgstr \"功能码\"\n\nmsgid \"From\"\nmsgstr \"来自\"\n\nmsgid \"Received\"\nmsgstr \"收件\"\n\nmsgid \"Message\"\nmsgstr \"短信内容\"\n\nmsgid \"Configuration\"\nmsgstr \"配置\"\n\nmsgid \"Sample codes\"\nmsgstr \"示例代码\"\n\nmsgid \"Sending USSD codes\"\nmsgstr \"发送功能码\"\n\nmsgid \"Please enter phone number\"\nmsgstr \"请输入电话号\"\n\nmsgid \"Please correct phone number\"\nmsgstr \"请输入正确的电话号码\"\n\nmsgid \"Please enter a message text\"\nmsgstr \"请输入短信内容\"\n\nmsgid \"Please select the message(s) to be deleted\"\nmsgstr \"选择要删除的短信\"\n\nmsgid \"Reply\"\nmsgstr \"回复\"\n\nmsgid \"SMS sent sucessfully\"\nmsgstr \"短信发送成功\"\n\nmsgid \"Please enter a USSD code\"\nmsgstr \"请输入功能码\"\n\nmsgid \"Delete selected message(s)?\"\nmsgstr \"删除选中的短信?\"\n\nmsgid \"Delete all the messages?\"\nmsgstr \"删除所有短信?\"\n\nmsgid \"Configuration sms-tool\"\nmsgstr \"设置 sms-tool\"\n\nmsgid \"Configuration panel for sms_tool and gui application.\"\nmsgstr \"SMS GUI配置面板\"\n\nmsgid \"Device\"\nmsgstr \"设备\"\n\nmsgid \"Web UI for receiveling messages via sms_tool. More information about the sms-tool on the\"\nmsgstr \"接收短信的Web UI。关于Web UI的更多信息，请访问\"\n\nmsgid \"Web UI for sending messages via sms_tool. More information about the sms-tool on the\"\nmsgstr \"发送短信的Web UI。关于Web UI的更多信息，请访问\"\n\nmsgid \"Web UI for handling USSD codes via sms_tool. More information about the sms-tool on the\"\nmsgstr \"处理功能码的Web UI。关于Web UI的更多信息，请访问\"\n\nmsgid \"eko.one.pl forum\"\nmsgstr \"eko.one.pl 论坛\"\n\nmsgid \"SIM card\"\nmsgstr \"SIM卡\"\n\nmsgid \"Modem memory\"\nmsgstr \"modem内部储存\"\n\nmsgid \"Messages store in\"\nmsgstr \"短信存储在\"\n\nmsgid \"Messages (Inbox / Maximum)\"\nmsgstr \"短信 (收件 / 最大)\"\n\nmsgid \"Delete Selected\"\nmsgstr \"删除选定项\"\n\nmsgid \"Delete message(s)\"\nmsgstr \"删除短信\"\n\nmsgid \"Delete All\"\nmsgstr \"删除所有\"\n\nmsgid \"USSD Codes\"\nmsgstr \"功能码\"\n\nmsgid \"Send to\"\nmsgstr \"发送到\"\n\nmsgid \"Message text\"\nmsgstr \"编辑短信内容\"\n\nmsgid \"Send Message\"\nmsgstr \"发送短信\"\n\nmsgid \"Code to send\"\nmsgstr \"要发送的功能码\"\n\nmsgid \"Send Code\"\nmsgstr \"发送功能码\"\n\nmsgid \"SMS Settings\"\nmsgstr \"SMS设置\"\n\nmsgid \"USSD Codes Settings\"\nmsgstr \"功能码设置\"\n\nmsgid \"SMS Reading Port\"\nmsgstr \"SMS读取端口\"\n\nmsgid \"SMS Sending Port\"\nmsgstr \"SMS发送端口\"\n\nmsgid \"USSD Sending Port\"\nmsgstr \"功能码发送端口\"\n\nmsgid \"Add Prefix to Phone Number\"\nmsgstr \"为电话号码添加前缀\"\n\nmsgid \"Automatically add prefix to the phone number field.\"\nmsgstr \"自动将前缀添加到电话号码\"\n\nmsgid \"Prefix Number\"\nmsgstr \"前缀号码\"\n\nmsgid \"PHONE_NUMBER\"\nmsgstr \"电话号48\"\n\nmsgid \"Refresh SMS\"\nmsgstr \"刷新\"\n\nmsgid \"Sending USSD Code in plain text\"\nmsgstr \"以纯文本形式发送功能码\"\n\nmsgid \"Receive message without PDU decoding\"\nmsgstr \"接收消息而不将其解码为 PDU\"\n\nmsgid \"Send the USSD code in plain text. Command is not being coded to the PDU.\"\nmsgstr \"以明文形式发送功能码。该命令不会在 PDU 上解码。\"\n\nmsgid \"Receive and display the message without decoding it as a PDU.\"\nmsgstr \"显示收到的短信，而不将其解码为 PDU。\"\n\nmsgid \"Explanation of number and prefix\"\nmsgstr \"前缀和号码说明\"\n\nmsgid \"In the tab for sending SMSes, show an explanation of the prefix and the correct phone number.\"\nmsgstr \"在短信选项卡中，显示前缀和正确电话号码的说明。\"\n\nmsgid \"The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix.\"\nmsgstr \"电话号码前面应加上国家/地区前缀（波兰为 48，不带“+”）。如果数字为 5 个字符、4 个字符或 3 个字符，则视为“短”，前面不应带有国家/地区前缀。\"\n\nmsgid \"The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix.\"\nmsgstr \"电话号码前面应带有国家/地区前缀（波兰为 48，不带 +）。如果数字为 5、4 或 3 个字符，则视为 ..short 开头，并且前面不应有国家/地区前缀。\"\n\nmsgid \"Each line must have the following format: 'Contact name;Phone number'. Save to file '/etc/config/phonebook.user'.\"\nmsgstr \"每行必须采用以下格式：'联系人姓名;电话号'。电话簿保存在：'/etc/config/phonebook.user' \"\n\nmsgid \"User Phonebook\"\nmsgstr \"电话簿\"\n\nmsgid \"User USSD Codes\"\nmsgstr \"功能码列表\"\n\nmsgid \"Each line must have the following format: 'Code name;Code'. Save to file '/etc/config/ussd.user'.\"\nmsgstr \"每行必须采用以下格式：'功能码名称;功能码代码'。功能码保存在：'/etc/config/phonebook.user' \"\n\nmsgid \"Notification Settings\"\nmsgstr \"通知设置\"\n\nmsgid \"The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED.\"\nmsgstr \"LED指示灯会通知有一条新消息。在激活此功能之前，请配置并保存短信阅读端口、查看短信收件箱的时间，并选择合适的LED用于通知。\"\n\nmsgid \"Check inbox every minute(s)\"\nmsgstr \"定时收件间隔时间\"\n\nmsgid \"Specify how many minutes you want your inbox to be checked.\"\nmsgstr \"填写定时收件间隔的分钟数。\"\n\nmsgid \"Notification LED\"\nmsgstr \"LED通知灯\"\n\nmsgid \"Select the notification LED.\"\nmsgstr \"选择用于接收消息提醒的LED灯。\"\n\nmsgid \"Notify new messages\"\nmsgstr \"新消息提醒\"\n\nmsgid \"Turn on the LED for seconds(s)\"\nmsgstr \"LED通知灯亮起\"\n\nmsgid \"Turn off the LED for seconds(s)\"\nmsgstr \"LED通知灯熄灭\"\n\nmsgid \"Specify for how long the LED should be on.\"\nmsgstr \"指定LED指示灯应亮起多长时间。单位: 秒s\"\n\nmsgid \"Specify for how long the LED should be off.\"\nmsgstr \"指定LED指示灯多长时间后熄灭。单位: 秒s\"\n\nmsgid \"Merge split messages\"\nmsgstr \"合并拆分消息\"\n\nmsgid \"Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received.\"\nmsgstr \"选中此选项将使阅读消息变得更加容易，但会导致显示和接收的消息数量不一致。\"\n\nmsgid \"Message storage area\"\nmsgstr \"消息存储位置\"\n\nmsgid \"Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device.\"\nmsgstr \"消息存储在特定位置（例如，在SIM卡或者modem存储空间中），根据设备类型，其他位置也可能可用。\"\n\nmsgid \"AT Commands\"\nmsgstr \"AT命令\"\n\nmsgid \"Web UI for handling AT commands via sms_tool. More information about the sms-tool on the\"\nmsgstr \"处理AT命令的Web UI。关于Web UI的更多信息，请访问\"\n\nmsgid \"Sending commands to modem\"\nmsgstr \"向modem发送命令\"\n\nmsgid \"User AT Commands\"\nmsgstr \"AT命令列表\"\n\nmsgid \"Command to send\"\nmsgstr \"要发送的AT命令\"\n\nmsgid \"Please enter a AT Command\"\nmsgstr \"请输入AT命令\"\n\nmsgid \"AT Commands Sending Port\"\nmsgstr \"AT命令发送端口\"\n\nmsgid \"Send Command\"\nmsgstr \"发送命令\"\n\nmsgid \"AT Commands Settings\"\nmsgstr \"AT命令设置\"\n\nmsgid \"Each line must have the following format: 'AT Command name;AT Command'. Save to file '/etc/config/atcmds.user'.\"\nmsgstr \"每行必须采用以下格式：'AT命令名;AT命令'。AT命令保存在：'/etc/config/atcmds.user' \"\n\nmsgid \"Restart the inbox checking process every\"\nmsgstr \"重新启动收件箱时间\"\n\nmsgid \"The process will restart at the selected time interval. This will eliminate the delay in checking your inbox.\"\nmsgstr \"该过程将在选定的时间间隔内重新启动。这将消除检查收件箱的延迟。\"\n\nmsgid \"4h\"\nmsgstr \"4小时\"\n\nmsgid \"6h\"\nmsgstr \"6 小时\"\n\nmsgid \"8h\"\nmsgstr \"8 小时\"\n\nmsgid \"12h\"\nmsgstr \"12 小时\"\n\nmsgid \"The diode is dedicated only to these notifications\"\nmsgstr \"专用通知LED\"\n\nmsgid \"Select 'No' in case the router has only one LED or if the LED is multi-tasking.\"\nmsgstr \"如果路由器只有一个LED指示灯，或者该LED指示灯支持多个任务，请选择“否”。\"\n\nmsgid \"No\"\nmsgstr \"否\"\n\nmsgid \"Yes\"\nmsgstr \"是\"\n\nmsgid \"Merge algorithm\"\nmsgstr \"合并算法\"\n\nmsgid \"Simple (merge without sorting)\"\nmsgstr \"简单（合并而不排序）\"\n\nmsgid \"Advanced (merges with sorting)\"\nmsgstr \"高级（排序合并）\"\n\nmsgid \"Direction of message merging\"\nmsgstr \"消息合并方向\"\n\nmsgid \"From beginning to end\"\nmsgstr \"从头到尾（正序）\"\n\nmsgid \"From end to beginning\"\nmsgstr \"从尾到头（反向）\"\n"
  },
  {
    "path": "luci-app-sms-tool/root/etc/config/atcmds.user",
    "content": "Check signal strength > AT+CSQ;AT+CSQ\nGet the temperature of MT > AT+QTEMP;AT+QTEMP\nCurrent band in use > AT+QNWINFO;AT+QNWINFO\nCarrier Agregation Info > AT+QCAINFO;AT+QCAINFO\nSIM Preferred Message Storage  >  AT+CPMS=\"SM\",\"SM\",\"SM\";AT+CPMS=\"SM\",\"SM\",\"SM\"\nSave SMS Settings  >  AT+CSAS;AT+CSAS\nReboot the modem  >  AT+CFUN=1,1;AT+CFUN=1,1\nReset the modem  >  AT+CFUN=1;AT+CFUN=1\nQMI/PPP/Default > AT+QCFG=\"usbnet\",0;AT+QCFG=\"usbnet\",0\nECM > AT+QCFG=\"usbnet\",1;AT+QCFG=\"usbnet\",1\nMBIM > AT+QCFG=\"usbnet\",2;AT+QCFG=\"usbnet\",2\n4G-LTE only > AT+QCFG=\"nwscanmode\",3,1;AT+QCFG=\"nwscanmode\",3,1\nWCDMA only > AT+QCFG=\"nwscanmode\",2,1;AT+QCFG=\"nwscanmode\",2,1\nGSM only > AT+QCFG=\"nwscanmode\",1,1;AT+QCFG=\"nwscanmode\",1,1\nScan all modes > AT+QCFG=\"nwscanmode\",0,1;AT+QCFG=\"nwscanmode\",0,11\n"
  },
  {
    "path": "luci-app-sms-tool/root/etc/config/phonebook.user",
    "content": "Openwrt user;48500500500\n"
  },
  {
    "path": "luci-app-sms-tool/root/etc/config/sms_tool",
    "content": "\nconfig sms_tool 'general'\n\toption pnumber '48'\n\toption prefix '1'\n\toption ledtimeon '1'\n\toption ledtimeoff '5'\n\toption lednotify '0'\n\toption checktime '10'\n\toption mergesms '0'\n\toption information '1'\n\toption ussd '0'\n\toption pdu '0'\n    \toption storage 'SM'\n    \toption prestart '6'\n    \toption ledtype 'D'\n    \toption algorithm 'Simple'\n"
  },
  {
    "path": "luci-app-sms-tool/root/etc/config/ussd.user",
    "content": "Stan konta w sieci Play;*101#\nStan konta w sieci Plus;*100#\nStan pakietu internetowego w Premium Mobile;*136#\nStan konta w sieci Orange;*124*#\nStan konta w sieci T-Mobile;*101#"
  },
  {
    "path": "luci-app-sms-tool/root/etc/init.d/smsled",
    "content": "#!/bin/sh /etc/rc.common\n# Copyright 2020-2023 Rafał Wabik (IceG) - From eko.one.pl forum\n# Licensed to the GNU General Public License v3.0.\n\nUSE_PROCD=1\nSTART=95\nSTOP=01\n\nstart_service() {\n    procd_open_instance\n    procd_set_param command /bin/sh \"/sbin/smsled-init.sh\"\n    procd_close_instance\n}\n\n\nservice_triggers()\n{\n        procd_add_reload_trigger \"sms_tool\"\n}\n\nstop_service() {\n\tfor KILLPID in `ps | grep 'smsled' | awk ' { print $1;}'`; do \n  \t( kill -9 $KILLPID >/dev/null 2>&1 )  2>&1 &\n\tdone\n\tsleep 1 2>&1 &\n\treturn 0\n}\n\nrestart_service() {\n    stop_service\n    start_service\n}\n"
  },
  {
    "path": "luci-app-sms-tool/root/etc/uci-defaults/set_sms_ports.sh",
    "content": "#!/bin/sh\n# Copyright 2020-2023 Rafał Wabik (IceG) - From eko.one.pl forum\n# Licensed to the GNU General Public License v3.0.\n\nchmod +x /etc/init.d/smsled 2>&1 &\nchmod +x /sbin/smsled-init.sh 2>&1 &\nchmod +x /sbin/cronsync.sh 2>&1 &\nchmod +x /sbin/set_sms_ports.sh 2>&1 &\nchmod +x /sbin/smsled.sh 2>&1 &\nrm -rf /tmp/luci-indexcache 2>&1 &\nrm -rf /tmp/luci-modulecache/ 2>&1 &\n\nwork=false\nfor port in /dev/ttyUSB*\ndo\n    [[ -e $port ]] || continue\n    gcom -d $port info &> /tmp/testusb\n    testUSB=`cat /tmp/testusb | grep \"Error\\|Can't\"`\n    if [ -z \"$testUSB\" ]; then \n        work=$port\n        break\n    fi\ndone\nrm -rf /tmp/testusb\n\nif [ $work != false ]; then\nuci set sms_tool.@sms_tool[0].readport=$work 2>&1 &\nuci set sms_tool.@sms_tool[0].sendport=$work 2>&1 &\nuci set sms_tool.@sms_tool[0].ussdport=$work 2>&1 &\nuci set sms_tool.@sms_tool[0].atport=$work 2>&1 &\nuci commit sms_tool 2>&1 &\nfi\n\nDEVICE=$(cat /tmp/sysinfo/board_name)\n\nif [[ \"$DEVICE\" == *\"mf289f\"* ]]; then\n\t\n\t\tuci set sms_tool.@sms_tool[0].readport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].sendport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].ussdport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].atport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci commit sms_tool 2>&1 &\n\nfi\n\t\nif [[ \"$DEVICE\" == *\"mf286r\"* ]]; then\n\t\n\t\tuci set sms_tool.@sms_tool[0].readport=\"/dev/ttyACM0\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].sendport=\"/dev/ttyACM0\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].ussdport=\"/dev/ttyACM0\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].atport=\"/dev/ttyACM0\" 2>&1 &\n\t\tuci commit sms_tool 2>&1 &\n\nfi\n\nif [[ \"$DEVICE\" == *\"mf286d\"* ]]; then\n\t\n\t\tuci set sms_tool.@sms_tool[0].readport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].sendport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].ussdport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].atport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci commit sms_tool 2>&1 &\n\nfi\n\nif [[ \"$DEVICE\" == *\"mf286\"* ]]; then\n\t\n\t\tuci set sms_tool.@sms_tool[0].readport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].sendport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].ussdport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci set sms_tool.@sms_tool[0].atport=\"/dev/ttyUSB1\" 2>&1 &\n\t\tuci commit sms_tool 2>&1 &\n\nfi\n"
  },
  {
    "path": "luci-app-sms-tool/root/etc/uci-defaults/start-smsled",
    "content": "#!/bin/sh\n# Copyright 2020-2023 Rafał Wabik (IceG) - From eko.one.pl forum\n# Licensed to the GNU General Public License v3.0.\n\n/etc/init.d/smsled stop  2>&1 &\n/etc/init.d/smsled disable  2>&1 &\n/etc/init.d/smsled disable  2>&1 &\n\nexit 0\n"
  },
  {
    "path": "luci-app-sms-tool/root/sbin/cronsync.sh",
    "content": "#!/bin/sh\n\n[ -e /etc/crontabs/root ] || touch /etc/crontabs/root\n\nSLED=$(uci -q get sms_tool.general.lednotify)\nif [ \"x$SLED\" != \"x1\" ]; then\n\tif grep -q \"smsled\" /etc/crontabs/root; then\n\t\tgrep -v \"/init.d/smsled\" /etc/crontabs/root > /tmp/new_cron\n\t\tmv /tmp/new_cron /etc/crontabs/root\n\t\t/etc/init.d/cron restart\n\tfi\n\texit 0\nfi\n\nif ! grep -q \"smsled\" /etc/crontabs/root; then\nPTR=$(uci -q get sms_tool.general.prestart)\n\techo \"1 */$PTR * * * /etc/init.d/smsled enable\" >> /etc/crontabs/root\n\t/etc/init.d/cron restart\nfi\n\nexit 0\n"
  },
  {
    "path": "luci-app-sms-tool/root/sbin/set_sms_ports.sh",
    "content": "#!/bin/sh\n# Copyright 2020-2022 Rafał Wabik (IceG) - From eko.one.pl forum\n# Licensed to the GNU General Public License v3.0.\n\nwork=false\nfor port in /dev/ttyUSB*\ndo\n    [[ -e $port ]] || continue\n    gcom -d $port info &> /tmp/testusb\n    testUSB=`cat /tmp/testusb | grep \"Error\\|Can't\"`\n    if [ -z \"$testUSB\" ]; then \n        work=$port\n        break\n    fi\ndone\nrm -rf /tmp/testusb\n\nif [ $work != false ]; then\nuci set sms_tool.@sms_tool[0].readport=$work\nuci set sms_tool.@sms_tool[0].sendport=$work\nuci set sms_tool.@sms_tool[0].ussdport=$work\nuci set sms_tool.@sms_tool[0].atport=$work\nuci commit sms_tool\nfi\n"
  },
  {
    "path": "luci-app-sms-tool/root/sbin/smsled-init.sh",
    "content": "#!/bin/sh\n# Copyright 2020-2022 Rafał Wabik (IceG) - From eko.one.pl forum\n# Licensed to the GNU General Public License v3.0.\n\nsleep 10\nCT=$(uci -q get sms_tool.general.checktime)\nTX=$(echo $CT | tr -dc '0-9')\nTM=$(($TX * 60))\n\nwhile [ 1 ]; do \n\tLED=$(uci -q get sms_tool.general.lednotify)\n\tif [ $LED == \"1\" ]; then\n    \tsleep $TM\n\t\t(/sbin/smsled.sh >/dev/null 2>&1 )&\n\t\tcontinue\n\tfi\n\tsleep 1\ndone\n \nexit 0\n\n"
  },
  {
    "path": "luci-app-sms-tool/root/sbin/smsled.sh",
    "content": "#!/bin/sh\n# Copyright 2020-2021 Rafał Wabik (IceG) - From eko.one.pl forum\n# Licensed to the GNU General Public License v3.0.\n\n\tDEV=$(uci -q get sms_tool.general.readport)\n\tLEDX=$(uci -q get sms_tool.general.smsled)\n\tMEM=$(uci -q get sms_tool.general.storage)\n\tSTX=$(sms_tool -s $MEM -d $DEV status | cut -c23-27)\n\tSMS=$(echo $STX | tr -dc '0-9')\n\tSMSC=$(cat /etc/config/sms_count)\n\tLEDT=\"/sys/class/leds/$LEDX/trigger\"\n\tLEDON=\"/sys/class/leds/$LEDX/delay_on\"\n\tLEDOFF=\"/sys/class/leds/$LEDX/delay_off\"\n\tLED=\"/sys/class/leds/$LEDX/brightness\"\n\n\tLON=$(uci -q get sms_tool.general.ledtimeon)\n\tTXON=$(echo $LON | tr -dc '0-9')\n\tTMON=$(($TXON * 1000))\n\n\tLOFF=$(uci -q get sms_tool.general.ledtimeoff)\n\tTXOFF=$(echo $LOFF | tr -dc '0-9')\n\tTMOFF=$(($TXOFF * 1000))\n\nif [ $SMS == $SMSC ]; then\n\n\texit 0\nfi\n\nif [ $SMS > $SMSC ]; then\n\necho timer > $LEDT\necho $TMOFF > $LEDOFF\necho $TMON > $LEDON\nexit 0\n\nfi\n\n\nexit 0\n"
  },
  {
    "path": "luci-app-sms-tool/root/usr/share/rpcd/acl.d/luci-app-sms-tool.json",
    "content": "{\n\t\"luci-app-sms-tool\": {\n\t\t\"description\": \"Grant UCI and file access for luci-app-sms-tool\",\n\t\t\"read\": {\n\t\t\t\"file\": {\n\t\t\t\t\"/usr/bin/sms_tool *\": [ \"exec\" ],\n\t\t\t},\n\t\t\t\"uci\": [ \"sms_tool\" ]\n\t\t},\n\t\t\"write\": {\n\t\t\t\"file\": {\n\t\t\t\t\"/usr/bin/sms_tool *\": [ \"exec\" ],\n\n\t\t\t},\n\t\t\t\"uci\": [ \"sms_tool\" ]\n\t\t}\n\t}\n}\n\n\n\n\n\n\t\t\t\n"
  }
]