Commit initial -> Clonage du modele de stefprojet
|
@ -0,0 +1,4 @@
|
||||||
|
RewriteEngine on
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
|
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://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 <http://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:
|
||||||
|
|
||||||
|
{project} Copyright (C) {year} {fullname}
|
||||||
|
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
|
||||||
|
<http://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
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,308 @@
|
||||||
|
<?php define('__ROOT__', dirname(__FILE__) );
|
||||||
|
require_once __ROOT__.'/manager/autoloader.php';
|
||||||
|
|
||||||
|
use \manager\ModuleRequest;
|
||||||
|
use \manager\ResourceDispatcher;
|
||||||
|
use \manager\ManagerError;
|
||||||
|
use \manager\Repo;
|
||||||
|
|
||||||
|
debug();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* NSERTION DES UTILISATEURS DANS LA BDD DEPUIS JSON
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function insertUsersFromJSON(){
|
||||||
|
$json = ResourceDispatcher::getResource('f/json/generated_users/conf');
|
||||||
|
$json = json_decode( $json, true );
|
||||||
|
|
||||||
|
// Pour chaque entree
|
||||||
|
foreach( $json as $user ){
|
||||||
|
|
||||||
|
// Creation de la requete
|
||||||
|
$request = new ModuleRequest('userDefault/create', array(
|
||||||
|
$user['code'],
|
||||||
|
$user['username'],
|
||||||
|
$user['firstname'],
|
||||||
|
$user['lastname'],
|
||||||
|
$user['email'],
|
||||||
|
$user['password'],
|
||||||
|
$user['status']
|
||||||
|
));
|
||||||
|
$answer = $request->dispatch();
|
||||||
|
// Debug error
|
||||||
|
var_dump( $answer->error == ManagerError::Success );
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//insertUsersFromJSON();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* NSERTION DES MACHINES DANS LA BDD DEPUIS JSON
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function insertMachinesFromJSON(){
|
||||||
|
$json = ResourceDispatcher::getResource('f/json/generated_machines/conf');
|
||||||
|
$json = json_decode( $json, true );
|
||||||
|
|
||||||
|
// Pour chaque entree
|
||||||
|
foreach( $json as $machine ){
|
||||||
|
|
||||||
|
// Creation de la requete
|
||||||
|
$request = new ModuleRequest('machineDefault/create', array(
|
||||||
|
$machine['code'],
|
||||||
|
$machine['name']
|
||||||
|
));
|
||||||
|
$answer = $request->dispatch();
|
||||||
|
// Debug error
|
||||||
|
var_dump( $answer->error == ManagerError::Success );
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//insertMachinesFromJSON();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFICHAGE DES UTILISATEURS DE LA BDD
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function selectUsers(){
|
||||||
|
|
||||||
|
// Creation de la requete
|
||||||
|
$requete = new ModuleRequest('userDefault/getAll');
|
||||||
|
$answer = $requete->dispatch();
|
||||||
|
|
||||||
|
var_dump( ManagerError::explicit($answer->error) );
|
||||||
|
var_dump( $answer->get('users') );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//selectUsers();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFICHAGE DES MACHINES DE LA BDD
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function selectMachines(){
|
||||||
|
|
||||||
|
// Creation de la requete
|
||||||
|
$requete = new ModuleRequest('machineDefault/getAll');
|
||||||
|
$answer = $requete->dispatch();
|
||||||
|
|
||||||
|
var_dump( ManagerError::explicit($answer->error) );
|
||||||
|
var_dump( $answer->get('machines') );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//selectMachines();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFICHAGE DES UTILISATEURS DE LA BDD (MIS EN PAGE)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function displayUsers(){
|
||||||
|
|
||||||
|
// Creation de la requete
|
||||||
|
$request = new ModuleRequest('userDefault/getAll');
|
||||||
|
$answer = $request->dispatch();
|
||||||
|
|
||||||
|
// Debug error
|
||||||
|
if( $answer->error != ManagerError::Success )
|
||||||
|
var_dump( ManagerError::explicit($answer->error) );
|
||||||
|
|
||||||
|
// display result
|
||||||
|
var_dump( $answer->getAll() );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//displayUsers();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* TEST DU DISPATCHER DES MANAGERS
|
||||||
|
*
|
||||||
|
* @return nomRetour<typeRetour> Description du retour
|
||||||
|
|
||||||
|
*/
|
||||||
|
function testModuleDispatcher(){
|
||||||
|
|
||||||
|
// Creation d'une requete en objet
|
||||||
|
$req1 = new ModuleRequest('firstModule/returnvar', array('id_user' => 10, 'code' => '11-22-33-44') );
|
||||||
|
// Creation d'une requete a partir d'un json en <String>
|
||||||
|
$req2 = ModuleRequest::fromString('{"path": "firstModule/returnvar", "data": {"id_user":10, "code":"11-22-33-44"}}');
|
||||||
|
|
||||||
|
var_dump( $req1->dispatch() );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//testModuleDispatcher();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* TEST DU DISPATCHER DES REPO
|
||||||
|
*
|
||||||
|
* @return nomRetour<typeRetour> Description du retour
|
||||||
|
|
||||||
|
*/
|
||||||
|
function testRepoDispatcher(){
|
||||||
|
|
||||||
|
// Creation d'une requete en objet
|
||||||
|
$req1 = new Repo('user/getById', array('19'));
|
||||||
|
// $req1 = new Repo('user/getByCode', array('92-55-B9-B3'));
|
||||||
|
var_dump( $req1->answer() );
|
||||||
|
|
||||||
|
if( $req1->error != ManagerError::Success )
|
||||||
|
var_dump( ManagerError::explicit($req1->error) );
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//testRepoDispatcher();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* INSERTION (COMPOSITE) DES UTILISATEURS DE LA BDD
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function insertUsersComposite(){
|
||||||
|
|
||||||
|
// Creation de la requete
|
||||||
|
$request = new ModuleRequest('userDefault/create', array('92-55-B9-B1', 'b', 'bla', 'bla', 'bla@test.com', 'sadas', '1') );
|
||||||
|
$answer = $request->dispatch();
|
||||||
|
// Debug error
|
||||||
|
if( $answer->error != ManagerError::Success )
|
||||||
|
var_dump( ManagerError::explicit($answer->error) );
|
||||||
|
|
||||||
|
var_dump( $answer->getAll() );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//insertUsersComposite();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RETOURNE LES GROUPES D'UN UTILISATEUR
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getUserClusters(){
|
||||||
|
$id_user = 115;
|
||||||
|
|
||||||
|
// Groupes de l'utilisateur 'a'
|
||||||
|
$getUser1Clusters = new Repo('user/getClusters', array($id_user));
|
||||||
|
$user1Clusters = $getUser1Clusters->answer();
|
||||||
|
var_dump( $user1Clusters );
|
||||||
|
|
||||||
|
// On ajoute un groupe a l'utilisateur 100
|
||||||
|
$linkA = new Repo('cluster/link', array($user1Clusters[0]['id_cluster'], 100) );
|
||||||
|
var_dump( $linkA->answer() );
|
||||||
|
$getUser2Clusters = new Repo('user/getClusters', array(100));
|
||||||
|
var_dump( $getUser2Clusters->answer() );
|
||||||
|
|
||||||
|
// On retire un groupe a l'utilisateur 100
|
||||||
|
$unlinkA = new Repo('cluster/unlink', array($user1Clusters[0]['id_cluster'], 100) );
|
||||||
|
var_dump( $linkA->answer() );
|
||||||
|
$getUser2Clusters = new Repo('user/getClusters', array(100));
|
||||||
|
var_dump( $getUser2Clusters->answer() );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//getUserClusters();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* MODIFICATION D'UN UTILISATEUR
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return status<Boolean> TRUE si aucune erreur, sinon FALSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function editUser(){
|
||||||
|
$id_user = 48;
|
||||||
|
|
||||||
|
$request = new ModuleRequest('userDefault/edit', array(
|
||||||
|
'B1-87-EA-BF',
|
||||||
|
'Abigail',
|
||||||
|
'Mcmillan',
|
||||||
|
'Savage',
|
||||||
|
'mcmillansavage@corecom.com',
|
||||||
|
'password',
|
||||||
|
0
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
// ["B1-87-EA-BF","Abigail01","Mcmillan","Savage","mcmillansavage@corecom.com","password",0]
|
||||||
|
|
||||||
|
var_dump( $request->dispatch() );
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//editUser();
|
||||||
|
|
||||||
|
// new ResourceDispatcher('f/svg/search/st/sub-menu-side/ff0000', true);
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,720 @@
|
||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 4.0.10deb1
|
||||||
|
-- http://www.phpmyadmin.net
|
||||||
|
--
|
||||||
|
-- Host: localhost
|
||||||
|
-- Generation Time: Feb 14, 2016 at 03:20 PM
|
||||||
|
-- Server version: 5.5.47-0ubuntu0.14.04.1
|
||||||
|
-- PHP Version: 5.5.9-1ubuntu4.14
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Database: `stefproject`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `cluster`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `cluster` (
|
||||||
|
`id_cluster` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(30) NOT NULL,
|
||||||
|
PRIMARY KEY (`id_cluster`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=201 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `cluster`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `cluster` (`id_cluster`, `name`) VALUES
|
||||||
|
(1, 'Daniels'),
|
||||||
|
(2, 'Lucas'),
|
||||||
|
(3, 'Liz'),
|
||||||
|
(4, 'Jessie'),
|
||||||
|
(5, 'Elaine'),
|
||||||
|
(6, 'Tameka'),
|
||||||
|
(7, 'Katheryn'),
|
||||||
|
(8, 'Bowen'),
|
||||||
|
(9, 'Flores'),
|
||||||
|
(10, 'Dominique'),
|
||||||
|
(11, 'Deirdre'),
|
||||||
|
(12, 'Elvira'),
|
||||||
|
(13, 'Sonya'),
|
||||||
|
(14, 'Patrick'),
|
||||||
|
(15, 'Tamra'),
|
||||||
|
(16, 'Lawanda'),
|
||||||
|
(17, 'Susie'),
|
||||||
|
(18, 'Marlene'),
|
||||||
|
(19, 'Lara'),
|
||||||
|
(20, 'Callahan'),
|
||||||
|
(21, 'Ball'),
|
||||||
|
(22, 'Tiffany'),
|
||||||
|
(23, 'Alisha'),
|
||||||
|
(24, 'Kristen'),
|
||||||
|
(25, 'Hicks'),
|
||||||
|
(26, 'Miriam'),
|
||||||
|
(27, 'Vilma'),
|
||||||
|
(28, 'Woods'),
|
||||||
|
(29, 'Atkinson'),
|
||||||
|
(30, 'Rogers'),
|
||||||
|
(31, 'Kirsten'),
|
||||||
|
(32, 'Iva'),
|
||||||
|
(33, 'Morales'),
|
||||||
|
(34, 'Kellie'),
|
||||||
|
(35, 'Mullen'),
|
||||||
|
(36, 'Harper'),
|
||||||
|
(37, 'Pollard'),
|
||||||
|
(38, 'Howell'),
|
||||||
|
(39, 'Lina'),
|
||||||
|
(40, 'Glover'),
|
||||||
|
(41, 'Clarke'),
|
||||||
|
(42, 'Daphne'),
|
||||||
|
(43, 'Maddox'),
|
||||||
|
(44, 'Ernestine'),
|
||||||
|
(45, 'Bernice'),
|
||||||
|
(46, 'Rhodes'),
|
||||||
|
(47, 'Nancy'),
|
||||||
|
(48, 'Abigail'),
|
||||||
|
(49, 'Levy'),
|
||||||
|
(50, 'Juarez'),
|
||||||
|
(51, 'Pruitt'),
|
||||||
|
(52, 'Richard'),
|
||||||
|
(53, 'Lindsay'),
|
||||||
|
(54, 'Darla'),
|
||||||
|
(55, 'Nolan'),
|
||||||
|
(56, 'Zelma'),
|
||||||
|
(57, 'Avila'),
|
||||||
|
(58, 'Etta'),
|
||||||
|
(59, 'Ava'),
|
||||||
|
(60, 'Stein'),
|
||||||
|
(61, 'Tommie'),
|
||||||
|
(62, 'Holmes'),
|
||||||
|
(63, 'Todd'),
|
||||||
|
(64, 'Henry'),
|
||||||
|
(65, 'Liliana'),
|
||||||
|
(66, 'Angelita'),
|
||||||
|
(67, 'Mcintyre'),
|
||||||
|
(68, 'Baker'),
|
||||||
|
(69, 'Barbra'),
|
||||||
|
(70, 'Delacruz'),
|
||||||
|
(71, 'Wall'),
|
||||||
|
(72, 'Wilkinson'),
|
||||||
|
(73, 'Rosalie'),
|
||||||
|
(74, 'Mae'),
|
||||||
|
(75, 'Bernadine'),
|
||||||
|
(76, 'Norman'),
|
||||||
|
(77, 'Terra'),
|
||||||
|
(78, 'Ina'),
|
||||||
|
(79, 'Sabrina'),
|
||||||
|
(80, 'Karla'),
|
||||||
|
(81, 'Clements'),
|
||||||
|
(82, 'Mccullough'),
|
||||||
|
(83, 'Cheri'),
|
||||||
|
(84, 'Mcclain'),
|
||||||
|
(85, 'Leona'),
|
||||||
|
(86, 'Roslyn'),
|
||||||
|
(87, 'Castillo'),
|
||||||
|
(88, 'Helen'),
|
||||||
|
(89, 'Olson'),
|
||||||
|
(90, 'Ann'),
|
||||||
|
(91, 'Haynes'),
|
||||||
|
(92, 'Malinda'),
|
||||||
|
(93, 'Cochran'),
|
||||||
|
(94, 'Winters'),
|
||||||
|
(95, 'Richardson'),
|
||||||
|
(96, 'Walker'),
|
||||||
|
(97, 'Witt'),
|
||||||
|
(98, 'Valarie'),
|
||||||
|
(99, 'Jessica'),
|
||||||
|
(100, 'Velez'),
|
||||||
|
(101, 'WNTKO'),
|
||||||
|
(102, 'RMUAY'),
|
||||||
|
(103, 'ZSCMZ'),
|
||||||
|
(104, 'AWCUX'),
|
||||||
|
(105, 'HKSWO'),
|
||||||
|
(106, 'ASIFJ'),
|
||||||
|
(107, 'CCKEV'),
|
||||||
|
(108, 'KDVSJ'),
|
||||||
|
(109, 'VCEWY'),
|
||||||
|
(110, 'UKWVN'),
|
||||||
|
(111, 'FFJDJ'),
|
||||||
|
(112, 'NHCWO'),
|
||||||
|
(113, 'IBRFK'),
|
||||||
|
(114, 'FGLXK'),
|
||||||
|
(115, 'BUZRV'),
|
||||||
|
(116, 'WKNTM'),
|
||||||
|
(117, 'SPQOQ'),
|
||||||
|
(118, 'SSRWE'),
|
||||||
|
(119, 'TIBAH'),
|
||||||
|
(120, 'EKOFT'),
|
||||||
|
(121, 'GJTJW'),
|
||||||
|
(122, 'XIPNP'),
|
||||||
|
(123, 'FDFXQ'),
|
||||||
|
(124, 'HSCUZ'),
|
||||||
|
(125, 'BYKBF'),
|
||||||
|
(126, 'GNOKK'),
|
||||||
|
(127, 'WLSUB'),
|
||||||
|
(128, 'DMTTJ'),
|
||||||
|
(129, 'OCFWD'),
|
||||||
|
(130, 'CABWU'),
|
||||||
|
(131, 'BUWRJ'),
|
||||||
|
(132, 'OULIX'),
|
||||||
|
(133, 'XCDYM'),
|
||||||
|
(134, 'LREGF'),
|
||||||
|
(135, 'DDLSP'),
|
||||||
|
(136, 'DTGHG'),
|
||||||
|
(137, 'BZWUE'),
|
||||||
|
(138, 'LGDDS'),
|
||||||
|
(139, 'ERXMY'),
|
||||||
|
(140, 'VJGER'),
|
||||||
|
(141, 'LOXIE'),
|
||||||
|
(142, 'IHARA'),
|
||||||
|
(143, 'ZIQJQ'),
|
||||||
|
(144, 'ZKUEW'),
|
||||||
|
(145, 'BLDTO'),
|
||||||
|
(146, 'OZRQF'),
|
||||||
|
(147, 'NWPBM'),
|
||||||
|
(148, 'OZDYC'),
|
||||||
|
(149, 'ETUZU'),
|
||||||
|
(150, 'CNQAB'),
|
||||||
|
(151, 'OPIIW'),
|
||||||
|
(152, 'ACARQ'),
|
||||||
|
(153, 'NMHYG'),
|
||||||
|
(154, 'ASKZD'),
|
||||||
|
(155, 'QMIJT'),
|
||||||
|
(156, 'BBDZL'),
|
||||||
|
(157, 'WKKYH'),
|
||||||
|
(158, 'AFHJH'),
|
||||||
|
(159, 'CASXB'),
|
||||||
|
(160, 'LOXOZ'),
|
||||||
|
(161, 'ZTUNO'),
|
||||||
|
(162, 'QGQNK'),
|
||||||
|
(163, 'SVIBS'),
|
||||||
|
(164, 'RSVXL'),
|
||||||
|
(165, 'EMESC'),
|
||||||
|
(166, 'BBXON'),
|
||||||
|
(167, 'NGLBK'),
|
||||||
|
(168, 'MZHBC'),
|
||||||
|
(169, 'OYEPB'),
|
||||||
|
(170, 'RQFNK'),
|
||||||
|
(171, 'MRUUS'),
|
||||||
|
(172, 'DJDVW'),
|
||||||
|
(173, 'SOJEJ'),
|
||||||
|
(174, 'YYSRC'),
|
||||||
|
(175, 'AJNMI'),
|
||||||
|
(176, 'IVUSU'),
|
||||||
|
(177, 'VYPUB'),
|
||||||
|
(178, 'SJYUN'),
|
||||||
|
(179, 'QRGTG'),
|
||||||
|
(180, 'LXIFX'),
|
||||||
|
(181, 'YXWTP'),
|
||||||
|
(182, 'SMEFT'),
|
||||||
|
(183, 'HUTUW'),
|
||||||
|
(184, 'DYCLY'),
|
||||||
|
(185, 'VBJWP'),
|
||||||
|
(186, 'CZRPO'),
|
||||||
|
(187, 'JCNSP'),
|
||||||
|
(188, 'EOKCA'),
|
||||||
|
(189, 'PZEAK'),
|
||||||
|
(190, 'ERIMX'),
|
||||||
|
(191, 'NGVPC'),
|
||||||
|
(192, 'MVONW'),
|
||||||
|
(193, 'ZUHOD'),
|
||||||
|
(194, 'YIATG'),
|
||||||
|
(195, 'WFQGC'),
|
||||||
|
(196, 'NKZQL'),
|
||||||
|
(197, 'EMIWA'),
|
||||||
|
(198, 'WOYWY'),
|
||||||
|
(199, 'ZBLQG'),
|
||||||
|
(200, 'STQYS');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `cluster_merge`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `cluster_merge` (
|
||||||
|
`id_cluster_merge` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`id_cluster` int(11) NOT NULL,
|
||||||
|
`id_entity` int(11) NOT NULL,
|
||||||
|
`class` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id_cluster_merge`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=203 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `cluster_merge`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `cluster_merge` (`id_cluster_merge`, `id_cluster`, `id_entity`, `class`) VALUES
|
||||||
|
(1, 1, 1, 0),
|
||||||
|
(2, 2, 2, 0),
|
||||||
|
(3, 3, 3, 0),
|
||||||
|
(4, 4, 4, 0),
|
||||||
|
(5, 5, 5, 0),
|
||||||
|
(6, 6, 6, 0),
|
||||||
|
(7, 7, 7, 0),
|
||||||
|
(8, 8, 8, 0),
|
||||||
|
(9, 9, 9, 0),
|
||||||
|
(10, 10, 10, 0),
|
||||||
|
(11, 11, 11, 0),
|
||||||
|
(12, 12, 12, 0),
|
||||||
|
(13, 13, 13, 0),
|
||||||
|
(14, 14, 14, 0),
|
||||||
|
(15, 15, 15, 0),
|
||||||
|
(16, 16, 16, 0),
|
||||||
|
(17, 17, 17, 0),
|
||||||
|
(18, 18, 18, 0),
|
||||||
|
(19, 19, 19, 0),
|
||||||
|
(20, 20, 20, 0),
|
||||||
|
(21, 21, 21, 0),
|
||||||
|
(22, 22, 22, 0),
|
||||||
|
(23, 23, 23, 0),
|
||||||
|
(24, 24, 24, 0),
|
||||||
|
(25, 25, 25, 0),
|
||||||
|
(26, 26, 26, 0),
|
||||||
|
(27, 27, 27, 0),
|
||||||
|
(28, 28, 28, 0),
|
||||||
|
(29, 29, 29, 0),
|
||||||
|
(30, 30, 30, 0),
|
||||||
|
(31, 31, 31, 0),
|
||||||
|
(32, 32, 32, 0),
|
||||||
|
(33, 33, 33, 0),
|
||||||
|
(34, 34, 34, 0),
|
||||||
|
(35, 35, 35, 0),
|
||||||
|
(36, 36, 36, 0),
|
||||||
|
(37, 37, 37, 0),
|
||||||
|
(38, 38, 38, 0),
|
||||||
|
(39, 39, 39, 0),
|
||||||
|
(40, 40, 40, 0),
|
||||||
|
(41, 41, 41, 0),
|
||||||
|
(42, 42, 42, 0),
|
||||||
|
(43, 43, 43, 0),
|
||||||
|
(44, 44, 44, 0),
|
||||||
|
(45, 45, 45, 0),
|
||||||
|
(46, 46, 46, 0),
|
||||||
|
(47, 47, 47, 0),
|
||||||
|
(48, 48, 48, 0),
|
||||||
|
(49, 49, 49, 0),
|
||||||
|
(50, 50, 50, 0),
|
||||||
|
(51, 51, 51, 0),
|
||||||
|
(52, 52, 52, 0),
|
||||||
|
(53, 53, 53, 0),
|
||||||
|
(54, 54, 54, 0),
|
||||||
|
(55, 55, 55, 0),
|
||||||
|
(56, 56, 56, 0),
|
||||||
|
(57, 57, 57, 0),
|
||||||
|
(58, 58, 58, 0),
|
||||||
|
(59, 59, 59, 0),
|
||||||
|
(60, 60, 60, 0),
|
||||||
|
(61, 61, 61, 0),
|
||||||
|
(62, 62, 62, 0),
|
||||||
|
(63, 63, 63, 0),
|
||||||
|
(64, 64, 64, 0),
|
||||||
|
(65, 65, 65, 0),
|
||||||
|
(66, 66, 66, 0),
|
||||||
|
(67, 67, 67, 0),
|
||||||
|
(68, 68, 68, 0),
|
||||||
|
(69, 69, 69, 0),
|
||||||
|
(70, 70, 70, 0),
|
||||||
|
(71, 71, 71, 0),
|
||||||
|
(72, 72, 72, 0),
|
||||||
|
(73, 73, 73, 0),
|
||||||
|
(74, 74, 74, 0),
|
||||||
|
(75, 75, 75, 0),
|
||||||
|
(76, 76, 76, 0),
|
||||||
|
(77, 77, 77, 0),
|
||||||
|
(78, 78, 78, 0),
|
||||||
|
(79, 79, 79, 0),
|
||||||
|
(80, 80, 80, 0),
|
||||||
|
(81, 81, 81, 0),
|
||||||
|
(82, 82, 82, 0),
|
||||||
|
(83, 83, 83, 0),
|
||||||
|
(84, 84, 84, 0),
|
||||||
|
(85, 85, 85, 0),
|
||||||
|
(86, 86, 86, 0),
|
||||||
|
(87, 87, 87, 0),
|
||||||
|
(88, 88, 88, 0),
|
||||||
|
(89, 89, 89, 0),
|
||||||
|
(90, 90, 90, 0),
|
||||||
|
(91, 91, 91, 0),
|
||||||
|
(92, 92, 92, 0),
|
||||||
|
(93, 93, 93, 0),
|
||||||
|
(94, 94, 94, 0),
|
||||||
|
(95, 95, 95, 0),
|
||||||
|
(96, 96, 96, 0),
|
||||||
|
(97, 97, 97, 0),
|
||||||
|
(98, 98, 98, 0),
|
||||||
|
(99, 99, 99, 0),
|
||||||
|
(100, 100, 100, 0),
|
||||||
|
(101, 101, 1, 1),
|
||||||
|
(102, 102, 2, 1),
|
||||||
|
(103, 103, 3, 1),
|
||||||
|
(104, 104, 4, 1),
|
||||||
|
(105, 105, 5, 1),
|
||||||
|
(106, 106, 6, 1),
|
||||||
|
(107, 107, 7, 1),
|
||||||
|
(108, 108, 8, 1),
|
||||||
|
(109, 109, 9, 1),
|
||||||
|
(110, 110, 10, 1),
|
||||||
|
(111, 111, 11, 1),
|
||||||
|
(112, 112, 12, 1),
|
||||||
|
(113, 113, 13, 1),
|
||||||
|
(114, 114, 14, 1),
|
||||||
|
(115, 115, 15, 1),
|
||||||
|
(116, 116, 16, 1),
|
||||||
|
(117, 117, 17, 1),
|
||||||
|
(118, 118, 18, 1),
|
||||||
|
(119, 119, 19, 1),
|
||||||
|
(120, 120, 20, 1),
|
||||||
|
(121, 121, 21, 1),
|
||||||
|
(122, 122, 22, 1),
|
||||||
|
(123, 123, 23, 1),
|
||||||
|
(124, 124, 24, 1),
|
||||||
|
(125, 125, 25, 1),
|
||||||
|
(126, 126, 26, 1),
|
||||||
|
(127, 127, 27, 1),
|
||||||
|
(128, 128, 28, 1),
|
||||||
|
(129, 129, 29, 1),
|
||||||
|
(130, 130, 30, 1),
|
||||||
|
(131, 131, 31, 1),
|
||||||
|
(132, 132, 32, 1),
|
||||||
|
(133, 133, 33, 1),
|
||||||
|
(134, 134, 34, 1),
|
||||||
|
(135, 135, 35, 1),
|
||||||
|
(136, 136, 36, 1),
|
||||||
|
(137, 137, 37, 1),
|
||||||
|
(138, 138, 38, 1),
|
||||||
|
(139, 139, 39, 1),
|
||||||
|
(140, 140, 40, 1),
|
||||||
|
(141, 141, 41, 1),
|
||||||
|
(142, 142, 42, 1),
|
||||||
|
(143, 143, 43, 1),
|
||||||
|
(144, 144, 44, 1),
|
||||||
|
(145, 145, 45, 1),
|
||||||
|
(146, 146, 46, 1),
|
||||||
|
(147, 147, 47, 1),
|
||||||
|
(148, 148, 48, 1),
|
||||||
|
(149, 149, 49, 1),
|
||||||
|
(150, 150, 50, 1),
|
||||||
|
(151, 151, 51, 1),
|
||||||
|
(152, 152, 52, 1),
|
||||||
|
(153, 153, 53, 1),
|
||||||
|
(154, 154, 54, 1),
|
||||||
|
(155, 155, 55, 1),
|
||||||
|
(156, 156, 56, 1),
|
||||||
|
(157, 157, 57, 1),
|
||||||
|
(158, 158, 58, 1),
|
||||||
|
(159, 159, 59, 1),
|
||||||
|
(160, 160, 60, 1),
|
||||||
|
(161, 161, 61, 1),
|
||||||
|
(162, 162, 62, 1),
|
||||||
|
(163, 163, 63, 1),
|
||||||
|
(164, 164, 64, 1),
|
||||||
|
(165, 165, 65, 1),
|
||||||
|
(166, 166, 66, 1),
|
||||||
|
(167, 167, 67, 1),
|
||||||
|
(168, 168, 68, 1),
|
||||||
|
(169, 169, 69, 1),
|
||||||
|
(170, 170, 70, 1),
|
||||||
|
(171, 171, 71, 1),
|
||||||
|
(172, 172, 72, 1),
|
||||||
|
(173, 173, 73, 1),
|
||||||
|
(174, 174, 74, 1),
|
||||||
|
(175, 175, 75, 1),
|
||||||
|
(176, 176, 76, 1),
|
||||||
|
(177, 177, 77, 1),
|
||||||
|
(178, 178, 78, 1),
|
||||||
|
(179, 179, 79, 1),
|
||||||
|
(180, 180, 80, 1),
|
||||||
|
(181, 181, 81, 1),
|
||||||
|
(182, 182, 82, 1),
|
||||||
|
(183, 183, 83, 1),
|
||||||
|
(184, 184, 84, 1),
|
||||||
|
(185, 185, 85, 1),
|
||||||
|
(186, 186, 86, 1),
|
||||||
|
(187, 187, 87, 1),
|
||||||
|
(188, 188, 88, 1),
|
||||||
|
(189, 189, 89, 1),
|
||||||
|
(190, 190, 90, 1),
|
||||||
|
(191, 191, 91, 1),
|
||||||
|
(192, 192, 92, 1),
|
||||||
|
(193, 193, 93, 1),
|
||||||
|
(194, 194, 94, 1),
|
||||||
|
(195, 195, 95, 1),
|
||||||
|
(196, 196, 96, 1),
|
||||||
|
(197, 197, 97, 1),
|
||||||
|
(198, 198, 98, 1),
|
||||||
|
(199, 199, 99, 1),
|
||||||
|
(200, 200, 100, 1);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `history`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `history` (
|
||||||
|
`id_history` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`action` int(11) NOT NULL,
|
||||||
|
`id_acteur` int(11) NOT NULL,
|
||||||
|
`id_machine` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id_history`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `machine`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `machine` (
|
||||||
|
`id_machine` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` varchar(20) NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL,
|
||||||
|
PRIMARY KEY (`id_machine`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=101 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `machine`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `machine` (`id_machine`, `code`, `name`) VALUES
|
||||||
|
(1, 'CB-40-70-A0', 'WNTKO'),
|
||||||
|
(2, 'C9-42-46-45', 'RMUAY'),
|
||||||
|
(3, '30-DA-23-C0', 'ZSCMZ'),
|
||||||
|
(4, '6B-F0-82-05', 'AWCUX'),
|
||||||
|
(5, 'C8-67-58-0E', 'HKSWO'),
|
||||||
|
(6, 'CB-94-1E-F3', 'ASIFJ'),
|
||||||
|
(7, '3F-A6-B3-5E', 'CCKEV'),
|
||||||
|
(8, '8E-24-B5-24', 'KDVSJ'),
|
||||||
|
(9, '27-15-0B-9D', 'VCEWY'),
|
||||||
|
(10, 'FE-38-93-E9', 'UKWVN'),
|
||||||
|
(11, '07-6F-B6-B6', 'FFJDJ'),
|
||||||
|
(12, '3A-A8-8E-B1', 'NHCWO'),
|
||||||
|
(13, 'A3-15-41-38', 'IBRFK'),
|
||||||
|
(14, '99-30-04-B1', 'FGLXK'),
|
||||||
|
(15, '80-A8-91-C8', 'BUZRV'),
|
||||||
|
(16, '97-F3-00-93', 'WKNTM'),
|
||||||
|
(17, 'C6-F7-45-02', 'SPQOQ'),
|
||||||
|
(18, '25-11-D9-70', 'SSRWE'),
|
||||||
|
(19, '5B-EF-81-00', 'TIBAH'),
|
||||||
|
(20, '74-18-01-AE', 'EKOFT'),
|
||||||
|
(21, '07-27-C3-41', 'GJTJW'),
|
||||||
|
(22, '23-38-C6-B5', 'XIPNP'),
|
||||||
|
(23, '35-49-0B-88', 'FDFXQ'),
|
||||||
|
(24, '36-00-7F-1C', 'HSCUZ'),
|
||||||
|
(25, 'CB-60-BB-1A', 'BYKBF'),
|
||||||
|
(26, 'FE-5F-E7-FB', 'GNOKK'),
|
||||||
|
(27, '54-D1-4D-EC', 'WLSUB'),
|
||||||
|
(28, '9D-D8-C8-53', 'DMTTJ'),
|
||||||
|
(29, '32-A8-CB-08', 'OCFWD'),
|
||||||
|
(30, 'A4-B4-FC-74', 'CABWU'),
|
||||||
|
(31, '9E-E7-87-A0', 'BUWRJ'),
|
||||||
|
(32, '3F-90-8D-56', 'OULIX'),
|
||||||
|
(33, 'C7-95-56-96', 'XCDYM'),
|
||||||
|
(34, '98-5B-99-35', 'LREGF'),
|
||||||
|
(35, 'C0-1C-52-1E', 'DDLSP'),
|
||||||
|
(36, 'AE-01-18-81', 'DTGHG'),
|
||||||
|
(37, '85-46-39-94', 'BZWUE'),
|
||||||
|
(38, '9C-3C-45-AB', 'LGDDS'),
|
||||||
|
(39, '14-A5-92-CE', 'ERXMY'),
|
||||||
|
(40, 'A4-35-C5-76', 'VJGER'),
|
||||||
|
(41, '69-8E-6A-11', 'LOXIE'),
|
||||||
|
(42, '04-73-52-C8', 'IHARA'),
|
||||||
|
(43, '66-48-DF-7B', 'ZIQJQ'),
|
||||||
|
(44, '01-D9-22-86', 'ZKUEW'),
|
||||||
|
(45, 'B4-AC-F6-93', 'BLDTO'),
|
||||||
|
(46, 'E3-B8-CC-D4', 'OZRQF'),
|
||||||
|
(47, 'FF-18-3D-CB', 'NWPBM'),
|
||||||
|
(48, '68-2D-86-1D', 'OZDYC'),
|
||||||
|
(49, '65-AC-44-36', 'ETUZU'),
|
||||||
|
(50, '9D-3F-90-E9', 'CNQAB'),
|
||||||
|
(51, '8B-DE-55-B5', 'OPIIW'),
|
||||||
|
(52, '15-1B-34-D7', 'ACARQ'),
|
||||||
|
(53, '0D-E1-41-A8', 'NMHYG'),
|
||||||
|
(54, '19-FB-D2-82', 'ASKZD'),
|
||||||
|
(55, 'C6-55-0A-22', 'QMIJT'),
|
||||||
|
(56, '61-E4-51-C7', 'BBDZL'),
|
||||||
|
(57, '65-78-34-50', 'WKKYH'),
|
||||||
|
(58, '41-9A-BF-99', 'AFHJH'),
|
||||||
|
(59, '05-0D-82-31', 'CASXB'),
|
||||||
|
(60, '0D-21-6F-00', 'LOXOZ'),
|
||||||
|
(61, 'F7-84-53-CF', 'ZTUNO'),
|
||||||
|
(62, 'C2-9A-2D-9A', 'QGQNK'),
|
||||||
|
(63, 'BE-57-E3-29', 'SVIBS'),
|
||||||
|
(64, '13-39-5D-21', 'RSVXL'),
|
||||||
|
(65, 'A6-3D-D3-AC', 'EMESC'),
|
||||||
|
(66, 'F2-EF-83-5E', 'BBXON'),
|
||||||
|
(67, '52-F5-7D-2B', 'NGLBK'),
|
||||||
|
(68, 'BA-30-5C-C7', 'MZHBC'),
|
||||||
|
(69, 'B5-43-98-38', 'OYEPB'),
|
||||||
|
(70, '95-AC-FD-6F', 'RQFNK'),
|
||||||
|
(71, 'E0-12-F0-7D', 'MRUUS'),
|
||||||
|
(72, 'E2-5F-C1-1F', 'DJDVW'),
|
||||||
|
(73, '0B-0B-AF-49', 'SOJEJ'),
|
||||||
|
(74, 'C1-AF-BE-FD', 'YYSRC'),
|
||||||
|
(75, '6B-71-12-94', 'AJNMI'),
|
||||||
|
(76, 'E0-D3-67-BB', 'IVUSU'),
|
||||||
|
(77, 'D7-02-23-82', 'VYPUB'),
|
||||||
|
(78, '3F-AA-D7-E0', 'SJYUN'),
|
||||||
|
(79, 'CA-0E-31-E6', 'QRGTG'),
|
||||||
|
(80, 'D4-92-6B-03', 'LXIFX'),
|
||||||
|
(81, 'EE-0A-F5-D3', 'YXWTP'),
|
||||||
|
(82, '73-EB-04-C8', 'SMEFT'),
|
||||||
|
(83, '32-37-21-39', 'HUTUW'),
|
||||||
|
(84, '97-13-49-2E', 'DYCLY'),
|
||||||
|
(85, 'EE-63-92-60', 'VBJWP'),
|
||||||
|
(86, 'B3-88-BB-2B', 'CZRPO'),
|
||||||
|
(87, 'F5-7D-F5-7E', 'JCNSP'),
|
||||||
|
(88, 'AA-A9-B2-83', 'EOKCA'),
|
||||||
|
(89, 'EA-62-F6-F9', 'PZEAK'),
|
||||||
|
(90, '3D-3B-BE-D9', 'ERIMX'),
|
||||||
|
(91, '75-57-68-54', 'NGVPC'),
|
||||||
|
(92, '0E-F0-AD-27', 'MVONW'),
|
||||||
|
(93, '84-39-68-9B', 'ZUHOD'),
|
||||||
|
(94, '75-E4-50-0C', 'YIATG'),
|
||||||
|
(95, 'E8-F6-C1-CF', 'WFQGC'),
|
||||||
|
(96, '55-89-B7-34', 'NKZQL'),
|
||||||
|
(97, 'B2-67-DD-0C', 'EMIWA'),
|
||||||
|
(98, '11-7C-2E-A4', 'WOYWY'),
|
||||||
|
(99, 'CB-D8-B5-A2', 'ZBLQG'),
|
||||||
|
(100, 'CE-A1-20-27', 'STQYS');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `user`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `user` (
|
||||||
|
`id_user` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` varchar(20) NOT NULL,
|
||||||
|
`username` varchar(30) NOT NULL,
|
||||||
|
`firstname` varchar(30) NOT NULL,
|
||||||
|
`lastname` varchar(30) NOT NULL,
|
||||||
|
`mail` varchar(50) NOT NULL,
|
||||||
|
`password` varchar(40) NOT NULL,
|
||||||
|
`status` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id_user`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=101 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `user`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `user` (`id_user`, `code`, `username`, `firstname`, `lastname`, `mail`, `password`, `status`) VALUES
|
||||||
|
(1, '92-55-B9-B3', 'Daniels', 'Juliana', 'French', 'julianafrench@corecom.com', '0c77186b0906214f00df4e1aa038b096d3e8e46c', 1),
|
||||||
|
(2, '10-FE-BD-61', 'Lucas', 'Curry', 'Church', 'currychurch@corecom.com', '42e9f77558d9a97c9eac737473c318cd2a9f801e', 0),
|
||||||
|
(3, 'E0-11-41-DB', 'Liz', 'Geneva', 'Diaz', 'genevadiaz@corecom.com', '946690ac829f6b6bdb43484a7fc70a7b7585e2cf', 1),
|
||||||
|
(4, '23-77-93-8C', 'Jessie', 'Joann', 'Melendez', 'joannmelendez@corecom.com', 'f137079aa3c8badc4527a61d87e78c6fe3724710', 1),
|
||||||
|
(5, 'E7-DA-79-9B', 'Elaine', 'Fox', 'Kerr', 'foxkerr@corecom.com', 'aee4d3605daeac7403b6f8b12b89104f6d9205b6', 1),
|
||||||
|
(6, '0F-9F-56-50', 'Tameka', 'Nieves', 'Velasquez', 'nievesvelasquez@corecom.com', 'd2b3958520536e3dafc51434b556bb6448f558f5', 0),
|
||||||
|
(7, 'DB-A3-8A-D7', 'Katheryn', 'Rodriquez', 'Gomez', 'rodriquezgomez@corecom.com', '654cf9797684c177d34e9485404f11d950789b0e', 1),
|
||||||
|
(8, 'AF-BB-68-6B', 'Bowen', 'Bender', 'Holder', 'benderholder@corecom.com', '2939dd7052c52439454bc0339ba0e9d8af228248', 1),
|
||||||
|
(9, '39-DF-20-69', 'Flores', 'Beck', 'Murray', 'beckmurray@corecom.com', '844856a258b01518156453ac4fa4dda6dd1aa275', 1),
|
||||||
|
(10, '88-FA-FC-C3', 'Dominique', 'Tracy', 'Morin', 'tracymorin@corecom.com', '19b804d53a04953c907182e44aceaceb7282414c', 1),
|
||||||
|
(11, '75-E1-A6-9E', 'Deirdre', 'Phoebe', 'Pearson', 'phoebepearson@corecom.com', 'fca00c9b40a0a2f68f337e571e1545b9d4f7cb3c', 0),
|
||||||
|
(12, 'CC-28-79-89', 'Elvira', 'Latasha', 'Myers', 'latashamyers@corecom.com', 'da6ceb69b3586575e0d325dea73aca9c3419e63d', 1),
|
||||||
|
(13, 'E1-C8-AB-8C', 'Sonya', 'Shepherd', 'Mcgowan', 'shepherdmcgowan@corecom.com', '17866bc3dc4a9b755b4a7ea9d2dc3c993ab80fa2', 0),
|
||||||
|
(14, '7C-94-C4-9A', 'Patrick', 'Sandoval', 'Wolfe', 'sandovalwolfe@corecom.com', '289108619de517fb3e197d4dea616ee95b545209', 1),
|
||||||
|
(15, '36-3C-BB-F4', 'Tamra', 'Julie', 'Alvarado', 'juliealvarado@corecom.com', 'b8cdf51a55fef9748d818fe6d8edb6604a875d2d', 0),
|
||||||
|
(16, 'E7-52-B2-35', 'Lawanda', 'Erin', 'Hayes', 'erinhayes@corecom.com', '052eafc7c22fb21a825764c92fe7858689eeb055', 0),
|
||||||
|
(17, '94-E7-44-49', 'Susie', 'Jannie', 'Thomas', 'janniethomas@corecom.com', 'afe9fe189e1fd5be046d96496a61ff85e3a29ea9', 1),
|
||||||
|
(18, '89-64-A2-C2', 'Marlene', 'Janine', 'Mcgee', 'janinemcgee@corecom.com', 'fd525062225deb92fb69885ae69f8aa4d9371ece', 1),
|
||||||
|
(19, 'AB-E2-19-73', 'Lara', 'Janell', 'Wilcox', 'janellwilcox@corecom.com', '8038a9af1995278ae8db31ff6742d905a4ff7fce', 0),
|
||||||
|
(20, '88-13-39-95', 'Callahan', 'Gutierrez', 'Hale', 'gutierrezhale@corecom.com', '2b533291cfec2e0fca6f47e86ef7a2bb917e5c8b', 0),
|
||||||
|
(21, '6A-8B-F5-05', 'Ball', 'Lowery', 'Clarke', 'loweryclarke@corecom.com', '2479548e7716cab434e49ed76b8f6addcfab8c4a', 1),
|
||||||
|
(22, 'F2-8B-B7-52', 'Tiffany', 'Noelle', 'Grant', 'noellegrant@corecom.com', '101f4125a93abc3f0bfd9dd89c052a48adb221f7', 0),
|
||||||
|
(23, 'C2-97-8A-D1', 'Alisha', 'Dorsey', 'Cohen', 'dorseycohen@corecom.com', 'b6b867104c4b8ed66531eab451f9a5288756ecc0', 1),
|
||||||
|
(24, 'D1-CD-18-D5', 'Kristen', 'Mosley', 'Allen', 'mosleyallen@corecom.com', 'cfb4e905b928df0cab2189efe52fc70346ae5195', 0),
|
||||||
|
(25, 'BF-18-2B-5A', 'Hicks', 'Georgia', 'Henry', 'georgiahenry@corecom.com', 'ff9a6bf10d7a158ad03e798ad4e955d31ce9a4d3', 1),
|
||||||
|
(26, '3A-B9-55-4C', 'Miriam', 'Rosetta', 'Daugherty', 'rosettadaugherty@corecom.com', 'fcb448f82ee02e64d7e0127c7f7fd382e022bc49', 0),
|
||||||
|
(27, '6C-90-5E-0A', 'Vilma', 'Adrian', 'Small', 'adriansmall@corecom.com', '7a99bc00ef3323224b136d5558957f878aab139e', 0),
|
||||||
|
(28, '3B-FE-71-B1', 'Woods', 'Benton', 'Long', 'bentonlong@corecom.com', 'f245b196981b294e877780612cd3da6d0f74f6dd', 0),
|
||||||
|
(29, '94-B6-5A-D4', 'Atkinson', 'Atkins', 'Riddle', 'atkinsriddle@corecom.com', '89cc132f6ebc532af34fbdfa2731fa0daf133616', 0),
|
||||||
|
(30, 'C3-61-78-F2', 'Rogers', 'Jolene', 'Young', 'joleneyoung@corecom.com', '601d9c709aa4d6efeb016ef277036276ea4b8555', 0),
|
||||||
|
(31, '7D-2B-DB-BD', 'Kirsten', 'Bush', 'Luna', 'bushluna@corecom.com', '69f09a6fc580e5763bbc6880cd70cfc4698717ed', 0),
|
||||||
|
(32, 'D8-A3-FB-FC', 'Iva', 'Fran', 'Odom', 'franodom@corecom.com', '70711fb36f6d3dbc1fd498748a626981af650a40', 1),
|
||||||
|
(33, 'D8-3D-79-D5', 'Morales', 'Stevens', 'Vaughan', 'stevensvaughan@corecom.com', '75d7516da7b52fa0519a5aec6bdd211c52edb194', 0),
|
||||||
|
(34, 'CE-08-DB-1D', 'Kellie', 'Kristi', 'Gilliam', 'kristigilliam@corecom.com', '542fc3247f42b5410efc8ff73d262ad8c171b105', 1),
|
||||||
|
(35, 'F1-3C-AA-0D', 'Mullen', 'Trudy', 'Wolf', 'trudywolf@corecom.com', 'd22e60e193e038749dd350047502b079bf4d2c50', 1),
|
||||||
|
(36, '86-EE-8D-B3', 'Harper', 'Penelope', 'Harrell', 'penelopeharrell@corecom.com', 'e6de981876c42ef67e497011d0dc5c9395034f52', 0),
|
||||||
|
(37, '34-1E-E7-CC', 'Pollard', 'Pena', 'Roberson', 'penaroberson@corecom.com', '2cbb0389770e400c104682438009bed0799ddb6f', 0),
|
||||||
|
(38, '36-E8-D6-7F', 'Howell', 'Maryann', 'Keith', 'maryannkeith@corecom.com', '804ea34707d2a1a2894e28ddc75aa8ba83fe7819', 1),
|
||||||
|
(39, '23-77-0B-03', 'Lina', 'Allie', 'Matthews', 'alliematthews@corecom.com', 'ccca3b876b3524e174d1c24c3b7224b3f41ec80d', 0),
|
||||||
|
(40, '83-1B-E8-D4', 'Glover', 'Giles', 'Carpenter', 'gilescarpenter@corecom.com', 'bf8f5e17de22bafb10ccc27afacba146cc262350', 1),
|
||||||
|
(41, '59-4F-13-7B', 'Clarke', 'Newman', 'Mays', 'newmanmays@corecom.com', '66caf3c7fc1bd55a9097c76d13659857df0ff1b7', 0),
|
||||||
|
(42, '03-58-61-02', 'Daphne', 'Josephine', 'Ferguson', 'josephineferguson@corecom.com', '3e903e048bbe86ee5ada35a572390c7e643df98e', 0),
|
||||||
|
(43, '5F-CA-AD-DC', 'Maddox', 'Larson', 'Guthrie', 'larsonguthrie@corecom.com', 'e1c11d1b3695fc675ddf3cac2dc913fc952737a0', 1),
|
||||||
|
(44, '29-12-1D-1B', 'Ernestine', 'Heidi', 'Harris', 'heidiharris@corecom.com', '1720b86274ead53863213d6cd320e5cc2609a5c5', 0),
|
||||||
|
(45, 'E9-61-60-8B', 'Bernice', 'Ella', 'Golden', 'ellagolden@corecom.com', 'c590b0e4516ba73f35f5421c02fce9047ae09108', 0),
|
||||||
|
(46, '3B-27-8E-1F', 'Rhodes', 'Cantrell', 'Castaneda', 'cantrellcastaneda@corecom.com', 'b0bd979539d3c9ba099c5b749f2c639fa80a914f', 1),
|
||||||
|
(47, '49-DF-A5-C2', 'Nancy', 'Audrey', 'Wallace', 'audreywallace@corecom.com', '6bff6d80d87eb006c39c44326fd4f2b7594c3380', 1),
|
||||||
|
(48, 'B1-87-EA-BF', 'Abigail', 'Mcmillan', 'Savage', 'mcmillansavage@corecom.com', 'd439c7b5b005505f8331a669bf2f04f12978386a', 0),
|
||||||
|
(49, '63-7F-09-29', 'Levy', 'Shawna', 'Hicks', 'shawnahicks@corecom.com', 'c0777b820de8114eb075290b2f35f4d3ec422177', 1),
|
||||||
|
(50, 'C9-48-F7-62', 'Juarez', 'Lynn', 'Roth', 'lynnroth@corecom.com', '6394e386186c49a3da990c45343bec478500289b', 0),
|
||||||
|
(51, 'DF-CD-42-C9', 'Pruitt', 'Minerva', 'Tran', 'minervatran@corecom.com', '7279362c06f5c27996ea0297175419aaecc55632', 1),
|
||||||
|
(52, '9F-E7-39-8A', 'Richard', 'Norris', 'West', 'norriswest@corecom.com', '1bbe7ad5c8d5c782b3fd1a9a722bbcbe6f3aff76', 0),
|
||||||
|
(53, 'F5-AA-76-14', 'Lindsay', 'Wright', 'Delgado', 'wrightdelgado@corecom.com', 'd0a0e16b1531c8d2293da363696ae78d1ed3820c', 0),
|
||||||
|
(54, 'A5-C8-50-F5', 'Darla', 'May', 'Mcconnell', 'maymcconnell@corecom.com', '513f18a2598d5572812017914a9ad93728947f58', 1),
|
||||||
|
(55, 'A0-0E-D0-AC', 'Nolan', 'Herrera', 'Randall', 'herrerarandall@corecom.com', '4ff09e0c08b128bfa168adc3363e2056f9329787', 0),
|
||||||
|
(56, 'FF-1F-FD-20', 'Zelma', 'Gwendolyn', 'Yates', 'gwendolynyates@corecom.com', 'e9cfd7299f85e5b27c397752065debe04ff83349', 1),
|
||||||
|
(57, '7D-0D-95-B1', 'Avila', 'Ramos', 'Benton', 'ramosbenton@corecom.com', 'd8c9499b74c890c880ec0fdef5bee7676d719701', 0),
|
||||||
|
(58, '9D-5A-95-A9', 'Etta', 'Graves', 'Horne', 'graveshorne@corecom.com', '9ba3f432d027249c532dd3f0ae87c35b6b7f7bc2', 0),
|
||||||
|
(59, 'B9-3C-5A-74', 'Ava', 'Maribel', 'Lawrence', 'maribellawrence@corecom.com', '3155d09a5314aebf3a65effcacc235b16ea9a8b6', 0),
|
||||||
|
(60, 'E0-B9-0F-F5', 'Stein', 'Peterson', 'Lindsey', 'petersonlindsey@corecom.com', '6754a730b74fa45f03ad67c574c87b9039e07d7f', 1),
|
||||||
|
(61, 'BD-A1-69-F0', 'Tommie', 'Lee', 'Chen', 'leechen@corecom.com', '28374a860c16c25aaa2089d6334e9d4d6b003dfb', 0),
|
||||||
|
(62, '81-8B-3B-DD', 'Holmes', 'Doreen', 'Ramos', 'doreenramos@corecom.com', 'c87af6c6edb145007b3ff203d3385f7421c32160', 1),
|
||||||
|
(63, '8D-C8-12-6C', 'Todd', 'Sherri', 'Knight', 'sherriknight@corecom.com', 'cba287d8f2e7259ab0f224684edfa62ab2662021', 1),
|
||||||
|
(64, '12-74-96-57', 'Henry', 'Kane', 'Martinez', 'kanemartinez@corecom.com', 'debec5f18c49d3c6123fdb74176aa439ac2ec3f2', 0),
|
||||||
|
(65, '5E-CA-06-D0', 'Liliana', 'Eleanor', 'Molina', 'eleanormolina@corecom.com', '85b651279360c82b0661264f92e3b33f82267b74', 0),
|
||||||
|
(66, '46-D5-1C-58', 'Angelita', 'Pennington', 'Simpson', 'penningtonsimpson@corecom.com', '2ee7dfa7b527da1af08ccea9a815fe516a986cb4', 0),
|
||||||
|
(67, '04-D8-00-77', 'Mcintyre', 'Tami', 'Clements', 'tamiclements@corecom.com', '4a454f5c4963285907e449c277b8c4be6cd44f6f', 0),
|
||||||
|
(68, '85-F4-B2-64', 'Baker', 'Noreen', 'Chang', 'noreenchang@corecom.com', 'ba082820d55b25751169c71ac06a137b08ef6866', 1),
|
||||||
|
(69, '99-82-48-DC', 'Barbra', 'Charlene', 'Meadows', 'charlenemeadows@corecom.com', 'e8b1250d2fba79847af5445d631d270221543e8a', 1),
|
||||||
|
(70, '51-FC-6F-FB', 'Delacruz', 'Lois', 'Ware', 'loisware@corecom.com', '656896e513e69d29d81479e8fe830cc8b85f48fb', 0),
|
||||||
|
(71, 'C5-20-CB-4B', 'Wall', 'Mcgee', 'Washington', 'mcgeewashington@corecom.com', 'f610e643113d78e7101063afbc6b77b05c4005e6', 1),
|
||||||
|
(72, 'BA-25-6F-EA', 'Wilkinson', 'Langley', 'Oneil', 'langleyoneil@corecom.com', 'f332c321ca4b5d9cd1a774679d7a30c3e8298bb9', 0),
|
||||||
|
(73, 'D6-9E-A2-80', 'Rosalie', 'Frost', 'Floyd', 'frostfloyd@corecom.com', '0bf8898efd21e0adbdafa513e4e4ea37ea925485', 0),
|
||||||
|
(74, '26-C4-EB-5D', 'Mae', 'Diaz', 'Pruitt', 'diazpruitt@corecom.com', '9dbc88fe1d357fd94ae4f0fa6b919ee73470e0f0', 1),
|
||||||
|
(75, '8A-BF-C9-3D', 'Bernadine', 'Bullock', 'Tucker', 'bullocktucker@corecom.com', '1aa94f1b8b41d736ccf9a037848450d5a1e974e8', 0),
|
||||||
|
(76, '17-4B-80-EC', 'Norman', 'Foster', 'Hyde', 'fosterhyde@corecom.com', '299f39186ea493d1400a326758281d0c84b7e5cb', 0),
|
||||||
|
(77, 'C8-5B-C6-4A', 'Terra', 'Hahn', 'Larsen', 'hahnlarsen@corecom.com', 'dd55505b18e64620aa99af77829fdc4692e0483a', 0),
|
||||||
|
(78, 'BD-6F-75-F0', 'Ina', 'Payne', 'Hawkins', 'paynehawkins@corecom.com', '278594b59cf1ca074c2c85c4fa8c4db7724b353d', 1),
|
||||||
|
(79, 'C4-DB-18-8B', 'Sabrina', 'Leach', 'Cantrell', 'leachcantrell@corecom.com', '903fef98051c203813685c59db1273e82d6fa8f1', 0),
|
||||||
|
(80, '23-4D-56-D9', 'Karla', 'Roxanne', 'Bullock', 'roxannebullock@corecom.com', '354d2ecc14a19d5c401ac3c6c970565e6cbd4590', 1),
|
||||||
|
(81, '04-08-EB-92', 'Clements', 'Munoz', 'Brooks', 'munozbrooks@corecom.com', '27c880549bb385604ba72f6b8b9afc088d29c277', 0),
|
||||||
|
(82, 'EB-DB-FD-87', 'Mccullough', 'Sofia', 'Farley', 'sofiafarley@corecom.com', '00fd33711271fe613b1c783d328ef12ddbb83fea', 1),
|
||||||
|
(83, '83-F4-17-0D', 'Cheri', 'Trina', 'Walls', 'trinawalls@corecom.com', '314eb5077e644e54f7908255ab69a8a182583ec7', 1),
|
||||||
|
(84, 'E7-7D-E0-52', 'Mcclain', 'Price', 'Gentry', 'pricegentry@corecom.com', 'edf9c6bb1bed27911dd4889710e98e166e446471', 1),
|
||||||
|
(85, '0F-6C-B6-F9', 'Leona', 'Adriana', 'Williamson', 'adrianawilliamson@corecom.com', '1a094070343af634058ca8c95b243d391419e12c', 1),
|
||||||
|
(86, '2D-C2-9C-32', 'Roslyn', 'Garner', 'Armstrong', 'garnerarmstrong@corecom.com', '1d2d3b593858da028c39945a76c828188a6ca0c6', 0),
|
||||||
|
(87, '1C-5E-93-06', 'Castillo', 'Rachael', 'Trevino', 'rachaeltrevino@corecom.com', '7fd283709ad4542bcc148916f5c5a7040ee6b563', 0),
|
||||||
|
(88, '6F-49-74-A5', 'Helen', 'Samantha', 'Gates', 'samanthagates@corecom.com', '1d6dfe0d2fccf591b71b9c087c00bdb7788b37ca', 1),
|
||||||
|
(89, '54-65-6C-9F', 'Olson', 'Sweet', 'Barry', 'sweetbarry@corecom.com', 'bf4c289377f60b992ac4c0cb6f7ddf7dc36d42b7', 1),
|
||||||
|
(90, 'BC-1E-40-1A', 'Ann', 'Evans', 'Howe', 'evanshowe@corecom.com', 'e9ac12df8e8630ea8b7f7e8aa5f2a84ae04d4e07', 1),
|
||||||
|
(91, 'F1-D0-5D-4E', 'Haynes', 'Russell', 'Shannon', 'russellshannon@corecom.com', '189f897b61dc6ac5ddde070c49c023f2ec0c3740', 1),
|
||||||
|
(92, 'D5-E3-43-71', 'Malinda', 'Alvarez', 'Singleton', 'alvarezsingleton@corecom.com', '8b251913ab48631ac945f0c008dd9ca1a6930372', 0),
|
||||||
|
(93, '23-41-81-AB', 'Cochran', 'Mcgowan', 'Mclaughlin', 'mcgowanmclaughlin@corecom.com', 'b7fd671317e8b8bb1dab53dbe97095fcb43e8d69', 0),
|
||||||
|
(94, '28-86-38-25', 'Winters', 'Eugenia', 'Anthony', 'eugeniaanthony@corecom.com', '59055f429896e2747f4684f81ccfc1f3c3959750', 1),
|
||||||
|
(95, 'C7-7C-E2-41', 'Richardson', 'King', 'Rodriguez', 'kingrodriguez@corecom.com', '1e7c28afccf9a495a3dca7373d5033ee1d104784', 1),
|
||||||
|
(96, '6B-1B-5E-A7', 'Walker', 'Montoya', 'Meyer', 'montoyameyer@corecom.com', 'f3e6cba691792c642574c4aa4ab75b751d701a95', 0),
|
||||||
|
(97, '48-03-38-1F', 'Witt', 'Larsen', 'Strong', 'larsenstrong@corecom.com', 'd6319a099f7a6577b548dba182f350562c0312c3', 0),
|
||||||
|
(98, 'E0-4B-04-F6', 'Valarie', 'Craft', 'Klein', 'craftklein@corecom.com', 'fb303aa403c8312e63b2b06c1d6d3dc734167497', 0),
|
||||||
|
(99, '2F-7D-0A-51', 'Jessica', 'Delgado', 'Campos', 'delgadocampos@corecom.com', '6db5f7b5415a933416a7114bccb6663bc9be59c8', 0),
|
||||||
|
(100, '91-D4-7E-65', 'Velez', 'Mcmahon', 'Lott', 'mcmahonlott@corecom.com', 'f01205307be8c618083e0e7bd34b4f9e42aa7b8a', 1);
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"host" : "localhost",
|
||||||
|
"dbname" : "stefproject",
|
||||||
|
"user" : "php",
|
||||||
|
"password" : "Qt358nUdyeTxLDM8"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"host" : "xdrm.io",
|
||||||
|
"dbname" : "stefproject",
|
||||||
|
"user" : "php",
|
||||||
|
"password" : "QbzjZACndQM6NmuD"
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"svg": "image/svg+xml",
|
||||||
|
|
||||||
|
"css": "text/css",
|
||||||
|
"js": "text/js",
|
||||||
|
|
||||||
|
"json": "application/json"
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"st" : "/src/static",
|
||||||
|
"dy" : "/src/dynamic",
|
||||||
|
|
||||||
|
"conf" : "/config",
|
||||||
|
|
||||||
|
"css" : "/css",
|
||||||
|
"js" : "/js",
|
||||||
|
|
||||||
|
"cssview" : "/view/css",
|
||||||
|
"jsview" : "/view/js"
|
||||||
|
}
|
|
@ -0,0 +1,402 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "CB-40-70-A0",
|
||||||
|
"name": "WNTKO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C9-42-46-45",
|
||||||
|
"name": "RMUAY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "30-DA-23-C0",
|
||||||
|
"name": "ZSCMZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "6B-F0-82-05",
|
||||||
|
"name": "AWCUX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C8-67-58-0E",
|
||||||
|
"name": "HKSWO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "CB-94-1E-F3",
|
||||||
|
"name": "ASIFJ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3F-A6-B3-5E",
|
||||||
|
"name": "CCKEV"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "8E-24-B5-24",
|
||||||
|
"name": "KDVSJ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "27-15-0B-9D",
|
||||||
|
"name": "VCEWY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "FE-38-93-E9",
|
||||||
|
"name": "UKWVN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "07-6F-B6-B6",
|
||||||
|
"name": "FFJDJ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3A-A8-8E-B1",
|
||||||
|
"name": "NHCWO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "A3-15-41-38",
|
||||||
|
"name": "IBRFK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "99-30-04-B1",
|
||||||
|
"name": "FGLXK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "80-A8-91-C8",
|
||||||
|
"name": "BUZRV"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "97-F3-00-93",
|
||||||
|
"name": "WKNTM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C6-F7-45-02",
|
||||||
|
"name": "SPQOQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "25-11-D9-70",
|
||||||
|
"name": "SSRWE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "5B-EF-81-00",
|
||||||
|
"name": "TIBAH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "74-18-01-AE",
|
||||||
|
"name": "EKOFT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "07-27-C3-41",
|
||||||
|
"name": "GJTJW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "23-38-C6-B5",
|
||||||
|
"name": "XIPNP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "35-49-0B-88",
|
||||||
|
"name": "FDFXQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "36-00-7F-1C",
|
||||||
|
"name": "HSCUZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "CB-60-BB-1A",
|
||||||
|
"name": "BYKBF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "FE-5F-E7-FB",
|
||||||
|
"name": "GNOKK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "54-D1-4D-EC",
|
||||||
|
"name": "WLSUB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "9D-D8-C8-53",
|
||||||
|
"name": "DMTTJ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "32-A8-CB-08",
|
||||||
|
"name": "OCFWD"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "A4-B4-FC-74",
|
||||||
|
"name": "CABWU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "9E-E7-87-A0",
|
||||||
|
"name": "BUWRJ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3F-90-8D-56",
|
||||||
|
"name": "OULIX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C7-95-56-96",
|
||||||
|
"name": "XCDYM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "98-5B-99-35",
|
||||||
|
"name": "LREGF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C0-1C-52-1E",
|
||||||
|
"name": "DDLSP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "AE-01-18-81",
|
||||||
|
"name": "DTGHG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "85-46-39-94",
|
||||||
|
"name": "BZWUE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "9C-3C-45-AB",
|
||||||
|
"name": "LGDDS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "14-A5-92-CE",
|
||||||
|
"name": "ERXMY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "A4-35-C5-76",
|
||||||
|
"name": "VJGER"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "69-8E-6A-11",
|
||||||
|
"name": "LOXIE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "04-73-52-C8",
|
||||||
|
"name": "IHARA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "66-48-DF-7B",
|
||||||
|
"name": "ZIQJQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "01-D9-22-86",
|
||||||
|
"name": "ZKUEW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "B4-AC-F6-93",
|
||||||
|
"name": "BLDTO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E3-B8-CC-D4",
|
||||||
|
"name": "OZRQF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "FF-18-3D-CB",
|
||||||
|
"name": "NWPBM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "68-2D-86-1D",
|
||||||
|
"name": "OZDYC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "65-AC-44-36",
|
||||||
|
"name": "ETUZU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "9D-3F-90-E9",
|
||||||
|
"name": "CNQAB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "8B-DE-55-B5",
|
||||||
|
"name": "OPIIW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "15-1B-34-D7",
|
||||||
|
"name": "ACARQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "0D-E1-41-A8",
|
||||||
|
"name": "NMHYG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "19-FB-D2-82",
|
||||||
|
"name": "ASKZD"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C6-55-0A-22",
|
||||||
|
"name": "QMIJT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "61-E4-51-C7",
|
||||||
|
"name": "BBDZL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "65-78-34-50",
|
||||||
|
"name": "WKKYH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "41-9A-BF-99",
|
||||||
|
"name": "AFHJH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "05-0D-82-31",
|
||||||
|
"name": "CASXB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "0D-21-6F-00",
|
||||||
|
"name": "LOXOZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "F7-84-53-CF",
|
||||||
|
"name": "ZTUNO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C2-9A-2D-9A",
|
||||||
|
"name": "QGQNK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "BE-57-E3-29",
|
||||||
|
"name": "SVIBS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "13-39-5D-21",
|
||||||
|
"name": "RSVXL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "A6-3D-D3-AC",
|
||||||
|
"name": "EMESC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "F2-EF-83-5E",
|
||||||
|
"name": "BBXON"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "52-F5-7D-2B",
|
||||||
|
"name": "NGLBK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "BA-30-5C-C7",
|
||||||
|
"name": "MZHBC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "B5-43-98-38",
|
||||||
|
"name": "OYEPB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "95-AC-FD-6F",
|
||||||
|
"name": "RQFNK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E0-12-F0-7D",
|
||||||
|
"name": "MRUUS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E2-5F-C1-1F",
|
||||||
|
"name": "DJDVW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "0B-0B-AF-49",
|
||||||
|
"name": "SOJEJ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C1-AF-BE-FD",
|
||||||
|
"name": "YYSRC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "6B-71-12-94",
|
||||||
|
"name": "AJNMI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E0-D3-67-BB",
|
||||||
|
"name": "IVUSU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "D7-02-23-82",
|
||||||
|
"name": "VYPUB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3F-AA-D7-E0",
|
||||||
|
"name": "SJYUN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "CA-0E-31-E6",
|
||||||
|
"name": "QRGTG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "D4-92-6B-03",
|
||||||
|
"name": "LXIFX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "EE-0A-F5-D3",
|
||||||
|
"name": "YXWTP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "73-EB-04-C8",
|
||||||
|
"name": "SMEFT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "32-37-21-39",
|
||||||
|
"name": "HUTUW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "97-13-49-2E",
|
||||||
|
"name": "DYCLY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "EE-63-92-60",
|
||||||
|
"name": "VBJWP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "B3-88-BB-2B",
|
||||||
|
"name": "CZRPO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "F5-7D-F5-7E",
|
||||||
|
"name": "JCNSP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "AA-A9-B2-83",
|
||||||
|
"name": "EOKCA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "EA-62-F6-F9",
|
||||||
|
"name": "PZEAK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3D-3B-BE-D9",
|
||||||
|
"name": "ERIMX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "75-57-68-54",
|
||||||
|
"name": "NGVPC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "0E-F0-AD-27",
|
||||||
|
"name": "MVONW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "84-39-68-9B",
|
||||||
|
"name": "ZUHOD"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "75-E4-50-0C",
|
||||||
|
"name": "YIATG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E8-F6-C1-CF",
|
||||||
|
"name": "WFQGC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "55-89-B7-34",
|
||||||
|
"name": "NKZQL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "B2-67-DD-0C",
|
||||||
|
"name": "EMIWA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "11-7C-2E-A4",
|
||||||
|
"name": "WOYWY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "CB-D8-B5-A2",
|
||||||
|
"name": "ZBLQG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "CE-A1-20-27",
|
||||||
|
"name": "STQYS"
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,902 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "92-55-B9-B3",
|
||||||
|
"username": "Daniels",
|
||||||
|
"firstname": "Juliana",
|
||||||
|
"lastname": "French",
|
||||||
|
"email": "julianafrench@corecom.com",
|
||||||
|
"password": "7718fd0fb9c0d5659603abdae0523bf487ee6af3",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "10-FE-BD-61",
|
||||||
|
"username": "Lucas",
|
||||||
|
"firstname": "Curry",
|
||||||
|
"lastname": "Church",
|
||||||
|
"email": "currychurch@corecom.com",
|
||||||
|
"password": "9b38c49bd76669828ee450ee727270824129a795",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E0-11-41-DB",
|
||||||
|
"username": "Liz",
|
||||||
|
"firstname": "Geneva",
|
||||||
|
"lastname": "Diaz",
|
||||||
|
"email": "genevadiaz@corecom.com",
|
||||||
|
"password": "a22ba74507e8011b9779b1eb91fbf1b04eb71beb",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "23-77-93-8C",
|
||||||
|
"username": "Jessie",
|
||||||
|
"firstname": "Joann",
|
||||||
|
"lastname": "Melendez",
|
||||||
|
"email": "joannmelendez@corecom.com",
|
||||||
|
"password": "0f561939beae883a24d4a07cf96dd3cec5629187",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E7-DA-79-9B",
|
||||||
|
"username": "Elaine",
|
||||||
|
"firstname": "Fox",
|
||||||
|
"lastname": "Kerr",
|
||||||
|
"email": "foxkerr@corecom.com",
|
||||||
|
"password": "348633ada63ae6a9887872401f6d307134aaeee9",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "0F-9F-56-50",
|
||||||
|
"username": "Tameka",
|
||||||
|
"firstname": "Nieves",
|
||||||
|
"lastname": "Velasquez",
|
||||||
|
"email": "nievesvelasquez@corecom.com",
|
||||||
|
"password": "cb23ab1722ddbdd9fe7cf71a9898b8687e4455ed",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "DB-A3-8A-D7",
|
||||||
|
"username": "Katheryn",
|
||||||
|
"firstname": "Rodriquez",
|
||||||
|
"lastname": "Gomez",
|
||||||
|
"email": "rodriquezgomez@corecom.com",
|
||||||
|
"password": "df3d3345e05eae7544f032bebd4687fed6d03525",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "AF-BB-68-6B",
|
||||||
|
"username": "Bowen",
|
||||||
|
"firstname": "Bender",
|
||||||
|
"lastname": "Holder",
|
||||||
|
"email": "benderholder@corecom.com",
|
||||||
|
"password": "abcfa52d4c5f88f1a396eb2a151cc531892f33b4",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "39-DF-20-69",
|
||||||
|
"username": "Flores",
|
||||||
|
"firstname": "Beck",
|
||||||
|
"lastname": "Murray",
|
||||||
|
"email": "beckmurray@corecom.com",
|
||||||
|
"password": "ebdf9559b529045694a37dd70797f89505b91770",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "88-FA-FC-C3",
|
||||||
|
"username": "Dominique",
|
||||||
|
"firstname": "Tracy",
|
||||||
|
"lastname": "Morin",
|
||||||
|
"email": "tracymorin@corecom.com",
|
||||||
|
"password": "a2416579bcc2e0d4e32d94ba72fe74b9ec664975",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "75-E1-A6-9E",
|
||||||
|
"username": "Deirdre",
|
||||||
|
"firstname": "Phoebe",
|
||||||
|
"lastname": "Pearson",
|
||||||
|
"email": "phoebepearson@corecom.com",
|
||||||
|
"password": "2b89badb731c174884f63f9dc057d9b5d3abb664",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "CC-28-79-89",
|
||||||
|
"username": "Elvira",
|
||||||
|
"firstname": "Latasha",
|
||||||
|
"lastname": "Myers",
|
||||||
|
"email": "latashamyers@corecom.com",
|
||||||
|
"password": "cbce0e5b4b2d17f0c79abbd76f07f3282aa6a2ca",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E1-C8-AB-8C",
|
||||||
|
"username": "Sonya",
|
||||||
|
"firstname": "Shepherd",
|
||||||
|
"lastname": "Mcgowan",
|
||||||
|
"email": "shepherdmcgowan@corecom.com",
|
||||||
|
"password": "20a30cc9baba12fdede04e17d5f170cc9fcf822e",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "7C-94-C4-9A",
|
||||||
|
"username": "Patrick",
|
||||||
|
"firstname": "Sandoval",
|
||||||
|
"lastname": "Wolfe",
|
||||||
|
"email": "sandovalwolfe@corecom.com",
|
||||||
|
"password": "554ee1ceef62cdad454af3b69d0d754630f4b4df",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "36-3C-BB-F4",
|
||||||
|
"username": "Tamra",
|
||||||
|
"firstname": "Julie",
|
||||||
|
"lastname": "Alvarado",
|
||||||
|
"email": "juliealvarado@corecom.com",
|
||||||
|
"password": "7413e384e2768966e7eeb926eed610e923bf587b",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E7-52-B2-35",
|
||||||
|
"username": "Lawanda",
|
||||||
|
"firstname": "Erin",
|
||||||
|
"lastname": "Hayes",
|
||||||
|
"email": "erinhayes@corecom.com",
|
||||||
|
"password": "124b79396de86930007b4f1aa9356b11af471fd8",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "94-E7-44-49",
|
||||||
|
"username": "Susie",
|
||||||
|
"firstname": "Jannie",
|
||||||
|
"lastname": "Thomas",
|
||||||
|
"email": "janniethomas@corecom.com",
|
||||||
|
"password": "37405dfe6877accb9428ffb8d369c5626a10ac5f",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "89-64-A2-C2",
|
||||||
|
"username": "Marlene",
|
||||||
|
"firstname": "Janine",
|
||||||
|
"lastname": "Mcgee",
|
||||||
|
"email": "janinemcgee@corecom.com",
|
||||||
|
"password": "5e60c724022514b4e42b1c277c5326938eee9527",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "AB-E2-19-73",
|
||||||
|
"username": "Lara",
|
||||||
|
"firstname": "Janell",
|
||||||
|
"lastname": "Wilcox",
|
||||||
|
"email": "janellwilcox@corecom.com",
|
||||||
|
"password": "dc66424c5e8aaeb0d65373ccc0e4395e268aea8f",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "88-13-39-95",
|
||||||
|
"username": "Callahan",
|
||||||
|
"firstname": "Gutierrez",
|
||||||
|
"lastname": "Hale",
|
||||||
|
"email": "gutierrezhale@corecom.com",
|
||||||
|
"password": "41d57f3f623589e04db73f28e9a6dc10c3f900bd",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "6A-8B-F5-05",
|
||||||
|
"username": "Ball",
|
||||||
|
"firstname": "Lowery",
|
||||||
|
"lastname": "Clarke",
|
||||||
|
"email": "loweryclarke@corecom.com",
|
||||||
|
"password": "c994259253ea665065862485bcff5fde4cd409f7",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "F2-8B-B7-52",
|
||||||
|
"username": "Tiffany",
|
||||||
|
"firstname": "Noelle",
|
||||||
|
"lastname": "Grant",
|
||||||
|
"email": "noellegrant@corecom.com",
|
||||||
|
"password": "0ee717856d3b9f62e12b832ac11e9940b4ed9e64",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C2-97-8A-D1",
|
||||||
|
"username": "Alisha",
|
||||||
|
"firstname": "Dorsey",
|
||||||
|
"lastname": "Cohen",
|
||||||
|
"email": "dorseycohen@corecom.com",
|
||||||
|
"password": "03e337fd61e20c27378c4064913baecb964f8d2e",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "D1-CD-18-D5",
|
||||||
|
"username": "Kristen",
|
||||||
|
"firstname": "Mosley",
|
||||||
|
"lastname": "Allen",
|
||||||
|
"email": "mosleyallen@corecom.com",
|
||||||
|
"password": "eb3cbffe04f7db182deb056eda47aa3774b08a94",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "BF-18-2B-5A",
|
||||||
|
"username": "Hicks",
|
||||||
|
"firstname": "Georgia",
|
||||||
|
"lastname": "Henry",
|
||||||
|
"email": "georgiahenry@corecom.com",
|
||||||
|
"password": "466f50eaccf0704b77724028b81267a254b4217e",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3A-B9-55-4C",
|
||||||
|
"username": "Miriam",
|
||||||
|
"firstname": "Rosetta",
|
||||||
|
"lastname": "Daugherty",
|
||||||
|
"email": "rosettadaugherty@corecom.com",
|
||||||
|
"password": "724b16ed8ea7c5a83f119f8ae1e5dfabd3bc7d8c",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "6C-90-5E-0A",
|
||||||
|
"username": "Vilma",
|
||||||
|
"firstname": "Adrian",
|
||||||
|
"lastname": "Small",
|
||||||
|
"email": "adriansmall@corecom.com",
|
||||||
|
"password": "72f036819075f34abf4da3f4916e4f8d4e7288e1",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3B-FE-71-B1",
|
||||||
|
"username": "Woods",
|
||||||
|
"firstname": "Benton",
|
||||||
|
"lastname": "Long",
|
||||||
|
"email": "bentonlong@corecom.com",
|
||||||
|
"password": "68073113e98d49c58d228d97c34442a85f918e4a",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "94-B6-5A-D4",
|
||||||
|
"username": "Atkinson",
|
||||||
|
"firstname": "Atkins",
|
||||||
|
"lastname": "Riddle",
|
||||||
|
"email": "atkinsriddle@corecom.com",
|
||||||
|
"password": "fd6afb3b2dd3a95462dabc8fb22cd92f998cba8d",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C3-61-78-F2",
|
||||||
|
"username": "Rogers",
|
||||||
|
"firstname": "Jolene",
|
||||||
|
"lastname": "Young",
|
||||||
|
"email": "joleneyoung@corecom.com",
|
||||||
|
"password": "d24a404d3a33003e94037186dbcf2fbd270b9903",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "7D-2B-DB-BD",
|
||||||
|
"username": "Kirsten",
|
||||||
|
"firstname": "Bush",
|
||||||
|
"lastname": "Luna",
|
||||||
|
"email": "bushluna@corecom.com",
|
||||||
|
"password": "057431e9586c02fb55a225af0452e2a02d1fea20",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "D8-A3-FB-FC",
|
||||||
|
"username": "Iva",
|
||||||
|
"firstname": "Fran",
|
||||||
|
"lastname": "Odom",
|
||||||
|
"email": "franodom@corecom.com",
|
||||||
|
"password": "00dfd8c0cf85fc35e00d8943927c4a3aa443af78",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "D8-3D-79-D5",
|
||||||
|
"username": "Morales",
|
||||||
|
"firstname": "Stevens",
|
||||||
|
"lastname": "Vaughan",
|
||||||
|
"email": "stevensvaughan@corecom.com",
|
||||||
|
"password": "ee773b00b2745a6a013b281524345649986524c3",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "CE-08-DB-1D",
|
||||||
|
"username": "Kellie",
|
||||||
|
"firstname": "Kristi",
|
||||||
|
"lastname": "Gilliam",
|
||||||
|
"email": "kristigilliam@corecom.com",
|
||||||
|
"password": "09d3a7e416cc5d8a0cb55467b893a27cbf47ac0a",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "F1-3C-AA-0D",
|
||||||
|
"username": "Mullen",
|
||||||
|
"firstname": "Trudy",
|
||||||
|
"lastname": "Wolf",
|
||||||
|
"email": "trudywolf@corecom.com",
|
||||||
|
"password": "c2488c6e89659ccc8ec0a9d94a8fe93a10af7543",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "86-EE-8D-B3",
|
||||||
|
"username": "Harper",
|
||||||
|
"firstname": "Penelope",
|
||||||
|
"lastname": "Harrell",
|
||||||
|
"email": "penelopeharrell@corecom.com",
|
||||||
|
"password": "2826391ff5a4eb68610b1eaaaa1822eb9e497990",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "34-1E-E7-CC",
|
||||||
|
"username": "Pollard",
|
||||||
|
"firstname": "Pena",
|
||||||
|
"lastname": "Roberson",
|
||||||
|
"email": "penaroberson@corecom.com",
|
||||||
|
"password": "76a17172e62891db5b6f464c4e7b1dfb4b85ba0f",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "36-E8-D6-7F",
|
||||||
|
"username": "Howell",
|
||||||
|
"firstname": "Maryann",
|
||||||
|
"lastname": "Keith",
|
||||||
|
"email": "maryannkeith@corecom.com",
|
||||||
|
"password": "a029a2716b8d8fd8c8460a58952a90e46a323946",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "23-77-0B-03",
|
||||||
|
"username": "Lina",
|
||||||
|
"firstname": "Allie",
|
||||||
|
"lastname": "Matthews",
|
||||||
|
"email": "alliematthews@corecom.com",
|
||||||
|
"password": "c611086b8e509e75dd6e840ba9252a39a611e529",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "83-1B-E8-D4",
|
||||||
|
"username": "Glover",
|
||||||
|
"firstname": "Giles",
|
||||||
|
"lastname": "Carpenter",
|
||||||
|
"email": "gilescarpenter@corecom.com",
|
||||||
|
"password": "d076d97255e6011adca2459e618c8a9dba140261",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "59-4F-13-7B",
|
||||||
|
"username": "Clarke",
|
||||||
|
"firstname": "Newman",
|
||||||
|
"lastname": "Mays",
|
||||||
|
"email": "newmanmays@corecom.com",
|
||||||
|
"password": "1d5da1ad97f86f1e6325ca221843de7b4cf78629",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "03-58-61-02",
|
||||||
|
"username": "Daphne",
|
||||||
|
"firstname": "Josephine",
|
||||||
|
"lastname": "Ferguson",
|
||||||
|
"email": "josephineferguson@corecom.com",
|
||||||
|
"password": "c4967ca585254f8f2b6b4dc5eb865e3630923d5b",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "5F-CA-AD-DC",
|
||||||
|
"username": "Maddox",
|
||||||
|
"firstname": "Larson",
|
||||||
|
"lastname": "Guthrie",
|
||||||
|
"email": "larsonguthrie@corecom.com",
|
||||||
|
"password": "8840ac79e06e6ab074d29643f2ec6b70d92570d3",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "29-12-1D-1B",
|
||||||
|
"username": "Ernestine",
|
||||||
|
"firstname": "Heidi",
|
||||||
|
"lastname": "Harris",
|
||||||
|
"email": "heidiharris@corecom.com",
|
||||||
|
"password": "0776675c8522200f8376336a99d8fe3b404fe968",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E9-61-60-8B",
|
||||||
|
"username": "Bernice",
|
||||||
|
"firstname": "Ella",
|
||||||
|
"lastname": "Golden",
|
||||||
|
"email": "ellagolden@corecom.com",
|
||||||
|
"password": "0aec0b8cf2230cbee1b75b0feba719f6bc7b4e0b",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3B-27-8E-1F",
|
||||||
|
"username": "Rhodes",
|
||||||
|
"firstname": "Cantrell",
|
||||||
|
"lastname": "Castaneda",
|
||||||
|
"email": "cantrellcastaneda@corecom.com",
|
||||||
|
"password": "7a4ea97f9c78fb5596c03b414170afd804e204b2",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "49-DF-A5-C2",
|
||||||
|
"username": "Nancy",
|
||||||
|
"firstname": "Audrey",
|
||||||
|
"lastname": "Wallace",
|
||||||
|
"email": "audreywallace@corecom.com",
|
||||||
|
"password": "8b0804f444da8c44fe3754aba17139bf3bf3c94d",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "B1-87-EA-BF",
|
||||||
|
"username": "Abigail",
|
||||||
|
"firstname": "Mcmillan",
|
||||||
|
"lastname": "Savage",
|
||||||
|
"email": "mcmillansavage@corecom.com",
|
||||||
|
"password": "468b273cb88b002da5dc922c80c89b909357cbaa",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "63-7F-09-29",
|
||||||
|
"username": "Levy",
|
||||||
|
"firstname": "Shawna",
|
||||||
|
"lastname": "Hicks",
|
||||||
|
"email": "shawnahicks@corecom.com",
|
||||||
|
"password": "5748e09d9c2133bb782d3ba78dec0b095b3ca2a4",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C9-48-F7-62",
|
||||||
|
"username": "Juarez",
|
||||||
|
"firstname": "Lynn",
|
||||||
|
"lastname": "Roth",
|
||||||
|
"email": "lynnroth@corecom.com",
|
||||||
|
"password": "7b427ab021a717478391d3361e956d8ba34ea879",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "DF-CD-42-C9",
|
||||||
|
"username": "Pruitt",
|
||||||
|
"firstname": "Minerva",
|
||||||
|
"lastname": "Tran",
|
||||||
|
"email": "minervatran@corecom.com",
|
||||||
|
"password": "d46cf1a3954580cb538921caaf85fae0dd758e5a",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "9F-E7-39-8A",
|
||||||
|
"username": "Richard",
|
||||||
|
"firstname": "Norris",
|
||||||
|
"lastname": "West",
|
||||||
|
"email": "norriswest@corecom.com",
|
||||||
|
"password": "70c47fb0abe612be1cd0f3fa51dcce5e9a36fc1a",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "F5-AA-76-14",
|
||||||
|
"username": "Lindsay",
|
||||||
|
"firstname": "Wright",
|
||||||
|
"lastname": "Delgado",
|
||||||
|
"email": "wrightdelgado@corecom.com",
|
||||||
|
"password": "fee325ea1fd06bae0aef0a6c76bb9dc45b49b653",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "A5-C8-50-F5",
|
||||||
|
"username": "Darla",
|
||||||
|
"firstname": "May",
|
||||||
|
"lastname": "Mcconnell",
|
||||||
|
"email": "maymcconnell@corecom.com",
|
||||||
|
"password": "2725d19076cb23aa8fd149dcee24f61ab5388cbd",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "A0-0E-D0-AC",
|
||||||
|
"username": "Nolan",
|
||||||
|
"firstname": "Herrera",
|
||||||
|
"lastname": "Randall",
|
||||||
|
"email": "herrerarandall@corecom.com",
|
||||||
|
"password": "0fdaee6506f65f91737e5e686c2b2b46efef28c7",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "FF-1F-FD-20",
|
||||||
|
"username": "Zelma",
|
||||||
|
"firstname": "Gwendolyn",
|
||||||
|
"lastname": "Yates",
|
||||||
|
"email": "gwendolynyates@corecom.com",
|
||||||
|
"password": "023c94ccd4e8650575362287242fe3adc4085519",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "7D-0D-95-B1",
|
||||||
|
"username": "Avila",
|
||||||
|
"firstname": "Ramos",
|
||||||
|
"lastname": "Benton",
|
||||||
|
"email": "ramosbenton@corecom.com",
|
||||||
|
"password": "6911c3f6b80310363b6d880eb9c143f38921fcfd",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "9D-5A-95-A9",
|
||||||
|
"username": "Etta",
|
||||||
|
"firstname": "Graves",
|
||||||
|
"lastname": "Horne",
|
||||||
|
"email": "graveshorne@corecom.com",
|
||||||
|
"password": "dbce0141e9e291a4d378d14c2d2d25cbe7f9eeec",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "B9-3C-5A-74",
|
||||||
|
"username": "Ava",
|
||||||
|
"firstname": "Maribel",
|
||||||
|
"lastname": "Lawrence",
|
||||||
|
"email": "maribellawrence@corecom.com",
|
||||||
|
"password": "f194d0f315ca8f468b5d80a8fdd394a181fd752d",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E0-B9-0F-F5",
|
||||||
|
"username": "Stein",
|
||||||
|
"firstname": "Peterson",
|
||||||
|
"lastname": "Lindsey",
|
||||||
|
"email": "petersonlindsey@corecom.com",
|
||||||
|
"password": "d2ab2005065787d5bfbff3556ff51ac6786a2ba8",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "BD-A1-69-F0",
|
||||||
|
"username": "Tommie",
|
||||||
|
"firstname": "Lee",
|
||||||
|
"lastname": "Chen",
|
||||||
|
"email": "leechen@corecom.com",
|
||||||
|
"password": "9a990087014b1d85646c9ec2d504fe067f60c39c",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "81-8B-3B-DD",
|
||||||
|
"username": "Holmes",
|
||||||
|
"firstname": "Doreen",
|
||||||
|
"lastname": "Ramos",
|
||||||
|
"email": "doreenramos@corecom.com",
|
||||||
|
"password": "a5510d2adc6b1785f6fe08fd9599be777952eadc",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "8D-C8-12-6C",
|
||||||
|
"username": "Todd",
|
||||||
|
"firstname": "Sherri",
|
||||||
|
"lastname": "Knight",
|
||||||
|
"email": "sherriknight@corecom.com",
|
||||||
|
"password": "1590a127ffe84d37118ff543d4cc8c0b0fc828d1",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "12-74-96-57",
|
||||||
|
"username": "Henry",
|
||||||
|
"firstname": "Kane",
|
||||||
|
"lastname": "Martinez",
|
||||||
|
"email": "kanemartinez@corecom.com",
|
||||||
|
"password": "3e6a21cc8850b55ce954e0bc0614ca814c13a840",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "5E-CA-06-D0",
|
||||||
|
"username": "Liliana",
|
||||||
|
"firstname": "Eleanor",
|
||||||
|
"lastname": "Molina",
|
||||||
|
"email": "eleanormolina@corecom.com",
|
||||||
|
"password": "9dc9e7d76223a7f7494d644c69fb73e72bbfb8c0",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "46-D5-1C-58",
|
||||||
|
"username": "Angelita",
|
||||||
|
"firstname": "Pennington",
|
||||||
|
"lastname": "Simpson",
|
||||||
|
"email": "penningtonsimpson@corecom.com",
|
||||||
|
"password": "92ec823b4054e1ebb72eb42cef777f2cbae5191b",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "04-D8-00-77",
|
||||||
|
"username": "Mcintyre",
|
||||||
|
"firstname": "Tami",
|
||||||
|
"lastname": "Clements",
|
||||||
|
"email": "tamiclements@corecom.com",
|
||||||
|
"password": "e76563ed028f6a61b3676c1d6ff3dfef13c335bf",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "85-F4-B2-64",
|
||||||
|
"username": "Baker",
|
||||||
|
"firstname": "Noreen",
|
||||||
|
"lastname": "Chang",
|
||||||
|
"email": "noreenchang@corecom.com",
|
||||||
|
"password": "8f0b82179c2e3c01d22c7cfc61469a08c11fe972",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "99-82-48-DC",
|
||||||
|
"username": "Barbra",
|
||||||
|
"firstname": "Charlene",
|
||||||
|
"lastname": "Meadows",
|
||||||
|
"email": "charlenemeadows@corecom.com",
|
||||||
|
"password": "1d605e5128de62077fb24442c4a2e650786bfc79",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "51-FC-6F-FB",
|
||||||
|
"username": "Delacruz",
|
||||||
|
"firstname": "Lois",
|
||||||
|
"lastname": "Ware",
|
||||||
|
"email": "loisware@corecom.com",
|
||||||
|
"password": "ab1214f59416305b6e3c79a87ab88b1b724a1b33",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C5-20-CB-4B",
|
||||||
|
"username": "Wall",
|
||||||
|
"firstname": "Mcgee",
|
||||||
|
"lastname": "Washington",
|
||||||
|
"email": "mcgeewashington@corecom.com",
|
||||||
|
"password": "578bcdf6c794d5adae4e18c4ff71eb03b9b5b1f1",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "BA-25-6F-EA",
|
||||||
|
"username": "Wilkinson",
|
||||||
|
"firstname": "Langley",
|
||||||
|
"lastname": "Oneil",
|
||||||
|
"email": "langleyoneil@corecom.com",
|
||||||
|
"password": "af13286c8c24ba418182d3aaefde6a5cc01e8e6e",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "D6-9E-A2-80",
|
||||||
|
"username": "Rosalie",
|
||||||
|
"firstname": "Frost",
|
||||||
|
"lastname": "Floyd",
|
||||||
|
"email": "frostfloyd@corecom.com",
|
||||||
|
"password": "92ed95d940adddb5b4b7bbe2874856b09062f007",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "26-C4-EB-5D",
|
||||||
|
"username": "Mae",
|
||||||
|
"firstname": "Diaz",
|
||||||
|
"lastname": "Pruitt",
|
||||||
|
"email": "diazpruitt@corecom.com",
|
||||||
|
"password": "7539b4a221bf6c0764d269514a6f548c2b4c9f3c",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "8A-BF-C9-3D",
|
||||||
|
"username": "Bernadine",
|
||||||
|
"firstname": "Bullock",
|
||||||
|
"lastname": "Tucker",
|
||||||
|
"email": "bullocktucker@corecom.com",
|
||||||
|
"password": "938f7a23f86230770b7edec8a316edd05f01a38f",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "17-4B-80-EC",
|
||||||
|
"username": "Norman",
|
||||||
|
"firstname": "Foster",
|
||||||
|
"lastname": "Hyde",
|
||||||
|
"email": "fosterhyde@corecom.com",
|
||||||
|
"password": "bc5dc4129b7e3e89901e688f94b44f92b7547f9e",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C8-5B-C6-4A",
|
||||||
|
"username": "Terra",
|
||||||
|
"firstname": "Hahn",
|
||||||
|
"lastname": "Larsen",
|
||||||
|
"email": "hahnlarsen@corecom.com",
|
||||||
|
"password": "59e34409cc08114706d32c96097b4045843739e2",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "BD-6F-75-F0",
|
||||||
|
"username": "Ina",
|
||||||
|
"firstname": "Payne",
|
||||||
|
"lastname": "Hawkins",
|
||||||
|
"email": "paynehawkins@corecom.com",
|
||||||
|
"password": "98c8df2cb860a5eb7243fae1b541b469cda83265",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C4-DB-18-8B",
|
||||||
|
"username": "Sabrina",
|
||||||
|
"firstname": "Leach",
|
||||||
|
"lastname": "Cantrell",
|
||||||
|
"email": "leachcantrell@corecom.com",
|
||||||
|
"password": "8f68f0d8f4bf7c279cc5f67335d307cd0735e3bf",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "23-4D-56-D9",
|
||||||
|
"username": "Karla",
|
||||||
|
"firstname": "Roxanne",
|
||||||
|
"lastname": "Bullock",
|
||||||
|
"email": "roxannebullock@corecom.com",
|
||||||
|
"password": "a67ab1116f048e5fde51019badc8246cf9201f36",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "04-08-EB-92",
|
||||||
|
"username": "Clements",
|
||||||
|
"firstname": "Munoz",
|
||||||
|
"lastname": "Brooks",
|
||||||
|
"email": "munozbrooks@corecom.com",
|
||||||
|
"password": "fccfbfa65dbe6c0cb6c7a489c4b9771443782fce",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "EB-DB-FD-87",
|
||||||
|
"username": "Mccullough",
|
||||||
|
"firstname": "Sofia",
|
||||||
|
"lastname": "Farley",
|
||||||
|
"email": "sofiafarley@corecom.com",
|
||||||
|
"password": "669c1c48f4ba6090f16e2ebfe3a6dfd3e55ea291",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "83-F4-17-0D",
|
||||||
|
"username": "Cheri",
|
||||||
|
"firstname": "Trina",
|
||||||
|
"lastname": "Walls",
|
||||||
|
"email": "trinawalls@corecom.com",
|
||||||
|
"password": "5ed0a7f1b6e13841fe06e93d67d67886dbca283e",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E7-7D-E0-52",
|
||||||
|
"username": "Mcclain",
|
||||||
|
"firstname": "Price",
|
||||||
|
"lastname": "Gentry",
|
||||||
|
"email": "pricegentry@corecom.com",
|
||||||
|
"password": "2c2aa9f5961bc8906718abdd09b2e54aa3caf6a7",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "0F-6C-B6-F9",
|
||||||
|
"username": "Leona",
|
||||||
|
"firstname": "Adriana",
|
||||||
|
"lastname": "Williamson",
|
||||||
|
"email": "adrianawilliamson@corecom.com",
|
||||||
|
"password": "f3255b73f2e807b11cedcd2124c689e4c3ec742e",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "2D-C2-9C-32",
|
||||||
|
"username": "Roslyn",
|
||||||
|
"firstname": "Garner",
|
||||||
|
"lastname": "Armstrong",
|
||||||
|
"email": "garnerarmstrong@corecom.com",
|
||||||
|
"password": "7de33fcbdc4ea015f72d867d6b956bc3fe47ab0a",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "1C-5E-93-06",
|
||||||
|
"username": "Castillo",
|
||||||
|
"firstname": "Rachael",
|
||||||
|
"lastname": "Trevino",
|
||||||
|
"email": "rachaeltrevino@corecom.com",
|
||||||
|
"password": "c2283af9be2c0db8ec5fbdc2c6b4bfa9eec424bb",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "6F-49-74-A5",
|
||||||
|
"username": "Helen",
|
||||||
|
"firstname": "Samantha",
|
||||||
|
"lastname": "Gates",
|
||||||
|
"email": "samanthagates@corecom.com",
|
||||||
|
"password": "1d9e72419c316b6da5d006748ac983087b38f072",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "54-65-6C-9F",
|
||||||
|
"username": "Olson",
|
||||||
|
"firstname": "Sweet",
|
||||||
|
"lastname": "Barry",
|
||||||
|
"email": "sweetbarry@corecom.com",
|
||||||
|
"password": "11e5db47cc15fec40f359674802f80c1d7a00f5b",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "BC-1E-40-1A",
|
||||||
|
"username": "Ann",
|
||||||
|
"firstname": "Evans",
|
||||||
|
"lastname": "Howe",
|
||||||
|
"email": "evanshowe@corecom.com",
|
||||||
|
"password": "f19aab303f71391069117399362f280378962469",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "F1-D0-5D-4E",
|
||||||
|
"username": "Haynes",
|
||||||
|
"firstname": "Russell",
|
||||||
|
"lastname": "Shannon",
|
||||||
|
"email": "russellshannon@corecom.com",
|
||||||
|
"password": "fa3204a1deabacda8d4f2e25056a61c7c3a50b71",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "D5-E3-43-71",
|
||||||
|
"username": "Malinda",
|
||||||
|
"firstname": "Alvarez",
|
||||||
|
"lastname": "Singleton",
|
||||||
|
"email": "alvarezsingleton@corecom.com",
|
||||||
|
"password": "9274d7ab8718f07d5b06c7bda94320b01cbce80d",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "23-41-81-AB",
|
||||||
|
"username": "Cochran",
|
||||||
|
"firstname": "Mcgowan",
|
||||||
|
"lastname": "Mclaughlin",
|
||||||
|
"email": "mcgowanmclaughlin@corecom.com",
|
||||||
|
"password": "f6bd26e02cd87c09a62087210a3ac35615e248ed",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "28-86-38-25",
|
||||||
|
"username": "Winters",
|
||||||
|
"firstname": "Eugenia",
|
||||||
|
"lastname": "Anthony",
|
||||||
|
"email": "eugeniaanthony@corecom.com",
|
||||||
|
"password": "87c91e44121cfba9f5ef76b0f121f6ace5997989",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "C7-7C-E2-41",
|
||||||
|
"username": "Richardson",
|
||||||
|
"firstname": "King",
|
||||||
|
"lastname": "Rodriguez",
|
||||||
|
"email": "kingrodriguez@corecom.com",
|
||||||
|
"password": "5b7d5be566bf6ff86a8f241741165bd0b7d2a944",
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "6B-1B-5E-A7",
|
||||||
|
"username": "Walker",
|
||||||
|
"firstname": "Montoya",
|
||||||
|
"lastname": "Meyer",
|
||||||
|
"email": "montoyameyer@corecom.com",
|
||||||
|
"password": "323c935631ef2396afc59d93ce7080df7e7cd1b5",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "48-03-38-1F",
|
||||||
|
"username": "Witt",
|
||||||
|
"firstname": "Larsen",
|
||||||
|
"lastname": "Strong",
|
||||||
|
"email": "larsenstrong@corecom.com",
|
||||||
|
"password": "8292d357d783eb4ab3900fba170fb8977e9a8720",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "E0-4B-04-F6",
|
||||||
|
"username": "Valarie",
|
||||||
|
"firstname": "Craft",
|
||||||
|
"lastname": "Klein",
|
||||||
|
"email": "craftklein@corecom.com",
|
||||||
|
"password": "b1f2ec40a2f4457d88662b3ef22ff8fe16fb5e4c",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "2F-7D-0A-51",
|
||||||
|
"username": "Jessica",
|
||||||
|
"firstname": "Delgado",
|
||||||
|
"lastname": "Campos",
|
||||||
|
"email": "delgadocampos@corecom.com",
|
||||||
|
"password": "8125b1397016438dc4342d829c286b7597c69803",
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "91-D4-7E-65",
|
||||||
|
"username": "Velez",
|
||||||
|
"firstname": "Mcmahon",
|
||||||
|
"lastname": "Lott",
|
||||||
|
"email": "mcmahonlott@corecom.com",
|
||||||
|
"password": "b6a433da4441737be56635dd80d1a5a8eec2bcd3",
|
||||||
|
"status": 1
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,24 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
'repeat:100': {
|
||||||
|
|
||||||
|
|
||||||
|
code: function(tags){
|
||||||
|
|
||||||
|
function randHex(){ return ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'][Math.floor(Math.random()*16)]; }
|
||||||
|
|
||||||
|
return randHex()+randHex()+'-'+randHex()+randHex()+'-'+randHex()+randHex()+'-'+randHex()+randHex();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
name: function(tags){
|
||||||
|
|
||||||
|
function randLet(){ return String.fromCharCode(65+Math.floor(Math.random()*26)); }
|
||||||
|
|
||||||
|
return randLet()+randLet()+randLet()+randLet()+randLet();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,31 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
'repeat:100': {
|
||||||
|
|
||||||
|
code: function(tags){
|
||||||
|
|
||||||
|
function randHex(){ return ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'][Math.floor(Math.random()*16)]; }
|
||||||
|
|
||||||
|
return randHex()+randHex()+'-'+randHex()+randHex()+'-'+randHex()+randHex()+'-'+randHex()+randHex();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
username: '{{firstName()}}',
|
||||||
|
firstname: '{{firstName()}}',
|
||||||
|
lastname: '{{surname()}}',
|
||||||
|
email: function (tags) {
|
||||||
|
// Email tag is deprecated, because now you can produce an email as simple as this:
|
||||||
|
return this.firstname + '.' + this.lastname + '@gmail.com';
|
||||||
|
},
|
||||||
|
password: function(tags){
|
||||||
|
var result = '';
|
||||||
|
for(var i = 0 ; i < 40 ; i++ )
|
||||||
|
result += ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'][Math.floor(Math.random()*16)];
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
status: '{{integer(0,1)}}'
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"userDefault" :[
|
||||||
|
"create",
|
||||||
|
|
||||||
|
"link",
|
||||||
|
"unlink",
|
||||||
|
|
||||||
|
"search",
|
||||||
|
|
||||||
|
"getAll",
|
||||||
|
"getById",
|
||||||
|
"getByCode",
|
||||||
|
"getByUsername",
|
||||||
|
|
||||||
|
"getClusters",
|
||||||
|
|
||||||
|
"edit",
|
||||||
|
|
||||||
|
"delete"
|
||||||
|
],
|
||||||
|
|
||||||
|
"machineDefault" :[
|
||||||
|
"create",
|
||||||
|
|
||||||
|
"link",
|
||||||
|
"unlink",
|
||||||
|
|
||||||
|
"search",
|
||||||
|
|
||||||
|
"getAll",
|
||||||
|
"getById",
|
||||||
|
"getByCode",
|
||||||
|
"getByName",
|
||||||
|
|
||||||
|
"getClusters",
|
||||||
|
|
||||||
|
"edit",
|
||||||
|
|
||||||
|
"delete"
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
"user": [
|
||||||
|
"create",
|
||||||
|
|
||||||
|
"search",
|
||||||
|
|
||||||
|
"getAll",
|
||||||
|
"getById",
|
||||||
|
"getByCode",
|
||||||
|
"getByUsername",
|
||||||
|
|
||||||
|
"getClusters",
|
||||||
|
|
||||||
|
"edit",
|
||||||
|
|
||||||
|
"delete"
|
||||||
|
],
|
||||||
|
|
||||||
|
"machine": [
|
||||||
|
"create",
|
||||||
|
|
||||||
|
"search",
|
||||||
|
|
||||||
|
"getAll",
|
||||||
|
"getById",
|
||||||
|
"getByCode",
|
||||||
|
"getByName",
|
||||||
|
|
||||||
|
"getClusters",
|
||||||
|
|
||||||
|
"edit",
|
||||||
|
|
||||||
|
"delete"
|
||||||
|
],
|
||||||
|
|
||||||
|
"cluster": [
|
||||||
|
"create",
|
||||||
|
"link",
|
||||||
|
"unlink",
|
||||||
|
|
||||||
|
"getAll",
|
||||||
|
"getById",
|
||||||
|
"getByName",
|
||||||
|
"getMerge",
|
||||||
|
|
||||||
|
"getMembers",
|
||||||
|
|
||||||
|
"delete"
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
/*# sourceMappingURL=constants.css.map */
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "",
|
||||||
|
"sources": [],
|
||||||
|
"names": [],
|
||||||
|
"file": "constants.css"
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
/* COULEUR DU THEME */
|
||||||
|
$theme-color: #e63321;
|
||||||
|
|
||||||
|
/* COULEUR DU SOUS-MENU */
|
||||||
|
$sub-menu-color: #5b5e63;
|
||||||
|
|
||||||
|
/* COULEUR DES ERREURS */
|
||||||
|
$error-color: #cc5857;
|
||||||
|
|
||||||
|
/* FORMULAIRES */
|
||||||
|
$form-valid-color: #27a560;
|
||||||
|
$form-neutral-color: #2193e6;
|
||||||
|
$form-search-color: #5630ed;
|
||||||
|
$form-invalid-color: #d52918;
|
||||||
|
|
||||||
|
|
||||||
|
/* GESTION DES LONGUEURS */
|
||||||
|
$menu-side-width: 4em;
|
||||||
|
|
||||||
|
|
||||||
|
// POUR RESOURCE_DISPATCHER
|
||||||
|
$rd-form-valid-color: '27a560';
|
||||||
|
$rd-form-neutral-color: '2193e6';
|
||||||
|
$rd-form-search-color: '5630ed';
|
||||||
|
$rd-form-invalid-color: 'd52918';
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAMC,2BAAW,CACV,OAAO,CAAE,IAAI,CACb,SAAS,CAAE,CAAC,CAIb,kCAAkB,CACjB,OAAO,CAAE,KAAK,CAIf,uCAAuB,CACtB,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,WAAW,CAAE,UAAU,CACvB,eAAe,CAAE,UAAU,CAC3B,SAAS,CAAE,IAAI,CAEf,mDAAW,CACV,IAAI,CAAE,KAAK,CAIZ,kDAAU,CACT,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CAEjB,IAAI,CAAE,4BAA4B,CAClC,MAAM,CAAE,GAAG,CACZ,MAAM,CAAE,GAAG,CACX,OAAO,CAAE,QAAQ,CACjB,YAAY,CAAE,GAAG,CAEhB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAAiB,CAGzB,UAAU,CAAE,wEAAuE,CACnF,eAAe,CAAE,GAAG,CAEpB,UAAU,CAAE,sBAAsB,CAElC,iHACO,CACN,YAAY,CCtCI,OAAO,CD2C1B,8CAAM,CACL,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,4BAA4B,CACnC,MAAM,CAAE,GAAG,CACZ,MAAM,CAAE,GAAG,CACX,OAAO,CAAE,GAAG,CAEZ,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAA6B,CAErC,UAAU,CCrDQ,OAAO,CDuDzB,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,eAAuC,CAQtD,uCAAyB,CACxB,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CAEjB,IAAI,CAAE,2BAA2B,CACjC,MAAM,CAAE,GAAG,CACX,OAAO,CAAE,GAAG,CAEZ,aAAa,CAAE,GAAG,CAClB,UAAU,CAAE,eAAe,CAE3B,gBAAgB,CAAE,IAAI,CAGtB,8CAAQ,CACP,OAAO,CAAE,IAAI,CAGd,yCAAC,CACA,eAAe,CAAE,IAAI,CACrB,KAAK,CAAE,OAAO,CAIf,8CAAM,CACL,OAAO,CAAE,YAAY,CAErB,SAAS,CAAE,MAAM,CACjB,WAAW,CAAE,IAAI,CAEjB,KAAK,CAAE,OAAwB,CAC/B,WAAW,CAAE,MAAM,CAEnB,mDAAQ,CACP,SAAS,CAAE,IAAI,CACf,KAAK,CAAE,IAAI,CAMb,2FACK,CACJ,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,GAAG,CACX,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,MAAM,CAGnB,mGAAG,CACF,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,CAClB,aAAa,CAAE,KAAK,CACpB,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,GAAG,CAEZ,cAAc,CAAE,IAAI,CAEpB,6GAAI,CACH,IAAI,CAAE,eAAe,CAErB,cAAc,CAAE,IAAI,CASvB,+CAAO,CACN,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,GAAG,CACX,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,MAAM,CAGnB,mDAAG,CACF,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,CAClB,aAAa,CAAE,KAAK,CACpB,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,GAAG,CAEZ,cAAc,CAAE,IAAI,CAEpB,wDAAI,CACH,IAAI,CAAE,eAAe,CAErB,cAAc,CAAE,IAAI,CAItB,oDAAI,CACH,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,SAAS,CAClB,YAAY,CAAE,kBAAkB,CAEhC,aAAa,CAAE,WAAW,CAC1B,MAAM,CAAE,iBAAiB,CACzB,UAAU,CAAE,qBAAqB,CAEjC,gBAAgB,CAAE,OAAO,CAEzB,KAAK,CAAE,IAAI,CAEX,MAAM,CAAE,OAAO,CAGf,2DAAQ,CACP,OAAO,CAAE,GAAG,CAEZ,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,IAAI,CACT,IAAI,CAAE,IAAI,CACV,MAAM,CAAE,yBAAyB,CAClC,OAAO,CAAE,SAAS,CAElB,aAAa,CAAE,WAAW,CAC1B,MAAM,CAAE,iBAAiB,CACzB,UAAU,CAAE,qBAAqB,CAEjC,gBAAgB,CAAE,OAAO,CAEzB,KAAK,CAAE,OAAO,CAEd,MAAM,CAAE,OAAO,CAGhB,iEAAc,CACb,KAAK,CCxMU,OAAO,CD+MzB,uGACY,CACX,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,KAAK,CACZ,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CACZ,WAAW,CAAE,GAAG,CAEhB,MAAM,CAAE,OAAO,CAEf,+GAAO,CACN,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,IAAI,CAAE,eAAe,CAErB,UAAU,CAAE,oBAAoB,CAEhC,cAAc,CAAE,IAAI,CAIpB,2HAAO,CACN,IAAI,CAAE,kBAA8B,CASrC,8DAAO,CACN,IAAI,CAAE,kBAA8B,CASzC,gCAAkB,CACjB,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,IAAI,CAAE,GAAG,CACT,MAAM,CAAE,MAAM,CACd,OAAO,CAAE,GAAG,CAEb,aAAa,CAAE,GAAG,CAClB,YAAY,CCjQO,OAAO,CDkQ1B,UAAU,CAAE,eAAe,CAE3B,gBAAgB,CAAE,IAAI,CAEtB,SAAS,CAAE,gBAAgB,CAI3B,sCAAO,CACN,YAAY,CC9QM,OAAO,CDiR1B,wCAAS,CACR,YAAY,CCjRM,OAAO,CDoR1B,uCAAQ,CACP,YAAY,CCrRM,OAAO,CDyR1B,uGACmB,CAClB,OAAO,CAAE,YAAY,CACpB,KAAK,CAAE,IAAI,CAEZ,UAAU,CAAE,MAAM,CAClB,KAAK,CAAE,OAAO,CAEd,iHAAI,CACH,KAAK,CAAE,OAAO,CAMhB,6fAQ4B,CAC3B,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,KAAK,CACb,OAAO,CAAE,QAAQ,CAEjB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAAiB,CAEzB,KAAK,CAAE,OAAO,CAEd,UAAU,CAAE,sBAAsB,CAElC,umCACO,CACN,YAAY,CC5TK,OAAO,CDuUzB,uvBACO,CACN,YAAY,CC5UK,OAAO,CDuVzB,+wBACO,CACN,YAAY,CCxVK,OAAO,CDmWzB,mwBACO,CACN,YAAY,CCpWK,OAAO,CD2W1B,uIAEkB,CACjB,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,IAAI,CAAE,GAAG,CAEV,OAAO,CAAE,QAAQ,CAEjB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAA6B,CAErC,UAAU,CAAE,+BAA2C,CAEvD,KAAK,CAAE,IAAI,CAEX,UAAU,CAAE,0BAA0B,CAEtC,SAAS,CAAE,gBAAgB,CAE3B,sdAEU,CACT,gBAAgB,CAAE,IAAI,CACtB,KAAK,CClYY,OAAO,CDwY1B,2FACgB,CACf,YAAY,CC7YM,OAAO,CD+YzB,gBAAgB,CC/YE,OAAO,CDiZzB,6TAEU,CACT,gBAAgB,CAAE,IAAI,CACtB,KAAK,CCrZY,OAAO,CD0Z1B,+FACkB,CACjB,YAAY,CC3ZM,OAAO,CD6ZzB,gBAAgB,CC7ZE,OAAO,CD+ZzB,yUAEU,CACT,gBAAgB,CAAE,IAAI,CACtB,KAAK,CCnaY,OAAO,CDwa1B,6FACiB,CAChB,YAAY,CCzaM,OAAO,CD2azB,gBAAgB,CC3aE,OAAO,CD6azB,mUAEU,CACT,gBAAgB,CAAE,IAAI,CACtB,KAAK,CCjbY,OAAO,CDub1B,4JAEa,CACZ,gBAAgB,CAAE,IAAI,CACtB,gBAAgB,CAAE,mDAAoE,CACtF,eAAe,CAAE,QAAQ,CAEzB,KAAK,CAAE,sBAAsB,CAI9B,yGACuB,CACtB,gBAAgB,CAAE,mDAAoE,CAEvF,6GACyB,CACxB,gBAAgB,CAAE,mDAAoE,CAEvF,2GACwB,CACvB,gBAAgB,CAAE,mDAAoE,CAMvF,kDAAiB,CAChB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,CAAC,CAEV,MAAM,CAAE,CAAC,CACT,aAAa,CAAE,kBAA8B,CAE7C,yDAAQ,CACP,OAAO,CAAE,gBAAgB,CACzB,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,GAAG,CACR,IAAI,CAAE,GAAG,CACT,OAAO,CAAE,KAAK,CAEf,gBAAgB,CAAE,IAAI,CAEtB,KAAK,CCpeY,OAAO,CDsexB,SAAS,CAAE,iCAAiC,CAM9C,0FACW,CACV,aAAa,CAAE,kBAA4B,CAC3C,wGAAQ,CACP,KAAK,CCnfY,OAAO,CDyf1B,8FACa,CACZ,aAAa,CAAE,kBAA8B,CAC7C,4GAAQ,CACP,KAAK,CC5fY,OAAO,CDkgB1B,4FACY,CACX,aAAa,CAAE,kBAA6B,CAC5C,0GAAQ,CACP,KAAK,CCrgBY,OAAO",
|
||||||
|
"sources": ["container.scss","constants.scss"],
|
||||||
|
"names": [],
|
||||||
|
"file": "container.css"
|
||||||
|
}
|
|
@ -0,0 +1,536 @@
|
||||||
|
@import 'constants';
|
||||||
|
|
||||||
|
#WRAPPER > #CONTAINER{
|
||||||
|
|
||||||
|
/* [1] Section (contenu)
|
||||||
|
=========================================================*/
|
||||||
|
& > section{
|
||||||
|
display: none;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @active
|
||||||
|
& > section.active{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @active + .list
|
||||||
|
& > section.active.list{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.inline-box{
|
||||||
|
flex: 0 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Barre de recherche
|
||||||
|
.searchbar{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
// width: calc( 100% - 2*1em - 2*1em );
|
||||||
|
flex: calc( 100% - 2*1em - 2*1em );
|
||||||
|
height: 1em;
|
||||||
|
margin: 1em;
|
||||||
|
padding: .5em 1em;
|
||||||
|
padding-left: 2em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #b1b1b1;
|
||||||
|
// box-shadow: 0 0 1px #b7b7b7;
|
||||||
|
|
||||||
|
background: #fff url('/f/svg/search/st/sub-menu-side/b1b1b1') .5em center no-repeat;
|
||||||
|
background-size: 1em;
|
||||||
|
|
||||||
|
transition: border .4s ease-in-out;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus{
|
||||||
|
border-color: $form-search-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Erreur
|
||||||
|
.error{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
width: calc( 100% - 2*1em - 2*1em );
|
||||||
|
height: 1em;
|
||||||
|
margin: 1em;
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid $form-invalid-color;
|
||||||
|
|
||||||
|
background: $form-invalid-color;
|
||||||
|
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 1px 1px darken($form-invalid-color, 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] INLINE-BOX pour afficher les listes de donnees
|
||||||
|
=========================================================*/
|
||||||
|
& > section > .inline-box{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
// width: calc( 50% - 2*1em - 2*1em );
|
||||||
|
flex: calc( 50% - 2*1em - 2*1em );
|
||||||
|
margin: 1em;
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: 0 0 1px #b7b7b7;
|
||||||
|
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
// Lors de la recherche, quand on veut en masquer
|
||||||
|
&.hidden{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a{
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (1) Titre de l'element */
|
||||||
|
.title{
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
font-size: 1.15em;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
color: darken($theme-color, 10);
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
& > span{
|
||||||
|
font-size: .8em;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (2) Code RFID */
|
||||||
|
/* (3) Adresse mail */
|
||||||
|
.code,
|
||||||
|
.mail{
|
||||||
|
display: block;
|
||||||
|
margin: 1em;
|
||||||
|
color: #333;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
// svg (icone)
|
||||||
|
svg{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
margin-left: .5em;
|
||||||
|
margin-right: .5em;
|
||||||
|
margin-bottom: -.6em;
|
||||||
|
width: 1.5em;
|
||||||
|
height: 2em;
|
||||||
|
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
path{
|
||||||
|
fill: #333 !important;
|
||||||
|
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* (4) Groupes */
|
||||||
|
.groups{
|
||||||
|
display: block;
|
||||||
|
margin: 1em;
|
||||||
|
color: #333;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
// svg (icone)
|
||||||
|
svg{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
margin-left: .5em;
|
||||||
|
margin-right: .5em;
|
||||||
|
margin-bottom: -.6em;
|
||||||
|
width: 1.5em;
|
||||||
|
height: 2em;
|
||||||
|
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
path{
|
||||||
|
fill: #333 !important;
|
||||||
|
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
padding: .1em .5em;
|
||||||
|
margin-right: calc( .2em + 2em );
|
||||||
|
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
border: 1px solid #bdbdbd;
|
||||||
|
box-shadow: inset 0 0 2px #fafafa;
|
||||||
|
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
|
||||||
|
color: #333;
|
||||||
|
|
||||||
|
cursor: default;
|
||||||
|
|
||||||
|
|
||||||
|
&:before{
|
||||||
|
content: 'x';
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: -1px;
|
||||||
|
left: 100%;
|
||||||
|
height: calc( 100% - .1em - 1px );
|
||||||
|
padding: .1em .5em;
|
||||||
|
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
border: 1px solid #bdbdbd;
|
||||||
|
box-shadow: inset 0 0 2px #fafafa;
|
||||||
|
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
|
||||||
|
color: inherit;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover:before{
|
||||||
|
color: $form-invalid-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (5) Lien vers la modification */
|
||||||
|
.link_edit,
|
||||||
|
.link_remove{
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
position: relative;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
margin-left: 1em;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
& > svg{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
fill: #ddd !important;
|
||||||
|
|
||||||
|
transition: fill .4s ease-in-out;
|
||||||
|
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
& > svg{
|
||||||
|
fill: $form-neutral-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (6) Lien vers la suppression */
|
||||||
|
.link_remove{
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
& > svg{
|
||||||
|
fill: $form-invalid-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [3] Formulaires
|
||||||
|
=========================================================*/
|
||||||
|
& > section > form{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
margin: .3em 0;
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
border-color: $form-invalid-color;
|
||||||
|
box-shadow: 0 0 1px #b7b7b7;
|
||||||
|
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
transform: translateX(-50%);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&.valid{
|
||||||
|
border-color: $form-valid-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.neutral{
|
||||||
|
border-color: $form-neutral-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.search{
|
||||||
|
border-color: $form-neutral-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Textes centres
|
||||||
|
.edit_search_view,
|
||||||
|
.remove_search_view{
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
color: #aaaaaa;
|
||||||
|
|
||||||
|
span{
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (1) Champs de texte */
|
||||||
|
input[type=text],
|
||||||
|
input[type=mail],
|
||||||
|
input[type=password],
|
||||||
|
&.invalid > input[type=text],
|
||||||
|
&.invalid > input[type=mail],
|
||||||
|
&.invalid > input[type=password],
|
||||||
|
input.invalid[type=text],
|
||||||
|
input.invalid[type=mail],
|
||||||
|
input.invalid[type=password]{
|
||||||
|
display: inline-block;
|
||||||
|
margin: 1em 0;
|
||||||
|
padding: .7em 1em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #d7dde8;
|
||||||
|
|
||||||
|
color: #2f3033;
|
||||||
|
|
||||||
|
transition: border .4s ease-in-out;
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&:hover{
|
||||||
|
border-color: $form-invalid-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Champs valides
|
||||||
|
&.valid > input[type=text],
|
||||||
|
&.valid > input[type=mail],
|
||||||
|
&.valid > input[type=password],
|
||||||
|
input.valid[type=text],
|
||||||
|
input.valid[type=mail],
|
||||||
|
input.valid[type=password]{
|
||||||
|
&:focus,
|
||||||
|
&:hover{
|
||||||
|
border-color: $form-valid-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Champs neutres
|
||||||
|
&.neutral > input[type=text],
|
||||||
|
&.neutral > input[type=mail],
|
||||||
|
&.neutral > input[type=password],
|
||||||
|
input.neutral[type=text],
|
||||||
|
input.neutral[type=mail],
|
||||||
|
input.neutral[type=password]{
|
||||||
|
&:focus,
|
||||||
|
&:hover{
|
||||||
|
border-color: $form-neutral-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Champs neutres
|
||||||
|
&.search > input[type=text],
|
||||||
|
&.search > input[type=mail],
|
||||||
|
&.search > input[type=password],
|
||||||
|
input.search[type=text],
|
||||||
|
input.search[type=mail],
|
||||||
|
input.search[type=password]{
|
||||||
|
&:focus,
|
||||||
|
&:hover{
|
||||||
|
border-color: $form-search-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* (2) Boutons */
|
||||||
|
button,
|
||||||
|
button.invalid,
|
||||||
|
&.invalid > button{
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
|
||||||
|
padding: .7em 1em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid $form-invalid-color;
|
||||||
|
|
||||||
|
background: $form-invalid-color center center no-repeat;
|
||||||
|
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
transition: background .4s ease-in-out;
|
||||||
|
|
||||||
|
transform: translateX(-50%);
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&:disabled{
|
||||||
|
background-color: #fff;
|
||||||
|
color: $form-invalid-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Boutons valides
|
||||||
|
button.valid,
|
||||||
|
&.valid > button{
|
||||||
|
border-color: $form-valid-color;
|
||||||
|
|
||||||
|
background-color: $form-valid-color;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&:disabled{
|
||||||
|
background-color: #fff;
|
||||||
|
color: $form-valid-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Boutons neutres
|
||||||
|
button.neutral,
|
||||||
|
&.neutral > button{
|
||||||
|
border-color: $form-neutral-color;
|
||||||
|
|
||||||
|
background-color: $form-neutral-color;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&:disabled{
|
||||||
|
background-color: #fff;
|
||||||
|
color: $form-neutral-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Boutons recherche
|
||||||
|
button.search,
|
||||||
|
&.search > button{
|
||||||
|
border-color: $form-search-color;
|
||||||
|
|
||||||
|
background-color: $form-search-color;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&:disabled{
|
||||||
|
background-color: #fff;
|
||||||
|
color: $form-search-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Boutons quand action validee
|
||||||
|
&.invalid > button.active,
|
||||||
|
button.invalid.active,
|
||||||
|
button.active{
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: url('/f/svg/active/st/container/'+$rd-form-invalid-color) !important;
|
||||||
|
background-size: 1em auto;
|
||||||
|
|
||||||
|
color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
button.valid.active,
|
||||||
|
&.valid > button.active{
|
||||||
|
background-image: url('/f/svg/active/st/container/'+$rd-form-valid-color) !important;
|
||||||
|
}
|
||||||
|
button.neutral.active,
|
||||||
|
&.neutral > button.active{
|
||||||
|
background-image: url('/f/svg/active/st/container/'+$rd-form-neutral-color) !important;
|
||||||
|
}
|
||||||
|
button.search.active,
|
||||||
|
&.search > button.active{
|
||||||
|
background-image: url('/f/svg/active/st/container/'+$rd-form-search-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// "OU" separant les boutons
|
||||||
|
hr.OR[data-label]{
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
|
||||||
|
border: 0;
|
||||||
|
border-bottom: 1px dashed $form-invalid-color;
|
||||||
|
|
||||||
|
&:before{
|
||||||
|
content: attr(data-label);
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
padding: 0 1em;
|
||||||
|
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
color: $form-invalid-color;
|
||||||
|
|
||||||
|
transform: translateX(-50%) translatey(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// "OU" valide
|
||||||
|
.valid > hr.OR,
|
||||||
|
hr.OR.valid{
|
||||||
|
border-bottom: 1px dashed $form-valid-color;
|
||||||
|
&:before{
|
||||||
|
color: $form-valid-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// "OU" neutre
|
||||||
|
.neutral > hr.OR,
|
||||||
|
hr.OR.neutral{
|
||||||
|
border-bottom: 1px dashed $form-neutral-color;
|
||||||
|
&:before{
|
||||||
|
color: $form-neutral-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// "OU" recherche
|
||||||
|
.search > hr.OR,
|
||||||
|
hr.OR.search{
|
||||||
|
border-bottom: 1px dashed $form-search-color;
|
||||||
|
&:before{
|
||||||
|
color: $form-search-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
/*# sourceMappingURL=global.css.map */
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "",
|
||||||
|
"sources": [],
|
||||||
|
"names": [],
|
||||||
|
"file": "global.css"
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
#WRAPPER>#HEADER>.icon{display:block;position:absolute;top:0;left:0;width:4em;height:4em;background-color:#bf2515;background-image:url("/f/svg/icon/st");background-position:center center;background-repeat:no-repeat;background-size:50% 50%;cursor:pointer;transition:all .3s}#WRAPPER>#HEADER>.icon:hover{background-color:#a82013}#WRAPPER>#HEADER.loading>.icon{background-image:url("/f/svg/loader/st");background-size:70% 70%}
|
||||||
|
/*# sourceMappingURL=header.css.map */
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAKC,sBAAS,CACR,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,KAAK,CCOU,GAAG,CDNlB,MAAM,CCMS,GAAG,CDJnB,gBAAgB,CAAE,OAAwB,CAC1C,gBAAgB,CAAE,qBAAqB,CACvC,mBAAmB,CAAE,aAAa,CAClC,iBAAiB,CAAE,SAAS,CAC5B,eAAe,CAAE,OAAO,CAExB,MAAM,CAAE,OAAO,CAEf,UAAU,CAAE,OAAO,CAGnB,4BAAO,CACN,gBAAgB,CAAE,OAAwB,CAM5C,8BAAiB,CAChB,gBAAgB,CAAE,uBAAuB,CACzC,eAAe,CAAE,OAAO",
|
||||||
|
"sources": ["header.scss","constants.scss"],
|
||||||
|
"names": [],
|
||||||
|
"file": "header.css"
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
@import 'constants';
|
||||||
|
|
||||||
|
|
||||||
|
#WRAPPER > #HEADER{
|
||||||
|
// Icone du site
|
||||||
|
& > .icon{
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: $menu-side-width;
|
||||||
|
height: $menu-side-width;
|
||||||
|
|
||||||
|
background-color: darken($theme-color, 10);
|
||||||
|
background-image: url('/f/svg/icon/st');
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 50% 50%;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
transition: all .3s;
|
||||||
|
|
||||||
|
// @hover
|
||||||
|
&:hover{
|
||||||
|
background-color: darken($theme-color, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animation de chargement qudnd chargement ajax */
|
||||||
|
&.loading > .icon{
|
||||||
|
background-image: url('/f/svg/loader/st');
|
||||||
|
background-size: 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
#WRAPPER{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#edf0f5;font-family:'Ubuntu'}#WRAPPER>#HEADER{display:block;position:absolute;top:0;left:0;width:100%;height:calc( 4em - 1px );border-bottom:1px solid #bf2515;background-color:#e63321;z-index:10}#WRAPPER>#MENU-SIDE{display:block;position:absolute;top:4em;left:0;width:4em;height:100%;box-shadow:2px 1px 3px #ddd;background-color:#fff;transition:all .3s;z-index:9}#WRAPPER>#CONTAINER{display:flex;position:absolute;top:4em;left:4em;width:calc( 100% - 4em - 2*1em );height:calc( 100% - 4em - 2*1em );padding:1em;flex-direction:row;justify-content:space-between;overflow-x:none;overflow-y:auto}
|
||||||
|
/*# sourceMappingURL=layout.css.map */
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAEA,QAAQ,CACP,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,KAAK,CACd,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CAEb,gBAAgB,CAAE,OAAO,CAEzB,WAAW,CAAE,QAAQ,CAKrB,gBAAW,CACV,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,iBAAiC,CAE1C,aAAa,CAAE,iBAAkC,CAEjD,gBAAgB,CC1BJ,OAAO,CD4BnB,OAAO,CAAE,EAAE,CAQZ,mBAAc,CACb,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CCvBY,GAAG,CDwBlB,IAAI,CAAE,CAAC,CACP,KAAK,CCzBU,GAAG,CD0BlB,MAAM,CAAE,IAAI,CAEb,UAAU,CAAE,gBAAgB,CAE5B,gBAAgB,CAAE,IAAI,CAEtB,UAAU,CAAE,OAAO,CAEnB,OAAO,CAAE,CAAC,CAMX,mBAAc,CACb,OAAO,CAAE,IAAI,CACb,QAAQ,CAAE,QAAQ,CACjB,GAAG,CC3CY,GAAG,CD4ClB,IAAI,CC5CW,GAAG,CD6ClB,KAAK,CAAE,0BAA0C,CACjD,MAAM,CAAE,0BAA0C,CACnD,OAAO,CAAE,GAAG,CAGZ,cAAc,CAAE,GAAG,CACnB,eAAe,CAAE,aAAa,CAE9B,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,IAAI",
|
||||||
|
"sources": ["layout.scss","constants.scss"],
|
||||||
|
"names": [],
|
||||||
|
"file": "layout.css"
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
@import 'constants';
|
||||||
|
|
||||||
|
#WRAPPER{
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
background-color: #edf0f5;
|
||||||
|
|
||||||
|
font-family: 'Ubuntu';
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] Header de la page
|
||||||
|
==========================================*/
|
||||||
|
& > #HEADER{
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: calc( #{$menu-side-width} - 1px );
|
||||||
|
|
||||||
|
border-bottom: 1px solid darken($theme-color, 10);
|
||||||
|
|
||||||
|
background-color: $theme-color;
|
||||||
|
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Side-Menu de la page
|
||||||
|
==========================================*/
|
||||||
|
// Gestion du menu
|
||||||
|
& > #MENU-SIDE{
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: $menu-side-width;
|
||||||
|
left: 0;
|
||||||
|
width: $menu-side-width;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
box-shadow: 2px 1px 3px #ddd;
|
||||||
|
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
transition: all .3s;
|
||||||
|
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Container de la page
|
||||||
|
==========================================*/
|
||||||
|
& > #CONTAINER{
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
top: $menu-side-width;
|
||||||
|
left: $menu-side-width;
|
||||||
|
width: calc( 100% - #{$menu-side-width} - 2*1em );
|
||||||
|
height: calc( 100% - #{$menu-side-width} - 2*1em );
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
// Flex properties
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
overflow-x: none;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
#WRAPPER>#MENU-SIDE>span[data-link]{display:block;position:relative;width:calc( 4em - 2*.7em - 2*.55em - 2*.01em );height:calc( 4em - 2*.7em - 2*.55em - 2*.01em );margin:2em .7em;padding:.55em;border:.01em solid transparent;border-radius:2px;color:#a2a2a2;line-height:calc( 4em - 2*.7em - 2*.55em - 2*.01em );transition:color .3s, border .3s;cursor:pointer}#WRAPPER>#MENU-SIDE>span[data-link].mt{margin-top:3em}#WRAPPER>#MENU-SIDE>span[data-link].mb{margin-bottom:3em}#WRAPPER>#MENU-SIDE>span[data-link] svg,#WRAPPER>#MENU-SIDE>span[data-link] svg *{width:calc( 4em / 2.5 );height:calc( 4em / 2.5 );transition:fill .3s;pointer-events:none}#WRAPPER>#MENU-SIDE>span[data-link][data-desc]:after{content:attr(data-desc);display:block;position:absolute;top:calc( 4em / 4 - 2*.3em );left:calc( 4em * 1.15 - 2*.3em );padding:.3em;border-radius:3px;background-color:#2a2a2a;color:#e2e2e2;white-space:nowrap;transition:transform .1s;transform-origin:0 0;transform:scaleX(0)}#WRAPPER>#MENU-SIDE>span[data-link]:hover,#WRAPPER>#MENU-SIDE>span[data-link].active{color:#e63321;border-color:#e6e6e6;box-shadow:inset 0 0 .5em #eee}#WRAPPER>#MENU-SIDE>span[data-link]:hover:hover:after,#WRAPPER>#MENU-SIDE>span[data-link].active:hover:after{transform:scaleX(1);color:#fff}#WRAPPER>#MENU-SIDE>span[data-link]:hover svg #stylisable,#WRAPPER>#MENU-SIDE>span[data-link].active svg #stylisable{fill:#000 !important}#WRAPPER>#MENU-SIDE>span[data-link]:hover svg #stroke-stylisable,#WRAPPER>#MENU-SIDE>span[data-link].active svg #stroke-stylisable{stroke:#000 !important}
|
||||||
|
/*# sourceMappingURL=menu-side.css.map */
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAIC,mCAAmB,CAClB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,wCAAwD,CAC/D,MAAM,CAAE,wCAAwD,CAGjE,MAAM,CAAE,QAAQ,CAChB,OAAO,CAAE,KAAK,CAEd,MAAM,CAAE,uBAAuB,CAC/B,aAAa,CAAE,GAAG,CAWlB,KAAK,CAAE,OAAO,CACd,WAAW,CAAE,wCAAwD,CAErE,UAAU,CAAE,qBAAqB,CAEjC,MAAM,CAAE,OAAO,CAZf,sCAAI,CACH,UAAU,CAAE,GAAG,CAEhB,sCAAI,CACH,aAAa,CAAE,GAAG,CAUnB,iFAAU,CACT,KAAK,CAAE,iBAAiC,CACxC,MAAM,CAAE,iBAAiC,CAKzC,UAAU,CAAE,QAAQ,CAEpB,cAAc,CAAE,IAAI,CAIrB,oDAAkB,CACjB,OAAO,CAAE,eAAe,CACxB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,wBAAwC,CAC7C,IAAI,CAAE,2BAA2C,CAClD,OAAO,CAAE,IAAI,CAEb,aAAa,CAAE,GAAG,CAElB,gBAAgB,CAAE,OAAO,CAEzB,KAAK,CAAE,OAAO,CACd,WAAW,CAAE,MAAM,CAEnB,UAAU,CAAE,aAAa,CAEzB,gBAAgB,CAAE,GAAG,CACrB,SAAS,CAAE,SAAS,CAKrB,oFACQ,CACP,KAAK,CCtEM,OAAO,CDuElB,YAAY,CAAE,OAAO,CACrB,UAAU,CAAE,mBAAmB,CAE/B,4GAAa,CACZ,SAAS,CAAE,SAAS,CACpB,KAAK,CAAE,IAAI,CAGZ,oHAAe,CACd,IAAI,CAAE,eAAe,CAGtB,kIAAsB,CACrB,MAAM,CAAE,eAAe",
|
||||||
|
"sources": ["menu-side.scss","constants.scss"],
|
||||||
|
"names": [],
|
||||||
|
"file": "menu-side.css"
|
||||||
|
}
|
|
@ -0,0 +1,93 @@
|
||||||
|
@import 'constants';
|
||||||
|
|
||||||
|
#WRAPPER > #MENU-SIDE{
|
||||||
|
|
||||||
|
& > span[data-link]{
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: calc( #{$menu-side-width} - 2*.7em - 2*.55em - 2*.01em );
|
||||||
|
height: calc( #{$menu-side-width} - 2*.7em - 2*.55em - 2*.01em );
|
||||||
|
|
||||||
|
// padding: 1em;
|
||||||
|
margin: 2em .7em;
|
||||||
|
padding: .55em;
|
||||||
|
|
||||||
|
border: .01em solid transparent;
|
||||||
|
border-radius: 2px;
|
||||||
|
|
||||||
|
|
||||||
|
// Decalage des elements du menu
|
||||||
|
&.mt{ // Margin Top
|
||||||
|
margin-top: 3em;
|
||||||
|
}
|
||||||
|
&.mb{ // Margin Bottom
|
||||||
|
margin-bottom: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
color: #a2a2a2;
|
||||||
|
line-height: calc( #{$menu-side-width} - 2*.7em - 2*.55em - 2*.01em );
|
||||||
|
|
||||||
|
transition: color .3s, border .3s;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
svg, svg *{
|
||||||
|
width: calc( #{$menu-side-width} / 2.5 );
|
||||||
|
height: calc( #{$menu-side-width} / 2.5 );
|
||||||
|
|
||||||
|
// stroke: none !important;
|
||||||
|
// fill: #777 !important;
|
||||||
|
|
||||||
|
transition: fill .3s;
|
||||||
|
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&[data-desc]:after{
|
||||||
|
content: attr(data-desc);
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: calc( #{$menu-side-width} / 4 - 2*.3em );
|
||||||
|
left: calc( #{$menu-side-width} * 1.15 - 2*.3em );
|
||||||
|
padding: .3em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
background-color: #2a2a2a;
|
||||||
|
|
||||||
|
color: #e2e2e2;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
transition: transform .1s;
|
||||||
|
|
||||||
|
transform-origin: 0 0;
|
||||||
|
transform: scaleX(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&.active{
|
||||||
|
color: $theme-color;
|
||||||
|
border-color: #e6e6e6;
|
||||||
|
box-shadow: inset 0 0 .5em #eee;
|
||||||
|
|
||||||
|
&:hover:after{
|
||||||
|
transform: scaleX(1);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg #stylisable{ // pour les elements sauf le profil
|
||||||
|
fill: #000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg #stroke-stylisable{ // pour le profil
|
||||||
|
stroke: #000 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
|
||||||
|
/*# sourceMappingURL=reset.css.map */
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAAA,4EAA4E,AAQ5E,IAAK,CACH,WAAW,CAAE,UAAU,CACvB,oBAAoB,CAAE,IAAI,CAC1B,wBAAwB,CAAE,IAAI,CAOhC,IAAK,CACH,MAAM,CAAE,CAAC,CAcX,mFAWQ,CACN,OAAO,CAAE,KAAK,CAQhB,2BAGM,CACJ,OAAO,CAAE,YAAY,CACrB,cAAc,CAAE,QAAQ,CAQ1B,qBAAsB,CACpB,OAAO,CAAE,IAAI,CACb,MAAM,CAAE,CAAC,CAQX,iBACS,CACP,OAAO,CAAE,IAAI,CAUf,CAAE,CACA,gBAAgB,CAAE,WAAW,CAQ/B,gBACQ,CACN,OAAO,CAAE,CAAC,CAYZ,WAAY,CACV,aAAa,CAAE,IAAI,CACnB,eAAe,CAAE,SAAS,CAC1B,eAAe,CAAE,gBAAgB,CASnC,QACO,CACL,WAAW,CAAE,OAAO,CAGtB,QACO,CACL,WAAW,CAAE,MAAM,CAOrB,GAAI,CACF,UAAU,CAAE,MAAM,CAQpB,EAAG,CACD,SAAS,CAAE,GAAG,CACd,MAAM,CAAE,QAAQ,CAOlB,IAAK,CACH,gBAAgB,CAAE,IAAI,CACtB,KAAK,CAAE,IAAI,CAOb,KAAM,CACJ,SAAS,CAAE,GAAG,CAOhB,OACI,CACF,SAAS,CAAE,GAAG,CACd,WAAW,CAAE,CAAC,CACd,QAAQ,CAAE,QAAQ,CAClB,cAAc,CAAE,QAAQ,CAG1B,GAAI,CACF,GAAG,CAAE,MAAM,CAGb,GAAI,CACF,MAAM,CAAE,OAAO,CAUjB,GAAI,CACF,MAAM,CAAE,CAAC,CAOX,cAAe,CACb,QAAQ,CAAE,MAAM,CAUlB,MAAO,CACL,MAAM,CAAE,QAAQ,CASlB,EAAG,CACD,UAAU,CAAE,WAAW,CACvB,MAAM,CAAE,CAAC,CACT,QAAQ,CAAE,OAAO,CAOnB,GAAI,CACF,QAAQ,CAAE,IAAI,CAQhB,iBAGK,CACH,WAAW,CAAE,oBAAoB,CACjC,SAAS,CAAE,GAAG,CAgBhB,qCAIS,CACP,IAAI,CAAE,OAAO,CACb,MAAM,CAAE,CAAC,CAOX,MAAO,CACL,QAAQ,CAAE,OAAO,CAUnB,aACO,CACL,cAAc,CAAE,IAAI,CAWtB,yEAGqB,CACnB,kBAAkB,CAAE,MAAM,CAC1B,MAAM,CAAE,OAAO,CAOjB,qCACqB,CACnB,MAAM,CAAE,OAAO,CAOjB,gDACwB,CACtB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CAQZ,KAAM,CACJ,WAAW,CAAE,MAAM,CAWrB,0CACoB,CAClB,UAAU,CAAE,UAAU,CACtB,OAAO,CAAE,CAAC,CASZ,+FACgD,CAC9C,MAAM,CAAE,IAAI,CAOd,oBAAqB,CACnB,kBAAkB,CAAE,SAAS,CAS/B,kGACgD,CAC9C,kBAAkB,CAAE,IAAI,CAO1B,QAAS,CACP,MAAM,CAAE,iBAAiB,CACzB,MAAM,CAAE,KAAK,CACb,OAAO,CAAE,qBAAqB,CAQhC,MAAO,CACL,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CAOZ,QAAS,CACP,QAAQ,CAAE,IAAI,CAQhB,QAAS,CACP,WAAW,CAAE,IAAI,CAUnB,KAAM,CACJ,eAAe,CAAE,QAAQ,CACzB,cAAc,CAAE,CAAC,CAGnB,KACG,CACD,OAAO,CAAE,CAAC",
|
||||||
|
"sources": ["reset.scss"],
|
||||||
|
"names": [],
|
||||||
|
"file": "reset.css"
|
||||||
|
}
|
|
@ -0,0 +1,434 @@
|
||||||
|
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Set default font family to sans-serif.
|
||||||
|
* 2. Prevent iOS and IE text size adjust after device orientation change,
|
||||||
|
* without disabling user zoom.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: sans-serif; /* 1 */
|
||||||
|
-ms-text-size-adjust: 100%; /* 2 */
|
||||||
|
-webkit-text-size-adjust: 100%; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove default margin.
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
// font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* HTML5 display definitions
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||||
|
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
||||||
|
* and Firefox.
|
||||||
|
* Correct `block` display not defined for `main` in IE 11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
article,
|
||||||
|
aside,
|
||||||
|
details,
|
||||||
|
figcaption,
|
||||||
|
figure,
|
||||||
|
footer,
|
||||||
|
header,
|
||||||
|
main,
|
||||||
|
menu,
|
||||||
|
nav,
|
||||||
|
section,
|
||||||
|
summary {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct `inline-block` display not defined in IE 8/9.
|
||||||
|
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio,
|
||||||
|
canvas,
|
||||||
|
progress,
|
||||||
|
video {
|
||||||
|
display: inline-block; /* 1 */
|
||||||
|
vertical-align: baseline; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent modern browsers from displaying `audio` without controls.
|
||||||
|
* Remove excess height in iOS 5 devices.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio:not([controls]) {
|
||||||
|
display: none;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `[hidden]` styling not present in IE 8/9/10.
|
||||||
|
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[hidden],
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the gray background color from active links in IE 10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Improve readability of focused elements when they are also in an
|
||||||
|
* active/hover state.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a:active,
|
||||||
|
a:hover {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Text-level semantics
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent styling of `abbr[title]`.
|
||||||
|
* 1. Correct styling in Firefox 39 and Opera 12.
|
||||||
|
* 2. Correct missing styling in Chrome, Edge, IE, Opera, and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
abbr[title] {
|
||||||
|
border-bottom: none; /* 1 */
|
||||||
|
text-decoration: underline; /* 2 */
|
||||||
|
text-decoration: underline dotted; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent styling of b and strong.
|
||||||
|
* 1. Correct duplicate application of `bolder` in Safari 6.0.2.
|
||||||
|
* 2. Correct style set to `bold` in Edge 12+, Safari 6.2+, and Chrome 18+.
|
||||||
|
*/
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: inherit; /* 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in Safari and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dfn {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address variable `h1` font-size and margin within `section` and `article`
|
||||||
|
* contexts in Firefox 4+, Safari, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 8/9.
|
||||||
|
*/
|
||||||
|
|
||||||
|
mark {
|
||||||
|
background-color: #ff0;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent and variable font size in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Embedded content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove border when inside `a` element in IE 8/9/10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct overflow not hidden in IE 9/10/11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
svg:not(:root) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Grouping content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margin not present in IE 8/9 and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 1em 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent styling of `hr`.
|
||||||
|
* 1. Correct `box-sizing` set to `border-box` in Firefox.
|
||||||
|
* 2. Correct `overflow` set to `hidden` in IE 8/9/10/11 and Edge 12.
|
||||||
|
*/
|
||||||
|
|
||||||
|
hr {
|
||||||
|
box-sizing: content-box; /* 1 */
|
||||||
|
height: 0; /* 1 */
|
||||||
|
overflow: visible; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contain overflow in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct inheritance and scaling of font-size for preformatted text.
|
||||||
|
* 2. Address odd `em`-unit font size rendering in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
pre,
|
||||||
|
samp {
|
||||||
|
font-family: monospace, monospace; /* 1 */
|
||||||
|
font-size: 1em; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forms
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||||
|
* styling of `select`, unless a `border` property is set.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct font properties not being inherited.
|
||||||
|
* 2. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
optgroup,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font: inherit; /* 1 */
|
||||||
|
margin: 0; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||||
|
* All other form control elements do not inherit `text-transform` values.
|
||||||
|
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
||||||
|
* Correct `select` style inheritance in Firefox.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||||
|
* and `video` controls.
|
||||||
|
* 2. Correct inability to style clickable `input` types in iOS.
|
||||||
|
* 3. Improve usability and consistency of cursor style between image-type
|
||||||
|
* `input` and others.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
html input[type="button"], /* 1 */
|
||||||
|
input[type="reset"],
|
||||||
|
input[type="submit"] {
|
||||||
|
-webkit-appearance: button; /* 2 */
|
||||||
|
cursor: pointer; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Re-set default cursor for disabled elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button[disabled],
|
||||||
|
html input[disabled] {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and border in Firefox 4+.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
input::-moz-focus-inner {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||||
|
* the UA stylesheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input {
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It's recommended that you don't attempt to style these elements.
|
||||||
|
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||||
|
*
|
||||||
|
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||||
|
* 2. Remove excess padding in IE 8/9/10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="checkbox"],
|
||||||
|
input[type="radio"] {
|
||||||
|
box-sizing: border-box; /* 1 */
|
||||||
|
padding: 0; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||||
|
* `font-size` values of the `input`, it causes the cursor style of the
|
||||||
|
* decrement button to change from `default` to `text`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="number"]::-webkit-inner-spin-button,
|
||||||
|
input[type="number"]::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"] {
|
||||||
|
-webkit-appearance: textfield;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||||
|
* Safari (but not Chrome) clips the cancel button when the search input has
|
||||||
|
* padding (and `textfield` appearance).
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"]::-webkit-search-cancel-button,
|
||||||
|
input[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define consistent border, margin, and padding.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
border: 1px solid #c0c0c0;
|
||||||
|
margin: 0 2px;
|
||||||
|
padding: 0.35em 0.625em 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||||
|
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||||
|
*/
|
||||||
|
|
||||||
|
legend {
|
||||||
|
border: 0; /* 1 */
|
||||||
|
padding: 0; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove default vertical scrollbar in IE 8/9/10/11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Don't inherit the `font-weight` (applied by a rule above).
|
||||||
|
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||||
|
*/
|
||||||
|
|
||||||
|
optgroup {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tables
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove most spacing between table cells.
|
||||||
|
*/
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
padding: 0;
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
#CONTAINER>.sub-menu-side{display:block;position:relative}#CONTAINER>.sub-menu-side>span[data-sublink]{display:block;position:relative;width:7.5em;padding:.3em 1em .3em 2em;margin:1em;border-radius:3px;color:#5b5e63;text-shadow:1px 1px white;white-space:nowrap;transition:all .2s;cursor:pointer;overflow:hidden}#CONTAINER>.sub-menu-side>span[data-sublink]>.svg>svg{display:inline-block;position:absolute;left:.5em;top:50%;width:1em;height:1em;transform:translateY(-50%)}#CONTAINER>.sub-menu-side>span[data-sublink]>.svg>svg path{fill:#5b5e63 !important}#CONTAINER>.sub-menu-side>span[data-sublink]:hover,#CONTAINER>.sub-menu-side>span[data-sublink].active{color:#121213;background-color:#d8deea;box-shadow:inset 0 0 4px #c8ced9}#CONTAINER>.sub-menu-side>span[data-sublink]:hover>.svg>svg path,#CONTAINER>.sub-menu-side>span[data-sublink].active>.svg>svg path{fill:#121213 !important}#CONTAINER>.sub-menu-side>span[data-sublink]:nth-child(1){margin-top:1em}
|
||||||
|
/*# sourceMappingURL=submenu-side.css.map */
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAGA,yBAA2B,CAC1B,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CAGlB,4CAAsB,CACrB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,KAAK,CAEb,OAAO,CAAE,iBAAiB,CAC1B,MAAM,CAAE,GAAG,CAEX,aAAa,CAAE,GAAG,CAElB,KAAK,CChBU,OAAO,CDiBtB,WAAW,CAAE,aAAa,CAC1B,WAAW,CAAE,MAAM,CAEnB,UAAU,CAAE,OAAO,CAEnB,MAAM,CAAE,OAAO,CAEf,QAAQ,CAAE,MAAM,CAGhB,qDAAc,CACb,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,IAAI,CAAE,IAAI,CAEV,GAAG,CAAE,GAAG,CACR,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CAEZ,SAAS,CAAE,gBAAgB,CAG3B,0DAAM,CACL,IAAI,CAAE,kBAA0B,CAIlC,sGACQ,CACP,KAAK,CAAE,OAA2B,CAClC,gBAAgB,CAAE,OAAO,CACzB,UAAU,CAAE,qBAAqB,CAEjC,kIAAmB,CAClB,IAAI,CAAE,kBAAsC,CAS/C,yDAAmC,CAClC,UAAU,CAAE,GAAG",
|
||||||
|
"sources": ["submenu-side.scss","constants.scss"],
|
||||||
|
"names": [],
|
||||||
|
"file": "submenu-side.css"
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
@import 'constants';
|
||||||
|
|
||||||
|
|
||||||
|
#CONTAINER > .sub-menu-side{
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
// Les liens du menu
|
||||||
|
& > span[data-sublink]{
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 7.5em;
|
||||||
|
|
||||||
|
padding: .3em 1em .3em 2em;
|
||||||
|
margin: 1em;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
color: $sub-menu-color;
|
||||||
|
text-shadow: 1px 1px white;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
transition: all .2s;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
// Dimension/Position des svg (icones)
|
||||||
|
& > .svg > svg{
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
left: .5em;
|
||||||
|
// left: 100%;
|
||||||
|
top: 50%;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
|
||||||
|
transform: translateY(-50%);
|
||||||
|
|
||||||
|
// Coloration pour tous les elements du svg
|
||||||
|
& path{
|
||||||
|
fill: $sub-menu-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&.active{
|
||||||
|
color: darken($sub-menu-color, 30);
|
||||||
|
background-color: #d8deea;
|
||||||
|
box-shadow: inset 0 0 4px #c8ced9;
|
||||||
|
|
||||||
|
& > .svg > svg path{
|
||||||
|
fill: darken($sub-menu-color, 30) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// On decale le premier
|
||||||
|
& > span[data-sublink]:nth-child(1){
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?php define('__ROOT__', dirname(__FILE__) );
|
||||||
|
|
||||||
|
require_once __ROOT__.'/manager/autoloader.php';
|
||||||
|
|
||||||
|
use \router\Router;
|
||||||
|
use \manager\ResourceDispatcher;
|
||||||
|
use \manager\ModuleRequest;
|
||||||
|
|
||||||
|
/*******************************************/
|
||||||
|
/* DEBUGGER */
|
||||||
|
/*******************************************/
|
||||||
|
debug();
|
||||||
|
/*******************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/* [0] On initialise le routeur
|
||||||
|
===================================================*/
|
||||||
|
$R = new Router( $_GET['url'] );
|
||||||
|
// var_dump($R);
|
||||||
|
|
||||||
|
/* [1] On cree les regles de routage
|
||||||
|
===================================================*/
|
||||||
|
// Racine -> page d'accueil
|
||||||
|
$R->get('/?', function(){ header('Location: /dashboard/'); });
|
||||||
|
|
||||||
|
// Liste des pages du site
|
||||||
|
$page_list = array(
|
||||||
|
'dashboard',
|
||||||
|
'profile',
|
||||||
|
'machines',
|
||||||
|
'users',
|
||||||
|
'groups',
|
||||||
|
'analytics',
|
||||||
|
'settings'
|
||||||
|
);
|
||||||
|
|
||||||
|
// nomPage/arg1/arg2 -> inclusion de la page
|
||||||
|
$R->get('(?:'.implode('|', $page_list).')(?:/[\w-]+)*/?', function(){ include __ROOT__.'/view.php'; });
|
||||||
|
|
||||||
|
// Dispatcher
|
||||||
|
$R->get('f(?:/([\w-]+))*/?', function(){ new ResourceDispatcher($_GET['url'], true); });
|
||||||
|
|
||||||
|
// Api
|
||||||
|
$R->post('api/?', function(){
|
||||||
|
$request = ModuleRequest::fromPost($_POST);
|
||||||
|
$answer = $request->dispatch();
|
||||||
|
|
||||||
|
echo $answer->serialize();
|
||||||
|
});
|
||||||
|
|
||||||
|
// N'importe -> page d'accueil
|
||||||
|
$R->get('.+', function(){ header('Location: /dashboard/'); });
|
||||||
|
|
||||||
|
|
||||||
|
// $R->post('.*', function(){
|
||||||
|
// var_dump( 'Acces POST : '.$_GET['url'] );
|
||||||
|
// var_dump( $_POST );
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On lance le routeur
|
||||||
|
===================================================*/
|
||||||
|
$R->run();
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,193 @@
|
||||||
|
DOM = {
|
||||||
|
WRAPPER: $('WRAPPER'),
|
||||||
|
HEADER: $('HEADER'),
|
||||||
|
MENUSIDE: $('MENU-SIDE'),
|
||||||
|
CONTAINER: $('CONTAINER')
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* [0] Instanciation
|
||||||
|
===========================================*/
|
||||||
|
var pageManager = new pageManagerClass();
|
||||||
|
pageManager.setPage(null, '/view', DOM.CONTAINER, ['profile', 'dashboard', 'machines', 'users', 'groups', 'analytics', 'settings'] );
|
||||||
|
|
||||||
|
var api = new APIClass('/api/');
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] Toggle du sub-menu-side <-> navigation
|
||||||
|
===========================================*/
|
||||||
|
function navSubMenu(subsection){
|
||||||
|
/* [1] Format du param
|
||||||
|
------------------------------------------------*/
|
||||||
|
// Contient l'element courant
|
||||||
|
var current = document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+pageManager.vars[0]+'"]');
|
||||||
|
|
||||||
|
// Contiendra l'element cible
|
||||||
|
var target = null;
|
||||||
|
|
||||||
|
// si @subsection est un element, on le prends
|
||||||
|
target = (subsection instanceof Element) ? subsection : null;
|
||||||
|
|
||||||
|
// Si string, on trouve l'element correspondant
|
||||||
|
target = (typeof subsection == 'string') ? document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+subsection+'"]') : target;
|
||||||
|
|
||||||
|
// Si rien trouve, on prend le premier element correspondant a la premiere page
|
||||||
|
target = (target == null) ? document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink]') : target;
|
||||||
|
|
||||||
|
// Si le param n'est toujours pas bon, on retourne une erreur
|
||||||
|
if( target == null ) return false;
|
||||||
|
|
||||||
|
/* [2] Gestion de l'affichage de l'element
|
||||||
|
------------------------------------------------*/
|
||||||
|
// On desactive l'element courant
|
||||||
|
if( current != null )
|
||||||
|
current.remClass('active');
|
||||||
|
|
||||||
|
// On cache les sections visibles
|
||||||
|
var visibleSections = document.querySelectorAll('#CONTAINER > section[data-sublink].active');
|
||||||
|
for( var i = 0 ; i < visibleSections.length ; i++ )
|
||||||
|
visibleSections[i].remClass('active');
|
||||||
|
|
||||||
|
// On active le nouveau
|
||||||
|
if( target != null ){
|
||||||
|
target.addClass('active');
|
||||||
|
|
||||||
|
// On affiche la section associee
|
||||||
|
var targetSection = document.querySelector('#CONTAINER > section[data-sublink="'+target.getData('sublink')+'"]');
|
||||||
|
if( targetSection != null )
|
||||||
|
targetSection.addClass('active');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [3] Gestion de pageManager
|
||||||
|
------------------------------------------------*/
|
||||||
|
// Si element, on recupere le data-link
|
||||||
|
var page = null;
|
||||||
|
|
||||||
|
// Si erreur, on retourne FALSE
|
||||||
|
if( !target.getData('sublink') ) return false
|
||||||
|
|
||||||
|
var mustRefresh = pageManager.vars[0] != target.getData('sublink');
|
||||||
|
|
||||||
|
// On met a jour la variable page-manager si data-link trouve
|
||||||
|
pageManager.vars[0] = target.getData('sublink');
|
||||||
|
|
||||||
|
if( mustRefresh )
|
||||||
|
// navMenu(pageManager.page);
|
||||||
|
pageManager.updateURL();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Toggle du side-menu <-> navigation
|
||||||
|
===========================================*/
|
||||||
|
function navMenu(section){
|
||||||
|
|
||||||
|
/* [1] Format du param
|
||||||
|
------------------------------------------------*/
|
||||||
|
// Contient l'element courant
|
||||||
|
var current = document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.page+'"]');
|
||||||
|
|
||||||
|
// Contiendra l'element cible
|
||||||
|
var target = null;
|
||||||
|
|
||||||
|
// si @section est un element, on le prends
|
||||||
|
target = (section instanceof Element) ? section : null;
|
||||||
|
|
||||||
|
// Si string, on trouve l'element correspondant
|
||||||
|
target = (typeof section == 'string') ? document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+section+'"]') : target;
|
||||||
|
|
||||||
|
// Si rien trouve, on prend le premier element correspondant a la premiere page
|
||||||
|
target = (target == null) ? document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]') : target;
|
||||||
|
|
||||||
|
// Si le param n'est toujours pas bon, on retourne une erreur
|
||||||
|
if( target == null ) return false;
|
||||||
|
|
||||||
|
/* [2] Gestion de l'affichage de l'element
|
||||||
|
------------------------------------------------*/
|
||||||
|
// On desactive l'element courant
|
||||||
|
if( current != null )
|
||||||
|
current.remClass('active');
|
||||||
|
// On active le nouveau
|
||||||
|
if( target != null )
|
||||||
|
target.addClass('active');
|
||||||
|
|
||||||
|
/* [3] Gestion de pageManager
|
||||||
|
------------------------------------------------*/
|
||||||
|
// Si element, on recupere le data-link
|
||||||
|
var page = null;
|
||||||
|
|
||||||
|
// On charge la page si data-link trouve
|
||||||
|
if( target.getData('link') ){
|
||||||
|
DOM.HEADER.addClass('loading'); // Animation de chargement
|
||||||
|
|
||||||
|
pageManager.setPage( target.getData('link') );
|
||||||
|
|
||||||
|
pageManager.activeXHR.addEventListener('loadend', function(){
|
||||||
|
|
||||||
|
// On retire l'icone de chargement
|
||||||
|
DOM.HEADER.remClass('loading');
|
||||||
|
|
||||||
|
// On gere la navigation du sous-menu (si defini, utilise)
|
||||||
|
var subSectionExists = pageManager.vars.length >= 1 && document.querySelector('#CONTAINER > .sub-menu-side > [data-sublink="'+pageManager.vars[0]+'"]') != null;
|
||||||
|
if( subSectionExists ) // Si le lien du menu associe existe
|
||||||
|
navSubMenu(pageManager.vars[0]); // on charge la page associee
|
||||||
|
else // sinon
|
||||||
|
navSubMenu(null); // on charge le lien par defaut
|
||||||
|
|
||||||
|
|
||||||
|
// GESTION DE LA NAVIGATION DU SOUS-MENU
|
||||||
|
document.querySelector('#CONTAINER > .sub-menu-side').addEventListener('click', function(e){
|
||||||
|
var target = e.target;
|
||||||
|
|
||||||
|
while( target != document.body && !target.getData('sublink') )
|
||||||
|
target = target.parentNode;
|
||||||
|
|
||||||
|
if( target.getData('sublink') )
|
||||||
|
navSubMenu(target);
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}navMenu(pageManager.page);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] Gestion de la navigation (physique)
|
||||||
|
===========================================*/
|
||||||
|
DOM.MENUSIDE.addEventListener('click', function(e){
|
||||||
|
var target = e.target;
|
||||||
|
|
||||||
|
// On remonte dans les parents au bon niveau
|
||||||
|
while( target != document.body && !target.getData('link') )
|
||||||
|
target = target.parentNode;
|
||||||
|
|
||||||
|
// Si on a trouve l'element, on l'utilise pour la page
|
||||||
|
if( target.getData('link') )
|
||||||
|
navMenu(target.getData('link'));
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
/* classe API */
|
||||||
|
function APIClass(target){ this.target = target; };
|
||||||
|
|
||||||
|
APIClass.prototype = {
|
||||||
|
xhr: [], // tableau d'objets pour les requêtes ajax
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* transaction avec le serveur (http://host/api/)
|
||||||
|
*
|
||||||
|
* @param pRequest<Object> l'objet passé en JSON à http://host/api/
|
||||||
|
* @param pHandler<Function> fonction qui s'éxécutera lors de la réponse (1 argument -> réponse<Object>)
|
||||||
|
*
|
||||||
|
* @return answer<Object> l'objet retourné par http://host/api/ via pHandler (1er argument)
|
||||||
|
*
|
||||||
|
***************************************************************************************************
|
||||||
|
*
|
||||||
|
* @usecase
|
||||||
|
* 1. var answerObject = sendRequest(
|
||||||
|
* 2. { var1: "exemple", var2: 198294 },
|
||||||
|
* 3. function(rep){ alert(rep); }
|
||||||
|
* 4. );
|
||||||
|
* @explain
|
||||||
|
* 1. on appelle la fonction <=> on créé la requête
|
||||||
|
* 2. on passe l'objet qui sera envoyé
|
||||||
|
* 3. on passe une fonction qui utilise un argument (sera la réponse de http://host/api/) (sous forme d'objet)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
send: function(pRequest, pHandler){
|
||||||
|
|
||||||
|
// Si le chemin de delegation n'est pas renseigne, on renvoie une erreur
|
||||||
|
if( !pRequest.hasOwnProperty('path') )
|
||||||
|
pHandler({ModuleError:4});
|
||||||
|
|
||||||
|
// on efface les requêtes qui sont terminées (toutes celles de this.xhr)
|
||||||
|
for( var i = 0 ; i < this.xhr.length ; i++ ){
|
||||||
|
if( this.xhr[i].readyState == 4 ) // si terminée
|
||||||
|
this.xhr = this.xhr.slice(0,i-1).concat(this.xhr.slice(i,this.xhr.length-1)); // suppression entrée
|
||||||
|
}
|
||||||
|
|
||||||
|
// on créé une nouvelle entrée
|
||||||
|
this.xhr.push(null);
|
||||||
|
i = this.xhr.length-1;
|
||||||
|
|
||||||
|
// création de l'objet AJAX
|
||||||
|
if(window.XMLHttpRequest) // IE7+, Firefox, Chrome, Opera, Safari
|
||||||
|
this.xhr[i] = new XMLHttpRequest();
|
||||||
|
else // IE5, IE6
|
||||||
|
this.xhr[i] = new ActiveXObject('Microsoft.XMLHttpRequest');
|
||||||
|
|
||||||
|
console.log(pRequest);
|
||||||
|
|
||||||
|
var ptrAPI = this;
|
||||||
|
this.xhr[i].onreadystatechange = function(){
|
||||||
|
if( ptrAPI.xhr[i].readyState == 4 ){ // si la requête est terminée
|
||||||
|
|
||||||
|
/* DEBUG : affiche la réponse BRUTE de http://host/api/ */
|
||||||
|
// console.log('http://host/api/ => '+ptrAPI.xhr[i].responseText);
|
||||||
|
// console.log( JSON.parse(ptrAPI.xhr[i].responseText) );
|
||||||
|
|
||||||
|
/* si success de requête */
|
||||||
|
if( [0,200].indexOf(ptrAPI.xhr[i].status) > -1 ){ // si fichier existe et reçu
|
||||||
|
try{ pHandler( JSON.parse(ptrAPI.xhr[i].responseText) ); } // si on peut parser, on envoie
|
||||||
|
catch(e){ pHandler({ModuleError:1}); } // sinon on envoie obj.request = 'corrupted'
|
||||||
|
}
|
||||||
|
/* sinon retourne obj.request = 'unreachable' */
|
||||||
|
else
|
||||||
|
pHandler({ModuleError:3});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// on créé un formulaire POST (virtuel)
|
||||||
|
var form = new FormData();
|
||||||
|
form.append('path', pRequest.path ); // on créé la variable $_POST['json']=>request
|
||||||
|
|
||||||
|
if( pRequest.hasOwnProperty('data') )
|
||||||
|
form.append('data', JSON.stringify(pRequest.data) );
|
||||||
|
|
||||||
|
this.xhr[i].open('POST', this.target, true);
|
||||||
|
this.xhr[i].send( form );
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,293 @@
|
||||||
|
// __ _ _ _
|
||||||
|
// / _| ___ _ __ _ __ ___ __ _| |_ ___| |__ ___ ___| | _____ _ __
|
||||||
|
// | |_ / _ \| '__| '_ ` _ \ / _` | __|____ / __| '_ \ / _ \/ __| |/ / _ \ '__|
|
||||||
|
// | _| (_) | | | | | | | | (_| | ||_____| (__| | | | __/ (__| < __/ |
|
||||||
|
// |_| \___/|_| |_| |_| |_|\__,_|\__| \___|_| |_|\___|\___|_|\_\___|_|
|
||||||
|
//
|
||||||
|
function formatChecker(pValue, pPattern, pRules){
|
||||||
|
this.value = pValue;
|
||||||
|
this.pattern = pPattern;
|
||||||
|
this.rules = (arguments.length>2) ? pRules : [];
|
||||||
|
};
|
||||||
|
|
||||||
|
formatChecker.prototype = {
|
||||||
|
value: this.value, // valeur à formater
|
||||||
|
pattern: this.pattern, // format global
|
||||||
|
rules: this.rules, // définition des règles du format global
|
||||||
|
regexp: null, // contiendra la RegExp de validation
|
||||||
|
// règles par défaut
|
||||||
|
default_rules: {
|
||||||
|
'i': '[0-9]', // i = integer
|
||||||
|
'a': '[a-z]', // a = lower case
|
||||||
|
'A': '[A-Z]', // A = upper case
|
||||||
|
'x': '[a-zA-Z]' // x = letter
|
||||||
|
},
|
||||||
|
|
||||||
|
// créé une RegExp en fonction du format global @pattern et des règles @rules
|
||||||
|
compile: function(){
|
||||||
|
var RegExpExpr = '^'; // contiendra les chaines de la regex
|
||||||
|
var RegExpDecomposition = [];
|
||||||
|
|
||||||
|
// on parcours les caractères du pattern
|
||||||
|
for( var i = 0 ; i < this.pattern.length ; i++ ){
|
||||||
|
/* [1] Cas où la règle est définie par l'utilisateur
|
||||||
|
====================================================*/
|
||||||
|
if( this.rules.hasOwnProperty( this.pattern[i] ) ){
|
||||||
|
RegExpExpr += this.rules[ this.pattern[i] ];
|
||||||
|
RegExpDecomposition.push( this.rules[ this.pattern[i] ] );
|
||||||
|
|
||||||
|
/* [2] Cas où la règle est définie par défaut
|
||||||
|
====================================================*/
|
||||||
|
}else if( this.default_rules.hasOwnProperty( this.pattern[i] ) ){
|
||||||
|
RegExpExpr += this.default_rules[ this.pattern[i] ];
|
||||||
|
RegExpDecomposition.push( this.default_rules[ this.pattern[i] ] );
|
||||||
|
|
||||||
|
/* [3] Cas où on prends juste le caractère en compte
|
||||||
|
====================================================*/
|
||||||
|
}else{
|
||||||
|
RegExpExpr += this.pattern[i];
|
||||||
|
RegExpDecomposition.push( this.pattern[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RegExpExpr += '$';
|
||||||
|
|
||||||
|
// on définit la RegExp associée
|
||||||
|
this.regexp = new RegExp( RegExpExpr );
|
||||||
|
// on la complète avec la décomposition par caractère du pattern
|
||||||
|
this.regexp.patternDecomposition = RegExpDecomposition;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// vérifie la validité en utilisant la RegExp, si elle n'est pas générée, on la génère
|
||||||
|
check: function(pPlotPlate){
|
||||||
|
/* [1] On génère la RegExp si ce n'est pas déjà fait
|
||||||
|
====================================================*/
|
||||||
|
if( this.regexp == null ) this.compile();
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Gestion de la plaque à trous
|
||||||
|
====================================================*/
|
||||||
|
if( arguments.length > 0 && pPlotPlate instanceof Array){
|
||||||
|
|
||||||
|
// on parcours les caractères du pattern
|
||||||
|
for( var i = 0 ; i < this.pattern.length ; i++ ){
|
||||||
|
|
||||||
|
var RegExpExpr = '^';
|
||||||
|
|
||||||
|
/* [1] Cas où la règle est définie par l'utilisateur
|
||||||
|
====================================================*/
|
||||||
|
if( this.rules.hasOwnProperty( this.pattern[i] ) )
|
||||||
|
RegExpExpr += this.rules[ this.pattern[i] ];
|
||||||
|
|
||||||
|
/* [2] Cas où la règle est définie par défaut
|
||||||
|
====================================================*/
|
||||||
|
else if( this.default_rules.hasOwnProperty( this.pattern[i] ) )
|
||||||
|
RegExpExpr += this.default_rules[ this.pattern[i] ];
|
||||||
|
|
||||||
|
/* [3] Cas où on prends juste le caractère en compte
|
||||||
|
====================================================*/
|
||||||
|
else
|
||||||
|
RegExpExpr += this.pattern[i];
|
||||||
|
|
||||||
|
RegExpExpr += '$';
|
||||||
|
|
||||||
|
pPlotPlate.push( this.value[i].match( new RegExp(RegExpExpr) ) != null );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// on retourne TRUE si c'est bon, FALSE sinon
|
||||||
|
return this.value.match( this.regexp ) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/***********/
|
||||||
|
/* USECASE */
|
||||||
|
/***********/
|
||||||
|
/* [1] On créé une instance du formatChecker()
|
||||||
|
==================================================*/
|
||||||
|
/*HIDDEN*///var instance = new formatChecker(
|
||||||
|
/*HIDDEN*/// 'te2t 1 2 1/23', // la chaîne à vérifier
|
||||||
|
/*HIDDEN*/// 'aava i i i/ii', // le schéma à respecter (cf. règles par défaut)
|
||||||
|
/*HIDDEN*/// {'v': '[0-2]'} // règles spécifiques. Ici, 'v' correspond à un chiffre compris entre 0 et 2
|
||||||
|
/*HIDDEN*///);
|
||||||
|
|
||||||
|
/* [2] On récupère le résultat de la vérification
|
||||||
|
==================================================*/
|
||||||
|
// Note. On passe ici en paramètre un tableau qui va être rempli à TRUE pour les caractères
|
||||||
|
// correspondant au schéma, FALSE pour les erreurs
|
||||||
|
/*HIDDEN*///var respecteSchema = instance.check( plotPlate=[] );
|
||||||
|
/*HIDDEN*///console.log( respecteSchema ); // affichera "true"
|
||||||
|
|
||||||
|
/* [3] On accède à la plotPlate (afin de vérifier d'où vient l'erreur)
|
||||||
|
==================================================*/
|
||||||
|
/*HIDDEN*///console.log( plotPlate ); // affichera "[true, true, true, ..]""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// _ _ _ _
|
||||||
|
// (_)_ __ _ __ _ _| |_ ___| |__ ___ ___| | _____ _ __
|
||||||
|
// | | '_ \| '_ \| | | | __|____ / __| '_ \ / _ \/ __| |/ / _ \ '__|
|
||||||
|
// | | | | | |_) | |_| | ||_____| (__| | | | __/ (__| < __/ |
|
||||||
|
// |_|_| |_| .__/ \__,_|\__| \___|_| |_|\___|\___|_|\_\___|_|
|
||||||
|
//
|
||||||
|
function inputChecker(){};
|
||||||
|
|
||||||
|
inputChecker.prototype = {
|
||||||
|
input: [], // contiendra les éléments HTML <input>
|
||||||
|
defval: [], // contiendra les valeurs par défaut ou NULL si pas défini
|
||||||
|
checker: [], // contiendra les classes <formatChecker>
|
||||||
|
|
||||||
|
|
||||||
|
/* Ajout d'un champ <input> au vérificateur
|
||||||
|
*
|
||||||
|
* @pInputElement<HTMLInputElement> l'élément <input> à vérifier
|
||||||
|
* @pFormatChecker<formatChecker> l'instance <formatChecker> associée à la valeur voulue du champ
|
||||||
|
* @pDefaultValue<String> [OPT] Valeur par défaut pour l'input
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return ajouté<Boolean> retourne TRUE, si le champ a bien été ajouté
|
||||||
|
* retourne FALSE, si une erreur occure
|
||||||
|
*/
|
||||||
|
append: function(pInputElement, pFormatChecker, optDefaultValue){
|
||||||
|
/* [1] Vérification des types
|
||||||
|
====================================================*/
|
||||||
|
if( !(pInputElement instanceof HTMLInputElement) ) return false; // si c'est pas un <input>, retourne FALSE
|
||||||
|
if( !(pFormatChecker instanceof formatChecker) ) return false; // si c'est pas un <formatChecker>, retourne FALSE
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Référencement des nouvelles données
|
||||||
|
====================================================*/
|
||||||
|
// insertion du <input>
|
||||||
|
var index = this.input.push( pInputElement );
|
||||||
|
|
||||||
|
// insertion du <formatChecker>, si pb d'insertion, retourne FALSE
|
||||||
|
if( index != this.checker.push(pFormatChecker) ) return false;
|
||||||
|
|
||||||
|
// insertion de la valeur par défaut (si définie), si pb d'insetion, retourne FALSE
|
||||||
|
if( index != (this.defval.push((arguments.length>2)?optDefaultValue:null)) ) return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Vérifie le format d'un champ <input> de rang spécifié
|
||||||
|
*
|
||||||
|
* @pInputElement<HTMLInputElement> L'élement qu'on veut vérifier
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return verification<Boolean> retourne TRUE si la vérification s'avère correcte
|
||||||
|
* retourne FALSE si la vérification est incorrecte
|
||||||
|
*/
|
||||||
|
check: function(pInputElement){
|
||||||
|
// si l'élément n'est pas référencé, retourne FALSE
|
||||||
|
var index = this.input.indexOf( pInputElement );
|
||||||
|
if( index < 0 ) return false;
|
||||||
|
|
||||||
|
/* [1] On remplace la valeur de vérification du <formatChecker> par la valeur actuelle de l'élément <input>
|
||||||
|
====================================================*/
|
||||||
|
this.checker[index].value = this.input[index].value;
|
||||||
|
|
||||||
|
/* [2] On renvoie le résultat du checker
|
||||||
|
====================================================*/
|
||||||
|
return this.checker[index].check();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Vérifie le format de tous les champs <input>
|
||||||
|
*
|
||||||
|
* @return verifications<Boolean> retourne TRUE si les vérifications s'avèrent correctes
|
||||||
|
* retourne FALSE si les vérifications sont incorrectes
|
||||||
|
*/
|
||||||
|
checkAll: function(){
|
||||||
|
var checkerCumul = true;
|
||||||
|
|
||||||
|
for( var i = 0 ; i < this.input.length ; i++ )
|
||||||
|
checkerCumul = checkerCumul && this.check(this.input[i]);
|
||||||
|
|
||||||
|
return checkerCumul;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/* Applique une correction en fonction du schéma
|
||||||
|
*
|
||||||
|
* @pInputElement<HTMLInputElement> l'élément <input> concerné
|
||||||
|
* @pToEnd<Boolean> si on doit corriger jusqu'à la fin ou uniquement jusqu'à l'avancéé actuelle
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return correctValue<String> retourne la valeur corrigée
|
||||||
|
* retourne NULL si erreur
|
||||||
|
*/
|
||||||
|
correct: function(pInputElement, pToEnd){
|
||||||
|
/* GESTION PARAMS */
|
||||||
|
|
||||||
|
// on retourne une erreur si l'élément <input> n'est pas référencé
|
||||||
|
if( (index = this.input.indexOf(pInputElement)) < 0 ) return null;
|
||||||
|
|
||||||
|
var pToEnd = (arguments.length>1) ? pToEnd : true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] On met à jour la valeur du <formatChecker>
|
||||||
|
====================================================*/
|
||||||
|
this.checker[index].value = this.input[index].value;
|
||||||
|
|
||||||
|
|
||||||
|
this.checker[index].compile(); // on génére la RegExp
|
||||||
|
var RegExpByChar = this.checker[index].regexp.patternDecomposition; // on retire "/^" et "$/" de la RegExp
|
||||||
|
var tmpValue = this.input[index].value; // on copie la "value" pour la modifier
|
||||||
|
|
||||||
|
|
||||||
|
if( !this.check(pInputElement) ){ // si la chaîne n'est pas correcte
|
||||||
|
|
||||||
|
var lastChar = null;
|
||||||
|
|
||||||
|
/* [2] Cas 1 : vérification de la chaîne complète
|
||||||
|
====================================================*/
|
||||||
|
for( var i = 0 ; i < RegExpByChar.length ; i++ ){ // on parcours le pattern
|
||||||
|
|
||||||
|
// si on dépasse de la valeur saisie et qu'on doit pas aller jusqu'à la fin, on quitte le FOR
|
||||||
|
if( !pToEnd && i >= this.input[index].value.length )
|
||||||
|
break;
|
||||||
|
|
||||||
|
lastChar = tmpValue[i];
|
||||||
|
|
||||||
|
// RegExp sur le caractère en question
|
||||||
|
var tmpRegExp = new RegExp( '^'+RegExpByChar[i]+'$' );
|
||||||
|
|
||||||
|
/* (1) Valeur inexistante (string.length < schéma.length)
|
||||||
|
-----------------------------------------------------------*/
|
||||||
|
if( tmpValue.length == 0 || tmpValue[i] == null )
|
||||||
|
tmpValue = tmpValue.slice(0, i).concat( this.defval[index][i] ).concat( tmpValue.slice(i) );
|
||||||
|
|
||||||
|
/* (2) Valeur ne correspond pas au schéma du caractère
|
||||||
|
-----------------------------------------------------------*/
|
||||||
|
else if( tmpValue[i].match(tmpRegExp) == null ){
|
||||||
|
// si le caractère suivant match, on décale d'une position
|
||||||
|
if( tmpValue[i].match(new RegExp( '^'+RegExpByChar[i+1]+'$' )) != null )
|
||||||
|
tmpValue = tmpValue.slice(0, i).concat( this.defval[index][i] ).concat( tmpValue.slice(i) );
|
||||||
|
// sinon on remplace
|
||||||
|
else
|
||||||
|
tmpValue = tmpValue.slice(0, i).concat( this.defval[index][i] ).concat( tmpValue.slice(i+1) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// on tronque ce qui dépasse
|
||||||
|
tmpValue = tmpValue.slice(0, RegExpByChar.length);
|
||||||
|
|
||||||
|
// on met à jour la valeur de l'élément input
|
||||||
|
this.input[index].value = tmpValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
|
@ -0,0 +1,279 @@
|
||||||
|
/***************************************/
|
||||||
|
/* */
|
||||||
|
/* GESTIONNAIRE D'OPTIMISATION DES */
|
||||||
|
/* RESSOURCES ET DE */
|
||||||
|
/* NAVIGATION EN AJAX */
|
||||||
|
/* */
|
||||||
|
/* Développé par {xdrm} */
|
||||||
|
/* */
|
||||||
|
/* GITHUB github.com/xdrm-brackets/ */
|
||||||
|
/* */
|
||||||
|
/***************************************/
|
||||||
|
|
||||||
|
function pageManagerClass(){};
|
||||||
|
|
||||||
|
var ptrPageManagerClass; // pointeur global pour l'utilisation de fonctions de fonctions
|
||||||
|
|
||||||
|
pageManagerClass.prototype = {
|
||||||
|
depJS: null, // la dépendance javascript
|
||||||
|
depCSS: null, // la dépendance css
|
||||||
|
xhr: [], // tableau d'objets pour les requêtes ajax
|
||||||
|
activeXHR: null, // Contiendra l'instance XHR (ajax) en cours
|
||||||
|
page: null, // l'indice de la page courante dans pagelist
|
||||||
|
vars: [], // les variables suivant le nom de la page dans l'URL
|
||||||
|
path: '', // le chemin du dossier contenant les pages (.php)
|
||||||
|
jsPath: 'js', // le chemin du dossier contenant les scripts (.js)
|
||||||
|
cssPath: 'css', // le chemin du dossier contenant les feuilles de style (.css)
|
||||||
|
pagelist: null, // la liste des pages pouvant être chargées
|
||||||
|
container: null, // élément DOM qui contiendra le contenu des pages à charger
|
||||||
|
/* =======================================================================
|
||||||
|
Cette fonction effectue une requête Ajax (compatible à partir de IE5)
|
||||||
|
PARAMETRES:
|
||||||
|
- pLink<string> le lien à charger
|
||||||
|
- pHandler<function> une fonction qui s'éxécutera avec la réponse de la requête passée en paramètre (voir exemples dessous pour pHandler)
|
||||||
|
- pMethod<string> type de méthode, vaut 'POST' ou 'GET' et vaut 'POST' par défaut ou s'il n'est pas renseigné
|
||||||
|
- pForm<FormData> formulaire de type FormData() contenant les données à envoyer (uniquement en POST), si pForm vaut GET les données doivent être passées dans l'URL
|
||||||
|
========================================================================== */
|
||||||
|
ajax: function(pLink, pHandler, pMethod, pForm){
|
||||||
|
// on efface les requêtes qui sont terminées et on push une nouvelle
|
||||||
|
for( var i = 0 ; i < this.xhr.length ; i++ ){
|
||||||
|
// if( this.xhr[i].readyState == 4 ) // si terminée
|
||||||
|
this.xhr = this.xhr.slice(0,i-1).concat(this.xhr.slice(i,this.xhr.length-1)); // suppression entrée
|
||||||
|
}
|
||||||
|
|
||||||
|
var index;
|
||||||
|
|
||||||
|
if(window.XMLHttpRequest) // IE7+, Firefox, Chrome, Opera, Safari
|
||||||
|
index = this.xhr.push( new XMLHttpRequest() ) -1;
|
||||||
|
else // IE5, IE6
|
||||||
|
index = this.xhr.push( new ActiveXObject('Microsoft.XMLHttpRequest') ) -1;
|
||||||
|
|
||||||
|
// On definit un pointeur sur l'instance XHR active (ajax)
|
||||||
|
this.activeXHR = this.xhr[index];
|
||||||
|
|
||||||
|
var ptrPageManagerClass = this;
|
||||||
|
this.xhr[index].onreadystatechange = function(){
|
||||||
|
if( ptrPageManagerClass.xhr[index].readyState == 4 ) // si la requête est terminée
|
||||||
|
if( [0,200].indexOf(ptrPageManagerClass.xhr[index].status) > -1 ) // si fichier existe et reçu
|
||||||
|
pHandler(ptrPageManagerClass.xhr[index].responseText);
|
||||||
|
else // si code d'erreur retourne null
|
||||||
|
pHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
// gestion de la méthode
|
||||||
|
var method = ( typeof pMethod == 'string' && /^POST|GET$/i.test(pMethod) ) ? pMethod.toUpperCase() : 'POST';
|
||||||
|
|
||||||
|
// gestion du formulaire si la méthode est POST
|
||||||
|
var form = ( method == 'POST' && typeof pForm == 'object' && pForm instanceof FormData ) ? pForm : null;
|
||||||
|
|
||||||
|
this.xhr[index].open( method, pLink, true );
|
||||||
|
this.xhr[index].send( form );
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
/***************************************************** [APPLICATION] Ajax() ******************************************************/
|
||||||
|
// EXEMPLES DE FONCTIONS POUR pHandler //
|
||||||
|
// 1. var a = function(param){ alert(param); } // les deux notations 1 et 2 sont équivalents
|
||||||
|
// 2. function a(param){ alert(param); } // les deux notations 1 et 2 sont équivalents
|
||||||
|
|
||||||
|
// ajax( 'index.php', a ); // utilisation d'une fonction définie
|
||||||
|
|
||||||
|
// ajax( 'index.php', alert ); // utilisation d'une fonction prédéfinie
|
||||||
|
// ajax( 'index.php', alert, 'GET' ); // utilisation de méthode
|
||||||
|
|
||||||
|
// var fd = new FormData(); // création d'un formulaire
|
||||||
|
// fd.append('var', 100); // ajout de la variable VAR qui vaut 100
|
||||||
|
|
||||||
|
// ajax( 'index.php', alert, null, fd ); // saut de paramètre avec null + envoi formulaire
|
||||||
|
// ajax( 'index.php?var=10', alert, 'GET' ); // envoi formulaire en GET (dans l'url)
|
||||||
|
// ajax( 'index.php?var=10', alert, 'POST', fd ); // envoi formulaire en GET (dans l'url) + en POST via le formulaire FD
|
||||||
|
|
||||||
|
|
||||||
|
/* =======================================================================
|
||||||
|
Cette fonction effectue une décomposition de l'URL sur le shéma spécifié dessous
|
||||||
|
Renvoie pour http://www.exemple.com/dirA/dirB/#/NOMPAGE/VARPAGE
|
||||||
|
- null si la page n'est pas référencée dans le tableau PAGELIST
|
||||||
|
- null si le lien ne contient pas /#/NOMPAGE à la fin
|
||||||
|
- null si NOMPAGE ne contient pas uniquement : lettres, chiffres, underscore
|
||||||
|
- null si VARPAGE ne contient pas uniquement : lettres, chiffres, underscore
|
||||||
|
- un objet contenant {page: valeur, var: valeur}
|
||||||
|
========================================================================== */
|
||||||
|
explodeURL: function(url_data){
|
||||||
|
url_data = (arguments.length >= 1) ? url_data : document.URL;
|
||||||
|
// si pageList est correct et que l'URL correspond à un schéma de page => continue [sinon] return null
|
||||||
|
if( this.pagelist != null && /^(?:(?:http:\/\/)?[^\/]+)\/([a-z0-9_]+)\/?(?:\/((?:.+\/)+)\/?)?$/i.test(url_data) ){
|
||||||
|
// si la page récupérée dans l'url est dans la liste => renvoi de l'objet [sinon] null
|
||||||
|
var vars = RegExp.$2.split('/');
|
||||||
|
while( vars[vars.length-1] == '' ) // on supprime les dernières entrées vides
|
||||||
|
vars.pop();
|
||||||
|
|
||||||
|
return ( this.pagelist.indexOf(RegExp.$1) > -1 ) ? {page: RegExp.$1, var: vars} : null;
|
||||||
|
}else
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
/* =======================================================================
|
||||||
|
Cette fonction ajoute des dépendances (un js et un css) situés dans le répertoire des pages.
|
||||||
|
pageDir/
|
||||||
|
_JS/
|
||||||
|
page1.js
|
||||||
|
page2.js
|
||||||
|
_CSS/
|
||||||
|
page1.css
|
||||||
|
page2.css
|
||||||
|
========================================================================== */
|
||||||
|
loadDependencies: function(){
|
||||||
|
// si depCSS est un élément du DOM c'est à dire qu'il contient le fichier de la page précédente et qu'il est enfant de <head>, on le détruit
|
||||||
|
if( typeof this.depCSS == 'object' && this.depCSS instanceof Element && this.depCSS.parentNode == document.head )
|
||||||
|
document.head.removeChild( this.depCSS );
|
||||||
|
|
||||||
|
// si depJS est un élément du DOM c'est à dire qu'il contient le fichier de la page précédente, on le détruit
|
||||||
|
if( typeof this.depJS == 'object' && this.depJS instanceof Element && this.depJS.parentNode == document.head )
|
||||||
|
document.head.removeChild( this.depJS );
|
||||||
|
|
||||||
|
ptrPageManagerClass = this;
|
||||||
|
// si le fichier css existe
|
||||||
|
this.ajax(this.path+'/'+this.cssPath+'/'+this.page+'.css', function(e){
|
||||||
|
if( e != null ){ // on charge la dépendance CSS si le fichier existe
|
||||||
|
ptrPageManagerClass.depCSS = document.createElement('link');
|
||||||
|
ptrPageManagerClass.depCSS.rel = 'stylesheet';
|
||||||
|
ptrPageManagerClass.depCSS.type = 'text/css';
|
||||||
|
ptrPageManagerClass.depCSS.href = ptrPageManagerClass.path+'/'+ptrPageManagerClass.cssPath+'/'+ptrPageManagerClass.page+'.css';
|
||||||
|
document.head.appendChild(ptrPageManagerClass.depCSS);
|
||||||
|
}else
|
||||||
|
console.warn('[loadDependencies_Error] - ('+ptrPageManagerClass.path+'/'+ptrPageManagerClass.cssPath+'/'+ptrPageManagerClass.page+'.css)');
|
||||||
|
});
|
||||||
|
|
||||||
|
// si le fichier js existe
|
||||||
|
this.ajax(this.path+'/'+this.jsPath+'/'+this.page+'.js', function(e){
|
||||||
|
if( e != null ){ // on charge la dépendance JS si le fichier existe
|
||||||
|
ptrPageManagerClass.depJS = document.createElement('script');
|
||||||
|
ptrPageManagerClass.depJS.type = 'text/javascript';
|
||||||
|
ptrPageManagerClass.depJS.src = ptrPageManagerClass.path+'/'+ptrPageManagerClass.jsPath+'/'+ptrPageManagerClass.page+'.js';
|
||||||
|
document.head.appendChild(ptrPageManagerClass.depJS);
|
||||||
|
}else
|
||||||
|
console.warn('[loadDependencies_Error] - ('+ptrPageManagerClass.path+'/'+ptrPageManagerClass.jsPath+'/'+ptrPageManagerClass.page+'.js)');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/* =======================================================================
|
||||||
|
Met à jour l'URL de la page en fonction de la page chargée et des
|
||||||
|
variables associées (ne recharge aucune ressource)
|
||||||
|
======================================================================= */
|
||||||
|
updateURL: function(){
|
||||||
|
if( this.vars.length > 0 ) // si il y a des variables
|
||||||
|
window.history.pushState(this.page, this.page, '/'+this.page+'/'+this.vars.join('/')+'/');
|
||||||
|
else // s'il n'y en a pas
|
||||||
|
window.history.pushState(this.page, this.page, '/'+this.page+'/');
|
||||||
|
|
||||||
|
// on peut récupérer le nom de la page (quand on fait retour en arrière de l'historique)
|
||||||
|
// dans la variable : window.history.state
|
||||||
|
},
|
||||||
|
|
||||||
|
/* =======================================================================
|
||||||
|
Cette fonction est celle qui gère les 2 autres et celle que l'utilisateur utilisera
|
||||||
|
PARAMETRES:
|
||||||
|
- pName<string> le nom de la page à charger (lettres, chiffres, underscore) (*)
|
||||||
|
- pPath<string> chemin (relatif ou absolu) du dossier contenant les pages de même nom de fichier que le nom (extension .php)
|
||||||
|
- pContainer<Element> l'élément du DOM qui contiendra la page chargée (**)
|
||||||
|
- pPageList<Array<string>> tableau contenant la liste des pages sous forme de chaînes de caractères (**) (***)
|
||||||
|
* Le chemin du dossier sans le '/' final si c'est le dossier actuel le chemin est une chaîne vide
|
||||||
|
Si le dossier est 'page' et que l'on cherche la page 'accUe1l', la requête sera vers 'page/accUe1l.php'
|
||||||
|
le nom de la page est sensible à la casse
|
||||||
|
** 1. pPageList et pContainer doivent être mis en paramètres uniquement à la première utilisation
|
||||||
|
et la première utilisation doit se faire au chargement de la page car elle permetra
|
||||||
|
de mettre l'URL à jour et/ou charger la page de l'URL
|
||||||
|
*** la première page du tableau est la page par défaut (qui est chargée si l'URL ne contient
|
||||||
|
pas la page ou si la page de l'URL ne correspond à aucune page de la liste)
|
||||||
|
========================================================================== */
|
||||||
|
setPage: function(pName, pPath, pContainer, pPageList){
|
||||||
|
|
||||||
|
// liste de pages si c'est un tableau
|
||||||
|
var pageList = ( typeof pPageList == 'object' && pPageList instanceof Array ) ? pPageList : null; // si this.pagelist n'est pas overwrite il vaut null
|
||||||
|
|
||||||
|
if( pageList != null ){ // si c'est un tableau
|
||||||
|
for( var i = 0 ; i < pageList.length ; i++ ){ // on parcourt tout les éléments pour vérifier que chaque élément ne contient que : lettres, chiffres, underscore [non]> pageList = null
|
||||||
|
pageList = ( typeof pageList[i] == 'string' && /^[a-z0-9_]+$/i.test(pageList[i]) ) ? pageList : null;
|
||||||
|
if( pageList == null ) break; // si le tableau est null stoppe la boucle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* on attribue la variable temporaire pageList à l'attribut de l'objet si la variable pageList temporaire n'est pas nulle */
|
||||||
|
this.pagelist = ( pageList != null ) ? pageList : this.pagelist;
|
||||||
|
// affecte à l'attribut page la page par défaut (premier élément de pagelist)
|
||||||
|
this.page = this.pagelist[0];
|
||||||
|
// affecte pPath à l'attribut path s'il est renseigné
|
||||||
|
this.path = ( typeof pPath == 'string' ) ? pPath : this.path;
|
||||||
|
/* on attribue le paramètre pContainer à l'attribut si il est spécifié */
|
||||||
|
this.container = ( typeof pContainer == 'object' && pContainer instanceof Element ) ? pContainer : this.container;
|
||||||
|
|
||||||
|
// si this.pagelist && this.container ne sont pas null &&
|
||||||
|
if( this.pagelist != null && this.container != null ){
|
||||||
|
// si le pName est renseigné et qu'il est dans pagelist
|
||||||
|
if( typeof pName == 'string' && this.pagelist.indexOf(pName) > -1 ){
|
||||||
|
// affecte pName à l'attribut page
|
||||||
|
this.page = pName;
|
||||||
|
|
||||||
|
// charge le contenu de la page dans le container
|
||||||
|
var ptrPageManagerClass = this;
|
||||||
|
|
||||||
|
// formulaire POST
|
||||||
|
var fd = new FormData();
|
||||||
|
for( var i = 0 ; i < this.vars.length ; i++ )
|
||||||
|
fd.append(this.vars[i], null);
|
||||||
|
|
||||||
|
this.ajax(this.path+'/'+this.page+'.php', function(e){
|
||||||
|
ptrPageManagerClass.container.innerHTML = e;
|
||||||
|
ptrPageManagerClass.loadDependencies();
|
||||||
|
}, 'POST', fd);
|
||||||
|
|
||||||
|
// change l'URL en conséquences(stateObj, titre, url)
|
||||||
|
this.updateURL();
|
||||||
|
|
||||||
|
}else{ // si la page n'est pas spécifiée ou qu'elle n'est pas dans la liste des pages
|
||||||
|
var urlGet = this.explodeURL();
|
||||||
|
|
||||||
|
// si on a récupéré le numéro de la page dans l'URL et qu'elle fait partie de la liste des pages
|
||||||
|
if( urlGet != null ){
|
||||||
|
this.page = urlGet.page;
|
||||||
|
// charge le contenu de la page dans le container
|
||||||
|
var ptrThis = this;
|
||||||
|
|
||||||
|
// formulaire POST
|
||||||
|
var fd = new FormData();
|
||||||
|
this.vars.length = 0;
|
||||||
|
|
||||||
|
for( var i = 0 ; i < urlGet.var.length ; i++ ){ // replacing object variables with explodeURL variables
|
||||||
|
this.vars[i] = urlGet.var[i];
|
||||||
|
fd.append(this.vars[i], null);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ajax(this.path+'/'+this.page+'.php', function(e){
|
||||||
|
ptrThis.container.innerHTML = e;
|
||||||
|
ptrThis.loadDependencies();
|
||||||
|
}, 'POST', fd);
|
||||||
|
|
||||||
|
// change l'URL en conséquences(stateObj, titre, url)
|
||||||
|
this.updateURL();
|
||||||
|
|
||||||
|
}else // si l'url ne contient rien, on charge la page par défaut
|
||||||
|
this.setPage(this.pagelist[0]);
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
console.warn('pagelist et container manquant');
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Rechargement de la page courante
|
||||||
|
*
|
||||||
|
* @action Recharge la page en cours en conservant les variables
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
refresh: function(){
|
||||||
|
this.setPage(this.page);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,113 @@
|
||||||
|
/* SELECTEUR SIMPLIFIE
|
||||||
|
*
|
||||||
|
* @ifOrClass<String> L'id ou la classe de l'element cible
|
||||||
|
*
|
||||||
|
* @return element<Element> Retourne l'element de cet ID ou cette classe si trouve
|
||||||
|
* @return null Retourne null si rien n'est trouve
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function $(idOrClass){
|
||||||
|
var byId = document.querySelectorAll('#'+idOrClass);
|
||||||
|
var byClass = document.querySelectorAll('.'+idOrClass);
|
||||||
|
|
||||||
|
if( byId.length > 0 ) return byId[0];
|
||||||
|
else return byClass[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Retourne un data-* attribute d'un element (surcharge de l'ELEMENT natif)
|
||||||
|
*
|
||||||
|
* @attribute<String> L'attribut qui nous interesse
|
||||||
|
*
|
||||||
|
* @return value<String> Retourne la valeur si l'attribut existe
|
||||||
|
* @return false Retourne FALSE si rien n'a ete trouve
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Element.prototype.getData = function(attribute){
|
||||||
|
// On verifie qu'un data-* attribute existe
|
||||||
|
if( typeof this.dataset == 'undefined' )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return ( this.dataset.hasOwnProperty(attribute) ) ? this.dataset[attribute] : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Ajout de classe pour un element (surcharge de l'ELEMENT natif)
|
||||||
|
*
|
||||||
|
* @className<String> Classe a ajouter a l'element
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Element.prototype.addClass = function(className){
|
||||||
|
/* [1] On transforme la classe actuelle en tableau
|
||||||
|
====================================================*/
|
||||||
|
var classArray = this.className.split(' ');
|
||||||
|
|
||||||
|
/* [2] On ajoute la classe si elle n'y est pas deja
|
||||||
|
====================================================*/
|
||||||
|
if( classArray.indexOf(className) > -1 ) return; // La classe y est deja
|
||||||
|
|
||||||
|
classArray.push(className);
|
||||||
|
|
||||||
|
/* [3] On reformatte tout
|
||||||
|
====================================================*/
|
||||||
|
this.className = classArray.join(' ').trim();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Suppression de classe pour un element (surcharge de l'ELEMENT natif)
|
||||||
|
*
|
||||||
|
* @className<String> Classe a supprimer a l'element
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Element.prototype.remClass = function(className){
|
||||||
|
/* [1] On transforme la classe actuelle en tableau
|
||||||
|
====================================================*/
|
||||||
|
var classArray = this.className.split(' ');
|
||||||
|
|
||||||
|
/* [2] On retire la classe si elle y est
|
||||||
|
====================================================*/
|
||||||
|
var index = classArray.indexOf(className);
|
||||||
|
|
||||||
|
if( index == -1 ) return; // La classe n'y est pas
|
||||||
|
|
||||||
|
classArray = classArray.slice(0,index).concat( classArray.slice(index+1) );
|
||||||
|
|
||||||
|
/* [3] On reformatte tout
|
||||||
|
====================================================*/
|
||||||
|
this.className = classArray.join(' ').trim();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// on définit le "indexOf" pour <HTMLCollection> et <NodeList>
|
||||||
|
NodeList.prototype.indexOf = HTMLCollection.prototype.indexOf = function(searchedElement){
|
||||||
|
for( var i = 0 ; i < this.length ; i++ ) // on parcours la collection
|
||||||
|
// si on trouve l'élement, on retourne son rang
|
||||||
|
if( this[i] == searchedElement ) return i;
|
||||||
|
|
||||||
|
// si on a rien trouvé, on retourne -1
|
||||||
|
return -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// GESTION DES ANIMATIONS (CLASSE PENDANT TEMPS IMPARTI)
|
||||||
|
Element.prototype.anim = function(className, timeout){
|
||||||
|
|
||||||
|
var pointer = this; // on cree un pointeur
|
||||||
|
|
||||||
|
pointer.addClass(className); // on met la classe
|
||||||
|
|
||||||
|
// on la retire apres le @timeout imparti
|
||||||
|
setTimeout(function(){ pointer.remClass(className); }, timeout);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* DEFINITION DES FORMATS UTILES POUR INPUT-CHECKER
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var format_code = new formatChecker(null, 'HH-HH-HH-HH', { 'H' : '[0-9A-F]'} )
|
|
@ -0,0 +1,231 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager;
|
||||||
|
|
||||||
|
|
||||||
|
class DataBase{
|
||||||
|
|
||||||
|
/* ATTRIBUTS STATIQUES */
|
||||||
|
public static $config_path = array(
|
||||||
|
'local' => 'f/json/database-local/conf',
|
||||||
|
'remote' => 'f/json/database/conf'
|
||||||
|
);
|
||||||
|
|
||||||
|
private static $pdo;
|
||||||
|
private static $instance;
|
||||||
|
|
||||||
|
|
||||||
|
/* ATTRIBUTS */
|
||||||
|
private $host;
|
||||||
|
private $dbname;
|
||||||
|
private $username;
|
||||||
|
private $password;
|
||||||
|
|
||||||
|
public static $error;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct($host, $dbname, $username, $password){
|
||||||
|
$this->host = $host;
|
||||||
|
$this->dbname = $dbname;
|
||||||
|
$this->username = $username;
|
||||||
|
$this->password = $password;
|
||||||
|
|
||||||
|
try{
|
||||||
|
self::$pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);
|
||||||
|
|
||||||
|
// On signale que tout s'est bien passe
|
||||||
|
self::$error = ManagerError::Success;
|
||||||
|
|
||||||
|
}catch(Exception $e){
|
||||||
|
// On signale qu'il y a une erreur
|
||||||
|
self::$error = ManagerError::PDOConnection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* retourne une instance de la classe */
|
||||||
|
public static function getInstance(){
|
||||||
|
if( self::$instance == null || self::$error != ManagerError::Success ){ // Si aucune instance existante OU erreur de connection
|
||||||
|
|
||||||
|
// chargement de la configuration du server SQL
|
||||||
|
if( !isset($_SERVER['HTTP_HOST']) || isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'stefproject' )
|
||||||
|
$conf = json_decode( ResourceDispatcher::getResource(self::$config_path['local']), true );
|
||||||
|
else
|
||||||
|
$conf = json_decode( ResourceDispatcher::getResource(self::$config_path['remote']), true );
|
||||||
|
|
||||||
|
// creation de l'instance en fonction des parametres
|
||||||
|
self::$instance = new DataBase($conf['host'], $conf['dbname'], $conf['user'], $conf['password']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* retourne la connection statique */
|
||||||
|
public static function getPDO(){
|
||||||
|
$instance = self::getInstance();
|
||||||
|
|
||||||
|
return self::$pdo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getConfig(){
|
||||||
|
return array(
|
||||||
|
'host' => $this->host,
|
||||||
|
'username' => $this->username
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
/* _____ ______ _ _ ______ _____ _ */
|
||||||
|
/* / ____| ____| \ | | ____| __ \ /\ | | */
|
||||||
|
/* | | __| |__ | \| | |__ | |__) | / \ | | */
|
||||||
|
/* | | |_ | __| | . ` | __| | _ / / /\ \ | | */
|
||||||
|
/* | |__| | |____| |\ | |____| | \ \ / ____ \| |____ */
|
||||||
|
/* \_____|______|_| \_|______|_| \_\/_/ \_\______| */
|
||||||
|
/* */
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
/* SUPPRIME LES VALEURS À CLÉS NUMÉRIQUES DANS UN FETCH D'UNE TABLE DE LA BDD
|
||||||
|
*
|
||||||
|
* @fetchData<Array> le résultat d'une $requeteSQL->fetchAll()
|
||||||
|
* @oneDimension<Boolean> FAUX <=> fetchAll ; VRAI <=> fetch
|
||||||
|
*
|
||||||
|
* @return newFetchData<Array> retourne le tableau donné en paramètre mais sans les valeurs à clés numériques
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function delNumeric($fetchData, $oneDimension=false){
|
||||||
|
// On quitte si ce n'est pas un tableau
|
||||||
|
if( !is_array($fetchData) )
|
||||||
|
return array();
|
||||||
|
|
||||||
|
$nextEquivalent = false; // Vaut VRAI si le prochain est peut-etre un equivalent numerique
|
||||||
|
|
||||||
|
/* [1] 2 dimensions
|
||||||
|
===============================================*/
|
||||||
|
if( !$oneDimension && isset($fetchData[0]) && is_array($fetchData[0]) ){
|
||||||
|
|
||||||
|
// on supprime les doublons des entrées (indice numérique)
|
||||||
|
for( $i = 0 ; $i < count($fetchData) ; $i++ ) // pour tout les utilisateurs
|
||||||
|
foreach($fetchData[$i] as $col => $val){ // pour toutes les entrées
|
||||||
|
|
||||||
|
if( !mb_detect_encoding($val, 'UTF-8') )
|
||||||
|
$fetchData[$i][$col] = utf8_encode($val);
|
||||||
|
|
||||||
|
if( is_int($col) ){ // Si indice numerique
|
||||||
|
if( $nextEquivalent ) // Si suit un indice textuel
|
||||||
|
unset( $fetchData[$i][$col] ); // on supprime l'indice
|
||||||
|
|
||||||
|
$nextEquivalent = false; // Dans tous les cas, on dit que le prochain ne pourra pas etre supprime si numerique
|
||||||
|
|
||||||
|
}else // Si l'indice n'est pas un entier
|
||||||
|
$nextEquivalent = true; // On signale qu'il y aura peut etre un indice numerique suivant
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [2] 1 dimensions
|
||||||
|
===============================================*/
|
||||||
|
}else{
|
||||||
|
|
||||||
|
// on supprime les doublons des entrées (indice numérique)
|
||||||
|
foreach($fetchData as $i=>$val){ // pour toutes les entrées
|
||||||
|
|
||||||
|
if( !mb_detect_encoding($val, 'UTF-8') )
|
||||||
|
$fetchData[$i] = utf8_encode($val);
|
||||||
|
|
||||||
|
if( is_int($i) ){ // Si indice numerique
|
||||||
|
if( $nextEquivalent ) // Si suit un indice textuel
|
||||||
|
unset( $fetchData[$i] ); // on supprime l'indice
|
||||||
|
|
||||||
|
$nextEquivalent = false; // Dans tous les cas, on dit que le prochain ne pourra pas etre supprime si numerique
|
||||||
|
|
||||||
|
}else // Si l'indice n'est pas un entier
|
||||||
|
$nextEquivalent = true; // On signale qu'il y aura peut etre un indice numerique suivant
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fetchData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////
|
||||||
|
// _ __ _ _ _
|
||||||
|
// __ _____ _ __(_)/ _(_) ___ __ _| |_(_) ___ _ __ ___
|
||||||
|
// \ \ / / _ \ '__| | |_| |/ __/ _` | __| |/ _ \| '_ \/ __|
|
||||||
|
// \ V / __/ | | | _| | (_| (_| | |_| | (_) | | | \__ \
|
||||||
|
// \_/ \___|_| |_|_| |_|\___\__,_|\__|_|\___/|_| |_|___/
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/* VERIFICATIONS DES TYPES UTILES GENERIQUES
|
||||||
|
*
|
||||||
|
* @type<String> Type que l'on veut verifier
|
||||||
|
* @value<mixed*> Valeur a verifier
|
||||||
|
*
|
||||||
|
* @return match<Boolean> Retourne si oui ou non la valeur @value est du bon type @type
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function check($type, $value){
|
||||||
|
$checker = !is_null($value);
|
||||||
|
|
||||||
|
switch($type){
|
||||||
|
/* (1) Global */
|
||||||
|
case 'auto_increment_id':
|
||||||
|
return $checker && is_numeric($value) && $value <= 2147483647 && $value >= -2147483647;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* (2) Utilisateur */
|
||||||
|
case 'user.code':
|
||||||
|
case 'machine.code':
|
||||||
|
return $checker && is_string($value) && preg_match('/^[\dA-F]{2}(\-[\dA-F]{2}){3,5}$/i', $value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'user.username':
|
||||||
|
case 'machine.name':
|
||||||
|
case 'group.name':
|
||||||
|
return $checker && is_string($value) && preg_match('/^[\w-]{1,30}$/i', $value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'user.firstname':
|
||||||
|
case 'user.lastname':
|
||||||
|
return $checker && is_string($value) && preg_match('/^[a-z -]{3,30}$/i', $value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'user.mail':
|
||||||
|
return $checker && is_string($value) && strlen($value) <= 50 && preg_match('/^[\w\.-]+@[\w\.-]+\.[a-z]{2,4}$/i', $value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'user.password':
|
||||||
|
return $checker && is_string($value) && preg_match('/^[\da-f]{40}$/i', $value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'user.status':
|
||||||
|
return $checker && is_numeric($value) && floor($value) == $value && $value >= 0 && $value <= 100;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $checker;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
|
@ -0,0 +1,102 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
namespace manager;
|
||||||
|
|
||||||
|
|
||||||
|
class ManagerError{
|
||||||
|
|
||||||
|
/* SUCCESS */
|
||||||
|
const Success = 0;
|
||||||
|
|
||||||
|
/* Parsage json */
|
||||||
|
const ParsingFailed = 1;
|
||||||
|
|
||||||
|
/* ResourceDispatcher */
|
||||||
|
|
||||||
|
// Drapeaux invalides
|
||||||
|
const InvalidFlags = 2;
|
||||||
|
|
||||||
|
// Fichier inexistant
|
||||||
|
const UnreachableResource = 3;
|
||||||
|
|
||||||
|
|
||||||
|
/* ModuleRequest */
|
||||||
|
|
||||||
|
// Le @path n'est pas renseigne
|
||||||
|
const MissingPath = 4;
|
||||||
|
|
||||||
|
// Verification de la coherence du chemin (existe dans la conf)
|
||||||
|
const WrongPathModule = 5;
|
||||||
|
|
||||||
|
// Module non specifie dans la conf
|
||||||
|
const UnknownModule = 6;
|
||||||
|
|
||||||
|
// Methode non specifie pour ce Module dans la conf
|
||||||
|
const UnknownMethod = 7;
|
||||||
|
|
||||||
|
// Methode inamorcable
|
||||||
|
const UncallableMethod = 8;
|
||||||
|
|
||||||
|
// Erreur de parametre(s)
|
||||||
|
const ParamError = 9;
|
||||||
|
|
||||||
|
// Erreur dans le traitement
|
||||||
|
const ModuleError = 10;
|
||||||
|
|
||||||
|
/* Repo */
|
||||||
|
|
||||||
|
// Verification de la coherence du chemin (existe dans la conf)
|
||||||
|
const WrongPathRepo = 11;
|
||||||
|
|
||||||
|
// Module non specifie dans la conf
|
||||||
|
const UnknownRepo = 12;
|
||||||
|
|
||||||
|
// Erreur dans le traitement
|
||||||
|
const RepoError = 13;
|
||||||
|
|
||||||
|
/* Database */
|
||||||
|
|
||||||
|
// Erreur lors de la creation d'un objet PDO (connection)
|
||||||
|
const PDOConnection = 14;
|
||||||
|
|
||||||
|
|
||||||
|
/* EXPLICITE UN CODE D'ERREUR
|
||||||
|
*
|
||||||
|
* @error<Integer> Code d'erreur
|
||||||
|
*
|
||||||
|
* @return explicit<String> Description explicite du code d'erreur
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function explicit($error){
|
||||||
|
switch($error){
|
||||||
|
case self::Success: return "Tout s'est bien deroule"; break;
|
||||||
|
|
||||||
|
case self::ParsingFailed: return "La lecture du fichier JSON a echoue"; break;
|
||||||
|
|
||||||
|
case self::InvalidFlags: return "Les specifications (drapeaux) sont incorrects"; break;
|
||||||
|
case self::UnreachableResource: return "La ressource n'existe pas (404)"; break;
|
||||||
|
case self::MissingPath: return "Le chemin de delegation n'a pas ete renseigne"; break;
|
||||||
|
case self::WrongPathModule: return "Le chemin de delegation est incorrect ('nomModule/nomMethode')"; break;
|
||||||
|
case self::WrongPathRepo: return "Le chemin de delegation est incorrect ('nomRepo/nomMethode')"; break;
|
||||||
|
case self::UnknownModule: return "Le module n'existe pas"; break;
|
||||||
|
case self::UnknownRepo: return "Le repo n'existe pas"; break;
|
||||||
|
case self::UnknownMethod: return "Le methode n'existe pas"; break;
|
||||||
|
case self::UncallableMethod: return "Le methode n'est pas amorcable"; break;
|
||||||
|
|
||||||
|
case self::ParamError: return "Un ou plusieurs parametres sont manquants ou incorrects"; break;
|
||||||
|
case self::ModuleError: return "Erreur lors du traitement du module"; break;
|
||||||
|
case self::RepoError: return "Erreur lors du traitement du repo"; break;
|
||||||
|
|
||||||
|
case self::PDOConnection: return "La connexion avec la base de donnees a echoue"; break;
|
||||||
|
|
||||||
|
// default: return "Erreur inconnue..."; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Erreur inconnue
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,150 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager;
|
||||||
|
|
||||||
|
|
||||||
|
// FORMAT:
|
||||||
|
//
|
||||||
|
// path: "nomModule/nomMethode"
|
||||||
|
// data1: {donnee1}
|
||||||
|
// data2: {donnee2}
|
||||||
|
// ...
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
class ModuleAnswer{
|
||||||
|
|
||||||
|
// Attributs prives utiles (initialisation)
|
||||||
|
private $data;
|
||||||
|
public $error;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* CONSTRUCTEUR D'UNE REPONSE DE MODULE
|
||||||
|
*
|
||||||
|
* @error<ModuleError> Erreur passee par la requete (si existe)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct($error=ManagerError::Success){
|
||||||
|
$this->data = array();
|
||||||
|
$this->error = $error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AJOUTE UNE DONNEE A LA REPONSE
|
||||||
|
*
|
||||||
|
* @key<String> Le nom de la valeur a ajouter
|
||||||
|
* @value<mixed*> La valeur a ajouter
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function append($key, $value){
|
||||||
|
// Ajoute une entree pour la cle @key et de valeur @value
|
||||||
|
$this->data[$key] = $value;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AJOUTE TOUTES LES DONNEES A LA REPONSE
|
||||||
|
*
|
||||||
|
* @dataset<Array> Le tableau associatif correspondant a la reponse
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function appendAll($dataset){
|
||||||
|
// Si ce n'est pas un tableau, on ne fais rien
|
||||||
|
if( !is_array($dataset) ) return $this;
|
||||||
|
|
||||||
|
// Si une valeur contient une erreur
|
||||||
|
if( array_key_exists('ModuleError', $dataset) ){
|
||||||
|
// On definit cette erreur
|
||||||
|
$this->error = $dataset['ModuleError'];
|
||||||
|
// On enleve cette entree des donnees
|
||||||
|
unset($dataset['ModuleError']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajoute une entree pour la cle @key et de valeur @value
|
||||||
|
$this->data = $dataset;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RECUPERE UNE DONNEE DE LA REPONSE
|
||||||
|
*
|
||||||
|
* @key<String> Le nom de la valeur a recuperer
|
||||||
|
*
|
||||||
|
* @return value<mixed*> La valeur a cette cle
|
||||||
|
* @return error<null> Retourne NULL si aucune valeur pour cette cle
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function get($key){
|
||||||
|
// Si la valeur de cle @key n'existe pas, on retourne NULL
|
||||||
|
if( !isset($this->data[$key]) )
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// Sinon, on retourne la valeur associee
|
||||||
|
return $this->data[$key];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RECUPERE TOUTES LES DONNEES DE LA REPONSE
|
||||||
|
*
|
||||||
|
* @return data<Array> Les donnees de la reponse
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function getAll(){
|
||||||
|
// Sinon, on retourne la valeur associee
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SERIALISATION A PARTIR DES DONNEES
|
||||||
|
*
|
||||||
|
* @return json<String> Retourne les donnees serialisees
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function serialize(){
|
||||||
|
|
||||||
|
// On rajoute l'erreur au message
|
||||||
|
$returnData = array_merge( array('ModuleError' => $this->error), $this->data );
|
||||||
|
|
||||||
|
return json_encode($returnData);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,259 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager;
|
||||||
|
|
||||||
|
// FORMAT:
|
||||||
|
//
|
||||||
|
// path: "nomModule/nomMethode"
|
||||||
|
// data1: {donnee1}
|
||||||
|
// data2: {donnee2}
|
||||||
|
// ...
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
class ModuleRequest{
|
||||||
|
|
||||||
|
// Constantes
|
||||||
|
public static $config_path = 'f/json/modules/conf';
|
||||||
|
|
||||||
|
|
||||||
|
// Attributs prives utiles (initialisation)
|
||||||
|
private $path;
|
||||||
|
private $data;
|
||||||
|
private $modules;
|
||||||
|
|
||||||
|
// Contiendra la reponse a la requete
|
||||||
|
public $answer;
|
||||||
|
|
||||||
|
// Contiendra l'etat de la requete
|
||||||
|
public $error;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* CONSTRUCTEUR D'UNE REQUETE DE MODULE
|
||||||
|
*
|
||||||
|
* @path<String> Chemin de delegation ("module/methode")
|
||||||
|
* @data<Array> Tableau contenant les parametres utiles au traitement
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct($path=null, $data=null){
|
||||||
|
// Si pas parametre manquant, on quitte
|
||||||
|
if( $path == null ){
|
||||||
|
$this->error = ManagerError::MissingPath;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [0] On met a jour la configuration
|
||||||
|
=========================================================*/
|
||||||
|
// Modules specifies
|
||||||
|
$this->modules = json_decode( ResourceDispatcher::getResource(self::$config_path), true );
|
||||||
|
|
||||||
|
// Gestion de l'erreur de parsage
|
||||||
|
if( $this->modules == null ){
|
||||||
|
$this->error = ManagerError::ParsingFailed;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] Verification des types des parametres
|
||||||
|
=========================================================*/
|
||||||
|
// Type de @path
|
||||||
|
if( !is_string($path) ){ // Si le type est incorrect
|
||||||
|
$this->error = ManagerError::WrongPathModule;
|
||||||
|
return false; // On retourne FALSE, si erreur
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type de @data (optionnel)
|
||||||
|
$data = (is_array($data)) ? $data : array();
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Verification du chemin (existence module+methode)
|
||||||
|
=========================================================*/
|
||||||
|
if( !$this->checkPath($path) ) // Verification de la coherence du chemin + attribution
|
||||||
|
return false;
|
||||||
|
// Gestion d'erreur interne
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Construction de l'objet
|
||||||
|
=========================================================*/
|
||||||
|
$this->data = $data;
|
||||||
|
$this->error = ManagerError::Success;
|
||||||
|
|
||||||
|
return true; // On retourne que tout s'est bien passe
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* EXECUTE LE TRAITEMENT ASSOCIE ET REMPLIE LA REPONSE
|
||||||
|
*
|
||||||
|
* @return answer<ModuleAnswer> Retourne une reponse de type <ModuleAnswer> si tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function dispatch(){
|
||||||
|
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
||||||
|
=========================================================*/
|
||||||
|
if( $this->error != ManagerError::Success ) // si il y a une erreur
|
||||||
|
return new ModuleAnswer($this->error); // on la passe a la reponse
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On verifie que la methode est amorcable
|
||||||
|
=========================================================*/
|
||||||
|
if( !is_callable($this->getFunctionCaller()) ){
|
||||||
|
$this->error = ManagerError::UncallableMethod;
|
||||||
|
return new ModuleAnswer($this->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] On amorce la methode
|
||||||
|
=========================================================*/
|
||||||
|
$returned = call_user_func_array( $this->getFunctionCaller(), $this->data );
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] Gestion de la reponse
|
||||||
|
=========================================================*/
|
||||||
|
$answer = new ModuleAnswer($this->error);
|
||||||
|
$answer->appendAll($returned);
|
||||||
|
|
||||||
|
return $answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* DESERIALISATION ET CREATION D'UN OBJET
|
||||||
|
*
|
||||||
|
* @jsonString<String> Json au format string contenant les donnees
|
||||||
|
*
|
||||||
|
* @return instance<ModuleRequest> Retourne un objet de type <ModuleRequest>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function fromString($jsonString){
|
||||||
|
$json = json_decode( $jsonString, true );
|
||||||
|
|
||||||
|
// Verification du parsage
|
||||||
|
if( $json == null )
|
||||||
|
return new ModuleRequest();
|
||||||
|
|
||||||
|
// Verification des parametres
|
||||||
|
if( !isset($json['path']) )
|
||||||
|
return new ModuleRequest();
|
||||||
|
|
||||||
|
// On definit $data au cas ou il soit vide
|
||||||
|
$data = (isset($json['data'])) ? $json['data'] : array();
|
||||||
|
|
||||||
|
return new ModuleRequest($json['path'], $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* DESERIALISATION A PARTIR DES DONNEES POST
|
||||||
|
*
|
||||||
|
* @post<Array> Tableau des donnes $_POST => @path + @data (opt)
|
||||||
|
*
|
||||||
|
* @return instance<ModuleRequest> Retourne un objet de type <ModuleRequest>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function fromPost($post){
|
||||||
|
/* [1] On verifie que le @path est renseigne
|
||||||
|
=========================================================*/
|
||||||
|
if( !isset($post['path']) )
|
||||||
|
return new ModuleRequest();
|
||||||
|
|
||||||
|
/* [2] On verifie que @data est renseigne
|
||||||
|
=========================================================*/
|
||||||
|
// Si variable n'existe pas, on cree un tableau vide
|
||||||
|
$data = (isset($post['data'])) ? $post['data'] : array();
|
||||||
|
|
||||||
|
// Si c'est toujours pas un tableau, on essaie de voir si c'est un json
|
||||||
|
$data = (!is_array($data)) ? json_decode($data, true) : $data;
|
||||||
|
|
||||||
|
// Si toujours pas de tableau, on cree un tableau vide
|
||||||
|
$data = (!is_array($data)) ? array() : $data;
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] On retourne une instance de <ModuleRequest>
|
||||||
|
=========================================================*/
|
||||||
|
return new ModuleRequest($post['path'], $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* VERIFICATION DU FORMAT ET DE LA COHERENCE DU CHEMIN SPECIFIE
|
||||||
|
*
|
||||||
|
* @path<String> String correspondant au chemin de delegation ("module/methode")
|
||||||
|
*
|
||||||
|
* @return validity<Boolean> Retourne si oui ou non l'objet est correct
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private function checkPath($path){
|
||||||
|
/* [1] Verification format general
|
||||||
|
=========================================================*/
|
||||||
|
if( !preg_match('#^([\w_-]+)/([\w_-]+)$#i', $path, $matches) ){ // Si mauvais format
|
||||||
|
$this->error = ManagerError::WrongPathModule;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// On recupere les donnes de la regex
|
||||||
|
$module = $matches[1];
|
||||||
|
$method = $matches[2];
|
||||||
|
|
||||||
|
/* [2] Verification de l'existence du module (conf)
|
||||||
|
=========================================================*/
|
||||||
|
if( !array_key_exists($module, $this->modules) ){ // Si le module n'est pas specifie dans la conf
|
||||||
|
$this->error = ManagerError::UnknownModule;
|
||||||
|
return false; // On retourne FALSE, si erreur
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [3] Verification de l'existence de la methode (conf)
|
||||||
|
=========================================================*/
|
||||||
|
if( array_search($method, $this->modules[$module]) === false ){ // Si la methode n'est pas specifie dans la conf
|
||||||
|
$this->error = ManagerError::UnknownMethod;
|
||||||
|
return false; // On retourne FALSE, si erreur
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] Enregistrement du chemin et renvoi de SUCCESS
|
||||||
|
=========================================================*/
|
||||||
|
$this->path = array(
|
||||||
|
'module' => $module,
|
||||||
|
'method' => $method
|
||||||
|
);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOI LE CHEMIN D'AMORCAGE DE LA METHODE
|
||||||
|
*
|
||||||
|
* @return path<Array> Retourne le chemin d'amorcage de la requete
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private function getFunctionCaller(){
|
||||||
|
return array( '\\manager\\module\\'.$this->path['module'], $this->path['method'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,197 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager;
|
||||||
|
|
||||||
|
|
||||||
|
// FORMAT:
|
||||||
|
//
|
||||||
|
// path: "nomModule/nomMethode"
|
||||||
|
// data1: {donnee1}
|
||||||
|
// data2: {donnee2}
|
||||||
|
// ...
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
class Repo{
|
||||||
|
|
||||||
|
// Constantes
|
||||||
|
public static $config_path = 'f/json/repositories/conf';
|
||||||
|
|
||||||
|
|
||||||
|
// Attributs prives utiles (initialisation)
|
||||||
|
private $path;
|
||||||
|
private $data;
|
||||||
|
private $repositories;
|
||||||
|
|
||||||
|
// Contiendra la reponse a la requete
|
||||||
|
private $answer;
|
||||||
|
|
||||||
|
// Contiendra l'etat de la requete
|
||||||
|
public $error;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* CONSTRUCTEUR D'UNE REQUETE DE MODULE
|
||||||
|
*
|
||||||
|
* @path<String> Chemin de delegation ("repo/methode")
|
||||||
|
* @data<Array> Tableau contenant les parametres utiles au traitement
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct($path=null, $data=null){
|
||||||
|
// Si pas parametre manquant, on quitte
|
||||||
|
if( $path == null ){
|
||||||
|
$this->error = ManagerError::MissingPath;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [0] On met a jour la configuration
|
||||||
|
=========================================================*/
|
||||||
|
// Modules specifies
|
||||||
|
$this->repositories = json_decode( ResourceDispatcher::getResource(self::$config_path), true );
|
||||||
|
|
||||||
|
// Gestion de l'erreur de parsage
|
||||||
|
if( $this->repositories == null ){
|
||||||
|
$this->error = ManagerError::ParsingFailed;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] Verification des types des parametres
|
||||||
|
=========================================================*/
|
||||||
|
// Type de @path
|
||||||
|
if( !is_string($path) ){ // Si le type est incorrect
|
||||||
|
$this->error = ManagerError::WrongPathRepo;
|
||||||
|
return false; // On retourne FALSE, si erreur
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type de @data (optionnel)
|
||||||
|
$data = (is_array($data)) ? $data : array();
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Verification du chemin (existence repo+methode)
|
||||||
|
=========================================================*/
|
||||||
|
if( !$this->checkPath($path) ) // Verification de la coherence du chemin + attribution
|
||||||
|
return false;
|
||||||
|
// Gestion d'erreur interne
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Construction de l'objet
|
||||||
|
=========================================================*/
|
||||||
|
$this->data = $data;
|
||||||
|
$this->error = ManagerError::Success;
|
||||||
|
|
||||||
|
/* [4] Enregistrement de la reponse
|
||||||
|
=========================================================*/
|
||||||
|
$this->answer = $this->dispatch();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return true; // On retourne que tout s'est bien passe
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function answer(){
|
||||||
|
return $this->answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* EXECUTE LE TRAITEMENT ASSOCIE ET REMPLIE LA REPONSE
|
||||||
|
*
|
||||||
|
* @return answer<mixed*> Retourne une reponse, si tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function dispatch(){
|
||||||
|
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
||||||
|
=========================================================*/
|
||||||
|
if( $this->error != ManagerError::Success ) // si il y a une erreur
|
||||||
|
return false; // on la passe a la reponse
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On verifie que la methode est amorcable
|
||||||
|
=========================================================*/
|
||||||
|
if( !is_callable($this->getFunctionCaller()) ){
|
||||||
|
$this->error = ManagerError::UncallableMethod;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] On amorce la methode
|
||||||
|
=========================================================*/
|
||||||
|
return call_user_func_array( $this->getFunctionCaller(), $this->data );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* VERIFICATION DU FORMAT ET DE LA COHERENCE DU CHEMIN SPECIFIE
|
||||||
|
*
|
||||||
|
* @path<String> String correspondant au chemin de delegation ("repo/methode")
|
||||||
|
*
|
||||||
|
* @return validity<Boolean> Retourne si oui ou non l'objet est correct
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private function checkPath($path){
|
||||||
|
/* [1] Verification format general
|
||||||
|
=========================================================*/
|
||||||
|
if( !preg_match('#^([\w_-]+)/([\w_-]+)$#i', $path, $matches) ){ // Si mauvais format
|
||||||
|
$this->error = ManagerError::WrongPathRepo;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// On recupere les donnes de la regex
|
||||||
|
$repository = $matches[1];
|
||||||
|
$method = $matches[2];
|
||||||
|
|
||||||
|
/* [2] Verification de l'existence du repo (conf)
|
||||||
|
=========================================================*/
|
||||||
|
if( !array_key_exists($repository, $this->repositories) ){ // Si le repo n'est pas specifie dans la conf
|
||||||
|
$this->error = ManagerError::UnknownRepo;
|
||||||
|
return false; // On retourne FALSE, si erreur
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [3] Verification de l'existence de la methode (conf)
|
||||||
|
=========================================================*/
|
||||||
|
if( array_search($method, $this->repositories[$repository]) === false ){ // Si la methode n'est pas specifie dans la conf
|
||||||
|
$this->error = ManagerError::UnknownMethod;
|
||||||
|
return false; // On retourne FALSE, si erreur
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] Enregistrement du chemin et renvoi de SUCCESS
|
||||||
|
=========================================================*/
|
||||||
|
$this->path = array(
|
||||||
|
'repo' => $repository,
|
||||||
|
'method' => $method
|
||||||
|
);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOI LE CHEMIN D'AMORCAGE DE LA METHODE
|
||||||
|
*
|
||||||
|
* @return path<Array> Retourne le chemin d'amorcage de la requete
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private function getFunctionCaller(){
|
||||||
|
return array( '\\manager\\repo\\'.$this->path['repo'], $this->path['method'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,276 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager;
|
||||||
|
|
||||||
|
|
||||||
|
class ResourceDispatcher{
|
||||||
|
|
||||||
|
// Constantes
|
||||||
|
public static $extension_config_path = '/config/dispatcher-extensions.json';
|
||||||
|
public static $parents_config_path = '/config/dispatcher-tree.json';
|
||||||
|
|
||||||
|
public static $supported_extensions;
|
||||||
|
public static $supported_parents;
|
||||||
|
|
||||||
|
// Attributs prives utiles (initialisation)
|
||||||
|
private $header;
|
||||||
|
private $path;
|
||||||
|
private $flags;
|
||||||
|
private $stylesheet;
|
||||||
|
public $error;
|
||||||
|
|
||||||
|
|
||||||
|
/* CONSTRUCTEUR & AMORCAGE DU DISPATCHER
|
||||||
|
*
|
||||||
|
* @url<String> L'url courante
|
||||||
|
* @view<Boolean> Si VRAI, retourne header+contenu, sinon cree juste l'objet
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct($url, $view=false){
|
||||||
|
$this->error = ManagerError::Success;
|
||||||
|
|
||||||
|
|
||||||
|
/* [0] On met a jour la configuration
|
||||||
|
=====================================================*/
|
||||||
|
// Extensions supportees
|
||||||
|
$extensions_conf = json_decode( file_get_contents(__ROOT__.self::$extension_config_path), true );
|
||||||
|
|
||||||
|
// Gestion de l'erreur de parsage
|
||||||
|
if( $extensions_conf == null ){
|
||||||
|
$this->error = ManagerError::ParsingFailed;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
self::$supported_extensions = $extensions_conf;
|
||||||
|
|
||||||
|
// Dossiers supportes
|
||||||
|
$parents_conf = json_decode( file_get_contents(__ROOT__.self::$parents_config_path), true );
|
||||||
|
|
||||||
|
// Gestion de l'erreur de parsage
|
||||||
|
if( $parents_conf == null ){
|
||||||
|
$this->error = ManagerError::ParsingFailed;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
self::$supported_parents = $parents_conf;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] On recupere les donnees de l'URL
|
||||||
|
==================================================*/
|
||||||
|
$serialFlags = array_slice( explode('/',$url), 1 );
|
||||||
|
|
||||||
|
/* [2] On check/cree les drapeaux avec ces donnees
|
||||||
|
==================================================*/
|
||||||
|
if( !$this->createFlags($serialFlags) ){ // Creation des drapeaux
|
||||||
|
$this->error = ManagerError::InvalidFlags;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [3] On construit le chemin a partir des tags
|
||||||
|
==================================================*/
|
||||||
|
if( !$this->buildPath() ){ // Construction du chemin
|
||||||
|
$this->error = ManagerError::UnreachableResource;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [4] On gere l'affichage pour l'appel externe/interne
|
||||||
|
==================================================*/
|
||||||
|
if( $view ) // Appel externe
|
||||||
|
$this->view();
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* INCLUSION PHP D'UNE RESSOURCE UTILISANT LE DISPATCHER
|
||||||
|
*
|
||||||
|
* @route<String> Route associee a une ressource
|
||||||
|
*
|
||||||
|
* @return content<*> Retourne le contenu de la ressource
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getResource($route){
|
||||||
|
$instance = new ResourceDispatcher($route);
|
||||||
|
return $instance->getContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* FONCTION QUI VERIFIE LES DRAPEAUX
|
||||||
|
*
|
||||||
|
* @serialFlags<Array> Tableau a indice numerique
|
||||||
|
*
|
||||||
|
* @return correct<Boolean> Retourne si oui ou non les drapeaux sont corrects
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private function createFlags($serialFlags){
|
||||||
|
/* [1] Verification des flags (version serialisee)
|
||||||
|
======================================================*/
|
||||||
|
|
||||||
|
$correct = true;
|
||||||
|
|
||||||
|
// Verification du nombre de drapeaux () au moins 3
|
||||||
|
$correct = $correct && count($serialFlags) >= 3;
|
||||||
|
|
||||||
|
// Verification que l'extension est correcte
|
||||||
|
$correct = $correct && array_key_exists($serialFlags[0], self::$supported_extensions);
|
||||||
|
|
||||||
|
// Verification du filename
|
||||||
|
$correct = $correct && preg_match('/^[\w_-]+$/i', $serialFlags[1]);
|
||||||
|
|
||||||
|
// Verification du parent
|
||||||
|
$correct = $correct && array_key_exists($serialFlags[2], self::$supported_parents);
|
||||||
|
|
||||||
|
// Verification du sous-parent (optionnel)
|
||||||
|
$opt_subParent = count($serialFlags) >= 4;
|
||||||
|
|
||||||
|
if( $opt_subParent )
|
||||||
|
$correct = $correct && preg_match('/^[\w_-]+$/i', $serialFlags[3]);
|
||||||
|
|
||||||
|
// Verification de la couleur (optionnel)
|
||||||
|
$opt_color = count($serialFlags) >= 5 && preg_match('/^[\da-f]{6}+$/i', $serialFlags[4]);
|
||||||
|
|
||||||
|
|
||||||
|
if( !$correct )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Creation (non serialisee) des flags
|
||||||
|
======================================================*/
|
||||||
|
// Si tout se deroule bien, on cree les flags
|
||||||
|
$this->flags = array(
|
||||||
|
'extension' => $serialFlags[0],
|
||||||
|
'filename' => $serialFlags[1],
|
||||||
|
'parent' => $serialFlags[2]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Ajout du sous-parent optionnel
|
||||||
|
if( $opt_subParent )
|
||||||
|
$this->flags['subparent'] = $serialFlags[3];
|
||||||
|
|
||||||
|
// Ajout du color optionnel
|
||||||
|
if( $opt_color )
|
||||||
|
$this->flags['color'] = '#'.$serialFlags[4];
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* FONCTION QUI CONSTRUIT LE CHEMIN A PARTIR DU PATH
|
||||||
|
*
|
||||||
|
* @return fileExists<Boolean> Retourne si oui ou non le fichier cible existe
|
||||||
|
*
|
||||||
|
* @format
|
||||||
|
*
|
||||||
|
* f/extension/filename/parent/:subparent:/ (:OPT:)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private function buildPath(){
|
||||||
|
/* [1] On recupere le HEADER associe a l'extension
|
||||||
|
==========================================================*/
|
||||||
|
// Si aucun header pour cet cle, on retourne une erreur
|
||||||
|
if( !isset(self::$supported_extensions[$this->flags['extension']]) ) return false;
|
||||||
|
|
||||||
|
// On recupere le header associe
|
||||||
|
$header = self::$supported_extensions[$this->flags['extension']];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On recupere le chemin associe au parent
|
||||||
|
==========================================================*/
|
||||||
|
// Si aucun dossier pour cet indice, on retourne une erreur
|
||||||
|
if( !isset(self::$supported_parents[$this->flags['parent']]) ) return false;
|
||||||
|
|
||||||
|
// On recupere le dossier associe
|
||||||
|
$parent = self::$supported_parents[$this->flags['parent']];
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Gestion du sous-parent optionnel
|
||||||
|
==========================================================*/
|
||||||
|
$opt_subParent = (isset($this->flags['subparent'])) ? $this->flags['subparent'].'/' : '';
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] Gestion du color optionnel
|
||||||
|
=========================================================*/
|
||||||
|
$this->stylesheet = "";
|
||||||
|
|
||||||
|
// si le color est defini
|
||||||
|
if( isset($this->flags['color']) ){
|
||||||
|
$this->stylesheet = "\n<style type='text/css'>\n";
|
||||||
|
$this->stylesheet .= "\t#stylisable{\n";
|
||||||
|
$this->stylesheet .= "\t\tfill: ".$this->flags['color']." !important;\n";
|
||||||
|
$this->stylesheet .= "\t\tfill-opacity: 1 !important;\n";
|
||||||
|
$this->stylesheet .= "\t}\n";
|
||||||
|
$this->stylesheet .= "</style>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] On definit le header
|
||||||
|
==========================================================*/
|
||||||
|
$this->header = $header;
|
||||||
|
|
||||||
|
/* [6] On construit le chemin
|
||||||
|
==========================================================*/
|
||||||
|
$this->path = __ROOT__.$parent.'/'.$opt_subParent.$this->flags['filename'].'.'.$this->flags['extension'];
|
||||||
|
|
||||||
|
/* [7] On retourne si le fichier existe ou non
|
||||||
|
==========================================================*/
|
||||||
|
return @file_get_contents( $this->path ) != false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTION QUI AFFICHE LA RESSOURCE EN QUESTION
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function view(){
|
||||||
|
// S'il y a eu une erreur en amont
|
||||||
|
if( $this->error != ManagerError::Success )
|
||||||
|
return false; // on retourne faux
|
||||||
|
|
||||||
|
// On definit le header
|
||||||
|
header('Content-Type: '.$this->header);
|
||||||
|
|
||||||
|
// On recupere le contenu
|
||||||
|
$svg_content = file_get_contents($this->path);
|
||||||
|
|
||||||
|
// On affiche tout
|
||||||
|
echo str_replace( '</svg>', $this->stylesheet.'</svg>', $svg_content );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTION QUI RETOURNE LE CONTENU DE LA RESSOURCE EN QUESTION
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function getContent(){
|
||||||
|
// S'il y a eu une erreur en amont
|
||||||
|
if( $this->error != ManagerError::Success )
|
||||||
|
return false; // on retourne faux
|
||||||
|
|
||||||
|
|
||||||
|
// On inclut le contenu
|
||||||
|
$svg_content = file_get_contents($this->path);
|
||||||
|
|
||||||
|
// On retourne tout
|
||||||
|
return str_replace( '</svg>', $this->stylesheet.'</svg>', $svg_content );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,76 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// On definit la racine __ROOT__ si c'est pas deja fait
|
||||||
|
if( !defined('__ROOT__') ) define('__ROOT__', dirname(dirname(__FILE__)) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ACTIVE LE DEBUGGAGE (WARNING + EXCEPTION)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function debug(){
|
||||||
|
ini_set('display_errors',1);
|
||||||
|
ini_set('display_startup_errors',1);
|
||||||
|
error_reporting(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* APPEL DYNAMIQUE DES CLASSES PASSEES EN PARAMETRE
|
||||||
|
*
|
||||||
|
* @classes<Array> Tableau contenant le nom des classes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function autoload($classes){
|
||||||
|
foreach($classes as $class){
|
||||||
|
$name_only = substr(strrchr($class, '\\'), 1);
|
||||||
|
var_dump('use '.$class.' as '.$name_only.';');
|
||||||
|
eval('use '.$class.' as '.$name_only.';');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AUTOLOADER
|
||||||
|
*
|
||||||
|
* @className<String> Nom de la classe appelee
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function autoloader($className){
|
||||||
|
$path = '';
|
||||||
|
|
||||||
|
/* [1] On utilise le namespace pour localiser
|
||||||
|
===============================================*/
|
||||||
|
// On remplace les '\' par des '/'
|
||||||
|
$path = str_replace('\\', '/', $className) . '.php';
|
||||||
|
$path = __ROOT__.'/'.$path;
|
||||||
|
|
||||||
|
// Si le fichier existe
|
||||||
|
if( file_exists($path) )
|
||||||
|
require_once $path; // on inclue le fichier
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// On definit l'autoloader comme autoloader (obvious)
|
||||||
|
spl_autoload_register('autoloader', false, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* On demarre la session securisee PHP
|
||||||
|
=========================================================*/
|
||||||
|
\manager\sessionManager::session_start();
|
||||||
|
?>
|
|
@ -0,0 +1,345 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager\module;
|
||||||
|
use \manager\Database;
|
||||||
|
use \manager\sessionManager;
|
||||||
|
use \manager\ManagerError;
|
||||||
|
use \manager\Repo;
|
||||||
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
class machineDefault{
|
||||||
|
|
||||||
|
|
||||||
|
/* CREATION D'UNE NOUVELLE MACHINE DANS LA BDD
|
||||||
|
*
|
||||||
|
* @code<String> Code RFID de la machine
|
||||||
|
* @name<String> Identifiant de la machine
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non, tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function create($code=null, $name=null){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$correct_param = Database::check('machine.code', $code);
|
||||||
|
$correct_param = $correct_param && Database::check('machine.name', $name);
|
||||||
|
|
||||||
|
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||||
|
if( !$correct_param )
|
||||||
|
return array('ModuleError' => ManagerError::ParamError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Creation de la machine
|
||||||
|
=========================================================*/
|
||||||
|
$create_machine = new Repo('machine/create', array($code, $name) );
|
||||||
|
$id_machine = $create_machine->answer();
|
||||||
|
|
||||||
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
|
if( $id_machine === false )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Creation du groupe de meme nom que la machine
|
||||||
|
=========================================================*/
|
||||||
|
$create_group = new Repo('cluster/create', array($name) );
|
||||||
|
$id_group = $create_group->answer();
|
||||||
|
|
||||||
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
|
if( $id_group === false )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] Association au groupe
|
||||||
|
=========================================================*/
|
||||||
|
$assoc_goup = new Repo('cluster/link', array($id_group, $id_machine, clusterRepo::MACHINE_CLASS));
|
||||||
|
$id_assoc = $assoc_goup->answer();
|
||||||
|
|
||||||
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
|
if( $id_assoc === false )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] Gestion du retour
|
||||||
|
=========================================================*/
|
||||||
|
return array(
|
||||||
|
'ModuleError' => ManagerError::Success,
|
||||||
|
'id_machine' => $id_machine,
|
||||||
|
'id_cluster' => $id_group
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AJOUTE UNE MACHINE DONNEE A UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_machine<int> UID de la machine
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function link($id_cluster, $id_machine){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||||
|
$correct_param = $correct_param && Database::check('auto_increment_id', $id_machine);
|
||||||
|
|
||||||
|
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||||
|
if( !$correct_param )
|
||||||
|
return array('ModuleError' => ManagerError::ParamError);
|
||||||
|
|
||||||
|
/* [2] Creation de l'association
|
||||||
|
=========================================================*/
|
||||||
|
$link_machine = new Repo('cluster/link', array($id_cluster, $id_machine, clusterRepo::MACHINE_CLASS));
|
||||||
|
|
||||||
|
return $link_machine;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RETIRE UNE MACHINE DONNEE A UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_machine<int> UID de la machine
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function unlink($id_cluster, $id_machine){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||||
|
$correct_param = $correct_param && Database::check('auto_increment_id', $id_machine);
|
||||||
|
|
||||||
|
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||||
|
if( !$correct_param )
|
||||||
|
return array('ModuleError' => ManagerError::ParamError);
|
||||||
|
|
||||||
|
/* [2] Suppression de l'association
|
||||||
|
=========================================================*/
|
||||||
|
$link_machine = new Repo('cluster/unlink', array($id_cluster, $id_machine, clusterRepo::MACHINE_CLASS));
|
||||||
|
|
||||||
|
return $link_machine;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE UNE MACHINE EN FONCTION D'UN MOT CLE
|
||||||
|
*
|
||||||
|
* @keyword<String> Element de recherche
|
||||||
|
*
|
||||||
|
* @return machines<Array> Retourne la liste des machines trouvees
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function search($keyword){
|
||||||
|
// On recupere les donnees
|
||||||
|
$machine = new Repo('machine/search', array($keyword));
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machines' => $machine->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA LISTE EXHAUSTIVE DES MACHINES
|
||||||
|
*
|
||||||
|
* @return machines<Array> Liste des machines
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getAll(){
|
||||||
|
// On recupere les donnees
|
||||||
|
$machines = new Repo('machine/getAll');
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machines' => $machines->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA MACHINE D'UID DONNE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return machine<Array> Machine d'UID donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getById($id_machine){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/getById', array($id_machine));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machine' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA MACHINE DE CODE DONNE
|
||||||
|
*
|
||||||
|
* @code<String> Code de la machine en question
|
||||||
|
*
|
||||||
|
* @return machine<Array> Machine de code donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByCode($code){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/getByCode', array($code));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machine' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LES GROUPES D'UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return clusters<Array> Groupes de la machine donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getClusters($id_machine){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/getClusters', array($id_machine));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'clusters' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* MODIFIE UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine
|
||||||
|
* @code<String> Code RFID de la machine
|
||||||
|
* @name<String> Identifiant l'utilisateur
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function edit($id_machine=null, $code=null, $name=null){
|
||||||
|
// Si @id_machine n'est pas au bon format, on retourne une erreur
|
||||||
|
if( !Database::check('auto_increment_id', $id_machine) )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] On verifie l'existence de la machine
|
||||||
|
=========================================================*/
|
||||||
|
$machine_exists = new Repo('machine/getById', array($id_machine));
|
||||||
|
$machine_data = $machine_exists->answer();
|
||||||
|
|
||||||
|
// Si on a recupere aucune machine, on retourne une erreur
|
||||||
|
if( !is_array($machine_data) )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
|
||||||
|
/* (1) Verification des parametres (si correct et different)*/
|
||||||
|
$correct_param = array(
|
||||||
|
'code' => Database::check('machine.code', $code ) && $machine_data['code'] != $code,
|
||||||
|
'name' => Database::check('machine.name', $name ) && $machine_data['name'] != $name
|
||||||
|
);
|
||||||
|
|
||||||
|
/* (2) Gestion des parametres optionnels */
|
||||||
|
$opt_data = array(
|
||||||
|
'code' => ($correct_param['code']) ? $code : $machine_data['code'],
|
||||||
|
'name' => ($correct_param['name']) ? $name : $machine_data['name']
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Modification de la machine
|
||||||
|
=========================================================*/
|
||||||
|
$request = new Repo('machine/edit', array(
|
||||||
|
$id_machine,
|
||||||
|
$opt_data['code'],
|
||||||
|
$opt_data['name']
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'status' => $request->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SUPPRIME UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function delete($id_machine){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/delete', array($id_machine));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'status' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,402 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager\module;
|
||||||
|
use \manager\Database;
|
||||||
|
use \manager\sessionManager;
|
||||||
|
use \manager\ManagerError;
|
||||||
|
use \manager\Repo;
|
||||||
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
class userDefault{
|
||||||
|
|
||||||
|
|
||||||
|
/* CREATION D'UN NOUVEL UTILISATEUR DANS LA BDD
|
||||||
|
*
|
||||||
|
* @code<String> Code RFID de l'utilisateur
|
||||||
|
* @username<String> Identifiant l'utilisateur
|
||||||
|
* @firstname<String> Prenom de l'utilisateur
|
||||||
|
* @lastcode<String> Nom de l'utilisateur
|
||||||
|
* @mail<String> Adresse email de l'utilisateur
|
||||||
|
* @password<String> Mot de passe de l'utilisateur
|
||||||
|
* @status<String> Status de l'utilisateur
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non, tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function create($code=null, $username=null, $firstname=null, $lastname=null, $mail=null, $password=null, $status=null){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$password_hash = sessionManager::secure_sha1($password);
|
||||||
|
|
||||||
|
$correct_param = Database::check('user.code', $code);
|
||||||
|
$correct_param = $correct_param && Database::check('user.username', $username);
|
||||||
|
$correct_param = $correct_param && Database::check('user.firstname', $firstname);
|
||||||
|
$correct_param = $correct_param && Database::check('user.lastname', $lastname);
|
||||||
|
$correct_param = $correct_param && Database::check('user.mail', $mail);
|
||||||
|
$correct_param = $correct_param && Database::check('user.password', $password_hash);
|
||||||
|
$correct_param = $correct_param && Database::check('user.status', $status);
|
||||||
|
|
||||||
|
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||||
|
if( !$correct_param )
|
||||||
|
return array('ModuleError' => ManagerError::ParamError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Creation de l'utilisateur
|
||||||
|
=========================================================*/
|
||||||
|
$create_user = new Repo('user/create', array($code, $username, $firstname, $lastname, $mail, $password_hash, $status) );
|
||||||
|
$id_user = $create_user->answer();
|
||||||
|
|
||||||
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
|
if( $id_user === false )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Creation du groupe de meme nom que l'username
|
||||||
|
=========================================================*/
|
||||||
|
$create_group = new Repo('cluster/create', array($username) );
|
||||||
|
$id_group = $create_group->answer();
|
||||||
|
|
||||||
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
|
if( $id_group === false )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] Association au groupe
|
||||||
|
=========================================================*/
|
||||||
|
$assoc_goup = new Repo('cluster/link', array($id_group, $id_user, clusterRepo::USER_CLASS));
|
||||||
|
$id_assoc = $assoc_goup->answer();
|
||||||
|
|
||||||
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
|
if( $id_assoc === false )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] Gestion du retour
|
||||||
|
=========================================================*/
|
||||||
|
return array(
|
||||||
|
'ModuleError' => ManagerError::Success,
|
||||||
|
'id_user' => $id_user,
|
||||||
|
'id_cluster' => $id_group
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AJOUTE UN UTILISATEUR DONNEE A UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_user<int> UID de l'utilisateur
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function link($id_cluster, $id_user){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||||
|
$correct_param = $correct_param && Database::check('auto_increment_id', $id_user);
|
||||||
|
|
||||||
|
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||||
|
if( !$correct_param )
|
||||||
|
return array('ModuleError' => ManagerError::ParamError);
|
||||||
|
|
||||||
|
/* [2] Creation de l'association
|
||||||
|
=========================================================*/
|
||||||
|
$link_user = new Repo('cluster/link', array($id_cluster, $id_user, clusterRepo::USER_CLASS));
|
||||||
|
|
||||||
|
return $link_user;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RETIRE UNE MACHINE DONNEE A UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_user<int> UID de l'utilisateur
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function unlink($id_cluster, $id_user){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||||
|
$correct_param = $correct_param && Database::check('auto_increment_id', $id_user);
|
||||||
|
|
||||||
|
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||||
|
if( !$correct_param )
|
||||||
|
return array('ModuleError' => ManagerError::ParamError);
|
||||||
|
|
||||||
|
/* [2] Suppression de l'association
|
||||||
|
=========================================================*/
|
||||||
|
$link_user = new Repo('cluster/unlink', array($id_cluster, $id_user, clusterRepo::USER_CLASS));
|
||||||
|
|
||||||
|
return $link_user;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE UN UTILISATEUR EN FONCTION D'UN MOT CLE
|
||||||
|
*
|
||||||
|
* @keyword<String> Element de recherche
|
||||||
|
*
|
||||||
|
* @return users<Array> Retourne la liste des utilisateurs trouves
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function search($keyword){
|
||||||
|
// On recupere les donnees
|
||||||
|
$user = new Repo('user/search', array($keyword));
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'users' => $user->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA LISTE EXHAUSTIVE DES UTILISATEURS
|
||||||
|
*
|
||||||
|
* @return utilisateurs<Array> Liste des utilisateurs
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getAll(){
|
||||||
|
// On recupere les donnees
|
||||||
|
$users = new Repo('user/getAll');
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'users' => $users->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE L'UTILISATEURS D'UID DONNE
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return utilisateur<Array> Utilisateur d'UID donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getById($id_user){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('user/getById', array($id_user));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'user' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE L'UTILISATEURS DE CODE DONNE
|
||||||
|
*
|
||||||
|
* @code<String> Code de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return utilisateur<Array> Utilisateur de code donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByCode($code){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('user/getByCode', array($code));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'user' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE L'UTILISATEURS D'USERNAME DONNE
|
||||||
|
*
|
||||||
|
* @username<String> Username de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return utilisateur<Array> Utilisateur d'username donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByUsername($username){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('user/getByUsername', array($username));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'user' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LES GROUPES D'UN UTILISATEUR DONNE
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return clusters<Array> Groupes de l'utilisateur donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getClusters($id_user){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('user/getClusters', array($id_user));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'clusters' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* MODIFIE UN UTILISATEUR DONNEE
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur
|
||||||
|
* @code<String> Code RFID de l'utilisateur
|
||||||
|
* @username<String> Identifiant l'utilisateur
|
||||||
|
* @firstname<String> Prenom de l'utilisateur
|
||||||
|
* @lastcode<String> Nom de l'utilisateur
|
||||||
|
* @mail<String> Adresse email de l'utilisateur
|
||||||
|
* @password<String> Mot de passe de l'utilisateur
|
||||||
|
* @status<String> Status de l'utilisateur
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function edit($id_user=null, $code=null, $username=null, $firstname=null, $lastname=null, $mail=null, $password=null, $status=null){
|
||||||
|
// Si @id_user n'est pas au bon format, on retourne une erreur
|
||||||
|
if( !Database::check('auto_increment_id', $id_user) )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] On verifie l'existence de l'utilisateur
|
||||||
|
=========================================================*/
|
||||||
|
$user_exists = new Repo('user/getById', array($id_user));
|
||||||
|
$user_data = $user_exists->answer();
|
||||||
|
|
||||||
|
// Si on a recupere aucun utilisateur, on retourne une erreur
|
||||||
|
if( !is_array($user_data) )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$password_hash = sessionManager::secure_sha1($password);
|
||||||
|
|
||||||
|
/* (1) Verification des parametres (si correct et different)*/
|
||||||
|
$correct_param = array(
|
||||||
|
'code' => Database::check('user.code', $code ) && $user_data['code'] != $code,
|
||||||
|
'username' => Database::check('user.username', $username ) && $user_data['username'] != $username,
|
||||||
|
'firstname' => Database::check('user.firstname', $firstname ) && $user_data['firstname'] != $firstname,
|
||||||
|
'lastname' => Database::check('user.lastname', $lastname ) && $user_data['lastname'] != $lastname,
|
||||||
|
'mail' => Database::check('user.mail', $mail ) && $user_data['mail'] != $mail,
|
||||||
|
'password' => Database::check('user.password', $password_hash ) && $user_data['password'] != $password_hash,
|
||||||
|
'status' => Database::check('user.status', $status ) && $user_data['status'] != $status
|
||||||
|
);
|
||||||
|
|
||||||
|
/* (2) Gestion des parametres optionnels */
|
||||||
|
$opt_data = array(
|
||||||
|
'code' => ($correct_param['code']) ? $code : $user_data['code'],
|
||||||
|
'username' => ($correct_param['username']) ? $username : $user_data['username'],
|
||||||
|
'firstname' => ($correct_param['firstname']) ? $firstname : $user_data['firstname'],
|
||||||
|
'lastname' => ($correct_param['lastname']) ? $lastname : $user_data['lastname'],
|
||||||
|
'mail' => ($correct_param['mail']) ? $mail : $user_data['mail'],
|
||||||
|
'password' => ($correct_param['password']) ? $password : $user_data['password'],
|
||||||
|
'status' => ($correct_param['status']) ? $status : $user_data['status'],
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Modification de l'utilisateur
|
||||||
|
=========================================================*/
|
||||||
|
$request = new Repo('user/edit', array(
|
||||||
|
$id_user,
|
||||||
|
$opt_data['code'],
|
||||||
|
$opt_data['username'],
|
||||||
|
$opt_data['firstname'],
|
||||||
|
$opt_data['lastname'],
|
||||||
|
$opt_data['mail'],
|
||||||
|
$opt_data['password'],
|
||||||
|
$opt_data['status'])
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'status' => $request->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SUPPRIME UN UTILISATEUR DONNEE
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function delete($id_user){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('user/delete', array($id_user));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'status' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,404 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager\repo;
|
||||||
|
use \manager\Database;
|
||||||
|
use \manager\repo\machine as machineRepo;
|
||||||
|
use \manager\repo\user as userRepo;
|
||||||
|
|
||||||
|
class cluster{
|
||||||
|
|
||||||
|
const USER_CLASS = 0;
|
||||||
|
const MACHINE_CLASS = 1;
|
||||||
|
|
||||||
|
/* CREATION D'UN GROUPE
|
||||||
|
*
|
||||||
|
* @name<String> Nom du groupe
|
||||||
|
*
|
||||||
|
* @return id_user<int> Renvoie l'UID du groupe cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function create($name){
|
||||||
|
/* [1] Verification de l'unicite de name
|
||||||
|
=========================================================*/
|
||||||
|
$check_unique = ( self::getByName($name) === false );
|
||||||
|
|
||||||
|
// Si un groupe a deja ce nom, on renvoie une erreur
|
||||||
|
if( !$check_unique )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Creation du groupe
|
||||||
|
=========================================================*/
|
||||||
|
$insert_user = Database::getPDO()->prepare("INSERT INTO cluster(id_cluster, name)
|
||||||
|
VALUES(DEFAULT, :name)");
|
||||||
|
$insert_user->execute(array(
|
||||||
|
':name' => $name
|
||||||
|
));
|
||||||
|
|
||||||
|
/* [3] On retourne l'id_group ou FALSE si erreur
|
||||||
|
=========================================================*/
|
||||||
|
$check_group = self::getByName($name);
|
||||||
|
|
||||||
|
// Si n'existe pas on retourne FALSE
|
||||||
|
if( $check_group === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Sinon, on retourne son id
|
||||||
|
return $check_group['id_cluster'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ASSOCIATION D'UN(E) UTILISATEUR/MACHINE A UN GROUPE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_entity<int> UID de la machine ou de l'utilisateur
|
||||||
|
* @class<int> Spefication du type d'entite (0=user;1=machine)
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function link($id_cluster, $id_entity, $class){
|
||||||
|
/* [1] Verification de l'existence du groupe
|
||||||
|
=========================================================*/
|
||||||
|
$group_check = self::getById($id_cluster);
|
||||||
|
|
||||||
|
// Si le groupe n'existe pas, on retourne ue erreur
|
||||||
|
if( $group_check === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Verification de l'existente de l'entite
|
||||||
|
=========================================================*/
|
||||||
|
$entity_exists = false;
|
||||||
|
/* (1) Utilisateur */
|
||||||
|
if( $class == 0 ){
|
||||||
|
// On verifie si c'est un utilisateur
|
||||||
|
$user_check = userRepo::getById($id_entity);
|
||||||
|
$entity_exists = ( $user_check !== FALSE );
|
||||||
|
|
||||||
|
/* (2) Machine */
|
||||||
|
}elseif( $class == 1 ){
|
||||||
|
// On verifie si c'est une machine
|
||||||
|
$machine_check = machineRepo::getById($id_entity);
|
||||||
|
$entity_exists = ( $machine_check !== FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Si aucune entite existante, on retourne une erreur
|
||||||
|
if( !$entity_exists )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Verification que l'existente n'existe pas deja
|
||||||
|
=========================================================*/
|
||||||
|
$already_cluster_merge = self::getMerge($id_cluster, $id_entity, $class);
|
||||||
|
|
||||||
|
// Si l'association existe deja, on ne la cree donc pas
|
||||||
|
if( $already_cluster_merge !== false )
|
||||||
|
return $already_cluster_merge['id_cluster_merge'];
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] On cree l'association
|
||||||
|
=========================================================*/
|
||||||
|
$link_entity = Database::getPDO()->prepare("INSERT INTO cluster_merge(id_cluster_merge, id_cluster, id_entity, class)
|
||||||
|
VALUES(DEFAULT, :id_cluster, :id_entity, :class)");
|
||||||
|
$link_entity->execute(array(
|
||||||
|
':id_cluster' => $id_cluster,
|
||||||
|
':id_entity' => $id_entity,
|
||||||
|
':class' => $class
|
||||||
|
));
|
||||||
|
|
||||||
|
/* [5] On retourne l'id_cluster_merge ou FALSE si erreur
|
||||||
|
=========================================================*/
|
||||||
|
$check_cluster_merge = self::getMerge($id_cluster, $id_entity, $class);
|
||||||
|
|
||||||
|
// Si n'existe pas on retourne FALSE
|
||||||
|
if( $check_cluster_merge === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Sinon, on retourne son id
|
||||||
|
return $check_cluster_merge['id_cluster_merge'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SUPPRIME UNE ASSOCIATION D'UN(E) UTILISATEUR/MACHINE A UN GROUPE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_entity<int> UID de la machine ou de l'utilisateur
|
||||||
|
* @class<int> Spefication du type d'entite (0=user;1=machine)
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non l'association a bien ete supprimee
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function unlink($id_cluster, $id_entity, $class){
|
||||||
|
/* [1] On redige/execute la requete
|
||||||
|
=========================================================*/
|
||||||
|
$delete_cluster_merge = Database::getPDO()->prepare("DELETE FROM cluster_merge
|
||||||
|
WHERE id_cluster = :id_cluster
|
||||||
|
AND id_entity = :id_entity
|
||||||
|
AND class = :class");
|
||||||
|
$delete_cluster_merge->execute(array(
|
||||||
|
':id_cluster' => $id_cluster,
|
||||||
|
':id_entity' => $id_entity,
|
||||||
|
':class' => $class
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On verifie que l'association n'existe plus
|
||||||
|
=========================================================*/
|
||||||
|
return ( self::getMerge($id_cluster, $id_entity, $class) === false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA LISTE DE TOUS LES GROUPES
|
||||||
|
*
|
||||||
|
* @return groups<Array> Liste des groupes de la BDD
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getAll(){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->query("SELECT * FROM cluster ORDER BY name");
|
||||||
|
|
||||||
|
// On recupere le resultat
|
||||||
|
$answer = $request->fetchAll();
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LE GROUPE D'ID DONNE
|
||||||
|
*
|
||||||
|
* @id<int> UID du groupe en question
|
||||||
|
*
|
||||||
|
* @return group<Array> Renvoie le groupe d'id donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getById($id){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM cluster
|
||||||
|
WHERE id_cluster = :id");
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':id' => $id
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seul groupe
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LE GROUPE DE NOM DONNE
|
||||||
|
*
|
||||||
|
* @name<String> Nom du groupe en question
|
||||||
|
*
|
||||||
|
* @return groupe<Array> Renvoie le groupe de nom donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByName($name){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM cluster
|
||||||
|
WHERE name = :name");
|
||||||
|
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':name' => $name
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seul groupe
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE L'ID D'UNE ASSOCIATION D'UN(E) UTILISATEUR/MACHINE A UN GROUPE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_entity<int> UID de la machine ou de l'utilisateur
|
||||||
|
* @class<int> Spefication du type d'entite (0=user;1=machine)
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getMerge($id_cluster, $id_entity, $class){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM cluster_merge
|
||||||
|
WHERE id_cluster = :id_cluster
|
||||||
|
AND id_entity = :id_entity
|
||||||
|
AND class = :class");
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':id_cluster' => $id_cluster,
|
||||||
|
':id_entity' => $id_entity,
|
||||||
|
':class' => $class
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seule relation
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LES MEMBRES D'UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe en question
|
||||||
|
*
|
||||||
|
* @return members<Array> Retourne la liste des membres du groupe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getMembers($id_cluster){
|
||||||
|
/* [1] On recupere la liste des associations
|
||||||
|
=========================================================*/
|
||||||
|
$get_members = Database::getPDO()->prepare("SELECT * FROM cluster_merge
|
||||||
|
WHERE id_cluster = :id_cluster
|
||||||
|
ORDER BY id_cluster_merge");
|
||||||
|
$get_members->execute(array(
|
||||||
|
':id_cluster' => $id_cluster
|
||||||
|
));
|
||||||
|
|
||||||
|
$members = Database::delNumeric( $get_members->fetchAll() );
|
||||||
|
|
||||||
|
/* [2] On formatte recupere les entites
|
||||||
|
=========================================================*/
|
||||||
|
foreach($members as $i=>$member){
|
||||||
|
|
||||||
|
/* (1) On recupere les informations utilisateur */
|
||||||
|
if( $member['class'] == self::USER_CLASS ){
|
||||||
|
$get_user = userRepo::getById( $member['id_entity'] );
|
||||||
|
|
||||||
|
// Si on a bien recu les informations, on les ajoute
|
||||||
|
if( $get_user !== false )
|
||||||
|
$members[$i] = array_merge($member, $get_user );
|
||||||
|
|
||||||
|
|
||||||
|
/* (2) On recupere les informations machine */
|
||||||
|
}elseif( $member['class'] == self::MACHINE_CLASS ){
|
||||||
|
$get_machine = machineRepo::getById( $member['id_entity'] );
|
||||||
|
|
||||||
|
// Si on a bien recu les informations, on les ajoute
|
||||||
|
if( $get_machine !== false )
|
||||||
|
$members[$i] = array_merge($member, $get_machine );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [2] On verifie que le groupe n'existe plus
|
||||||
|
=========================================================*/
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SUPPRIME UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe en question
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non le groupe a bien ete supprime
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function delete($id_cluster){
|
||||||
|
/* [1] On redige/execute la requete
|
||||||
|
=========================================================*/
|
||||||
|
$delete_group = Database::getPDO()->prepare("DELETE FROM cluster WHERE id_cluster = :id_cluster");
|
||||||
|
$delete_group->execute(array(
|
||||||
|
':id_cluster' => $id_cluster
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On verifie que le groupe n'existe plus
|
||||||
|
=========================================================*/
|
||||||
|
return ( self::getById($id_group) === false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,337 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager\repo;
|
||||||
|
use \manager\Database;
|
||||||
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
class machine{
|
||||||
|
|
||||||
|
/* CREATION D'UNE MACHINE
|
||||||
|
*
|
||||||
|
* @code<String> Code de la machine
|
||||||
|
* @name<String> Nom de la machine
|
||||||
|
*
|
||||||
|
* @return id_machine<int> Renvoie l'UID de la machine cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function create($code, $name){
|
||||||
|
/* [1] Verification de l'unicite de code+name
|
||||||
|
=========================================================*/
|
||||||
|
$check_unique = ( self::getByCode($code) === false );
|
||||||
|
$check_unique = $check_unique && ( self::getByName($name) === false );
|
||||||
|
|
||||||
|
// Si une machine a deja ce code/nom, on renvoie une erreur
|
||||||
|
if( !$check_unique )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Creation de la machine
|
||||||
|
=========================================================*/
|
||||||
|
$insert_machine = Database::getPDO()->prepare("INSERT INTO machine(id_machine, code, name)
|
||||||
|
VALUES(DEFAULT, :code, :name)");
|
||||||
|
$insert_machine->execute(array(
|
||||||
|
':code' => $code,
|
||||||
|
':name' => $name
|
||||||
|
));
|
||||||
|
|
||||||
|
/* [3] On retourne l'id_machine ou FALSE si erreur
|
||||||
|
=========================================================*/
|
||||||
|
$check_machine = self::getByCode($code);
|
||||||
|
|
||||||
|
// Si n'existe pas on retourne FALSE
|
||||||
|
if( $check_machine === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Sinon, on retourne son id
|
||||||
|
return $check_machine['id_machine'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE UNE LISTE DE MACHINE EN FONCTION D'UN MOT CLE
|
||||||
|
*
|
||||||
|
* @keyword<String> Element de recherche
|
||||||
|
*
|
||||||
|
* @return machines<Array> Retourne les machines trouvees
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function search($keyword){
|
||||||
|
// On recupere les donnees
|
||||||
|
$searchmachines = Database::getPDO()->query("SELECT * FROM machine
|
||||||
|
WHERE code LIKE '%".$keyword."%'
|
||||||
|
OR name LIKE '%".$keyword."%'
|
||||||
|
");
|
||||||
|
|
||||||
|
return Database::delNumeric( $searchmachines->fetchAll() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA LISTE DE TOUTES LES MACHINES
|
||||||
|
*
|
||||||
|
* @return machine<Array> Liste des machines de la BDD
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getAll(){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->query("SELECT * FROM machine ORDER BY name");
|
||||||
|
|
||||||
|
// On recupere le resultat
|
||||||
|
$answer = $request->fetchAll();
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA MACHINE D'ID DONNE
|
||||||
|
*
|
||||||
|
* @id<int> Id de la machine en question
|
||||||
|
*
|
||||||
|
* @return machine<Array> Renvoie la machine d'id donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getById($id){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM machine
|
||||||
|
WHERE id_machine = :id");
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':id' => $id
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seule machine
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA MACHINE DE CODE DONNE
|
||||||
|
*
|
||||||
|
* @code<String> Code de la machine en question
|
||||||
|
*
|
||||||
|
* @return machine<Array> Renvoie la machine de code donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByCode($code){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM machine
|
||||||
|
WHERE code = :code");
|
||||||
|
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':code' => $code
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seule machine
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA MACHINE DE NOM DONNE
|
||||||
|
*
|
||||||
|
* @name<String> Nom de la machine en question
|
||||||
|
*
|
||||||
|
* @return machine<Array> Renvoie la machine de nom donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByName($name){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM machine
|
||||||
|
WHERE name = :name");
|
||||||
|
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':name' => $name
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seule machine
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LES GROUPES AUQUEL APPARTIENT UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return clusters<Array> Retourne la liste des groupes auquel appartient la machine
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getClusters($id_machine){
|
||||||
|
/* [1] On redige/execute la requete
|
||||||
|
=========================================================*/
|
||||||
|
$get_clusters = Database::getPDO()->prepare("SELECT c.* FROM cluster as c, cluster_merge as cm
|
||||||
|
WHERE cm.id_cluster = c.id_cluster
|
||||||
|
AND cm.id_entity = :id_machine
|
||||||
|
AND cm.class = :class
|
||||||
|
ORDER BY c.id_cluster");
|
||||||
|
$get_clusters->execute(array(
|
||||||
|
':id_machine' => $id_machine,
|
||||||
|
':class' => clusterRepo::MACHINE_CLASS
|
||||||
|
));
|
||||||
|
|
||||||
|
/* [2] On retourne la liste des groupes
|
||||||
|
=========================================================*/
|
||||||
|
return Database::delNumeric( $get_clusters->fetchAll() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* MODIFICATION D'UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine
|
||||||
|
* @code<String> Code RFID de la machine
|
||||||
|
* @name<String> Identifiant l'utilisateur
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Renvoie si oui ou non tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function edit($id_machine=null, $code=null, $name=null){
|
||||||
|
/* [1] Verification de l'unicite de code+name (si differents)
|
||||||
|
=========================================================*/
|
||||||
|
// On recupere les machine ayant le meme code ou name (si existent)
|
||||||
|
$getbycode = self::getByCode($code);
|
||||||
|
$getbyname = self::getByName($name);
|
||||||
|
|
||||||
|
$check_unique = is_array($getbycode) && $getbycode['id_machine'] == $id_machine || !is_array($getbycode);
|
||||||
|
$check_unique = $check_unique && is_array($getbyname) && $getbyname['id_machine'] == $id_machine || !is_array($getbyname);
|
||||||
|
|
||||||
|
// Si un utilisateur a deja ce code ou ce name (sauf lui), on renvoie une erreur
|
||||||
|
if( !$check_unique )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* [2] Modification de la machine
|
||||||
|
=========================================================*/
|
||||||
|
$edit_machine = Database::getPDO()->prepare("UPDATE machine
|
||||||
|
SET code = :code,
|
||||||
|
name = :name
|
||||||
|
WHERE id_machine = :id_machine");
|
||||||
|
$edit_machine->execute(array(
|
||||||
|
':code' => $code,
|
||||||
|
':name' => $name,
|
||||||
|
':id_machine' => $id_machine
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] On retourne si tout a ete modifie, si erreur
|
||||||
|
=========================================================*/
|
||||||
|
$check_machine = self::getById($id_machine);
|
||||||
|
|
||||||
|
$checker = $check_machine['id_machine'] == $id_machine;
|
||||||
|
$checker = $checker && $check_machine['code'] == $code;
|
||||||
|
$checker = $checker && $check_machine['name'] == $name;
|
||||||
|
|
||||||
|
// On retourne l'etat de la modification
|
||||||
|
return $checker;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SUPPRIME UNE MACHINE DONNE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non la machine a bien ete supprime
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function delete($id_machine){
|
||||||
|
/* [1] On redige/execute la requete
|
||||||
|
=========================================================*/
|
||||||
|
$delete_machine = Database::getPDO()->prepare("DELETE FROM machine WHERE id_machine = :id_machine");
|
||||||
|
$delete_machine->execute(array(
|
||||||
|
':id_machine' => $id_machine
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On verifie que la machine n'existe plus
|
||||||
|
=========================================================*/
|
||||||
|
return ( self::getById($id_machine) === false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,405 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager\repo;
|
||||||
|
use \manager\Database;
|
||||||
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
class user{
|
||||||
|
|
||||||
|
/* CREATION D'UN UTILISATEUR ET DE SON GROUPE INDIVIDUEL
|
||||||
|
*
|
||||||
|
* @code<String> Code RFID de l'utilisateur
|
||||||
|
* @username<String> Identifiant l'utilisateur
|
||||||
|
* @firstname<String> Prenom de l'utilisateur
|
||||||
|
* @lastcode<String> Nom de l'utilisateur
|
||||||
|
* @mail<String> Adresse email de l'utilisateur
|
||||||
|
* @password<String> Mot de passe de l'utilisateur
|
||||||
|
* @status<String> Status de l'utilisateur
|
||||||
|
*
|
||||||
|
* @return id_user<int> Renvoie l'UID de l'utilisateur cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function create($code, $username, $firstname, $lastname, $mail, $password, $status){
|
||||||
|
/* [1] Verification de l'unicite de code+username
|
||||||
|
=========================================================*/
|
||||||
|
$check_unique = !is_array(self::getByCode($code));
|
||||||
|
$check_unique = $check_unique && !is_array(self::getByUsername($username));
|
||||||
|
|
||||||
|
// Si un utilisateur a deja ce code ou cet username, on renvoie une erreur
|
||||||
|
if( !$check_unique )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* [2] Creation de l'utilisateur
|
||||||
|
=========================================================*/
|
||||||
|
$insert_user = Database::getPDO()->prepare("INSERT INTO user(id_user, code, username, firstname, lastname, mail, password, status)
|
||||||
|
VALUES(DEFAULT, :code, :username, :firstname, :lastname, :mail, :password, :status)");
|
||||||
|
$insert_user->execute(array(
|
||||||
|
':code' => $code,
|
||||||
|
':username' => $username,
|
||||||
|
':firstname' => $firstname,
|
||||||
|
':lastname' => $lastname,
|
||||||
|
':mail' => $mail,
|
||||||
|
':password' => $password,
|
||||||
|
':status' => $status
|
||||||
|
));
|
||||||
|
|
||||||
|
/* [3] On retourne l'id_user ou FALSE si erreur
|
||||||
|
=========================================================*/
|
||||||
|
$check_user = self::getByCode($code);
|
||||||
|
|
||||||
|
// Si n'existe pas on retourne FALSE
|
||||||
|
if( $check_user === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Sinon, on retourne son id
|
||||||
|
return $check_user['id_user'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE UNE LISTE D'UTILISATEURS EN FONCTION D'UN MOT CLE
|
||||||
|
*
|
||||||
|
* @keyword<String> Element de recherche
|
||||||
|
*
|
||||||
|
* @return users<Array> Retourne les utilisateurs trouves
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function search($keyword){
|
||||||
|
// On recupere les donnees
|
||||||
|
$searchusers = Database::getPDO()->query("SELECT * FROM user
|
||||||
|
WHERE code LIKE '%".$keyword."%'
|
||||||
|
OR username LIKE '%".$keyword."%'
|
||||||
|
OR firstname LIKE '%".$keyword."%'
|
||||||
|
OR lastname LIKE '%".$keyword."%'
|
||||||
|
OR mail LIKE '%".$keyword."%'
|
||||||
|
");
|
||||||
|
|
||||||
|
return Database::delNumeric( $searchusers->fetchAll() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA LISTE DE TOUS LES UTILISATEURS
|
||||||
|
*
|
||||||
|
* @return utilisateurs<Array> Liste des utilisateurs de la BDD
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getAll(){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->query("SELECT * FROM user ORDER BY username");
|
||||||
|
|
||||||
|
// On recupere le resutat
|
||||||
|
$answer = $request->fetchAll();
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE L'UTILISATEUR D'ID DONNE
|
||||||
|
*
|
||||||
|
* @id<int> Id de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return utilisateur<Array> Renvoie l'utilisateur d'id donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getById($id){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM user
|
||||||
|
WHERE id_user = :id");
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':id' => $id
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seul utilisateur
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE L'UTILISATEUR DE CODE DONNE
|
||||||
|
*
|
||||||
|
* @code<String> Code de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return utilisateur<Array> Renvoie l'utilisateur de code donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByCode($code){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM user
|
||||||
|
WHERE code = :code");
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':code' => $code
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seul utilisateur
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE L'UTILISATEUR D'USERNAME DONNE
|
||||||
|
*
|
||||||
|
* @username<String> Identifiant de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return utilisateur<Array> Renvoie l'utilisateur d'username donne si existe
|
||||||
|
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByUsername($username){
|
||||||
|
// On ecrit la requete
|
||||||
|
$request = Database::getPDO()->prepare("SELECT * FROM user
|
||||||
|
WHERE username = :username");
|
||||||
|
|
||||||
|
// On execute la requete
|
||||||
|
$request->execute(array(
|
||||||
|
':username' => $username
|
||||||
|
));
|
||||||
|
|
||||||
|
// On recupere 1 seul utilisateur
|
||||||
|
$answer = $request->fetch();
|
||||||
|
|
||||||
|
// Gestion d'erreur -> aucun resultat
|
||||||
|
if( $answer === false )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $answer, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LES GROUPE AUQUELS UN UTILISATEUR DONNE APPARTIENT
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return groups<Array> Renvoie un tableau d'UID des groupes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getGroups($id_user){
|
||||||
|
/* [1] On redige/execute la requete
|
||||||
|
=========================================================*/
|
||||||
|
$select_groups = Database::getPDO()->prepare("SELECT gm.id_group FROM user as u, group_merge as gm
|
||||||
|
WHERE u.id_user = gm.id_user
|
||||||
|
AND u.id_user = :id_user
|
||||||
|
ORDER BY gm.id_user ASC");
|
||||||
|
$select_groups->execute(array(
|
||||||
|
':id_user' => $id_user
|
||||||
|
));
|
||||||
|
|
||||||
|
// On retourne en supprimant les indices numeriques
|
||||||
|
return Database::delNumeric( $select_groups->fetchAll() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LES GROUPES AUQUEL APPARTIENT UN UTILISATEUR DONNE
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return clusters<Array> Retourne la liste des groupes auquel appartient l'utilisateur
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getClusters($id_user){
|
||||||
|
/* [1] On redige/execute la requete
|
||||||
|
=========================================================*/
|
||||||
|
$get_clusters = Database::getPDO()->prepare("SELECT c.* FROM cluster as c, cluster_merge as cm
|
||||||
|
WHERE cm.id_cluster = c.id_cluster
|
||||||
|
AND cm.id_entity = :id_user
|
||||||
|
AND cm.class = :class
|
||||||
|
ORDER BY c.id_cluster");
|
||||||
|
$get_clusters->execute(array(
|
||||||
|
':id_user' => $id_user,
|
||||||
|
':class' => clusterRepo::USER_CLASS
|
||||||
|
));
|
||||||
|
|
||||||
|
/* [2] On retourne la liste des groupes
|
||||||
|
=========================================================*/
|
||||||
|
return Database::delNumeric( $get_clusters->fetchAll() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* MODIFICATION D'UN UTILISATEUR
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur
|
||||||
|
* @code<String> Code RFID de l'utilisateur
|
||||||
|
* @username<String> Identifiant l'utilisateur
|
||||||
|
* @firstname<String> Prenom de l'utilisateur
|
||||||
|
* @lastcode<String> Nom de l'utilisateur
|
||||||
|
* @mail<String> Adresse email de l'utilisateur
|
||||||
|
* @password<String> Mot de passe de l'utilisateur
|
||||||
|
* @status<String> Status de l'utilisateur
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Renvoie si oui ou non tout s'est bien passe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function edit($id_user=null, $code=null, $username=null, $firstname=null, $lastname=null, $mail=null, $password=null, $status=null){
|
||||||
|
/* [1] Verification de l'unicite de code+username (si differents)
|
||||||
|
=========================================================*/
|
||||||
|
// On recupere les utilisateurs ayant le meme code ou username (si existent)
|
||||||
|
$getbycode = self::getByCode($code);
|
||||||
|
$getbyusername = self::getByUsername($username);
|
||||||
|
|
||||||
|
$check_unique = is_array($getbycode) && $getbycode['id_user'] == $id_user || !is_array($getbycode);
|
||||||
|
$check_unique = $check_unique && is_array($getbyusername) && $getbyusername['id_user'] == $id_user || !is_array($getbyusername);
|
||||||
|
|
||||||
|
// Si un utilisateur a deja ce code ou cet username (sauf lui), on renvoie une erreur
|
||||||
|
if( !$check_unique )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* [2] Modification de l'utilisateur
|
||||||
|
=========================================================*/
|
||||||
|
$edit_user = Database::getPDO()->prepare("UPDATE user
|
||||||
|
SET code = :code,
|
||||||
|
username = :username,
|
||||||
|
firstname = :firstname,
|
||||||
|
lastname = :lastname,
|
||||||
|
mail = :mail,
|
||||||
|
password = :password,
|
||||||
|
status = :status
|
||||||
|
WHERE id_user = :id_user");
|
||||||
|
$edit_user->execute(array(
|
||||||
|
':code' => $code,
|
||||||
|
':username' => $username,
|
||||||
|
':firstname' => $firstname,
|
||||||
|
':lastname' => $lastname,
|
||||||
|
':mail' => $mail,
|
||||||
|
':password' => $password,
|
||||||
|
':status' => $status,
|
||||||
|
':id_user' => $id_user
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] On retourne si tout a ete modifie, si erreur
|
||||||
|
=========================================================*/
|
||||||
|
$check_user = self::getById($id_user);
|
||||||
|
|
||||||
|
$checker = $check_user['id_user'] == $id_user;
|
||||||
|
$checker = $checker && $check_user['code'] == $code;
|
||||||
|
$checker = $checker && $check_user['username'] == $username;
|
||||||
|
$checker = $checker && $check_user['firstname'] == $firstname;
|
||||||
|
$checker = $checker && $check_user['lastname'] == $lastname;
|
||||||
|
$checker = $checker && $check_user['mail'] == $mail;
|
||||||
|
$checker = $checker && $check_user['password'] == $password;
|
||||||
|
$checker = $checker && $check_user['status'] == $status;
|
||||||
|
|
||||||
|
// On retourne l'etat de la modification
|
||||||
|
return $checker;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SUPPRIME UN UTILISATEUR DONNE
|
||||||
|
*
|
||||||
|
* @id_user<int> UID de l'utilisateur en question
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non l'utilisateur a bien ete supprime
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function delete($id_user){
|
||||||
|
/* [1] On redige/execute la requete
|
||||||
|
=========================================================*/
|
||||||
|
$delete_user = Database::getPDO()->prepare("DELETE FROM user WHERE id_user = :id_user");
|
||||||
|
$delete_user->execute(array(
|
||||||
|
':id_user' => $id_user
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] On verifie que l'utilisateur n'existe plus
|
||||||
|
=========================================================*/
|
||||||
|
return ( self::getById($id_user) === false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,114 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager;
|
||||||
|
|
||||||
|
|
||||||
|
class sessionManager{
|
||||||
|
|
||||||
|
private static $prefix;
|
||||||
|
|
||||||
|
|
||||||
|
/*************************/
|
||||||
|
/* SECURE SHA1 ALGORITHM */
|
||||||
|
/*************************/
|
||||||
|
public static function secure_sha1($data){
|
||||||
|
return sha1( '">\[..|{@#))'.sha1($data.'_)Q@#((%*_$%(@#') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************/
|
||||||
|
/* INITIALISATION DE SESSION */
|
||||||
|
/*****************************/
|
||||||
|
private static function reset_session($session_id=null){
|
||||||
|
// On ferme la session
|
||||||
|
session_destroy();
|
||||||
|
|
||||||
|
// On definit l'id session si donne en argument
|
||||||
|
if( $session_id != null )
|
||||||
|
session_id( $session_id );
|
||||||
|
|
||||||
|
// Precaution: on met a jour le cookie
|
||||||
|
setcookie('PHPSESSID', session_id(), time()+60*30 );
|
||||||
|
|
||||||
|
// On redemarre la session avec le bon id session
|
||||||
|
\session_start();
|
||||||
|
|
||||||
|
// On met a jour le token
|
||||||
|
self::update_token();
|
||||||
|
|
||||||
|
|
||||||
|
header('Refresh: 0');
|
||||||
|
}
|
||||||
|
|
||||||
|
/*******************/
|
||||||
|
/* GENERE UN TOKEN */
|
||||||
|
/*******************/
|
||||||
|
private static function update_token(){
|
||||||
|
$token = self::$prefix.self::secure_sha1(uniqid());
|
||||||
|
|
||||||
|
// On definit le token en session
|
||||||
|
$_SESSION['session_token'] = $token;
|
||||||
|
|
||||||
|
// On definit le token en cookie
|
||||||
|
$_COOKIE['session_token'] = $_SESSION['session_token'];
|
||||||
|
setcookie('session_token', $_COOKIE['session_token'], time()+60*30 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/************/
|
||||||
|
/* AMORCEUR */
|
||||||
|
/************/
|
||||||
|
public static function session_start(){
|
||||||
|
/* [1] Génération et Gestion des donnees a utiliser
|
||||||
|
==============================================================*/
|
||||||
|
// On genere le hash a partir des donnees personnelles
|
||||||
|
self::$prefix = self::secure_sha1( $_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT'] );
|
||||||
|
|
||||||
|
// On cree un id session associe a ces donnees personnelles
|
||||||
|
$sessid = substr(self::$prefix,0,5) . substr(self::secure_sha1(uniqid()),0,24);
|
||||||
|
|
||||||
|
// On genere un token pour l'execution suivante
|
||||||
|
$token = self::$prefix.self::secure_sha1(uniqid());
|
||||||
|
|
||||||
|
// On definit/recupere le token
|
||||||
|
$session_token = (isset($_COOKIE['session_token'])) ? $_COOKIE['session_token'] : null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Verification de l'id session
|
||||||
|
==============================================================*/
|
||||||
|
\session_start();
|
||||||
|
|
||||||
|
// On verifie l'id session (5 premiers chars du hash des donnees perso)
|
||||||
|
$valid_sessid = strpos( session_id(), substr(self::$prefix,0,5) ) === 0;
|
||||||
|
|
||||||
|
// Si id session incorrect ou pas de token
|
||||||
|
if( !$valid_sessid )
|
||||||
|
self::reset_session( $sessid ); // On initialise la session (bon id session)
|
||||||
|
|
||||||
|
|
||||||
|
// si id session invalide
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Verification du token
|
||||||
|
==============================================================*/
|
||||||
|
// On verifie que le token est valide
|
||||||
|
$valid_token = $session_token != null; // verification de l'existence du cookie
|
||||||
|
$valid_token = $valid_token && strpos($session_token, self::$prefix) === 0; // verification des donnes personnelles
|
||||||
|
$valid_token = $valid_token && isset($_SESSION['session_token']); // verification que la variable session associee existe
|
||||||
|
$valid_token = $valid_token && $_SESSION['session_token'] == $_COOKIE['session_token']; // verification que la session est coherente
|
||||||
|
|
||||||
|
/* [4] Si token inexistant
|
||||||
|
==============================================================*/
|
||||||
|
if( !$valid_token )
|
||||||
|
self::reset_session($sessid); // On initialise la session
|
||||||
|
else
|
||||||
|
self::update_token(); // Dans tous les cas, on cree un nouveau token
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
||||||
|
|
||||||
|
// On definit les constantes inexistantes dans PHPUnit
|
||||||
|
$_SERVER['HTTP_HOST'] = 'stefproject';
|
||||||
|
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0';
|
||||||
|
|
||||||
|
require_once __ROOT__.'/manager/autoloader.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,446 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Code Coverage for /var/www/stefproject/manager/Database.php</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="index.html">/var/www/stefproject/manager</a> <span class="divider">/</span></li>
|
||||||
|
<li class="active">Database.php</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="10"><div align="center"><strong>Code Coverage</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Classes and Traits</strong></div></td>
|
||||||
|
<td colspan="4"><div align="center"><strong>Functions and Methods</strong></div></td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Lines</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="danger">Total</td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 50.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">50.00%</div></td>
|
||||||
|
<td class="warning small"><div align="right">3 / 6</div></td>
|
||||||
|
<td class="warning small"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 95.45%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">95.45%</div></td>
|
||||||
|
<td class="success small"><div align="right">63 / 66</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger">DataBase</td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 50.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">50.00%</div></td>
|
||||||
|
<td class="warning small"><div align="right">3 / 6</div></td>
|
||||||
|
<td class="warning small">54</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 95.45%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">95.45%</div></td>
|
||||||
|
<td class="success small"><div align="right">63 / 66</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger" colspan="4"> <a href="#27">__construct($host, $dbname, $username, $password)</a></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="danger small">2.01</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 88.89%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">88.89%</div></td>
|
||||||
|
<td class="success small"><div align="right">8 / 9</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger" colspan="4"> <a href="#47">getInstance()</a></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="danger small">6.10</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 85.71%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">85.71%</div></td>
|
||||||
|
<td class="success small"><div align="right">6 / 7</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#65">getPDO()</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">1</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">2 / 2</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#79">getConfig()</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">1</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">3 / 3</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#110">delNumeric($fetchData, $oneDimension=false)</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">14</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">25 / 25</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger" colspan="4"> <a href="#185">check($type, $value)</a></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="danger small">30</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 95.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">95.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">19 / 20</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="table table-borderless table-condensed">
|
||||||
|
<tbody>
|
||||||
|
<tr><td><div align="right"><a name="1"></a><a href="#1">1</a></div></td><td class="codeLine"><?php</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="2"></a><a href="#2">2</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="3"></a><a href="#3">3</a></div></td><td class="codeLine"> namespace manager;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="4"></a><a href="#4">4</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="5"></a><a href="#5">5</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="6"></a><a href="#6">6</a></div></td><td class="codeLine"> class DataBase{</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="7"></a><a href="#7">7</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="8"></a><a href="#8">8</a></div></td><td class="codeLine"> /* ATTRIBUTS STATIQUES */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"> public static $config_path = array(</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine"> 'local' => 'f/json/database-local/conf',</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="11"></a><a href="#11">11</a></div></td><td class="codeLine"> 'remote' => 'f/json/database/conf'</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="12"></a><a href="#12">12</a></div></td><td class="codeLine"> );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="13"></a><a href="#13">13</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="14"></a><a href="#14">14</a></div></td><td class="codeLine"> private static $pdo;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="15"></a><a href="#15">15</a></div></td><td class="codeLine"> private static $instance;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="16"></a><a href="#16">16</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="17"></a><a href="#17">17</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="18"></a><a href="#18">18</a></div></td><td class="codeLine"> /* ATTRIBUTS */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="19"></a><a href="#19">19</a></div></td><td class="codeLine"> private $host;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="20"></a><a href="#20">20</a></div></td><td class="codeLine"> private $dbname;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="21"></a><a href="#21">21</a></div></td><td class="codeLine"> private $username;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="22"></a><a href="#22">22</a></div></td><td class="codeLine"> private $password;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="23"></a><a href="#23">23</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="24"></a><a href="#24">24</a></div></td><td class="codeLine"> public static $error;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="25"></a><a href="#25">25</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="26"></a><a href="#26">26</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="27"></a><a href="#27">27</a></div></td><td class="codeLine"> public function __construct($host, $dbname, $username, $password){</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 28" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"> $this->host = $host;</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 29" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"> $this->dbname = $dbname;</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 30" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"> $this->username = $username;</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 31" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"> $this->password = $password;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"> try{</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 34" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> self::$pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> // On signale que tout s'est bien passe</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 37" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"> self::$error = ManagerError::Success;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 39" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> }catch(Exception $e){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"> // On signale qu'il y a une erreur</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> self::$error = ManagerError::PDOConnection;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 43" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"> /* retourne une instance de la classe */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> public static function getInstance(){</td></tr>
|
||||||
|
<tr class="success popin" data-title="5 tests cover line 48" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_construct::testPDO</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"> if( self::$instance == null || self::$error != ManagerError::Success ){ // Si aucune instance existante OU erreur de connection</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> // chargement de la configuration du server SQL</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 51" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> if( !isset($_SERVER['HTTP_HOST']) || isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'stefproject' )</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 52" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> $conf = json_decode( ResourceDispatcher::getResource(self::$config_path['local']), true );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> else</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"> $conf = json_decode( ResourceDispatcher::getResource(self::$config_path['remote']), true );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"> // creation de l'instance en fonction des parametres</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 57" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"> self::$instance = new DataBase($conf['host'], $conf['dbname'], $conf['user'], $conf['password']);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 59" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="5 tests cover line 61" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_construct::testPDO</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> return self::$instance;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"> /* retourne la connection statique */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> public static function getPDO(){</td></tr>
|
||||||
|
<tr class="success popin" data-title="1 test covers line 66" data-content="<ul><li class="success">phpunit\Database_construct::testPDO</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"> $instance = self::getInstance();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="1 test covers line 68" data-content="<ul><li class="success">phpunit\Database_construct::testPDO</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> return self::$pdo;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="79"></a><a href="#79">79</a></div></td><td class="codeLine"> public function getConfig(){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="80"></a><a href="#80">80</a></div></td><td class="codeLine"> return array(</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 81" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="81"></a><a href="#81">81</a></div></td><td class="codeLine"> 'host' => $this->host,</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 82" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="82"></a><a href="#82">82</a></div></td><td class="codeLine"> 'username' => $this->username</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 83" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="83"></a><a href="#83">83</a></div></td><td class="codeLine"> );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="84"></a><a href="#84">84</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="85"></a><a href="#85">85</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="86"></a><a href="#86">86</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="87"></a><a href="#87">87</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="88"></a><a href="#88">88</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="89"></a><a href="#89">89</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="90"></a><a href="#90">90</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="91"></a><a href="#91">91</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="92"></a><a href="#92">92</a></div></td><td class="codeLine"> /*************************************************************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="93"></a><a href="#93">93</a></div></td><td class="codeLine"> /* _____ ______ _ _ ______ _____ _ */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="94"></a><a href="#94">94</a></div></td><td class="codeLine"> /* / ____| ____| \ | | ____| __ \ /\ | | */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="95"></a><a href="#95">95</a></div></td><td class="codeLine"> /* | | __| |__ | \| | |__ | |__) | / \ | | */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="96"></a><a href="#96">96</a></div></td><td class="codeLine"> /* | | |_ | __| | . ` | __| | _ / / /\ \ | | */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="97"></a><a href="#97">97</a></div></td><td class="codeLine"> /* | |__| | |____| |\ | |____| | \ \ / ____ \| |____ */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="98"></a><a href="#98">98</a></div></td><td class="codeLine"> /* \_____|______|_| \_|______|_| \_\/_/ \_\______| */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="99"></a><a href="#99">99</a></div></td><td class="codeLine"> /* */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="100"></a><a href="#100">100</a></div></td><td class="codeLine"> /*************************************************************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="101"></a><a href="#101">101</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="102"></a><a href="#102">102</a></div></td><td class="codeLine"> /* SUPPRIME LES VALEURS À CLÉS NUMÉRIQUES DANS UN FETCH D'UNE TABLE DE LA BDD</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="103"></a><a href="#103">103</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="104"></a><a href="#104">104</a></div></td><td class="codeLine"> * @fetchData<Array> le résultat d'une $requeteSQL->fetchAll()</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="105"></a><a href="#105">105</a></div></td><td class="codeLine"> * @oneDimension<Boolean> FAUX <=> fetchAll ; VRAI <=> fetch</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="106"></a><a href="#106">106</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="107"></a><a href="#107">107</a></div></td><td class="codeLine"> * @return newFetchData<Array> retourne le tableau donné en paramètre mais sans les valeurs à clés numériques</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="108"></a><a href="#108">108</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="109"></a><a href="#109">109</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="110"></a><a href="#110">110</a></div></td><td class="codeLine"> public static function delNumeric($fetchData, $oneDimension=false){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="111"></a><a href="#111">111</a></div></td><td class="codeLine"> // On quitte si ce n'est pas un tableau</td></tr>
|
||||||
|
<tr class="success popin" data-title="6 tests cover line 112" data-content="<ul><li class="success">phpunit\Database_delNumeric::testTypeInt</li><li class="success">phpunit\Database_delNumeric::testTypeString</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="112"></a><a href="#112">112</a></div></td><td class="codeLine"> if( !is_array($fetchData) )</td></tr>
|
||||||
|
<tr class="success popin" data-title="6 tests cover line 113" data-content="<ul><li class="success">phpunit\Database_delNumeric::testTypeInt</li><li class="success">phpunit\Database_delNumeric::testTypeString</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="113"></a><a href="#113">113</a></div></td><td class="codeLine"> return array();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="114"></a><a href="#114">114</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 115" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="115"></a><a href="#115">115</a></div></td><td class="codeLine"> $nextEquivalent = false; // Vaut VRAI si le prochain est peut-etre un equivalent numerique</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="116"></a><a href="#116">116</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="117"></a><a href="#117">117</a></div></td><td class="codeLine"> /* [1] 2 dimensions</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="118"></a><a href="#118">118</a></div></td><td class="codeLine"> ===============================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 119" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="119"></a><a href="#119">119</a></div></td><td class="codeLine"> if( !$oneDimension && isset($fetchData[0]) && is_array($fetchData[0]) ){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="120"></a><a href="#120">120</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="121"></a><a href="#121">121</a></div></td><td class="codeLine"> // on supprime les doublons des entrées (indice numérique)</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 122" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="122"></a><a href="#122">122</a></div></td><td class="codeLine"> for( $i = 0 ; $i < count($fetchData) ; $i++ ) // pour tout les utilisateurs</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 123" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="123"></a><a href="#123">123</a></div></td><td class="codeLine"> foreach($fetchData[$i] as $col => $val){ // pour toutes les entrées</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="124"></a><a href="#124">124</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 125" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="125"></a><a href="#125">125</a></div></td><td class="codeLine"> if( !mb_detect_encoding($val, 'UTF-8') )</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 126" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="126"></a><a href="#126">126</a></div></td><td class="codeLine"> $fetchData[$i][$col] = utf8_encode($val);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="127"></a><a href="#127">127</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 128" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="128"></a><a href="#128">128</a></div></td><td class="codeLine"> if( is_int($col) ){ // Si indice numerique</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="129"></a><a href="#129">129</a></div></td><td class="codeLine"> if( $nextEquivalent ) // Si suit un indice textuel</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 130" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="130"></a><a href="#130">130</a></div></td><td class="codeLine"> unset( $fetchData[$i][$col] ); // on supprime l'indice</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="131"></a><a href="#131">131</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 132" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="132"></a><a href="#132">132</a></div></td><td class="codeLine"> $nextEquivalent = false; // Dans tous les cas, on dit que le prochain ne pourra pas etre supprime si numerique</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="133"></a><a href="#133">133</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 134" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="134"></a><a href="#134">134</a></div></td><td class="codeLine"> }else // Si l'indice n'est pas un entier</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 135" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="135"></a><a href="#135">135</a></div></td><td class="codeLine"> $nextEquivalent = true; // On signale qu'il y aura peut etre un indice numerique suivant</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="136"></a><a href="#136">136</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 137" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="137"></a><a href="#137">137</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="138"></a><a href="#138">138</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="139"></a><a href="#139">139</a></div></td><td class="codeLine"> /* [2] 1 dimensions</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="140"></a><a href="#140">140</a></div></td><td class="codeLine"> ===============================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 141" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="141"></a><a href="#141">141</a></div></td><td class="codeLine"> }else{</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="142"></a><a href="#142">142</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="143"></a><a href="#143">143</a></div></td><td class="codeLine"> // on supprime les doublons des entrées (indice numérique)</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 144" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="144"></a><a href="#144">144</a></div></td><td class="codeLine"> foreach($fetchData as $i=>$val){ // pour toutes les entrées</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="145"></a><a href="#145">145</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 146" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="146"></a><a href="#146">146</a></div></td><td class="codeLine"> if( !mb_detect_encoding($val, 'UTF-8') )</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 147" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="147"></a><a href="#147">147</a></div></td><td class="codeLine"> $fetchData[$i] = utf8_encode($val);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="148"></a><a href="#148">148</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 149" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="149"></a><a href="#149">149</a></div></td><td class="codeLine"> if( is_int($i) ){ // Si indice numerique</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="150"></a><a href="#150">150</a></div></td><td class="codeLine"> if( $nextEquivalent ) // Si suit un indice textuel</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 151" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="151"></a><a href="#151">151</a></div></td><td class="codeLine"> unset( $fetchData[$i] ); // on supprime l'indice</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="152"></a><a href="#152">152</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 153" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="153"></a><a href="#153">153</a></div></td><td class="codeLine"> $nextEquivalent = false; // Dans tous les cas, on dit que le prochain ne pourra pas etre supprime si numerique</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="154"></a><a href="#154">154</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 155" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="155"></a><a href="#155">155</a></div></td><td class="codeLine"> }else // Si l'indice n'est pas un entier</td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 156" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="156"></a><a href="#156">156</a></div></td><td class="codeLine"> $nextEquivalent = true; // On signale qu'il y aura peut etre un indice numerique suivant</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="157"></a><a href="#157">157</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 158" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="158"></a><a href="#158">158</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="159"></a><a href="#159">159</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="160"></a><a href="#160">160</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="161"></a><a href="#161">161</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 162" data-content="<ul><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal2DimWithNumericIndexes</li><li class="success">phpunit\Database_delNumeric::testGlobal1Dim</li><li class="success">phpunit\Database_delNumeric::testGlobal1DimWithNumericIndexes</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="162"></a><a href="#162">162</a></div></td><td class="codeLine"> return $fetchData;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="163"></a><a href="#163">163</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="164"></a><a href="#164">164</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="165"></a><a href="#165">165</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="166"></a><a href="#166">166</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="167"></a><a href="#167">167</a></div></td><td class="codeLine"> ////////////////////////////////////////////////////////////////</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="168"></a><a href="#168">168</a></div></td><td class="codeLine"> // _ __ _ _ _</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="169"></a><a href="#169">169</a></div></td><td class="codeLine"> // __ _____ _ __(_)/ _(_) ___ __ _| |_(_) ___ _ __ ___</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="170"></a><a href="#170">170</a></div></td><td class="codeLine"> // \ \ / / _ \ '__| | |_| |/ __/ _` | __| |/ _ \| '_ \/ __|</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="171"></a><a href="#171">171</a></div></td><td class="codeLine"> // \ V / __/ | | | _| | (_| (_| | |_| | (_) | | | \__ \</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="172"></a><a href="#172">172</a></div></td><td class="codeLine"> // \_/ \___|_| |_|_| |_|\___\__,_|\__|_|\___/|_| |_|___/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="173"></a><a href="#173">173</a></div></td><td class="codeLine"> //</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="174"></a><a href="#174">174</a></div></td><td class="codeLine"> ////////////////////////////////////////////////////////////////</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="175"></a><a href="#175">175</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="176"></a><a href="#176">176</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="177"></a><a href="#177">177</a></div></td><td class="codeLine"> /* VERIFICATIONS DES TYPES UTILES GENERIQUES</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="178"></a><a href="#178">178</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="179"></a><a href="#179">179</a></div></td><td class="codeLine"> * @type<String> Type que l'on veut verifier</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="180"></a><a href="#180">180</a></div></td><td class="codeLine"> * @value<mixed*> Valeur a verifier</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="181"></a><a href="#181">181</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="182"></a><a href="#182">182</a></div></td><td class="codeLine"> * @return match<Boolean> Retourne si oui ou non la valeur @value est du bon type @type</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="183"></a><a href="#183">183</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="184"></a><a href="#184">184</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="185"></a><a href="#185">185</a></div></td><td class="codeLine"> public static function check($type, $value){</td></tr>
|
||||||
|
<tr class="success popin" data-title="47 tests cover line 186" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeInfStringCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeSupCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeSupStringCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfStringIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeGtSupIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeGtSupStringIncorrect</li><li class="success">phpunit\Database_check::testUserCodeSize4</li><li class="success">phpunit\Database_check::testUserCodeSize6</li><li class="success">phpunit\Database_check::testUserCodeSize4WrongCharacter</li><li class="success">phpunit\Database_check::testUserCodeSizeGreaterThan6</li><li class="success">phpunit\Database_check::testUserCodeSize6WrongCharacter</li><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="186"></a><a href="#186">186</a></div></td><td class="codeLine"> $checker = !is_null($value);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="187"></a><a href="#187">187</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="188"></a><a href="#188">188</a></div></td><td class="codeLine"> switch($type){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="189"></a><a href="#189">189</a></div></td><td class="codeLine"> /* (1) Global */</td></tr>
|
||||||
|
<tr class="success popin" data-title="47 tests cover line 190" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeInfStringCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeSupCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeSupStringCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfStringIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeGtSupIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeGtSupStringIncorrect</li><li class="success">phpunit\Database_check::testUserCodeSize4</li><li class="success">phpunit\Database_check::testUserCodeSize6</li><li class="success">phpunit\Database_check::testUserCodeSize4WrongCharacter</li><li class="success">phpunit\Database_check::testUserCodeSizeGreaterThan6</li><li class="success">phpunit\Database_check::testUserCodeSize6WrongCharacter</li><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="190"></a><a href="#190">190</a></div></td><td class="codeLine"> case 'auto_increment_id':</td></tr>
|
||||||
|
<tr class="success popin" data-title="8 tests cover line 191" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeInfStringCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeSupCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeSupStringCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfStringIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeGtSupIncorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeGtSupStringIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="191"></a><a href="#191">191</a></div></td><td class="codeLine"> return $checker && is_numeric($value) && $value <= 2147483647 && $value >= -2147483647;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="192"></a><a href="#192">192</a></div></td><td class="codeLine"> break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="193"></a><a href="#193">193</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="194"></a><a href="#194">194</a></div></td><td class="codeLine"> /* (2) Utilisateur */</td></tr>
|
||||||
|
<tr class="success popin" data-title="39 tests cover line 195" data-content="<ul><li class="success">phpunit\Database_check::testUserCodeSize4</li><li class="success">phpunit\Database_check::testUserCodeSize6</li><li class="success">phpunit\Database_check::testUserCodeSize4WrongCharacter</li><li class="success">phpunit\Database_check::testUserCodeSizeGreaterThan6</li><li class="success">phpunit\Database_check::testUserCodeSize6WrongCharacter</li><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="195"></a><a href="#195">195</a></div></td><td class="codeLine"> case 'user.code':</td></tr>
|
||||||
|
<tr class="success popin" data-title="39 tests cover line 196" data-content="<ul><li class="success">phpunit\Database_check::testUserCodeSize4</li><li class="success">phpunit\Database_check::testUserCodeSize6</li><li class="success">phpunit\Database_check::testUserCodeSize4WrongCharacter</li><li class="success">phpunit\Database_check::testUserCodeSizeGreaterThan6</li><li class="success">phpunit\Database_check::testUserCodeSize6WrongCharacter</li><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="196"></a><a href="#196">196</a></div></td><td class="codeLine"> case 'machine.code':</td></tr>
|
||||||
|
<tr class="success popin" data-title="5 tests cover line 197" data-content="<ul><li class="success">phpunit\Database_check::testUserCodeSize4</li><li class="success">phpunit\Database_check::testUserCodeSize6</li><li class="success">phpunit\Database_check::testUserCodeSize4WrongCharacter</li><li class="success">phpunit\Database_check::testUserCodeSizeGreaterThan6</li><li class="success">phpunit\Database_check::testUserCodeSize6WrongCharacter</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="197"></a><a href="#197">197</a></div></td><td class="codeLine"> return $checker && is_string($value) && preg_match('/^[\dA-F]{2}(\-[\dA-F]{2}){3,5}$/i', $value);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="198"></a><a href="#198">198</a></div></td><td class="codeLine"> break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="199"></a><a href="#199">199</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="34 tests cover line 200" data-content="<ul><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="200"></a><a href="#200">200</a></div></td><td class="codeLine"> case 'user.username':</td></tr>
|
||||||
|
<tr class="success popin" data-title="34 tests cover line 201" data-content="<ul><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="201"></a><a href="#201">201</a></div></td><td class="codeLine"> case 'machine.name':</td></tr>
|
||||||
|
<tr class="success popin" data-title="34 tests cover line 202" data-content="<ul><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="202"></a><a href="#202">202</a></div></td><td class="codeLine"> case 'group.name':</td></tr>
|
||||||
|
<tr class="success popin" data-title="8 tests cover line 203" data-content="<ul><li class="success">phpunit\Database_check::testUsernameTypeStringCorrect</li><li class="success">phpunit\Database_check::testUsernameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testUsernameContentCorrect</li><li class="success">phpunit\Database_check::testUsernameContentIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSize30Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="203"></a><a href="#203">203</a></div></td><td class="codeLine"> return $checker && is_string($value) && preg_match('/^[\w-]{1,30}$/i', $value);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="204"></a><a href="#204">204</a></div></td><td class="codeLine"> break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="205"></a><a href="#205">205</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="26 tests cover line 206" data-content="<ul><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="206"></a><a href="#206">206</a></div></td><td class="codeLine"> case 'user.firstname':</td></tr>
|
||||||
|
<tr class="success popin" data-title="26 tests cover line 207" data-content="<ul><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="207"></a><a href="#207">207</a></div></td><td class="codeLine"> case 'user.lastname':</td></tr>
|
||||||
|
<tr class="success popin" data-title="8 tests cover line 208" data-content="<ul><li class="success">phpunit\Database_check::testFirstnameTypeStringCorrect</li><li class="success">phpunit\Database_check::testFirstnameTypeIntIncorrect</li><li class="success">phpunit\Database_check::testFirstnameContentCorrect</li><li class="success">phpunit\Database_check::testFirstnameContentIncorrect</li><li class="success">phpunit\Database_check::testFirstnameSize3Correct</li><li class="success">phpunit\Database_check::testFirstnameSize30Correct</li><li class="success">phpunit\Database_check::testFirstnameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testFirstnameSizeGt30Incorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="208"></a><a href="#208">208</a></div></td><td class="codeLine"> return $checker && is_string($value) && preg_match('/^[a-z -]{3,30}$/i', $value);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="209"></a><a href="#209">209</a></div></td><td class="codeLine"> break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="210"></a><a href="#210">210</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="18 tests cover line 211" data-content="<ul><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="211"></a><a href="#211">211</a></div></td><td class="codeLine"> case 'user.mail':</td></tr>
|
||||||
|
<tr class="success popin" data-title="5 tests cover line 212" data-content="<ul><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testMailSizeSupCorrect</li><li class="success">phpunit\Database_check::testMailContentCorrect</li><li class="success">phpunit\Database_check::testMailContentIncorrect1</li><li class="success">phpunit\Database_check::testMailContentIncorrect2</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="212"></a><a href="#212">212</a></div></td><td class="codeLine"> return $checker && is_string($value) && strlen($value) <= 50 && preg_match('/^[\w\.-]+@[\w\.-]+\.[a-z]{2,4}$/i', $value);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="213"></a><a href="#213">213</a></div></td><td class="codeLine"> break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="214"></a><a href="#214">214</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="13 tests cover line 215" data-content="<ul><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="215"></a><a href="#215">215</a></div></td><td class="codeLine"> case 'user.password':</td></tr>
|
||||||
|
<tr class="success popin" data-title="5 tests cover line 216" data-content="<ul><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeInfIncorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\Database_check::testPasswordContentCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="216"></a><a href="#216">216</a></div></td><td class="codeLine"> return $checker && is_string($value) && preg_match('/^[\da-f]{40}$/i', $value);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="217"></a><a href="#217">217</a></div></td><td class="codeLine"> break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="218"></a><a href="#218">218</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="8 tests cover line 219" data-content="<ul><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="219"></a><a href="#219">219</a></div></td><td class="codeLine"> case 'user.status':</td></tr>
|
||||||
|
<tr class="success popin" data-title="8 tests cover line 220" data-content="<ul><li class="success">phpunit\Database_check::testStatusTypeIntCorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringCorrect</li><li class="success">phpunit\Database_check::testStatusTypeIntIncorrect</li><li class="success">phpunit\Database_check::testStatusTypeStringIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfCorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupCorrect</li><li class="success">phpunit\Database_check::testStatusSizeInfIncorrect</li><li class="success">phpunit\Database_check::testStatusSizeSupIncorrect</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="220"></a><a href="#220">220</a></div></td><td class="codeLine"> return $checker && is_numeric($value) && floor($value) == $value && $value >= 0 && $value <= 100;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="221"></a><a href="#221">221</a></div></td><td class="codeLine"> break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="222"></a><a href="#222">222</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="223"></a><a href="#223">223</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="224"></a><a href="#224">224</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="225"></a><a href="#225">225</a></div></td><td class="codeLine"> return $checker;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="226"></a><a href="#226">226</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="227"></a><a href="#227">227</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="228"></a><a href="#228">228</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="229"></a><a href="#229">229</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="230"></a><a href="#230">230</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="231"></a><a href="#231">231</a></div></td><td class="codeLine">?></td></tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<footer>
|
||||||
|
<h4>Legend</h4>
|
||||||
|
<p>
|
||||||
|
<span class="success"><strong>Executed</strong></span>
|
||||||
|
<span class="danger"><strong>Not Executed</strong></span>
|
||||||
|
<span class="warning"><strong>Dead Code</strong></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.13</a> using <a href="http://www.php.net/" target="_top">PHP 5.5.9-1ubuntu4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.28</a> at Sun Feb 14 13:13:13 CET 2016.</small>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">$('.popin').popover({trigger: 'hover'});</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,231 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Code Coverage for /var/www/stefproject/manager/ManagerError.php</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="index.html">/var/www/stefproject/manager</a> <span class="divider">/</span></li>
|
||||||
|
<li class="active">ManagerError.php</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="10"><div align="center"><strong>Code Coverage</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Classes and Traits</strong></div></td>
|
||||||
|
<td colspan="4"><div align="center"><strong>Functions and Methods</strong></div></td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Lines</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="success">Total</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">16 / 16</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success">ManagerError</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">16</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">16 / 16</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#71">explicit($error)</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">16</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">16 / 16</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="table table-borderless table-condensed">
|
||||||
|
<tbody>
|
||||||
|
<tr><td><div align="right"><a name="1"></a><a href="#1">1</a></div></td><td class="codeLine"><?php</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="2"></a><a href="#2">2</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="3"></a><a href="#3">3</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="4"></a><a href="#4">4</a></div></td><td class="codeLine"> namespace manager;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="5"></a><a href="#5">5</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="6"></a><a href="#6">6</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="7"></a><a href="#7">7</a></div></td><td class="codeLine"> class ManagerError{</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="8"></a><a href="#8">8</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"> /* SUCCESS */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine"> const Success = 0;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="11"></a><a href="#11">11</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="12"></a><a href="#12">12</a></div></td><td class="codeLine"> /* Parsage json */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="13"></a><a href="#13">13</a></div></td><td class="codeLine"> const ParsingFailed = 1;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="14"></a><a href="#14">14</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="15"></a><a href="#15">15</a></div></td><td class="codeLine"> /* ResourceDispatcher */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="16"></a><a href="#16">16</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="17"></a><a href="#17">17</a></div></td><td class="codeLine"> // Drapeaux invalides</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="18"></a><a href="#18">18</a></div></td><td class="codeLine"> const InvalidFlags = 2;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="19"></a><a href="#19">19</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="20"></a><a href="#20">20</a></div></td><td class="codeLine"> // Fichier inexistant</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="21"></a><a href="#21">21</a></div></td><td class="codeLine"> const UnreachableResource = 3;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="22"></a><a href="#22">22</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="23"></a><a href="#23">23</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="24"></a><a href="#24">24</a></div></td><td class="codeLine"> /* ModuleRequest */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="25"></a><a href="#25">25</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="26"></a><a href="#26">26</a></div></td><td class="codeLine"> // Le @path n'est pas renseigne</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="27"></a><a href="#27">27</a></div></td><td class="codeLine"> const MissingPath = 4;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"> // Verification de la coherence du chemin (existe dans la conf)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"> const WrongPathModule = 5;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"> // Module non specifie dans la conf</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"> const UnknownModule = 6;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"> // Methode non specifie pour ce Module dans la conf</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> const UnknownMethod = 7;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"> // Methode inamorcable</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> const UncallableMethod = 8;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> // Erreur de parametre(s)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> const ParamError = 9;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"> // Erreur dans le traitement</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"> const ModuleError = 10;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> /* Repo */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"> // Verification de la coherence du chemin (existe dans la conf)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> const WrongPathRepo = 11;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> // Module non specifie dans la conf</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> const UnknownRepo = 12;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"> // Erreur dans le traitement</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"> const RepoError = 13;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"> /* Database */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"> // Erreur lors de la creation d'un objet PDO (connection)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> const PDOConnection = 14;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"> /* EXPLICITE UN CODE D'ERREUR</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"> * @error<Integer> Code d'erreur</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> * @return explicit<String> Description explicite du code d'erreur</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"> public static function explicit($error){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> switch($error){</td></tr>
|
||||||
|
<tr class="success popin" data-title="16 tests cover line 73" data-content="<ul><li class="success">phpunit\ManagerError::testErrorSuccess</li><li class="success">phpunit\ManagerError::testErrorParsingFailed</li><li class="success">phpunit\ManagerError::testErrorInvalidFlags</li><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> case self::Success: return "Tout s'est bien deroule"; break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="15 tests cover line 75" data-content="<ul><li class="success">phpunit\ManagerError::testErrorParsingFailed</li><li class="success">phpunit\ManagerError::testErrorInvalidFlags</li><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> case self::ParsingFailed: return "La lecture du fichier JSON a echoue"; break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="14 tests cover line 77" data-content="<ul><li class="success">phpunit\ManagerError::testErrorInvalidFlags</li><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> case self::InvalidFlags: return "Les specifications (drapeaux) sont incorrects"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="13 tests cover line 78" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"> case self::UnreachableResource: return "La ressource n'existe pas (404)"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="12 tests cover line 79" data-content="<ul><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="79"></a><a href="#79">79</a></div></td><td class="codeLine"> case self::MissingPath: return "Le chemin de delegation n'a pas ete renseigne"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 80" data-content="<ul><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="80"></a><a href="#80">80</a></div></td><td class="codeLine"> case self::WrongPathModule: return "Le chemin de delegation est incorrect ('nomModule/nomMethode')"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="10 tests cover line 81" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="81"></a><a href="#81">81</a></div></td><td class="codeLine"> case self::WrongPathRepo: return "Le chemin de delegation est incorrect ('nomRepo/nomMethode')"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="9 tests cover line 82" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="82"></a><a href="#82">82</a></div></td><td class="codeLine"> case self::UnknownModule: return "Le module n'existe pas"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="8 tests cover line 83" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="83"></a><a href="#83">83</a></div></td><td class="codeLine"> case self::UnknownRepo: return "Le repo n'existe pas"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="7 tests cover line 84" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="84"></a><a href="#84">84</a></div></td><td class="codeLine"> case self::UnknownMethod: return "Le methode n'existe pas"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="6 tests cover line 85" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="85"></a><a href="#85">85</a></div></td><td class="codeLine"> case self::UncallableMethod: return "Le methode n'est pas amorcable"; break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="86"></a><a href="#86">86</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="5 tests cover line 87" data-content="<ul><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="87"></a><a href="#87">87</a></div></td><td class="codeLine"> case self::ParamError: return "Un ou plusieurs parametres sont manquants ou incorrects"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 88" data-content="<ul><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="88"></a><a href="#88">88</a></div></td><td class="codeLine"> case self::ModuleError: return "Erreur lors du traitement du module"; break;</td></tr>
|
||||||
|
<tr class="success popin" data-title="3 tests cover line 89" data-content="<ul><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="89"></a><a href="#89">89</a></div></td><td class="codeLine"> case self::RepoError: return "Erreur lors du traitement du repo"; break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="90"></a><a href="#90">90</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="2 tests cover line 91" data-content="<ul><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="91"></a><a href="#91">91</a></div></td><td class="codeLine"> case self::PDOConnection: return "La connexion avec la base de donnees a echoue"; break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="92"></a><a href="#92">92</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="93"></a><a href="#93">93</a></div></td><td class="codeLine"> // default: return "Erreur inconnue..."; break;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="94"></a><a href="#94">94</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="95"></a><a href="#95">95</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="96"></a><a href="#96">96</a></div></td><td class="codeLine"> // Erreur inconnue</td></tr>
|
||||||
|
<tr class="success popin" data-title="1 test covers line 97" data-content="<ul><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="97"></a><a href="#97">97</a></div></td><td class="codeLine"> return null;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="98"></a><a href="#98">98</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="99"></a><a href="#99">99</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="100"></a><a href="#100">100</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="101"></a><a href="#101">101</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<footer>
|
||||||
|
<h4>Legend</h4>
|
||||||
|
<p>
|
||||||
|
<span class="success"><strong>Executed</strong></span>
|
||||||
|
<span class="danger"><strong>Not Executed</strong></span>
|
||||||
|
<span class="warning"><strong>Dead Code</strong></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.13</a> using <a href="http://www.php.net/" target="_top">PHP 5.5.9-1ubuntu4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.28</a> at Sun Feb 14 13:13:13 CET 2016.</small>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">$('.popin').popover({trigger: 'hover'});</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,461 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Code Coverage for /var/www/stefproject/manager/ResourceDispatcher.php</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="index.html">/var/www/stefproject/manager</a> <span class="divider">/</span></li>
|
||||||
|
<li class="active">ResourceDispatcher.php</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="10"><div align="center"><strong>Code Coverage</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Classes and Traits</strong></div></td>
|
||||||
|
<td colspan="4"><div align="center"><strong>Functions and Methods</strong></div></td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Lines</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="danger">Total</td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 66.67%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">66.67%</div></td>
|
||||||
|
<td class="warning small"><div align="right">4 / 6</div></td>
|
||||||
|
<td class="warning small"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 75.93%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">75.93%</div></td>
|
||||||
|
<td class="success small"><div align="right">41 / 54</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger">ResourceDispatcher</td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 66.67%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">66.67%</div></td>
|
||||||
|
<td class="warning small"><div align="right">4 / 6</div></td>
|
||||||
|
<td class="warning small">32.04</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 75.93%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">75.93%</div></td>
|
||||||
|
<td class="success small"><div align="right">41 / 54</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger" colspan="4"> <a href="#30">__construct($url, $view=false)</a></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="danger small">8.30</td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 60.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">60.00%</div></td>
|
||||||
|
<td class="warning small"><div align="right">12 / 20</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#97">getResource($route)</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">1</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">2 / 2</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#111">createFlags($serialFlags)</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">9</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">16 / 16</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#169">buildPath()</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">4</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">8 / 8</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger" colspan="4"> <a href="#216">view()</a></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="danger small">6</td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 5</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#233">getContent()</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">2</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">3 / 3</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="table table-borderless table-condensed">
|
||||||
|
<tbody>
|
||||||
|
<tr><td><div align="right"><a name="1"></a><a href="#1">1</a></div></td><td class="codeLine"><?php</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="2"></a><a href="#2">2</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="3"></a><a href="#3">3</a></div></td><td class="codeLine"> namespace manager;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="4"></a><a href="#4">4</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="5"></a><a href="#5">5</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="6"></a><a href="#6">6</a></div></td><td class="codeLine"> class ResourceDispatcher{</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="7"></a><a href="#7">7</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="8"></a><a href="#8">8</a></div></td><td class="codeLine"> // Constantes</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"> public static $extension_config_path = '/config/dispatcher-extensions.json';</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine"> public static $parents_config_path = '/config/dispatcher-tree.json';</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="11"></a><a href="#11">11</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="12"></a><a href="#12">12</a></div></td><td class="codeLine"> public static $supported_extensions;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="13"></a><a href="#13">13</a></div></td><td class="codeLine"> public static $supported_parents;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="14"></a><a href="#14">14</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="15"></a><a href="#15">15</a></div></td><td class="codeLine"> // Attributs prives utiles (initialisation)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="16"></a><a href="#16">16</a></div></td><td class="codeLine"> private $header;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="17"></a><a href="#17">17</a></div></td><td class="codeLine"> private $path;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="18"></a><a href="#18">18</a></div></td><td class="codeLine"> private $flags;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="19"></a><a href="#19">19</a></div></td><td class="codeLine"> public $error;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="20"></a><a href="#20">20</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="21"></a><a href="#21">21</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="22"></a><a href="#22">22</a></div></td><td class="codeLine"> /* CONSTRUCTEUR & AMORCAGE DU DISPATCHER</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="23"></a><a href="#23">23</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="24"></a><a href="#24">24</a></div></td><td class="codeLine"> * @url<String> L'url courante</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="25"></a><a href="#25">25</a></div></td><td class="codeLine"> * @view<Boolean> Si VRAI, retourne header+contenu, sinon cree juste l'objet</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="26"></a><a href="#26">26</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="27"></a><a href="#27">27</a></div></td><td class="codeLine"> * @return status<Boolean> Retourne si oui ou non tout s'est bien passe</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"> public function __construct($url, $view=false){</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 31" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"> $this->error = ManagerError::Success;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> /* [0] On met a jour la configuration</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"> =====================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> // Extensions supportees</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 37" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"> $extensions_conf = json_decode( file_get_contents(__ROOT__.self::$extension_config_path), true );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> // Gestion de l'erreur de parsage</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 40" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"> if( $extensions_conf == null ){</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> $this->error = ManagerError::ParsingFailed;</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 45" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"> self::$supported_extensions = $extensions_conf;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> // Dossiers supportes</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 48" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"> $parents_conf = json_decode( file_get_contents(__ROOT__.self::$parents_config_path), true );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> // Gestion de l'erreur de parsage</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 51" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> if( $parents_conf == null ){</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> $this->error = ManagerError::ParsingFailed;</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 56" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"> self::$supported_parents = $parents_conf;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"> /* [1] On recupere les donnees de l'URL</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 62" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"> $serialFlags = array_slice( explode('/',$url), 1 );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"> /* [2] On check/cree les drapeaux avec ces donnees</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 66" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"> if( !$this->createFlags($serialFlags) ){ // Creation des drapeaux</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> $this->error = ManagerError::InvalidFlags;</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> /* [3] On construit le chemin a partir des tags</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 74" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"> if( !$this->buildPath() ){ // Construction du chemin</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> $this->error = ManagerError::UnreachableResource;</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="79"></a><a href="#79">79</a></div></td><td class="codeLine"> /* [4] On gere l'affichage pour l'appel externe/interne</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="80"></a><a href="#80">80</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="81"></a><a href="#81">81</a></div></td><td class="codeLine"> if( $view ) // Appel externe</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 82" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="82"></a><a href="#82">82</a></div></td><td class="codeLine"> $this->view();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="83"></a><a href="#83">83</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="84"></a><a href="#84">84</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 85" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="85"></a><a href="#85">85</a></div></td><td class="codeLine"> return true;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="86"></a><a href="#86">86</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="87"></a><a href="#87">87</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="88"></a><a href="#88">88</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="89"></a><a href="#89">89</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="90"></a><a href="#90">90</a></div></td><td class="codeLine"> /* INCLUSION PHP D'UNE RESSOURCE UTILISANT LE DISPATCHER</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="91"></a><a href="#91">91</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="92"></a><a href="#92">92</a></div></td><td class="codeLine"> * @route<String> Route associee a une ressource</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="93"></a><a href="#93">93</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="94"></a><a href="#94">94</a></div></td><td class="codeLine"> * @return content<*> Retourne le contenu de la ressource</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="95"></a><a href="#95">95</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="96"></a><a href="#96">96</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="97"></a><a href="#97">97</a></div></td><td class="codeLine"> public static function getResource($route){</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 98" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="98"></a><a href="#98">98</a></div></td><td class="codeLine"> $instance = new ResourceDispatcher($route);</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 99" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="99"></a><a href="#99">99</a></div></td><td class="codeLine"> return $instance->getContent();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="100"></a><a href="#100">100</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="101"></a><a href="#101">101</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="102"></a><a href="#102">102</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="103"></a><a href="#103">103</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="104"></a><a href="#104">104</a></div></td><td class="codeLine"> /* FONCTION QUI VERIFIE LES DRAPEAUX</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="105"></a><a href="#105">105</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="106"></a><a href="#106">106</a></div></td><td class="codeLine"> * @serialFlags<Array> Tableau a indice numerique</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="107"></a><a href="#107">107</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="108"></a><a href="#108">108</a></div></td><td class="codeLine"> * @return correct<Boolean> Retourne si oui ou non les drapeaux sont corrects</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="109"></a><a href="#109">109</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="110"></a><a href="#110">110</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="111"></a><a href="#111">111</a></div></td><td class="codeLine"> private function createFlags($serialFlags){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="112"></a><a href="#112">112</a></div></td><td class="codeLine"> /* [1] Verification des flags (version serialisee)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="113"></a><a href="#113">113</a></div></td><td class="codeLine"> ======================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="114"></a><a href="#114">114</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 115" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="115"></a><a href="#115">115</a></div></td><td class="codeLine"> $correct = true;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="116"></a><a href="#116">116</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="117"></a><a href="#117">117</a></div></td><td class="codeLine"> // Verification du nombre de drapeaux () au moins 3</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 118" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="118"></a><a href="#118">118</a></div></td><td class="codeLine"> $correct = $correct && count($serialFlags) >= 3;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="119"></a><a href="#119">119</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="120"></a><a href="#120">120</a></div></td><td class="codeLine"> // Verification que l'extension est correcte</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 121" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="121"></a><a href="#121">121</a></div></td><td class="codeLine"> $correct = $correct && array_key_exists($serialFlags[0], self::$supported_extensions);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="122"></a><a href="#122">122</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="123"></a><a href="#123">123</a></div></td><td class="codeLine"> // Verification du filename</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 124" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="124"></a><a href="#124">124</a></div></td><td class="codeLine"> $correct = $correct && preg_match('#^[\w_-]+$#i', $serialFlags[1]);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="125"></a><a href="#125">125</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="126"></a><a href="#126">126</a></div></td><td class="codeLine"> // Verification du parent</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 127" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="127"></a><a href="#127">127</a></div></td><td class="codeLine"> $correct = $correct && array_key_exists($serialFlags[2], self::$supported_parents);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="128"></a><a href="#128">128</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="129"></a><a href="#129">129</a></div></td><td class="codeLine"> // Verification du sous-parent (optionnel)</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 130" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="130"></a><a href="#130">130</a></div></td><td class="codeLine"> $opt_subParent = count($serialFlags) >= 4;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="131"></a><a href="#131">131</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="132"></a><a href="#132">132</a></div></td><td class="codeLine"> if( $opt_subParent )</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 133" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="133"></a><a href="#133">133</a></div></td><td class="codeLine"> $correct = $correct && preg_match('#^[\w_-]+$#i', $serialFlags[3]);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="134"></a><a href="#134">134</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="135"></a><a href="#135">135</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 136" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="136"></a><a href="#136">136</a></div></td><td class="codeLine"> if( !$correct )</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 137" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="137"></a><a href="#137">137</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="138"></a><a href="#138">138</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="139"></a><a href="#139">139</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="140"></a><a href="#140">140</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="141"></a><a href="#141">141</a></div></td><td class="codeLine"> /* [2] Creation (non serialisee) des flags</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="142"></a><a href="#142">142</a></div></td><td class="codeLine"> ======================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="143"></a><a href="#143">143</a></div></td><td class="codeLine"> // Si tout se deroule bien, on cree les flags</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 144" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="144"></a><a href="#144">144</a></div></td><td class="codeLine"> $this->flags = array(</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 145" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="145"></a><a href="#145">145</a></div></td><td class="codeLine"> 'extension' => $serialFlags[0],</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 146" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="146"></a><a href="#146">146</a></div></td><td class="codeLine"> 'filename' => $serialFlags[1],</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 147" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="147"></a><a href="#147">147</a></div></td><td class="codeLine"> 'parent' => $serialFlags[2]</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 148" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="148"></a><a href="#148">148</a></div></td><td class="codeLine"> );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="149"></a><a href="#149">149</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="150"></a><a href="#150">150</a></div></td><td class="codeLine"> // Ajout du sous-parent optionnel</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="151"></a><a href="#151">151</a></div></td><td class="codeLine"> if( $opt_subParent )</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 152" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="152"></a><a href="#152">152</a></div></td><td class="codeLine"> $this->flags['subparent'] = $serialFlags[3];</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="153"></a><a href="#153">153</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 154" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="154"></a><a href="#154">154</a></div></td><td class="codeLine"> return true;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="155"></a><a href="#155">155</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="156"></a><a href="#156">156</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="157"></a><a href="#157">157</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="158"></a><a href="#158">158</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="159"></a><a href="#159">159</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="160"></a><a href="#160">160</a></div></td><td class="codeLine"> /* FONCTION QUI CONSTRUIT LE CHEMIN A PARTIR DU PATH</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="161"></a><a href="#161">161</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="162"></a><a href="#162">162</a></div></td><td class="codeLine"> * @return fileExists<Boolean> Retourne si oui ou non le fichier cible existe</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="163"></a><a href="#163">163</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="164"></a><a href="#164">164</a></div></td><td class="codeLine"> * @format</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="165"></a><a href="#165">165</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="166"></a><a href="#166">166</a></div></td><td class="codeLine"> * f/extension/filename/parent/:subparent:/ (:OPT:)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="167"></a><a href="#167">167</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="168"></a><a href="#168">168</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="169"></a><a href="#169">169</a></div></td><td class="codeLine"> private function buildPath(){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="170"></a><a href="#170">170</a></div></td><td class="codeLine"> /* [1] On recupere le HEADER associe a l'extension</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="171"></a><a href="#171">171</a></div></td><td class="codeLine"> ==========================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="172"></a><a href="#172">172</a></div></td><td class="codeLine"> // Si aucun header pour cet cle, on retourne une erreur</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 173" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="173"></a><a href="#173">173</a></div></td><td class="codeLine"> if( !isset(self::$supported_extensions[$this->flags['extension']]) ) return false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="174"></a><a href="#174">174</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="175"></a><a href="#175">175</a></div></td><td class="codeLine"> // On recupere le header associe</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 176" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="176"></a><a href="#176">176</a></div></td><td class="codeLine"> $header = self::$supported_extensions[$this->flags['extension']];</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="177"></a><a href="#177">177</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="178"></a><a href="#178">178</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="179"></a><a href="#179">179</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="180"></a><a href="#180">180</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="181"></a><a href="#181">181</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="182"></a><a href="#182">182</a></div></td><td class="codeLine"> /* [2] On recupere le chemin associe au parent</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="183"></a><a href="#183">183</a></div></td><td class="codeLine"> ==========================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="184"></a><a href="#184">184</a></div></td><td class="codeLine"> // Si aucun dossier pour cet indice, on retourne une erreur</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 185" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="185"></a><a href="#185">185</a></div></td><td class="codeLine"> if( !isset(self::$supported_parents[$this->flags['parent']]) ) return false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="186"></a><a href="#186">186</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="187"></a><a href="#187">187</a></div></td><td class="codeLine"> // On recupere le dossier associe</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 188" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="188"></a><a href="#188">188</a></div></td><td class="codeLine"> $parent = self::$supported_parents[$this->flags['parent']];</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="189"></a><a href="#189">189</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="190"></a><a href="#190">190</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="191"></a><a href="#191">191</a></div></td><td class="codeLine"> /* [3] Gestion du sous-parent optionnel</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="192"></a><a href="#192">192</a></div></td><td class="codeLine"> ==========================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 193" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="193"></a><a href="#193">193</a></div></td><td class="codeLine"> $opt_subParent = (isset($this->flags['subparent'])) ? $this->flags['subparent'].'/' : '';</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="194"></a><a href="#194">194</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="195"></a><a href="#195">195</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="196"></a><a href="#196">196</a></div></td><td class="codeLine"> /* [4] On definit le header</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="197"></a><a href="#197">197</a></div></td><td class="codeLine"> ==========================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 198" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="198"></a><a href="#198">198</a></div></td><td class="codeLine"> $this->header = $header;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="199"></a><a href="#199">199</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="200"></a><a href="#200">200</a></div></td><td class="codeLine"> /* [5] On construit le chemin</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="201"></a><a href="#201">201</a></div></td><td class="codeLine"> ==========================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 202" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="202"></a><a href="#202">202</a></div></td><td class="codeLine"> $this->path = __ROOT__.$parent.'/'.$opt_subParent.$this->flags['filename'].'.'.$this->flags['extension'];</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="203"></a><a href="#203">203</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="204"></a><a href="#204">204</a></div></td><td class="codeLine"> /* [6] On retourne si le fichier existe ou non</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="205"></a><a href="#205">205</a></div></td><td class="codeLine"> ==========================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 206" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="206"></a><a href="#206">206</a></div></td><td class="codeLine"> return @file_get_contents( $this->path ) != false;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="207"></a><a href="#207">207</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="208"></a><a href="#208">208</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="209"></a><a href="#209">209</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="210"></a><a href="#210">210</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="211"></a><a href="#211">211</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="212"></a><a href="#212">212</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="213"></a><a href="#213">213</a></div></td><td class="codeLine"> /* FUNCTION QUI AFFICHE LA RESSOURCE EN QUESTION</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="214"></a><a href="#214">214</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="215"></a><a href="#215">215</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="216"></a><a href="#216">216</a></div></td><td class="codeLine"> public function view(){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="217"></a><a href="#217">217</a></div></td><td class="codeLine"> // S'il y a eu une erreur en amont</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="218"></a><a href="#218">218</a></div></td><td class="codeLine"> if( $this->error != ManagerError::Success )</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="219"></a><a href="#219">219</a></div></td><td class="codeLine"> return false; // on retourne faux</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="220"></a><a href="#220">220</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="221"></a><a href="#221">221</a></div></td><td class="codeLine"> // On definit le header</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="222"></a><a href="#222">222</a></div></td><td class="codeLine"> header('Content-Type: '.$this->header);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="223"></a><a href="#223">223</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="224"></a><a href="#224">224</a></div></td><td class="codeLine"> // On inclut le contenu</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="225"></a><a href="#225">225</a></div></td><td class="codeLine"> echo file_get_contents($this->path);</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="226"></a><a href="#226">226</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="227"></a><a href="#227">227</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="228"></a><a href="#228">228</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="229"></a><a href="#229">229</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="230"></a><a href="#230">230</a></div></td><td class="codeLine"> /* FUNCTION QUI RETOURNE LE CONTENU DE LA RESSOURCE EN QUESTION</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="231"></a><a href="#231">231</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="232"></a><a href="#232">232</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="233"></a><a href="#233">233</a></div></td><td class="codeLine"> public function getContent(){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="234"></a><a href="#234">234</a></div></td><td class="codeLine"> // S'il y a eu une erreur en amont</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 235" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="235"></a><a href="#235">235</a></div></td><td class="codeLine"> if( $this->error != ManagerError::Success )</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 236" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="236"></a><a href="#236">236</a></div></td><td class="codeLine"> return false; // on retourne faux</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="237"></a><a href="#237">237</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="238"></a><a href="#238">238</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="239"></a><a href="#239">239</a></div></td><td class="codeLine"> // On inclut le contenu</td></tr>
|
||||||
|
<tr class="success popin" data-title="4 tests cover line 240" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="240"></a><a href="#240">240</a></div></td><td class="codeLine"> return file_get_contents($this->path);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="241"></a><a href="#241">241</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="242"></a><a href="#242">242</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="243"></a><a href="#243">243</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="244"></a><a href="#244">244</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="245"></a><a href="#245">245</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="246"></a><a href="#246">246</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<footer>
|
||||||
|
<h4>Legend</h4>
|
||||||
|
<p>
|
||||||
|
<span class="success"><strong>Executed</strong></span>
|
||||||
|
<span class="danger"><strong>Not Executed</strong></span>
|
||||||
|
<span class="warning"><strong>Dead Code</strong></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.13</a> using <a href="http://www.php.net/" target="_top">PHP 5.5.9-1ubuntu4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.28</a> at Sun Feb 14 13:13:13 CET 2016.</small>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">$('.popin').popover({trigger: 'hover'});</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,210 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Code Coverage for /var/www/stefproject/manager/autoloader.php</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="index.html">/var/www/stefproject/manager</a> <span class="divider">/</span></li>
|
||||||
|
<li class="active">autoloader.php</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="10"><div align="center"><strong>Code Coverage</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Classes and Traits</strong></div></td>
|
||||||
|
<td colspan="4"><div align="center"><strong>Functions and Methods</strong></div></td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Lines</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="None">Total</td>
|
||||||
|
<td class="None big"> </td>
|
||||||
|
<td class="None small"><div align="right"></div></td>
|
||||||
|
<td class="None small"><div align="right"> </div></td>
|
||||||
|
<td class="None big"> </td>
|
||||||
|
<td class="None small"><div align="right"></div></td>
|
||||||
|
<td class="None small"><div align="right"> </div></td>
|
||||||
|
<td class="None small"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 37.50%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">37.50%</div></td>
|
||||||
|
<td class="warning small"><div align="right">6 / 16</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger" colspan="4"><a href="#15">debug()</a></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="danger small">0</td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 4</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="danger" colspan="4"><a href="#31">autoload($classes)</a></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
<td class="danger small">0</td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 6</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"><a href="#52">autoloader($className)</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">0</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">6 / 6</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="table table-borderless table-condensed">
|
||||||
|
<tbody>
|
||||||
|
<tr><td><div align="right"><a name="1"></a><a href="#1">1</a></div></td><td class="codeLine"><?php</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="2"></a><a href="#2">2</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="3"></a><a href="#3">3</a></div></td><td class="codeLine"> // On definit la racine __ROOT__ si c'est pas deja fait</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="4"></a><a href="#4">4</a></div></td><td class="codeLine"> if( !defined('__ROOT__') ) define('__ROOT__', dirname(dirname(__FILE__)) );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="5"></a><a href="#5">5</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="6"></a><a href="#6">6</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="7"></a><a href="#7">7</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="8"></a><a href="#8">8</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="11"></a><a href="#11">11</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="12"></a><a href="#12">12</a></div></td><td class="codeLine"> /* ACTIVE LE DEBUGGAGE (WARNING + EXCEPTION)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="13"></a><a href="#13">13</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="14"></a><a href="#14">14</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="15"></a><a href="#15">15</a></div></td><td class="codeLine"> function debug(){</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="16"></a><a href="#16">16</a></div></td><td class="codeLine"> ini_set('display_errors',1);</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="17"></a><a href="#17">17</a></div></td><td class="codeLine"> ini_set('display_startup_errors',1);</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="18"></a><a href="#18">18</a></div></td><td class="codeLine"> error_reporting(-1);</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="19"></a><a href="#19">19</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="20"></a><a href="#20">20</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="21"></a><a href="#21">21</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="22"></a><a href="#22">22</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="23"></a><a href="#23">23</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="24"></a><a href="#24">24</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="25"></a><a href="#25">25</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="26"></a><a href="#26">26</a></div></td><td class="codeLine"> /* APPEL DYNAMIQUE DES CLASSES PASSEES EN PARAMETRE</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="27"></a><a href="#27">27</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"> * @classes<Array> Tableau contenant le nom des classes</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"> function autoload($classes){</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"> foreach($classes as $class){</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"> $name_only = substr(strrchr($class, '\\'), 1);</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> var_dump('use '.$class.' as '.$name_only.';');</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"> eval('use '.$class.' as '.$name_only.';');</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr class="danger"><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> /* AUTOLOADER</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"> * @className<String> Nom de la classe appelee</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> function autoloader($className){</td></tr>
|
||||||
|
<tr class="success popin" data-title="12 tests cover line 53" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> $path = '';</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"> /* [1] On utilise le namespace pour localiser</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"> ===============================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"> // On remplace les '\' par des '/'</td></tr>
|
||||||
|
<tr class="success popin" data-title="12 tests cover line 58" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"> $path = str_replace('\\', '/', $className) . '.php';</td></tr>
|
||||||
|
<tr class="success popin" data-title="12 tests cover line 59" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"> $path = __ROOT__.'/'.$path;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> // Si le fichier existe</td></tr>
|
||||||
|
<tr class="success popin" data-title="12 tests cover line 62" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"> if( file_exists($path) )</td></tr>
|
||||||
|
<tr class="success popin" data-title="12 tests cover line 63" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"> require_once $path; // on inclue le fichier</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="12 tests cover line 65" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> // On definit l'autoloader comme autoloader (obvious)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> spl_autoload_register('autoloader', false, true);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> /* On demarre la session securisee PHP</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"> =========================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> \manager\sessionManager::session_start();</td></tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<footer>
|
||||||
|
<h4>Legend</h4>
|
||||||
|
<p>
|
||||||
|
<span class="success"><strong>Executed</strong></span>
|
||||||
|
<span class="danger"><strong>Not Executed</strong></span>
|
||||||
|
<span class="warning"><strong>Dead Code</strong></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.13</a> using <a href="http://www.php.net/" target="_top">PHP 5.5.9-1ubuntu4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.28</a> at Sun Feb 14 13:13:13 CET 2016.</small>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">$('.popin').popover({trigger: 'hover'});</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,86 @@
|
||||||
|
body {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popover {
|
||||||
|
width: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table td {
|
||||||
|
padding-top: 3px;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-condensed td {
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table .progress {
|
||||||
|
margin-bottom: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-borderless th, .table-borderless td {
|
||||||
|
border: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table tbody td.success, li.success, span.success {
|
||||||
|
background-color: #dff0d8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table tbody tr.danger, .table tbody td.danger, li.danger, span.danger {
|
||||||
|
background-color: #f2dede;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table tbody td.warning, li.warning, span.warning {
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table tbody td.info {
|
||||||
|
background-color: #d9edf7;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.big {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.small {
|
||||||
|
}
|
||||||
|
|
||||||
|
td.codeLine {
|
||||||
|
font-family: monospace;
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
td span.comment {
|
||||||
|
color: #888a85;
|
||||||
|
}
|
||||||
|
|
||||||
|
td span.default {
|
||||||
|
color: #2e3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
td span.html {
|
||||||
|
color: #888a85;
|
||||||
|
}
|
||||||
|
|
||||||
|
td span.keyword {
|
||||||
|
color: #2e3436;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre span.string {
|
||||||
|
color: #2e3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.success, span.warning, span.danger {
|
||||||
|
margin-right: 2px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#classCoverageDistribution, #classComplexity {
|
||||||
|
height: 200px;
|
||||||
|
width: 475px;
|
||||||
|
}
|
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,130 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Dashboard for /var/www/stefproject/manager</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="index.html">/var/www/stefproject/manager</a></li>
|
||||||
|
<li class="active">(Dashboard)</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span6">
|
||||||
|
<h2>Class Coverage Distribution</h2>
|
||||||
|
<div id="classCoverageDistribution"></div>
|
||||||
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
<h2>Class Complexity</h2>
|
||||||
|
<div id="classComplexity"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="span6">
|
||||||
|
<h2>Top Project Risks</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="Database.php.html#6">DataBase</a> (54)</li>
|
||||||
|
<li><a href="ResourceDispatcher.php.html#6">ResourceDispatcher</a> (32)</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
<h2>Least Tested Methods</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="ResourceDispatcher.php.html#216">ResourceDispatcher::view</a> (0%)</li>
|
||||||
|
<li><a href="ResourceDispatcher.php.html#30">ResourceDispatcher::__construct</a> (60%)</li>
|
||||||
|
<li><a href="Database.php.html#47">DataBase::getInstance</a> (85%)</li>
|
||||||
|
<li><a href="Database.php.html#27">DataBase::__construct</a> (88%)</li>
|
||||||
|
<li><a href="Database.php.html#185">DataBase::check</a> (95%)</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
<p>
|
||||||
|
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.13</a> using <a href="http://www.php.net/" target="_top">PHP 5.5.9-1ubuntu4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.28</a> at Sun Feb 14 13:13:13 CET 2016.</small>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
|
<!-- <script src="js/highcharts.js" type="text/javascript"></script> -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
var classCoverageDistribution = new Highcharts.Chart({
|
||||||
|
chart: {
|
||||||
|
renderTo: 'classCoverageDistribution',
|
||||||
|
type: 'column'
|
||||||
|
},
|
||||||
|
title: {text: ''},
|
||||||
|
legend: {enabled: false},
|
||||||
|
credits: {enabled: false},
|
||||||
|
tooltip: {enabled: false},
|
||||||
|
xAxis: {
|
||||||
|
labels: {style: {fontSize: '8px'}},
|
||||||
|
categories: [
|
||||||
|
'0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
|
||||||
|
],
|
||||||
|
min: 0
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
title: '',
|
||||||
|
labels: {style: {fontSize: '8px'}},
|
||||||
|
min: 0
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [0,0,0,0,0,0,0,0,1,0,1,2]
|
||||||
|
}],
|
||||||
|
});
|
||||||
|
|
||||||
|
var classComplexity = new Highcharts.Chart({
|
||||||
|
chart: {
|
||||||
|
renderTo: 'classComplexity',
|
||||||
|
type: 'scatter'
|
||||||
|
},
|
||||||
|
title: {text: ''},
|
||||||
|
legend: {enabled: false},
|
||||||
|
credits: {enabled: false},
|
||||||
|
xAxis: {
|
||||||
|
title: {text: 'Code Coverage (in percent)'},
|
||||||
|
labels: {enabled: true},
|
||||||
|
min: 0
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
title: {text: 'Cyclomatic Complexity'},
|
||||||
|
labels: {enabled: true},
|
||||||
|
min: 0
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
formatter: function() {
|
||||||
|
return this.point.config[2];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [[95.454545454545,54,"<a href=\"Database.php.html#6\">DataBase<\/a>"],[100,16,"<a href=\"ManagerError.php.html#7\">ManagerError<\/a>"],[75.925925925926,24,"<a href=\"ResourceDispatcher.php.html#6\">ResourceDispatcher<\/a>"],[100,11,"<a href=\"sessionManager.php.html#6\">sessionManager<\/a>"]],
|
||||||
|
marker: {
|
||||||
|
symbol: 'diamond'
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,187 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Code Coverage for /var/www/stefproject/manager</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="active">/var/www/stefproject/manager</li>
|
||||||
|
<li>(<a href="index.dashboard.html">Dashboard</a>)</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="9"><div align="center"><strong>Code Coverage</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Lines</strong></div></td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Functions and Methods</strong></div></td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Classes and Traits</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="success">Total</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 85.71%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">85.71%</div></td>
|
||||||
|
<td class="success small"><div align="right">156 / 182</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 70.59%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">70.59%</div></td>
|
||||||
|
<td class="success small"><div align="right">12 / 17</div></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 50.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">50.00%</div></td>
|
||||||
|
<td class="warning small"><div align="right">2 / 4</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success"><i class="icon-file"></i> <a href="Database.php.html">Database.php</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 95.45%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">95.45%</div></td>
|
||||||
|
<td class="success small"><div align="right">63 / 66</div></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 50.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">50.00%</div></td>
|
||||||
|
<td class="warning small"><div align="right">3 / 6</div></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success"><i class="icon-file"></i> <a href="ManagerError.php.html">ManagerError.php</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">16 / 16</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success"><i class="icon-file"></i> <a href="ResourceDispatcher.php.html">ResourceDispatcher.php</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 75.93%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">75.93%</div></td>
|
||||||
|
<td class="success small"><div align="right">41 / 54</div></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 66.67%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">66.67%</div></td>
|
||||||
|
<td class="warning small"><div align="right">4 / 6</div></td>
|
||||||
|
<td class="danger big"> <div class="progress progress-danger" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 0.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="danger small"><div align="right">0.00%</div></td>
|
||||||
|
<td class="danger small"><div align="right">0 / 1</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="warning"><i class="icon-file"></i> <a href="autoloader.php.html">autoloader.php</a></td>
|
||||||
|
<td class="warning big"> <div class="progress progress-warning" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 37.50%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="warning small"><div align="right">37.50%</div></td>
|
||||||
|
<td class="warning small"><div align="right">6 / 16</div></td>
|
||||||
|
<td class="None big"> </td>
|
||||||
|
<td class="None small"><div align="right"></div></td>
|
||||||
|
<td class="None small"><div align="right"> </div></td>
|
||||||
|
<td class="None big"> </td>
|
||||||
|
<td class="None small"><div align="right"></div></td>
|
||||||
|
<td class="None small"><div align="right"> </div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success"><i class="icon-file"></i> <a href="sessionManager.php.html">sessionManager.php</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">30 / 30</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">4 / 4</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<footer>
|
||||||
|
<h4>Legend</h4>
|
||||||
|
<p>
|
||||||
|
<span class="danger"><strong>Low</strong>: 0% to 35%</span>
|
||||||
|
<span class="warning"><strong>Medium</strong>: 35% to 70%</span>
|
||||||
|
<span class="success"><strong>High</strong>: 70% to 100%</span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.13</a> using <a href="http://www.php.net/" target="_top">PHP 5.5.9-1ubuntu4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.28</a> at Sun Feb 14 13:13:13 CET 2016.</small>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||||
|
*/
|
||||||
|
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||||
|
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
|
||||||
|
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
|
||||||
|
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
|
||||||
|
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
|
@ -0,0 +1,295 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Code Coverage for /var/www/stefproject/manager/sessionManager.php</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="index.html">/var/www/stefproject/manager</a> <span class="divider">/</span></li>
|
||||||
|
<li class="active">sessionManager.php</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="10"><div align="center"><strong>Code Coverage</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Classes and Traits</strong></div></td>
|
||||||
|
<td colspan="4"><div align="center"><strong>Functions and Methods</strong></div></td>
|
||||||
|
<td colspan="3"><div align="center"><strong>Lines</strong></div></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="success">Total</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">4 / 4</div></td>
|
||||||
|
<td class="success small"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">30 / 30</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success">sessionManager</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">4 / 4</div></td>
|
||||||
|
<td class="success small">11</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">30 / 30</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#14">secure_sha1($data)</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">1</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#22">reset_session($session_id=null)</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">2</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">8 / 8</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#46">update_token()</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">1</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">5 / 5</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="success" colspan="4"> <a href="#60">session_start()</a></td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">1 / 1</div></td>
|
||||||
|
<td class="success small">7</td>
|
||||||
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="success small"><div align="right">100.00%</div></td>
|
||||||
|
<td class="success small"><div align="right">16 / 16</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="table table-borderless table-condensed">
|
||||||
|
<tbody>
|
||||||
|
<tr><td><div align="right"><a name="1"></a><a href="#1">1</a></div></td><td class="codeLine"><?php</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="2"></a><a href="#2">2</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="3"></a><a href="#3">3</a></div></td><td class="codeLine"> namespace manager;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="4"></a><a href="#4">4</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="5"></a><a href="#5">5</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="6"></a><a href="#6">6</a></div></td><td class="codeLine"> class sessionManager{</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="7"></a><a href="#7">7</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="8"></a><a href="#8">8</a></div></td><td class="codeLine"> private static $prefix;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="11"></a><a href="#11">11</a></div></td><td class="codeLine"> /*************************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="12"></a><a href="#12">12</a></div></td><td class="codeLine"> /* SECURE SHA1 ALGORITHM */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="13"></a><a href="#13">13</a></div></td><td class="codeLine"> /*************************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="14"></a><a href="#14">14</a></div></td><td class="codeLine"> public static function secure_sha1($data){</td></tr>
|
||||||
|
<tr class="success popin" data-title="14 tests cover line 15" data-content="<ul><li class="success">phpunit\Database_check::testPasswordSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordSizeSupIncorrect</li><li class="success">phpunit\sessionManager::testSecureSHA1</li><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="15"></a><a href="#15">15</a></div></td><td class="codeLine"> return sha1( '">\[..|{@#))'.sha1($data.'_)Q@#((%*_$%(@#') );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="16"></a><a href="#16">16</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="17"></a><a href="#17">17</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="18"></a><a href="#18">18</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="19"></a><a href="#19">19</a></div></td><td class="codeLine"> /*****************************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="20"></a><a href="#20">20</a></div></td><td class="codeLine"> /* INITIALISATION DE SESSION */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="21"></a><a href="#21">21</a></div></td><td class="codeLine"> /*****************************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="22"></a><a href="#22">22</a></div></td><td class="codeLine"> private static function reset_session($session_id=null){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="23"></a><a href="#23">23</a></div></td><td class="codeLine"> // On ferme la session</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 24" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="24"></a><a href="#24">24</a></div></td><td class="codeLine"> session_destroy();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="25"></a><a href="#25">25</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="26"></a><a href="#26">26</a></div></td><td class="codeLine"> // On definit l'id session si donne en argument</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 27" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="27"></a><a href="#27">27</a></div></td><td class="codeLine"> if( $session_id != null )</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 28" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"> session_id( $session_id );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"> // Precaution: on met a jour le cookie</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 31" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"> setcookie('PHPSESSID', session_id(), time()+60*30 );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"> // On redemarre la session avec le bon id session</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 34" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> \session_start();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> // On met a jour le token</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 37" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"> self::update_token();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 40" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"> header('Refresh: 0');</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 41" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> /*******************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"> /* GENERE UN TOKEN */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"> /*******************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"> private static function update_token(){</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 47" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> $token = self::$prefix.self::secure_sha1(uniqid());</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"> // On definit le token en session</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 50" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> $_SESSION['session_token'] = $token;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> // On definit le token en cookie</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 53" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> $_COOKIE['session_token'] = $_SESSION['session_token'];</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 54" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"> setcookie('session_token', $_COOKIE['session_token'], time()+60*30 );</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 55" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"> /************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"> /* AMORCEUR */</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"> /************/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"> public static function session_start(){</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> /* [1] Génération et Gestion des donnees a utiliser</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"> ==============================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"> // On genere le hash a partir des donnees personnelles</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 64" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"> self::$prefix = self::secure_sha1( $_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT'] );</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"> // On cree un id session associe a ces donnees personnelles</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 67" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> $sessid = substr(self::$prefix,0,5) . substr(self::secure_sha1(uniqid()),0,24);</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"> // On genere un token pour l'execution suivante</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 70" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"> $token = self::$prefix.self::secure_sha1(uniqid());</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> // On definit/recupere le token</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 73" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> $session_token = (isset($_COOKIE['session_token'])) ? $_COOKIE['session_token'] : null;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> /* [2] Verification de l'id session</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"> ==============================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 79" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="79"></a><a href="#79">79</a></div></td><td class="codeLine"> \session_start();</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="80"></a><a href="#80">80</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="81"></a><a href="#81">81</a></div></td><td class="codeLine"> // On verifie l'id session (5 premiers chars du hash des donnees perso)</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 82" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="82"></a><a href="#82">82</a></div></td><td class="codeLine"> $valid_sessid = strpos( session_id(), substr(self::$prefix,0,5) ) === 0;</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="83"></a><a href="#83">83</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="84"></a><a href="#84">84</a></div></td><td class="codeLine"> // Si id session incorrect ou pas de token</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 85" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="85"></a><a href="#85">85</a></div></td><td class="codeLine"> if( !$valid_sessid )</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 86" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="86"></a><a href="#86">86</a></div></td><td class="codeLine"> self::reset_session( $sessid ); // On initialise la session (bon id session)</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="87"></a><a href="#87">87</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="88"></a><a href="#88">88</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="89"></a><a href="#89">89</a></div></td><td class="codeLine"> // si id session invalide</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="90"></a><a href="#90">90</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="91"></a><a href="#91">91</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="92"></a><a href="#92">92</a></div></td><td class="codeLine"> /* [3] Verification du token</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="93"></a><a href="#93">93</a></div></td><td class="codeLine"> ==============================================================*/</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="94"></a><a href="#94">94</a></div></td><td class="codeLine"> // On verifie que le token est valide</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 95" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="95"></a><a href="#95">95</a></div></td><td class="codeLine"> $valid_token = $session_token != null; // verification de l'existence du cookie</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 96" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="96"></a><a href="#96">96</a></div></td><td class="codeLine"> $valid_token = $valid_token && strpos($session_token, self::$prefix) === 0; // verification des donnes personnelles</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 97" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="97"></a><a href="#97">97</a></div></td><td class="codeLine"> $valid_token = $valid_token && isset($_SESSION['session_token']); // verification que la variable session associee existe</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 98" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="98"></a><a href="#98">98</a></div></td><td class="codeLine"> $valid_token = $valid_token && $_SESSION['session_token'] == $_COOKIE['session_token']; // verification que la session est coherente</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="99"></a><a href="#99">99</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="100"></a><a href="#100">100</a></div></td><td class="codeLine"> /* [4] Si token inexistant</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="101"></a><a href="#101">101</a></div></td><td class="codeLine"> ==============================================================*/</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 102" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="102"></a><a href="#102">102</a></div></td><td class="codeLine"> if( !$valid_token )</td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 103" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="103"></a><a href="#103">103</a></div></td><td class="codeLine"> self::reset_session($sessid); // On initialise la session</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="104"></a><a href="#104">104</a></div></td><td class="codeLine"> else</td></tr>
|
||||||
|
<tr class="success popin" data-title="5 tests cover line 105" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="105"></a><a href="#105">105</a></div></td><td class="codeLine"> self::update_token(); // Dans tous les cas, on cree un nouveau token</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="106"></a><a href="#106">106</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="107"></a><a href="#107">107</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr class="success popin" data-title="11 tests cover line 108" data-content="<ul><li class="success">phpunit\sessionManager::testIdSessionUniq</li><li class="success">phpunit\sessionManager::testIdenticalPrefix</li><li class="success">phpunit\sessionManager::testCookieUniq</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIp</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongIpThenWell</li><li class="success">phpunit\sessionManager::testSessionIdTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgent</li><li class="success">phpunit\sessionManager::testSessionTokenTheftWithWrongUserAgentThenWell</li><li class="success">phpunit\sessionManager::testRegeneratedToken</li><li class="success">phpunit\sessionManager::testSamePrefixToken</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="108"></a><a href="#108">108</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="109"></a><a href="#109">109</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="110"></a><a href="#110">110</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="111"></a><a href="#111">111</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
<tr><td><div align="right"><a name="112"></a><a href="#112">112</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="113"></a><a href="#113">113</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
<tr><td><div align="right"><a name="114"></a><a href="#114">114</a></div></td><td class="codeLine">?></td></tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<footer>
|
||||||
|
<h4>Legend</h4>
|
||||||
|
<p>
|
||||||
|
<span class="success"><strong>Executed</strong></span>
|
||||||
|
<span class="danger"><strong>Not Executed</strong></span>
|
||||||
|
<span class="warning"><strong>Dead Code</strong></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.13</a> using <a href="http://www.php.net/" target="_top">PHP 5.5.9-1ubuntu4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.28</a> at Sun Feb 14 13:13:13 CET 2016.</small>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">$('.popin').popover({trigger: 'hover'});</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<phpunit bootstrap="./bootstrap.php">
|
||||||
|
|
||||||
|
<testsuites>
|
||||||
|
|
||||||
|
<testsuite name="manager/Database">
|
||||||
|
<directory prefix="Database_" suffix=".php">./tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
|
||||||
|
<testsuite name="manager/ManagerError">
|
||||||
|
<file>./tests/ManagerError.php</file>
|
||||||
|
</testsuite>
|
||||||
|
|
||||||
|
<testsuite name="manager/sessionManager">
|
||||||
|
<file>./tests/sessionManager.php</file>
|
||||||
|
</testsuite>
|
||||||
|
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
|
||||||
|
<logging>
|
||||||
|
<log type="coverage-html" target="coverage"/>
|
||||||
|
</logging>
|
||||||
|
|
||||||
|
</phpunit>
|
|
@ -0,0 +1,267 @@
|
||||||
|
<?php namespace phpunit;
|
||||||
|
|
||||||
|
class Database_check extends \PHPUnit_Framework_TestCase{
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] AUTO_INCREMENT
|
||||||
|
=========================================================*/
|
||||||
|
public function testAutoIncrementSizeInfCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('auto_increment_id', -2147483647) );
|
||||||
|
}
|
||||||
|
public function testAutoIncrementSizeInfStringCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('auto_increment_id', '-2147483647') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testAutoIncrementSizeSupCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('auto_increment_id', 2147483647) );
|
||||||
|
}
|
||||||
|
public function testAutoIncrementSizeSupStringCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('auto_increment_id', '2147483647') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function testAutoIncrementSizeLtInfIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('auto_increment_id', -2147483647-1) );
|
||||||
|
}
|
||||||
|
public function testAutoIncrementSizeLtInfStringIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('auto_increment_id', '-2147483648') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function testAutoIncrementSizeGtSupIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('auto_increment_id', 2147483647+1) );
|
||||||
|
}
|
||||||
|
public function testAutoIncrementSizeGtSupStringIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('auto_increment_id', '2147483648') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] Code RFID
|
||||||
|
=========================================================*/
|
||||||
|
public function testUserCodeSize4(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.code', '01-23-AB-CD') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUserCodeSize6(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.code', '01-23-45-67-89-AB') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUserCodeSize4WrongCharacter(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.code', '01-23-AB-CG') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUserCodeSizeGreaterThan6(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.code', '01-23-45-67-89-AB-CD') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUserCodeSize6WrongCharacter(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.code', '01-23-45-67-89-AG') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] user.username ; machine.name ; group.name
|
||||||
|
=========================================================*/
|
||||||
|
/* (1) Type */
|
||||||
|
public function testUsernameTypeStringCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.username', '012') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUsernameTypeIntIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.username', 012) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (2) Content */
|
||||||
|
public function testUsernameContentCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.username', '0123456789_-') );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.username', 'abcdefghijklmnopqrstuvwxyz') );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.username', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUsernameContentIncorrect(){
|
||||||
|
$illegal_chars = '{}[]()=+.,\'\\"/:;|!@#$%^&* ';
|
||||||
|
|
||||||
|
foreach(str_split($illegal_chars) as $char) // Teste les caracteres enonces plus haut
|
||||||
|
$this->assertFalse( \manager\Database::check('user.username', 'abc'.$char) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (3) Size */
|
||||||
|
public function testUsernameSize3Correct(){
|
||||||
|
$this->assertEquals( 3, strlen('012') );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.username', '012') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUsernameSize30Correct(){
|
||||||
|
$this->assertEquals( 30, strlen('0123456789abcdefghijklmno_-sda') );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.username', '0123456789abcdefghijklmno_-sda') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUsernameSizeLt3Incorrect(){
|
||||||
|
$this->assertLessThan( 3, strlen('') );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.username', '') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUsernameSizeGt30Incorrect(){
|
||||||
|
$this->assertGreaterThan( 30, strlen('0123456789abcdefghijklmno_-sdaa') );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.username', '0123456789abcdefghijklmno_-sdaa') );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [3] firstname / lastname
|
||||||
|
=========================================================*/
|
||||||
|
/* (1) Type */
|
||||||
|
public function testFirstnameTypeStringCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.firstname', 'abc') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testFirstnameTypeIntIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.firstname', 01932) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (2) Content */
|
||||||
|
public function testFirstnameContentCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.firstname', 'abcdefghijklmnopqrstuvwxyz') );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.firstname', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testFirstnameContentIncorrect(){
|
||||||
|
$illegal_chars = '{}[]()=_+.,\'\\"/:;|!@#$%^&*0123456789';
|
||||||
|
|
||||||
|
foreach(str_split($illegal_chars) as $char) // Teste les caracteres enonces plus haut
|
||||||
|
$this->assertFalse( \manager\Database::check('user.firstname', 'abc'.$char) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (3) Size */
|
||||||
|
public function testFirstnameSize3Correct(){
|
||||||
|
$this->assertEquals( 3, strlen('abc') );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.firstname', 'abc') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testFirstnameSize30Correct(){
|
||||||
|
$this->assertEquals( 30, strlen('abcdefghijklmnopqrstuvwxyz-k s') );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.firstname', 'abcdefghijklmnopqrstuvwxyz-k s') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testFirstnameSizeLt3Incorrect(){
|
||||||
|
$this->assertLessThan( 3, strlen('ab') );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.firstname', 'ab') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testFirstnameSizeGt30Incorrect(){
|
||||||
|
$this->assertGreaterThan( 30, strlen('abcdefghijklmnopqrstuvwxyz-k ss') );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.firstname', 'abcdefghijklmnopqrstuvwxyz-k ss') );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [4] Adresse mail
|
||||||
|
=========================================================*/
|
||||||
|
/* (1) Size */
|
||||||
|
public function testMailSizeEqCorrect(){
|
||||||
|
$this->assertLessThanOrEqual( 50, 'nom-prenom.mot@domaine-d.gouv' );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.mail', 'nom-prenom.mot@domaine-d.gouv') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testMailSizeSupCorrect(){
|
||||||
|
$this->assertGreaterThan( 50, strlen('ab12345678901234567890nom-prenom.mot@domaine-d.gouv') );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.mail', 'ab12345678901234567890nom-prenom.mot@domaine-d.gouv') );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (2) Content */
|
||||||
|
public function testMailContentCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.mail', '0nom-prenom.mot@domaine-d.gouv') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testMailContentIncorrect1(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.mail', '0nom-prenom.mot@domaine-d.gouve') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testMailContentIncorrect2(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.mail', '0nom-prenom.mot@domaine-d.g') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] Mot de passe
|
||||||
|
=========================================================*/
|
||||||
|
public function testPasswordSizeEqCorrect(){
|
||||||
|
$password_hash = \manager\sessionManager::secure_sha1('monmotdepasse');
|
||||||
|
|
||||||
|
$this->assertEquals( 40, strlen($password_hash) );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.password', $password_hash) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testPasswordSizeInfIncorrect(){
|
||||||
|
$password_hash = 'a';
|
||||||
|
|
||||||
|
$this->assertLessThan( 40, strlen($password_hash) );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.password', $password_hash) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testPasswordSizeSupIncorrect(){
|
||||||
|
$password_hash = \manager\sessionManager::secure_sha1('monmotdepasse').'a';
|
||||||
|
|
||||||
|
$this->assertGreaterThan( 40, strlen($password_hash) );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.password', $password_hash) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testPasswordContentCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.password', 'dd629d39c4576731a2bef003c72ff89d6fc2a99a') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testPasswordContentIncorrect(){
|
||||||
|
$this->assertContains( 'g', 'dd629d39c4576731a2bef003c72ff89d6fc2a9g' );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.password', 'dd629d39c4576731a2bef003c72ff89d6fc2a9g') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [6] Status de l'utilisateur
|
||||||
|
=========================================================*/
|
||||||
|
/* (1) Type */
|
||||||
|
public function testStatusTypeIntCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.status', 1) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testStatusTypeStringCorrect(){
|
||||||
|
$this->assertTrue( \manager\Database::check('user.status', '1') );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testStatusTypeIntIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.status', 1.03) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testStatusTypeStringIncorrect(){
|
||||||
|
$this->assertFalse( \manager\Database::check('user.status', '1.03') );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (2) Size */
|
||||||
|
public function testStatusSizeInfCorrect(){
|
||||||
|
$this->assertGreaterThanOrEqual( 0, 0 );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.status', 0) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testStatusSizeSupCorrect(){
|
||||||
|
$this->assertLessThanOrEqual( 100, 100 );
|
||||||
|
$this->assertTrue( \manager\Database::check('user.status', 100) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testStatusSizeInfIncorrect(){
|
||||||
|
$this->assertLessThan( 0, -1 );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.status', -1) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testStatusSizeSupIncorrect(){
|
||||||
|
$this->assertGreaterThan( 100, 101 );
|
||||||
|
$this->assertFalse( \manager\Database::check('user.status', 101) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php namespace phpunit;
|
||||||
|
|
||||||
|
class Database_construct extends \PHPUnit_Framework_TestCase{
|
||||||
|
|
||||||
|
/* [1] Verification du chargement de la config
|
||||||
|
=========================================================*/
|
||||||
|
public function testGetInstanceWithNoSERVER(){
|
||||||
|
$instance = \manager\Database::getInstance();
|
||||||
|
|
||||||
|
$this->assertEquals( 'localhost', $instance->getConfig()['host'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testGetInstanceWithSERVERLocal(){
|
||||||
|
// Pour regenerer une instance, on definit une erreur
|
||||||
|
\manager\Database::$error = \manager\ManagerError::PDOConnection;
|
||||||
|
|
||||||
|
|
||||||
|
$instance = \manager\Database::getInstance();
|
||||||
|
|
||||||
|
$this->assertEquals( 'localhost', $instance->getConfig()['host'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Verification du singleton (getInstance)
|
||||||
|
=========================================================*/
|
||||||
|
public function testInstancePersistence(){
|
||||||
|
\manager\Database::$error = \manager\ManagerError::PDOConnection;
|
||||||
|
|
||||||
|
$instance_construct = \manager\Database::getInstance();
|
||||||
|
$instance_nextuse = \manager\Database::getInstance();
|
||||||
|
|
||||||
|
$this->assertSame( $instance_construct, $instance_nextuse );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testInstancePersistenceRefutation(){
|
||||||
|
\manager\Database::$error = \manager\ManagerError::PDOConnection;
|
||||||
|
$instance_construct = \manager\Database::getInstance();
|
||||||
|
|
||||||
|
\manager\Database::$error = \manager\ManagerError::PDOConnection;
|
||||||
|
$instance_nextuse = \manager\Database::getInstance();
|
||||||
|
|
||||||
|
$this->assertNotSame( $instance_construct, $instance_nextuse );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Verification de l'objet PDO
|
||||||
|
=========================================================*/
|
||||||
|
public function testPDO(){
|
||||||
|
$pdo = \manager\Database::getPDO();
|
||||||
|
|
||||||
|
$this->assertGreaterThan( 10, count($pdo->query('SELECT * FROM user')->fetchAll()), '[!] Moins de 10 utilisateurs trouves.');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,116 @@
|
||||||
|
<?php namespace phpunit;
|
||||||
|
|
||||||
|
class Database_delNumeric extends \PHPUnit_Framework_TestCase{
|
||||||
|
|
||||||
|
/* [0] Verification du type
|
||||||
|
=========================================================*/
|
||||||
|
public function testTypeInt(){
|
||||||
|
$this->assertEquals( array(), \manager\Database::delNumeric(10) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testTypeString(){
|
||||||
|
$this->assertEquals( array(), \manager\Database::delNumeric('notarray') );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [1] Verification pour 2 dimensions
|
||||||
|
=========================================================*/
|
||||||
|
/* (1) Global */
|
||||||
|
public function testGlobal2Dim(){
|
||||||
|
$fetchData = array(array(
|
||||||
|
'id' => '000001',
|
||||||
|
0 => '000001',
|
||||||
|
'nom' => 'Jean Dupont',
|
||||||
|
1 => 'Jean Dupont',
|
||||||
|
));
|
||||||
|
|
||||||
|
$computed_array = \manager\Database::delNumeric( $fetchData );
|
||||||
|
|
||||||
|
$this->assertArrayHasKey( 'id', $computed_array[0] );
|
||||||
|
$this->assertArrayHasKey( 'nom', $computed_array[0] );
|
||||||
|
$this->assertArrayNotHasKey( 0, $computed_array[0] );
|
||||||
|
$this->assertArrayNotHasKey( 1, $computed_array[0] );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (2) Verification d'indices numeriques dans les donnees */
|
||||||
|
public function testGlobal2DimWithNumericIndexes(){
|
||||||
|
$fetchData = array(array(
|
||||||
|
'id' => '000001',
|
||||||
|
0 => '000001',
|
||||||
|
'nom' => 'Jean Dupont',
|
||||||
|
1 => 'Jean Dupont',
|
||||||
|
2 => 'Bla',
|
||||||
|
3 => 'Bla',
|
||||||
|
4 => 'Bla',
|
||||||
|
5 => 'Bla',
|
||||||
|
6 => 'Bla',
|
||||||
|
7 => 'Bla'
|
||||||
|
));
|
||||||
|
|
||||||
|
$computed_array = \manager\Database::delNumeric( $fetchData );
|
||||||
|
|
||||||
|
$this->assertArrayHasKey( 'id', $computed_array[0] );
|
||||||
|
$this->assertArrayHasKey( 'nom', $computed_array[0] );
|
||||||
|
$this->assertArrayNotHasKey( 0, $computed_array[0] );
|
||||||
|
$this->assertArrayNotHasKey( 1, $computed_array[0] );
|
||||||
|
|
||||||
|
$this->assertArrayHasKey( 2, $computed_array[0] );
|
||||||
|
$this->assertArrayHasKey( 3, $computed_array[0] );
|
||||||
|
$this->assertArrayHasKey( 4, $computed_array[0] );
|
||||||
|
$this->assertArrayHasKey( 5, $computed_array[0] );
|
||||||
|
$this->assertArrayHasKey( 6, $computed_array[0] );
|
||||||
|
$this->assertArrayHasKey( 7, $computed_array[0] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Verification pour 1 dimensions
|
||||||
|
=========================================================*/
|
||||||
|
/* (1) Global */
|
||||||
|
public function testGlobal1Dim(){
|
||||||
|
$fetchData = array(
|
||||||
|
'id' => '000001',
|
||||||
|
0 => '000001',
|
||||||
|
'nom' => 'Jean Dupont',
|
||||||
|
1 => 'Jean Dupont'
|
||||||
|
);
|
||||||
|
|
||||||
|
$computed_array = \manager\Database::delNumeric( $fetchData );
|
||||||
|
|
||||||
|
$this->assertArrayHasKey( 'id', $computed_array );
|
||||||
|
$this->assertArrayHasKey( 'nom', $computed_array );
|
||||||
|
$this->assertArrayNotHasKey( 0, $computed_array );
|
||||||
|
$this->assertArrayNotHasKey( 1, $computed_array );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (2) Verification d'indices numeriques dans les donnees */
|
||||||
|
public function testGlobal1DimWithNumericIndexes(){
|
||||||
|
$fetchData = array(
|
||||||
|
'id' => '000001',
|
||||||
|
0 => '000001',
|
||||||
|
'nom' => 'Jean Dupont',
|
||||||
|
1 => 'Jean Dupont',
|
||||||
|
2 => 'Bla',
|
||||||
|
3 => 'Bla',
|
||||||
|
4 => 'Bla',
|
||||||
|
5 => 'Bla',
|
||||||
|
6 => 'Bla',
|
||||||
|
7 => 'Bla'
|
||||||
|
);
|
||||||
|
|
||||||
|
$computed_array = \manager\Database::delNumeric( $fetchData );
|
||||||
|
|
||||||
|
$this->assertArrayHasKey( 'id', $computed_array );
|
||||||
|
$this->assertArrayHasKey( 'nom', $computed_array );
|
||||||
|
$this->assertArrayNotHasKey( 0, $computed_array );
|
||||||
|
$this->assertArrayNotHasKey( 1, $computed_array );
|
||||||
|
|
||||||
|
$this->assertArrayHasKey( 2, $computed_array );
|
||||||
|
$this->assertArrayHasKey( 3, $computed_array );
|
||||||
|
$this->assertArrayHasKey( 4, $computed_array );
|
||||||
|
$this->assertArrayHasKey( 5, $computed_array );
|
||||||
|
$this->assertArrayHasKey( 6, $computed_array );
|
||||||
|
$this->assertArrayHasKey( 7, $computed_array );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?php namespace phpunit;
|
||||||
|
|
||||||
|
class ManagerError extends \PHPUnit_Framework_TestCase{
|
||||||
|
|
||||||
|
/* [1] Test de toutes les erreurs
|
||||||
|
=========================================================*/
|
||||||
|
public function testErrorSuccess(){
|
||||||
|
$error = \manager\ManagerError::Success;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorParsingFailed(){
|
||||||
|
$error = \manager\ManagerError::ParsingFailed;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorInvalidFlags(){
|
||||||
|
$error = \manager\ManagerError::InvalidFlags;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorUnreachableResource(){
|
||||||
|
$error = \manager\ManagerError::UnreachableResource;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorMissingPath(){
|
||||||
|
$error = \manager\ManagerError::MissingPath;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorWrongPathModule(){
|
||||||
|
$error = \manager\ManagerError::WrongPathModule;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorUnknownModule(){
|
||||||
|
$error = \manager\ManagerError::UnknownModule;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorUnknownMethod(){
|
||||||
|
$error = \manager\ManagerError::UnknownMethod;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorUncallableMethod(){
|
||||||
|
$error = \manager\ManagerError::UncallableMethod;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorParamError(){
|
||||||
|
$error = \manager\ManagerError::ParamError;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorModuleError(){
|
||||||
|
$error = \manager\ManagerError::ModuleError;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorWrongPathRepo(){
|
||||||
|
$error = \manager\ManagerError::WrongPathRepo;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorUnknownRepo(){
|
||||||
|
$error = \manager\ManagerError::UnknownRepo;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorRepoError(){
|
||||||
|
$error = \manager\ManagerError::RepoError;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testErrorPDOConnection(){
|
||||||
|
$error = \manager\ManagerError::PDOConnection;
|
||||||
|
|
||||||
|
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testErrorNotKnown(){
|
||||||
|
$error = 1239;
|
||||||
|
|
||||||
|
$this->assertNull( \manager\ManagerError::explicit($error) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,251 @@
|
||||||
|
<?php namespace phpunit;
|
||||||
|
|
||||||
|
|
||||||
|
class sessionManager extends \PHPUnit_Framework_TestCase{
|
||||||
|
|
||||||
|
/* [1] Test de toutes les fonctions utilitaires
|
||||||
|
=========================================================*/
|
||||||
|
public function testSecureSHA1(){
|
||||||
|
$plain = 'montexteclair';
|
||||||
|
$hash = \manager\sessionManager::secure_sha1($plain);
|
||||||
|
|
||||||
|
// Verification desuiee
|
||||||
|
$this->assertEquals(40, strlen($hash) );
|
||||||
|
$this->assertNotContains( $plain, $hash );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [2] Test de l'unicite et du prefix
|
||||||
|
=========================================================*/
|
||||||
|
public function testIdSessionUniq(){
|
||||||
|
// Premiere session
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$id_first = session_id();
|
||||||
|
|
||||||
|
// Seconde session
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$id_second = session_id();
|
||||||
|
|
||||||
|
$this->assertNotEquals( $id_first, $id_second );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testIdenticalPrefix(){
|
||||||
|
// Premiere session
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_prefix = substr(session_id(), 0, 5);
|
||||||
|
|
||||||
|
// Seconde session
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_prefix = substr(session_id(), 0, 5);
|
||||||
|
|
||||||
|
$this->assertEquals( $first_prefix, $second_prefix );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testCookieUniq(){
|
||||||
|
// Premiere session
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$token_first = $_COOKIE['session_token'];
|
||||||
|
|
||||||
|
// Seconde session
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$token_second = $_COOKIE['session_token'];
|
||||||
|
|
||||||
|
$this->assertNotEquals( $token_first, $token_second );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [3] REMOTE_ADDR different
|
||||||
|
=========================================================*/
|
||||||
|
public function testSessionIdTheftWithWrongIp(){
|
||||||
|
$default_remote_addr = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['REMOTE_ADDR'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_prefix = substr(session_id(), 0, 5);
|
||||||
|
|
||||||
|
// Hote n.2
|
||||||
|
$_SERVER['REMOTE_ADDR'] = 'b';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_prefix = substr(session_id(), 0, 5);
|
||||||
|
|
||||||
|
|
||||||
|
$this->assertNotEquals( $first_prefix, $second_prefix );
|
||||||
|
|
||||||
|
$_SERVER['REMOTE_ADDR'] = $default_remote_addr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testSessionTokenTheftWithWrongIp(){
|
||||||
|
$default_remote_addr = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['REMOTE_ADDR'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_prefix = substr($_COOKIE['session_token'], 0, 5);
|
||||||
|
|
||||||
|
// Hote n.2
|
||||||
|
$_SERVER['REMOTE_ADDR'] = 'b';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_prefix = substr($_COOKIE['session_token'], 0, 5);
|
||||||
|
|
||||||
|
|
||||||
|
$this->assertNotEquals( $first_prefix, $second_prefix );
|
||||||
|
|
||||||
|
$_SERVER['REMOTE_ADDR'] = $default_remote_addr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function testSessionTokenTheftWithWrongIpThenWell(){
|
||||||
|
$default_remote_addr = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['REMOTE_ADDR'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
// Hote n.2
|
||||||
|
$_SERVER['REMOTE_ADDR'] = 'b';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['REMOTE_ADDR'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$third_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
|
||||||
|
$this->assertEquals( $first_prefix, $third_prefix );
|
||||||
|
$this->assertNotEquals( $first_prefix, $second_prefix );
|
||||||
|
|
||||||
|
$_SERVER['REMOTE_ADDR'] = $default_remote_addr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* [4] HTTP_USER_AGENT different
|
||||||
|
=========================================================*/
|
||||||
|
public function testSessionIdTheftWithWrongUserAgent(){
|
||||||
|
$default_http_user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_prefix = substr(session_id(), 0, 5);
|
||||||
|
|
||||||
|
// Hote n.2
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'b';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_prefix = substr(session_id(), 0, 5);
|
||||||
|
|
||||||
|
|
||||||
|
$this->assertNotEquals( $first_prefix, $second_prefix );
|
||||||
|
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = $default_http_user_agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testSessionTokenTheftWithWrongUserAgent(){
|
||||||
|
$default_http_user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
// Hote n.2
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'b';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
|
||||||
|
$this->assertNotEquals( $first_prefix, $second_prefix );
|
||||||
|
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = $default_http_user_agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function testSessionTokenTheftWithWrongUserAgentThenWell(){
|
||||||
|
$default_http_user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
// Hote n.2
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'b';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
// Hote n.1
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = 'a';
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$third_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
|
||||||
|
$this->assertEquals( $first_prefix, $third_prefix );
|
||||||
|
$this->assertNotEquals( $first_prefix, $second_prefix );
|
||||||
|
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = $default_http_user_agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] Regeneration du cookie 'session_token'
|
||||||
|
=========================================================*/
|
||||||
|
public function testRegeneratedToken(){
|
||||||
|
|
||||||
|
// Connection 1
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_token = $_COOKIE['session_token'];
|
||||||
|
|
||||||
|
// Connection 2
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_token = $_COOKIE['session_token'];
|
||||||
|
|
||||||
|
|
||||||
|
$this->assertNotEquals( $first_token, $second_token );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testSamePrefixToken(){
|
||||||
|
|
||||||
|
// Connection 1
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$first_token_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
// Connection 2
|
||||||
|
session_destroy();
|
||||||
|
@\manager\sessionManager::session_start();
|
||||||
|
$second_token_prefix = substr($_COOKIE['session_token'], 0, 40);
|
||||||
|
|
||||||
|
$this->assertEquals( $first_token_prefix, $second_token_prefix );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
/**************************************/
|
||||||
|
/* Classe de gestion de route (match) */
|
||||||
|
/**************************************/
|
||||||
|
|
||||||
|
namespace router;
|
||||||
|
|
||||||
|
class Route{
|
||||||
|
|
||||||
|
// ATTRIBUTS
|
||||||
|
private $pattern;
|
||||||
|
private $callback;
|
||||||
|
private $matches = array();
|
||||||
|
|
||||||
|
/* Initialise la route
|
||||||
|
*
|
||||||
|
* @pattern<String> Pattern correspondant a la route
|
||||||
|
* @callback<Function> Fonction de callback de la route
|
||||||
|
*
|
||||||
|
* @return this<Route> Retour de l'instance courante
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct($pattern, $callback){
|
||||||
|
// On enregistre la fonction de callback
|
||||||
|
$this->callback = $callback;
|
||||||
|
|
||||||
|
// On formatte le pattern en regexp
|
||||||
|
$this->pattern = '#^'.$pattern.'$#';
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Verifie si l'URL correspond a la route
|
||||||
|
*
|
||||||
|
* @url<String> URL pour laquelle on veut verifier
|
||||||
|
*
|
||||||
|
* @return match<Boolean> TRUE si match sinon FAUX
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function match($url){
|
||||||
|
// Si ne match pas -> FALSE
|
||||||
|
if( !preg_match($this->pattern, $url, $matches) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// On supprime le premier match global
|
||||||
|
array_shift($matches);
|
||||||
|
|
||||||
|
$this->matches = $matches;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Amorcage de la fonction de callback
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function call(){
|
||||||
|
return call_user_func($this->callback, $this->matches);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,91 @@
|
||||||
|
<?php
|
||||||
|
/*************************************************/
|
||||||
|
/* Classe de gestion des routes (URL/ressources) */
|
||||||
|
/*************************************************/
|
||||||
|
|
||||||
|
namespace router;
|
||||||
|
|
||||||
|
class Router{
|
||||||
|
// ATTRIBUTS
|
||||||
|
private $url;
|
||||||
|
private $routes;
|
||||||
|
|
||||||
|
/* Initialise le routeur
|
||||||
|
*
|
||||||
|
* @url<String> l'URL de la page courante
|
||||||
|
*
|
||||||
|
* @return this<Router> Retour de l'instance courante
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct($url){
|
||||||
|
$this->url = $url;
|
||||||
|
|
||||||
|
// On initialise les routes
|
||||||
|
$this->routes = array(
|
||||||
|
'GET' => array(),
|
||||||
|
'POST' => array()
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ajoute une route GET
|
||||||
|
*
|
||||||
|
* @pattern<String> le format de l'URL associe
|
||||||
|
* @callback<Function> function a appeler si l'URL correspond
|
||||||
|
*
|
||||||
|
* @return this<Router> Retour de l'instance courante
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function get($pattern, $callback){
|
||||||
|
array_push(
|
||||||
|
$this->routes['GET'],
|
||||||
|
new Route($pattern, $callback)
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Ajoute une route POST
|
||||||
|
*
|
||||||
|
* @pattern<String> le format de l'URL associe
|
||||||
|
* @callback<Function> function a appeler si l'URL correspond
|
||||||
|
*
|
||||||
|
* @return this<Router> Retour de l'instance courante
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function post($pattern, $callback){
|
||||||
|
array_push(
|
||||||
|
$this->routes['POST'],
|
||||||
|
new Route($pattern, $callback)
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Demarre le routeur
|
||||||
|
*
|
||||||
|
* @return this Retour de l'instance courante
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function run(){
|
||||||
|
$httpMethod = $_SERVER['REQUEST_METHOD'];
|
||||||
|
|
||||||
|
// Si aucune route pour la methode courante -> false
|
||||||
|
if( count($this->routes[$httpMethod]) <= 0 )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Pour chaque route
|
||||||
|
foreach($this->routes[$httpMethod] as $route){
|
||||||
|
// Si la route match
|
||||||
|
if( $route->match($this->url) )
|
||||||
|
return $route->call(); // On l'amorce
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retourne false si erreur
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
height="32px"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 32 32"
|
||||||
|
width="32px"
|
||||||
|
id="svg3901"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="18.svg">
|
||||||
|
<metadata
|
||||||
|
id="metadata3914">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview3912"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="20.85965"
|
||||||
|
inkscape:cx="12.887181"
|
||||||
|
inkscape:cy="17.571155"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="icon-150-tag-checked"
|
||||||
|
inkscape:snap-page="true" />
|
||||||
|
<desc
|
||||||
|
id="desc3905" />
|
||||||
|
<defs
|
||||||
|
id="defs3907" />
|
||||||
|
<g
|
||||||
|
fill="none"
|
||||||
|
fill-rule="evenodd"
|
||||||
|
id="Page-1"
|
||||||
|
stroke="none"
|
||||||
|
stroke-width="1"
|
||||||
|
style="fill:#000000;fill-opacity:1">
|
||||||
|
<g
|
||||||
|
fill="#157EFB"
|
||||||
|
id="icon-150-tag-checked"
|
||||||
|
style="fill:#000000;fill-opacity:1">
|
||||||
|
<path
|
||||||
|
style="fill:#000000;fill-opacity:1"
|
||||||
|
d="M 16 0.46875 C 7.4289025 0.46875 0.46875 7.4289035 0.46875 16 C 0.46875 24.571097 7.4289025 31.53125 16 31.53125 C 24.571096 31.53125 31.53125 24.571097 31.53125 16 C 31.53125 7.4289035 24.571096 0.46875 16 0.46875 z M 22.6875 9.53125 L 24.75 11.59375 L 13.875 22.46875 L 7.25 15.84375 L 9.3125 13.75 L 13.875 18.34375 L 22.6875 9.53125 z "
|
||||||
|
id="path4447" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M6 34.5v7.5h7.5l22.13-22.13-7.5-7.5-22.13 22.13zm35.41-20.41c.78-.78.78-2.05 0-2.83l-4.67-4.67c-.78-.78-2.05-.78-2.83 0l-3.66 3.66 7.5 7.5 3.66-3.66z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>
|
After Width: | Height: | Size: 311 B |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="100px" id="Capa_1" style="enable-background:new 0 0 96 100;" version="1.1" viewBox="0 0 96 100" width="96px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M94.456,2.028c-0.544-1.577-2.248-2.408-3.804-1.859c-1.557,0.549-2.379,2.272-1.837,3.849 c4.599,13.351-4.53,23.317-11.485,28.657l-2.817-4.072c-0.942-1.361-3.058-2.495-4.699-2.52l-15.777,0.072 c-1.64-0.026-4.085,0.735-5.43,1.689L2.123,60.786c-2.251,1.596-2.799,4.736-1.223,7.016L22.027,98.34 c1.577,2.28,4.111,2.007,6.362,0.412l46.483-32.941c1.345-0.955,2.885-3.02,3.426-4.59l4.94-15.731 c0.538-1.571,0.21-3.969-0.733-5.331l-1.717-2.481C90.139,30.451,99.841,17.665,94.456,2.028z M72.829,48.808 c-3.603,2.552-8.569,1.665-11.091-1.98c-2.523-3.648-1.648-8.672,1.957-11.227c2.859-2.027,6.573-1.879,9.246,0.088 c-1.346,0.82-2.269,1.292-2.445,1.376c-1.49,0.712-2.127,2.512-1.426,4.02c0.51,1.095,1.584,1.736,2.705,1.736 c0.426,0,0.859-0.094,1.271-0.29c0.958-0.457,1.989-1.009,3.064-1.652C76.595,43.845,75.426,46.968,72.829,48.808z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M12 38c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-24h-24v24zm26-30h-7l-2-2h-10l-2 2h-7v4h28v-4z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>
|
After Width: | Height: | Size: 254 B |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 500 500" height="500px" id="Layer_1" version="1.1" viewBox="0 0 500 500" width="500px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path clip-rule="evenodd" d="M306.39,154.09c19.628,4.543,35.244,21.259,39.787,39.523 c1.551,8.54,8.998,14.989,17.904,14.989c9.991,0,18.168-8.175,18.168-18.17c0-13.083-10.991-32.98-25.985-47.881 c-14.719-14.537-32.252-24.802-46.695-24.802c-9.991,0-18.172,8.45-18.172,18.446C291.396,145.094,297.847,152.546,306.39,154.09z M56.629,392.312c-14.09,14.08-14.09,36.979,0,51.059c14.08,14.092,36.981,14.092,50.965,0l104.392-104.303 c24.347,15.181,53.062,23.991,83.953,23.991c87.857,0,158.995-71.142,158.995-158.999c0-87.854-71.138-158.995-158.995-158.995 c-87.856,0-158.995,71.141-158.995,158.995c0,30.802,8.819,59.606,23.992,83.953L56.629,392.312z M182.371,204.06 c0-62.687,50.875-113.568,113.568-113.568s113.569,50.881,113.569,113.568c0,62.694-50.876,113.569-113.569,113.569 S182.371,266.754,182.371,204.06z" fill="#010101" fill-rule="evenodd"/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
version="1.1"
|
||||||
|
width="32"
|
||||||
|
height="32"
|
||||||
|
viewBox="0 0 32 32"
|
||||||
|
id="svg2"
|
||||||
|
xml:space="preserve"><metadata
|
||||||
|
id="metadata14"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs12" /><g
|
||||||
|
transform="matrix(2.1052632,0,0,2.1052632,-17.684211,-13.221054)"
|
||||||
|
id="Guides__x26__Forms" /><g
|
||||||
|
transform="matrix(2.1052632,0,0,2.1052632,-17.684211,-17.684211)"
|
||||||
|
id="Icons"
|
||||||
|
style="fill:#ffffff"><g
|
||||||
|
id="g6"
|
||||||
|
style="fill:#ffffff"><polygon
|
||||||
|
points="14.054,21.48 23.6,11.934 22.186,10.52 14.054,18.652 9.814,14.411 8.4,15.825 "
|
||||||
|
id="stylisable"
|
||||||
|
style="fill:#ffffff" /></g></g></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
height="32"
|
||||||
|
id="Layer_1"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 32 31.999999"
|
||||||
|
width="32"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="card.svg"><metadata
|
||||||
|
id="metadata3168"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs3166" /><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview3164"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:zoom="14.75"
|
||||||
|
inkscape:cx="31.803873"
|
||||||
|
inkscape:cy="2.4807302"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Layer_1"
|
||||||
|
inkscape:snap-page="true" /><g
|
||||||
|
id="g3154"
|
||||||
|
transform="matrix(0.07142857,0,0,0.07142857,-2.2857139,-2.2857144)"><path
|
||||||
|
d="M 452,96 H 60 c -15.5,0 -27.9,12.5 -28,28 l 0,0 v 0.3 263.4 0.3 l 0,0 c 0.2,15.5 12.5,28 28,28 h 392 c 15.6,0 28,-12.7 28,-28.3 v 0 -263.4 0 C 480,108.7 467.6,96 452,96 z M 77.1,128 h 357.7 c 6.9,0 12.1,5.1 13.1,12 v 20 H 64 V 139.7 C 65,132.9 70.3,128 77.1,128 z M 434.9,384 H 77.1 C 70.2,384 65,379.1 64,372.3 V 256 h 384 v 116 c -1,6.9 -6.3,12 -13.1,12 z"
|
||||||
|
id="stylisable"
|
||||||
|
inkscape:connector-curvature="0" /><rect
|
||||||
|
height="16"
|
||||||
|
width="192"
|
||||||
|
x="96"
|
||||||
|
y="304"
|
||||||
|
id="stylisable" /><rect
|
||||||
|
height="16"
|
||||||
|
width="96"
|
||||||
|
x="96"
|
||||||
|
y="336"
|
||||||
|
id="stylisable" /><rect
|
||||||
|
height="48"
|
||||||
|
width="64"
|
||||||
|
x="352"
|
||||||
|
y="304"
|
||||||
|
id="stylisable" /></g></svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
height="32"
|
||||||
|
id="Layer_1"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 31.999998 32"
|
||||||
|
width="31.999998"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="group.svg"><metadata
|
||||||
|
id="metadata15"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs13" /><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview11"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:zoom="20.85965"
|
||||||
|
inkscape:cx="14.59793"
|
||||||
|
inkscape:cy="17.35532"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Layer_1"
|
||||||
|
inkscape:snap-page="true" /><g
|
||||||
|
id="g3"
|
||||||
|
transform="matrix(0.08333202,0,0,0.08333202,-5.3354939,-5.3317337)"><path
|
||||||
|
d="M 430.1,192 H 81.9 c -17.7,0 -18.6,9.2 -17.6,20.5 l 13,183 c 0.9,11.2 3.5,20.5 21.1,20.5 h 316.2 c 18,0 20.1,-9.2 21.1,-20.5 l 12.1,-185.3 c 0.9,-11.2 0,-18.2 -17.7,-18.2 z"
|
||||||
|
id="stylisable"
|
||||||
|
inkscape:connector-curvature="0" /><g
|
||||||
|
id="g7"><path
|
||||||
|
d="m 426.2,143.3 c -0.5,-12.4 -4.5,-15.3 -15.1,-15.3 0,0 -121.4,0 -143.2,0 -21.8,0 -24.4,0.3 -40.9,-17.4 C 213.3,95.8 218.7,96 190.4,96 c -22.6,0 -75.3,0 -75.3,0 -17.4,0 -23.6,-1.5 -25.2,16.6 -1.5,16.7 -5,57.2 -5.5,63.4 h 343.4 l -1.6,-32.7 z"
|
||||||
|
id="stylisable"
|
||||||
|
inkscape:connector-curvature="0" /></g></g></svg>
|
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,70 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
height="32"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 32 31.999999"
|
||||||
|
width="32"
|
||||||
|
id="svg2"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="mail.svg">
|
||||||
|
<metadata
|
||||||
|
id="metadata13">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview11"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:zoom="14.75"
|
||||||
|
inkscape:cx="-3.8813559"
|
||||||
|
inkscape:cy="4.9999999"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2"
|
||||||
|
inkscape:snap-page="true" />
|
||||||
|
<defs
|
||||||
|
id="defs6" />
|
||||||
|
<g
|
||||||
|
id="Icons with numbers"
|
||||||
|
transform="matrix(2.2857143,0,0,2.2857143,-2.2857144,-2.2857149)"
|
||||||
|
style="fill:none;stroke:none">
|
||||||
|
<g
|
||||||
|
id="Group"
|
||||||
|
transform="translate(-336,0)"
|
||||||
|
style="fill:#000000">
|
||||||
|
<path
|
||||||
|
d="m 345.73196,8.4845362 4.94979,4.2426818 C 350.50168,12.895464 350.2595,13 349.99315,13 l -11.98631,0 c -0.26765,0 -0.5106,-0.102945 -0.69077,-0.270915 L 342.26804,8.4845362 344,10 z M 344,9 337.31824,3.2727818 C 337.49832,3.1045365 337.7405,3 338.00684,3 l 11.98631,0 c 0.26766,0 0.51061,0.1029448 0.69078,0.2709155 z m 7,3.185608 L 346.16736,8.0788577 351,3.875422 l 0,8.310186 0,0 z m -14,0 0,-8.3074561 4.83264,4.2007055 L 337,12.185608 l 0,0 z m 0,0"
|
||||||
|
id="stylisable"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,73 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="49.96875"
|
||||||
|
height="49.96875"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="icon.svg">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="7.9195959"
|
||||||
|
inkscape:cx="-15.307827"
|
||||||
|
inkscape:cy="29.355928"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-page="true" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-128.46875,-685.34375)">
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:25.91360283px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sawasdee;-inkscape-font-specification:Sawasdee"
|
||||||
|
x="130.12709"
|
||||||
|
y="718.25531"
|
||||||
|
id="text2987"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan2989"
|
||||||
|
x="130.12709"
|
||||||
|
y="718.25531"
|
||||||
|
style="font-size:25.91360283px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;font-family:Sawasdee;-inkscape-font-specification:Sawasdee Bold">{ x }</tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><svg width='120px' height='120px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-ring-alt"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="transparent" fill="none" stroke-width="10" stroke-linecap="round"></circle><circle cx="50" cy="50" r="40" stroke="white" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="2s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="2s" repeatCount="indefinite" values="165.66 85.34;1 250;165.66 85.34"></animate></circle></svg>
|
After Width: | Height: | Size: 713 B |
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
height="32"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 31.999922 32"
|
||||||
|
width="31.999922"
|
||||||
|
id="svg3043"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="analytics.svg">
|
||||||
|
<metadata
|
||||||
|
id="metadata3054">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview3052"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="17.236742"
|
||||||
|
inkscape:cx="24.22397"
|
||||||
|
inkscape:cy="11.627592"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg3043"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:snap-page="true" />
|
||||||
|
<defs
|
||||||
|
id="defs3047" />
|
||||||
|
<g
|
||||||
|
id="Icons new Arranged Names Color"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
|
||||||
|
transform="translate(945.43808,521.49309)">
|
||||||
|
<g
|
||||||
|
id="52 Cloud Sync"
|
||||||
|
style="fill:#000000;fill-opacity:1">
|
||||||
|
<path
|
||||||
|
d="m 16,26 c 2.418953,0 4.436703,-1.717753 4.899982,-4 l 2.029129,0 C 22.443885,25.392291 19.526474,28 16,28 13.555527,28 11.403706,26.747009 10.151757,24.848243 L 9,26 9,25 9,23 9,22 9.0708888,22 11.100018,22 13,22 11.608137,23.391863 C 12.456236,24.945806 14.105008,26 16,26 z M 20.899982,20 20,20 19,20 20.391875,18.608159 C 19.543801,17.054217 17.895013,16 16,16 c -2.418953,0 -4.436703,1.717753 -4.899982,4 L 9.0708888,20 C 9.5561148,16.607709 12.473526,14 16,14 c 2.444487,0 4.59632,1.253007 5.848271,3.151799 L 23,16.000098 23,20 22.929111,20 z M 0,19 C 0,16.782838 1.2075399,14.841641 3.0021135,13.802995 3.1069062,8.9234028 7.0952729,5 12,5 15.233498,5 18.068721,6.7052116 19.65547,9.2654333 20.240206,9.092705 20.859277,9 21.5,9 c 2.784553,0 5.16015,1.750949 6.085843,4.211897 C 30.129704,13.907454 32,16.235367 32,19 c 0,3.306966 -2.68637,6 -6.000176,6 l -1.935344,0 c 0.312341,-0.628505 0.553371,-1.298702 0.712504,-2 l 1.226177,0 C 28.210554,23 30,21.204644 30,19 30,16.790861 28.20588,15 26.003161,15 l -0.03062,0 C 25.723803,12.750016 23.816271,11 21.5,11 20.442753,11 19.470664,11.364599 18.702606,11.974922 17.834068,9.0963276 15.161846,7 12,7 8.1340066,7 5,10.134007 5,14 5,14.375791 5.029612,14.744666 5.086631,15.104418 3.3177882,15.517576 2,17.108083 2,19 c 0,2.209139 1.7941203,4 3.9968389,4 L 7,23 7,25 6.0001757,25 C 2.686978,25 0,22.313708 0,19 z m 0,0"
|
||||||
|
id="stylisable"
|
||||||
|
style="fill:#000000;fill-opacity:1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||||
|
d="M 0 19.375 L 0 31.59375 L 8 31.59375 L 8 19.375 L 0 19.375 z M 1.8125 21.28125 L 6.1875 21.28125 L 6.1875 29.6875 L 1.8125 29.6875 L 1.8125 21.28125 z "
|
||||||
|
id="stylisable" />
|
||||||
|
<path
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||||
|
d="M 12 10.59375 L 12 31.59375 L 20 31.59375 L 20 10.59375 L 12 10.59375 z M 13.8125 12.5625 L 18.1875 12.5625 L 18.1875 29.625 L 13.8125 29.625 L 13.8125 12.5625 z "
|
||||||
|
id="stylisable" />
|
||||||
|
<path
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||||
|
d="M 24 0.40625 L 24 31.59375 L 32 31.59375 L 32 0.40625 L 24 0.40625 z M 25.75 2.5625 L 30.25 2.5625 L 30.25 29.4375 L 25.75 29.4375 L 25.75 2.5625 z "
|
||||||
|
id="stylisable" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.0 KiB |
|
@ -0,0 +1,56 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
enable-background="new 0 0 32 32"
|
||||||
|
height="32"
|
||||||
|
id="Layer_1"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 32 32"
|
||||||
|
width="32"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="dashboard.svg"><metadata
|
||||||
|
id="metadata3942"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs3940" /><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview3938"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="14.75"
|
||||||
|
inkscape:cx="20.810183"
|
||||||
|
inkscape:cy="6.9086975"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Layer_1"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:snap-page="true" /><g
|
||||||
|
id="g3930"
|
||||||
|
style="fill:#000000;fill-opacity:1"
|
||||||
|
transform="matrix(1.1423365,0,0,1.1423365,-2.2700954,-2.2700951)" /><g
|
||||||
|
id="g3934"
|
||||||
|
style="fill:#000000;fill-opacity:1"
|
||||||
|
transform="matrix(1.1423365,0,0,1.1423365,-2.2700952,-2.277384)"><path
|
||||||
|
id="stylisable"
|
||||||
|
style="fill:#000000;fill-opacity:1"
|
||||||
|
d="m 16,20 c -1.068,0 -2.073,-0.416 -2.829,-1.172 -1.56,-1.56 -1.56,-4.097 0,-5.656 1.257,-1.257 7.272,-3.639 8.465,-4.104 0.371,-0.144 0.79,-0.056 1.07,0.225 0.28,0.281 0.369,0.7 0.225,1.07 -0.465,1.193 -2.847,7.209 -4.104,8.465 C 18.073,19.584 17.068,20 16,20 z m 4.188,-8.187 c -2.453,1.028 -5.064,2.235 -5.602,2.773 -0.78,0.78 -0.78,2.048 0,2.828 0.756,0.756 2.073,0.756 2.829,0 0.537,-0.539 1.745,-3.148 2.773,-5.601 z M 16,30 C 12.26,30 8.745,28.544 6.101,25.899 1.779,21.578 0.752,15.025 3.547,9.595 3.8,9.104 4.402,8.911 4.894,9.163 5.386,9.415 5.579,10.018 5.326,10.51 2.93,15.164 3.81,20.78 7.515,24.485 9.781,26.752 12.794,28 16,28 19.205,28 22.219,26.752 24.485,24.485 26.751,22.218 28,19.205 28,16 28,12.794 26.752,9.781 24.485,7.515 22.218,5.249 19.206,4 16,4 12.794,4 9.781,5.249 7.515,7.515 7.124,7.906 6.492,7.906 6.101,7.515 5.71,7.124 5.71,6.492 6.101,6.101 8.745,3.457 12.26,2 16,2 19.74,2 23.256,3.457 25.899,6.101 28.544,8.745 30,12.26 30,16 30,19.739 28.544,23.255 25.899,25.899 23.256,28.544 19.74,30 16,30 z"
|
||||||
|
inkscape:connector-curvature="0" /></g></svg>
|
After Width: | Height: | Size: 2.9 KiB |
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
enable-background="new 0 0 128 128"
|
||||||
|
id="Слой_1"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 32 32"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
sodipodi:docname="groups.svg"><metadata
|
||||||
|
id="metadata15"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs13" /><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview11"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:zoom="16"
|
||||||
|
inkscape:cx="8.324924"
|
||||||
|
inkscape:cy="21.713747"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g2994" /><g
|
||||||
|
id="g2994"
|
||||||
|
transform="translate(0,-2.99187)"><path
|
||||||
|
style="fill:#ffffff"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3"
|
||||||
|
d="M 28.823169,31.619606 H 3.2071602 c -1.4088806,0 -2.56160119,-1.152721 -2.56160119,-2.561601 V 12.407599 c 0,-1.408881 1.15272059,-2.5616015 2.56160119,-2.5616015 H 28.823169 c 1.40888,0 2.561601,1.1527205 2.561601,2.5616015 v 16.650406 c 0,1.40888 -1.152721,2.561601 -2.561601,2.561601 z" /><path
|
||||||
|
style="fill:#e5e6e6"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5"
|
||||||
|
d="M 28.823169,29.058005 H 3.2071602 c -1.4088806,0 -2.56160119,-1.152721 -2.56160119,-2.561601 v 2.561601 c 0,1.40888 1.15272059,2.561601 2.56160119,2.561601 H 28.823169 c 1.40888,0 2.561601,-1.152721 2.561601,-2.561601 v -2.561601 c 0,1.40888 -1.152721,2.561601 -2.561601,2.561601 z" /><path
|
||||||
|
style="fill:#e5e6e6"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path7"
|
||||||
|
d="m 0.64555901,9.8459975 v -0.51232 c 0,-1.4088812 1.15272059,-2.5616009 2.56160119,-2.5616009 h 6.2503064 c 0.8965594,0 1.7162714,0.4610875 2.1773604,1.229568 l 0.922176,1.5113452" /><path
|
||||||
|
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.49230769;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
|
||||||
|
d="M 3.21875,6.15625 C 1.4694916,6.15625 0,7.5944911 0,9.34375 l 0,0.5 c 0,0.348518 0.30773224,0.625 0.65625,0.625 0.17425888,0 0.19846621,-0.198466 0.3125,-0.3125 0.1140338,-0.114034 0.3125,-0.138241 0.3125,-0.3125 l 0,-0.5 c 0,-1.0712735 0.8662262,-1.9375 1.9375,-1.9375 l 6.25,0 c 0.657983,0 1.287942,0.344486 1.625,0.90625 l 0.53125,0.90625 -8.40625,0 c -0.8746292,0 -1.6706585,0.3581585 -2.25,0.9375 C 0.38940851,10.735592 0,11.531621 0,12.40625 L 0,29.0625 C 0,30.811758 1.4694915,32.25 3.21875,32.25 l 25.59375,0 C 30.561758,32.25 32,30.811758 32,29.0625 l 0,-16.65625 c 0,-1.749259 -1.438242,-3.1875 -3.1875,-3.1875 l -15.6875,0 c -0.003,-0.00571 0.0026,-0.026129 0,-0.03125 l -0.90625,-1.53125 -0.03125,0 c -0.582051,-0.9423713 -1.607957,-1.5 -2.71875,-1.5 z m 0,4.3125 25.59375,0 c 1.071273,0 1.9375,0.866226 1.9375,1.9375 l 0,16.65625 C 30.75,30.133773 29.883773,31 28.8125,31 L 3.21875,31 c -1.0712737,0 -1.9375,-0.866227 -1.9375,-1.9375 l 0,-16.65625 c 0,-1.071274 0.8662261,-1.9375 1.9375,-1.9375 z"
|
||||||
|
id="stylisable"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="sssssssssccsssssssssccccsssssssssss" /></g></svg>
|
After Width: | Height: | Size: 4.3 KiB |
|
@ -0,0 +1,84 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
id="Capa_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
width="32"
|
||||||
|
height="32"
|
||||||
|
viewBox="0 0 31.999998 32"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="machines.svg"><metadata
|
||||||
|
id="metadata41"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs39" /><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview37"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:zoom="9.9207842"
|
||||||
|
inkscape:cx="41.142326"
|
||||||
|
inkscape:cy="4.5030756"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Capa_1" /><g
|
||||||
|
id="g3"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-5.12155e-7,2.921265e-5)"><path
|
||||||
|
d="M 101.58,279.827 C 45.569,279.827 0,325.399 0,381.41 c 0,56.011 45.569,101.582 101.58,101.582 56.016,0 101.582,-45.571 101.582,-101.582 0,-56.011 -45.566,-101.583 -101.582,-101.583 z m 0,168.133 c -36.697,0 -66.549,-29.855 -66.549,-66.55 0,-36.695 29.852,-66.544 66.549,-66.544 36.703,0 66.555,29.85 66.555,66.544 0,36.694 -29.846,66.55 -66.555,66.55 z M 395.986,325.991 c -42.747,0 -77.525,34.778 -77.525,77.52 0,42.752 34.778,77.525 77.525,77.525 42.747,0 77.525,-34.762 77.525,-77.525 0,-42.741 -34.766,-77.52 -77.525,-77.52 z m 0,124.338 c -25.818,0 -46.813,-21.012 -46.813,-46.818 0,-25.812 21.007,-46.808 46.813,-46.808 25.818,0 46.825,20.995 46.825,46.808 0,25.806 -21.007,46.818 -46.825,46.818 z M 214.389,373.466 h 96.742 c -4.428,10.675 -6.904,22.354 -6.916,34.619 l -92.246,0.06 c 1.838,-8.032 2.899,-16.355 2.899,-24.955 0.006,-3.281 -0.201,-6.497 -0.479,-9.724 z m 320.328,-82.945 c 0,-7.867 -6.401,-14.257 -14.263,-14.257 L 341.033,237.058 282.333,66.009 C 280.72,59.702 275.027,55.278 268.517,55.278 H 78.04 c -7.879,0 -14.254,6.392 -14.254,14.253 0,7.882 6.38,14.254 14.254,14.254 h 24.146 v 129.75 c -4.823,-0.902 -9.777,-1.427 -14.86,-1.427 -44.286,0 -80.197,35.907 -80.197,80.197 v 27.621 c 19.337,-33.089 55.153,-55.373 96.236,-55.373 55.848,0 101.963,41.097 110.097,94.661 h 101.057 c 15.078,-28.82 45.211,-48.503 79.996,-48.503 49.822,0 90.21,40.347 90.287,90.156 l 26.941,-0.023 c 0.525,0.059 -16.775,0.172 -16.243,0.172 h 28.514 c 7.867,0 14.257,-6.402 14.257,-14.251 l -3.554,-96.244 z m -300.263,-58.21 c -16.875,-50.75 -89.317,-55.762 -96.26,-55.762 h -7.489 V 83.791 H 257.44 l 53.324,148.52 h -76.31 z"
|
||||||
|
id="stylisable"
|
||||||
|
inkscape:connector-curvature="0" /></g><g
|
||||||
|
id="g7"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g9"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g11"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g13"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g15"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g17"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g19"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g21"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g23"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g25"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g27"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g29"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g31"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g33"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /><g
|
||||||
|
id="g35"
|
||||||
|
transform="matrix(0.05944961,0,0,0.05944961,-9.654541e-7,3.2863134)" /></svg>
|
After Width: | Height: | Size: 4.8 KiB |
|
@ -0,0 +1,163 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
width="33.599998"
|
||||||
|
height="33.599998"
|
||||||
|
viewBox="-27 23 33.599999 33.599999"
|
||||||
|
id="malecostume_1_"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="profile.svg"><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview3085"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="20.85965"
|
||||||
|
inkscape:cx="17.788199"
|
||||||
|
inkscape:cy="10.452964"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="malecostume_1_"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0" /><metadata
|
||||||
|
id="metadata57"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs55" /><g
|
||||||
|
transform="matrix(0.32,0,0,0.32,-17.56,16.296182)"
|
||||||
|
id="g3"><g
|
||||||
|
id="g5"><g
|
||||||
|
id="g9"><defs
|
||||||
|
id="defs11"><circle
|
||||||
|
cx="23"
|
||||||
|
cy="73"
|
||||||
|
r="50"
|
||||||
|
id="stroke-stylisable"
|
||||||
|
sodipodi:cx="23"
|
||||||
|
sodipodi:cy="73"
|
||||||
|
sodipodi:rx="50"
|
||||||
|
sodipodi:ry="50" /></defs><clipPath
|
||||||
|
id="SVGID_2_"><use
|
||||||
|
id="use15"
|
||||||
|
style="overflow:visible"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="101"
|
||||||
|
height="100"
|
||||||
|
xlink:href="#stroke-stylisable" /></clipPath><path
|
||||||
|
d="m 38,98.9 27.9,7.7 c 3.2,1.1 5.7,3.5 7.1,6.6 V 123 H -27 v -9.8 c 1.3,-3.1 3.9,-5.5 7.1,-6.6 L 8,98.9 V 84 h 30 v 14.9 z"
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
id="path17"
|
||||||
|
style="fill:#d4b08c"
|
||||||
|
inkscape:connector-curvature="0" /><g
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
id="g19"><defs
|
||||||
|
id="defs21"><path
|
||||||
|
d="m 38,98.9 27.9,7.7 c 3.2,1.1 5.7,3.5 7.1,6.6 V 123 H -27 v -9.8 c 1.3,-3.1 3.9,-5.5 7.1,-6.6 L 8,98.9 V 84 h 30 v 14.9 z"
|
||||||
|
id="SVGID_3_"
|
||||||
|
inkscape:connector-curvature="0" /></defs><clipPath
|
||||||
|
id="SVGID_4_"><use
|
||||||
|
id="use25"
|
||||||
|
style="overflow:visible"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="101"
|
||||||
|
height="100"
|
||||||
|
xlink:href="#SVGID_3_" /></clipPath><polygon
|
||||||
|
points="-27,123 23.2,123 73.3,123 73.3,98 35.2,98 30.4,103 23.2,103 16,103 11.2,98 -27,98 "
|
||||||
|
clip-path="url(#SVGID_4_)"
|
||||||
|
id="stylisable"
|
||||||
|
style="fill:#1e1e23" /><polygon
|
||||||
|
points="7.3,95.3 22,103 23,103 24,103 38.7,95.3 32.9,124.2 23,123.1 13.1,124.2 "
|
||||||
|
clip-path="url(#SVGID_4_)"
|
||||||
|
id="polygon29"
|
||||||
|
style="fill:#c1cad4" /><polygon
|
||||||
|
points="29.5,124 16.5,124 20.5,112 25.5,112 "
|
||||||
|
clip-path="url(#SVGID_4_)"
|
||||||
|
id="polygon31"
|
||||||
|
style="fill:#216dd9" /><polygon
|
||||||
|
points="25.5,112 20.5,112 12.5,103 33.5,103 "
|
||||||
|
clip-path="url(#SVGID_4_)"
|
||||||
|
id="polygon33"
|
||||||
|
style="fill:#249cf2" /><path
|
||||||
|
d="M 38.5,93 24.1,103 34.9,114 39,94 38.5,93 z M 7.5,93 21.9,103 11.1,114 7,94 7.5,93 z"
|
||||||
|
clip-path="url(#SVGID_4_)"
|
||||||
|
id="path35"
|
||||||
|
style="fill:#ffffff"
|
||||||
|
inkscape:connector-curvature="0" /></g></g><circle
|
||||||
|
cx="23"
|
||||||
|
cy="73"
|
||||||
|
r="50"
|
||||||
|
id="stroke-stylisable"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#777777;stroke-width:5.00000008000000040;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
sodipodi:cx="23"
|
||||||
|
sodipodi:cy="73"
|
||||||
|
sodipodi:rx="50"
|
||||||
|
sodipodi:ry="50"
|
||||||
|
transform="translate(0,0.44943228)"
|
||||||
|
d="m 73,73 c 0,27.61424 -22.385763,50 -50,50 -27.6142375,0 -50,-22.38576 -50,-50 0,-27.614237 22.3857625,-50 50,-50 27.614237,0 50,22.385763 50,50 z" /><path
|
||||||
|
d="M 23,97 C 21.5,97 19.5,96.7 18.2,96.1 16.6,95.4 11,91.5 9.1,89.8 6.6,87.5 5.3,84.7 4.9,79.8 4.5,74.9 3,57.5 3,53.5 3,47.8 8.1,39 23,39 l 0,0 0,0 0,0 0,0 c 14.9,0 20,8.8 20,14.5 0,4 -1.5,21.5 -1.9,26.4 -0.4,4.9 -1.6,7.7 -4.2,10 -1.9,1.7 -7.6,5.6 -9.1,6.3 C 26.5,96.7 24.5,97 23,97 l 0,0 z"
|
||||||
|
id="path37"
|
||||||
|
style="fill:#f2cea5"
|
||||||
|
inkscape:connector-curvature="0" /><path
|
||||||
|
d="m 30,83 -14,0 c -0.4,0 -0.6,0.4 -0.4,0.8 1.3,2.3 3.7,3.5 6.7,3.7 3.1,0.2 6.5,-1.3 8.1,-3.7 0.2,-0.3 0,-0.8 -0.4,-0.8 z"
|
||||||
|
id="path39"
|
||||||
|
style="fill:#a3705f"
|
||||||
|
inkscape:connector-curvature="0" /><circle
|
||||||
|
cx="32"
|
||||||
|
cy="68"
|
||||||
|
r="2"
|
||||||
|
id="circle41"
|
||||||
|
style="fill:#262626"
|
||||||
|
sodipodi:cx="32"
|
||||||
|
sodipodi:cy="68"
|
||||||
|
sodipodi:rx="2"
|
||||||
|
sodipodi:ry="2"
|
||||||
|
d="m 34,68 c 0,1.104569 -0.895431,2 -2,2 -1.104569,0 -2,-0.895431 -2,-2 0,-1.104569 0.895431,-2 2,-2 1.104569,0 2,0.895431 2,2 z" /><circle
|
||||||
|
cx="14"
|
||||||
|
cy="68"
|
||||||
|
r="2"
|
||||||
|
id="circle43"
|
||||||
|
style="fill:#262626"
|
||||||
|
sodipodi:cx="14"
|
||||||
|
sodipodi:cy="68"
|
||||||
|
sodipodi:rx="2"
|
||||||
|
sodipodi:ry="2"
|
||||||
|
d="m 16,68 c 0,1.104569 -0.895431,2 -2,2 -1.104569,0 -2,-0.895431 -2,-2 0,-1.104569 0.895431,-2 2,-2 1.104569,0 2,0.895431 2,2 z" /><path
|
||||||
|
d="m 8,65 c 0,0 1.1,-3 6.1,-3 3.4,0 5.4,1.5 6.4,3"
|
||||||
|
id="path45"
|
||||||
|
style="fill:none;stroke:#cc9872;stroke-width:2"
|
||||||
|
inkscape:connector-curvature="0" /><path
|
||||||
|
d="m 38.1,65 c 0,0 -1.1,-3 -6.1,-3 -4.8,0 -7,3 -7,5 0,1.9 0,9 0,9"
|
||||||
|
id="path47"
|
||||||
|
style="fill:none;stroke:#bb8660;stroke-width:2"
|
||||||
|
inkscape:connector-curvature="0" /><path
|
||||||
|
d="m 41.8,71.2 c 0,0 0.8,-6.3 3.7,-7.2 0.4,-1.8 1.5,-7 1.5,-9.9 0,-2.9 -0.3,-5.7 -1.9,-8.1 -1.8,-2.6 -5.6,-4.1 -7.6,-4.1 -2.3,1.4 -7.7,4.6 -9.4,6.5 -0.9,1 0.4,1.8 0.4,1.8 0,0 1.2,-0.5 1.7,-0.6 2.5,-0.7 8,-1.2 9.7,1.3 2.1,3 2.1,11.8 2.1,13.1 0,1.2 -0.2,7.2 -0.2,7.2 z"
|
||||||
|
id="path49"
|
||||||
|
style="fill:#d98c21"
|
||||||
|
inkscape:connector-curvature="0" /><path
|
||||||
|
d="m 0.5,64 c 2.9,1 3.7,7.2 3.7,7.2 0,0 -0.2,-6 -0.2,-7.2 0,-1.6 0.2,-9.1 3.4,-12.7 3.6,-4 8.4,-5.3 11.1,-3.5 1.4,0.9 6.1,5.5 11.1,1.7 3,-2.3 8.5,-7.5 8.5,-7.5 0,0 -2.9,-8.9 -16.1,-7.9 -5.6,0.5 -11.8,-0.9 -11.8,-0.9 0,0 -0.1,2.5 0.9,3.8 -8.3,2.4 -11,8.4 -11.8,13 -0.2,0.9 -0.3,1.8 -0.3,2.7 0,0.5 0,1 0,1.4 0,2.9 1.1,8 1.5,9.9 z"
|
||||||
|
id="path51"
|
||||||
|
style="fill:#e6a422"
|
||||||
|
inkscape:connector-curvature="0" /></g></g></svg>
|
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 13 KiB |