Showing preview only (1,523K chars total). Download the full file or copy to clipboard to get everything.
Repository: levelsranks/levels-ranks-web
Branch: alpha
Commit: adf8cf4bd3e0
Files: 206
Total size: 1.4 MB
Directory structure:
gitextract_93895nac/
├── .github/
│ └── FUNDING.yml
├── .htaccess
├── LICENSE
├── README.md
├── app/
│ ├── ext/
│ │ ├── AltoRouter.php
│ │ ├── Auth.php
│ │ ├── Db.php
│ │ ├── ErrorsHandler.php
│ │ ├── General.php
│ │ ├── Graphics.php
│ │ ├── LightOpenID.php
│ │ ├── Modules.php
│ │ ├── Notifications.php
│ │ ├── Pdox.php
│ │ ├── PdoxInterface.php
│ │ └── Translate.php
│ ├── includes/
│ │ ├── auth/
│ │ │ └── steam.php
│ │ ├── functions.php
│ │ └── js_controller.php
│ ├── logs/
│ │ └── 1.txt
│ ├── modules/
│ │ ├── disabled/
│ │ │ ├── module_block_main_bans_and_comms/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ ├── module_block_main_sb_stats/
│ │ │ │ ├── assets/
│ │ │ │ │ └── css/
│ │ │ │ │ └── 1.css
│ │ │ │ ├── description.json
│ │ │ │ ├── forward/
│ │ │ │ │ ├── data.php
│ │ │ │ │ └── interface.php
│ │ │ │ └── translation.json
│ │ │ ├── module_block_snow/
│ │ │ │ ├── assets/
│ │ │ │ │ └── js/
│ │ │ │ │ ├── 1.js
│ │ │ │ │ └── 2.js
│ │ │ │ └── description.json
│ │ │ ├── module_page_admins/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ ├── data_always.php
│ │ │ │ └── interface.php
│ │ │ ├── module_page_bans/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ ├── data_always.php
│ │ │ │ └── interface.php
│ │ │ ├── module_page_comms/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ ├── module_page_lk_impulse/
│ │ │ │ ├── assets/
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── 1.css
│ │ │ │ │ └── js/
│ │ │ │ │ └── 1.js
│ │ │ │ ├── description.json
│ │ │ │ ├── ext/
│ │ │ │ │ ├── Basefunction.php
│ │ │ │ │ ├── Freekassa.php
│ │ │ │ │ ├── Interkassa.php
│ │ │ │ │ ├── Lk_module.php
│ │ │ │ │ ├── Paypal.php
│ │ │ │ │ ├── Paysera.php
│ │ │ │ │ ├── Qiwi.php
│ │ │ │ │ ├── Robokassa.php
│ │ │ │ │ ├── Unitpay.php
│ │ │ │ │ ├── WebToPay.php
│ │ │ │ │ ├── Webmoney.php
│ │ │ │ │ └── Yandexmoney.php
│ │ │ │ ├── forward/
│ │ │ │ │ ├── data.php
│ │ │ │ │ └── interface.php
│ │ │ │ ├── includes/
│ │ │ │ │ ├── gateways.php
│ │ │ │ │ ├── install.php
│ │ │ │ │ ├── logs.php
│ │ │ │ │ ├── payments.php
│ │ │ │ │ ├── promocodes.php
│ │ │ │ │ ├── result.php
│ │ │ │ │ ├── search.php
│ │ │ │ │ ├── users.php
│ │ │ │ │ └── zalupas.php
│ │ │ │ └── translation.json
│ │ │ └── module_page_lk_top/
│ │ │ ├── description.json
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── translation.json
│ │ ├── module_block_main_servers_monitoring/
│ │ │ ├── assets/
│ │ │ │ ├── css/
│ │ │ │ │ ├── 1.css
│ │ │ │ │ ├── 2.css
│ │ │ │ │ ├── 3.css
│ │ │ │ │ └── 4.css
│ │ │ │ └── js/
│ │ │ │ ├── 1.js
│ │ │ │ ├── 2.js
│ │ │ │ ├── 3.js
│ │ │ │ └── 4.js
│ │ │ ├── description.json
│ │ │ ├── ext/
│ │ │ │ ├── ServerInfo.php
│ │ │ │ └── SourceQuery/
│ │ │ │ ├── BaseSocket.php
│ │ │ │ ├── Buffer.php
│ │ │ │ ├── Exception/
│ │ │ │ │ ├── AuthenticationException.php
│ │ │ │ │ ├── InvalidArgumentException.php
│ │ │ │ │ ├── InvalidPacketException.php
│ │ │ │ │ ├── SocketException.php
│ │ │ │ │ └── SourceQueryException.php
│ │ │ │ ├── GoldSourceRcon.php
│ │ │ │ ├── Socket.php
│ │ │ │ ├── SourceQuery.php
│ │ │ │ ├── SourceRcon.php
│ │ │ │ └── bootstrap.php
│ │ │ ├── forward/
│ │ │ │ └── interface.php
│ │ │ ├── includes/
│ │ │ │ └── js_controller.php
│ │ │ └── translation.json
│ │ ├── module_block_main_stats/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ ├── 1.css
│ │ │ │ └── 2.css
│ │ │ ├── description.json
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── translation.json
│ │ ├── module_block_main_top/
│ │ │ ├── description.json
│ │ │ └── forward/
│ │ │ ├── data.php
│ │ │ └── interface.php
│ │ ├── module_page_adminpanel/
│ │ │ ├── assets/
│ │ │ │ ├── css/
│ │ │ │ │ └── 1.css
│ │ │ │ └── js/
│ │ │ │ └── 1.js
│ │ │ ├── description.json
│ │ │ ├── ext/
│ │ │ │ └── Admin.php
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ ├── data_always.php
│ │ │ │ └── interface.php
│ │ │ ├── includes/
│ │ │ │ ├── controller.php
│ │ │ │ ├── db.php
│ │ │ │ ├── general.php
│ │ │ │ ├── modules.php
│ │ │ │ ├── servers.php
│ │ │ │ ├── stats.php
│ │ │ │ └── web.php
│ │ │ └── translation.json
│ │ ├── module_page_profiles/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ └── 1.css
│ │ │ ├── description.json
│ │ │ ├── ext/
│ │ │ │ └── Player.php
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── translation.json
│ │ ├── module_page_rankstats/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ └── 1.css
│ │ │ ├── description.json
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── temp/
│ │ │ └── cache.php
│ │ ├── module_page_toppoints/
│ │ │ ├── description.json
│ │ │ └── forward/
│ │ │ ├── data.php
│ │ │ └── interface.php
│ │ └── module_sidebar_social/
│ │ └── description.json
│ ├── page/
│ │ ├── custom/
│ │ │ ├── error/
│ │ │ │ └── index.php
│ │ │ └── install/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ └── style.css
│ │ │ ├── includes/
│ │ │ │ └── options/
│ │ │ │ ├── admin_no_steam.php
│ │ │ │ ├── admin_steam.php
│ │ │ │ ├── animations.php
│ │ │ │ ├── badge_type.php
│ │ │ │ ├── db.php
│ │ │ │ ├── form_border.php
│ │ │ │ ├── language.php
│ │ │ │ ├── name.php
│ │ │ │ ├── sidebar.php
│ │ │ │ └── webkey.php
│ │ │ └── index.php
│ │ └── general/
│ │ ├── footer.php
│ │ └── head.php
│ └── templates/
│ ├── default/
│ │ ├── assets/
│ │ │ ├── css/
│ │ │ │ ├── css_library/
│ │ │ │ │ ├── animations/
│ │ │ │ │ │ └── 1.css
│ │ │ │ │ ├── badge_type/
│ │ │ │ │ │ ├── 1.css
│ │ │ │ │ │ └── 2.css
│ │ │ │ │ └── form_border/
│ │ │ │ │ ├── 0.css
│ │ │ │ │ └── 1.css
│ │ │ │ └── style.css
│ │ │ └── js/
│ │ │ └── app.js
│ │ ├── colors.json
│ │ ├── description.json
│ │ └── interface/
│ │ ├── head.php
│ │ ├── navbar.php
│ │ └── sidebar.php
│ ├── default_dark/
│ │ ├── assets/
│ │ │ ├── css/
│ │ │ │ ├── css_library/
│ │ │ │ │ ├── animations/
│ │ │ │ │ │ └── 1.css
│ │ │ │ │ ├── badge_type/
│ │ │ │ │ │ ├── 1.css
│ │ │ │ │ │ └── 2.css
│ │ │ │ │ └── form_border/
│ │ │ │ │ ├── 0.css
│ │ │ │ │ └── 1.css
│ │ │ │ └── style.css
│ │ │ └── js/
│ │ │ └── app.js
│ │ ├── colors.json
│ │ ├── description.json
│ │ └── interface/
│ │ ├── container.php
│ │ ├── head.php
│ │ ├── navbar.php
│ │ └── sidebar.php
│ └── default_navbar/
│ ├── assets/
│ │ ├── css/
│ │ │ ├── css_library/
│ │ │ │ ├── animations/
│ │ │ │ │ └── 1.css
│ │ │ │ ├── badge_type/
│ │ │ │ │ ├── 1.css
│ │ │ │ │ └── 2.css
│ │ │ │ └── form_border/
│ │ │ │ ├── 0.css
│ │ │ │ └── 1.css
│ │ │ └── style.css
│ │ └── js/
│ │ └── app.js
│ ├── colors.json
│ ├── description.json
│ └── interface/
│ ├── head.php
│ ├── navbar.php
│ └── sidebar.php
├── index.php
└── storage/
├── assets/
│ ├── css/
│ │ ├── style.css
│ │ └── vendors/
│ │ └── material-design-iconic-font/
│ │ └── css/
│ │ └── material-design-iconic-font.css
│ └── js/
│ └── app.js
└── cache/
├── img/
│ ├── avatars/
│ │ └── 1.json
│ └── ranks/
│ ├── dangerzone/
│ │ ├── description.json
│ │ └── title.json
│ ├── default/
│ │ ├── description.json
│ │ └── title.json
│ ├── faceit/
│ │ ├── description.json
│ │ └── title.json
│ ├── gtixon/
│ │ ├── description.json
│ │ └── title.json
│ └── wingman/
│ ├── description.json
│ └── title.json
└── sessions/
├── languages.json
└── translator.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: [ 'PayPal - M0st1ceNastya@yandex.ru', 'https://qiwi.com/n/M0ST1CE','https://yoomoney.ru/to/410013573116029']
================================================
FILE: .htaccess
================================================
AddDefaultCharset utf-8
DirectoryIndex index.php index.html index.htm
Options -Indexes
RewriteEngine On
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [L,R=301]
RewriteRule !.(gif|jpg|png|ico|css|js|svg|js_controller.php|woff2|mp3|mp4|webm|ttf)$ index.php
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
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
them 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.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
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.
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
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU 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. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
> [!WARNING]
> **Внимание! Этот проект заброшен и имеет множество уязвимостей. Ставить его не рекомендуется!**
> **Attention! This project is abandoned and has many vulnerabilities. It is not recommended to use it!**
---
> [!TIP]
> **Сейчас разрабатывается и дорабатывается новый проект как альтернатива LR WEB и другим CMS — [Flute CMS](https://github.com/Flute-CMS/cms)**
> **A new project — [Flute CMS](https://github.com/Flute-CMS/cms) — is being developed and finalized now.**
---
<p align="center">
<img height="250px" src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/logo.png">
</p>
<h1 align="center">
Levels Ranks - WEB Interface
</h1>
<p><a href="https://www.codacy.com/manual/M0st1ce/levels-ranks-web?utm_source=github.com&utm_medium=referral&utm_content=levelsranks/levels-ranks-web&utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/76c6d7faeac04277ba27d1e112f186fd"/></a>
<a href="https://php.net/" rel="nofollow"><img src="https://img.shields.io/badge/PHP-%3E%3D7.0-blue" alt="PHP" data-canonical-src="https://img.shields.io/badge/PHP-%3E%3D7.0-blue" style="max-width:100%;"></a></p>
-----
Пользовательский WEB интерфейс для взаимодействия с плагинами статистики <a href="https://github.com/levelsranks/levels-ranks-core">Levels Ranks</a>, <a href="https://hlmod.ru/resources/fire-players-stats.1232/">Fire Players Stats</a> и <a href="https://forums.alliedmods.net/showthread.php?t=290063">RankMe Kento Edition</a>.
Официальный канал поддержки в <a href="https://discord.gg/Mbjnh3h">Discord</a>.
-----
<p align="center">
<img height="43px" src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/just_themes.png">
</p>
<p align="center">
<img height="560px" src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/interface.png">
</p>
<p align="center">
<img height="43px"src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/full_adaptation.png">
</p>
<p align="center">
<img height="880px"src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/profile.png">
</p>
<p align="center">
<img height="43px"src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/multi_lingual.png">
</p>
<p align="center">
<img width="720"src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/flags.png">
</p>
-----
```
640K ought to be enough for anybody
```
Требования:
-----
- Обязательно:
- PHP 7.0 и выше.
- Поддержка PHP PDO.
- Поддержка PHP GMP.
- Поддержка PHP BCMath.
- Поддержка PHP cURL.
- Поддержка PHP json.
- Поддержка PHP Zip.
- Рекомендуется:
- MySQL 5.7 или MariaDB 10.1 и выше.
Установка:
-----
- Скачать stable ( Рекомендуется ) или dev релиз Levels Ranks WEB.
- Извлечь файлы из архива и переместить их в любой каталог на вашем домене или субдомене.
- Перейти на ваш сайт с извлеченной Levels Ranks WEB и пройти процесс установки.
- Profit!
Конфигурация NGINX:
-----
```
location / {
try_files $uri $uri/ /index.php?$query_string;
rewrite ^([^.]*[^/])$ $1/ permanent;
rewrite !.(gif|jpg|png|ico|css|js|svg|js_controller.php)$ /index.php;
}
```
Детальная настройка базы данных:
-----
Файл и директория:
```
/storage/cache/sessions/db.php
```
<details><summary>Основной шаблон</summary>
```
<?php return ['LevelsRanks' =>
[0 =>
[
'HOST' => 'Ваш хост',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'Название таблицы ( lvl_base )',
'name' => 'Название ( Основной AWP сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
],
],
],
],
],
],
'Core' =>
[0 =>
[
'HOST' => 'Ваш хост',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'lvl_'
],
],
],
],
],
],
];
```
</details>
<details><summary>Если вы используете две и более таблиц в одной базе данных</summary>
```
<?php return ['LevelsRanks' =>
[0 =>
[
'HOST' => 'Ваш хост',
'PORT' => '3306',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'Название таблицы ( lvl_base )',
'name' => 'Название ( Основной AWP сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
],
[
'table' => 'Название таблицы 2 ( lvl_base_2 )',
'name' => 'Название ( Основной MM сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
],
],
],
],
],
],
'Core' =>
[0 =>
[
'HOST' => 'Ваш хост',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'lvl_'
],
],
],
],
],
],
];
```
</details>
<details><summary>Если вы используете две и более базы данных из под одного пользователя</summary>
```
<?php return ['LevelsRanks' =>
[0 =>
[
'HOST' => 'Ваш хост',
'PORT' => '3306',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'Название таблицы ( lvl_base )',
'name' => 'Название ( Основной AWP сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
],
],
],
[
'DB' => 'Имя второй базы данных',
'Prefix' => [0 =>
[
'table' => 'Название таблицы ( lvl_base )',
'name' => 'Название ( Новый MM сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
]
],
],
],
],
],
'Core' =>
[0 =>
[
'HOST' => 'Ваш хост',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'lvl_'
],
],
],
],
],
],
];
```
</details>
<details><summary>Если вы используете двух и более пользователей с разными базами данных</summary>
```
<?php return ['LevelsRanks' =>
[0 =>
[
'HOST' => 'Ваш хост',
'PORT' => '3306',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'Название таблицы ( lvl_base )',
'name' => 'Название ( Основной AWP сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
],
],
],
],
],
[
'HOST' => 'Ваш хост 2',
'PORT' => '3306',
'USER' => 'Логин 2',
'PASS' => 'Пароль 2',
'DB' => [0 =>
[
'DB' => 'Имя базы данных',
'Prefix' => [0 =>
[
'table' => 'Название таблицы ( lvl_base )',
'name' => 'Название ( Основной AWP сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
],
],
],
],
],
],
'Core' =>
[0 =>
[
'HOST' => 'Ваш хост',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'lvl_'
],
],
],
],
],
],
];
```
</details>
<details><summary>Если модулю необходимо подключение к другому "моду" ( SB / MA пример )</summary>
Используйте шаблон подключения из описания модуля.
Пример. Интерация SourceBans или Material Admin:
```
<?php return ['LevelsRanks' =>
[0 =>
[
'HOST' => 'Ваш хост',
'PORT' => '3306',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'Название таблицы ( lvl_base )',
'name' => 'Название ( Основной AWP сервер )',
'mod' => '730 / 240 / 215',
'ranks_pack' => 'default',
'steam' => '1 / 0'
],
],
],
],
],
],
'Core' =>
[0 =>
[
'HOST' => 'Ваш хост',
'USER' => 'Логин',
'PASS' => 'Пароль',
'DB' => [0 =>
[
'DB' => 'Имя основной базы данных',
'Prefix' => [0 =>
[
'table' => 'lvl_'
],
],
],
],
],
],
'SourceBans' =>
[0 =>
[
'HOST' => 'Хост SB / MA',
'PORT' => '3306',
'USER' => 'Логин SB / MA',
'PASS' => 'Пароль SB / MA',
'DB' => [0 =>
[
'DB' => 'Имя базы данных SB / MA',
'Prefix' => [0 =>
[
'table' => 'sb_',
'name' => 'SourceBans',
'mod' => '730 / 240 / 215',
'steam' => '1 / 0'
],
],
],
],
],
],
];
```
</details>
Доступные модули:
-----
<details><summary>LR WEB ( min. dev #0.2.114 ) - Мини-Статистика на главной странице</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_block_main_stats.png">
</p>
- **Старница отображения**: Главная
- **Информация**: Добавляет три мини блока с описанием количества игроков, игроков которые заходили за последние 24 часа и количестве убийств в голову.
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Мониторинг онлайна на главной странице</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_block_main_servers_monitoring_type_3.png">
</p>
- **Старница отображения**: Главная
- **Информация**: Добавляет мониторинг онлайна серверов с возможностью подключения.
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Топ игроков на главной странице</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_block_main_top.png">
</p>
- **Старница отображения**: Главная
- **Информация**: Добавляет блоки с "топ 10" каждой подключенной таблице Levels Ranks.
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Профили</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_page_profiles.png">
</p>
- **Старница отображения**: profiles
- **Информация**: Добавляет страницы игроков с их личной статистикой.
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Статистика игроков</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_page_toppoints.png">
</p>
- **Старница отображения**: toppoints
- **Информация**: Добавляет страницу со статистикой всех игроков игроков.
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Распределением рангов</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_page_rankstats.png">
</p>
- **Старница отображения**: rankstats
- **Информация**: Добавляет страницу с распределением рангов на серверах.
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Панель администратора</summary>
- **Старница отображения**: adminpanel
- **Информация**: Добавляет гибкое администрирование вэб интерфейсом и полезные функции.
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Страница с банами</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_page_bans.png">
</p>
- **Старница отображения**: bans
- **Информация**:
- Интеграция с SB / MA.
- Необходимо добавить в db.php новый мод "SourceBans" и описать подключение. Название таблицы указать префиксом, пример: "sb_".
- **Скачать:** Доступен в базовом пакете модулей.
</details>
<details><summary>LR WEB ( min. dev #0.2.114 ) - Страница с мутами</summary>
<p align="center">
<img src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/modules/module_page_comms.png">
</p>
- **Старница отображения**: comms
- **Информация**:
- Интеграция с SB / MA.
- Необходимо добавить в db.php новый мод "SourceBans" и описать подключение. Название таблицы указать префиксом, пример: "sb_".
- **Скачать:** Доступен в базовом пакете модулей.
</details>
Благодарность:
-----
- pedrotski#1184 ( Discord, ghostcapgaming.com ) - 3 803 RUB.
- Larsalex ( hlmod.ru ) - 3000 RUB.
- .ZΛCHΞR#1337( Discord ) - 2093.37 RUB.
- CEED 🐼#4061 ( Discord ) - 1488 RUB.
- mixxed.xyz#4469 ( Discord ) - 1200 RUB.
- Эльдарка#7777 ( Discord ) - 1055.1 RUB.
- OkyHek#2441 ( Discord ) - 1000 RUB.
- Felya#1342 ( Discord ) - 817.12 RUB.
- Clubber#2324 ( Discord ) - 784,44 RUB.
- Nestor#9876 ( Discord ) - 600 RUB.
- MAMAC#9993 ( Discord ) - 511.05 RUB.
- dyoma#5525 ( Discord ) - 500 RUB.
- Морячок#9904 ( Discord ) - 500 RUB.
- Xzotys#3880 ( Discord ) - 500 RUB.
- Unity ( hlmod.ru ) - 460 RUB.
- MotherRussia#2235 ( Discord ) - 350 RUB.
- interes#3153 ( Discord ) - 300 RUB.
- xek#1152 ( Discord ) - 300 RUB.
- Paranoiiik ( hlmod.ru ) - 300 RUB.
- L1MON#4529 ( Discord ) - 300 RUB.
- ju4ka1371 ( hlmod.ru ) - 282 RUB.
- Good Game Project ( gg-pro.ru ) - 250 RUB.
- Wend4r ( hlmod.ru ) - 250 RUB.
- Rabb1t ( hlmod.ru ) - 250 RUB.
- Sleep#0725 ( Discord ) - 250 RUB.
- ERROR404#9842 ( Discord ) - 200 RUB.
- Malenkiy Alik#1945 ( Discord ) - 200 RUB.
- Морковка#7277 ( Discord ) - 200 RUB.
- valerun ( hlmod.ru ) - 185 RUB.
- FIVE#3136 ( Discord ) - 155 RUB.
- MaZa#8322 ( Discord ) - 150 RUB.
- ™S.E.N.A.T.O.R™♛#1466 ( Discord ) - 150 RUB.
- SynZilla ( hlmod.ru ) - 150 RUB.
- d4Ck#0698 ( Discord ) - 147.67 RUB.
- ka1jaru#1648 ( Discord ) - 137.45 RUB.
- uraganas#7978 ( Discord ) - 132 RUB.
- Domikuss#3855 ( Discord ) - 121.45 RUB.
- punisher89#7116 ( Discord ) - 104.45 RUB.
- SV3N#9923 ( Discord ) - 100.40 RUB.
- HILER#3959 ( Discord ) - 100 RUB.
- Truyn#6750 ( Discord ) - 100 RUB.
- DevBT#4750 ( Discord ) - 100 RUB.
- DismoraL ( hlmod.ru ) - 100 RUB.
- xXMaXimXx ( hlmod.ru ) - 100 RUB.
- Twenix#4347 ( Discord ) - 100 RUB.
- LEGACY#3877 ( Discord ) - 50 RUB.
- ARONGAMES#2063 ( Discord ) - 50 RUB.
- fr4nch#3619 ( Discord ) - 50 RUB.
- HolyHender#8673 ( Discord ) - 33 RUB.
- Мировой ( hlmod.ru ) - 29 RUB.
Блок разработчика:
-----
<details><summary>dev</summary>
Скелет WEB интерфейса ( dev #0.2.114 ) :
-----
```
/app - Ядро.
/ext - PHP Классы.
/includes - Основные и дополнительные PHP функции.
/modules - Каталог с модулями.
/page - Основные заготовки и шаблоны WEB интерфейса.
/storage - Хранилище.
/assets - CSS, JS, Fonts файлы.
/cache - Основной кэш.
/img - Кэш изображений.
/sessions - Кэш связанный с работой ядра.
/index.php - 'Hello World'
```
Модули:
-----
Каталог с модулями:
```
/app/modules
```
Что представляет из себя модуль ( На примере **module_block_main_stats** ):
```
/app
/modules
/module_block_main_stats - Название папки = ID модуля.
/ext - PHP Классы.
/assets - Ассеты.
/css - CSS ассеты.
/js - JS ассеты.
/forward - Функциональная часть.
/data.php - Пре-инициализация. Скрипт начинает свою работу до загрузки шаблона страницы.
/data_always.php - Пре-инициализация. Скрипт начинает свою работу до загрузки шаблона и работает на всех страницах.
/interface.php - Инициализация. Скрипт начинает свою работу во время загрузки шаблона.
/temp - Кэш файлы.
/description.json - Описание модуля
/translation.json - Если модуль имеет мультиязычность, переводы описываются в данном файле.
```
Шаблон:
-----
Директория для работы с шаблонами:
```
app/templates/
```
Для инициализации шаблона, необходим файл description.json, содержащий такую структуру:
```
{
"name": "Ваше название шаблона",
"version": "0.1 (Версия вашего шаблона)",
"author": "Flames"
}
```
Структура папки имеет немного схожую с модулями структуру
```
/templates/name/
```
Условная папка со стилями и js, все вы сможете подключить в head.php, как вашей душе благорасудится
```
- assets/
- js/ - Папка с JS файлами
- css/ - Папка с CSS файлами
```
Верстка будет подгружена ПОСЛЕ оригинальной верстки.
Папка, отвечающая за отрисовку контента
```
- interface/
- navbar.php //Навбар сайта, его так сказать голова
- sidebar.php //Сайдбар.. Просто сайдбар.. Можно будет переделать под любое применение
- head.php //Самый высший файл, необходим для подлючения библиотек, к примеру bootstrap
```
Папка, если нужно дополнительно подгрузить JS, CSS файлы в конкретном модуле
```
- modules/
- module_page_profiles/ - Название папки которое совпадает с названием модуля
- dop.css - CSS и JS файлы которые нужно подгрузить, будет загружено ПОСЛЕ основных файлов.
- dop.js
- module_page_forum/ - Тут может быть любой модуль.
-....
```
Файл с scss переменными, для более удобными работами с цветами
```
colors.json =
{
"Ваше название переменной, в моем случае это будет --color-zalupa": "#fff",
"--sidebar-block": "#0f0f0f0f"
}
```
Порядок загрузки:
-----
<details><summary>Модули:</summary>
Порядок загрузки стилей модулей таков:
```
- data_always.php
- data.php
- interface.php
- interface_always.php
- css / template css
- js / template js
```
</details>
<details><summary>Шаблон:</summary>
Порядок загрузки стилей модулей таков:
```
/Forward
- head.php
- navbar.php
- sidebar.php
- container.php
// JS / CSS
```
</details>
<details><summary>Функции и классы:</summary>
LR WEB подгружает все свои классы и функции в index.php, поэтому объявлять где - либо класс не обязательно.
Классы имеют такую структуру:
```
- AltoRouter.php - Новый класс с роутингом, нужен для чего? Правильно, роутинга! :)
- Auth.php - Класс для работы с авторизацией пользователя, запись в сессию данных, если админ авторизировался через L/P
- Db.php - Класс для работы с базой данных, используется для отправки запросов ( Не рекомендуется ), и подключение к БД.
- General.php - Класс для работы с основными настройками сайта
- Graphics.php - Класс для работы с отрисовкой контента и подгрузкой выбранных в админке опций
- LightOpenID.php - Класс для авторизации через STEAM, единственный класс, который лучше всего не трогать.
- Modules.php - Класс для распределения модулей и их настройкой
- Notifications.php - Класс для отрисовки и рендера уведомлений пользователя
- Pdox.php (Interface) - Новый класс для работы с базой данных. Можно сказать, что это - Query Builder. Единственный класс, который не вызывается в index.php
- Translate.php - Класс, работающий с языком пользователя, и отрисовкой нужных переводов
```
</details>
Описание каждой публичной функции класса:
----
<details><summary>AltoRouter.php:</summary>
Этот класс уже имеет документацию на другой странице GitHub:
https://github.com/dannyvankooten/AltoRouter
</details>
<details><summary>Auth.php:</summary>
get_admins_list
----
```
Получение списка администраторов
```
get_count_admins
----
```
Подсчет кол - ва администраторов
```
check_session_admin
----
```
Проверяет данные сессии администратора, с данными, входящими в сервер
```
check_session
----
```
Проверка на IP
```
authorization_no_steam
----
```
Запись данных администратора в сессию
```
get_authorization_sidebar_data
----
```
Выходные файлы для вывода данных о пользователе в сайдбар
```
</details>
<details><summary>Db.php:</summary>
query ( int $mod, int $user_id = 0, int $db_id = 0, string $sql, array $params = [] )
----
```
$mod - Мод, из db.php (Vips, Shop, Core)
$user_id - Номер базы данных
$db_id - Номер таблицы базы данных
$sql - Сам SQL запрос
$params - Подготовительные значения для PDO, нужно для большей безопасности.
Функция, позволяющая выполнить SQL запрос
return SQL result;
```
queryNum ( int $mod, int $user_id = 0, int $db_id = 0, string $sql, array $params = [] )
----
```
Все то же, как и у query, только на выходе получаем только числовое значение
```
queryAll ( int $mod, int $user_id = 0, int $db_id = 0, string $sql, array $params = [] )
----
```
Да ну, все то же самое? О да! Только теперь возвращает весь массив с данными
```
query_all_key_pair ( int $mod, int $user_id = 0, int $db_id = 0, string $sql, array $params = [] )
---
```
Шаблон запроса отдающий массив со всеми строками, парсирование ключа.
```
queryColumn ( int $mod, int $user_id = 0, int $db_id = 0, string $sql, array $params = [] )
---
```
Шаблон запроса отдающий массив стобца.
```
queryOneColumn ( int $mod, int $user_id = 0, int $db_id = 0, string $sql, array $params = [] )
---
```
Шаблон запроса отдающий данные одного стобца.
```
mysql_column_search ( int $mod, int $user_id = 0, int $db_id = 0, string $tablename, string $column )
---
```
Запрос проверяющий существование столбика в той или иной таблице.
$tablename - Название таблицы, которую нужно проверить
$column - Название столбца, который нужно найти
Возвращает результат проверки, 1 / 0
```
mysql_table_search ( int $mod, int $user_id = 0, int $db_id = 0, string $tablename )
---
```
Запрос проверяющий существование таблицы в той или иной базе данных.
Возвращает результат проверки, 1 / 0
```
lastInsertId ( string $mod, int $user_id = 0, int $db_id = 0 )
---
```
Возвращает ID последней вставленной строки.
Возвращает результат ( ID )
```
__destruct
---
```
"Разрыв соединения с базой данных".
```
</details>
<details><summary>General.php:</summary>
get_default_url_section( string|bool $section, string $default, array|null $arr_true )
----
```
Получает и задает название подраздела из URL по умолчанию, сохраняя результат по умолчанию в сессию.
$section - Название подраздела.
$default - Значние по умолчанию.
$arr_true - Белый список.
```
getAvatar( string $profile, int $type )
----
```
Получает определенного аватара.
$profile - Steam ID игрока
$type - Тип/Размер аватара.
Возвращает ссылку на аватар
```
checkAvatar( string $profile, int $type )
----
```
Проверка на существование определеноого аватара и его актуальность.
Выводит итог проверки.
```
checkName( string $profile )
----
```
Получение никнейма игрока.
Вывод его имени, как ни странно
```
sendNote ( string $text, success|error $status, int $time = 4.5 )
----
```
Отправка уведомлений через функцию.
$text - Текст уведомления
$status - Тип уведомления
$time - Время, которое провисит уведомление
```
get_server_list
----
```
Просто возвращает настройки серверов из БД
```
get_icon ( string $group, string $name, string $category = null )
----
```
Получение иконок и работа с ними.
$group - Название папки из которой будет читаться иконка.
$name - Название иконки.
$category - Дополнительное название под-категории, если она имеется. По умолчанию нету.
Выводит содержимое SVG файла. || false
```
get_js_relevance_avatar ( string $id, int $type = 1 )
----
```
Получение иконок и работа с ними.
$id - Steam ID - 32.
$type - Тип аватара.
Выводит JS скрипт.
```
</details>
</details>
-----
<p align="right">
<img height="75px" src="https://raw.githubusercontent.com/levelsranks/levels-ranks-web/alpha/.github/authors.png">
</p>
================================================
FILE: app/ext/AltoRouter.php
================================================
<?php
/*
MIT License
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace app\ext;
class AltoRouter
{
/**
* @var array Array of all routes (incl. named routes).
*/
protected $routes = [];
/**
* @var array Array of all named routes.
*/
protected $namedRoutes = [];
/**
* @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host)
*/
protected $basePath = '';
/**
* @var array Array of default match types (regex helpers)
*/
protected $matchTypes = [
'i' => '[0-9]++',
'a' => '[0-9A-Za-z]++',
'h' => '[0-9A-Fa-f]++',
'*' => '.+?',
'**' => '.++',
'' => '[^/\.]++'
];
/**
* Create router in one call from config.
*
* @param array $routes
* @param string $basePath
* @param array $matchTypes
* @throws Exception
*/
public function __construct(array $routes = [], $basePath = '', array $matchTypes = [])
{
$this->addRoutes($routes);
$this->setBasePath($basePath);
$this->addMatchTypes($matchTypes);
}
//Поиск роута в массиве
public function SearchRoute()
{
$server = $_SERVER['REQUEST_URI'];
$replace = substr($server, strlen($this->basePath));
$match = explode("/", $replace);
return $match[0];
}
/**
* Retrieves all routes.
* Useful if you want to process or display routes.
* @return array All routes.
*/
public function getRoutes()
{
return $this->routes;
}
/**
* Add multiple routes at once from array in the following format:
*
* $routes = [
* [$method, $route, $target, $name]
* ];
*
* @param array $routes
* @return void
* @author Koen Punt
* @throws Exception
*/
public function addRoutes($routes)
{
if (!is_array($routes) && !$routes instanceof Traversable) {
throw new RuntimeException('Routes should be an array or an instance of Traversable');
}
foreach ($routes as $route) {
call_user_func_array([$this, 'map'], $route);
}
}
/**
* Set the base path.
* Useful if you are running your application from a subdirectory.
* @param string $basePath
*/
public function setBasePath($basePath)
{
$this->basePath = $basePath;
}
/**
* Add named match types. It uses array_merge so keys can be overwritten.
*
* @param array $matchTypes The key is the name and the value is the regex.
*/
public function addMatchTypes(array $matchTypes)
{
$this->matchTypes = array_merge($this->matchTypes, $matchTypes);
}
/**
* Map a route to a target
*
* @param string $method One of 5 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PATCH|PUT|DELETE)
* @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id]
* @param mixed $target The target where this route should point to. Can be anything.
* @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
* @throws Exception
*/
public function map($method, $route, $target, $name = null)
{
$this->routes[] = [$method, $route, $target, $name];
if ($name) {
if (isset($this->namedRoutes[$name])) {
throw new RuntimeException("Can not redeclare route '{$name}'");
}
$this->namedRoutes[$name] = $route;
}
return;
}
/**
* Reversed routing
*
* Generate the URL for a named route. Replace regexes with supplied parameters
*
* @param string $routeName The name of the route.
* @param array @params Associative array of parameters to replace placeholders with.
* @return string The URL of the route with named parameters in place.
* @throws Exception
*/
public function generate($routeName, array $params = [])
{
// Check if named route exists
if (!isset($this->namedRoutes[$routeName])) {
throw new RuntimeException("Route '{$routeName}' does not exist.");
}
// Replace named parameters
$route = $this->namedRoutes[$routeName];
// prepend base path to route url again
$url = $this->basePath . $route;
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
foreach ($matches as $index => $match) {
list($block, $pre, $type, $param, $optional) = $match;
if ($pre) {
$block = substr($block, 1);
}
if (isset($params[$param])) {
// Part is found, replace for param value
$url = str_replace($block, $params[$param], $url);
} elseif ($optional && $index !== 0) {
// Only strip preceding slash if it's not at the base
$url = str_replace($pre . $block, '', $url);
} else {
// Strip match block
$url = str_replace($block, '', $url);
}
}
}
return $url;
}
/**
* Match a given Request Url against stored routes
* @param string $requestUrl
* @param string $requestMethod
* @return array|boolean Array with route information on success, false on failure (no match).
*/
public function match($requestUrl = null, $requestMethod = null)
{
$params = [];
// set Request Url if it isn't passed as parameter
if ($requestUrl === null) {
$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
}
// strip base path from request url
$requestUrl = substr($requestUrl, strlen($this->basePath));
// Strip query string (?a=b) from Request Url
if (($strpos = strpos($requestUrl, '?')) !== false) {
$requestUrl = substr($requestUrl, 0, $strpos);
}
$lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';
// set Request Method if it isn't passed as a parameter
if ($requestMethod === null) {
$requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
}
foreach ($this->routes as $handler) {
list($methods, $route, $target, $name) = $handler;
$method_match = (stripos($methods, $requestMethod) !== false);
// Method did not match, continue to next route.
if (!$method_match) {
continue;
}
if ($route === '*') {
// * wildcard (matches all)
$match = true;
} elseif (isset($route[0]) && $route[0] === '@') {
// @ regex delimiter
$pattern = '`' . substr($route, 1) . '`u';
$match = preg_match($pattern, $requestUrl, $params) === 1;
} elseif (($position = strpos($route, '[')) === false) {
// No params in url, do string comparison
$match = strcmp($requestUrl, $route) === 0;
} else {
// Compare longest non-param string with url before moving on to regex
// Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)
if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) {
continue;
}
$regex = $this->compileRoute($route);
$match = preg_match($regex, $requestUrl, $params) === 1;
}
if ($match) {
if ($params) {
foreach ($params as $key => $value) {
if (is_numeric($key)) {
unset($params[$key]);
}
}
}
return [
'target' => $target,
'params' => $params,
'name' => $name
];
}
}
return false;
}
/**
* Compile the regex for a given route (EXPENSIVE)
* @param $route
* @return string
*/
protected function compileRoute($route)
{
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
$matchTypes = $this->matchTypes;
foreach ($matches as $match) {
list($block, $pre, $type, $param, $optional) = $match;
if (isset($matchTypes[$type])) {
$type = $matchTypes[$type];
}
if ($pre === '.') {
$pre = '\.';
}
$optional = $optional !== '' ? '?' : null;
//Older versions of PCRE require the 'P' in (?P<named>)
$pattern = '(?:'
. ($pre !== '' ? $pre : null)
. '('
. ($param !== '' ? "?P<$param>" : null)
. $type
. ')'
. $optional
. ')'
. $optional;
$route = str_replace($block, $pattern, $route);
}
}
return "`^$route$`u";
}
}
================================================
FILE: app/ext/Auth.php
================================================
<?php
/**
* @author Anastasia Sidak <m0st1ce.nastya@gmail.com>
*
* @link https://steamcommunity.com/profiles/76561198038416053
* @link https://github.com/M0st1ce
*
* @license GNU General Public License Version 3
*/
namespace app\ext;
class Auth {
/**
* @since 0.2
* @var array
*/
public $user_auth = [];
/**
* @since 0.2
* @var array
*/
public $server_info = [];
/**
* @since 0.2
* @var array
*/
public $base_info = [];
/**
* @since 0.2
* @var array
*/
public $lastconnect = [];
/**
* @since 0.2
* @var int
*/
public $user_rank_count = 0;
/**
* @since 0.2
* @var array
*/
private $admins = 0;
/**
* @since 0.2
* @var int
*/
public $admins_count = 0;
/**
* @since 0.2
* @var object
*/
public $General;
/**
* @since 0.2
* @var object
*/
public $Db;
/**
* Длина токена
* @var int
*/
protected $token_length = 16;
/**
* Время жизни куки
* @var int
*/
protected $cookie_days = 30;
/**
* Организация работы вэб-приложения с авторизацией.
*
* @param object $General
* @param object $Db
*
* @since 0.2
*/
function __construct( $General, $Db ) {
// Проверка на основную константу.
defined('IN_LR') != true && die();
// Импорт основного класса.
$this->General = $General;
// Импорт класса отвечающего за работу с базой данных.
$this->Db = $Db;
!isset( $_SESSION["steamid"] ) && $this->authByCookie();
// Работа с авторизованным пользователем.
if( isset( $_SESSION['steamid'] ) ):
// Проверка сессии.
$General->arr_general['session_check'] === 1 && $this->check_session();
// Проверка авторизованного пользователя.
! isset( $_SESSION['user_admin'] ) && $this->check_session_admin();
// Получение информации о авторизованном пользователе.
$this->get_authorization_sidebar_data();
endif;
// Работа со Steam авторизацией.
if(isset( $_GET["auth"] ))
{
if($this->General->arr_general['steam_auth'] == 1 && $_GET["auth"] == 'login')
require 'app/includes/auth/steam.php';
}
// Работа с No-Steam авторизацией
isset( $_POST['log_in'] ) && ! empty( $_POST['_login'] ) && ! empty( $_POST['_pass'] ) && $this->General->arr_general['steam_only_authorization'] === 0 && $this->authorization_no_steam();
// Выход пользователя из аккаунта.
isset( $_GET["auth"] ) && $_GET["auth"] == 'logout' && require 'app/includes/auth/steam.php';
}
/**
* Если не существует столбца, он его создает
*/
protected function checkTokenCol()
{
if( !$this->Db->mysql_table_search( "Core", 0, 0, "lr_web_cookie_tokens" ) )
$this->Db->query("Core", 0, 0, "CREATE TABLE IF NOT EXISTS `lr_web_cookie_tokens` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`steam` varchar(255) NOT NULL DEFAULT '0',
`cookie_expire` varchar(255) NOT NULL DEFAULT '0',
`cookie_token` varchar(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;");
}
/**
* Просто возвращает true/false, включены ли токены
*/
protected function cookieEnabled() : bool
{
return (bool) $this->General->arr_general['auth_cock'];
}
/**
* Получить пользователя по текущему токену
*/
public function getUserToken( string $token )
{
if( $this->cookieEnabled() )
return $this->Db->query("Core", 0, 0, "SELECT * FROM `lr_web_cookie_tokens` WHERE `cookie_token` = :token", [
"token" => $token
]);
return [];
}
/**
* Авторизация пользователя по кукам
*/
public function authByCookie()
{
$this->clearOldTokens();
if( isset( $_COOKIE["cookie_token"] ) )
{
if( !empty( $user = $this->getUserToken( htmlentities($_COOKIE["cookie_token"]) ) ) )
{
if( $user["cookie_expire"] > time() )
{
$steam32 = con_steam64to32( $user["steam"] );
$_SESSION = [
"steamid" => $user["steam"],
"steamid64" => $user["steam"],
"steamid32" => $steam32,
"steamid32_short" => substr( $steam32, 8 ),
"USER_AGENT" => $_SERVER['HTTP_USER_AGENT'],
"REMOTE_ADDR" => $this->General->get_client_ip_cdn()
];
header('Location: ' . $this->General->arr_general['site'] );
}
}
}
}
/**
* Почистить старые токены
*/
public function clearOldTokens()
{
$this->checkTokenCol();
$this->Db->query("Core", 0, 0, "DELETE FROM `lr_web_cookie_tokens` WHERE `cookie_expire` < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL ".$this->cookie_days." DAY))");
}
/**
* функция, которая генерирует токен для авторизации по куки
*/
public function generateToken()
{
if( $this->cookieEnabled() )
{
$this->checkTokenCol();
$token = bin2hex(random_bytes( $this->token_length ));
$this->setUserToken($token, $_SESSION["steamid64"]);
setcookie("cookie_token", $token, strtotime("+".$this->cookie_days." days"), "/", ".".$_SERVER['HTTP_HOST']);
}
}
/**
* Записать данные токена в пользователя
*/
protected function setUserToken( string $token, int $steamid64 )
{
if( $this->cookieEnabled() )
{
if( !empty( $this->Db->query("Core", 0, 0, "SELECT * FROM `lr_web_cookie_tokens` WHERE `steam` = :steam", ["steam" => $steamid64]) ) )
{
$this->Db->query("Core", 0, 0, "UPDATE `lr_web_cookie_tokens` SET `cookie_token` = :token, `cookie_expire` = :expire WHERE `steam` = :steam", [
"steam" => $steamid64,
"token" => $token,
"expire"=> strtotime("+".$this->cookie_days." days")
]);
}
else
{
$this->Db->query("Core", 0, 0, "INSERT INTO `lr_web_cookie_tokens`(`steam`, `cookie_token`, `cookie_expire`) VALUES (:steam, :token, :expire)", [
"steam" => $steamid64,
"token" => $token,
"expire"=> strtotime("+".$this->cookie_days." days")
]);
}
}
}
/**
* Удалить определенный токен при разлогине
*/
public function delToken( string $steam )
{
$this->Db->query("Core", 0, 0, "DELETE FROM `lr_web_cookie_tokens` WHERE `steam` = :steam", [
"steam" => (int) $steam
]);
}
/**
* Получение списка администраторов.
*
* @return array Массив с администраторами.
*/
public function get_admins_list() {
return $this->admins = $this->Db->queryAll( 'Core', 0, 0, 'SELECT `steamid`, `group`, `flags`, `access` FROM `lvl_web_admins`' );
}
/**
* Получение количества администраторов.
*
* @since 0.2.120
*
* @return int Количество администрации.
*/
public function get_count_admins() {
return $this->admins_count = sizeof( $this->admins );
}
/**
* Проверка авторизованного пользователя на принадлежность ко списку администраторов.
*
* @since 0.2.120
*/
public function check_session_admin() {
$result = $this->Db->query( 'Core', 0, 0,"SELECT `steamid`, `group`, `flags`, `access` FROM `lvl_web_admins` WHERE `steamid`= :steamid LIMIT 1", [
"steamid" => $_SESSION["steamid64"]
]);
if( ! empty( $result ) ):
$_SESSION['user_admin'] = 1;
$_SESSION['user_group'] = $result['group'];
$_SESSION['user_access'] = $result['access'];
$_SESSION['user_flags'] = $result['flags'];
endif;
}
/**
* Проверка печенек авторизованного пользователя.
*
* @since 0.2.120
*/
public function check_session() {
if ( $_SESSION['USER_AGENT'] != $_SERVER['HTTP_USER_AGENT'] || $_SESSION['REMOTE_ADDR'] != $this->General->get_client_ip_cdn() ):
session_unset() && session_destroy() && header("Location: ".$this->General->arr_general['site']);
endif;
}
/**
* Авторизация администратора по логину и паролю.
*
* @since 0.2.120
*/
public function authorization_no_steam() {
// Параметры к запросу.
$params = ['user' => action_text_clear( $_POST['_login'] ), 'password' => action_text_clear( $_POST['_pass'] )];
// Запрос на проверку пользователя.
$result = $this->Db->query('Core', 0, 0, "SELECT `steamid`, `group`, `flags`, `access` FROM `lvl_web_admins` WHERE `user` = :user AND `password` = :password", $params );
// Сверка результата запроса.
if ( ! empty( $result ) ):
// Пользователь. Общее значение - Steam ID 32.
$_SESSION['steamid'] = con_steam64to32( $result['steamid'] );
// Пользователь. Steam ID 32.
$_SESSION['steamid32'] = con_steam64to32( $result['steamid'] );
// Пользователь. Steam ID 64.
$_SESSION['steamid64'] = con_steam32to64 ($result['steamid'] );
// Пользователь. Заголовок User-Agent.
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
// Пользователь. IP.
$_SESSION['REMOTE_ADDR'] = $this->General->get_client_ip_cdn();
// Пользователь. Steam ID 32 ( Сокращенный ).
preg_match_all("/[0-9a-zA-Z_]{7}:([0-9]{1}):([0-9]+)/u", $_SESSION['steamid'], $arr, PREG_SET_ORDER);
$_SESSION['steamid32_short'] = $arr[0][1] . ':' . $arr[0][2];
// Пользователь. Административная инфомация.
$_SESSION['user_admin'] = 1;
$_SESSION['user_group'] = $result['group'];
$_SESSION['user_access'] = $result['access'];
$_SESSION['user_flags'] = $result['flags'];
endif;
// Обновление страницы.
header("Location: ".$this->General->arr_general['site']);
}
/**
* Получение информации о авторизованном пользователе для вывода данных в боковую панель.
*
* @since 0.2
*/
public function get_authorization_sidebar_data() {
// Проверка на подключенный мод - Levels Ranks.
if ( ! empty( $this->Db->db_data['LevelsRanks'] ) ):
// Перебор всех таблиц с модом - Levels Ranks
for ( $d = 0; $d < $this->Db->table_count['LevelsRanks']; $d++ ):
// Запрос о получении информации об авторизовавшемся пользователе.
$this->base_info = $this->Db->query('LevelsRanks', $this->Db->db_data['LevelsRanks'][ $d ]['USER_ID'], $this->Db->db_data['LevelsRanks'][ $d ]['DB_num'], "SELECT `name`, `lastconnect`, `rank` FROM `{$this->Db->db_data['LevelsRanks'][ $d ]["Table"]}` WHERE `steam` LIKE '%{$_SESSION['steamid32_short']}%' LIMIT 1");
// Если Пользователь находится в таблице, заполняем итоговый массив.
if ( ! empty( $this->base_info ) ):
// Базовая информация о пользователе.
$this->user_auth[] = $this->base_info;
// Информация о таблице.
$this->server_info[] = ['name_servers' => $this->Db->db_data['LevelsRanks'][ $d ]['name'],
'mod' => $this->Db->db_data['LevelsRanks'][ $d ]['mod'],
'ranks_pack' => $this->Db->db_data['LevelsRanks'][ $d ]['ranks_pack'],
'data_servers' => $this->Db->db_data['LevelsRanks'][ $d ]['Table']
];
endif;
endfor;
endif;
// Проверка на подключенный мод - FPS
if ( ! empty( $this->Db->db_data['FPS'] ) ):
// Перебор всех таблиц с модом - FPS.
for ( $d = 1; $d <= $this->Db->table_count['FPS']; $d++ ):
// Запрос о получении информации об авторизовавшемся пользователе.
$this->base_info = $this->Db->query('FPS', 0, 0, "SELECT `fps_players`.`nickname` AS `name`,
`fps_servers_stats`.`rank`,
`fps_servers_stats`.`lastconnect`
FROM `fps_players`
INNER JOIN `fps_servers_stats` ON `fps_players`.`account_id` = `fps_servers_stats`.`account_id`
WHERE `steam_id`={$_SESSION['steamid']} AND `fps_servers_stats`.`server_id` ={$d}
LIMIT 1");
if ( ! empty( $this->base_info ) ):
// Базовая информация о пользователе.
$this->user_auth[] = $this->base_info;
// Информация о таблице.
$this->server_info[] = ['name_servers' => $this->Db->db_data['FPS'][ $d - 1 ]['name'],
'mod' => 'csgo',
'ranks_id' => $this->Db->db_data['FPS'][ $d - 1 ]['ranks_id'],
'ranks_pack' => $this->Db->db_data['FPS'][ $d - 1 ]['ranks_pack']
];
endif;
endfor;
endif;
// Проверка на подключенный мод - RankMeKento.
if ( ! empty( $this->Db->db_data['RankMeKento'] ) ):
// Перебор всех таблиц с модом - Levels Ranks
for ( $d = 0; $d < $this->Db->table_count['RankMeKento']; $d++ ):
// Запрос о получении информации об авторизовавшемся пользователе.
$this->base_info = $this->Db->query('RankMeKento', $this->Db->db_data['RankMeKento'][ $d ]['USER_ID'], $this->Db->db_data['RankMeKento'][ $d ]['DB_num'], "SELECT `name`, `lastconnect` FROM `{$this->Db->db_data['RankMeKento'][ $d ]["Table"]}` WHERE `steam` LIKE '%{$_SESSION['steamid32_short']}%' LIMIT 1");
// Если Пользователь находится в таблице, заполняем итоговый массив.
if ( ! empty( $this->base_info ) ):
// Базовая информация о пользователе.
$this->user_auth[] = $this->base_info;
// Информация о таблице.
$this->server_info[] = ['name_servers' => $this->Db->db_data['RankMeKento'][ $d ]['name'],
'mod' => $this->Db->db_data['RankMeKento'][ $d ]['mod'],
'ranks_pack' => $this->Db->db_data['RankMeKento'][ $d ]['ranks_pack'],
'data_servers' => $this->Db->db_data['RankMeKento'][ $d ]['Table']
];
endif;
endfor;
endif;
// For translating hardcoded string
$Translate = new \app\ext\Translate;
// При отсутствии пользователя в таблицах, собираем - массив исключение.
if ( empty( $this->user_auth[0] ) ):
// Информация о пользователе.
$this->user_auth[0] = ['name' => $Translate->get_translate_phrase('_Unknown'), 'lastconnect' => '', 'rank' => '00'];
// Название сервера.
$this->server_info[0]['name_servers'] = $Translate->get_translate_phrase('_Unknown');
// Пак рангов.
$this->server_info[0]['ranks_pack'] = 'default';
endif;
// Считаем количество таблиц с найденым пользователем.
$this->user_rank_count = sizeof( $this->user_auth );
$datetime = [];
for ( $d = 0; $d < $this->user_rank_count; $d++ ):
$datetime[] = $this->user_auth[ $d ]['lastconnect'];
endfor;
// Последнее актуальное подклчюение пользователя.
$this->user_auth[0]['lastconnect_max'] = max( $datetime );
}
}
================================================
FILE: app/ext/Db.php
================================================
<?php
/**
* @author Anastasia Sidak <m0st1ce.nastya@gmail.com>
*
* @link https://steamcommunity.com/profiles/76561198038416053
* @link https://github.com/M0st1ce
*
* @license GNU General Public License Version 3
*/
namespace app\ext;
use pdo;
class Db {
/**
* @since 0.2
* @var array
*/
private $options = [];
/**
* @since 0.2
* @var array
*/
private $db = [];
/**
* @since 0.2
* @var array
*/
private $dns = [];
/**
* @since 0.2
* @var array
*/
protected $pdo = [];
/**
* @since 0.2
* @var array
*/
public $db_data = [];
/**
* @since 0.2
* @var array
*/
private $table_count_for = [];
/**
* @since 0.2
* @var int
*/
public $mod_count = 0;
/**
* @since 0.2
* @var array
*/
public $user_count = [];
/**
* @since 0.2
* @var array
*/
public $db_count = [];
/**
* @since 0.2
* @var array
*/
public $table_count = [];
/**
* @since 0.2
* @var array
*/
public $mod_name = [];
/**
* @since 0.2
* @var int
*/
public $table_statistics_count = 0;
/**
* @since 0.2
* @var array
*/
public $support_statistics = ['LevelsRanks', 'FPS', 'RankMeKento'];
/**
* @since 0.2
* @var array
*/
public $statistics_with_table_servers = ['FPS', 'HLstatsX'];
/**
* @since 0.2
* @var array
*/
public $statistics_table = [];
/**
* Организация работы вэб-приложения с базой данных.
*
* @since 0.2
*/
public function __construct() {
// Проверка на основную константу.
defined('IN_LR') != true && die();
$this->db = $this->get_db_options();
// PDO Условия.
$this->options = [
PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT,
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8mb4"
];
$this->table_count['LevelsRanks'] = 0;
$this->table_count['FPS'] = 0;
$this->table_count['RankMeKento'] = 0;
# Подсчёт -> Количество модов.
$this->mod_count = sizeof( $this->db );
# Цикл -> Количество модов.
for ( $m = 0; $m < $this->mod_count; $m++ ) {
/*
* $m - Номер -> Модуль.
*/
# Получаем название определенного мода.
$this->mod_name[] = array_keys( $this->db )[ $m ];
# Подсчёт -> Количество пользователей определенного мода.
$this->user_count[ $this->mod_name[ $m ] ] = sizeof( $this->db[ $this->mod_name[ $m ] ] );
# Цикл -> Количество пользователей.
for ( $u = 0; $u < $this->user_count[ $this->mod_name[ $m ] ]; $u++ ) {
/*
* $u - Номер Пользователя.
*/
# Подсчёт -> Количество баз данных определенного пользователя.
$this->db_count[ $this->mod_name[ $m ] ][ $u ] = sizeof( $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'] );
# Цикл -> Количество баз данных.
for ( $d = 0; $d < $this->db_count[ $this->mod_name[ $m ] ][ $u ]; $d++ ) {
/*
* $d - Номер Базы данных.
*/
// Проверка на поле PORT
$this->db[ $this->mod_name[ $m ] ][ $u ]["PORT"] = empty( $this->db[ $this->mod_name[ $m ] ][ $u ]["PORT"] ) ? 3306 : $this->db[ $this->mod_name[ $m ] ][ $u ]["PORT"];
// Сигнатура DNS.
$this->dns[ $this->mod_name[ $m ] ][ $u ][ $d ] = 'mysql:host=' . $this->db[ $this->mod_name[ $m ] ][ $u ]["HOST"] . ';port=' . $this->db[ $this->mod_name[ $m ] ][ $u ]["PORT"] . ';dbname=' . $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['DB'] . ';charset=utf8';
$this->table_count_for[ $this->mod_name[ $m ] ] = sizeof( $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'] );
// Циклом перебираем все таблицы которые описаны в файле настроек баз данных.
for ( $t = 0; $t < $this->table_count_for[ $this->mod_name[ $m ] ]; $t++ ) {
/*
* $t - Номер таблицы.
*/
$rank_pack = empty( $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['ranks_pack'] ) ? 'default' : $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['ranks_pack'];
if( in_array( $this->mod_name[ $m ], $this->statistics_with_table_servers ) ):
switch ( $this->mod_name[ $m ] ) {
case 'FPS':
$this->fps_servers_data = $this->queryAll('FPS',0, 0, 'SELECT `id`, `server_name`, `server_ip`, `settings_rank_id` FROM `fps_servers`' );
for ( $_m = 0, $m_s = sizeof( $this->fps_servers_data ); $_m < $m_s; $_m++ ):
$this->db_data['FPS'][] = [
'DB_mod' => 'FPS',
'USER_ID' => $u,
'USER' => $this->db[ $this->mod_name[ $m ] ][ $u ]['USER'],
'DB' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['DB'],
'DB_num' => $d,
'Table' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['table'] ?? '',
'table_id' => $t,
'name' => $this->fps_servers_data[ $_m ]['server_name'] ?? 'Unnamed',
'mod' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['mod'] ?? 730,
'steam' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['steam'] ?? 1,
'ranks_id' => $this->fps_servers_data[ $_m ]['settings_rank_id'],
'ranks_pack' => $rank_pack ?? 'default'
];
$this->statistics_table[] = [ 'DB_mod' => 'FPS', 'name' => $this->fps_servers_data[ $_m ]['server_name'], 'ranks_pack' => $rank_pack ];
endfor;
break;
case 'HLstatsX':
break;
}
else:
// Создаём массив с описанием таблиц.
$this->db_data[ $this->mod_name[ $m ] ][] = [
'DB_mod' => $this->mod_name[ $m ],
'USER_ID' => $u,
'USER' => $this->db[ $this->mod_name[ $m ] ][ $u ]['USER'],
'DB' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['DB'],
'DB_num' => $d,
'Table' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['table'] ?? '',
'table_id' => $t,
'name' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['name'] ?? 'Unnamed',
'mod' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['mod'] ?? 730,
'steam' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['steam'] ?? 1,
'ranks_pack' => $rank_pack ?? 'default'
];
in_array( $this->mod_name[ $m ], $this->support_statistics ) && $this->statistics_table[] = [ 'DB_mod' => $this->mod_name[ $m ], 'name' => $this->db[ $this->mod_name[ $m ] ][ $u ]['DB'][ $d ]['Prefix'][ $t ]['name'], 'ranks_pack' => $rank_pack];
endif;
}
}
}
$this->table_count[ $this->mod_name[ $m ] ] = sizeof( $this->db_data[ $this->mod_name[ $m ] ] );
}
$this->table_statistics_count = $this->table_count['LevelsRanks'] + $this->table_count['FPS'] + $this->table_count['RankMeKento'];
}
/**
* Получение настроек базы данных.
*
* @since 0.2
*
* @return array Массив с настройками.
*/
private function get_db_options() {
$db = file_exists( SESSIONS . '/db.php' ) ? require SESSIONS . '/db.php' : null;
return empty( $db ) ? exit(require 'app/page/custom/install/index.php') : $db;
}
/**
* Добавление или удаление мода в db.php
*
* @since 0.2.2
*
* $delete - ["DB_MOD" => "Номер базы, может их несколько", "USER_ID" => "Номер базы, обычно 0"] || ["delete" => "all"] - Чтобы снести всю базу
*
* @return bool
*/
public function change_db( $mod, $host, $user, $pass, $db_name, $table, $delete = 0, $params = null )
{
$db = $this->get_db_options();
if( !$db )
return false;
if( is_array( $delete ) )
{
if( !isset( $delete["delete"] ) && $delete["delete"] != "all" )
{
// Рядовые проверки, вдруг надо удалить конкретную базу
if( !empty( $delete["DB_MOD"] ) && empty( $delete["USER_ID"] ) )
unset( $db[ $mod ][ $delete["DB_MOD"] ] );
// Удаление определенной таблицы
if( !empty( $delete["DB_MOD"] ) && !empty( $delete["USER_ID"] ) )
unset( $db[ $mod ][ $delete["DB_MOD"] ][ $delete["USER_ID"] ] );
}
else
{
unset( $db[ $mod ] );
}
}
else
{
$params = ( !empty( $params ) ) ? ["table" => $table] + $params : ["table" => $table];
$query = ['HOST' => $host, 'USER' => $user, 'PASS' => $pass, 'DB' =>[0 =>['DB' => $db_name, 'Prefix' =>[0 =>$params]]]];
$db[ $mod ][] = $query;
}
if( file_put_contents( SESSIONS . 'db.php', '<?php return '.var_export_opt( $db, true ).";" ) )
return true;
return false;
}
/**
* Подключение к определенному моду базы данных.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
*
* @return bool существование мода
*/
private function get_new_connect($mod, $user_id, $db_id)
{
$_Key = array_search($mod, $this->mod_name);
if($_Key !== false)
{
// Создаём подключение по PDO для определенной базы данных.
$this->pdo[ $this->mod_name[ $_Key ] ][ $user_id ][ $db_id ] = new PDO( $this->dns[ $this->mod_name[ $_Key ] ][ $user_id ][ $db_id ], $this->db[ $this->mod_name[ $_Key ] ][ $user_id ]['USER'], $this->db[ $this->mod_name[ $_Key ] ][ $user_id ]['PASS'], $this->options );
return true;
}
return false;
}
/**
* Подготовительный подзапрос.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $sql SQL запрос.
* @param array $params Параметры.
*
* @return array Итог подготовленного подзапроса
*/
public function inquiry( $mod, $user_id, $db_id, $sql, $params )
{
//Проверка на существования БД, и подключение если его нет
if(!isset($this->pdo[ $mod ][ $user_id ][ $db_id ]))
$this->get_new_connect($mod, $user_id, $db_id);
$stmt = $this->pdo[ $mod ][ $user_id ][ $db_id ]->prepare( $sql );
if ( ! empty( $params ) ) {
foreach ( $params as $key => $val ) {
if ( is_int( $val ) ) {
$type = PDO::PARAM_INT;
} else {
$type = PDO::PARAM_STR;
}
$stmt->bindValue( ':'.$key, $val, $type );
}
}
$stmt->execute();
return $stmt;
}
/**
* Шаблон запроса отдающий массив с индексированными именами столбцов.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $sql SQL запрос.
* @param array $params Параметры.
*
* @return array Возвращает результат SQL запроса.
*/
public function query( $mod, $user_id = 0, $db_id = 0, $sql = null, $params = [] ) {
$result = $this->inquiry( $mod, $user_id, $db_id, $sql, $params );
if($result)
return $result->fetch( PDO::FETCH_ASSOC );
}
/**
* Шаблон запроса отдающий массив с индексированными номерами столбцов.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $sql SQL запрос.
* @param array $params Параметры.
*
* @return array Возвращает результат SQL запроса.
*/
public function queryNum( $mod, $user_id = 0, $db_id = 0, $sql = null, $params = [] ) {
$result = $this->inquiry( $mod, $user_id, $db_id, $sql, $params );
if($result)
return $result->fetch( PDO::FETCH_NUM );
}
/**
* Шаблон запроса отдающий массив со всеми строками.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $sql SQL запрос.
* @param array $params Параметры.
*
* @return array Возвращает результат SQL запроса.
*/
public function queryAll( $mod, $user_id = 0, $db_id = 0, $sql = null, $params = [] ) {
$result = $this->inquiry( $mod, $user_id, $db_id, $sql, $params );
if($result)
return $result->fetchAll( PDO::FETCH_ASSOC );
}
/**
* Шаблон запроса отдающий массив со всеми строками, парсирование ключа.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $sql SQL запрос.
* @param array $params Параметры.
*
* @return array Возвращает результат SQL запроса.
*/
public function query_all_key_pair( $mod, $user_id = 0, $db_id = 0, $sql = null, $params = [] ) {
$result = $this->inquiry( $mod, $user_id, $db_id, $sql, $params );
if($result)
return $result->fetchAll( PDO::FETCH_KEY_PAIR );
}
/**
* Шаблон запроса отдающий массив стобца.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $sql SQL запрос.
* @param array $params Параметры.
*
* @return array Возвращает результат SQL запроса.
*/
public function queryColumn( $mod, $user_id = 0, $db_id = 0, $sql = null, $params = [] ) {
$result = $this->inquiry( $mod, $user_id, $db_id, $sql, $params );
if($result)
return $result->fetchColumn();
}
/**
* Шаблон запроса отдающий данные одного стобца.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $sql SQL запрос.
* @param array $params Параметры.
*
* @return array Возвращает результат SQL запроса.
*/
public function queryOneColumn( $mod, $user_id = 0, $db_id = 0, $sql = null, $params = [] ) {
$result = $this->inquiry( $mod, $user_id, $db_id, $sql, $params );
if($result)
return $result->fetch( PDO::FETCH_COLUMN );
}
/**
* Запрос проверяющий существование столбика в той или иной таблице.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $tablename Название таблицы.
* @param string $column Название столбика который нужно проверить.
*
* @return int Возвращает результат проверки.
*/
public function mysql_column_search( $mod, $user_id = 0, $db_id = 0, $tablename = null, $column = null ) {
//Проверка на существования БД, и подключение если его нет
if(!isset($this->pdo[ $mod ][ $user_id ][ $db_id ]))
$this->get_new_connect($mod, $user_id, $db_id);
return in_array( $column, $this->pdo[ $mod ][ (int) $user_id ][ (int) $db_id ]->query('SHOW COLUMNS from ' . $tablename . ' ')->fetchAll( PDO::FETCH_COLUMN ) );
}
/**
* Запрос проверяющий существование таблицы в той или иной базе данных.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
* @param string $tablename Название таблицы которую нужно проверить проверки
*
* @return int Возвращает результат проверки.
*/
public function mysql_table_search( $mod, $user_id = 0, $db_id = 0, $tablename = null ) {
//Проверка на существования БД, и подключение если его нет
if(!isset($this->pdo[ $mod ][ $user_id ][ $db_id ]))
$this->get_new_connect($mod, $user_id, $db_id);
return ! empty( $this->pdo[ $mod ][ (int) $user_id ][ (int) $db_id ]->query("SHOW TABLES like '$tablename'")->fetchAll( PDO::FETCH_NUM )[0] ) ? true : false;
}
/**
* Возвращает ID последней вставленной строки.
*
* @since 0.2
*
* @param string $mod Навание мода.
* @param int $user_id Номер пользователя.
* @param int $db_id Номер подключенной базы данных.
*
* @return int ID.
*/
public function lastInsertId( $mod, $user_id = 0, $db_id = 0 )
{
//Проверка на существования БД, и подключение если его нет
if(!isset($this->pdo[ $mod ][ $user_id ][ $db_id ]))
$this->get_new_connect($mod, $user_id, $db_id);
return $this->pdo[ $mod ][ $user_id ][ $db_id ]->lastInsertId();
}
/**
* "Разрыв соединения с базой данных".
*
* @since 0.2
*/
public function __destruct() {
unset( $this->dns );
unset( $this->pdo );
}
}
================================================
FILE: app/ext/ErrorsHandler.php
================================================
<?php
namespace app\ext;
class ErrorsHandler
{
public static function fatal_handler()
{
$errors = error_get_last();
!is_null( $errors ) && self::return_error( $errors );
}
/**
* Вернуть шаблон с ошибкой
*/
protected static function return_error( array $errors )
{
file_put_contents( substr(__DIR__, 0, -4)."\\logs\\".date("Y-m-d").".txt", "\n".date("Y-m-d H:i:s") . " - NEW ERROR [".$errors['type']."] \n FILE - ".$errors['file']." \n MESSAGE - ".$errors['message'] . " \n LINE - ".$errors['line'], FILE_APPEND | LOCK_EX );
die("Exception script, check web server logs");
}
public static function error_handler( $error_level, $error_message, $error_file, $error_line )
{
$error = [
"lvl" => $error_level,
"message" => $error_message,
"file" => $error_file,
"line" => $error_line
];
/**
* Отлавливаем проблемы с парсингом и фатальной ошибкой
*/
switch ($error_level)
{
case E_ERROR:
case E_CORE_ERROR:
case E_COMPILE_ERROR:
case E_PARSE:
self::return_error( $error );
break;
case E_USER_ERROR:
case E_RECOVERABLE_ERROR:
self::return_error( $error );
break;
case E_WARNING:
case E_CORE_WARNING:
case E_COMPILE_WARNING:
case E_USER_WARNING:
case E_NOTICE:
case E_USER_NOTICE:
case E_STRICT:
default:
}
}
public function setErrors()
{
set_error_handler([$this, "error_handler"]);
register_shutdown_function([$this, 'fatal_handler']);
}
}
================================================
FILE: app/ext/General.php
================================================
<?php
/**
* @author Anastasia Sidak <m0st1ce.nastya@gmail.com>
*
* @link https://steamcommunity.com/profiles/76561198038416053
* @link https://github.com/M0st1ce
*
* @license GNU General Public License Version 3
*/
namespace app\ext;
class General {
/**
* @since 0.2
* @var array
*/
public $arr_general = [];
/**
* @since 0.2
* @var array
*/
public $notes = [];
/**
* @since 0.2
* @var array
*/
public $server_list = [];
/**
* @since 0.2
* @var int
*/
public $server_list_count = 0;
/**
* Массив с буффером аватарок и прочего
* @var array
*/
protected static $json_buff = [];
/**
* Инициализация основных настроек.
*
* @param object $Db
*
* @since 0.2
*/
function __construct( $Db ) {
// Проверка на основную константу.
defined('IN_LR') != true && die();
//Проверка на iframe
(!empty($_GET['code']) && !empty($_GET['description'])) && exit(require PAGE_CUSTOM . '/error/index.php');
$this->Db = $Db;
// Получение настроек вэб-интерфейса.
$this->arr_general = $this->get_default_options();
if( isset( $_POST['btn_search'] ) && IN_LR == true ) {
$search = substr( $_POST['_steam_id'], 0, 7) === "STEAM_0" ? str_replace("STEAM_0", "STEAM_1", $_POST['_steam_id'] ) : $_POST['_steam_id'];
header( 'Location: ' . $this->arr_general['site'] . 'profiles/' . $search . '/?search=1' );
exit;
}
// Получение списка игровых серверов.
$this->server_list = $this->get_server_list();
// Общее количество игровых серверов.
$this->server_list_count = get_arr_size( $this->server_list );
// Получение языка страницы.
$this->get_default_url_section('language', $this->arr_general['language'], array( 'RU', 'EN', 'UA', 'LT', 'DE', 'CH','PT', 'RS', 'BA', 'CRO' ) );
// Получение информации о состоянии сайт-бара.
$this->get_default_url_section('sidebar_open', $this->arr_general['sidebar_open'], array( true, false ) );
}
/**
* Получает и задает название подраздела из URL по умолчанию, сохраняя результат по умолчанию в сессию.
*
* @since 0.2
*
* @param string|bool $section Название подраздела.
* @param string $default Значние по умолчанию.
* @param array|null $arr_true Белый список.
*
*/
public function get_default_url_section( $section, $default, $arr_true ) {
! isset( $_SESSION[ $section ] ) && $_SESSION[ $section ] = $default;
isset ( $_GET[ $section ] ) && in_array( $_GET[ $section ], $arr_true ) && $_SESSION[ $section ] = $_GET[ $section ];
}
/**
* Получает определенного аватара.
*
* @since 0.2
*
* @param string $profile Steam ID игрока
* @param int $type Тип/Размер аватара.
*
* @return string Выводит ссылку на аватар если он существует.
*/
public function getAvatar( $profile, $type )
{
$avatar_type = $type == 1 ? "avatar" : "slim";
if( $this->arr_general['avatars'] == 1 )
{
if( isset( self::$json_buff[ $profile ] ) && !empty( self::$json_buff[ $profile ] ) )
return htmlentities(self::$json_buff[ $profile ][ $avatar_type ]);
$url = sprintf("%simg/avatars/%s.json", CACHE, $profile);
if( file_exists( $url ) )
{
$avatar = json_decode(file_get_contents($url), true);
self::$json_buff[$profile] = $avatar;
return htmlentities($avatar[$avatar_type]);
}
}
return $this->arr_general['site'] . 'storage/cache/img/avatars_random/' . rand(1,30) . '.jpg';
}
/**
* Проверка на существование определеноого аватара и его актуальность.
*
* @since 0.2
*
* @param string $profile Steam ID игрока
* @param int $type Тип/Размер аватара.
*
* @return int Выводит итог проверки.
*/
public function checkAvatar( $profile, $type ) {
$url = CACHE . 'img/avatars/' . $profile . '.json';
if( $type == 1 ) {
if ( file_exists( $url ) ):
if ( time() >= filemtime( $url ) + $this->arr_general['avatars_cache_time'] ):
unlink( $url );
return 1;
else:
return 0;
endif;
else:
return 1;
endif;
}
}
/**
* Получение никнейма игрока.
*
* @since 0.2
*
* @param string $profile Steam ID игрока
*
* @return string Выводит итог проверки.
*/
public function checkName( $profile )
{
!isset( self::$json_buff[$profile] ) && $this->getAvatar($profile, 1);
return htmlentities(self::$json_buff[$profile]["name"]) ?? "Unnamed";
}
/**
* Отправка уведомлений через функцию.
*
* @since 0.2
*
* @return bool true
*/
public function sendNote($text, $status, $time = 4.5)
{
$this->notes[] = [
'content' => $text,
'status' => $status,
'time' => $time,
];
}
/**
* Получение настроек по умолчанию для вэб-интерфейса.
*
* @since 0.2
*
* @return array Массив с настройками.
*/
public function get_default_options() {
$options = file_exists( SESSIONS . '/options.php' ) ? require SESSIONS . '/options.php' : null;
return !isset( $options['animations'] ) ? exit(require 'app/page/custom/install/index.php') : $options;
}
/**
* Получение списка серверов.
*
* @return array Массив со списком серверов.
*/
public function get_server_list() {
return $this->Db->queryAll( 'Core', 0, 0,'SELECT * FROM `lvl_web_servers`' );
}
/**
* Получение иконок и работа с ними.
*
* @since 0.2
*
* @param string $group Название папки из которой будет читаться иконка.
* @param string $name Название иконки.
* @param string $category Дополнительное название под-категории, если она имеется. По умолчанию нету.
*
* @return string|false Выводит содержимое SVG файла.
*/
function get_icon( $group, $name, $category = null ) {
return print $category == null ? '<i class="zmdi zmdi-' . $name . ' zmdi-hc-fw"></i>' : '<img src="' . $this->arr_general['site'] . CACHE . 'img/icons/' . $group . '/' . $category . '/' . $name . '.svg" class=svg>';
}
/**
* Вывод JS скрипта на проверку актуальности аватара.
*
* @since 0.2
*
* @param string $id Steam ID - 32.
* @param int $type Тип аватара.
*
* @return string Скрипт.
*/
function get_js_relevance_avatar( $id, $type = 1 ) {
if ( $this->arr_general['avatars'] == 1 ):
$con = is_numeric( $id ) ? $id : con_steam32to64( $id );
$check = (int) $this->checkAvatar( $con, $type );
echo sprintf('<script>CheckAvatar = %1$d; if (CheckAvatar == 1) { avatar.push("%2$s"); }</script>', $check, $con );
endif;
}
/**
* Получает IP клиента с поддержкой CDN.
* Поддерживает: CloudFlare - (другие CDN по запросу).
*
* @return string IP.
*/
public function get_client_ip_cdn()
{
return isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER['REMOTE_ADDR'];
}
/**
* Счетчик посещений
*/
public function online_stats()
{
if(isset($_SESSION['steamid32']))
$User = $_SESSION['steamid32'];
else $User = 'guest';
$client_ip = $this->get_client_ip_cdn();
$param['ip'] = $client_ip;
$Online = $this->Db->queryOneColumn( 'Core', 0, 0, "SELECT `user` FROM `lr_web_online` WHERE `ip` = :ip", $param );
if(empty($Online))
{
$params = [
'user' => $User,
'ip' => $client_ip
];
$this->Db->query('Core', 0, 0, "INSERT INTO `lr_web_online`(`id`, `user`, `ip`, `time`) VALUES (NULL, :user, :ip, NOW())", $params );
}
else
{
if($Online != $User)
{
$params = [
'user' => $User,
'ip' => $client_ip
];
$this->Db->query('Core', 0, 0, 'UPDATE `lr_web_online` SET `time` = NOW(), `user` = :user WHERE `ip` = :ip', $params );
}
else
{
$this->Db->query('Core', 0, 0, "UPDATE `lr_web_online` SET `time` = NOW() WHERE `ip` = :ip", $param );
}
}
$this->Db->query('Core', 0, 0, "DELETE FROM `lr_web_online` WHERE `time` < SUBTIME(NOW(), '0 0:05:0')" );
$_Param['date'] = date('m.Y');
$_Attendance_ID = $this->Db->queryOneColumn( 'Core', 0, 0, 'SELECT `id` FROM `lr_web_attendance` WHERE `date` = :date', $_Param );
if($_Attendance_ID)
{
$_ParamU['id'] = $_Attendance_ID;
$this->Db->query( 'Core', 0, 0, "UPDATE `lr_web_attendance` SET `visits` = `visits` + 1 WHERE `id` = :id", $_ParamU );
}
else
{
$this->Db->query( 'Core', 0, 0, "INSERT INTO `lr_web_attendance`(`id`, `date`, `visits`) VALUES (NULL, :date, 1)", $_Param );
}
}
}
================================================
FILE: app/ext/Graphics.php
================================================
<?php
/**
* @author Anastasia Sidak <m0st1ce.nastya@gmail.com>
*
* @link https://steamcommunity.com/profiles/76561198038416053
* @link https://github.com/M0st1ce
*
* @license GNU General Public License Version 3
*/
namespace app\ext;
class Graphics {
/**
* @since 0.2.123
* @var object
*/
public $Translate;
/**
* @since 0.2
* @var object
*/
public $General;
/**
* @since 0.2
* @var object
*/
public $Modules;
/**
* @since 0.2
* @var object
*/
public $Db;
/**
* @since 0.2
* @var object
*/
public $Auth;
/**
* @since 0.2
* @var object
*/
public $Notifications;
/**
* @since 0.2
* @var object
*/
public $Router;
/**
* Инициализация графической составляющей вэб-интерфейса с подгрузкой модулей.
*
* @param object $Translate
* @param object $General
* @param object $Modules
* @param object $Db
* @param object $Auth
* @param object $Notifications
*
* @since 0.2
*/
function __construct( $Translate, $General, $Modules, $Db, $Auth, $Notifications, $Router ) {
// Проверка на основную константу.
defined('IN_LR') != true && die();
// Присвоение глобальных объектов.
$Graphics = $this;
$this->Translate = $Translate;
$this->General = $General;
$this->Modules = $Modules;
$this->Db = $Db;
$this->Auth = $Auth;
$this->Notifications = $Notifications;
$this->Router = $Router;
(empty($Modules->arr_module_init['page'][ $Modules->route ]) && !isset($_GET['auth'])) && get_iframe("404", "Oopss...");
// Подгрузка данных из модулей которые не относятся к интерфейсу и должны быть получены до начала рендера страницы.
for ( $module_id = 0, $c_mi = sizeof( $Modules->arr_module_init['page'][ $Modules->route ]['data'] ); $module_id < $c_mi; $module_id++ ):
$file = MODULES . $Modules->arr_module_init['page'][ $Modules->route ]['data'][ $module_id ] . '/forward/data.php';
file_exists( $file ) && require $file;
endfor;
// Дополнительный поток под модули, которые должны задействовать ядро на постоянной основе, а не локально.
if( ! empty( $Modules->arr_module_init['data_always'] ) ):
for ( $module_id = 0, $c_mi = sizeof( $Modules->arr_module_init['data_always'] ); $module_id < $c_mi; $module_id++ ):
$file = MODULES . $Modules->arr_module_init['data_always'][ $module_id ] . '/forward/data_always.php';
file_exists( $file ) && require $file;
endfor;
endif;
// Рендер блока - Head
require PAGE . 'head.php';
//Рендер кастомного head
(file_exists(TEMPLATES . $General->arr_general['theme'] . '/interface/head.php')) && require TEMPLATES . $General->arr_general['theme'] . '/interface/head.php';
// Рендер блока - Sidebar
(file_exists(TEMPLATES . $General->arr_general['theme'] . '/interface/sidebar.php')) && require TEMPLATES . $General->arr_general['theme'] . '/interface/sidebar.php';
// Рендер блока - Navbar
(file_exists(TEMPLATES . $General->arr_general['theme'] . '/interface/navbar.php')) && require TEMPLATES . $General->arr_general['theme'] . '/interface/navbar.php';
(file_exists(TEMPLATES . $General->arr_general['theme'] . '/interface/container.php')) && require TEMPLATES . $General->arr_general['theme'] . '/interface/container.php';
// Дополнительный пулл под модули, которые должны быть объявлены на каждой странице - afternavbar
if( ! empty( $Modules->arr_module_init['interface_always']['afternavbar'] ) ):
for ( $module_id = 0, $c_mi = sizeof( $Modules->arr_module_init['interface_always']['afternavbar'] ); $module_id < $c_mi; $module_id++ ):
$file = MODULES . $Modules->arr_module_init['interface_always']['afternavbar'][ $module_id ]['name'] . '/forward/interface_always.php';
file_exists( $file ) && require $file;
endfor;
endif;
// Подгрузка данных из модулей которые относятся к интерфейсу - afternavbar
if( ! empty( $Modules->arr_module_init['page'][ $Modules->route ]['interface']['afternavbar'] ) ):
for ( $module_id = 0, $c_mi = sizeof( $Modules->arr_module_init['page'][ $Modules->route ]['interface']['afternavbar'] ); $module_id < $c_mi; $module_id++ ):
$file = MODULES . $Modules->arr_module_init['page'][ $Modules->route ]['interface']['afternavbar'][ $module_id ] . '/forward/interface.php';
file_exists( $file ) && require $file;
endfor;
endif;
// Рендер блока - Footer
require PAGE . 'footer.php';
}
/**
* Получение фонового ихображения.
*
* @since 0.2
*
* @return string Ссылка на изображение ( CSS / Style )
*/
public function get_css_background_image() {
if ( ! empty( $this->General->arr_general['background_image'] ) && $this->General->arr_general['background_image'] != 'null' ) {
return 'body { background-image: url('.$this->General->arr_general["site"].'storage/cache/img/global/backgrounds/' . $this->General->arr_general["background_image"] . ')} ';
}
}
/**
* Вывод кнопки изменения боковой панели.
*
* @since 0.2
*
* @return string Итоговый вывод.
*/
public function get_css_sidebar_toggle() {
if ( ! empty( $this->General->arr_general['disable_sidebar_change'] ) ) {
return '.logo-area img {left:-8px} ';
}
}
/**
* Включить размытие боковой панели.
*
* @since 0.2
*
* @return string Итоговый вывод.
*/
public function get_css_sidebar_blur() {
if ( ! empty( $this->General->arr_general['graphics.sidebar_blur'] ) ) {
return '.main-sidebar { background-color: rgba(0, 0, 0, 0.5);backdrop-filter: blur(4px)}
.sidebar-menu li:hover {background-color: rgba(0, 0, 0, 0.6)}
.table-active {background-color: rgba(0, 0, 0, 1)}';
}
}
/**
* Включить размытие всех блоков
*
* @since 0.2
*
* @return string Итоговый вывод.
*/
public function get_css_blocks_blur() {
if ( ! empty( $this->General->arr_general['graphics.blocks_blur'] ) ) {
return '.card, .navbar, .block { background-color: rgba(0, 0, 0, 0.5);backdrop-filter: blur(7px)}
.table th {border-bottom: 0px solid var(--hover)}
.table-hover tbody tr:hover {background-color: rgba(0, 0, 0, 0.6)}
.input-form .input_text {color: var(--default-text-color)}
.input-form .border-checkbox-label {color: var(--default-text-color)}
.sidebar-right {background-color: rgba(0, 0, 0, 0.5);backdrop-filter: blur(7px)}';
}
}
/**
* Ограничение основного графического контейнера.
*
* @since 0.2
*
* @return string Итоговый максимальный размер контейнера ( CSS / Style )
*/
public function get_css_graphics_container() {
if ( ! empty( $this->General->arr_general['graphics_container'] ) ):
if ( $this->General->arr_general['graphics_container'] == 'static' ):
return '.container-fluid{max-width:1400px} ';
elseif( $this->General->arr_general['graphics_container'] == 'stretch' ):
return '.container-fluid{max-width:1920px} ';
endif;
endif;
}
/**
* Получение и вывод цветовой палитный сайта.
*
* @since 0.2
*
* @return string Цветовая плалитра ( CSS / Style / ROOT )
*/
public function get_css_color_palette() {
return ':root' . str_replace( '"', '', str_replace( '",', ';', file_get_contents_fix ( 'app/templates/' . $this->General->arr_general['theme'] . '/colors.json' ) ) ) . ' ';
}
}
================================================
FILE: app/ext/LightOpenID.php
================================================
<?php
/**
* This class provides a simple interface for OpenID 1.1/2.0 authentication.
*
* It requires PHP >= 5.1.2 with cURL or HTTP/HTTPS stream wrappers enabled.
*
* @version v1.3.1 (2016-03-04)
* @link https://code.google.com/p/lightopenid/ Project URL
* @link https://github.com/iignatov/LightOpenID GitHub Repo
* @author Mewp <mewp151 at gmail dot com>
* @copyright Copyright (c) 2013 Mewp
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class LightOpenID
{
public $returnUrl
, $required = array()
, $optional = array()
, $verify_peer = null
, $capath = null
, $cainfo = null
, $cnmatch = null
, $data
, $oauth = array()
, $curl_time_out = 30 // in seconds
, $curl_connect_time_out = 30; // in seconds
private $identity, $claimed_id;
protected $server, $version, $trustRoot, $aliases, $identifier_select = false
, $ax = false, $sreg = false, $setup_url = null, $headers = array()
, $proxy = null, $user_agent = 'LightOpenID'
, $xrds_override_pattern = null, $xrds_override_replacement = null;
static protected $ax_to_sreg = array(
'namePerson/friendly' => 'nickname',
'contact/email' => 'email',
'namePerson' => 'fullname',
'birthDate' => 'dob',
'person/gender' => 'gender',
'contact/postalCode/home' => 'postcode',
'contact/country/home' => 'country',
'pref/language' => 'language',
'pref/timezone' => 'timezone',
);
function __construct($host, $proxy = null)
{
$this->set_realm($host);
$this->set_proxy($proxy);
$uri = rtrim(preg_replace('#((?<=\?)|&)openid\.[^&]+#', '', $_SERVER['REQUEST_URI']), '?');
$this->returnUrl = $this->trustRoot . $uri;
$this->data = ($_SERVER['REQUEST_METHOD'] === 'POST') ? $_POST : $_GET;
if(!function_exists('curl_init') && !in_array('https', stream_get_wrappers())) {
throw new ErrorException('You must have either https wrappers or curl enabled.');
}
}
function __isset($name)
{
return in_array($name, array('identity', 'trustRoot', 'realm', 'xrdsOverride', 'mode'));
}
function __set($name, $value)
{
switch ($name) {
case 'identity':
if (strlen($value = trim((String) $value))) {
if (preg_match('#^xri:/*#i', $value, $m)) {
$value = substr($value, strlen($m[0]));
} elseif (!preg_match('/^(?:[=@+\$!\(]|https?:)/i', $value)) {
$value = "http://$value";
}
if (preg_match('#^https?://[^/]+$#i', $value, $m)) {
$value .= '/';
}
}
$this->$name = $this->claimed_id = $value;
break;
case 'trustRoot':
case 'realm':
$this->trustRoot = trim($value);
break;
case 'xrdsOverride':
if (is_array($value)) {
list($pattern, $replacement) = $value;
$this->xrds_override_pattern = $pattern;
$this->xrds_override_replacement = $replacement;
} else {
trigger_error('Invalid value specified for "xrdsOverride".', E_USER_ERROR);
}
break;
}
}
function __get($name)
{
switch ($name) {
case 'identity':
# We return claimed_id instead of identity,
# because the developer should see the claimed identifier,
# i.e. what he set as identity, not the op-local identifier (which is what we verify)
return $this->claimed_id;
case 'trustRoot':
case 'realm':
return $this->trustRoot;
case 'mode':
return empty($this->data['openid_mode']) ? null : $this->data['openid_mode'];
}
}
function set_proxy($proxy)
{
if (!empty($proxy)) {
// When the proxy is a string - try to parse it.
if (!is_array($proxy)) {
$proxy = parse_url($proxy);
}
// Check if $proxy is valid after the parsing.
if ($proxy && !empty($proxy['host'])) {
// Make sure that a valid port number is specified.
if (array_key_exists('port', $proxy)) {
if (!is_int($proxy['port'])) {
$proxy['port'] = is_numeric($proxy['port']) ? intval($proxy['port']) : 0;
}
if ($proxy['port'] <= 0) {
throw new ErrorException('The specified proxy port number is invalid.');
}
}
$this->proxy = $proxy;
}
}
}
/**
* Checks if the server specified in the url exists.
*
* @param $url url to check
* @return true, if the server exists; false otherwise
*/
function hostExists($url)
{
if (strpos($url, '/') === false) {
$server = $url;
} else {
$server = @parse_url($url, PHP_URL_HOST);
}
if (!$server) {
return false;
}
return !!gethostbynamel($server);
}
protected function set_realm($uri)
{
$realm = '';
# Set a protocol, if not specified.
$realm .= (($offset = strpos($uri, '://')) === false) ? $this->get_realm_protocol() : '';
# Set the offset properly.
$offset = (($offset !== false) ? $offset + 3 : 0);
# Get only the root, without the path.
$realm .= (($end = strpos($uri, '/', $offset)) === false) ? $uri : substr($uri, 0, $end);
$this->trustRoot = $realm;
}
protected function get_realm_protocol()
{
if (!empty($_SERVER['HTTPS'])) {
$use_secure_protocol = ($_SERVER['HTTPS'] != 'off');
} else if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
$use_secure_protocol = ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https');
} else if (isset($_SERVER['HTTP__WSSC'])) {
$use_secure_protocol = ($_SERVER['HTTP__WSSC'] == 'https');
} else {
$use_secure_protocol = false;
}
return $use_secure_protocol ? 'https://' : 'http://';
}
protected function request_curl($url, $method='GET', $params=array(), $update_claimed_id)
{
$params = http_build_query($params, '', '&');
$curl = curl_init($url . ($method == 'GET' && $params ? '?' . $params : ''));
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_USERAGENT, $this->user_agent);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if ($method == 'POST') {
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded'));
} else {
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/xrds+xml, */*'));
}
curl_setopt($curl, CURLOPT_TIMEOUT, $this->curl_time_out); // defaults to infinite
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT , $this->curl_connect_time_out); // defaults to 300s
if (!empty($this->proxy)) {
curl_setopt($curl, CURLOPT_PROXY, $this->proxy['host']);
if (!empty($this->proxy['port'])) {
curl_setopt($curl, CURLOPT_PROXYPORT, $this->proxy['port']);
}
if (!empty($this->proxy['user'])) {
curl_setopt($curl, CURLOPT_PROXYUSERPWD, $this->proxy['user'] . ':' . $this->proxy['pass']);
}
}
if($this->verify_peer !== null) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verify_peer);
if($this->capath) {
curl_setopt($curl, CURLOPT_CAPATH, $this->capath);
}
if($this->cainfo) {
curl_setopt($curl, CURLOPT_CAINFO, $this->cainfo);
}
}
if ($method == 'POST') {
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
} elseif ($method == 'HEAD') {
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_NOBODY, true);
} else {
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_HTTPGET, true);
}
$response = curl_exec($curl);
if($method == 'HEAD' && curl_getinfo($curl, CURLINFO_HTTP_CODE) == 405) {
curl_setopt($curl, CURLOPT_HTTPGET, true);
$response = curl_exec($curl);
$response = substr($response, 0, strpos($response, "\r\n\r\n"));
}
if($method == 'HEAD' || $method == 'GET') {
$header_response = $response;
# If it's a GET request, we want to only parse the header part.
if($method == 'GET') {
$header_response = substr($response, 0, strpos($response, "\r\n\r\n"));
}
$headers = array();
foreach(explode("\n", $header_response) as $header) {
$pos = strpos($header,':');
if ($pos !== false) {
$name = strtolower(trim(substr($header, 0, $pos)));
$headers[$name] = trim(substr($header, $pos+1));
}
}
if($update_claimed_id) {
# Update the claimed_id value in case of redirections.
$effective_url = curl_getinfo($curl, CURLINFO_EFFECTIVE_URL);
# Ignore the fragment (some cURL versions don't handle it well).
if (strtok($effective_url, '#') != strtok($url, '#')) {
$this->identity = $this->claimed_id = $effective_url;
}
}
if($method == 'HEAD') {
return $headers;
} else {
$this->headers = $headers;
}
}
if (curl_errno($curl)) {
throw new ErrorException(curl_error($curl), curl_errno($curl));
}
return $response;
}
protected function parse_header_array($array, $update_claimed_id)
{
$headers = array();
foreach($array as $header) {
$pos = strpos($header,':');
if ($pos !== false) {
$name = strtolower(trim(substr($header, 0, $pos)));
$headers[$name] = trim(substr($header, $pos+1));
# Following possible redirections. The point is just to have
# claimed_id change with them, because the redirections
# are followed automatically.
# We ignore redirections with relative paths.
# If any known provider uses them, file a bug report.
if($name == 'location' && $update_claimed_id) {
if(strpos($headers[$name], 'http') === 0) {
$this->identity = $this->claimed_id = $headers[$name];
} elseif($headers[$name][0] == '/') {
$parsed_url = parse_url($this->claimed_id);
$this->identity =
$this->claimed_id = $parsed_url['scheme'] . '://'
. $parsed_url['host']
. $headers[$name];
}
}
}
}
return $headers;
}
protected function request_streams($url, $method='GET', $params=array(), $update_claimed_id)
{
if(!$this->hostExists($url)) {
throw new ErrorException("Could not connect to $url.", 404);
}
if (empty($this->cnmatch)) {
$this->cnmatch = parse_url($url, PHP_URL_HOST);
}
$params = http_build_query($params, '', '&');
switch($method) {
case 'GET':
$opts = array(
'http' => array(
'method' => 'GET',
'header' => 'Accept: application/xrds+xml, */*',
'user_agent' => $this->user_agent,
'ignore_errors' => true,
),
'ssl' => array(
'CN_match' => $this->cnmatch
)
);
$url = $url . ($params ? '?' . $params : '');
if (!empty($this->proxy)) {
$opts['http']['proxy'] = $this->proxy_url();
}
break;
case 'POST':
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'user_agent' => $this->user_agent,
'content' => $params,
'ignore_errors' => true,
),
'ssl' => array(
'CN_match' => $this->cnmatch
)
);
if (!empty($this->proxy)) {
$opts['http']['proxy'] = $this->proxy_url();
}
break;
case 'HEAD':
// We want to send a HEAD request, but since get_headers() doesn't
// accept $context parameter, we have to change the defaults.
$default = stream_context_get_options(stream_context_get_default());
// PHP does not reset all options. Instead, it just sets the options
// available in the passed array, therefore set the defaults manually.
$default += array(
'http' => array(),
'ssl' => array()
);
$default['http'] += array(
'method' => 'GET',
'header' => '',
'user_agent' => '',
'ignore_errors' => false
);
$default['ssl'] += array(
'CN_match' => ''
);
$opts = array(
'http' => array(
'method' => 'HEAD',
'header' => 'Accept: application/xrds+xml, */*',
'user_agent' => $this->user_agent,
'ignore_errors' => true,
),
'ssl' => array(
'CN_match' => $this->cnmatch
)
);
// Enable validation of the SSL certificates.
if ($this->verify_peer) {
$default['ssl'] += array(
'verify_peer' => false,
'capath' => '',
'cafile' => ''
);
$opts['ssl'] += array(
'verify_peer' => true,
'capath' => $this->capath,
'cafile' => $this->cainfo
);
}
// Change the stream context options.
stream_context_get_default($opts);
$headers = get_headers($url . ($params ? '?' . $params : ''));
// Restore the stream context options.
stream_context_get_default($default);
if (!empty($headers)) {
if (intval(substr($headers[0], strlen('HTTP/1.1 '))) == 405) {
// The server doesn't support HEAD - emulate it with a GET.
$args = func_get_args();
$args[1] = 'GET';
call_user_func_array(array($this, 'request_streams'), $args);
$headers = $this->headers;
} else {
$headers = $this->parse_header_array($headers, $update_claimed_id);
}
} else {
$headers = array();
}
return $headers;
}
if ($this->verify_peer) {
$opts['ssl'] += array(
'verify_peer' => true,
'capath' => $this->capath,
'cafile' => $this->cainfo
);
}
$context = stream_context_create ($opts);
$data = file_get_contents($url, false, $context);
# This is a hack for providers who don't support HEAD requests.
# It just creates the headers array for the last request in $this->headers.
if(isset($http_response_header)) {
$this->headers = $this->parse_header_array($http_response_header, $update_claimed_id);
}
return $data;
}
protected function request($url, $method='GET', $params=array(), $update_claimed_id=false)
{
$use_curl = false;
if (function_exists('curl_init')) {
if (!$use_curl) {
# When allow_url_fopen is disabled, PHP streams will not work.
$use_curl = !ini_get('allow_url_fopen');
}
if (!$use_curl) {
# When there is no HTTPS wrapper, PHP streams cannott be used.
$use_curl = !in_array('https', stream_get_wrappers());
}
if (!$use_curl) {
# With open_basedir or safe_mode set, cURL can't follow redirects.
$use_curl = !(ini_get('safe_mode') || ini_get('open_basedir'));
}
}
return
$use_curl
? $this->request_curl($url, $method, $params, $update_claimed_id)
: $this->request_streams($url, $method, $params, $update_claimed_id);
}
protected function proxy_url()
{
$result = '';
if (!empty($this->proxy)) {
$result = $this->proxy['host'];
if (!empty($this->proxy['port'])) {
$result = $result . ':' . $this->proxy['port'];
}
if (!empty($this->proxy['user'])) {
$result = $this->proxy['user'] . ':' . $this->proxy['pass'] . '@' . $result;
}
$result = 'http://' . $result;
}
return $result;
}
protected function build_url($url, $parts)
{
if (isset($url['query'], $parts['query'])) {
$parts['query'] = $url['query'] . '&' . $parts['query'];
}
$url = $parts + $url;
$url = $url['scheme'] . '://'
. (empty($url['username'])?''
:(empty($url['password'])? "{$url['username']}@"
:"{$url['username']}:{$url['password']}@"))
. $url['host']
. (empty($url['port'])?'':":{$url['port']}")
. (empty($url['path'])?'':$url['path'])
. (empty($url['query'])?'':"?{$url['query']}")
. (empty($url['fragment'])?'':"#{$url['fragment']}");
return $url;
}
/**
* Helper function used to scan for <meta>/<link> tags and extract information
* from them
*/
protected function htmlTag($content, $tag, $attrName, $attrValue, $valueName)
{
preg_match_all("#<{$tag}[^>]*$attrName=['\"].*?$attrValue.*?['\"][^>]*$valueName=['\"](.+?)['\"][^>]*/?>#i", $content, $matches1);
preg_match_all("#<{$tag}[^>]*$valueName=['\"](.+?)['\"][^>]*$attrName=['\"].*?$attrValue.*?['\"][^>]*/?>#i", $content, $matches2);
$result = array_merge($matches1[1], $matches2[1]);
return empty($result)?false:$result[0];
}
/**
* Performs Yadis and HTML discovery. Normally not used.
* @param $url Identity URL.
* @return String OP Endpoint (i.e. OpenID provider address).
* @throws ErrorException
*/
function discover($url)
{
if (!$url) throw new ErrorException('No identity supplied.');
# Use xri.net proxy to resolve i-name identities
if (!preg_match('#^https?:#', $url)) {
$url = "https://xri.net/$url";
}
# We save the original url in case of Yadis discovery failure.
# It can happen when we'll be lead to an XRDS document
# which does not have any OpenID2 services.
$originalUrl = $url;
# A flag to disable yadis discovery in case of failure in headers.
$yadis = true;
# Allows optional regex replacement of the URL, e.g. to use Google Apps
# as an OpenID provider without setting up XRDS on the domain hosting.
if (!is_null($this->xrds_override_pattern) && !is_null($this->xrds_override_replacement)) {
$url = preg_replace($this->xrds_override_pattern, $this->xrds_override_replacement, $url);
}
# We'll jump a maximum of 5 times, to avoid endless redirections.
for ($i = 0; $i < 5; $i ++) {
if ($yadis) {
$headers = $this->request($url, 'HEAD', array(), true);
$next = false;
if (isset($headers['x-xrds-location'])) {
$url = $this->build_url(parse_url($url), parse_url(trim($headers['x-xrds-location'])));
$next = true;
}
if (isset($headers['content-type']) && $this->is_allowed_type($headers['content-type'])) {
# Found an XRDS document, now let's find the server, and optionally delegate.
$content = $this->request($url, 'GET');
preg_match_all('#<Service.*?>(.*?)</Service>#s', $content, $m);
foreach($m[1] as $content) {
$content = ' ' . $content; # The space is added, so that strpos doesn't return 0.
# OpenID 2
$ns = preg_quote('http://specs.openid.net/auth/2.0/', '#');
if(preg_match('#<Type>\s*'.$ns.'(server|signon)\s*</Type>#s', $content, $type)) {
if ($type[1] == 'server') $this->identifier_select = true;
preg_match('#<URI.*?>(.*)</URI>#', $content, $server);
preg_match('#<(Local|Canonical)ID>(.*)</\1ID>#', $content, $delegate);
if (empty($server)) {
return false;
}
# Does the server advertise support for either AX or SREG?
$this->ax = (bool) strpos($content, '<Type>http://openid.net/srv/ax/1.0</Type>');
$this->sreg = strpos($content, '<Type>http://openid.net/sreg/1.0</Type>')
|| strpos($content, '<Type>http://openid.net/extensions/sreg/1.1</Type>');
$server = $server[1];
if (isset($delegate[2])) $this->identity = trim($delegate[2]);
$this->version = 2;
$this->server = $server;
return $server;
}
# OpenID 1.1
$ns = preg_quote('http://openid.net/signon/1.1', '#');
if (preg_match('#<Type>\s*'.$ns.'\s*</Type>#s', $content)) {
preg_match('#<URI.*?>(.*)</URI>#', $content, $server);
preg_match('#<.*?Delegate>(.*)</.*?Delegate>#', $content, $delegate);
if (empty($server)) {
return false;
}
# AX can be used only with OpenID 2.0, so checking only SREG
$this->sreg = strpos($content, '<Type>http://openid.net/sreg/1.0</Type>')
|| strpos($content, '<Type>http://openid.net/extensions/sreg/1.1</Type>');
$server = $server[1];
if (isset($delegate[1])) $this->identity = $delegate[1];
$this->version = 1;
$this->server = $server;
return $server;
}
}
$next = true;
$yadis = false;
$url = $originalUrl;
$content = null;
break;
}
if ($next) continue;
# There are no relevant information in headers, so we search the body.
$content = $this->request($url, 'GET', array(), true);
if (isset($this->headers['x-xrds-location'])) {
$url = $this->build_url(parse_url($url), parse_url(trim($this->headers['x-xrds-location'])));
continue;
}
$location = $this->htmlTag($content, 'meta', 'http-equiv', 'X-XRDS-Location', 'content');
if ($location) {
$url = $this->build_url(parse_url($url), parse_url($location));
continue;
}
}
if (!$content) $content = $this->request($url, 'GET');
# At this point, the YADIS Discovery has failed, so we'll switch
# to openid2 HTML discovery, then fallback to openid 1.1 discovery.
$server = $this->htmlTag($content, 'link', 'rel', 'openid2.provider', 'href');
$delegate = $this->htmlTag($content, 'link', 'rel', 'openid2.local_id', 'href');
$this->version = 2;
if (!$server) {
# The same with openid 1.1
$server = $this->htmlTag($content, 'link', 'rel', 'openid.server', 'href');
$delegate = $this->htmlTag($content, 'link', 'rel', 'openid.delegate', 'href');
$this->version = 1;
}
if ($server) {
# We found an OpenID2 OP Endpoint
if ($delegate) {
# We have also found an OP-Local ID.
$this->identity = $delegate;
}
$this->server = $server;
return $server;
}
throw new ErrorException("No OpenID Server found at $url", 404);
}
throw new ErrorException('Endless redirection!', 500);
}
protected function is_allowed_type($content_type) {
# Apparently, some providers return XRDS documents as text/html.
# While it is against the spec, allowing this here shouldn't break
# compatibility with anything.
$allowed_types = array('application/xrds+xml', 'text/xml');
# Only allow text/html content type for the Yahoo logins, since
# it might cause an endless redirection for the other providers.
if ($this->get_provider_name($this->claimed_id) == 'yahoo') {
$allowed_types[] = 'text/html';
}
foreach ($allowed_types as $type) {
if (strpos($content_type, $type) !== false) {
return true;
}
}
return false;
}
protected function get_provider_name($provider_url) {
$result = '';
if (!empty($provider_url)) {
$tokens = array_reverse(
explode('.', parse_url($provider_url, PHP_URL_HOST))
);
$result = strtolower(
(count($tokens) > 1 && strlen($tokens[1]) > 3)
? $tokens[1]
: (count($tokens) > 2 ? $tokens[2] : '')
);
}
return $result;
}
protected function sregParams()
{
$params = array();
# We always use SREG 1.1, even if the server is advertising only support for 1.0.
# That's because it's fully backwards compatible with 1.0, and some providers
# advertise 1.0 even if they accept only 1.1. One such provider is myopenid.com
$params['openid.ns.sreg'] = 'http://openid.net/extensions/sreg/1.1';
if ($this->required) {
$params['openid.sreg.required'] = array();
foreach ($this->required as $required) {
if (!isset(self::$ax_to_sreg[$required])) continue;
$params['openid.sreg.required'][] = self::$ax_to_sreg[$required];
}
$params['openid.sreg.required'] = implode(',', $params['openid.sreg.required']);
}
if ($this->optional) {
$params['openid.sreg.optional'] = array();
foreach ($this->optional as $optional) {
if (!isset(self::$ax_to_sreg[$optional])) continue;
$params['openid.sreg.optional'][] = self::$ax_to_sreg[$optional];
}
$params['openid.sreg.optional'] = implode(',', $params['openid.sreg.optional']);
}
return $params;
}
protected function axParams()
{
$params = array();
if ($this->required || $this->optional) {
$params['openid.ns.ax'] = 'http://openid.net/srv/ax/1.0';
$params['openid.ax.mode'] = 'fetch_request';
$this->aliases = array();
$counts = array();
$required = array();
$optional = array();
foreach (array('required','optional') as $type) {
foreach ($this->$type as $alias => $field) {
if (is_int($alias)) $alias = strtr($field, '/', '_');
$this->aliases[$alias] = 'http://axschema.org/' . $field;
if (empty($counts[$alias])) $counts[$alias] = 0;
$counts[$alias] += 1;
${$type}[] = $alias;
}
}
foreach ($this->aliases as $alias => $ns) {
$params['openid.ax.type.' . $alias] = $ns;
}
foreach ($counts as $alias => $count) {
if ($count == 1) continue;
$params['openid.ax.count.' . $alias] = $count;
}
# Don't send empty ax.required and ax.if_available.
# Google and possibly other providers refuse to support ax when one of these is empty.
if($required) {
$params['openid.ax.required'] = implode(',', $required);
}
if($optional) {
$params['openid.ax.if_available'] = implode(',', $optional);
}
}
return $params;
}
protected function authUrl_v1($immediate)
{
$returnUrl = $this->returnUrl;
# If we have an openid.delegate that is different from our claimed id,
# we need to somehow preserve the claimed id between requests.
# The simplest way is to just send it along with the return_to url.
if($this->identity != $this->claimed_id) {
$returnUrl .= (strpos($returnUrl, '?') ? '&' : '?') . 'openid.claimed_id=' . $this->claimed_id;
}
$params = array(
'openid.return_to' => $returnUrl,
'openid.mode' => $immediate ? 'checkid_immediate' : 'checkid_setup',
'openid.identity' => $this->identity,
'openid.trust_root' => $this->trustRoot,
) + $this->sregParams();
return $this->build_url(parse_url($this->server)
, array('query' => http_build_query($params, '', '&')));
}
protected function authUrl_v2($immediate)
{
$params = array(
'openid.ns' => 'http://specs.openid.net/auth/2.0',
'openid.mode' => $immediate ? 'checkid_immediate' : 'checkid_setup',
'openid.return_to' => $this->returnUrl,
'openid.realm' => $this->trustRoot,
);
if ($this->ax) {
$params += $this->axParams();
}
if ($this->sreg) {
$params += $this->sregParams();
}
if (!$this->ax && !$this->sreg) {
# If OP doesn't advertise either SREG, nor AX, let's send them both
# in worst case we don't get anything in return.
$params += $this->axParams() + $this->sregParams();
}
if (!empty($this->oauth) && is_array($this->oauth)) {
$params['openid.ns.oauth'] = 'http://specs.openid.net/extensions/oauth/1.0';
$params['openid.oauth.consumer'] = str_replace(array('http://', 'https://'), '', $this->trustRoot);
$params['openid.oauth.scope'] = implode(' ', $this->oauth);
}
if ($this->identifier_select) {
$params['openid.identity'] = $params['openid.claimed_id']
= 'http://specs.openid.net/auth/2.0/identifier_select';
} else {
$params['openid.identity'] = $this->identity;
$params['openid.claimed_id'] = $this->claimed_id;
}
return $this->build_url(parse_url($this->server)
, array('query' => http_build_query($params, '', '&')));
}
/**
* Returns authentication url. Usually, you want to redirect your user to it.
* @return String The authentication url.
* @param String $select_identifier Whether to request OP to select identity for an user in OpenID 2. Does not affect OpenID 1.
* @throws ErrorException
*/
function authUrl($immediate = false)
{
if ($this->setup_url && !$immediate) return $this->setup_url;
if (!$this->server) $this->discover($this->identity);
if ($this->version == 2) {
return $this->authUrl_v2($immediate);
}
return $this->authUrl_v1($immediate);
}
/**
* Performs OpenID verification with the OP.
* @return Bool Whether the verification was successful.
* @throws ErrorException
*/
function validate()
{
# If the request was using immediate mode, a failure may be reported
# by presenting user_setup_url (for 1.1) or reporting
# mode 'setup_needed' (for 2.0). Also catching all modes other than
# id_res, in order to avoid throwing errors.
if(isset($this->data['openid_user_setup_url'])) {
$this->setup_url = $this->data['openid_user_setup_url'];
return false;
}
if($this->mode != 'id_res') {
return false;
}
$this->claimed_id = isset($this->data['openid_claimed_id'])?$this->data['openid_claimed_id']:$this->data['openid_identity'];
$params = array(
'openid.assoc_handle' => $this->data['openid_assoc_handle'],
'openid.signed' => $this->data['openid_signed'],
'openid.sig' => $this->data['openid_sig'],
);
if (isset($this->data['openid_ns'])) {
# We're dealing with an OpenID 2.0 server, so let's set an ns
# Even though we should know location of the endpoint,
# we still need to verify it by discovery, so $server is not set here
$params['openid.ns'] = 'http://specs.openid.net/auth/2.0';
} elseif (isset($this->data['openid_claimed_id'])
&& $this->data['openid_claimed_id'] != $this->data['openid_identity']
) {
# If it's an OpenID 1 provider, and we've got claimed_id,
# we have to append it to the returnUrl, like authUrl_v1 does.
$this->returnUrl .= (strpos($this->returnUrl, '?') ? '&' : '?')
. 'openid.claimed_id=' . $this->claimed_id;
}
if ($this->data['openid_return_to'] != $this->returnUrl) {
# The return_to url must match the url of current request.
# I'm assuming that no one will set the returnUrl to something that doesn't make sense.
return false;
}
$server = $this->discover($this->claimed_id);
foreach (explode(',', $this->data['openid_signed']) as $item) {
# Checking whether magic_quotes_gpc is turned on, because
# the function may fail if it is. For example, when fetching
# AX namePerson, it might contain an apostrophe, which will be escaped.
# In such case, validation would fail, since we'd send different data than OP
# wants to verify. stripslashes() should solve that problem, but we can't
# use it when magic_quotes is off.
$value = $this->data['openid_' . str_replace('.','_',$item)];
$params['openid.' . $item] = function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() ? stripslashes($value) : $value;
}
$params['openid.mode'] = 'check_authentication';
$response = $this->request($server, 'POST', $params);
return preg_match('/is_valid\s*:\s*true/i', $response);
}
protected function getAxAttributes()
{
$result = array();
if ($alias = $this->getNamespaceAlias('http://openid.net/srv/ax/1.0', 'ax')) {
$prefix = 'openid_' . $alias;
$length = strlen('http://axschema.org/');
foreach (explode(',', $this->data['openid_signed']) as $key) {
$keyMatch = $alias . '.type.';
if (strncmp($key, $keyMatch, strlen($keyMatch)) !== 0) {
continue;
}
$key = substr($key, strlen($keyMatch));
$idv = $prefix . '_value_' . $key;
$idc = $prefix . '_count_' . $key;
$key = substr($this->getItem($prefix . '_type_' . $key), $length);
if (!empty($key)) {
if (($count = intval($this->getItem($idc))) > 0) {
$value = array();
for ($i = 1; $i <= $count; $i++) {
$value[] = $this->getItem($idv . '_' . $i);
}
$value = ($count == 1) ? reset($value) : $value;
} else {
$value = $this->getItem($idv);
}
if (!is_null($value)) {
$result[$key] = $value;
}
}
}
} else {
// No alias for the AX schema has been found,
// so there is no AX data in the OP's response.
}
return $result;
}
protected function getSregAttributes()
{
$attributes = array();
$sreg_to_ax = array_flip(self::$ax_to_sreg);
foreach (explode(',', $this->data['openid_signed']) as $key) {
$keyMatch = 'sreg.';
if (strncmp($key, $keyMatch, strlen($keyMatch)) !== 0) {
continue;
}
$key = substr($key, strlen($keyMatch));
if (!isset($sreg_to_ax[$key])) {
# The field name isn't part of the SREG spec, so we ignore it.
continue;
}
$attributes[$sreg_to_ax[$key]] = $this->data['openid_sreg_' . $key];
}
return $attributes;
}
/**
* Gets AX/SREG attributes provided by OP. should be used only after successful validation.
* Note that it does not guarantee that any of the required/optional parameters will be present,
* or that there will be no other attributes besides those specified.
* In other words. OP may provide whatever information it wants to.
* * SREG names will be mapped to AX names.
* * @return Array Array of attributes with keys being the AX schema names, e.g. 'contact/email'
* @see http://www.axschema.org/types/
*/
function getAttributes()
{
if (isset($this->data['openid_ns'])
&& $this->data['openid_ns'] == 'http://specs.openid.net/auth/2.0'
) { # OpenID 2.0
# We search for both AX and SREG attributes, with AX taking precedence.
return $this->getAxAttributes() + $this->getSregAttributes();
}
return $this->getSregAttributes();
}
/**
* Gets an OAuth request token if the OpenID+OAuth hybrid protocol has been used.
*
* In order to use the OpenID+OAuth hybrid protocol, you need to add at least one
* scope to the $openid->oauth array before you get the call to getAuthUrl(), e.g.:
* $openid->oauth[] = 'https://www.googleapis.com/auth/plus.me';
*
* Furthermore the registered consumer name must fit the OpenID realm.
* To register an OpenID consumer at Google use: https://www.google.com/accounts/ManageDomains
*
* @return string|bool OAuth request token on success, FALSE if no token was provided.
*/
function getOAuthRequestToken()
{
$alias = $this->getNamespaceAlias('http://specs.openid.net/extensions/oauth/1.0');
return !empty($alias) ? $this->data['openid_' . $alias . '_request_token'] : false;
}
/**
* Gets the alias for the specified namespace, if it's present.
*
* @param string $namespace The namespace for which an alias is needed.
* @param string $hint Common alias of this namespace, used for optimization.
* @return string|null The namespace alias if found, otherwise - NULL.
*/
private function getNamespaceAlias($namespace, $hint = null)
{
$result = null;
if (empty($hint) || $this->getItem('openid_ns_' . $hint) != $namespace) {
// The common alias is either undefined or points to
// some other extension - search for another alias..
$prefix = 'openid_ns_';
$length = strlen($prefix);
foreach ($this->data as $key => $val) {
if (strncmp($key, $prefix, $length) === 0 && $val === $namespace) {
$result = trim(substr($key, $length));
break;
}
}
} else {
$result = $hint;
}
return $result;
}
/**
* Gets an item from the $data array by the specified id.
*
* @param string $id The id of the desired item.
* @return string|null The item if found, otherwise - NULL.
*/
private function getItem($id)
{
return isset($this->data[$id]) ? $this->data[$id] : null;
}
}
================================================
FILE: app/ext/Modules.php
================================================
<?php
/**
* @author Anastasia Sidak <m0st1ce.nastya@gmail.com>
*
* @link https://steamcommunity.com/profiles/76561198038416053
* @link https://github.com/M0st1ce
*
* @license GNU General Public License Version 3
*/
namespace app\ext;
class Modules {
/**
* @since 0.2
* @var array
*/
public $array_modules = [];
/**
* @since 0.2
* @var int
*/
public $array_modules_count = 0;
/**
* @since 0.2
* @var int
*/
public $array_templates_count = 0;
/**
* @since 0.2
* @var array
*/
public $arr_module_init = [];
/**
* @since 0.2
* @var int
*/
public $arr_module_init_page_count = 0;
/**
* @since 0.2
* @var array
*/
public $arr_user_info = [];
/**
* @since 0.2
* @var array
*/
public $scan_modules = [];
/**
* @since 0.2
* @var array
*/
public $scan_templates = [];
/**
* @since 0.2
* @var array
*/
public $scan_ranks_pack = [];
/**
* @since 0.2
* @var array
*/
public $template_modules = [];
/**
* @since 0.2
* @var int
*/
public $array_ranks_pack_count = 0;
/**
* @since 0.2
* @var array
*/
public $actual_library = [];
/**
* @since 0.2
* @var array
*/
public $css_library = [];
/**
* @since 0.2
* @var array
*/
public $js_library = [];
/**
* @since 0.2
* @var string
*/
public $page_title = '';
/**
* @since 0.2
* @var string
*/
public $page_description = '';
/**
* @since 0.2
* @var string
*/
public $page_image = '';
/**
* @since 0.2
* @var object
*/
public $General;
/**
* @since 0.2.122
* @var object
*/
public $Translate;
/**
* @since 0.2.122
* @var object
*/
public $Notifications;
/**
* @since 0.2
* @var object
*/
public $Router;
/**
* @since 0.2
* @var string
*/
public $route;
/**
* Организация работы вэб-приложения с модулями.
*
* @param object $General
* @param object $Translate
* @param object $Notifications
*
* @since 0.2
*/
function __construct( $General, $Translate, $Notifications, $Router ) {
// Проверка на основную константу.
defined('IN_LR') != true && die();
$this->General = $General;
$this->Translate = $Translate;
$this->Notifications = $Notifications;
$this->Router = $Router;
//Проверка на iframe
(!empty($_GET['code']) && !empty($_GET['description'])) && exit(require PAGE_CUSTOM . '/error/index.php');
// Получение кэшированного списка модулей.
$this->array_modules = $this->get_arr_modules();
// Подсчёт количества модулей.
$this->array_modules_count = sizeof( $this->array_modules );
// Получение списка инициализвации модулей в определенном порядке.
$this->arr_module_init = $this->get_module_init();
$this->arr_module_init_page_count = sizeof( $this->arr_module_init['page'] );
// Получение кеша всех шаблонов
$this->arr_templates = $this->get_templates_init();
// Сканирование папки с модулями.
$this->scan_templates = array_diff( scandir( TEMPLATES, 1 ), array( '..', '.', 'disabled' ) );
$this->template_modules = $this->get_cache_template_modules();
// Сканирование дополнительных модулей в шаблоне
(file_exists(TEMPLATES . $General->arr_general['theme'] . '/modules/')) && $this->get_template_modules();
// Подсчёт количества модулей.
$this->array_templates_count = sizeof( $this->scan_templates );
//Добавление новых роутов
$this->AddRoutes();
// Тупо сохраняем пока
$match = $Router->match()['target'] ?? $Router->SearchRoute();
$this->route = ( strpos( $match, "?language=" ) !== false ) ? "home" : $match;
$basename = parse_url($General->arr_general['site'], PHP_URL_PATH);
(empty( $basename ) && empty( $this->route ) || $_SERVER['REQUEST_URI'] == '/' || $_SERVER['REQUEST_URI'] == $basename) && $this->route = 'home';
// Библиотека актуальности.
$this->actual_library = $this->get_actual_library();
isset( $_SESSION['user_admin'] ) && $this->check_actual_modules_list();
// Проверка JS файлов.
$this->check_generated_js();
// Проверка таблици стилей.
$this->check_generated_style();
// Сканирование и добавление новых шаблонов
$this->check_actual_templates();
// Проверка для роутера страниц
! empty( $checkroute ) && empty( $this->arr_module_init['page'][ $this->route ] ) && get_iframe( '009', 'Данная страница не существует' );
$_SESSION['page_redirect'] = $this->route;
$this->check_copy();
}
// Хз зачем я создал эту функцию, просто для получения кеша определенных модулей
public function get_cache_template_modules()
{
if(file_exists(SESSIONS . 'templates_modules_cache.php'))
return require SESSIONS . 'templates_modules_cache.php';
}
// Добавление стилей для каждого стиля модуля в шаблоне (Да, по тупому, да и похрен)
public function get_template_modules()
{
(!file_exists(TEMPLATES . $this->General->arr_general['theme'] . '/modules/')) && die;
$scan = array_diff( scandir( TEMPLATES . $this->General->arr_general['theme'] . '/modules/', 1 ), array( '..', '.', 'disabled' ) );
if(!empty($scan) && $scan != array_keys($this->template_modules))
{
$result = [];
foreach ($scan as $key => $val)
{
if(file_exists(TEMPLATES . $this->General->arr_general['theme'] . '/modules/' . $scan[ $key ] . '/dop.css'))
$result[ $scan[ $key ] ]['css'] = 1;
if(file_exists(TEMPLATES . $this->General->arr_general['theme'] . '/modules/' . $scan[ $key ] . '/dop.js'))
$result[ $scan[ $key ] ]['js'] = 1;
}
file_put_contents( SESSIONS . 'templates_modules_cache.php', '<?php return '.var_export_min( $result ).";" );
$this->template_modules = $result;
return $result;
}
return $this->template_modules;
}
// Добавление шаблонов в отдельное кеширование
public function get_templates_init()
{
if(!file_exists(SESSIONS . 'templates_cache.php'))
{
$scan = array_diff( scandir( TEMPLATES, 1 ), array( '..', '.', 'disabled' ) );
if( sizeof($scan) != 0 )
{
foreach ($scan as $key => $val)
{
$result[ $scan[ $key ] ] = json_decode( file_get_contents( TEMPLATES . $scan[ $key ] . '/description.json') , true);
}
}
// Создание/редактирование кэша шаблона.
file_put_contents( SESSIONS . 'templates_cache.php', '<?php return '.var_export_min( $result ).";" );
return $result;
}
return require SESSIONS . 'templates_cache.php';
}
//Добавление роутов исходя из модулей
public function AddRoutes()
{
//Цикл для добавления роутов исходя из страниц модулей
foreach ($this->arr_module_init['page'] as $key => $val)
$this->Router->map('GET', '/'.$key.'/', $key, $key);
return;
}
/**
* Получить библиотеку актуальных данных.
*
* @since 0.2.122
*
* @return array Актуальная информация.
*/
public function get_actual_library() {
if( file_exists( SESSIONS . '/actual_library.json' ) ):
return json_decode( file_get_contents( SESSIONS . '/actual_library.json') , true );
else:
$actual = ['actual_css_ver' => 0, 'actual_js_ver' => 0, 'actual_modules_count' => 0];
file_put_contents( SESSIONS . '/actual_library.json', json_encode( $actual ) );
return $actual;
endif;
}
/**
* Проверка на актуальный список модулей.
*
* @since 0.3.0
*/
public function check_actual_templates()
{
$keys = array_keys($this->arr_templates);
$zalupka = array_values(array_diff($keys, $this->scan_templates));
$zalupka2 = array_values(array_diff($this->scan_templates, $keys));
if(!empty($zalupka) || !empty($zalupka2))
{
foreach (array_keys($this->arr_templates) as $val)
{
$search = array_search($val, $this->scan_templates);
if($this->scan_templates[$search] == $val)
{
$templates[] = $val;
}
else
{
$note[] = ['text' => $this->Translate->get_translate_phrase("_TemplateDeleted") . " {$val}", 'status' => 'error'];
}
}
// Проверка на модули, которых нет в оригинальном массиве, и их добавление в итоговый массив
foreach ($this->scan_templates as $val)
{
$search = array_search($val, array_keys($this->arr_templates));
if(array_keys($this->arr_templates)[$search] != $val)
{
$templates[] = $val;
$note[] = ['text' => $this->Translate->get_translate_phrase("_TemplateAdded") . " {$val}"];
}
}
for($i = 0; $i < sizeof( $templates ); $i++)
$result[ $templates[ $i ] ] = json_decode( file_get_contents( TEMPLATES . $templates[ $i ] . '/description.json') , true);
file_put_contents( SESSIONS . 'templates_cache.php', '<?php return '.var_export_min( $result ).";" );
if(!empty($note) && isset($_SESSION['user_admin']))
{
for($i = 0; $i < sizeof($note); $i++)
$this->General->sendNote($note[$i]['text'], $note[$i]['status'] ?? 'success', 3);
}
unlink(SESSIONS . 'templates_modules_cache.php');
$this->action_clear_style_cache();
header("Refresh:3");
}
}
/**
* Проверка на актуальный список модулей.
*
* @since 0.2.122
*/
public function check_actual_modules_list() {
// Сканирование папки с модулями.
$scan_modules = array_diff( scandir( MODULES, 1 ), array( '..', '.', 'disabled' ) );
$keys = array_keys($this->array_modules);
$zalupka = array_values(array_diff($scan_modules, $keys));
$zalupka2 = array_values(array_diff($keys, $scan_modules));
if(!empty($zalupka) || !empty($zalupka2)):
// Удаление тех модулей, которых нет в выборке из папки
foreach (array_keys($this->array_modules) as $val)
{
$search = array_search($val, $scan_modules);
if($scan_modules[$search] == $val)
{
$modules[] = $val;
}
else
{
$note[] = ['text' => $this->Translate->get_translate_phrase("_ModuleDeleted") . " {$val}", 'status' => 'error'];
}
}
// Проверка на модули, которых нет в оригинальном массиве, и их добавление в итоговый массив
foreach ($scan_modules as $val)
{
$search = array_search($val, array_keys($this->array_modules));
if(array_keys($this->array_modules)[$search] != $val)
{
$modules[] = $val;
$note[] = ['text' => $this->Translate->get_translate_phrase("_ModuleAdded") . " {$val}"];
}
}
for ( $i = 0, $c = sizeof( $modules ); $i < $c; $i++ ):
// Получение информации о модуле
$modules_desc[ $modules[ $i ] ] = json_decode( file_get_contents( MODULES . $modules[ $i ] . '/description.json') , true);
if ($modules_desc[ $modules[ $i ] ]['setting']['status'] == 1 && $modules_desc[ $modules[ $i ] ]['required']['php'] <= PHP_VERSION && $modules_desc[ $modules[ $i ] ]['required']['core'] <= VERSION && $modules_desc[ $modules[ $i ] ]['page'] != 'all'):
if( ! empty( $modules_desc[ $modules[ $i ] ]['setting']['interface'] ) && $modules_desc[ $modules[ $i ] ]['setting']['interface'] == 1 ):
$result['page'][ $modules_desc[ $modules[ $i ] ]['page'] ]['interface'][ empty( $modules_desc[ $modules[ $i ] ]['setting']['interface_adjacent'] ) ? 'afternavbar' : $modules_desc[ $modules[ $i ] ]['setting']['interface_adjacent'] ][] = $modules[ $i ];
endif;
if( ! empty( $modules_desc[ $modules[ $i ] ]['setting']['interface_always'] ) && $modules_desc[ $modules[ $i ] ]['setting']['interface_always'] == 1 ):
$result['interface_always'][ empty( $modules_desc[ $modules[ $i ] ]['setting']['interface_always_adjacent'] ) ? 'afternavbar' : $modules_desc[ $modules[ $i ] ]['setting']['interface_always_adjacent'] ][] = ['name' => $modules[ $i ] ] ;
endif;
! empty( $modules_desc[ $modules[ $i ] ]['setting']['data'] ) && $modules_desc[ $modules[ $i ] ]['setting']['data'] == 1 && $result['page'][ $modules_desc[ $modules[ $i ] ]['page'] ]['data'][] = $modules[ $i ];
! empty( $modules_desc[ $modules[ $i ] ]['setting']['data_always'] ) && $modules_desc[ $modules[ $i ] ]['setting']['data_always'] == 1 && $result['data_always'][] = $modules[ $i ];
! empty( $modules_desc[ $modules[ $i ] ]['setting']['js'] ) && $modules_desc[ $modules[ $i ] ]['setting']['js'] == 1 && $result['page'][ $modules_desc[ $modules[ $i ] ]['page'] ]['js'][] = ['name' => $modules[ $i ], 'type' => $modules_desc[ $modules[ $i ] ]['setting']['type']];
! empty( $modules_desc[ $modules[ $i ] ]['setting']['css'] ) && $modules_desc[ $modules[ $i ] ]['setting']['css'] == 1 && $result['page'][ $modules_desc[ $modules[ $i ] ]['page'] ]['css'][] = ['name' => $modules[ $i ], 'type' => $modules_desc[ $modules[ $i ] ]['setting']['type']];
! empty( $modules_desc[ $modules[ $i ] ]['sidebar'] ) && $result['sidebar'][] = $modules[ $i ];
endif;
endfor;
if(file_exists(SESSIONS . 'modules_initialization.php'))
{
$cache = require SESSIONS . 'modules_initialization.php';
if (! function_exists("array_key_last")) {
function array_key_last($array) {
if (!is_array($array) || empty($array)) {
return NULL;
}
return array_keys($array)[count($array)-1];
}
}
//Циклы на распределение в сайдбаре, и на главной
foreach ($result['sidebar'] as $key => $val)
{
$search = array_search($val, $cache['sidebar']);
if($cache['sidebar'][$search] == $val)
$res[$search] = $val;
else
$res[array_key_last($result['sidebar']) + sizeof($res) ?? 1] = $val;
}
foreach ($result['page']['home']['interface']['afternavbar'] as $key => $val)
{
$search = array_search($val, $cache['page']['home']['interface']['afternavbar']);
if($cache['page']['home']['interface']['afternavbar'][$search] == $val)
$restwo[$search] = $val;
else
$restwo[array_key_last($result['page']['home']['interface']['afternavbar']) + sizeof($restwo) ?? 1] = $val;
}
//Сортировка массивов по ключам
ksort($res);
ksort($restwo);
//Присваивание итоговому результату отсортированные массивы
$result['sidebar'] = array_values($res);
$result['page']['home']['interface']['afternavbar'] = array_values($restwo);
}
// Сохраняем наш файл с перебором модулей.
file_put_contents( SESSIONS . 'modules_initialization.php', '<?php return '.var_export_min( $result ).";\n" );
// Создание/редактирование кэша модулей.
file_put_contents( SESSIONS . 'modules_cache.php', '<?php return '.var_export_min( $modules_desc ).";" );
// Удаление, чтобы не мешал
unlink( SESSIONS . 'actual_library.json' );
// Удаляем так же переводы, а то че они, нахер пусть уходят
unlink( SESSIONS . 'translator_cache.php' );
// Высылает уведомления админам
if(!empty($note) && isset($_SESSION['user_admin']))
{
for($i = 0; $i < sizeof($note); $i++)
$this->General->sendNote($note[$i]['text'], $note[$i]['status'] ?? 'success', 3);
}
$this->action_clear_style_cache();
header("Refresh:3");
endif;
}
/**
* Полностью очистить кэш вэб-приложения включая кэш модулей.
*/
function action_clear_style_cache() {
// Ссылки на кэшируемые файлы.
$cache_files = [
'css_cache' => ASSETS_CSS . '/generation/style_generated.min.ver.' . $this->actual_library['actual_css_ver'] . '.css',
'js_cache' => ASSETS_JS . '/generation/app_generated.min.ver.' . $this->actual_library['actual_js_ver'] . '.js',
];
// Удаляем файл с генерируемыми стилями.
file_exists( $cache_files['css_cache'] ) && unlink( $cache_files['css_cache'] );
// Удаляем файл с генерируемыми JS библиотекой.
file_exists( $cache_files['js_cache'] ) && unlink( $cache_files['js_cache'] );
}
private function check_copy()
{
$get = file_get_contents_fix(PAGE . "footer.php");
if(!strpos($get, "levels-ranks-web"))
exit(get_iframe("Ой", 'Удалять копирайты нельзя!'));
}
/**
* Инициализация модулей.
*
* @since 0.2
*
* @return array Возвращает список модулей для инициализации.
*/
public function get_module_init() {
// При отсутствии списока модулей для дальнейшей инициализации, выполняется создание данного списка.
if ( ! file_exists( SESSIONS . 'modules_initialization.php' ) ):
$result = [];
for ( $i = 0; $i < $this->array_modules_count; $i++ ):
// Перебором забираем корневое название модуля.
$module = array_keys( $this->array_modules )[ $i ];
if (
$this->array_modules[ $module ]['setting']['status'] == 1
&& $this->array_modules[ $module ]['required']['php'] <= PHP_VERSION
&& $this->array_modules[ $module ]['required']['core'] <= VERSION
&& $this->array_modules[ $module ]['page'] != 'all'
):
if( ! empty( $this->array_modules[ $module ]['setting']['interface'] ) && $this->array_modules[ $module ]['setting']['interface'] == 1 ):
$result['page'][ $this->array_modules[ $module ]['page'] ]['interface'][ empty( $this->array_modules[ $module ]['setting']['interface_adjacent'] ) ? 'afternavbar' : $this->array_modules[ $module ]['setting']['interface_adjacent'] ][] = $module;
endif;
if( ! empty( $this->array_modules[ $module ]['setting']['interface_always'] ) && $this->array_modules[ $module ]['setting']['interface_always'] == 1 ):
$result['interface_always'][ empty( $this->array_modules[ $module ]['setting']['interface_always_adjacent'] ) ? 'afternavbar' : $this->array_modules[ $module ]['setting']['interface_always_adjacent'] ][] = ['name' => $module ] ;
endif;
! empty( $this->array_modules[ $module ]['setting']['data'] ) && $this->array_modules[ $module ]['setting']['data'] == 1 && $result['page'][ $this->array_modules[ $module ]['page'] ]['data'][] = $module;
! empty( $this->array_modules[ $module ]['setting']['data_always'] ) && $this->array_modules[ $module ]['setting']['data_always'] == 1 && $result['data_always'][] = $module;
! empty( $this->array_modules[ $module ]['setting']['js'] ) && $this->array_modules[ $module ]['setting']['js'] == 1 && $result['page'][ $this->array_modules[ $module ]['page'] ]['js'][] = ['name' => $module, 'type' => $this->array_modules[ $module ]['setting']['type']];
! empty( $this->array_modules[ $module ]['setting']['css'] ) && $this->array_modules[ $module ]['setting']['css'] == 1 && $result['page'][ $this->array_modules[ $module ]['page'] ]['css'][] = ['name' => $module, 'type' => $this->array_modules[ $module ]['setting']['type']];
! empty( $this->array_modules[ $module ]['sidebar'] ) && $result['sidebar'][] = $module;
endif;
endfor;
for ( $i2 = 0; $i2 < $c = sizeof( $result['page'] ); $i2++ ):
// Перебором заб
gitextract_93895nac/
├── .github/
│ └── FUNDING.yml
├── .htaccess
├── LICENSE
├── README.md
├── app/
│ ├── ext/
│ │ ├── AltoRouter.php
│ │ ├── Auth.php
│ │ ├── Db.php
│ │ ├── ErrorsHandler.php
│ │ ├── General.php
│ │ ├── Graphics.php
│ │ ├── LightOpenID.php
│ │ ├── Modules.php
│ │ ├── Notifications.php
│ │ ├── Pdox.php
│ │ ├── PdoxInterface.php
│ │ └── Translate.php
│ ├── includes/
│ │ ├── auth/
│ │ │ └── steam.php
│ │ ├── functions.php
│ │ └── js_controller.php
│ ├── logs/
│ │ └── 1.txt
│ ├── modules/
│ │ ├── disabled/
│ │ │ ├── module_block_main_bans_and_comms/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ ├── module_block_main_sb_stats/
│ │ │ │ ├── assets/
│ │ │ │ │ └── css/
│ │ │ │ │ └── 1.css
│ │ │ │ ├── description.json
│ │ │ │ ├── forward/
│ │ │ │ │ ├── data.php
│ │ │ │ │ └── interface.php
│ │ │ │ └── translation.json
│ │ │ ├── module_block_snow/
│ │ │ │ ├── assets/
│ │ │ │ │ └── js/
│ │ │ │ │ ├── 1.js
│ │ │ │ │ └── 2.js
│ │ │ │ └── description.json
│ │ │ ├── module_page_admins/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ ├── data_always.php
│ │ │ │ └── interface.php
│ │ │ ├── module_page_bans/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ ├── data_always.php
│ │ │ │ └── interface.php
│ │ │ ├── module_page_comms/
│ │ │ │ ├── description.json
│ │ │ │ └── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ ├── module_page_lk_impulse/
│ │ │ │ ├── assets/
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── 1.css
│ │ │ │ │ └── js/
│ │ │ │ │ └── 1.js
│ │ │ │ ├── description.json
│ │ │ │ ├── ext/
│ │ │ │ │ ├── Basefunction.php
│ │ │ │ │ ├── Freekassa.php
│ │ │ │ │ ├── Interkassa.php
│ │ │ │ │ ├── Lk_module.php
│ │ │ │ │ ├── Paypal.php
│ │ │ │ │ ├── Paysera.php
│ │ │ │ │ ├── Qiwi.php
│ │ │ │ │ ├── Robokassa.php
│ │ │ │ │ ├── Unitpay.php
│ │ │ │ │ ├── WebToPay.php
│ │ │ │ │ ├── Webmoney.php
│ │ │ │ │ └── Yandexmoney.php
│ │ │ │ ├── forward/
│ │ │ │ │ ├── data.php
│ │ │ │ │ └── interface.php
│ │ │ │ ├── includes/
│ │ │ │ │ ├── gateways.php
│ │ │ │ │ ├── install.php
│ │ │ │ │ ├── logs.php
│ │ │ │ │ ├── payments.php
│ │ │ │ │ ├── promocodes.php
│ │ │ │ │ ├── result.php
│ │ │ │ │ ├── search.php
│ │ │ │ │ ├── users.php
│ │ │ │ │ └── zalupas.php
│ │ │ │ └── translation.json
│ │ │ └── module_page_lk_top/
│ │ │ ├── description.json
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── translation.json
│ │ ├── module_block_main_servers_monitoring/
│ │ │ ├── assets/
│ │ │ │ ├── css/
│ │ │ │ │ ├── 1.css
│ │ │ │ │ ├── 2.css
│ │ │ │ │ ├── 3.css
│ │ │ │ │ └── 4.css
│ │ │ │ └── js/
│ │ │ │ ├── 1.js
│ │ │ │ ├── 2.js
│ │ │ │ ├── 3.js
│ │ │ │ └── 4.js
│ │ │ ├── description.json
│ │ │ ├── ext/
│ │ │ │ ├── ServerInfo.php
│ │ │ │ └── SourceQuery/
│ │ │ │ ├── BaseSocket.php
│ │ │ │ ├── Buffer.php
│ │ │ │ ├── Exception/
│ │ │ │ │ ├── AuthenticationException.php
│ │ │ │ │ ├── InvalidArgumentException.php
│ │ │ │ │ ├── InvalidPacketException.php
│ │ │ │ │ ├── SocketException.php
│ │ │ │ │ └── SourceQueryException.php
│ │ │ │ ├── GoldSourceRcon.php
│ │ │ │ ├── Socket.php
│ │ │ │ ├── SourceQuery.php
│ │ │ │ ├── SourceRcon.php
│ │ │ │ └── bootstrap.php
│ │ │ ├── forward/
│ │ │ │ └── interface.php
│ │ │ ├── includes/
│ │ │ │ └── js_controller.php
│ │ │ └── translation.json
│ │ ├── module_block_main_stats/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ ├── 1.css
│ │ │ │ └── 2.css
│ │ │ ├── description.json
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── translation.json
│ │ ├── module_block_main_top/
│ │ │ ├── description.json
│ │ │ └── forward/
│ │ │ ├── data.php
│ │ │ └── interface.php
│ │ ├── module_page_adminpanel/
│ │ │ ├── assets/
│ │ │ │ ├── css/
│ │ │ │ │ └── 1.css
│ │ │ │ └── js/
│ │ │ │ └── 1.js
│ │ │ ├── description.json
│ │ │ ├── ext/
│ │ │ │ └── Admin.php
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ ├── data_always.php
│ │ │ │ └── interface.php
│ │ │ ├── includes/
│ │ │ │ ├── controller.php
│ │ │ │ ├── db.php
│ │ │ │ ├── general.php
│ │ │ │ ├── modules.php
│ │ │ │ ├── servers.php
│ │ │ │ ├── stats.php
│ │ │ │ └── web.php
│ │ │ └── translation.json
│ │ ├── module_page_profiles/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ └── 1.css
│ │ │ ├── description.json
│ │ │ ├── ext/
│ │ │ │ └── Player.php
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── translation.json
│ │ ├── module_page_rankstats/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ └── 1.css
│ │ │ ├── description.json
│ │ │ ├── forward/
│ │ │ │ ├── data.php
│ │ │ │ └── interface.php
│ │ │ └── temp/
│ │ │ └── cache.php
│ │ ├── module_page_toppoints/
│ │ │ ├── description.json
│ │ │ └── forward/
│ │ │ ├── data.php
│ │ │ └── interface.php
│ │ └── module_sidebar_social/
│ │ └── description.json
│ ├── page/
│ │ ├── custom/
│ │ │ ├── error/
│ │ │ │ └── index.php
│ │ │ └── install/
│ │ │ ├── assets/
│ │ │ │ └── css/
│ │ │ │ └── style.css
│ │ │ ├── includes/
│ │ │ │ └── options/
│ │ │ │ ├── admin_no_steam.php
│ │ │ │ ├── admin_steam.php
│ │ │ │ ├── animations.php
│ │ │ │ ├── badge_type.php
│ │ │ │ ├── db.php
│ │ │ │ ├── form_border.php
│ │ │ │ ├── language.php
│ │ │ │ ├── name.php
│ │ │ │ ├── sidebar.php
│ │ │ │ └── webkey.php
│ │ │ └── index.php
│ │ └── general/
│ │ ├── footer.php
│ │ └── head.php
│ └── templates/
│ ├── default/
│ │ ├── assets/
│ │ │ ├── css/
│ │ │ │ ├── css_library/
│ │ │ │ │ ├── animations/
│ │ │ │ │ │ └── 1.css
│ │ │ │ │ ├── badge_type/
│ │ │ │ │ │ ├── 1.css
│ │ │ │ │ │ └── 2.css
│ │ │ │ │ └── form_border/
│ │ │ │ │ ├── 0.css
│ │ │ │ │ └── 1.css
│ │ │ │ └── style.css
│ │ │ └── js/
│ │ │ └── app.js
│ │ ├── colors.json
│ │ ├── description.json
│ │ └── interface/
│ │ ├── head.php
│ │ ├── navbar.php
│ │ └── sidebar.php
│ ├── default_dark/
│ │ ├── assets/
│ │ │ ├── css/
│ │ │ │ ├── css_library/
│ │ │ │ │ ├── animations/
│ │ │ │ │ │ └── 1.css
│ │ │ │ │ ├── badge_type/
│ │ │ │ │ │ ├── 1.css
│ │ │ │ │ │ └── 2.css
│ │ │ │ │ └── form_border/
│ │ │ │ │ ├── 0.css
│ │ │ │ │ └── 1.css
│ │ │ │ └── style.css
│ │ │ └── js/
│ │ │ └── app.js
│ │ ├── colors.json
│ │ ├── description.json
│ │ └── interface/
│ │ ├── container.php
│ │ ├── head.php
│ │ ├── navbar.php
│ │ └── sidebar.php
│ └── default_navbar/
│ ├── assets/
│ │ ├── css/
│ │ │ ├── css_library/
│ │ │ │ ├── animations/
│ │ │ │ │ └── 1.css
│ │ │ │ ├── badge_type/
│ │ │ │ │ ├── 1.css
│ │ │ │ │ └── 2.css
│ │ │ │ └── form_border/
│ │ │ │ ├── 0.css
│ │ │ │ └── 1.css
│ │ │ └── style.css
│ │ └── js/
│ │ └── app.js
│ ├── colors.json
│ ├── description.json
│ └── interface/
│ ├── head.php
│ ├── navbar.php
│ └── sidebar.php
├── index.php
└── storage/
├── assets/
│ ├── css/
│ │ ├── style.css
│ │ └── vendors/
│ │ └── material-design-iconic-font/
│ │ └── css/
│ │ └── material-design-iconic-font.css
│ └── js/
│ └── app.js
└── cache/
├── img/
│ ├── avatars/
│ │ └── 1.json
│ └── ranks/
│ ├── dangerzone/
│ │ ├── description.json
│ │ └── title.json
│ ├── default/
│ │ ├── description.json
│ │ └── title.json
│ ├── faceit/
│ │ ├── description.json
│ │ └── title.json
│ ├── gtixon/
│ │ ├── description.json
│ │ └── title.json
│ └── wingman/
│ ├── description.json
│ └── title.json
└── sessions/
├── languages.json
└── translator.php
SYMBOL INDEX (655 symbols across 48 files)
FILE: app/ext/AltoRouter.php
class AltoRouter (line 12) | class AltoRouter
method __construct (line 50) | public function __construct(array $routes = [], $basePath = '', array ...
method SearchRoute (line 58) | public function SearchRoute()
method getRoutes (line 71) | public function getRoutes()
method addRoutes (line 88) | public function addRoutes($routes)
method setBasePath (line 103) | public function setBasePath($basePath)
method addMatchTypes (line 113) | public function addMatchTypes(array $matchTypes)
method map (line 127) | public function map($method, $route, $target, $name = null)
method generate (line 152) | public function generate($routeName, array $params = [])
method match (line 196) | public function match($requestUrl = null, $requestMethod = null)
method compileRoute (line 276) | protected function compileRoute($route)
FILE: app/ext/Auth.php
class Auth (line 13) | class Auth {
method __construct (line 89) | function __construct( $General, $Db ) {
method checkTokenCol (line 131) | protected function checkTokenCol()
method cookieEnabled (line 146) | protected function cookieEnabled() : bool
method getUserToken (line 154) | public function getUserToken( string $token )
method authByCookie (line 167) | public function authByCookie()
method clearOldTokens (line 197) | public function clearOldTokens()
method generateToken (line 207) | public function generateToken()
method setUserToken (line 222) | protected function setUserToken( string $token, int $steamid64 )
method delToken (line 248) | public function delToken( string $steam )
method get_admins_list (line 260) | public function get_admins_list() {
method get_count_admins (line 271) | public function get_count_admins() {
method check_session_admin (line 280) | public function check_session_admin() {
method check_session (line 297) | public function check_session() {
method authorization_no_steam (line 308) | public function authorization_no_steam() {
method get_authorization_sidebar_data (line 352) | public function get_authorization_sidebar_data() {
FILE: app/ext/Db.php
class Db (line 14) | class Db {
method __construct (line 111) | public function __construct() {
method get_db_options (line 240) | private function get_db_options() {
method change_db (line 254) | public function change_db( $mod, $host, $user, $pass, $db_name, $table...
method get_new_connect (line 301) | private function get_new_connect($mod, $user_id, $db_id)
method inquiry (line 327) | public function inquiry( $mod, $user_id, $db_id, $sql, $params )
method query (line 363) | public function query( $mod, $user_id = 0, $db_id = 0, $sql = null, $p...
method queryNum (line 382) | public function queryNum( $mod, $user_id = 0, $db_id = 0, $sql = null,...
method queryAll (line 402) | public function queryAll( $mod, $user_id = 0, $db_id = 0, $sql = null,...
method query_all_key_pair (line 422) | public function query_all_key_pair( $mod, $user_id = 0, $db_id = 0, $s...
method queryColumn (line 442) | public function queryColumn( $mod, $user_id = 0, $db_id = 0, $sql = nu...
method queryOneColumn (line 462) | public function queryOneColumn( $mod, $user_id = 0, $db_id = 0, $sql =...
method mysql_column_search (line 482) | public function mysql_column_search( $mod, $user_id = 0, $db_id = 0, $...
method mysql_table_search (line 502) | public function mysql_table_search( $mod, $user_id = 0, $db_id = 0, $t...
method lastInsertId (line 522) | public function lastInsertId( $mod, $user_id = 0, $db_id = 0 )
method __destruct (line 536) | public function __destruct() {
FILE: app/ext/ErrorsHandler.php
class ErrorsHandler (line 5) | class ErrorsHandler
method fatal_handler (line 7) | public static function fatal_handler()
method return_error (line 16) | protected static function return_error( array $errors )
method error_handler (line 22) | public static function error_handler( $error_level, $error_message, $e...
method setErrors (line 57) | public function setErrors()
FILE: app/ext/General.php
class General (line 13) | class General {
method __construct (line 52) | function __construct( $Db ) {
method get_default_url_section (line 97) | public function get_default_url_section( $section, $default, $arr_true...
method getAvatar (line 112) | public function getAvatar( $profile, $type )
method checkAvatar (line 145) | public function checkAvatar( $profile, $type ) {
method checkName (line 170) | public function checkName( $profile )
method sendNote (line 183) | public function sendNote($text, $status, $time = 4.5)
method get_default_options (line 199) | public function get_default_options() {
method get_server_list (line 209) | public function get_server_list() {
method get_icon (line 224) | function get_icon( $group, $name, $category = null ) {
method get_js_relevance_avatar (line 238) | function get_js_relevance_avatar( $id, $type = 1 ) {
method get_client_ip_cdn (line 252) | public function get_client_ip_cdn()
method online_stats (line 260) | public function online_stats()
FILE: app/ext/Graphics.php
class Graphics (line 13) | class Graphics {
method __construct (line 69) | function __construct( $Translate, $General, $Modules, $Db, $Auth, $Not...
method get_css_background_image (line 141) | public function get_css_background_image() {
method get_css_sidebar_toggle (line 154) | public function get_css_sidebar_toggle() {
method get_css_sidebar_blur (line 167) | public function get_css_sidebar_blur() {
method get_css_blocks_blur (line 182) | public function get_css_blocks_blur() {
method get_css_graphics_container (line 200) | public function get_css_graphics_container() {
method get_css_color_palette (line 217) | public function get_css_color_palette() {
FILE: app/ext/LightOpenID.php
class LightOpenID (line 14) | class LightOpenID
method __construct (line 44) | function __construct($host, $proxy = null)
method __isset (line 59) | function __isset($name)
method __set (line 64) | function __set($name, $value)
method __get (line 96) | function __get($name)
method set_proxy (line 112) | function set_proxy($proxy)
method hostExists (line 144) | function hostExists($url)
method set_realm (line 159) | protected function set_realm($uri)
method get_realm_protocol (line 175) | protected function get_realm_protocol()
method request_curl (line 190) | protected function request_curl($url, $method='GET', $params=array(), ...
method parse_header_array (line 290) | protected function parse_header_array($array, $update_claimed_id)
method request_streams (line 320) | protected function request_streams($url, $method='GET', $params=array(...
method request (line 457) | protected function request($url, $method='GET', $params=array(), $upda...
method proxy_url (line 484) | protected function proxy_url()
method build_url (line 505) | protected function build_url($url, $parts)
method htmlTag (line 528) | protected function htmlTag($content, $tag, $attrName, $attrValue, $val...
method discover (line 543) | function discover($url)
method is_allowed_type (line 682) | protected function is_allowed_type($content_type) {
method get_provider_name (line 703) | protected function get_provider_name($provider_url) {
method sregParams (line 720) | protected function sregParams()
method axParams (line 747) | protected function axParams()
method authUrl_v1 (line 786) | protected function authUrl_v1($immediate)
method authUrl_v2 (line 807) | protected function authUrl_v2($immediate)
method authUrl (line 854) | function authUrl($immediate = false)
method validate (line 870) | function validate()
method getAxAttributes (line 932) | protected function getAxAttributes()
method getSregAttributes (line 978) | protected function getSregAttributes()
method getAttributes (line 1006) | function getAttributes()
method getOAuthRequestToken (line 1029) | function getOAuthRequestToken()
method getNamespaceAlias (line 1043) | private function getNamespaceAlias($namespace, $hint = null)
method getItem (line 1072) | private function getItem($id)
FILE: app/ext/Modules.php
class Modules (line 13) | class Modules {
method __construct (line 156) | function __construct( $General, $Translate, $Notifications, $Router ) {
method get_cache_template_modules (line 232) | public function get_cache_template_modules()
method get_template_modules (line 239) | public function get_template_modules()
method get_templates_init (line 266) | public function get_templates_init()
method AddRoutes (line 288) | public function AddRoutes()
method get_actual_library (line 304) | public function get_actual_library() {
method check_actual_templates (line 319) | public function check_actual_templates()
method check_actual_modules_list (line 375) | public function check_actual_modules_list() {
method action_clear_style_cache (line 499) | function action_clear_style_cache() {
method check_copy (line 513) | private function check_copy()
method get_module_init (line 527) | public function get_module_init() {
method get_module_cache (line 605) | public function get_module_cache( $module ) {
method set_module_cache (line 623) | public function set_module_cache( $module, $data ) {
method get_arr_modules (line 635) | public function get_arr_modules() {
method check_generated_style (line 666) | public function check_generated_style() {
method check_generated_js (line 744) | public function check_generated_js() {
method set_sidebar_select (line 802) | public function set_sidebar_select( $module_id, $array ) {
method set_user_info_text (line 818) | public function set_user_info_text( $text ) {
method set_page_title (line 829) | public function set_page_title( $text ) {
method get_page_title (line 840) | public function get_page_title() {
method set_page_description (line 851) | public function set_page_description( $text ) {
method get_page_description (line 862) | public function get_page_description() {
method set_page_image (line 873) | public function set_page_image( $text ) {
method get_page_image (line 884) | public function get_page_image() {
method action_css_compress (line 901) | public function action_css_compress( $files = [] ) {
method action_js_compress (line 924) | public function action_js_compress( $files = [] ) {
method action_time_exchange (line 943) | function action_time_exchange( $seconds, $type = 0 ) {
method get_balance (line 969) | public function get_balance()
FILE: app/ext/Notifications.php
class Notifications (line 13) | class Notifications {
method __construct (line 19) | function __construct( $Translate, $Db ) {
method SendNotification (line 43) | public function SendNotification( $steam, $text, $values_insert, $url,...
method NotificationsRender (line 63) | public function NotificationsRender() {
method NotificationsEach (line 120) | public function NotificationsEach( $view ) {
method NotificationUpdate (line 154) | public function NotificationUpdate($id) {
method NotificationDelete (line 162) | public function NotificationDelete() {
method GetAllNotifications (line 170) | public function GetAllNotifications() {
method MarkAllNotifications (line 179) | public function MarkAllNotifications() {
method debuggg (line 184) | public function debuggg(){
FILE: app/ext/Pdox.php
class Pdox (line 18) | class Pdox implements PdoxInterface
method __construct (line 87) | public function __construct($name, $user, $bd)
method table (line 118) | public function table($table)
method select (line 146) | public function select($fields)
method max (line 160) | public function max($field, $name = null)
method min (line 174) | public function min($field, $name = null)
method sum (line 188) | public function sum($field, $name = null)
method count (line 202) | public function count($field, $name = null)
method avg (line 216) | public function avg($field, $name = null)
method join (line 233) | public function join($table, $field1 = null, $op = null, $field2 = nul...
method innerJoin (line 257) | public function innerJoin($table, $field1, $op = '', $field2 = '')
method leftJoin (line 272) | public function leftJoin($table, $field1, $op = '', $field2 = '')
method rightJoin (line 287) | public function rightJoin($table, $field1, $op = '', $field2 = '')
method fullOuterJoin (line 302) | public function fullOuterJoin($table, $field1, $op = '', $field2 = '')
method leftOuterJoin (line 317) | public function leftOuterJoin($table, $field1, $op = '', $field2 = '')
method rightOuterJoin (line 332) | public function rightOuterJoin($table, $field1, $op = '', $field2 = '')
method where (line 348) | public function where($where, $op = null, $val = null, $type = '', $an...
method orWhere (line 396) | public function orWhere($where, $op = null, $val = null)
method notWhere (line 410) | public function notWhere($where, $op = null, $val = null)
method orNotWhere (line 424) | public function orNotWhere($where, $op = null, $val = null)
method whereNull (line 436) | public function whereNull($where)
method whereNotNull (line 451) | public function whereNotNull($where)
method grouped (line 466) | public function grouped(Closure $obj)
method in (line 483) | public function in($field, array $keys, $type = '', $andOr = 'AND')
method notIn (line 511) | public function notIn($field, array $keys)
method orIn (line 524) | public function orIn($field, array $keys)
method orNotIn (line 537) | public function orNotIn($field, array $keys)
method between (line 553) | public function between($field, $value1, $value2, $type = '', $andOr =...
method getQueryLast (line 568) | public function getQueryLast() {
method Translate (line 577) | public function Translate($str) {
method notBetween (line 591) | public function notBetween($field, $value1, $value2)
method orBetween (line 605) | public function orBetween($field, $value1, $value2)
method orNotBetween (line 619) | public function orNotBetween($field, $value1, $value2)
method like (line 634) | public function like($field, $data, $type = '', $andOr = 'AND')
method orLike (line 658) | public function orLike($field, $data)
method notLike (line 671) | public function notLike($field, $data)
method orNotLike (line 684) | public function orNotLike($field, $data)
method limit (line 697) | public function limit($limit, $limitEnd = null)
method offset (line 711) | public function offset($offset)
method pagination (line 724) | public function pagination($perPage, $page)
method orderBy (line 738) | public function orderBy($orderBy, $orderDir = null)
method groupBy (line 771) | public function groupBy($groupBy)
method having (line 785) | public function having($field, $op = null, $val = null)
method numRows (line 808) | public function numRows()
method insertId (line 816) | public function insertId()
method error (line 824) | public function error()
method get (line 843) | public function get($type = null, $argument = null)
method getAll (line 861) | public function getAll($type = null, $argument = null)
method insert (line 906) | public function insert(array $data, $type = false)
method update (line 943) | public function update(array $data, $type = false)
method delete (line 977) | public function delete($type = false)
method analyze (line 1007) | public function analyze()
method check (line 1015) | public function check()
method checksum (line 1023) | public function checksum()
method optimize (line 1031) | public function optimize()
method repair (line 1039) | public function repair()
method transaction (line 1047) | public function transaction()
method commit (line 1060) | public function commit()
method rollBack (line 1072) | public function rollBack()
method exec (line 1085) | public function exec()
method fetch (line 1107) | public function fetch($type = null, $argument = null, $all = false)
method fetchAll (line 1137) | public function fetchAll($type = null, $argument = null)
method query (line 1150) | public function query($query, $all = true, $type = null, $argument = n...
method escape (line 1227) | public function escape($data)
method cache (line 1237) | public function cache($time)
method queryCount (line 1247) | public function queryCount()
method getQuery (line 1255) | public function getQuery()
method __destruct (line 1263) | public function __destruct()
method reset (line 1271) | protected function reset()
method getFetchType (line 1296) | protected function getFetchType($type)
FILE: app/ext/PdoxInterface.php
type PdoxInterface (line 5) | interface PdoxInterface
method get (line 13) | public function get($type = null, $argument = null);
method getAll (line 21) | public function getAll($type = null, $argument = null);
method update (line 29) | public function update(array $data, $type = false);
method insert (line 37) | public function insert(array $data, $type = false);
method delete (line 44) | public function delete($type = false);
FILE: app/ext/Translate.php
class Translate (line 13) | class Translate {
method __construct (line 38) | function __construct() {
method create_translator_cache (line 56) | public function create_translator_cache() {
method translate (line 105) | public function translate($module_id, $phrase, $values = [])
method get_translate_phrase (line 128) | public function get_translate_phrase( $phrase, $group = '' ) {
method get_translate_module_phrase (line 156) | public function get_translate_module_phrase( $module_id, $phrase ) {
method get_arr_translate_module (line 173) | public function get_arr_translate_module( $module_id ) {
method get_arr_languages (line 184) | public function get_arr_languages() {
FILE: app/includes/functions.php
function file_get_contents_fix (line 20) | function file_get_contents_fix( $file ) {
function header_fix (line 31) | function header_fix( $url ) {
function refresh (line 48) | function refresh() {
function empty_check_out (line 63) | function empty_check_out( $i, $d = 0, $a = 0 ) {
function var_export_min (line 78) | function var_export_min($var, $return = true) {
function var_export_opt (line 101) | function var_export_opt( $var, $return = true ) {
function get_section (line 115) | function get_section( $section, $default ) {
function get_arr_size (line 128) | function get_arr_size( $arr ) {
function get_url (line 142) | function get_url( $type ) {
function set_url_section (line 165) | function set_url_section( $url, $command, $change ) {
function get_iframe (line 188) | function get_iframe( $code, $description, $die = true ) {
function action_text_trim (line 203) | function action_text_trim( $text, $max = 18 )
function GetCharBytes (line 225) | function GetCharBytes($symbol)
function action_text_clear (line 247) | function action_text_clear($text)
function action_text_clear_characters (line 261) | function action_text_clear_characters( $text ) {
function action_int_percent_of_all (line 275) | function action_int_percent_of_all( $int = 0, $all = 0 ) {
function action_text_clear_before_slash (line 293) | function action_text_clear_before_slash( $text ) {
function check_duplicate_files (line 307) | function check_duplicate_files( $file, $file_2 ) {
function con_steam32to64 (line 320) | function con_steam32to64( $id ) {
function con_steam32to3_int (line 340) | function con_steam32to3_int( $steamid32 ) {
function con_steam64to3_int (line 358) | function con_steam64to3_int( $steamid64 ) {
function con_steam3to64_int (line 375) | function con_steam3to64_int( $steamid3 ) {
function con_steam3to32_int (line 395) | function con_steam3to32_int( $steamid3, $else = 0 ) {
function con_steam64to32 (line 416) | function con_steam64to32( $steamid64 ) {
function LangValReplace (line 449) | function LangValReplace( $phares, $values=[] ) {
function action_array_keep_keys (line 469) | function action_array_keep_keys( $array, $keys ) {
function substr_unicode (line 491) | function substr_unicode( $str, $s, $l = null ) {
function dirToArray (line 504) | function dirToArray($dir) {
FILE: app/modules/disabled/module_block_snow/assets/js/1.js
function k (line 11) | function k(a,d){isNaN(d)&&(d=0);return Math.random()*a+d}
function x (line 11) | function x(){g.setTimeout(function(){a.start(!0)},20);a.events.remove(m?...
function y (line 11) | function y(){(!a.excludeMobile||!D)&&x();a.events.remove(g,"load",y)}
function c (line 13) | function c(b){g.setTimeout(b,1E3/(a.animationInterval||20))}
function d (line 13) | function d(a){return void 0!==h.style[a]?a:null}
function a (line 15) | function a(c){c=b.call(c);var d=c.length;e?(c[1]="on"+c[1],3<d&&c.pop())...
function d (line 15) | function d(a,b){var c=a.shift(),d=[f[b]];if(e)c[d](a[0],a[1]);else c[d]....
FILE: app/modules/disabled/module_block_snow/assets/js/2.js
function SnowStorm (line 19) | function SnowStorm() {
FILE: app/modules/disabled/module_page_lk_impulse/assets/js/1.js
function removeElem (line 103) | function removeElem(delElem, attribute, attributeName) {
function removeParam (line 122) | function removeParam(key) {
FILE: app/modules/disabled/module_page_lk_impulse/ext/Basefunction.php
class Basefunction (line 28) | class Basefunction{
method __construct (line 42) | public function __construct() {
method BChekGateway (line 58) | public function BChekGateway($gateway){
method BCheckPay (line 73) | public function BCheckPay($gateway){
method BCheckPlayer (line 89) | public function BCheckPlayer(){
method BCheckPromo (line 113) | public function BCheckPromo($gateway){
method BNotificationDiscord (line 133) | public function BNotificationDiscord($kassa){
method BUpdateBalancePlayer (line 233) | public function BUpdateBalancePlayer($steam,$summ){
method BUpdatePay (line 250) | public function BUpdatePay(){
method Decoder (line 265) | public function Decoder($string){
method LkAddLog (line 275) | public function LkAddLog($act, $log_value = []){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Freekassa.php
class Freekassa (line 15) | class Freekassa extends Basefunction{
method FKCheckIP (line 17) | public function FKCheckIP(){
method FKCheckSignature (line 28) | public function FKCheckSignature($post){
method FKProcessPay (line 41) | public function FKProcessPay($post){
method getIP (line 74) | protected function getIP(){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Interkassa.php
class Interkassa (line 15) | class Interkassa extends Basefunction{
method IKCheckSignature (line 17) | public function IKCheckSignature($post){
method IKProcessPay (line 35) | public function IKProcessPay($post){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Lk_module.php
class Lk_module (line 13) | class Lk_module{
method __construct (line 22) | public function __construct( $Translate, $Notifications, $General, $Mo...
method LkBalancePlayer (line 31) | public function LkBalancePlayer(){
method LkAllDonats (line 49) | public function LkAllDonats(){
method LkAllDonatsToPayGateway (line 58) | public function LkAllDonatsToPayGateway($system){
method LkLogs (line 66) | public function LkLogs(){
method LkLogContent (line 72) | public function LkLogContent($log){
method LkLogdelete (line 83) | public function LkLogdelete($log){
method LkDownloadLog (line 93) | public function LkDownloadLog($log){
method LkPromocodes (line 121) | public function LkPromocodes(){
method LkPromoCode (line 127) | public function LkPromoCode($id){
method LkDiscordData (line 134) | public function LkDiscordData(){
method LkGetAllGateways (line 140) | public function LkGetAllGateways(){
method LkGetGateway (line 146) | public function LkGetGateway($gateway){
method LkGetGatewaysOn (line 153) | public function LkGetGatewaysOn(){
method LkGetGatewayOn (line 158) | public function LkGetGatewayOn($gateway){
method LkGetUserData (line 164) | public function LkGetUserData($user){
method LkGetUserPays (line 174) | public function LkGetUserPays($user){
method LkGetAllPays (line 181) | public function LkGetAllPays(){
method LkGetAllPlayers (line 186) | public function LkGetAllPlayers($min, $max){
method UsersPageMax (line 193) | public function UsersPageMax($max){
method LkUsagePromo (line 201) | public function LkUsagePromo($promo){
method LkAddPromocode (line 208) | public function LkAddPromocode($post){
method LkEditPromocode (line 240) | public function LkEditPromocode($post){
method LkDeletePromocode (line 276) | public function LkDeletePromocode($post){
method LkAddDiscord (line 290) | public function LkAddDiscord($post){
method LkAddGateway (line 304) | public function LkAddGateway($post){
method LkEditGateway (line 316) | public function LkEditGateway($post){
method LkDeleteGateway (line 331) | public function LkDeleteGateway($post){
method LkNotExistGateway (line 341) | public function LkNotExistGateway($gateway){
method LkExistGatewayAdd (line 348) | protected function LkExistGatewayAdd($post){
method LKvalidateGatewayData (line 357) | protected function LKvalidateGatewayData($gateway, $post){
method status (line 424) | public function status($status){
method LkDelUsers (line 430) | public function LkDelUsers(){
method LkUpdateBalance (line 439) | public function LkUpdateBalance($post){
method LkCleanLogs (line 472) | public function LkCleanLogs(){
method LkLoadPlayerProfile (line 479) | public function LkLoadPlayerProfile($link, $type = 0){
method LkOnPayment (line 538) | public function LkOnPayment($post){
method setPay (line 564) | protected function setPay($post){
method checkPromo (line 654) | protected function checkPromo($promo,$sid){
method LkCalculatePromo (line 670) | public function LkCalculatePromo($promo,$steam,$amount){
method https (line 709) | public function https(){
method LKRegPay (line 715) | protected function LKRegPay($order,$post,$system){
method Encoder (line 726) | protected function Encoder($string){
method WM (line 731) | protected function WM($summ){
method LkConvertGatewayId (line 741) | protected function LkConvertGatewayId($gateway){
method LkConvertGatewayString (line 756) | protected function LkConvertGatewayString($id){
method message (line 771) | protected function message($text,$status){
method location (line 778) | protected function location($url){
method LKChart (line 785) | public function LKChart(){
method CurlSend (line 854) | public function CurlSend($url)
method SearchUser (line 862) | public function SearchUser($post){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Paypal.php
class Paypal (line 15) | class Paypal extends Basefunction{
method PPProcessPay (line 20) | public function PPProcessPay($post = ''){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Paysera.php
class Paysera (line 16) | class Paysera extends Basefunction{
FILE: app/modules/disabled/module_page_lk_impulse/ext/Qiwi.php
class Qiwi (line 15) | class Qiwi extends Basefunction{
method QProcessPay (line 17) | public function QProcessPay($post, $signature){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Robokassa.php
class Robokassa (line 15) | class Robokassa extends Basefunction{
method RBCheckSignature (line 17) | public function RBCheckSignature($post){
method RBProcessPay (line 30) | public function RBProcessPay($post){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Unitpay.php
class Unitpay (line 15) | class Unitpay extends Basefunction{
method payerUnit (line 17) | public function payerUnit($method,$params){
method getSignature (line 79) | public function getSignature($method, array $data, $secretKey) {
method hardReturnJson (line 88) | public function hardReturnJson( $arr ){
method CheckIP (line 94) | public function CheckIP(){
method getIP (line 105) | protected function getIP(){
FILE: app/modules/disabled/module_page_lk_impulse/ext/WebToPay.php
class WebToPay (line 35) | class WebToPay extends Basefunction {
method buildRequest (line 77) | public static function buildRequest($data) {
method redirectToPayment (line 103) | public static function redirectToPayment($data, $exit = false) {
method buildRepeatRequest (line 147) | public static function buildRepeatRequest($data) {
method getPaymentUrl (line 166) | public static function getPaymentUrl($language = 'LIT') {
method checkResponse (line 193) | public static function checkResponse($query, $userData = array()) {
method validateAndParseData (line 228) | public static function validateAndParseData(array $query, $projectId, ...
method smsAnswer (line 243) | public static function smsAnswer($userData) {
method getPaymentMethodList (line 282) | public static function getPaymentMethodList($projectId, $currency = 'E...
method log (line 294) | protected function log($type, $msg, $logfile) {
class WebToPayException (line 328) | class WebToPayException extends Exception {
method setField (line 395) | public function setField($fieldName) {
method getField (line 404) | public function getField() {
class WebToPay_PaymentMethodListProvider (line 413) | class WebToPay_PaymentMethodListProvider {
method __construct (line 448) | public function __construct(
method getPaymentMethodList (line 472) | public function getPaymentMethodList($currency) {
class WebToPay_RequestBuilder (line 493) | class WebToPay_RequestBuilder {
method __construct (line 524) | public function __construct(
method buildRequest (line 549) | public function buildRequest($data) {
method buildRequestUrlFromData (line 563) | public function buildRequestUrlFromData($data) {
method buildRepeatRequest (line 581) | public function buildRepeatRequest($orderId) {
method buildRepeatRequestUrlFromOrderId (line 595) | public function buildRepeatRequestUrlFromOrderId($orderId) {
method validateRequest (line 608) | protected function validateRequest($data, $specs) {
method createRequest (line 647) | protected function createRequest(array $request) {
method getRequestSpec (line 666) | protected static function getRequestSpec() {
class WebToPay_PaymentMethodCountry (line 695) | class WebToPay_PaymentMethodCountry {
method __construct (line 729) | public function __construct($countryCode, $titleTranslations, $default...
method setDefaultLanguage (line 744) | public function setDefaultLanguage($language) {
method getTitle (line 760) | public function getTitle($languageCode = null) {
method getDefaultLanguage (line 775) | public function getDefaultLanguage() {
method getCode (line 784) | public function getCode() {
method addGroup (line 797) | public function addGroup(WebToPay_PaymentMethodGroup $group) {
method getGroup (line 808) | public function getGroup($groupKey) {
method getGroups (line 817) | public function getGroups() {
method getPaymentMethods (line 826) | public function getPaymentMethods() {
method filterForAmount (line 842) | public function filterForAmount($amount, $currency) {
method filterForIban (line 860) | public function filterForIban($isIban = true) {
method isEmpty (line 876) | public function isEmpty() {
method fromXmlNode (line 885) | public function fromXmlNode($countryNode) {
method createGroup (line 904) | protected function createGroup($groupKey, array $translations = array(...
class WebToPay_Util (line 912) | class WebToPay_Util {
method decodeSafeUrlBase64 (line 922) | public function decodeSafeUrlBase64($encodedText) {
method encodeSafeUrlBase64 (line 934) | public function encodeSafeUrlBase64($text) {
method parseHttpQuery (line 945) | public function parseHttpQuery($query) {
method stripSlashesRecursively (line 961) | protected function stripSlashesRecursively($data) {
class WebToPay_Sign_SS2SignChecker (line 977) | class WebToPay_Sign_SS2SignChecker implements WebToPay_Sign_SignCheckerI...
method __construct (line 995) | public function __construct($publicKey, WebToPay_Util $util) {
method checkSign (line 1009) | public function checkSign(array $request) {
class WebToPay_Sign_SS1SignChecker (line 1023) | class WebToPay_Sign_SS1SignChecker implements WebToPay_Sign_SignCheckerI...
method __construct (line 1035) | public function __construct($projectPassword) {
method checkSign (line 1048) | public function checkSign(array $request) {
type WebToPay_Sign_SignCheckerInterface (line 1060) | interface WebToPay_Sign_SignCheckerInterface {
method checkSign (line 1069) | public function checkSign(array $request);
class WebToPay_UrlBuilder (line 1078) | class WebToPay_UrlBuilder {
method __construct (line 1101) | function __construct($configuration, $environment)
method buildForRequest (line 1115) | public function buildForRequest($request, $language = null) {
method buildForPaymentsMethodList (line 1126) | public function buildForPaymentsMethodList($projectId, $currency) {
method buildForSmsAnswer (line 1136) | public function buildForSmsAnswer() {
method buildForPublicKey (line 1146) | public function buildForPublicKey() {
method createUrlFromRequestAndLanguage (line 1157) | protected function createUrlFromRequestAndLanguage($request) {
method getPaymentUrl (line 1167) | public function getPaymentUrl() {
class WebToPay_Exception_Callback (line 1177) | class WebToPay_Exception_Callback extends WebToPayException {
class WebToPay_Exception_Configuration (line 1184) | class WebToPay_Exception_Configuration extends WebToPayException {
class WebToPay_Exception_Validation (line 1192) | class WebToPay_Exception_Validation extends WebToPayException {
method __construct (line 1194) | public function __construct($message, $code = 0, $field = null, Except...
class WebToPay_SmsAnswerSender (line 1205) | class WebToPay_SmsAnswerSender {
method __construct (line 1229) | public function __construct(
method sendAnswer (line 1248) | public function sendAnswer($smsId, $text) {
class WebToPay_PaymentMethodList (line 1267) | class WebToPay_PaymentMethodList {
method __construct (line 1311) | public function __construct($projectId, $currency, $defaultLanguage = ...
method setDefaultLanguage (line 1327) | public function setDefaultLanguage($language) {
method getDefaultLanguage (line 1340) | public function getDefaultLanguage() {
method getProjectId (line 1349) | public function getProjectId() {
method getCurrency (line 1358) | public function getCurrency() {
method isFiltered (line 1367) | public function isFiltered() {
method getCountries (line 1376) | public function getCountries() {
method addCountry (line 1388) | public function addCountry(WebToPay_PaymentMethodCountry $country) {
method getCountry (line 1399) | public function getCountry($countryCode) {
method filterForAmount (line 1415) | public function filterForAmount($amount, $currency) {
method fromXmlNode (line 1444) | public function fromXmlNode($xmlNode) {
method createCountry (line 1463) | protected function createCountry($countryCode, array $titleTranslation...
class WebToPay_WebClient (line 1471) | class WebToPay_WebClient {
method get (line 1484) | public function get($uri, array $queryData = array()) {
class WebToPay_CallbackValidator (line 1528) | class WebToPay_CallbackValidator {
method __construct (line 1552) | public function __construct($projectId, WebToPay_Sign_SignCheckerInter...
method validateAndParseData (line 1569) | public function validateAndParseData(array $requestData) {
method checkExpectedFields (line 1616) | public function checkExpectedFields(array $data, array $expected) {
class WebToPay_PaymentMethod (line 1631) | class WebToPay_PaymentMethod {
method __construct (line 1683) | public function __construct(
method setDefaultLanguage (line 1706) | public function setDefaultLanguage($language) {
method getDefaultLanguage (line 1716) | public function getDefaultLanguage() {
method getKey (line 1725) | public function getKey() {
method getLogoUrl (line 1737) | public function getLogoUrl($languageCode = null) {
method getTitle (line 1754) | public function getTitle($languageCode = null) {
method isAvailableForAmount (line 1775) | public function isAvailableForAmount($amount, $currency) {
method getMinAmountAsString (line 1793) | public function getMinAmountAsString() {
method getMaxAmountAsString (line 1802) | public function getMaxAmountAsString() {
method setIsIban (line 1811) | public function setIsIban($isIban) {
method isIban (line 1820) | public function isIban() {
method setBaseCurrency (line 1829) | public function setBaseCurrency($baseCurrency)
method getBaseCurrency (line 1839) | public function getBaseCurrency()
class WebToPay_PaymentMethodGroup (line 1850) | class WebToPay_PaymentMethodGroup {
method __construct (line 1886) | public function __construct($groupKey, array $translations = array(), ...
method setDefaultLanguage (line 1901) | public function setDefaultLanguage($language) {
method getDefaultLanguage (line 1914) | public function getDefaultLanguage() {
method getTitle (line 1926) | public function getTitle($languageCode = null) {
method getKey (line 1941) | public function getKey() {
method getPaymentMethods (line 1950) | public function getPaymentMethods() {
method addPaymentMethod (line 1964) | public function addPaymentMethod(WebToPay_PaymentMethod $paymentMethod) {
method getPaymentMethod (line 1975) | public function getPaymentMethod($key) {
method filterForAmount (line 1987) | public function filterForAmount($amount, $currency) {
method filterForIban (line 2004) | public function filterForIban($isIban = true) {
method isEmpty (line 2019) | public function isEmpty() {
method fromXmlNode (line 2028) | public function fromXmlNode($groupNode) {
method createPaymentMethod (line 2081) | protected function createPaymentMethod(
class WebToPay_Factory (line 2095) | class WebToPay_Factory {
method __construct (line 2179) | public function __construct(array $configuration = array()) {
method useSandbox (line 2191) | public function useSandbox($enableSandbox)
method getCallbackValidator (line 2208) | public function getCallbackValidator() {
method getRequestBuilder (line 2229) | public function getRequestBuilder() {
method getUrlBuilder (line 2250) | public function getUrlBuilder() {
method getSmsAnswerSender (line 2267) | public function getSmsAnswerSender() {
method getPaymentMethodListProvider (line 2288) | public function getPaymentMethodListProvider() {
method getSigner (line 2312) | protected function getSigner() {
method getWebClient (line 2340) | protected function getWebClient() {
method getUtil (line 2354) | protected function getUtil() {
FILE: app/modules/disabled/module_page_lk_impulse/ext/Webmoney.php
class Webmoney (line 15) | class Webmoney extends Basefunction{
method WBCheckPurse (line 17) | public function WBCheckPurse($post){
method WBCheckSignature (line 27) | public function WBCheckSignature($post){
method WBProcessPay (line 36) | public function WBProcessPay($post){
FILE: app/modules/disabled/module_page_lk_impulse/ext/Yandexmoney.php
class Yandexmoney (line 15) | class Yandexmoney extends Basefunction{
method YMCheckSignature (line 17) | public function YMCheckSignature($post){
method YMProcessPay (line 31) | public function YMProcessPay($post){
FILE: app/modules/module_block_main_servers_monitoring/assets/js/1.js
function get_players_data (line 46) | function get_players_data( i ) {
function close_modal (line 51) | function close_modal( i ) {
FILE: app/modules/module_block_main_servers_monitoring/assets/js/2.js
function get_players_data (line 42) | function get_players_data( i ) {
function close_modal (line 47) | function close_modal( i ) {
FILE: app/modules/module_block_main_servers_monitoring/assets/js/3.js
function get_players_data (line 47) | function get_players_data( i ) {
function close_modal (line 52) | function close_modal( i ) {
FILE: app/modules/module_block_main_servers_monitoring/assets/js/4.js
function get_players_data (line 54) | function get_players_data( i ) {
function close_modal (line 59) | function close_modal( i ) {
FILE: app/modules/module_block_main_servers_monitoring/ext/ServerInfo.php
class ServerInfo (line 12) | class ServerInfo
method __construct (line 24) | function __construct( $_IP_PORT, $_TIMEOUT = 5 )
method SI_BYTE (line 41) | protected function SI_BYTE( $_LEN )
method SI_STR (line 48) | protected function SI_STR( $_SB = 0, $_ME = ServerInfo::NB)
method SI_UK (line 62) | protected function SI_UK( $_STR, $_FT )
method Write (line 69) | protected function Write( $Header, $String = '' )
method Read (line 77) | protected function Read( $Length = 1400 )
method SI_Get_Server_Info (line 83) | protected function SI_Get_Server_Info()
method SI_Get_Server_Players (line 156) | protected function SI_Get_Server_Players()
method SI_Get (line 209) | public function SI_Get()
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/BaseSocket.php
class BaseSocket (line 26) | abstract class BaseSocket
method __destruct (line 36) | public function __destruct( )
method Close (line 41) | abstract public function Close( );
method Open (line 42) | abstract public function Open( $Address, $Port, $Timeout, $Engine );
method Write (line 43) | abstract public function Write( $Header, $String = '' );
method Read (line 44) | abstract public function Read( $Length = 1400 );
method ReadInternal (line 46) | protected function ReadInternal( Buffer $Buffer, $Length, $SherlockFun...
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Buffer.php
class Buffer (line 24) | class Buffer
method Set (line 44) | public function Set( $Buffer )
method Remaining (line 56) | public function Remaining( )
method Get (line 66) | public function Get( $Length = -1 )
method GetByte (line 94) | public function GetByte( )
method GetShort (line 102) | public function GetShort( )
method GetLong (line 117) | public function GetLong( )
method GetFloat (line 132) | public function GetFloat( )
method GetUnsignedLong (line 147) | public function GetUnsignedLong( )
method GetString (line 162) | public function GetString( )
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/AuthenticationException.php
class AuthenticationException (line 15) | class AuthenticationException extends SourceQueryException
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/InvalidArgumentException.php
class InvalidArgumentException (line 15) | class InvalidArgumentException extends SourceQueryException
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/InvalidPacketException.php
class InvalidPacketException (line 15) | class InvalidPacketException extends SourceQueryException
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/SocketException.php
class SocketException (line 15) | class SocketException extends SourceQueryException
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/SourceQueryException.php
class SourceQueryException (line 15) | abstract class SourceQueryException extends \Exception
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/GoldSourceRcon.php
class GoldSourceRcon (line 26) | class GoldSourceRcon
method __construct (line 38) | public function __construct( $Socket )
method Close (line 43) | public function Close( )
method Open (line 49) | public function Open( )
method Write (line 54) | public function Write( $Header, $String = '' )
method Read (line 67) | public function Read( $Length = 1400 )
method Command (line 118) | public function Command( $Command )
method Authorize (line 131) | public function Authorize( $Password )
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Socket.php
class Socket (line 26) | class Socket extends BaseSocket
method Close (line 28) | public function Close( )
method Open (line 38) | public function Open( $Address, $Port, $Timeout, $Engine )
method Write (line 56) | public function Write( $Header, $String = '' )
method Read (line 71) | public function Read( $Length = 1400 )
method Sherlock (line 81) | public function Sherlock( $Buffer, $Length )
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/SourceQuery.php
class SourceQuery (line 30) | class SourceQuery
method __construct (line 97) | public function __construct( $Socket = null )
method __destruct (line 102) | public function __destruct( )
method Connect (line 118) | public function Connect( $Address, $Port, $Timeout = 3, $Engine = self...
method SetUseOldGetChallengeMethod (line 139) | public function SetUseOldGetChallengeMethod( $Value )
method Disconnect (line 151) | public function Disconnect( )
method Ping (line 175) | public function Ping( )
method GetInfo (line 196) | public function GetInfo( )
method GetPlayers (line 375) | public function GetPlayers( )
method GetRules (line 421) | public function GetRules( )
method GetChallenge (line 462) | private function GetChallenge( $Header, $ExpectedResult )
method SetRconPassword (line 513) | public function SetRconPassword( $Password )
method Rcon (line 555) | public function Rcon( $Command )
FILE: app/modules/module_block_main_servers_monitoring/ext/SourceQuery/SourceRcon.php
class SourceRcon (line 28) | class SourceRcon
method __construct (line 39) | public function __construct( $Socket )
method Close (line 44) | public function Close( )
method Open (line 56) | public function Open( )
method Write (line 72) | public function Write( $Header, $String = '' )
method Read (line 84) | public function Read( )
method Command (line 124) | public function Command( $Command )
method Authorize (line 176) | public function Authorize( $Password )
FILE: app/modules/module_page_adminpanel/assets/js/1.js
function i (line 25) | function i(t, e) {
function delete_server (line 152) | function delete_server(element) {
function action_db_delete_table (line 162) | function action_db_delete_table(id,element) {
function addConection (line 173) | function addConection(){
function changeConnection (line 203) | function changeConnection(mod) {
function changeConnect (line 244) | function changeConnect(value){
function changeNameModule (line 253) | function changeNameModule(){
function show_hide_password (line 264) | function show_hide_password(target){
function change_shablon (line 275) | function change_shablon(id)
FILE: app/modules/module_page_adminpanel/ext/Admin.php
class Admin (line 14) | class Admin
method __construct (line 17) | function __construct( $General, $Modules, $Auth, $Db , $Translate) {
method ReloadPage (line 35) | function ReloadPage()
method clear_templates_cache (line 41) | public function clear_templates_cache()
method action_clear_all_cache (line 52) | function action_clear_all_cache() {
method GetArrModules (line 89) | public function GetArrModules()
method arr_k_last (line 109) | function arr_k_last($array) {
method action_clear_modules_initialization (line 120) | function action_clear_modules_initialization()
method edit_modules_initialization (line 184) | function edit_modules_initialization() {
method action_clear_translator_cache (line 202) | function action_clear_translator_cache() {
method edit_options (line 216) | function edit_options() {
method action_db_add_mods (line 240) | function action_db_add_mods() {
method action_db_add_connection (line 252) | function action_db_add_connection()
method action_add_server (line 361) | function action_add_server() {
method action_del_server (line 398) | function action_del_server() {
method edit_module (line 407) | function edit_module() {
method charts_attendance (line 440) | function charts_attendance()
FILE: app/modules/module_page_profiles/ext/Player.php
class Player (line 13) | class Player {
method __construct (line 100) | function __construct( $General, $Db, $Modules, $id, $sg, $search ) {
method get_value (line 316) | public function get_value() {
method get_steam_32 (line 320) | public function get_steam_32() {
method get_steam_32_short (line 330) | public function get_steam_32_short() {
method get_steam_64 (line 340) | public function get_steam_64() {
method get_name (line 344) | public function get_name() {
method get_rank (line 348) | public function get_rank() {
method get_lastconnect (line 352) | public function get_lastconnect() {
method get_kills (line 356) | public function get_kills() {
method get_deaths (line 360) | public function get_deaths() {
method get_kd (line 364) | public function get_kd() {
method get_shoots (line 369) | public function get_shoots() {
method get_hits (line 373) | public function get_hits() {
method get_percent_hits (line 377) | public function get_percent_hits() {
method get_headshots (line 383) | public function get_headshots() {
method get_percent_headshots (line 387) | public function get_percent_headshots() {
method get_assists (line 393) | public function get_assists() {
method get_round_win (line 397) | public function get_round_win() {
method get_round_lose (line 401) | public function get_round_lose() {
method get_percent_win (line 405) | public function get_percent_win() {
method get_playtime (line 411) | public function get_playtime() {
method get_top_position (line 415) | public function get_top_position() {
method get_db_top_with_player (line 419) | public function get_db_top_with_player() {
method get_db_arr_default_info (line 465) | private function get_db_arr_default_info() {
method get_db_top_position (line 508) | private function get_db_top_position() {
method get_db_exstats_weapons (line 526) | private function get_db_exstats_weapons() {
method get_db_plugin_module_unusualkills (line 555) | private function get_db_plugin_module_unusualkills() {
method get_unusualkills_op (line 578) | public function get_unusualkills_op() {
method get_unusualkills_penetrated (line 582) | public function get_unusualkills_penetrated() {
method get_unusualkills_noscope (line 586) | public function get_unusualkills_noscope() {
method get_unusualkills_run (line 590) | public function get_unusualkills_run() {
method get_unusualkills_jump (line 594) | public function get_unusualkills_jump() {
method get_unusualkills_flash (line 598) | public function get_unusualkills_flash() {
method get_unusualkills_smoke (line 602) | public function get_unusualkills_smoke() {
method get_unusualkills_whirl (line 606) | public function get_unusualkills_whirl() {
method get_unusualkills_last_clip (line 610) | public function get_unusualkills_last_clip() {
method get_db_plugin_module_hits (line 614) | private function get_db_plugin_module_hits() {
method get_hits_all (line 649) | public function get_hits_all() {
method get_hits_head (line 653) | public function get_hits_head() {
method get_hits_chest (line 657) | public function get_hits_chest() {
method get_hits_belly (line 661) | public function get_hits_belly() {
method get_hits_leftarm (line 665) | public function get_hits_leftarm() {
method get_hits_rightarm (line 669) | public function get_hits_rightarm() {
method get_hits_leftleg (line 673) | public function get_hits_leftleg() {
method get_hits_rightleg (line 677) | public function get_hits_rightleg() {
method get_hits_neak (line 681) | public function get_hits_neak() {
method get_db_plugin_module_maps (line 685) | private function get_db_plugin_module_maps() {
method get_db_maps_fps (line 694) | private function get_db_maps_fps()
method get_db_plugin_module_geoip (line 707) | private function get_db_plugin_module_geoip() {
method set_profile_status (line 718) | public function set_profile_status( $text, $color, $priority = 0) {
method get_profile_status (line 727) | public function get_profile_status() {
FILE: storage/assets/js/app.js
function e (line 2) | function e(a,b){return a[b]===d?t[b]:a[b]}
function f (line 2) | function f(){var a=b.pageYOffset;return a===d?r.scrollTop:a}
function g (line 2) | function g(a,b){var c=t["on"+a];c&&(w(c)?c.call(b[0]):(c.addClass&&b.add...
function h (line 2) | function h(b){g(b.type,a(this).off(p,h))}
function i (line 2) | function i(c){if(z.length){c=c||t.forceLoad,A=1/0;var d,e,i=f(),j=b.inne...
function j (line 2) | function j(){B>1?(B=1,i(),setTimeout(j,t.throttle)):B=0}
function k (line 2) | function k(a){z.length&&(a&&"scroll"===a.type&&a.currentTarget===b&&A>=f...
function l (line 2) | function l(){v.lazyLoadXT()}
function m (line 2) | function m(){i(!0)}
function action_sidebar (line 93) | function action_sidebar() {
function action_treeview (line 117) | function action_treeview() {
function set_options_data (line 127) | function set_options_data(data_id,change_data) {
function set_options_data_select (line 136) | function set_options_data_select( name, value ) {
function change_background_image (line 159) | function change_background_image( value ) {
function SaveInStorage (line 167) | function SaveInStorage(key, value) {
function LoadFromStorage (line 173) | function LoadFromStorage(key) {
function PlaySound (line 185) | function PlaySound(src) {
function main_notifications_icon_adjust (line 190) | function main_notifications_icon_adjust(count,$html){
function main_notifications_refresh (line 205) | function main_notifications_refresh(){
function main_notifications_load (line 237) | function main_notifications_load(){
function main_notifications_chek (line 249) | function main_notifications_chek(id){
function IsJsonString (line 265) | function IsJsonString(str) {
function updateURL (line 293) | function updateURL(text) {
Condensed preview — 206 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,569K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 748,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".htaccess",
"chars": 304,
"preview": "AddDefaultCharset utf-8\nDirectoryIndex index.php index.html index.htm\nOptions -Indexes\nRewriteEngine On\nRewriteCond %{RE"
},
{
"path": "LICENSE",
"chars": 35149,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 31412,
"preview": "> [!WARNING] \n> **Внимание! Этот проект заброшен и имеет множество уязвимостей. Ставить его не рекомендуется!** \n> **A"
},
{
"path": "app/ext/AltoRouter.php",
"chars": 10806,
"preview": "<?php\n/*\nMIT License\nCopyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>\nPermission is hereby granted, free of c"
},
{
"path": "app/ext/Auth.php",
"chars": 16489,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/ext/Db.php",
"chars": 19602,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/ext/ErrorsHandler.php",
"chars": 1797,
"preview": "<?php \n\nnamespace app\\ext;\n\nclass ErrorsHandler\n{\n public static function fatal_handler()\n {\n $errors = err"
},
{
"path": "app/ext/General.php",
"chars": 9748,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/ext/Graphics.php",
"chars": 8182,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/ext/LightOpenID.php",
"chars": 42704,
"preview": "<?php\n/**\n * This class provides a simple interface for OpenID 1.1/2.0 authentication.\n * \n * It requires PHP >= 5.1.2 w"
},
{
"path": "app/ext/Modules.php",
"chars": 41817,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/ext/Notifications.php",
"chars": 7220,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/M0st1"
},
{
"path": "app/ext/Pdox.php",
"chars": 31386,
"preview": "<?php\n/**\n * PDOx - Useful Query Builder & PDO Class\n *\n * @class Pdox\n * @author izni burak demirtaş (@izniburak) "
},
{
"path": "app/ext/PdoxInterface.php",
"chars": 788,
"preview": "<?php\n\nnamespace app\\ext;\n\ninterface PdoxInterface\n{\n /**\n * @param null $type\n * @param null $argument\n "
},
{
"path": "app/ext/Translate.php",
"chars": 6479,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/includes/auth/steam.php",
"chars": 3937,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/includes/functions.php",
"chars": 12809,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/includes/js_controller.php",
"chars": 8457,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/logs/1.txt",
"chars": 0,
"preview": ""
},
{
"path": "app/modules/disabled/module_block_main_bans_and_comms/description.json",
"chars": 466,
"preview": "{\n \"title\": \"LR WEB | Home - Displays the latest Bans & Mutes\",\n \"info\": \"Displays the last 10 bans and mutes in separ"
},
{
"path": "app/modules/disabled/module_block_main_bans_and_comms/forward/data.php",
"chars": 2803,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/disabled/module_block_main_bans_and_comms/forward/interface.php",
"chars": 13791,
"preview": "<div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"card\">\n <div class=\"card-header\">\n "
},
{
"path": "app/modules/disabled/module_block_main_sb_stats/assets/css/1.css",
"chars": 2548,
"preview": ".card-block-sb-big {\n position: relative;\n min-height: 120px\n}\n\n.card-block-sb-big .figure {\n position: absolut"
},
{
"path": "app/modules/disabled/module_block_main_sb_stats/description.json",
"chars": 531,
"preview": "{\n \"title\": \"LR WEB | Home - Mini-Statistics on SB/MA\",\n \"info\": \"Adds blocks with information:<br>- Total number of a"
},
{
"path": "app/modules/disabled/module_block_main_sb_stats/forward/data.php",
"chars": 2408,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/disabled/module_block_main_sb_stats/forward/interface.php",
"chars": 1688,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/p"
},
{
"path": "app/modules/disabled/module_block_main_sb_stats/translation.json",
"chars": 777,
"preview": "{\n \"_Count_admins\": {\n \"EN\": \"Total Admins\",\n\t\"BR\": \"Total de Admins\",\n \"RU\": \"Всего админ-ов.\",\n \"UA\": \"Всьог"
},
{
"path": "app/modules/disabled/module_block_snow/assets/js/1.js",
"chars": 9873,
"preview": "/** @license\n\n DHTML Snowstorm! JavaScript-based snow for web pages\n Making it snow on the internets since 2003. You're "
},
{
"path": "app/modules/disabled/module_block_snow/assets/js/2.js",
"chars": 12778,
"preview": "var url = window.location.href\nvar arr = url.split(\"/\");\nvar result = arr[0] + \"//\" + arr[2]\n\nimageDir = result + \"/app/"
},
{
"path": "app/modules/disabled/module_block_snow/description.json",
"chars": 278,
"preview": "{\n \"title\": \"LR WEB | Snow\",\n \"info\": \"Just dumb snow :D\",\n \"author\": \"Xzotys & M0st1ce\",\n \"page\": \"all\",\n \"version"
},
{
"path": "app/modules/disabled/module_page_admins/description.json",
"chars": 650,
"preview": "{\n \"title\": \"LR WEB | SourceBans Admins - List Admins\",\n \"info\": \"SourceBans Integration. List Admins\",\n \"author\": \"M"
},
{
"path": "app/modules/disabled/module_page_admins/forward/data.php",
"chars": 1750,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/disabled/module_page_admins/forward/data_always.php",
"chars": 1025,
"preview": "<?php // Работа со статусом игрока.\nif ( ! empty( $Modules->route ) && $Modules->route === 'profiles' ):\n for ( $d = "
},
{
"path": "app/modules/disabled/module_page_admins/forward/interface.php",
"chars": 3117,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.compr"
},
{
"path": "app/modules/disabled/module_page_bans/description.json",
"chars": 657,
"preview": "{\n \"title\": \"LR WEB - Bans - Мониторинг банов\",\n \"info\": \"Интеграция SourceBans. Добавляет страницу со списком банов и"
},
{
"path": "app/modules/disabled/module_page_bans/forward/data.php",
"chars": 2604,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/disabled/module_page_bans/forward/data_always.php",
"chars": 1234,
"preview": "<?php // Работа со статусом игрока.\nif ( ! empty( $Modules->route ) && $Modules->route === 'profiles' ):\n for ( $d = "
},
{
"path": "app/modules/disabled/module_page_bans/forward/interface.php",
"chars": 8123,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.compr"
},
{
"path": "app/modules/disabled/module_page_comms/description.json",
"chars": 626,
"preview": "{\n \"title\": \"LR WEB - Comms - Список мутов/гагов\",\n \"info\": \"Интеграция SourceBans. Добавляет страницу со списком муто"
},
{
"path": "app/modules/disabled/module_page_comms/forward/data.php",
"chars": 2620,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/disabled/module_page_comms/forward/interface.php",
"chars": 8525,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.compr"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/assets/css/1.css",
"chars": 11383,
"preview": " .menu .nav a {\n color: var(--default-text-color);\n margin-left: 15px;\n outline: none;\n }\n\n ."
},
{
"path": "app/modules/disabled/module_page_lk_impulse/assets/js/1.js",
"chars": 6154,
"preview": "$(document).ready(function(){\n\t$(document).on('input','[name=\"promocode\"],[name=\"amount\"],[name=\"steam\"]',function(){\n\tv"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/description.json",
"chars": 682,
"preview": "{\n \"title\": \"LR WEB | LK - Personal Area\",\n \"info\": \"The ability to replenish the balance on the server\",\n \"author\": "
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Basefunction.php",
"chars": 11210,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Freekassa.php",
"chars": 2905,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Interkassa.php",
"chars": 2561,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/M0st1"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Lk_module.php",
"chars": 45584,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Paypal.php",
"chars": 4309,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Paysera.php",
"chars": 383,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Qiwi.php",
"chars": 3162,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Robokassa.php",
"chars": 2439,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Unitpay.php",
"chars": 4357,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/WebToPay.php",
"chars": 68217,
"preview": "<?php\n/*\n * This file is autogenerated, DO NOT EDIT\n */\n/**\n * PHP Library for WebToPay provided services.\n * Copyright "
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Webmoney.php",
"chars": 2777,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/ext/Yandexmoney.php",
"chars": 2663,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/forward/data.php",
"chars": 4671,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/forward/interface.php",
"chars": 6910,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/gateways.php",
"chars": 24549,
"preview": "<?php if( !isset( $_SESSION['user_admin'] ) || IN_LR != true ) { header('Location: ' . $General->arr_general['site']); e"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/install.php",
"chars": 14244,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/logs.php",
"chars": 2490,
"preview": "<?php if( !isset( $_SESSION['user_admin'] ) || IN_LR != true ) { header('Location: ' . $General->arr_general['site']); e"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/payments.php",
"chars": 5313,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/promocodes.php",
"chars": 9563,
"preview": "<?php if( !isset( $_SESSION['user_admin'] ) || IN_LR != true ) { header('Location: ' . $General->arr_general['site']); e"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/result.php",
"chars": 2458,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/search.php",
"chars": 8685,
"preview": "<?php\n /**\n * @author SAPSAN 隼 #3604\n\t *\n\t * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://gi"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/users.php",
"chars": 10434,
"preview": "<?php\n /**\n * @author SAPSAN 隼 #3604\n\t *\n\t * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://gi"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/includes/zalupas.php",
"chars": 14,
"preview": "12312312312312"
},
{
"path": "app/modules/disabled/module_page_lk_impulse/translation.json",
"chars": 33543,
"preview": "{\n \"_LK\":{\n \"EN\" : \"Personal Area\",\n\t\t\t\"BR\" : \"Área Pessoal\",\n \"RU\" : \"Личный Кабинет\",\n "
},
{
"path": "app/modules/disabled/module_page_lk_top/description.json",
"chars": 632,
"preview": "{\n \"title\": \"LR WEB | LK TOP Donations\",\n \"info\": \"Adds a page with donated players\",\n \"author\": \"M0st1ce\",\n \"page\":"
},
{
"path": "app/modules/disabled/module_page_lk_top/forward/data.php",
"chars": 1032,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/disabled/module_page_lk_top/forward/interface.php",
"chars": 2663,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/p"
},
{
"path": "app/modules/disabled/module_page_lk_top/translation.json",
"chars": 302,
"preview": "{\n \"_Top_donations\": {\n \"EN\": \"TOP Donations\",\n\t\"BR\": \"TOP Doações\",\n \"RU\": \"Топ донатеров\",\n\t\"CRO\": \"TOP Donator"
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/css/1.css",
"chars": 5477,
"preview": ".custom-server {\n background-color: #141414;\n padding: 0;\n max-height: 200px\n}\n\n.custom-server:hover img {\n "
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/css/2.css",
"chars": 1912,
"preview": "@keyframes move {\n 0% { background-position: 0 0}\n 100% { background-position: 50px 50px}\n}\n\n.modal-window-server "
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/css/3.css",
"chars": 3863,
"preview": ".custom-server {\n background-color: #141414;\n padding: 0;\n max-height: 200px\n}\n\n.custom-server img {\n positi"
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/css/4.css",
"chars": 5862,
"preview": ".custom-server:hover > img {\n transform: scale(1.03);\n transition: all ease-in .3s;\n opacity: 0.3;\n}\n\n.data-ima"
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/js/1.js",
"chars": 3243,
"preview": "if (servers != 0) {\n $.ajax({\n type: 'POST',\n url: domain+\"app/modules/module_block_main_servers_monito"
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/js/2.js",
"chars": 2669,
"preview": "if (servers != 0) {\n $.ajax({\n type: 'POST',\n url: domain+\"app/modules/module_block_main_servers_monito"
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/js/3.js",
"chars": 3284,
"preview": "if (servers != 0) {\n $.ajax({\n type: 'POST',\n url: domain+\"app/modules/module_block_main_servers_monito"
},
{
"path": "app/modules/module_block_main_servers_monitoring/assets/js/4.js",
"chars": 3470,
"preview": "let minplayers = 0,maxplayers = 0, info, players;\nif (servers != 0) {\n $.ajax({\n type: 'POST',\n url: do"
},
{
"path": "app/modules/module_block_main_servers_monitoring/description.json",
"chars": 370,
"preview": "{\"title\":\"LR WEB | Home - Server Monitoring\",\"info\":\"Servers monitoring in home page\",\"author\":\"M0st1ce\",\"page\":\"home\",\""
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/ServerInfo.php",
"chars": 6522,
"preview": "<?php\n/**\n * @author SAPSAN 隼 #3604\n *\n * @link https://hlmod.ru/members/sapsan.83356/\n * @link https://github.com/sapsa"
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/BaseSocket.php",
"chars": 3536,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Buffer.php",
"chars": 3183,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/AuthenticationException.php",
"chars": 358,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/InvalidArgumentException.php",
"chars": 346,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/InvalidPacketException.php",
"chars": 434,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/SocketException.php",
"chars": 427,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Exception/SourceQueryException.php",
"chars": 334,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/GoldSourceRcon.php",
"chars": 3417,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/Socket.php",
"chars": 2077,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/SourceQuery.php",
"chars": 15207,
"preview": "<?php\n\t/**\n\t * This class provides the public interface to the PHP-Source-Query library.\n\t *\n\t * @author Pavel Djundik\n\t"
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/SourceRcon.php",
"chars": 4941,
"preview": "<?php\n\t/**\n\t * @author Pavel Djundik\n\t *\n\t * @link https://xpaw.me\n\t * @link https://github.com/xPaw/PHP-Source-Query\n\t "
},
{
"path": "app/modules/module_block_main_servers_monitoring/ext/SourceQuery/bootstrap.php",
"chars": 960,
"preview": "<?php\n\t/**\n\t * Library to query servers that implement Source Engine Query protocol.\n\t *\n\t * Special thanks to koraktor "
},
{
"path": "app/modules/module_block_main_servers_monitoring/forward/interface.php",
"chars": 14397,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/p"
},
{
"path": "app/modules/module_block_main_servers_monitoring/includes/js_controller.php",
"chars": 6758,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_block_main_servers_monitoring/translation.json",
"chars": 4,
"preview": "{\n\n}"
},
{
"path": "app/modules/module_block_main_stats/assets/css/1.css",
"chars": 3138,
"preview": ".card-block-big {\n position: relative;\n min-height: 120px\n}\n\n.card-block-big .figure {\n position: absolute;\n "
},
{
"path": "app/modules/module_block_main_stats/assets/css/2.css",
"chars": 3057,
"preview": ".card-block-big {\n position: relative;\n min-height: 120px\n}\n\n.card-block-big .figure {\n display: none;\n}\n\n.card"
},
{
"path": "app/modules/module_block_main_stats/description.json",
"chars": 588,
"preview": "{\n \"title\": \"LR WEB | Home - Mini Statistics\",\n \"info\": \"Adds blocks with information:<br> - The total number of playe"
},
{
"path": "app/modules/module_block_main_stats/forward/data.php",
"chars": 8665,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_block_main_stats/forward/interface.php",
"chars": 1986,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/p"
},
{
"path": "app/modules/module_block_main_stats/translation.json",
"chars": 406,
"preview": "{\n \"_Total_players\": {\n \"EN\": \"Total Players\",\n\t\"BR\": \"Total de Players\",\n \"RU\": \"Всего игроков\",\n \"UA\": \"Всьо"
},
{
"path": "app/modules/module_block_main_top/description.json",
"chars": 425,
"preview": "{\n\t\"title\":\"LR WEB | Home - TOP 10 Players\",\n\t\"info\":\"TOP 10 players for homepage\",\n\t\"author\":\"M0st1ce\",\n\t\"page\":\"home\","
},
{
"path": "app/modules/module_block_main_top/forward/data.php",
"chars": 7417,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_block_main_top/forward/interface.php",
"chars": 4890,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.comprofiles/765611980"
},
{
"path": "app/modules/module_page_adminpanel/assets/css/1.css",
"chars": 8089,
"preview": ".option_one .btn {\n margin-top: 12px;\n float: right;\n}\n\n.option_two .btn {\n margin-top: 12px;\n float: right;"
},
{
"path": "app/modules/module_page_adminpanel/assets/js/1.js",
"chars": 14110,
"preview": "if ($('#nestable').length > 0) {\n !function (d, h, p, l) {\n var a = \"ontouchstart\" in p, c = function () {\n "
},
{
"path": "app/modules/module_page_adminpanel/description.json",
"chars": 474,
"preview": "{\n \"title\": \"LR WEB | Admin Panel [Alpha]\",\n \"info\": \"Administrator panel allows flexible management of LR WEB setting"
},
{
"path": "app/modules/module_page_adminpanel/ext/Admin.php",
"chars": 24743,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_adminpanel/forward/data.php",
"chars": 2427,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_adminpanel/forward/data_always.php",
"chars": 301,
"preview": "<?php\nisset( $_SESSION['steamid32'] ) && isset( $_SESSION['user_admin'] ) && $Modules->set_sidebar_select('module_page_a"
},
{
"path": "app/modules/module_page_adminpanel/forward/interface.php",
"chars": 3673,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_adminpanel/includes/controller.php",
"chars": 3563,
"preview": "<?php\n/**\n * @author WizZzarD <artur.rusanov2013@gmail.com>\n *\n * @link https://steamcommunity.com/id/WizzarD_1/\n *\n * @"
},
{
"path": "app/modules/module_page_adminpanel/includes/db.php",
"chars": 12904,
"preview": "<?php ! isset( $_SESSION['user_admin'] ) && get_iframe( '013','Доступ закрыт' );\nforeach ( $Db->db_data as $mod ):\n f"
},
{
"path": "app/modules/module_page_adminpanel/includes/general.php",
"chars": 13935,
"preview": "<?php ! isset( $_SESSION['user_admin'] ) && get_iframe( '013','Доступ закрыт' )?>\n<div class=\"col-md-6\">\n <div class="
},
{
"path": "app/modules/module_page_adminpanel/includes/modules.php",
"chars": 14464,
"preview": "<?php ! isset( $_SESSION['user_admin'] ) && get_iframe( '013','Доступ закрыт' )?>\n<div class=\"col-md-8\">\n <div class="
},
{
"path": "app/modules/module_page_adminpanel/includes/servers.php",
"chars": 13190,
"preview": "<?php ! isset( $_SESSION['user_admin'] ) && get_iframe( '013','Доступ закрыт' )?>\n<div id=\"add_server_div\" class=\"modal-"
},
{
"path": "app/modules/module_page_adminpanel/includes/stats.php",
"chars": 1897,
"preview": "<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js\"></script>\n\n<div class"
},
{
"path": "app/modules/module_page_adminpanel/includes/web.php",
"chars": 640,
"preview": "<?php ! isset( $_SESSION['user_admin'] ) && get_iframe( '013','Доступ закрыт' )?>\n<div class=\"col-md-12\">\n <div class"
},
{
"path": "app/modules/module_page_adminpanel/translation.json",
"chars": 20696,
"preview": "{\n \"_Count_admins\": {\n \"EN\": \"Total Admins\",\n\t\"BR\": \"Total de Administradores\",\n \"RU\": \"Всего админ-ов.\",\n \"UA"
},
{
"path": "app/modules/module_page_profiles/assets/css/1.css",
"chars": 66436,
"preview": "\n.weapon-table th {\n padding: .35rem;\n}\n\n.unusualkills_percent {\n position: absolute;\n top: 45%;\n left: 17px"
},
{
"path": "app/modules/module_page_profiles/description.json",
"chars": 437,
"preview": "{\n \"title\": \"LR WEB | Player Profiles [Alpha]\",\n \"info\": \"Adds player profiles with their statistics to the site\",\n \""
},
{
"path": "app/modules/module_page_profiles/ext/Player.php",
"chars": 39691,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_profiles/forward/data.php",
"chars": 1810,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_profiles/forward/interface.php",
"chars": 13616,
"preview": "<?php\n\t/**\n\t * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n\t *\n\t * @link https://steamcommunity.com/profiles/7656"
},
{
"path": "app/modules/module_page_profiles/translation.json",
"chars": 8211,
"preview": "{\n \"_Ratio_KD\": {\n \"DE\": \"K/D Verhältnis:\",\n \"EN\": \"K/D Ratio:\",\n \"RU\": \"Убийств / Смертей - К/Д:\",\n \"UA\": "
},
{
"path": "app/modules/module_page_rankstats/assets/css/1.css",
"chars": 2659,
"preview": ".container-ranks {\n width: 100%;\n height: 100%;\n margin-left: 15px;\n}\n\n.row-rank {\n height: 45px;\n margin"
},
{
"path": "app/modules/module_page_rankstats/description.json",
"chars": 720,
"preview": "{\n \"title\": \"LR WEB | Rank Distribution Stats\",\n \"info\": \"Rank distribution statistics\",\n \"author\": \"M0st1ce & steamc"
},
{
"path": "app/modules/module_page_rankstats/forward/data.php",
"chars": 2769,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_rankstats/forward/interface.php",
"chars": 2531,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_rankstats/temp/cache.php",
"chars": 50,
"preview": "<?php return ['time'=>1614610913,'data'=>[0=>[]]];"
},
{
"path": "app/modules/module_page_toppoints/description.json",
"chars": 630,
"preview": "{\n \"title\": \"LR WEB | TOP Points - Player Stats\",\n \"info\": \"Adds a page with player statistics\",\n \"author\": \"M0st1ce\""
},
{
"path": "app/modules/module_page_toppoints/forward/data.php",
"chars": 7207,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/modules/module_page_toppoints/forward/interface.php",
"chars": 7904,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.compr"
},
{
"path": "app/modules/module_sidebar_social/description.json",
"chars": 1041,
"preview": "{\n \"title\": \"LR WEB | All - Social Media Networks\",\n \"info\": \"Adds social media networks to Sidebar :D\",\n \"author\": \""
},
{
"path": "app/page/custom/error/index.php",
"chars": 1028,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/page/custom/install/assets/css/style.css",
"chars": 5171,
"preview": ".badge {\n display: inline-block;\n padding: .35em .6em;\n font-size: 75%;\n font-weight: 500;\n line-height: "
},
{
"path": "app/page/custom/install/includes/options/admin_no_steam.php",
"chars": 1295,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"webkey_title\"><?php echo $options['language'] == "
},
{
"path": "app/page/custom/install/includes/options/admin_steam.php",
"chars": 1661,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"webkey_title\"><?php echo $options['language'] == "
},
{
"path": "app/page/custom/install/includes/options/animations.php",
"chars": 1227,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"sidebar_title\"><?php echo $options['language'] =="
},
{
"path": "app/page/custom/install/includes/options/badge_type.php",
"chars": 744,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"sidebar_title\"><?php echo $options['language'] =="
},
{
"path": "app/page/custom/install/includes/options/db.php",
"chars": 3287,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"sidebar_title\"><?php echo $options['language'] =="
},
{
"path": "app/page/custom/install/includes/options/form_border.php",
"chars": 953,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"sidebar_title\"><?php echo $options['language'] =="
},
{
"path": "app/page/custom/install/includes/options/language.php",
"chars": 695,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"language_title\">Select the language</div>\n <fo"
},
{
"path": "app/page/custom/install/includes/options/name.php",
"chars": 2041,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"webkey_title\"><?php echo $options['language'] == "
},
{
"path": "app/page/custom/install/includes/options/sidebar.php",
"chars": 709,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"sidebar_title\">Сайтбар - По умолчанию</div>\n <"
},
{
"path": "app/page/custom/install/includes/options/webkey.php",
"chars": 1045,
"preview": "<?php ! defined(\"IN_LR\") && die()?>\n<div class=\"back\">\n <div class=\"webkey_title\">STEAM WEB API KEY</div>\n <form e"
},
{
"path": "app/page/custom/install/index.php",
"chars": 17332,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "app/page/general/footer.php",
"chars": 4878,
"preview": "<footer class=\"footer\"><?php echo date(\"Y\") ?> © <a href=\"https://github.com/levelsranks/levels-ranks-web\" target=\""
},
{
"path": "app/page/general/head.php",
"chars": 4652,
"preview": "<!DOCTYPE html>\n<html lang=\"ru\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width"
},
{
"path": "app/templates/default/assets/css/css_library/animations/1.css",
"chars": 640,
"preview": ".global-container {\n transition: transform .5s ease-in-out, margin .5s ease-in-out\n}\n\n.offcanvas {\n transition: tr"
},
{
"path": "app/templates/default/assets/css/css_library/badge_type/1.css",
"chars": 543,
"preview": ".badge {\n display: inline-block;\n padding: .35em .6em;\n font-size: 75%;\n font-weight: 500;\n line-height: "
},
{
"path": "app/templates/default/assets/css/css_library/badge_type/2.css",
"chars": 548,
"preview": ".badge {\n display: inline-block;\n padding: .35em .6em;\n font-size: 75%;\n font-weight: 500;\n line-height: "
},
{
"path": "app/templates/default/assets/css/css_library/form_border/0.css",
"chars": 265,
"preview": ".badge {\n border: 0px solid transparent;\n border-radius: 0px;\n}\n\n.card {\n border: 0px solid transparent;\n bo"
},
{
"path": "app/templates/default/assets/css/css_library/form_border/1.css",
"chars": 265,
"preview": ".badge {\n border: 0px solid transparent;\n border-radius: 2px;\n}\n\n.card {\n border: 0px solid transparent;\n bo"
},
{
"path": "app/templates/default/assets/css/style.css",
"chars": 16895,
"preview": "@import url('http://fonts.cdnfonts.com/css/montserrat');\n\n\n ::-webkit-scrollbar-thumb{\n border-width:1px 1px 1px 2px;"
},
{
"path": "app/templates/default/assets/js/app.js",
"chars": 0,
"preview": ""
},
{
"path": "app/templates/default/colors.json",
"chars": 696,
"preview": "{\n \"--bg-color\": \"#2b2b2b\",\n \"--navbar-color\": \"#121212\",\n \"--sidebar-color\": \"#1f1f1f\",\n \"--sidebar-gradien"
},
{
"path": "app/templates/default/description.json",
"chars": 89,
"preview": "{\n \"name\": \"Стандартный шаблон LR WEB\",\n \"version\": \"1.0\",\n \"author\": \"Flames\"\n}"
},
{
"path": "app/templates/default/interface/head.php",
"chars": 85,
"preview": "<body <?php $_SESSION['sidebar_open'] == false && print 'class=\"sidebar-collapse\"'?>>"
},
{
"path": "app/templates/default/interface/navbar.php",
"chars": 3499,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/p"
},
{
"path": "app/templates/default/interface/sidebar.php",
"chars": 12519,
"preview": "<aside class=\"main-sidebar offcanvas\">\n <section class=\"sidebar\">\n <div class=\"user-sidebar-block\">\n "
},
{
"path": "app/templates/default_dark/assets/css/css_library/animations/1.css",
"chars": 596,
"preview": ".global-container {\n transition: transform .3s ease-in-out, margin .4s ease-in-out;\n}\n\n.offcanvas {\n transition: ."
},
{
"path": "app/templates/default_dark/assets/css/css_library/badge_type/1.css",
"chars": 543,
"preview": ".badge {\n display: inline-block;\n padding: .35em .6em;\n font-size: 75%;\n font-weight: 500;\n line-height: "
},
{
"path": "app/templates/default_dark/assets/css/css_library/badge_type/2.css",
"chars": 548,
"preview": ".badge {\n display: inline-block;\n padding: .35em .6em;\n font-size: 75%;\n font-weight: 500;\n line-height: "
},
{
"path": "app/templates/default_dark/assets/css/css_library/form_border/0.css",
"chars": 265,
"preview": ".badge {\n border: 0px solid transparent;\n border-radius: 0px;\n}\n\n.card {\n border: 0px solid transparent;\n bo"
},
{
"path": "app/templates/default_dark/assets/css/css_library/form_border/1.css",
"chars": 265,
"preview": ".badge {\n border: 0px solid transparent;\n border-radius: 2px;\n}\n\n.card {\n border: 0px solid transparent;\n bo"
},
{
"path": "app/templates/default_dark/assets/css/style.css",
"chars": 19498,
"preview": "@import url('https://fonts.cdnfonts.com/css/montserrat');\n\n ::-webkit-scrollbar-thumb{\n border-width:1px 1px 1px 2px;"
},
{
"path": "app/templates/default_dark/assets/js/app.js",
"chars": 0,
"preview": ""
},
{
"path": "app/templates/default_dark/colors.json",
"chars": 696,
"preview": "{\n \"--bg-color\": \"#222222\",\n \"--navbar-color\": \"#121212\",\n \"--sidebar-color\": \"#272727\",\n \"--sidebar-gradien"
},
{
"path": "app/templates/default_dark/description.json",
"chars": 118,
"preview": "{\n \"name\": \"Переделанный шаблон LR WEB\",\n \"version\": \"1.0\",\n \"author\": \"Flames && designed PEPSIMAX ♕#6171\"\n}"
},
{
"path": "app/templates/default_dark/interface/container.php",
"chars": 4953,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/p"
},
{
"path": "app/templates/default_dark/interface/head.php",
"chars": 396,
"preview": "<body <?php $_SESSION['sidebar_open'] == false && print 'class=\"sidebar-collapse\"'?>>\n<?php \n $balance = $Modules->ge"
},
{
"path": "app/templates/default_dark/interface/navbar.php",
"chars": 64,
"preview": "<div class=\"global-container\">\n <div class=\"container-fluid\">"
},
{
"path": "app/templates/default_dark/interface/sidebar.php",
"chars": 10691,
"preview": "<aside class=\"main-sidebar offcanvas\">\n <section class=\"sidebar\">\n <?php if( empty( $General->arr_general['dis"
},
{
"path": "app/templates/default_navbar/assets/css/css_library/animations/1.css",
"chars": 640,
"preview": ".global-container {\n transition: transform .5s ease-in-out, margin .5s ease-in-out\n}\n\n.offcanvas {\n transition: tr"
},
{
"path": "app/templates/default_navbar/assets/css/css_library/badge_type/1.css",
"chars": 543,
"preview": ".badge {\n display: inline-block;\n padding: .35em .6em;\n font-size: 75%;\n font-weight: 500;\n line-height: "
},
{
"path": "app/templates/default_navbar/assets/css/css_library/badge_type/2.css",
"chars": 548,
"preview": ".badge {\n display: inline-block;\n padding: .35em .6em;\n font-size: 75%;\n font-weight: 500;\n line-height: "
},
{
"path": "app/templates/default_navbar/assets/css/css_library/form_border/0.css",
"chars": 265,
"preview": ".badge {\n border: 0px solid transparent;\n border-radius: 0px;\n}\n\n.card {\n border: 0px solid transparent;\n bo"
},
{
"path": "app/templates/default_navbar/assets/css/css_library/form_border/1.css",
"chars": 265,
"preview": ".badge {\n border: 0px solid transparent;\n border-radius: 2px;\n}\n\n.card {\n border: 0px solid transparent;\n bo"
},
{
"path": "app/templates/default_navbar/assets/css/style.css",
"chars": 18269,
"preview": "@import url('http://fonts.cdnfonts.com/css/montserrat');\n\n ::-webkit-scrollbar-thumb{\n border-width:1px 1px 1px 2px;\n"
},
{
"path": "app/templates/default_navbar/assets/js/app.js",
"chars": 599,
"preview": "$(document).on(\"click\", \"[data-sidebar-open]\", (e) => {\n console.log($(e.target).data(\"sidebar-open\"));\n if( $(e.t"
},
{
"path": "app/templates/default_navbar/colors.json",
"chars": 696,
"preview": "{\n \"--bg-color\": \"#2b2b2b\",\n \"--navbar-color\": \"#121212\",\n \"--sidebar-color\": \"#1f1f1f\",\n \"--sidebar-gradien"
},
{
"path": "app/templates/default_navbar/description.json",
"chars": 100,
"preview": "{\n \"name\": \"Стандартный шаблон LR WEB с навбаром\",\n \"version\": \"1.0\",\n \"author\": \"Flames\"\n}"
},
{
"path": "app/templates/default_navbar/interface/head.php",
"chars": 85,
"preview": "<body <?php $_SESSION['sidebar_open'] == false && print 'class=\"sidebar-collapse\"'?>>"
},
{
"path": "app/templates/default_navbar/interface/navbar.php",
"chars": 9642,
"preview": "<?php\n /**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/p"
},
{
"path": "app/templates/default_navbar/interface/sidebar.php",
"chars": 0,
"preview": ""
},
{
"path": "index.php",
"chars": 4485,
"preview": "<?php\n/**\n * @author Anastasia Sidak <m0st1ce.nastya@gmail.com>\n *\n * @link https://steamcommunity.com/profiles/76561198"
},
{
"path": "storage/assets/css/style.css",
"chars": 33020,
"preview": "\n/*\n * Описываем дефолты\n */\n\n html {\n box-sizing: border-box;\n scroll-behavior: smooth;\n overflow-y: scroll;\n "
},
{
"path": "storage/assets/css/vendors/material-design-iconic-font/css/material-design-iconic-font.css",
"chars": 85304,
"preview": "/*!\n * Material Design Iconic Font by Sergey Kupletsky (@zavoloklom) - http://zavoloklom.github.io/material-design-icon"
},
{
"path": "storage/assets/js/app.js",
"chars": 13234,
"preview": "/* Lazy Load XT 1.1.0 | MIT License */\n!function(a,b,c,d){function e(a,b){return a[b]===d?t[b]:a[b]}function f(){var a=b"
},
{
"path": "storage/cache/img/avatars/1.json",
"chars": 0,
"preview": ""
},
{
"path": "storage/cache/img/ranks/dangerzone/description.json",
"chars": 59,
"preview": "{\n \"title\": \"Ranks | Danger Zone\",\n \"author\": \"M0st1ce\"\n}"
},
{
"path": "storage/cache/img/ranks/dangerzone/title.json",
"chars": 2231,
"preview": "{\n \"_\": {\n \"EN\" : \"No rank\",\n \"RU\" : \"Нету ранга\",\n \"UA\" : \"Нема рангу\",\n \"LT\" : \"Nėra rango\"\n },\n \"0\": {"
},
{
"path": "storage/cache/img/ranks/default/description.json",
"chars": 67,
"preview": "{\n \"title\": \"Rank | MatchMaking Default\",\n \"author\": \"M0st1ce\"\n}"
},
{
"path": "storage/cache/img/ranks/default/title.json",
"chars": 3250,
"preview": "{\n \"_\": {\n \"EN\" : \"No rank\",\n \"RU\" : \"Нету ранга\",\n \"UA\" : \"Нема рангу\",\n \"LT\" : \"Nėra rango\",\n\t\"CH\" : \"无段位"
},
{
"path": "storage/cache/img/ranks/faceit/description.json",
"chars": 60,
"preview": "{\n \"title\": \"Ranks | Level Faceit\",\n \"author\": \"M0st1ce\"\n}"
},
{
"path": "storage/cache/img/ranks/faceit/title.json",
"chars": 1387,
"preview": "{\n \"_\": {\n \"EN\" : \"No level\",\n \"RU\" : \"Нету уровня\",\n \"UA\" : \"Нема рівень\",\n \"LT\" : \"Nėra lygis\"\n },\n \"0\""
}
]
// ... and 6 more files (download for full content)
About this extraction
This page contains the full source code of the levelsranks/levels-ranks-web GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 206 files (1.4 MB), approximately 404.0k tokens, and a symbol index with 655 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.