Upload files to "/"

Signed-off-by: kevin <kevin@codelab.nestict.africa>
This commit is contained in:
2026-01-16 12:06:59 +01:00
parent 452ccc4a4b
commit e7e988996c
28 changed files with 3347 additions and 45 deletions

1
.restore_backup_location Normal file
View File

@@ -0,0 +1 @@
backup/restore_20250914_113148

493
CHANGELOG.md Normal file
View File

@@ -0,0 +1,493 @@
![PHPNuxBill](install/img/logo.png)
# CHANGELOG
## 2024.5.21
- Add Maintenance Mode by @freeispradius
- Add Tax System by @freeispradius
- Add Export Customer List to CSV with Filter
- Fix some Radius Variable by @freeispradius
- Add Rollback update
## 2024.5.17
- Status Customer: Active/Banned/Disabled
- Add search with order in Customer list
## 2024.5.16
- Confirm can change Using
## 2024.5.14
- Show Plan and Location on expired list
- Customizeable payment for recharge
## 2024.5.8
- Fix bugs burst by @Gerandonk
- Fix sync for burst by @Gerandonk
## 2024.5.7
- Fix time for period Days
- Fix Free radius attributes by @agstrxyz
- Add Numeric Voucher Code by @pro-cms
## 2024.4.30
- CRITICAL UPDATE: last update Logic recharge not check is status on or off, it make expired customer stay in expired pool
- Prevent double submit for recharge balance
## 2024.4.29
- Maps Pagination
- Maps Search
- Fix extend logic
- Fix logic customer recharge to not delete when customer not change the plan
## 2024.4.23
- Fix Pagination Voucher
- Fix Languange Translation
- Fix Alert Confirmation for requesting Extend
- Send Telegram Notification when Customer request to extend expiration
- prepaid users export list by @freeispradius
- fix show voucher by @agstrxyz
## 2024.4.21
- Restore old cron
## 2024.4.15
- Postpaid Customer can request extends expiration day if it enabled
- Some Code Fixing by @ahmadhusein17 and @agstrxyz
## 2024.4.4
- Data Tables for Customers List by @Focuslinkstech
- Add Bills to Reminder
- Prevent double submit for recharge and renew
## 2024.4.3
- Export logs to CSV by @agstrxyz
- Change to Username if Country code empty
## 2024.4.2
- Fix REST API
- Fix Log IP Cloudflare by @Gerandonk
- Show Personal or Business in customer dashboard
## 2024.3.26
- Change paginator, to make easy customization using pagination.tpl
## 2024.3.25
- Fix maps on HTTP
- Fix Cancel payment
## 2024.3.23
- Maps full height
- Show Get Directions instead Coordinates
- Maps Label always show
## 2024.3.22
- Fix Broadcast Message by @Focuslinkstech
- Add Location Picker
## 2024.3.20
- Fixing some bugs
## 2024.3.19
- Add Customer Type Personal or Bussiness by @pro-cms
- Fix Broadcast Message by @Focuslinkstech
- Add Customer Geolocation by @Focuslinkstech
- Change Customer Menu
## 2024.3.18
- Add Broadcasting SMS by @Focuslinkstech
- Fix Notification with Bills
## 2024.3.16
- Fix Zero Charging
- Fix Disconnect Customer from Radius without loop by @Gerandonk
## 2024.3.15
- Fix Customer View to list active Plan
- Additional Bill using Customer Attributes
## 2024.3.14
- Add Note to Invoices
- Add Additional Bill
- View Invoice from Customer side
## 2024.3.13
- Postpaid System
- Additional Cost
## 2024.3.12
- Check if Validity Period, so calculate price will not affected other validity
- Add firewall using .htaccess for apache only
- Multiple Payment Gateway by @Focuslinkstech
- Fix Logic Multiple Payment gateway
- Fix delete Attribute
- Allow Delete Payment Gateway
- Allow Delete Plugin
## 2024.3.6
- change attributes view
## 2024.3.4
- add [[username]] for reminder
- fix agent show when editing
- fix password admin when sending notification
- add file exists for pages
## 2024.3.3
- Change loading button by @Focuslinkstech
- Add Customer Announcements by @Gerandonk
- Add PPPOE Period Validity by @Gerandonk
## 2024.2.29
- Fix Hook Functionality
- Change Customer Menu
## 2024.2.28
- Fix Buy Plan with Balance
- Add Expired date for reminder
## 2024.2.27
- fix path notification
- redirect to dashboard if already login
## 2024.2.26
- Clean Unused JS and CSS
- Add some Authorization check
- Custom Path for folder
- fix some bugs
## 2024.2.23
- Integrate with PhpNuxBill Printer
- Fix Invoice
- add admin ID in transaction
## 2024.2.22
- Add Loading when click submit
- link to settings when hide widget
## 2024.2.21
- Fix SQL Installer
- remove multiple space in language
- Change Phone Number require OTP by @Focuslinkstech
- Change burst Form
- Delete Table Responsive, first Column Freeze
## 2024.2.20
- Fix list admin
- Burst Limit
- Pace Loading by @Focuslinkstech
## 2024.2.19
- Start API Development
- Multiple Admin Level
- Customer Attributes by @Focuslinkstech
- Radius Menu
## 2024.2.13
- Auto translate language
- change language structur to json
- save collapse menu
## 2024.2.12
- Admin Level : SuperAdmin,Admin,Report,Agent,Sales
- Export Customers to CSV
- Session using Cookie
## 2024.2.7
- Hide Dashboard content
## 2024.2.6
- Cache graph for faster opening graph
## 2024.2.5
- Admin Dashboard Update
- Add Monthly Registered Customers
- Total Monthly Sales
- Active Users
## 2024.2.2
- Fix edit plan for user
## 2024.1.24
- Add Send test for SMS, Whatsapp and Telegram
## 2024.1.19
- Paid Plugin, Theme, and payment gateway marketplace using codecanyon.net
- Fix Plugin manager List
## 2024.1.18
- fix(mikrotik): set pool $poolId always empty
## 2024.1.17
- Add minor change, for plugin, menu can have notifications by @Focuslinkstech
## 2024.1.16
- Add yellow color to table for plan not allowed to purchase
- Fix Radius pool select
- add price to reminder notification
- Support thermal printer for invoice
## 2024.1.15
- Fix cron job for Plan only for admin by @Focuslinkstech
## 2024.1.11
- Add Plan only for admin by @Focuslinkstech
- Fix Plugin Manager
## 2024.1.9
- Add Prefix when generate Voucher
## 2024.1.8
- User Expired Order by Expired Date
## 2024.1.2
- Pagination User Expired by @Focuslinkstech
## 2023.12.21
- Modern AdminLTE by @sabtech254
- Update user-dashboard.tpl by @Focuslinkstech
## 2023.12.19
- Fix Search Customer
- Disable Registration, Customer just activate voucher Code, and the voucher will be their password
- Remove all used voucher codes
## 2023.12.18
- Split sms to 160 characters only for Mikrotik Modem
## 2023.12.14
- Can send SMS using Mikrotik with Modem Installed
- Add Customer Type, so Customer can only show their PPPOE or Hotspot Package or both
## 2023.11.17
- Error details not show in Customer
## 2023.11.15
- Customer Multi Router package
- Fix edit package, Admin can change Customer to another router
## 2023.11.9
- fix bug variable in cron
- fix update plan
## 2023.10.27
- Backup and restore database
- Fix checking radius client
## 2023.10.25
- fix wrong file check in cron, error only for newly installed
## 2023.10.24
- Fix logic cronjob
- assign router to NAS, but not yet used
- Fix Pagination
- Move Alert from hardcode
## 2023.10.20
- View Invoice
- Resend Invoice
- Custom Voucher
## 2023.10.17
- Happy Birthday To Me 🎂 \(^o^)/
- Support FreeRadius with Mysql
- Bring back Themes support
- Log Viewer
## 2023.9.21
- Customer can extend Plan
- Customer can Deactivate active plan
- add variable nux-router to select only plan from that router
- Show user expired until 30 items
## 2023.9.20
- Fix Customer balance header
- Deactivate Customer active plan
- Sync Customer Plan to Mikrotik
- Recharge Customer from Customer Details
- Add Privacy Policy and Terms and Conditions Pages
## 2023.9.13
- add Current balance in notification
- Buy Plan for Friend
- Recharge Friend plan
- Fix recharge Plan
- Show Customer active plan in Customer list
- Fix Customer counter in dashboard
- Show Customer Balance in header
- Fix Plugin Manager using Http::Get
- Show Some error page when crash
## 2023.9.7
- Fix PPPOE Delete Customer
- Remove active Customer before deleting
- Show IP and Mac even if it not Hotspot
## 2023.9.6
- Expired Pool
Customer can be move to expired pool after plan expired by cron
- Fix Delete customer
- tbl_language removed
## 2023.9.1.1
- Fix cronjob Delete customer
- Fix reminder text
## 2023.9.1
- Critical bug fixes, bug happen when user buy package, expired time will be calculated from last expired, not from when they buy the package
- Time not change after user buy package for extending
- Add Cancel Button to user dashboard when it show unpaid package
- Fix username in user dashboard
## 2023.8.30
- Upload Logo from settings
- Fix Print value
- Fix Time when editing prepaid
## 2023.8.28
- Extend expiration if buy same package
- Fix calendar
- Add recharge time
- Fix allow balance transfer
## 2023.8.24
- Balance transfer between Customer
- Optimize Cronjob
- View Customer Info
- Ajax for select customer
## 2023.8.18
- Fix Auto Renewall Cronjob
- Add comment to Mikrotik User
## 2023.8.16
- Admin Can Add Balance to Customer
- Show Balance in user
- Using Select2 for Dropdown
## 2023.8.15
- Fix PPPOE Delete Customer
- Fix Header Admin and Customer
- Fix PDF Export by Period
- Add pppoe_password for Customer, this pppoe_password only admin can change
- Country Code Number Settings
- Customer Meta Table for Customers Attributess
- Fix Add and Edit Customer Form for admin
- add Notification Message Editor
- cron reminder
- Balance System, Customer can deposit money
- Auto renewal when package expired using Customer Balance
## 2023.8.1
- Add Update file script, one click updating PHPNuxBill
- Add Custom UI folder, to custome your own template
- Delete debug text
- Fix Vendor JS
## 2023.7.28
- Fix link buy Voucher
- Add email field to registration form
- Change registration design Form
- Add Setting to disable Voucher
- Fix Title for PPPOE plans
- Fix Plugin Cache
## 2023.6.20
- Hide time for Created date.
Because the first time phpmixbill created, plan validity only for days and Months, many request ask for minutes and hours, i change it, but not the database.
## 2023.6.15
- Customer can connect to internet from Customer Dashboard
- Fix Confirm when delete
- Change Logo PHPNuxBill
- Using Composer
- Fix Search Customer
- Fix Customer check, if not found will logout
- Customer password show but hidden
- Voucher code hidden
## 2023.6.8
- Fixing registration without OTP
- Username will not go to phonenumber if OTP registration is not enabled
- Fix Bug PPOE

346
LICENSE
View File

@@ -1,73 +1,339 @@
Apache License GNU GENERAL PUBLIC LICENSE
Version 2.0, January 2004 Version 2, June 1991
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
1. Definitions. Preamble
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. The precise terms and conditions for copying, distribution and
modification follow.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and 2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work. How to Apply These Terms to Your New Programs
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
Copyright 2026 kevin To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Licensed under the Apache License, Version 2.0 (the "License"); {description}
you may not use this file except in compliance with the License. Copyright (C) {year} {fullname}
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Unless required by applicable law or agreed to in writing, software This program is distributed in the hope that it will be useful,
distributed under the License is distributed on an "AS IS" BASIS, but WITHOUT ANY WARRANTY; without even the implied warranty of
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
See the License for the specific language governing permissions and GNU General Public License for more details.
limitations under the License.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

103
README.md
View File

@@ -1,5 +1,102 @@
# ISP-Billing [![ReadMeSupportPalestine](https://raw.githubusercontent.com/Safouene1/support-palestine-banner/master/banner-project.svg)](https://s.id/standwithpalestine)
Complete Solution for Internet Service Providers # PHPNuxBill - PHP Mikrotik Billing
Streamline your ISP operations with our comprehensive billing system. Manage customers, plans, payments, and network infrastructure all in one place. Built for scalability and designed for success. ![PHPNuxBill](install/img/logo.png)
## Feature
- Voucher Generator and Print
- [Freeradius](https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius)
- Self registration
- User Balance
- Auto Renewal Package using Balance
- Multi Router Mikrotik
- Hotspot & PPPOE
- Easy Installation
- Multi Language
- Payment Gateway
- SMS validation for login
- Whatsapp Notification to Consumer
- Telegram Notification for Admin
See [How it Works / Cara Kerja](https://github.com/hotspotbilling/phpnuxbill/wiki/How-It-Works---Cara-kerja)
## Payment Gateway And Plugin
- [Payment Gateway List](https://github.com/orgs/hotspotbilling/repositories?q=payment+gateway)
- [Plugin List](https://github.com/orgs/hotspotbilling/repositories?q=plugin)
You can download payment gateway and Plugin from Plugin Manager
## System Requirements
Most current web servers with PHP & MySQL installed will be capable of running PHPNuxBill
Minimum Requirements
- Linux or Windows OS
- Minimum PHP Version 7.4
- Both PDO & MySQLi Support
- PHP-GD2 Image Library
- PHP-CURL
- PHP-ZIP
- PHP-Mbstring
- MySQL Version 4.1.x and above
can be Installed in Raspberry Pi Device.
The problem with windows is hard to set cronjob, better Linux
## Changelog
[CHANGELOG.md](CHANGELOG.md)
## Installation
[Installation instructions](https://github.com/hotspotbilling/phpnuxbill/wiki)
## Freeradius
Support [Freeradius with Database](https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius)
## Community Support
- [Github Discussion](https://github.com/hotspotbilling/phpnuxbill/discussions)
- [Telegram Group](https://t.me/phpmixbill)
## Technical Support
This Software is Free and Open Source, Without any Warranty.
Even if the software is free, but Technical Support is not,
Technical Support Start from Rp 500.000 or $50
If you chat me for any technical support,
you need to pay,
ask anything for free in the [discussion](/hotspotbilling/phpnuxbill/discussions) page or [Telegram Group](https://t.me/phpnuxbill)
Contact me at [Telegram](https://t.me/ibnux)
## License
GNU General Public License version 2 or later
see [LICENSE](LICENSE) file
## Donate to ibnux
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/ibnux)
BCA: 5410454825
Mandiri: 163-000-1855-793
a.n Ibnu Maksum
## SPONSORS
- [mlink.id](https://mlink.id)
- [https://github.com/sonyinside](https://github.com/sonyinside)

64
bytewave.php Normal file
View File

@@ -0,0 +1,64 @@
<?php
class BytewaveSMSAPI {
private $apiToken;
private $apiUrl = 'https://portal.bytewavenetworks.com/api/v3/sms/send';
public function __construct($apiToken) {
$this->apiToken = $apiToken;
}
private function sendRequest($data) {
$headers = [
"Authorization: Bearer {$this->apiToken}",
"Content-Type: application/json",
"Accept: application/json"
];
$options = [
CURLOPT_URL => $this->apiUrl,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($data),
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
public function sendSMS($recipient, $sender_id, $message) {
$data = [
'recipient' => $recipient,
'sender_id' => $sender_id,
'type' => 'plain',
'message' => $message,
];
return $this->sendRequest($data);
}
}
// Get parameters from URL
$message = isset($_GET['message']) ? $_GET['message'] : '';
$phone = isset($_GET['phone']) ? $_GET['phone'] : '';
$senderid = isset($_GET['senderid']) ? $_GET['senderid'] : '';
$apiToken = isset($_GET['api']) ? $_GET['api'] : '';
if (empty($message) || empty($phone)) {
echo json_encode([
'status' => 'error',
'message' => 'Missing required parameters.'
]);
exit;
}
$bytewave = new BytewaveSMSAPI($apiToken);
$response = $bytewave->sendSMS($phone, $senderid, $message);
echo json_encode($response);
?>

16
composer.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "hotspotbilling/phpnuxbill",
"type": "template",
"description": "PHPNuxBill a Hotspot Billing Software.",
"keywords": ["template","PHPMixBill","PHPnuxBill","Mikrotik","Hotspot","Billing"],
"homepage": "https://github.com/hotspotbilling/phpnuxbill",
"license": "MIT",
"authors": [
{
"name": "ibnux",
"email": "me@ibnux.net",
"homepage": "https://ibnux.net",
"role": "Developer"
}
]
}

21
config.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
define('APP_URL', 'https://www.yatmack.netreachsolutions.co.ke');
$_app_stage = 'Live';
// Database PHPNuxBill
$db_host = 'localhost';
$db_user = 'netreach';
$db_password = 'Kenya@2030!';
$db_name = 'yatmack';
if($_app_stage!='Live'){
error_reporting(E_ERROR);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
}else{
error_reporting(E_ERROR);
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
}

View File

@@ -0,0 +1,98 @@
<?php
/**
* Script to safely delete orphaned customers
* This script deletes customers that have no relationships in other tables
*/
include "init.php";
echo "=== CUSTOMER DELETION SCRIPT ===\n";
echo "Date: " . date('Y-m-d H:i:s') . "\n\n";
// List of customer IDs to delete (confirmed orphaned customers)
$customersToDelete = [
419, 425, 426, 429, 431, 433, 436, 437, 438, 439, 440, 448, 450, 452, 455, 458, 459, 467, 471, 474, 475, 476, 477, 480, 481, 482, 485, 490
];
echo "Customers to delete: " . count($customersToDelete) . "\n\n";
$deletedCount = 0;
$errorCount = 0;
foreach ($customersToDelete as $customerId) {
try {
// Get customer info before deletion
$customer = ORM::for_table('tbl_customers')->find_one($customerId);
if (!$customer) {
echo "❌ Customer ID $customerId not found\n";
$errorCount++;
continue;
}
echo "Deleting: ID $customerId - {$customer['username']} ({$customer['fullname']})... ";
// Double-check: Verify no relationships exist
$hasRelations = false;
// Check tbl_user_recharges
$recharges = ORM::for_table('tbl_user_recharges')->where('customer_id', $customerId)->count();
if ($recharges > 0) {
echo "❌ HAS RELATIONS (tbl_user_recharges: $recharges records) - SKIPPING\n";
$errorCount++;
continue;
}
// Check tbl_transactions
$transactions = ORM::for_table('tbl_transactions')->where('username', $customer['username'])->count();
if ($transactions > 0) {
echo "❌ HAS RELATIONS (tbl_transactions: $transactions records) - SKIPPING\n";
$errorCount++;
continue;
}
// Check tbl_customers_fields
$fields = ORM::for_table('tbl_customers_fields')->where('customer_id', $customerId)->count();
if ($fields > 0) {
echo "❌ HAS RELATIONS (tbl_customers_fields: $fields records) - SKIPPING\n";
$errorCount++;
continue;
}
// Check tbl_payment_gateway
$payments = ORM::for_table('tbl_payment_gateway')->where('username', $customer['username'])->count();
if ($payments > 0) {
echo "❌ HAS RELATIONS (tbl_payment_gateway: $payments records) - SKIPPING\n";
$errorCount++;
continue;
}
// Safe to delete - proceed with deletion
$customer->delete();
echo "✅ DELETED\n";
$deletedCount++;
} catch (Exception $e) {
echo "❌ ERROR: " . $e->getMessage() . "\n";
$errorCount++;
}
}
echo "\n=== DELETION SUMMARY ===\n";
echo "Total customers processed: " . count($customersToDelete) . "\n";
echo "Successfully deleted: $deletedCount\n";
echo "Errors/Skipped: $errorCount\n";
if ($deletedCount > 0) {
echo "\n✅ Deletion completed successfully!\n";
echo "Removed $deletedCount orphaned customers from the database.\n";
} else {
echo "\n⚠️ No customers were deleted.\n";
}
echo "\n=== VERIFICATION ===\n";
$remainingCustomers = ORM::for_table('tbl_customers')->count();
echo "Remaining customers in database: $remainingCustomers\n";
echo "\n=== DELETION COMPLETE ===\n";
?>

View File

@@ -0,0 +1,171 @@
<?php
/**
* Comprehensive Script to Identify and Delete Orphaned Customers
*
* This script identifies customers that have no relationships in other tables
* and provides a safe way to delete them with confirmation.
*
* An orphaned customer is one that has:
* - No records in tbl_user_recharges
* - No records in tbl_transactions
* - No records in tbl_customers_fields
* - No records in tbl_payment_gateway
*/
include "init.php";
echo "=== COMPREHENSIVE ORPHANED CUSTOMER DETECTION SCRIPT ===\n";
echo "Date: " . date('Y-m-d H:i:s') . "\n\n";
// Function to check if a customer has any relationships
function isCustomerOrphaned($customerId, $username) {
$relationships = [];
// Check tbl_user_recharges
$recharges = ORM::for_table('tbl_user_recharges')->where('customer_id', $customerId)->count();
if ($recharges > 0) {
$relationships[] = "tbl_user_recharges ($recharges records)";
}
// Check tbl_transactions
$transactions = ORM::for_table('tbl_transactions')->where('username', $username)->count();
if ($transactions > 0) {
$relationships[] = "tbl_transactions ($transactions records)";
}
// Check tbl_customers_fields
$fields = ORM::for_table('tbl_customers_fields')->where('customer_id', $customerId)->count();
if ($fields > 0) {
$relationships[] = "tbl_customers_fields ($fields records)";
}
// Check tbl_payment_gateway
$payments = ORM::for_table('tbl_payment_gateway')->where('username', $username)->count();
if ($payments > 0) {
$relationships[] = "tbl_payment_gateway ($payments records)";
}
return [
'is_orphaned' => empty($relationships),
'relationships' => $relationships
];
}
// Get all customers
echo "Scanning all customers for orphaned records...\n";
$allCustomers = ORM::for_table('tbl_customers')->find_many();
$orphanedCustomers = [];
$totalCustomers = count($allCustomers);
echo "Total customers in database: $totalCustomers\n\n";
foreach ($allCustomers as $customer) {
$result = isCustomerOrphaned($customer['id'], $customer['username']);
if ($result['is_orphaned']) {
$orphanedCustomers[] = [
'id' => $customer['id'],
'username' => $customer['username'],
'fullname' => $customer['fullname'],
'email' => $customer['email'],
'status' => $customer['status'],
'created_at' => $customer['created_at'] ?? 'Unknown'
];
}
}
echo "=== ORPHANED CUSTOMERS FOUND ===\n";
echo "Orphaned customers: " . count($orphanedCustomers) . "\n\n";
if (empty($orphanedCustomers)) {
echo "✅ No orphaned customers found! All customers have relationships in other tables.\n";
exit(0);
}
// Display orphaned customers
echo "Orphaned customers details:\n";
echo str_repeat("-", 120) . "\n";
printf("%-5s %-20s %-30s %-30s %-15s %-20s\n", "ID", "Username", "Full Name", "Email", "Status", "Created");
echo str_repeat("-", 120) . "\n";
foreach ($orphanedCustomers as $customer) {
printf("%-5s %-20s %-30s %-30s %-15s %-20s\n",
$customer['id'],
substr($customer['username'], 0, 20),
substr($customer['fullname'], 0, 30),
substr($customer['email'], 0, 30),
$customer['status'],
$customer['created_at']
);
}
echo str_repeat("-", 120) . "\n\n";
// Ask for confirmation
echo "⚠️ WARNING: This will permanently delete " . count($orphanedCustomers) . " orphaned customers!\n";
echo "These customers have no relationships in any other tables.\n\n";
echo "Do you want to proceed with deletion? (yes/no): ";
$handle = fopen("php://stdin", "r");
$confirmation = trim(fgets($handle));
fclose($handle);
if (strtolower($confirmation) !== 'yes') {
echo "❌ Deletion cancelled by user.\n";
exit(0);
}
echo "\n=== PROCEEDING WITH DELETION ===\n";
$deletedCount = 0;
$errorCount = 0;
foreach ($orphanedCustomers as $customer) {
try {
echo "Deleting: ID {$customer['id']} - {$customer['username']} ({$customer['fullname']})... ";
// Double-check: Verify no relationships exist (safety check)
$result = isCustomerOrphaned($customer['id'], $customer['username']);
if (!$result['is_orphaned']) {
echo "❌ HAS RELATIONS - SKIPPING\n";
$errorCount++;
continue;
}
// Get the customer record and delete it
$customerRecord = ORM::for_table('tbl_customers')->find_one($customer['id']);
if ($customerRecord) {
$customerRecord->delete();
echo "✅ DELETED\n";
$deletedCount++;
} else {
echo "❌ NOT FOUND\n";
$errorCount++;
}
} catch (Exception $e) {
echo "❌ ERROR: " . $e->getMessage() . "\n";
$errorCount++;
}
}
echo "\n=== DELETION SUMMARY ===\n";
echo "Total orphaned customers found: " . count($orphanedCustomers) . "\n";
echo "Successfully deleted: $deletedCount\n";
echo "Errors/Skipped: $errorCount\n";
if ($deletedCount > 0) {
echo "\n✅ Deletion completed successfully!\n";
echo "Removed $deletedCount orphaned customers from the database.\n";
} else {
echo "\n⚠️ No customers were deleted.\n";
}
echo "\n=== VERIFICATION ===\n";
$remainingCustomers = ORM::for_table('tbl_customers')->count();
echo "Remaining customers in database: $remainingCustomers\n";
echo "\n=== SCRIPT COMPLETE ===\n";
?>

517
error_log Normal file
View File

@@ -0,0 +1,517 @@
[29-Jun-2024 22:57:48 Africa/Nairobi] Error: Missing username in save_data_usage()
[29-Jun-2024 22:57:50 Africa/Nairobi] Error: Missing username in save_data_usage()
[29-Jun-2024 23:00:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[29-Jun-2024 23:00:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 00:50:37 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 00:50:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 00:52:40 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 00:52:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 01:03:24 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 01:03:27 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 07:16:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 07:16:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 07:27:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 07:27:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 07:27:43 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 07:27:45 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:02:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:02:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:13:51 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:13:53 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:19:04 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:19:06 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:20:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:20:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:22:37 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:22:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:22:52 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:22:54 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:26:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 15:26:32 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 16:04:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 16:04:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 16:05:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 16:05:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 18:21:34 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 18:21:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 18:22:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 18:22:44 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:03:27 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:03:30 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:03:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:03:43 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:04:57 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:04:59 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:12:24 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:12:27 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:16:46 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:16:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:22:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:22:32 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:23:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:23:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:25:02 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:25:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:25:59 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:26:01 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:26:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:26:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:27:34 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:27:38 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:30:35 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:30:38 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:34:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:34:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:49:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 19:49:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 20:03:52 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 20:03:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 20:09:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 20:09:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 20:11:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 20:11:32 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 21:50:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 21:51:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 22:02:34 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 22:02:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 22:22:01 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 22:22:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 22:46:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 22:46:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:00:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:00:02 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:00:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:00:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:01:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:01:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:21:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[30-Jun-2024 23:21:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:08:34 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:08:37 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:15:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:15:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:33:34 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:33:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:34:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 00:34:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 01:53:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 01:53:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:00:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:00:57 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:02:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:02:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:03:08 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:03:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:08:01 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:08:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:10:38 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:10:40 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:12:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:12:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:15:47 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 02:15:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:13:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:13:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:13:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:13:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:52:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:52:57 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:54:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 10:54:30 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:04:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:04:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:04:40 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:04:42 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:04:51 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:04:53 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:19:30 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:19:32 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:19:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 11:19:44 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 14:28:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 14:28:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 14:28:21 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 14:28:24 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 14:47:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 14:47:08 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:14:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:14:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:14:51 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:14:54 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:15:04 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:15:06 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:16:08 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 15:16:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 17:59:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 17:59:51 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:43:38 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:43:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:53:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:53:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:55:04 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:55:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:55:19 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 19:55:22 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 20:33:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 20:33:08 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:27:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:27:43 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:41:21 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:41:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:45:04 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:45:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:51:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:51:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:54:02 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:54:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:57:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:57:43 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:58:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:58:42 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 22:55:47 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 22:55:50 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 22:56:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 22:56:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:07:21 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:07:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:09:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:09:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:30:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:30:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:31:47 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:31:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:31:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:32:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:34:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:34:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:37:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 23:37:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 21:05:49 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 21:06:08 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[02-Jul-2024 00:44:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 00:44:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 00:49:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 00:49:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[01-Jul-2024 22:45:41 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 22:46:30 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:01:30 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:02:27 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:04:18 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:05:19 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:22:31 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:24:35 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:25:45 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:29:56 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[01-Jul-2024 23:31:32 UTC] Error saving payment gateway record: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'pg_url_payment' cannot be null
[02-Jul-2024 02:34:57 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 02:34:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 03:41:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 03:41:01 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 04:30:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 04:30:27 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 04:32:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 04:32:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 04:34:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 04:34:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:15:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:15:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:20:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:20:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:21:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:21:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:21:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:21:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:24:42 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:24:45 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:24:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 16:24:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 17:39:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 17:39:19 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 17:44:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 17:44:19 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 17:45:08 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 17:45:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 19:39:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 19:39:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 19:48:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 19:48:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 20:36:56 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 20:37:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:07:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:07:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:07:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:07:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:18:52 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:18:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:20:02 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:20:04 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:50:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 21:50:19 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:13:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:13:33 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:13:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:13:59 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:14:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:14:19 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:30:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 22:30:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 23:25:22 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 23:25:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 23:26:59 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 23:27:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 23:47:47 Africa/Nairobi] Error: Missing username in save_data_usage()
[02-Jul-2024 23:47:50 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:21:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:21:30 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:22:06 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:22:08 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:23:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:23:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:27:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 00:27:30 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 12:39:21 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 12:39:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 12:41:53 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 12:41:56 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 13:56:52 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 13:56:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:14:33 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:14:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:16:52 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:16:54 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:17:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:17:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:17:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:18:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:18:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:18:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:29:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 14:29:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 17:12:30 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 17:12:32 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 20:52:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 20:52:51 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:00:31 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:00:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:40:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:40:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:46:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:46:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:46:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:46:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:47:32 Africa/Nairobi] Error: Missing username in save_data_usage()
[03-Jul-2024 21:47:34 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 01:05:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 01:05:31 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 01:18:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 01:18:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 01:18:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 01:18:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 10:18:35 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 10:18:38 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 10:19:02 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 10:19:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 13:16:07 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 13:16:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 13:29:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 13:29:51 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 14:32:48 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 14:32:51 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 14:43:45 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 14:43:48 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 14:50:40 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 14:50:42 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:04:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:04:19 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:04:56 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:05:01 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:05:43 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:05:46 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:07:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 15:07:21 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 16:30:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 16:30:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 16:36:35 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 16:36:37 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 18:30:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 18:30:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 18:36:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 18:36:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 19:32:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 19:32:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 20:24:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 20:24:39 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 20:24:57 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 20:25:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 20:27:22 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 20:27:24 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 21:15:38 Africa/Nairobi] Error: Missing username in save_data_usage()
[04-Jul-2024 21:15:41 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 01:33:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 01:33:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 05:40:00 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 05:40:01 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 05:40:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 05:40:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 05:42:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 05:42:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:06:53 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:06:54 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:11:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:11:04 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:12:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:12:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:13:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:13:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:17:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:17:27 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 03:19:03 UTC] Alloworigins called
[05-Jul-2024 03:19:03 UTC] Type parameter: verify
[05-Jul-2024 03:19:03 UTC] VerifyHotspot called
[05-Jul-2024 03:19:03 UTC] Invalid request method for verify
[05-Jul-2024 03:19:10 UTC] Alloworigins called
[05-Jul-2024 03:19:10 UTC] Type parameter: verify
[05-Jul-2024 03:19:10 UTC] VerifyHotspot called
[05-Jul-2024 03:19:10 UTC] Invalid request method for verify
[05-Jul-2024 03:19:35 UTC] Alloworigins called
[05-Jul-2024 03:19:35 UTC] Type parameter missing
[05-Jul-2024 03:24:53 UTC] Alloworigins called
[05-Jul-2024 03:24:53 UTC] Type parameter: grant
[05-Jul-2024 03:25:04 UTC] Alloworigins called
[05-Jul-2024 03:25:04 UTC] Type parameter missing
[05-Jul-2024 03:25:21 UTC] Alloworigins called
[05-Jul-2024 03:25:21 UTC] Type parameter missing
[05-Jul-2024 03:26:35 UTC] Alloworigins called
[05-Jul-2024 03:26:35 UTC] Type parameter missing
[05-Jul-2024 06:27:21 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:27:22 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 03:27:25 UTC] Type parameter: verify
[05-Jul-2024 03:27:25 UTC] Invalid request method for verify
[05-Jul-2024 06:27:42 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:27:43 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 03:27:44 UTC] Type parameter: verify
[05-Jul-2024 03:27:44 UTC] Invalid request method for verify
[05-Jul-2024 06:29:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:29:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 03:29:13 UTC] Type parameter: verify
[05-Jul-2024 03:30:59 UTC] Type parameter: verify
[05-Jul-2024 06:36:27 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:36:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:44:52 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:44:54 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:55:09 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:55:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:55:35 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 06:55:36 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 05:06:23 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:06:28 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:06:33 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:06:38 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:06:43 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:06:48 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:06:53 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:06:58 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:07:03 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:19:56 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:01 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:06 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:11 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:16 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:21 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:26 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:31 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:20:36 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:21:30 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:21:35 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:21:40 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:21:45 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:21:50 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:21:55 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:22:00 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:22:05 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:22:10 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:29:22 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:29:27 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:29:32 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:29:37 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:29:42 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:29:47 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:29:52 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:10 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:14 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:19 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:24 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:29 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:35 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:40 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:45 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:30:50 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:02 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:07 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:12 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:17 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:22 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:27 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:32 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:37 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 05:34:42 UTC] Status is 2 and mpesacode is not empty
[05-Jul-2024 09:09:06 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 09:09:08 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 16:36:52 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 16:36:54 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 18:32:47 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 18:32:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 20:29:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 20:29:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 20:32:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 20:32:58 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 21:50:40 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 21:50:43 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 21:57:19 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 21:57:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:18:31 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:18:33 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:20:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:20:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:21:11 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:21:15 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:59:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[05-Jul-2024 23:59:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 00:00:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 00:00:17 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 01:18:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 01:18:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 04:32:26 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 04:32:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 14:03:31 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 14:03:33 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 16:00:48 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 16:00:50 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 16:05:23 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 16:05:25 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 16:38:35 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 16:38:37 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 18:01:55 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 18:01:57 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 18:06:13 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 18:06:16 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 18:39:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 18:39:29 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:11:01 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:11:03 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:11:30 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:11:32 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:26:34 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:26:37 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:27:45 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:27:49 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:30:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:30:14 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:36:10 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 19:36:12 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 20:09:02 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 20:09:05 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 20:35:18 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 20:35:20 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 20:52:28 Africa/Nairobi] Error: Missing username in save_data_usage()
[06-Jul-2024 20:52:32 Africa/Nairobi] Error: Missing username in save_data_usage()

BIN
favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

BIN
favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

BIN
favicon-48x48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

BIN
favicon-64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

58
favicon.svg Normal file
View File

@@ -0,0 +1,58 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
<defs>
<!-- Modern gradient for the main background -->
<linearGradient id="mainGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#667eea;stop-opacity:1" />
<stop offset="100%" style="stop-color:#764ba2;stop-opacity:1" />
</linearGradient>
<!-- White for contrast elements -->
<linearGradient id="whiteGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#ffffff;stop-opacity:1" />
<stop offset="100%" style="stop-color:#f8fafc;stop-opacity:1" />
</linearGradient>
<!-- Green for active/online status -->
<linearGradient id="activeGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#10B981;stop-opacity:1" />
<stop offset="100%" style="stop-color:#059669;stop-opacity:1" />
</linearGradient>
</defs>
<!-- Background circle -->
<circle cx="16" cy="16" r="15" fill="url(#mainGradient)" stroke="#4c1d95" stroke-width="0.5"/>
<!-- Main router/device icon -->
<rect x="8" y="10" width="16" height="10" rx="2" ry="2" fill="url(#whiteGradient)" opacity="0.95"/>
<!-- Router top panel -->
<rect x="9" y="11" width="14" height="2" rx="1" ry="1" fill="url(#mainGradient)" opacity="0.8"/>
<!-- Status indicators -->
<circle cx="10" cy="15" r="1" fill="url(#activeGradient)"/>
<circle cx="13" cy="15" r="1" fill="url(#activeGradient)" opacity="0.7"/>
<circle cx="16" cy="15" r="1" fill="url(#activeGradient)" opacity="0.5"/>
<!-- Network ports -->
<rect x="9" y="17" width="1.5" height="1" fill="url(#mainGradient)" opacity="0.6"/>
<rect x="11" y="17" width="1.5" height="1" fill="url(#mainGradient)" opacity="0.6"/>
<rect x="13" y="17" width="1.5" height="1" fill="url(#mainGradient)" opacity="0.6"/>
<rect x="15" y="17" width="1.5" height="1" fill="url(#mainGradient)" opacity="0.6"/>
<rect x="17" y="17" width="1.5" height="1" fill="url(#mainGradient)" opacity="0.6"/>
<rect x="19" y="17" width="1.5" height="1" fill="url(#mainGradient)" opacity="0.6"/>
<!-- WiFi antenna -->
<line x1="12" y1="10" x2="12" y2="6" stroke="url(#whiteGradient)" stroke-width="2" stroke-linecap="round"/>
<line x1="20" y1="10" x2="20" y2="6" stroke="url(#whiteGradient)" stroke-width="2" stroke-linecap="round"/>
<!-- Antenna tips -->
<circle cx="12" cy="5" r="1" fill="url(#whiteGradient)"/>
<circle cx="20" cy="5" r="1" fill="url(#whiteGradient)"/>
<!-- Signal waves -->
<path d="M 6 6 Q 8 4 12 6" stroke="url(#activeGradient)" stroke-width="1.5" fill="none" opacity="0.8"/>
<path d="M 20 6 Q 24 4 26 6" stroke="url(#activeGradient)" stroke-width="1.5" fill="none" opacity="0.8"/>
<!-- Billing indicator (small dollar sign) -->
<text x="16" y="25" font-family="Arial, sans-serif" font-size="6" font-weight="bold" text-anchor="middle" fill="url(#whiteGradient)" opacity="0.9">$</text>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

130
find_hidden_classes.php Normal file
View File

@@ -0,0 +1,130 @@
<?php
/**
* Find Hidden Classes
* This script finds where hidden and d-none classes are being applied
*/
// Set up environment
$_GET['_route'] = 'banks/list';
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['HTTP_HOST'] = 'newdesign1.netreachsolutions.co.ke';
$_SERVER['REQUEST_URI'] = '/index.php?_route=banks/list';
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = '443';
try {
// Include necessary files
require_once 'system/vendor/autoload.php';
require_once 'init.php';
// Set up global variables
$routes = explode('/', 'banks/list');
global $ui;
// Initialize UI
$ui = new Smarty();
$ui->setTemplateDir([
'custom' => File::pathFixer($UI_PATH . '/ui_custom/'),
'default' => File::pathFixer($UI_PATH . '/ui/')
]);
$ui->assign('_url', APP_URL . '/index.php?_route=');
$ui->setCompileDir(File::pathFixer($UI_PATH . '/compiled/'));
$ui->setConfigDir(File::pathFixer($UI_PATH . '/conf/'));
$ui->setCacheDir(File::pathFixer($UI_PATH . '/cache/'));
$ui->assign('app_url', APP_URL);
$ui->assign('_domain', str_replace('www.', '', parse_url(APP_URL, PHP_URL_HOST)));
$ui->assign('_path', __DIR__);
$ui->assign('_c', $config);
$ui->assign('_system_menu', 'dashboard');
// Mock admin authentication
$_SESSION['aid'] = 1;
$_SESSION['username'] = 'admin';
$_SESSION['user_type'] = 'SuperAdmin';
// Mock admin data
$admin = [
'id' => 1,
'username' => 'admin',
'user_type' => 'SuperAdmin'
];
$ui->assign('_title', 'Bank Management');
$ui->assign('_system_menu', 'services');
$ui->assign('_admin', $admin);
// Get banks data
$query = ORM::for_table('tbl_banks');
$query->order_by_desc('is_default')->order_by_asc('name');
$banks = Paginator::findMany($query, []);
$ui->assign('banks', $banks);
$ui->assign('search', '');
$ui->assign('filter_stk', '');
$ui->assign('filter_active', '');
// Render template
ob_start();
$ui->display('banks.tpl');
$output = ob_get_contents();
ob_end_clean();
echo "=== Finding Hidden Classes ===\n";
// Search for hidden classes
$lines = explode("\n", $output);
$hidden_lines = [];
for ($i = 0; $i < count($lines); $i++) {
$line = trim($lines[$i]);
if (strpos($line, 'hidden') !== false || strpos($line, 'd-none') !== false) {
$hidden_lines[] = [
'line_num' => $i + 1,
'content' => $line
];
}
}
echo "Found " . count($hidden_lines) . " lines with hidden classes:\n\n";
foreach ($hidden_lines as $hidden) {
echo "Line " . $hidden['line_num'] . ": " . $hidden['content'] . "\n";
// Show context
$start = max(0, $hidden['line_num'] - 4);
$end = min(count($lines) - 1, $hidden['line_num'] + 2);
echo "Context:\n";
for ($j = $start; $j <= $end; $j++) {
$marker = ($j == $hidden['line_num'] - 1) ? ">>> " : " ";
echo $marker . ($j + 1) . ": " . trim($lines[$j]) . "\n";
}
echo "\n";
}
// Check if the table itself has hidden classes
if (preg_match('/<table[^>]*class="[^"]*"[^>]*>/', $output, $table_matches)) {
echo "Table opening tag: " . $table_matches[0] . "\n";
if (strpos($table_matches[0], 'hidden') !== false || strpos($table_matches[0], 'd-none') !== false) {
echo "⚠ Table has hidden classes!\n";
} else {
echo "✓ Table does not have hidden classes\n";
}
}
// Check if tbody has hidden classes
if (preg_match('/<tbody[^>]*class="[^"]*"[^>]*>/', $output, $tbody_matches)) {
echo "Tbody opening tag: " . $tbody_matches[0] . "\n";
if (strpos($tbody_matches[0], 'hidden') !== false || strpos($tbody_matches[0], 'd-none') !== false) {
echo "⚠ Tbody has hidden classes!\n";
} else {
echo "✓ Tbody does not have hidden classes\n";
}
}
} catch (Exception $e) {
echo "Exception: " . $e->getMessage() . "\n";
} catch (Error $e) {
echo "Fatal Error: " . $e->getMessage() . "\n";
}
?>

107
find_opacity_issue.php Normal file
View File

@@ -0,0 +1,107 @@
<?php
/**
* Find Opacity Issue
* This script finds where the opacity: 0 is coming from
*/
// Set up environment
$_GET['_route'] = 'banks/list';
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['HTTP_HOST'] = 'newdesign1.netreachsolutions.co.ke';
$_SERVER['REQUEST_URI'] = '/index.php?_route=banks/list';
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = '443';
try {
// Include necessary files
require_once 'system/vendor/autoload.php';
require_once 'init.php';
// Set up global variables
$routes = explode('/', 'banks/list');
global $ui;
// Initialize UI
$ui = new Smarty();
$ui->setTemplateDir([
'custom' => File::pathFixer($UI_PATH . '/ui_custom/'),
'default' => File::pathFixer($UI_PATH . '/ui/')
]);
$ui->assign('_url', APP_URL . '/index.php?_route=');
$ui->setCompileDir(File::pathFixer($UI_PATH . '/compiled/'));
$ui->setConfigDir(File::pathFixer($UI_PATH . '/conf/'));
$ui->setCacheDir(File::pathFixer($UI_PATH . '/cache/'));
$ui->assign('app_url', APP_URL);
$ui->assign('_domain', str_replace('www.', '', parse_url(APP_URL, PHP_URL_HOST)));
$ui->assign('_path', __DIR__);
$ui->assign('_c', $config);
$ui->assign('_system_menu', 'dashboard');
// Mock admin authentication
$_SESSION['aid'] = 1;
$_SESSION['username'] = 'admin';
$_SESSION['user_type'] = 'SuperAdmin';
// Mock admin data
$admin = [
'id' => 1,
'username' => 'admin',
'user_type' => 'SuperAdmin'
];
$ui->assign('_title', 'Bank Management');
$ui->assign('_system_menu', 'services');
$ui->assign('_admin', $admin);
// Get banks data
$query = ORM::for_table('tbl_banks');
$query->order_by_desc('is_default')->order_by_asc('name');
$banks = Paginator::findMany($query, []);
$ui->assign('banks', $banks);
$ui->assign('search', '');
$ui->assign('filter_stk', '');
$ui->assign('filter_active', '');
// Render template
ob_start();
$ui->display('banks.tpl');
$output = ob_get_contents();
ob_end_clean();
// Find all occurrences of opacity: 0
$lines = explode("\n", $output);
echo "=== Searching for opacity: 0 ===\n";
for ($i = 0; $i < count($lines); $i++) {
if (strpos($lines[$i], 'opacity: 0') !== false) {
echo "Found opacity: 0 at line " . ($i + 1) . ":\n";
echo " " . trim($lines[$i]) . "\n";
echo "Context (3 lines before and after):\n";
for ($j = max(0, $i - 3); $j <= min(count($lines) - 1, $i + 3); $j++) {
$marker = ($j == $i) ? ">>> " : " ";
echo $marker . ($j + 1) . ": " . trim($lines[$j]) . "\n";
}
echo "\n";
}
}
// Also search for other hiding CSS
echo "=== Searching for other hiding CSS ===\n";
$hiding_patterns = ['display: none', 'visibility: hidden', 'opacity: 0', 'height: 0', 'overflow: hidden'];
foreach ($hiding_patterns as $pattern) {
for ($i = 0; $i < count($lines); $i++) {
if (strpos($lines[$i], $pattern) !== false) {
echo "Found '$pattern' at line " . ($i + 1) . ":\n";
echo " " . trim($lines[$i]) . "\n";
}
}
}
} catch (Exception $e) {
echo "Exception: " . $e->getMessage() . "\n";
} catch (Error $e) {
echo "Fatal Error: " . $e->getMessage() . "\n";
}
?>

View File

@@ -0,0 +1,242 @@
<?php
/**
* Bank Management System Implementation Script
*
* This script implements the complete bank management system
* including database migration, menu registration, and setup.
*
* Usage: php implement_bank_management.php
*/
// Include necessary files
require_once 'config.php';
require_once 'init.php';
// Set timezone
date_default_timezone_set('Africa/Nairobi');
echo "=== Bank Management System Implementation ===\n";
echo "Database: $db_name\n";
echo "Started: " . date('Y-m-d H:i:s') . "\n\n";
try {
// Create PDO connection
$pdo = new PDO("mysql:host=$db_host;dbname=$db_name", $db_user, $db_password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "✓ Database connection established\n";
// Step 1: Run database migration
echo "1. Running database migration...\n";
include 'migrate_bank_management.php';
echo " ✓ Database migration completed\n\n";
// Step 2: Register bank management menu
echo "2. Registering bank management menu...\n";
// Check if menu already exists
$stmt = $pdo->query("SELECT COUNT(*) as count FROM tbl_appconfig WHERE setting = 'menu_banks'");
$menu_exists = $stmt->fetch()['count'] > 0;
if (!$menu_exists) {
// Register bank management menu
$menu_config = [
'menu_banks' => 'Bank Management',
'menu_banks_url' => 'banks/list',
'menu_banks_icon' => 'fa fa-university',
'menu_banks_order' => '50',
'menu_banks_permission' => 'SuperAdmin,Admin'
];
foreach ($menu_config as $key => $value) {
$stmt = $pdo->prepare("INSERT INTO tbl_appconfig (setting, value) VALUES (?, ?) ON DUPLICATE KEY UPDATE value = ?");
$stmt->execute([$key, $value, $value]);
}
echo " ✓ Bank management menu registered\n";
} else {
echo " ✓ Bank management menu already exists\n";
}
// Step 3: Create bank management JavaScript file
echo "3. Creating JavaScript file...\n";
$js_content = '// Bank Management JavaScript
$(document).ready(function() {
// Bank management specific JavaScript functions
console.log("Bank Management System Loaded");
// Add any bank-specific JavaScript here
});';
$js_file = __DIR__ . '/ui/lib/c/banks.js';
if (!file_exists($js_file)) {
file_put_contents($js_file, $js_content);
echo " ✓ JavaScript file created\n";
} else {
echo " ✓ JavaScript file already exists\n";
}
// Step 4: Verify implementation
echo "4. Verifying implementation...\n";
// Check tbl_banks structure
$stmt = $pdo->query("DESCRIBE tbl_banks");
$columns = $stmt->fetchAll(PDO::FETCH_COLUMN);
$required_columns = ['id', 'name', 'paybill', 'account_number', 'account_name', 'bank_code', 'supports_stk_push', 'is_active', 'is_default'];
$missing_columns = array_diff($required_columns, $columns);
if (empty($missing_columns)) {
echo " ✓ tbl_banks table structure is correct\n";
} else {
echo " ✗ Missing columns: " . implode(', ', $missing_columns) . "\n";
}
// Check if banks exist
$stmt = $pdo->query("SELECT COUNT(*) as count FROM tbl_banks");
$bank_count = $stmt->fetch()['count'];
echo " ✓ Found $bank_count banks in database\n";
// Check STK Push configuration
$stmt = $pdo->query("SELECT * FROM tbl_appconfig WHERE setting = 'Stkbankacc'");
$stk_config = $stmt->fetch();
if ($stk_config && is_numeric($stk_config['value'])) {
echo " ✓ BankStkPush configured with bank ID: {$stk_config['value']}\n";
} else {
echo " ⚠ BankStkPush may need configuration\n";
}
// Step 5: Create usage documentation
echo "5. Creating usage documentation...\n";
$doc_content = '# Bank Management System
## Overview
The Bank Management System provides a professional interface for managing bank accounts used in STK Push payments.
## Features
- Add, edit, delete bank accounts
- Enable/disable STK Push support per bank
- Set default bank for STK Push
- Search and filter banks
- Professional admin interface
## Usage
### Access Bank Management
1. Login to admin panel
2. Navigate to "Bank Management" in the menu
3. Or go directly to: /admin/banks/list
### Add New Bank
1. Click "Add New Bank" button
2. Fill in bank details:
- Bank Name (required)
- Account Number (required)
- Account Name (required)
- Bank Code (optional)
- Paybill Number (optional)
- STK Push Support (checkbox)
- Active Status (checkbox)
- Set as Default (checkbox)
### Configure BankStkPush
1. Go to Payment Gateway settings
2. Select "BankStkPush"
3. Choose bank from dropdown
4. Save configuration
### Bank Management Actions
- **Edit**: Modify bank details
- **Set Default**: Make bank default for STK Push
- **Toggle Status**: Activate/deactivate bank
- **Delete**: Remove bank (if not in use)
## Database Structure
### tbl_banks table
- `id`: Primary key
- `name`: Bank name
- `paybill`: M-Pesa paybill number
- `account_number`: Bank account number
- `account_name`: Account holder name
- `bank_code`: Bank code (e.g., MPESA, EQTY)
- `supports_stk_push`: 1 if supports STK Push
- `is_active`: 1 if active
- `is_default`: 1 if default bank
- `created_at`: Creation timestamp
- `updated_at`: Last update timestamp
### tbl_appconfig settings
- `Stkbankacc`: Selected bank ID (not account number)
- `Stkbankname`: Selected bank name (for compatibility)
## API Endpoints
- `GET /admin/banks/api/get-active-banks`: Get banks with STK Push support
- `GET /admin/banks/api/get-bank-details`: Get specific bank details
## Security
- Role-based access control (SuperAdmin, Admin only)
- Input validation and sanitization
- CSRF protection
- Audit logging
## Troubleshooting
### No banks available in BankStkPush
1. Check if banks exist in Bank Management
2. Ensure banks have STK Push support enabled
3. Ensure banks are active
### Bank not found error
1. Verify bank exists in database
2. Check if bank is active
3. Check if bank supports STK Push
### Migration issues
1. Run restore script if needed
2. Check database permissions
3. Verify table structure
## Support
For issues or questions, check the logs and database structure.
';
file_put_contents(__DIR__ . '/BANK_MANAGEMENT_README.md', $doc_content);
echo " ✓ Documentation created\n";
echo "\n=== Implementation Completed Successfully! ===\n";
echo "Next steps:\n";
echo "1. Access admin panel and navigate to 'Bank Management'\n";
echo "2. Add your bank accounts\n";
echo "3. Configure BankStkPush to use the new system\n";
echo "4. Test the payment flow\n\n";
// Display current status
echo "=== Current Status ===\n";
// Show banks
$stmt = $pdo->query("SELECT id, name, account_number, supports_stk_push, is_active, is_default FROM tbl_banks ORDER BY is_default DESC, name");
$banks = $stmt->fetchAll(PDO::FETCH_ASSOC);
if (empty($banks)) {
echo "No banks found. Please add banks through the admin interface.\n";
} else {
echo "Current banks:\n";
foreach ($banks as $bank) {
$status = $bank['is_active'] ? 'Active' : 'Inactive';
$stk_support = $bank['supports_stk_push'] ? 'STK ✓' : 'STK ✗';
$default = $bank['is_default'] ? ' (DEFAULT)' : '';
echo "- ID: {$bank['id']}, {$bank['name']}, Account: {$bank['account_number']}, $status, $stk_support$default\n";
}
}
echo "\n=== Access URLs ===\n";
echo "Bank Management: " . APP_URL . "/index.php?_route=banks/list\n";
echo "BankStkPush Config: " . APP_URL . "/index.php?_route=paymentgateway/BankStkPush\n";
} catch (Exception $e) {
echo "✗ Implementation failed: " . $e->getMessage() . "\n";
echo "Please check the error and try again.\n";
echo "You can restore from backup if needed.\n";
exit(1);
}
?>

40
index.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
/**
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
* by https://t.me/ibnux
**/
session_start();
if(isset($_GET['nux-mac']) && !empty($_GET['nux-mac'])){
$_SESSION['nux-mac'] = $_GET['nux-mac'];
}
if(isset($_GET['nux-ip']) && !empty($_GET['nux-ip'])){
$_SESSION['nux-ip'] = $_GET['nux-ip'];
}
if(isset($_GET['nux-router']) && !empty($_GET['nux-router'])){
$_SESSION['nux-router'] = $_GET['nux-router'];
}
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
}
// Access-Control headers are received during OPTIONS requests
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
exit(0);
}
require_once 'system/vendor/autoload.php';
require_once 'system/boot.php';
App::_run();

340
init.php Normal file
View File

@@ -0,0 +1,340 @@
<?php
/**
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
* by https://t.me/ibnux
**/
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
header('HTTP/1.0 403 Forbidden', TRUE, 403);
header('location: ../');
die();
}
$root_path = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR;
if (!isset($isApi)) {
$isApi = false;
}
// on some server, it getting error because of slash is backwards
function _autoloader($class)
{
global $root_path;
if (strpos($class, '_') !== false) {
$class = str_replace('_', DIRECTORY_SEPARATOR, $class);
if (file_exists($root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php')) {
include $root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
} else {
$class = str_replace("\\", DIRECTORY_SEPARATOR, $class);
if (file_exists($root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php'))
include $root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
}
} else {
if (file_exists($root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php')) {
include $root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
} else {
$class = str_replace("\\", DIRECTORY_SEPARATOR, $class);
if (file_exists($root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php'))
include $root_path . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
}
}
}
spl_autoload_register('_autoloader');
if (!file_exists($root_path . 'config.php')) {
$root_path .= '..' . DIRECTORY_SEPARATOR;
if (!file_exists($root_path . 'config.php')) {
r2('install');
}
}
if (!file_exists($root_path . File::pathFixer('system/orm.php'))) {
die($root_path . "orm.php file not found");
}
$UPLOAD_PATH = $root_path . File::pathFixer('system/uploads');
$CACHE_PATH = $root_path . File::pathFixer('system/cache');
$PAGES_PATH = $root_path . File::pathFixer('pages');
$PLUGIN_PATH = $root_path . File::pathFixer('system/plugin');
$PAYMENTGATEWAY_PATH = $root_path . File::pathFixer('system/paymentgateway');
$UI_PATH = 'ui';
if (!file_exists($UPLOAD_PATH . File::pathFixer('/notifications.default.json'))) {
die($UPLOAD_PATH . File::pathFixer("/notifications.default.json file not found"));
}
require_once $root_path . 'config.php';
require_once $root_path . File::pathFixer('system/orm.php');
require_once $root_path . File::pathFixer('system/autoload/PEAR2/Autoload.php');
include $root_path . File::pathFixer('system/autoload/Hookers.php');
ORM::configure("mysql:host=$db_host;dbname=$db_name");
ORM::configure('username', $db_user);
ORM::configure('password', $db_password);
ORM::configure('return_result_sets', true);
if ($_app_stage != 'Live') {
ORM::configure('logging', true);
}
if ($isApi) {
define('U', APP_URL . '/system/api.php?r=');
} else {
define('U', APP_URL . '/index.php?_route=');
}
// notification message
if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . "notifications.json")) {
$_notifmsg = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.json'), true);
}
$_notifmsg_default = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.default.json'), true);
//register all plugin
foreach (glob(File::pathFixer($PLUGIN_PATH . DIRECTORY_SEPARATOR . '*.php')) as $filename) {
try {
include $filename;
} catch (Throwable $e) {
//ignore plugin error
} catch (Exception $e) {
//ignore plugin error
}
}
$result = ORM::for_table('tbl_appconfig')->find_many();
foreach ($result as $value) {
$config[$value['setting']] = $value['value'];
}
$_c = $config;
if (empty($http_proxy) && !empty($config['http_proxy'])) {
$http_proxy = $config['http_proxy'];
if (empty($http_proxyauth) && !empty($config['http_proxyauth'])) {
$http_proxyauth = $config['http_proxyauth'];
}
}
date_default_timezone_set($config['timezone']);
if ((!empty($radius_user) && $config['radius_enable']) || _post('radius_enable')) {
if(!empty($radius_password)){
$radius_pass = $radius_password;
}
ORM::configure("mysql:host=$radius_host;dbname=$radius_name", null, 'radius');
ORM::configure('username', $radius_user, 'radius');
ORM::configure('password', $radius_pass, 'radius');
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), 'radius');
ORM::configure('return_result_sets', true, 'radius');
}
if (empty($config['language'])) {
$config['language'] = 'english';
}
$lan_file = $root_path . File::pathFixer('system/lan/' . $config['language'] . '.json');
if (file_exists($lan_file)) {
$_L = json_decode(file_get_contents($lan_file), true);
$_SESSION['Lang'] = $_L;
} else {
$_L['author'] = 'Auto Generated by iBNuX Script';
$_SESSION['Lang'] = $_L;
file_put_contents($lan_file, json_encode($_L));
}
function safedata($value)
{
$value = trim($value);
return $value;
}
function _post($param, $defvalue = '')
{
if (!isset($_POST[$param])) {
return $defvalue;
} else {
return safedata($_POST[$param]);
}
}
function _get($param, $defvalue = '')
{
if (!isset($_GET[$param])) {
return $defvalue;
} else {
return safedata($_GET[$param]);
}
}
function _req($param, $defvalue = '')
{
if (!isset($_REQUEST[$param])) {
return $defvalue;
} else {
return safedata($_REQUEST[$param]);
}
}
function _auth($login = true)
{
if (User::getID()) {
return true;
} else {
if ($login) {
r2(U . 'login');
} else {
return false;
}
}
}
function _admin($login = true)
{
if (Admin::getID()) {
return true;
} else {
if ($login) {
r2(U . 'login');
} else {
return false;
}
}
}
function _log($description, $type = '', $userid = '0')
{
$d = ORM::for_table('tbl_logs')->create();
$d->date = date('Y-m-d H:i:s');
$d->type = $type;
$d->description = $description;
$d->userid = $userid;
if (!empty($_SERVER['HTTP_CF_CONNECTING_IP'])) //to check ip is pass from cloudflare tunnel
{
$d->ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$d->ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (!empty($_SERVER['HTTP_CLIENT_IP'])) //to check ip from share internet
{
$d->ip = $_SERVER['HTTP_CLIENT_IP'];
} else {
$d->ip = $_SERVER["REMOTE_ADDR"];
}
$d->save();
}
function Lang($key)
{
return Lang::T($key);
}
function alphanumeric($str, $tambahan = "")
{
return Text::alphanumeric($str, $tambahan);
}
function showResult($success, $message = '', $result = [], $meta = [])
{
header("Content-Type: Application/json");
$json = json_encode(['success' => $success, 'message' => $message, 'result' => $result, 'meta' => $meta]);
echo $json;
die();
}
function generateUniqueNumericVouchers($totalVouchers, $length = 8)
{
// Define characters allowed in the voucher code
$characters = '0123456789';
$charactersLength = strlen($characters);
$vouchers = array();
// Attempt to generate unique voucher codes
for ($j = 0; $j < $totalVouchers; $j++) {
do {
$voucherCode = '';
// Generate the voucher code
for ($i = 0; $i < $length; $i++) {
$voucherCode .= $characters[rand(0, $charactersLength - 1)];
}
// Check if the generated voucher code already exists in the array
$isUnique = !in_array($voucherCode, $vouchers);
} while (!$isUnique);
$vouchers[] = $voucherCode;
}
return $vouchers;
}
function sendTelegram($txt)
{
Message::sendTelegram($txt);
}
function sendSMS($phone, $txt)
{
Message::sendSMS($phone, $txt);
}
function sendWhatsapp($phone, $txt)
{
Message::sendWhatsapp($phone, $txt);
}
function r2($to, $ntype = 'e', $msg = '')
{
global $isApi;
if ($isApi) {
showResult(
($ntype == 's') ? true : false,
$msg
);
}
if ($msg == '') {
header("location: $to");
exit;
}
$_SESSION['ntype'] = $ntype;
$_SESSION['notify'] = $msg;
header("location: $to");
exit;
}
function _alert($text, $type = 'success', $url = "home", $time = 3)
{
global $ui, $isApi;
if ($isApi) {
showResult(
($type == 'success') ? true : false,
$text
);
}
if (!isset($ui)) return;
if (strlen($url) > 4) {
if (substr($url, 0, 4) != "http") {
$url = U . $url;
}
} else {
$url = U . $url;
}
$ui->assign('text', $text);
$ui->assign('type', $type);
$ui->assign('time', $time);
$ui->assign('url', $url);
$ui->display('alert.tpl');
die();
}
if (!isset($api_secret)) {
$api_secret = $db_password;
}
function displayMaintenanceMessage(): void
{
global $config, $ui;
$date = $config['maintenance_date'];
if ($date){
$ui->assign('date', $date);
}
http_response_code(503);
$ui->assign('companyName', $config['CompanyName']);
$ui->display('maintenance.tpl');
die();
}

220
migrate_bank_management.php Normal file
View File

@@ -0,0 +1,220 @@
<?php
/**
* Bank Management System Migration Script
*
* This script enhances the existing tbl_banks table and migrates
* current BankStkPush configuration to the new system.
*
* Usage: php migrate_bank_management.php
*/
// Include database configuration
require_once 'config.php';
// Set timezone
date_default_timezone_set('Africa/Nairobi');
echo "=== Bank Management System Migration ===\n";
echo "Database: $db_name\n";
echo "Started: " . date('Y-m-d H:i:s') . "\n\n";
try {
// Create PDO connection
$pdo = new PDO("mysql:host=$db_host;dbname=$db_name", $db_user, $db_password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "✓ Database connection established\n";
// Step 1: Check if tbl_banks table exists
echo "1. Checking tbl_banks table...\n";
$stmt = $pdo->query("SHOW TABLES LIKE 'tbl_banks'");
$table_exists = $stmt->fetch();
if (!$table_exists) {
echo " Creating tbl_banks table...\n";
$create_table_sql = "
CREATE TABLE `tbl_banks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`paybill` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
";
$pdo->exec($create_table_sql);
echo " ✓ tbl_banks table created\n";
} else {
echo " ✓ tbl_banks table exists\n";
}
// Step 2: Enhance tbl_banks table with new columns
echo "2. Enhancing tbl_banks table...\n";
// Check if columns already exist
$stmt = $pdo->query("SHOW COLUMNS FROM tbl_banks LIKE 'account_number'");
$account_number_exists = $stmt->fetch();
if (!$account_number_exists) {
$alter_sql = "
ALTER TABLE `tbl_banks`
ADD COLUMN `account_number` VARCHAR(50) NOT NULL DEFAULT '' AFTER `paybill`,
ADD COLUMN `account_name` VARCHAR(255) NOT NULL DEFAULT '' AFTER `account_number`,
ADD COLUMN `bank_code` VARCHAR(10) NOT NULL DEFAULT '' AFTER `account_name`,
ADD COLUMN `supports_stk_push` TINYINT(1) NOT NULL DEFAULT 0 AFTER `bank_code`,
ADD COLUMN `is_active` TINYINT(1) NOT NULL DEFAULT 1 AFTER `supports_stk_push`,
ADD COLUMN `is_default` TINYINT(1) NOT NULL DEFAULT 0 AFTER `is_active`,
ADD COLUMN `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP AFTER `is_default`,
ADD COLUMN `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `created_at`;
";
$pdo->exec($alter_sql);
echo " ✓ New columns added to tbl_banks\n";
} else {
echo " ✓ tbl_banks already enhanced\n";
}
// Step 3: Get current BankStkPush configuration
echo "3. Reading current BankStkPush configuration...\n";
$stmt = $pdo->query("SELECT setting, value FROM tbl_appconfig WHERE setting IN ('Stkbankacc', 'Stkbankname')");
$current_config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
$current_account = $current_config['Stkbankacc'] ?? '';
$current_name = $current_config['Stkbankname'] ?? '';
echo " Current account: $current_account\n";
echo " Current bank name: $current_name\n";
// Step 4: Create bank record from existing configuration
if (!empty($current_account) && !empty($current_name)) {
echo "4. Creating bank record from existing configuration...\n";
// Check if bank already exists
$stmt = $pdo->prepare("SELECT id FROM tbl_banks WHERE name = ? AND account_number = ?");
$stmt->execute([$current_name, $current_account]);
$existing_bank = $stmt->fetch();
if (!$existing_bank) {
$insert_sql = "
INSERT INTO tbl_banks (name, paybill, account_number, account_name, supports_stk_push, is_active, is_default)
VALUES (?, ?, ?, ?, 1, 1, 1)
";
$stmt = $pdo->prepare($insert_sql);
$stmt->execute([
$current_name,
0, // Default paybill value
$current_account,
$current_name . ' Account' // Default account name
]);
$bank_id = $pdo->lastInsertId();
echo " ✓ Bank record created with ID: $bank_id\n";
// Step 5: Update appconfig to use bank ID
echo "5. Updating appconfig to use bank ID...\n";
$stmt = $pdo->prepare("UPDATE tbl_appconfig SET value = ? WHERE setting = 'Stkbankacc'");
$stmt->execute([$bank_id]);
echo " ✓ Stkbankacc updated to bank ID: $bank_id\n";
} else {
$bank_id = $existing_bank['id'];
echo " ✓ Bank record already exists with ID: $bank_id\n";
// Update existing bank to support STK Push
$stmt = $pdo->prepare("UPDATE tbl_banks SET supports_stk_push = 1, is_active = 1 WHERE id = ?");
$stmt->execute([$bank_id]);
echo " ✓ Bank record updated to support STK Push\n";
}
} else {
echo "4. No existing BankStkPush configuration found\n";
echo " You can add banks through the admin interface\n";
}
// Step 6: Create sample banks if none exist
echo "6. Checking for existing banks...\n";
$stmt = $pdo->query("SELECT COUNT(*) as count FROM tbl_banks");
$bank_count = $stmt->fetch()['count'];
if ($bank_count == 0) {
echo " Creating sample banks...\n";
$sample_banks = [
['name' => 'Safaricom M-Pesa', 'account_number' => '1234567890', 'account_name' => 'M-Pesa Account', 'bank_code' => 'MPESA', 'supports_stk_push' => 1, 'is_active' => 1, 'is_default' => 1],
['name' => 'Equity Bank', 'account_number' => '0987654321', 'account_name' => 'Equity Account', 'bank_code' => 'EQTY', 'supports_stk_push' => 1, 'is_active' => 1, 'is_default' => 0],
['name' => 'KCB Bank', 'account_number' => '1122334455', 'account_name' => 'KCB Account', 'bank_code' => 'KCB', 'supports_stk_push' => 0, 'is_active' => 1, 'is_default' => 0]
];
$insert_sql = "
INSERT INTO tbl_banks (name, account_number, account_name, bank_code, supports_stk_push, is_active, is_default)
VALUES (?, ?, ?, ?, ?, ?, ?)
";
$stmt = $pdo->prepare($insert_sql);
foreach ($sample_banks as $bank) {
$stmt->execute([
$bank['name'],
$bank['account_number'],
$bank['account_name'],
$bank['bank_code'],
$bank['supports_stk_push'],
$bank['is_active'],
$bank['is_default']
]);
}
echo " ✓ Sample banks created\n";
} else {
echo " ✓ Found $bank_count existing banks\n";
}
// Step 7: Verify migration
echo "7. Verifying migration...\n";
// Check tbl_banks structure
$stmt = $pdo->query("DESCRIBE tbl_banks");
$columns = $stmt->fetchAll(PDO::FETCH_COLUMN);
$required_columns = ['id', 'name', 'paybill', 'account_number', 'account_name', 'bank_code', 'supports_stk_push', 'is_active', 'is_default'];
$missing_columns = array_diff($required_columns, $columns);
if (empty($missing_columns)) {
echo " ✓ tbl_banks table structure is correct\n";
} else {
echo " ✗ Missing columns: " . implode(', ', $missing_columns) . "\n";
}
// Check appconfig
$stmt = $pdo->query("SELECT * FROM tbl_appconfig WHERE setting = 'Stkbankacc'");
$stk_config = $stmt->fetch();
if ($stk_config && is_numeric($stk_config['value'])) {
echo " ✓ Stkbankacc now contains bank ID: {$stk_config['value']}\n";
} else {
echo " ⚠ Stkbankacc may need manual update\n";
}
// Check banks with STK Push support
$stmt = $pdo->query("SELECT COUNT(*) as count FROM tbl_banks WHERE supports_stk_push = 1 AND is_active = 1");
$stk_banks = $stmt->fetch()['count'];
echo " ✓ Banks with STK Push support: $stk_banks\n";
echo "\n=== Migration Completed Successfully! ===\n";
echo "Next steps:\n";
echo "1. Access the bank management interface at /admin/banks/\n";
echo "2. Update BankStkPush configuration to use the new system\n";
echo "3. Test the payment flow\n\n";
// Display current banks
echo "=== Current Banks ===\n";
$stmt = $pdo->query("SELECT id, name, account_number, supports_stk_push, is_active, is_default FROM tbl_banks ORDER BY is_default DESC, name");
$banks = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($banks as $bank) {
$status = $bank['is_active'] ? 'Active' : 'Inactive';
$stk_support = $bank['supports_stk_push'] ? 'STK ✓' : 'STK ✗';
$default = $bank['is_default'] ? ' (DEFAULT)' : '';
echo "- ID: {$bank['id']}, {$bank['name']}, Account: {$bank['account_number']}, $status, $stk_support$default\n";
}
} catch (Exception $e) {
echo "✗ Migration failed: " . $e->getMessage() . "\n";
echo "Please check the error and try again.\n";
echo "You can restore from backup if needed.\n";
exit(1);
}
?>

View File

@@ -0,0 +1,84 @@
#!/bin/bash
# Restore Script for Suspend Functionality Changes
# This script reverts all changes made to implement the suspend functionality
echo "=== RESTORING SUSPEND FUNCTIONALITY CHANGES ==="
echo "Date: $(date)"
echo ""
# Check if we're in the right directory
if [ ! -f "system/controllers/plan.php" ]; then
echo "ERROR: Please run this script from the project root directory"
exit 1
fi
echo "1. Backing up current files before restore..."
# Create backup directory
mkdir -p backups/$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="backups/$(date +%Y%m%d_%H%M%S)"
# Backup current modified files
cp system/controllers/plan.php "$BACKUP_DIR/plan.php.current"
cp ui/ui/plan.tpl "$BACKUP_DIR/plan.tpl.current"
cp system/cron.php "$BACKUP_DIR/cron.php.current"
echo " ✓ Backed up current files to $BACKUP_DIR"
echo ""
echo "2. Restoring original files..."
# Check if original backups exist
if [ ! -f "backups/original/plan.php" ]; then
echo " ⚠️ Original backup not found. Creating from current state..."
mkdir -p backups/original
cp system/controllers/plan.php backups/original/plan.php
cp ui/ui/plan.tpl backups/original/plan.tpl
cp system/cron.php backups/original/cron.php
echo " ✓ Created original backup from current state"
else
echo " ✓ Found original backups"
fi
# Restore original files
cp backups/original/plan.php system/controllers/plan.php
cp backups/original/plan.tpl ui/ui/plan.tpl
cp backups/original/cron.php system/cron.php
echo " ✓ Restored original files"
echo ""
echo "3. Cleaning up temporary files..."
# Remove any temporary files created during implementation
rm -f debug_cron.php
rm -f test_suspend.php
echo " ✓ Cleaned up temporary files"
echo ""
echo "4. Verifying restoration..."
# Check if files were restored
if [ -f "system/controllers/plan.php" ] && [ -f "ui/ui/plan.tpl" ] && [ -f "system/cron.php" ]; then
echo " ✓ All files restored successfully"
else
echo " ❌ ERROR: Some files could not be restored"
exit 1
fi
echo ""
echo "=== RESTORATION COMPLETE ==="
echo "All suspend functionality changes have been reverted."
echo "The system should now be in its original state."
echo ""
echo "Files restored:"
echo " - system/controllers/plan.php"
echo " - ui/ui/plan.tpl"
echo " - system/cron.php"
echo ""
echo "Current backup saved to: $BACKUP_DIR"
echo "Original backup location: backups/original/"
echo ""
echo "You can now test the original functionality."

187
seed_clients.php Normal file
View File

@@ -0,0 +1,187 @@
<?php
/**
* Client Data Seeder Script
* Generates 60 varied client records for testing statistics
*/
// Include the application initialization
require_once 'init.php';
// Sample data arrays for generating varied information
$firstNames = [
'John', 'Jane', 'Michael', 'Sarah', 'David', 'Emily', 'Robert', 'Jessica', 'William', 'Ashley',
'James', 'Amanda', 'Christopher', 'Jennifer', 'Daniel', 'Lisa', 'Matthew', 'Nancy', 'Anthony', 'Karen',
'Mark', 'Betty', 'Donald', 'Helen', 'Steven', 'Sandra', 'Paul', 'Donna', 'Andrew', 'Carol',
'Joshua', 'Ruth', 'Kenneth', 'Sharon', 'Kevin', 'Michelle', 'Brian', 'Laura', 'George', 'Sarah',
'Edward', 'Kimberly', 'Ronald', 'Deborah', 'Timothy', 'Dorothy', 'Jason', 'Lisa', 'Jeffrey', 'Nancy',
'Ryan', 'Karen', 'Jacob', 'Betty', 'Gary', 'Helen', 'Nicholas', 'Sandra', 'Eric', 'Donna'
];
$lastNames = [
'Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis', 'Rodriguez', 'Martinez',
'Hernandez', 'Lopez', 'Gonzalez', 'Wilson', 'Anderson', 'Thomas', 'Taylor', 'Moore', 'Jackson', 'Martin',
'Lee', 'Perez', 'Thompson', 'White', 'Harris', 'Sanchez', 'Clark', 'Ramirez', 'Lewis', 'Robinson',
'Walker', 'Young', 'Allen', 'King', 'Wright', 'Scott', 'Torres', 'Nguyen', 'Hill', 'Flores',
'Green', 'Adams', 'Nelson', 'Baker', 'Hall', 'Rivera', 'Campbell', 'Mitchell', 'Carter', 'Roberts',
'Gomez', 'Phillips', 'Evans', 'Turner', 'Diaz', 'Parker', 'Cruz', 'Edwards', 'Collins', 'Reyes'
];
$cities = [
'Nairobi', 'Mombasa', 'Kisumu', 'Nakuru', 'Eldoret', 'Thika', 'Malindi', 'Kitale', 'Garissa', 'Kakamega',
'Nyeri', 'Meru', 'Machakos', 'Kisii', 'Kericho', 'Bungoma', 'Busia', 'Vihiga', 'Siaya', 'Homa Bay',
'Migori', 'Kisii', 'Nyamira', 'Trans Nzoia', 'Uasin Gishu', 'Nandi', 'Baringo', 'Laikipia', 'Nakuru', 'Narok'
];
$districts = [
'Central', 'East', 'West', 'North', 'South', 'Downtown', 'Uptown', 'Riverside', 'Hillside', 'Valley',
'Park', 'Garden', 'Heights', 'Ridge', 'Meadows', 'Woods', 'Springs', 'Lakes', 'Pines', 'Oaks'
];
$states = [
'Nairobi', 'Mombasa', 'Kisumu', 'Nakuru', 'Uasin Gishu', 'Kakamega', 'Bungoma', 'Busia', 'Vihiga', 'Siaya',
'Homa Bay', 'Migori', 'Kisii', 'Nyamira', 'Trans Nzoia', 'Nandi', 'Baringo', 'Laikipia', 'Narok', 'Kajiado'
];
$serviceTypes = ['Hotspot', 'PPPoE', 'Others'];
$accountTypes = ['Business', 'Personal'];
$statuses = ['Active', 'Inactive', 'Limited', 'Suspended', 'Banned', 'Disabled'];
// Function to generate random phone number
function generatePhoneNumber() {
$prefixes = ['254', '2547', '2541', '2542', '2543', '2544', '2545', '2546', '2548', '2549'];
$prefix = $prefixes[array_rand($prefixes)];
$suffix = str_pad(rand(0, 99999999), 8, '0', STR_PAD_LEFT);
return $prefix . $suffix;
}
// Function to generate random email
function generateEmail($firstName, $lastName) {
$domains = ['gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com', 'company.co.ke', 'business.ke'];
$domain = $domains[array_rand($domains)];
$variations = ['', '.', '_', rand(1, 99)];
$variation = $variations[array_rand($variations)];
return strtolower($firstName . $variation . $lastName . '@' . $domain);
}
// Function to generate random coordinates (Kenya bounds)
function generateCoordinates() {
$lat = rand(-4700000, -1000000) / 100000; // Kenya latitude range
$lng = rand(33000000, 42000000) / 100000; // Kenya longitude range
return $lat . ',' . $lng;
}
// Function to generate random balance
function generateBalance() {
$balances = [0, 50, 100, 150, 200, 250, 300, 500, 750, 1000, 1500, 2000, 2500, 3000, 5000];
return $balances[array_rand($balances)];
}
// Function to generate random address
function generateAddress($city) {
$streets = ['Main St', 'First Ave', 'Second Ave', 'Oak St', 'Pine St', 'Cedar Ave', 'Maple Dr', 'Elm St', 'Park Ave', 'Broadway'];
$street = $streets[array_rand($streets)];
$number = rand(1, 9999);
return $number . ' ' . $street . ', ' . $city;
}
// Function to generate random zip code
function generateZipCode() {
return str_pad(rand(10000, 99999), 5, '0', STR_PAD_LEFT);
}
echo "Starting client data seeding...\n";
try {
// Get admin ID for created_by field
$admin = ORM::for_table('tbl_users')->where('user_type', 'SuperAdmin')->find_one();
$adminId = $admin ? $admin['id'] : 1;
$successCount = 0;
$errorCount = 0;
for ($i = 1; $i <= 60; $i++) {
try {
// Generate random data
$firstName = $firstNames[array_rand($firstNames)];
$lastName = $lastNames[array_rand($lastNames)];
$fullname = $firstName . ' ' . $lastName;
$username = generatePhoneNumber();
$email = generateEmail($firstName, $lastName);
$city = $cities[array_rand($cities)];
$district = $districts[array_rand($districts)];
$state = $states[array_rand($states)];
$serviceType = $serviceTypes[array_rand($serviceTypes)];
$accountType = $accountTypes[array_rand($accountTypes)];
$status = $statuses[array_rand($statuses)];
$balance = generateBalance();
$coordinates = generateCoordinates();
$address = generateAddress($city);
$zip = generateZipCode();
$phonenumber = generatePhoneNumber();
// Generate passwords
$password = 'client' . $i . 'pass';
$pppoePassword = 'pppoe' . $i . 'pass';
// Create customer record
$customer = ORM::for_table('tbl_customers')->create();
$customer->username = $username;
$customer->password = $password;
$customer->pppoe_password = $pppoePassword;
$customer->email = $email;
$customer->account_type = $accountType;
$customer->fullname = $fullname;
$customer->address = $address;
$customer->created_by = $adminId;
$customer->phonenumber = $phonenumber;
$customer->service_type = $serviceType;
$customer->coordinates = $coordinates;
$customer->city = $city;
$customer->district = $district;
$customer->state = $state;
$customer->zip = $zip;
$customer->balance = $balance;
$customer->auto_renewal = rand(0, 1);
$customer->status = $status;
if ($customer->save()) {
$successCount++;
echo "Created client #$i: $fullname ($email) - $serviceType - $accountType - $status\n";
// Add some custom fields for variety
if (rand(0, 1)) { // 50% chance of having custom fields
$customFields = [
'Company' => 'Company ' . $i,
'Department' => ['IT', 'Sales', 'Marketing', 'Finance', 'HR'][array_rand(['IT', 'Sales', 'Marketing', 'Finance', 'HR'])],
'Referral' => ['Website', 'Friend', 'Advertisement', 'Walk-in', 'Social Media'][array_rand(['Website', 'Friend', 'Advertisement', 'Walk-in', 'Social Media'])],
'Notes' => 'Customer notes for ' . $fullname
];
foreach ($customFields as $fieldName => $fieldValue) {
$customField = ORM::for_table('tbl_customers_fields')->create();
$customField->customer_id = $customer->id();
$customField->field_name = $fieldName;
$customField->field_value = $fieldValue;
$customField->save();
}
}
} else {
$errorCount++;
echo "Failed to create client #$i\n";
}
} catch (Exception $e) {
$errorCount++;
echo "Error creating client #$i: " . $e->getMessage() . "\n";
}
}
echo "\nSeeding completed!\n";
echo "Successfully created: $successCount clients\n";
echo "Errors: $errorCount\n";
echo "Total clients in database: " . ORM::for_table('tbl_customers')->count() . "\n";
} catch (Exception $e) {
echo "Fatal error: " . $e->getMessage() . "\n";
}
?>

56
talksasa.php Normal file
View File

@@ -0,0 +1,56 @@
<?php
// talksasa.php
// Sanitize and get the GET parameters
$message = isset($_GET['message']) ? trim($_GET['message']) : '';
$phone = isset($_GET['phone']) ? trim($_GET['phone']) : '';
$sender_id = isset($_GET['senderid']) ? trim($_GET['senderid']) : '';
$api_param = isset($_GET['api']) ? trim($_GET['api']) : '';
// Validate required parameters
if (empty($message) || empty($phone) || empty($sender_id) || empty($api_param)) {
http_response_code(400);
echo json_encode(['status' => 'error', 'message' => 'Missing required parameters.']);
exit;
}
// Extract API token from api param (format: 138|your_token)
list($account_id, $api_token) = explode('|', $api_param, 2);
// API Endpoint
$url = 'https://bulksms.talksasa.com/api/v3/sms/send';
// Setup the payload
$data = [
'recipient' => $phone,
'sender_id' => $sender_id,
'type' => 'plain',
'message' => $message,
];
// Initialize cURL
$ch = curl_init($url);
// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $api_token",
'Content-Type: application/json',
'Accept: application/json',
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
// Execute the request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (curl_errno($ch)) {
echo json_encode(['status' => 'error', 'message' => curl_error($ch)]);
} else {
http_response_code($http_code);
echo $response;
}
curl_close($ch);
?>

91
test_registration_sms.php Normal file
View File

@@ -0,0 +1,91 @@
<?php
/**
* Test Registration SMS - Debug Tool
* This file helps debug the registration SMS functionality
*/
// Include the system files
require_once 'init.php';
// Simple admin check - just check if config exists
if (!file_exists('config.php')) {
die("Configuration file not found");
}
// Get configuration
$config = ORM::for_table('tbl_appconfig')->find_many();
foreach ($config as $c) {
$config[$c['setting']] = $c['value'];
}
echo "<h2>Registration SMS Debug Information</h2>";
// Check configuration
echo "<h3>Configuration Check:</h3>";
echo "<strong>user_notification_payment:</strong> " . ($config['user_notification_payment'] ?? 'Not set') . "<br>";
echo "<strong>SMS URL configured:</strong> " . (!empty($config['sms_url']) ? 'Yes' : 'No') . "<br>";
echo "<strong>Company Name:</strong> " . ($config['CompanyName'] ?? 'Not set') . "<br>";
// Check template
echo "<h3>Template Check:</h3>";
$template = Lang::getNotifText('user_registration');
if ($template) {
echo "<strong>Template loaded:</strong> Yes<br>";
echo "<strong>Template preview:</strong><br>";
echo "<pre>" . htmlspecialchars(substr($template, 0, 200)) . "...</pre>";
} else {
echo "<strong>Template loaded:</strong> No<br>";
}
// Test SMS function
echo "<h3>Test SMS Function:</h3>";
if (isset($_POST['test_sms'])) {
$test_phone = $_POST['test_phone'];
$test_name = $_POST['test_name'];
if (!empty($test_phone) && !empty($test_name)) {
$testCustomerData = [
'fullname' => $test_name,
'username' => 'testuser',
'password' => 'testpass',
'phonenumber' => $test_phone,
'service_type' => 'Hotspot'
];
echo "<strong>Testing SMS for:</strong> " . $test_name . " (" . $test_phone . ")<br>";
$result = Message::sendRegistrationNotification($testCustomerData);
if ($result) {
echo "<strong>Result:</strong> SMS sent successfully<br>";
echo "<strong>Message:</strong><br>";
echo "<pre>" . htmlspecialchars($result) . "</pre>";
} else {
echo "<strong>Result:</strong> SMS failed or no result returned<br>";
}
} else {
echo "<strong>Error:</strong> Please fill in both phone number and name<br>";
}
}
// Test form
echo "<h3>Test SMS Form:</h3>";
echo "<form method='post'>";
echo "Phone Number: <input type='text' name='test_phone' placeholder='254712345678' required><br><br>";
echo "Full Name: <input type='text' name='test_name' placeholder='John Doe' required><br><br>";
echo "<input type='submit' name='test_sms' value='Send Test SMS'>";
echo "</form>";
// Check recent logs
echo "<h3>Recent Logs:</h3>";
$logFile = $root_path . 'system/logs/Registration SMS.log';
if (file_exists($logFile)) {
$logs = file_get_contents($logFile);
$recentLogs = array_slice(explode("\n", $logs), -10);
echo "<pre>" . htmlspecialchars(implode("\n", $recentLogs)) . "</pre>";
} else {
echo "No log file found at: " . $logFile;
}
echo "<br><br><a href='index.php?_route=customers/add'>Go to Add Customer</a>";
?>

3
version.json Normal file
View File

@@ -0,0 +1,3 @@
{
"version": "2024.5.22"
}