diff --git a/.docker/apache2/soshot.conf b/.docker/apache2/soshot.conf new file mode 100644 index 0000000..bb0e149 --- /dev/null +++ b/.docker/apache2/soshot.conf @@ -0,0 +1,10 @@ + + ErrorLog ${APACHE_LOG_DIR}/error.log + ServerName sohsot.local + DocumentRoot /var/www/public/ + + Require all granted + AllowOverride All + Options -Indexes + + diff --git a/.docker/start.sh b/.docker/start.sh new file mode 100644 index 0000000..2298381 --- /dev/null +++ b/.docker/start.sh @@ -0,0 +1,3 @@ +#/bin/bash +cron +/usr/sbin/apache2ctl -DFOREGROUND diff --git a/.gitignore b/.gitignore index 1a17728..066053d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -cache/* -!cache/index.html -.project -.settings +cache/ +composer.lock +datas/config.json +datas/soshot.sqlite +vendor/ \ No newline at end of file diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 8c115f6..0000000 --- a/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ -AddDefaultCharset UTF-8 -Options -Indexes -DirectoryIndex index.php index.html -FileETag none -SetOutputFilter DEFLATE diff --git a/DockerRun b/DockerRun new file mode 100644 index 0000000..3dab604 --- /dev/null +++ b/DockerRun @@ -0,0 +1,5 @@ +docker run -v soshot_datas:/var/www/datas -v soshot_cache_img:/var/www/cache/img -e TZ=UTC -p 8080:80 --name soshot soshot:0.2.0 + +or + +docker run -v soshot_datas:/var/www/datas soshot --name soshot soshot diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b03f5b0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +FROM ubuntu/apache2 + +MAINTAINER Knah Tsaeb + +LABEL version="0.2.0" +LABEL description="Apache 2 / PHP / SoShot" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -y update && apt-get install -y php php-gd php-json php-sqlite3 php-mbstring php-xml php-curl wget gnupg git composer php-imagick sudo cron imagemagick && apt-get clean && apt-get autoclean && apt-get autoremove + +RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && apt -y install ./google-chrome-stable_current_amd64.deb && apt-get -y update && apt-get install -y google-chrome-stable && apt-get clean && rm google-chrome-stable_current_amd64.deb && rm -rf /var/lib/apt/lists/* + +RUN rm -r /var/www/ && mkdir /var/www/ + +WORKDIR /var/www/ +RUN git clone https://forge.leslibres.org/Knah-Tsaeb/Soshot.git --branch dev --single-branch --depth 1 . +RUN composer install --no-dev && chown -R www-data:www-data /var/www/ + +COPY .docker/start.sh /usr/bin/start.sh +RUN chmod +x /usr/bin/start.sh + +WORKDIR / + +COPY .docker/apache2/soshot.conf /etc/apache2/sites-available/soshot.conf +RUN a2dissite 000-default.conf && a2ensite soshot.conf && a2enmod rewrite + +RUN echo '*/4 * * * * www-data php /var/www/bin/thumbShoter.php' > /etc/cron.d/soshot && chmod 0644 /etc/cron.d/soshot && crontab /etc/cron.d/soshot + +EXPOSE 80 +VOLUME soshot_datas + +WORKDIR /var/www/ + +ENTRYPOINT "start.sh" + +# Build image +# docker build -t soshot:0.2.0 . +# Run container +# docker run -v soshot_datas:/var/www/datas -v soshot_cache_img:/var/www/cache/img -e TZ=UTC -p 8080:80 --name soshot soshot:0.2.0 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d258030 --- /dev/null +++ b/README.md @@ -0,0 +1,176 @@ +# !!!! Be careful !!!! +## Use at your own risk + + +Soshot make webshot of internet page with headless machine. + + +## Ideas + + - If webshot exist in desired size, serve them, if not, verif if complete exist, if exist, crop and resize, save and serve + - If webshot not exist get information of page and add in the queue + - Cron job take a webshot of complete page and save them (1920 x complete lenth) + - Crop image and resize desired format (1920x1080, 1280x720, 160x90 ...), save and serve + +SoShot always make complete webshot (1920x page lenght) + first demande size. + +Size use 16/9 ratio : + + + - fav = define by config (default 48px) + - og = define by the website himself (no resize or crop) + - thumb = 160x90 + - hd = 1280x720 + - full = 1920x1080 + - complete = 1920xpage height + +## Requirements + + - PHP 8.* + - Sqlite3 + - PDO + - Composer + - Imagick + - PHP-GD + - CRON + - Chrome / Chromium + +## Installation + +Make directory on your web server and go in + +` +mkdir /var/www/soshot && cd /var/www/soshot +` + +Clone git repo + +` +git clone https://forge.leslibres.org/Knah-Tsaeb/Soshot.git . +` + +Install dependencies + +` +composer install --no-dev +` + +Add cron task + + +` +sudo crontab -u www-data -e +` + + +` +php /var/www/soshot/bin/thumbShoter.php +` + +Configure your web server to serve in "public" directory + +Go to web page +https://shoshot.your-domain.tld + +## Configuration + +You can use a web interface (if option "use web gui" is set to true), https://shoshot.your-domain.tld/backend?page=settings + +Or you can modify config file /datas/config.json. + +#### Accept only request from 127.0.0.1 + +Default : true + +ShoShot only work for local machine, return 404 if use with remote machine. + +#### Use web gui + +Default : false + +Soshot only work with endpoint /api. Return 404 if endpoint is not /api + +#### Use log + +Default : true + +Not implemented yet. + +#### Always make PDF + +Default : false + +If true, SoShot make a complete webshot and PDF of page. + +#### Favicon size + +Default : 48 + +Define size of favicon. + +#### Permit type of webshot + +Default : none + +Select authorized size or type of webshot. + +#### Cache expiration (for web GUI) in hour + +Default : 12 + +Not implemented yet. + +#### Maximum work per batch + +Default : 5 + +Foreach cron task as launch, SoShot make 5 webshot. + +#### Api key + +Default : random string, lenght 12 + +!!! DANGER !!! + +If you change key, all previous generation will be invalid. Soshot re make all previous generation. + +#### Password + +Default : null + +Password for admin interface. No min or max character. + +#### Chrome path + +Default : empty + +If path of Chrome/Chromium is not in PATH, you can define here. + +## Usage + +For generating webshot the entry point is https://shoshot.your-domain.tld/api? + +You need to define 3 parameters : + + - type (fav, og, pdf, thumb, hd, full, complete) + - hmac (hash_hmac('sha1', url of page, your Api key);) + - url (url of page encode with url_encode) + + +Example : https://shoshot.your-domain.tld/api?type=fav&hmac=44a2b3f1bc43895c23779f4e71558e9976a4daf2&url=https%3A%2F%2Ffr.wikipedia.org%2Fwiki%2FLogiciel_libre + +## License + +GNU General Public License v3.0 + +See LICENSE file for more detail. + +**Thanks** + + - [W3c](https://www.w3schools.com/w3css/) for w3.css + - [Fork Awesome](https://forkaweso.me/Fork-Awesome/) for icon + - [embed/embed](https://github.com/oscarotero/Embed) for embed (fav and og) + - [hassankhan/config](https://github.com/hassankhan/config) for config (config mananger) + - [chrome-php/chrome](https://github.com/chrome-php/chrome) for chrome-php (wrapper for chrome dev-tool) + - [stefangabos/zebra_image](https://github.com/stefangabos/Zebra_Image) for zebra-image (resize and manipulate image) + - [guzzlehttp/psr7](https://github.com/guzzle/psr7) for psr7 (PSR7 implement) \ No newline at end of file diff --git a/app/Controllers/Backend.php b/app/Controllers/Backend.php new file mode 100644 index 0000000..f09e107 --- /dev/null +++ b/app/Controllers/Backend.php @@ -0,0 +1,299 @@ +loginPassword)) { + if (!Login::login($params->loginPassword, $conf->password)) { + $content = $this->showLogin(); + return $content; + } + } + + if (!Login::isLogin()) { + $content = $this->showLogin(); + return $content; + } + + if (!empty($params->page)) { + $this->page = $params->page; + } + + if (file_exists(__DIR__ . '/../../cache/tmp/chrome-php-socket')) { + $this->runningJob = true; + } + + if (!empty($params->showImg)) { + $img = new ShowImg($params->type, $params->showImg, $conf->fileFormat); + exit(); + } + + $this->conf = $conf; + $this->params = $params; + + if ($this->page === 'settings') { + if (isset($_SESSION['firstRun']) && $_SESSION['firstRun'] === 1) { + $conf->webPage = false; + $this->title = 'Install'; + $this->conf->key = bin2hex(random_bytes(12)); + $this->passwordRequired = "required"; + } + + if (isset($this->params->token) && Page::verifToken($this->params->token)) { + $this->conf = $this->setOption($params); + } + } + + ob_start(); + require_once __DIR__ . '/../../tpl/nav.php'; + + if ($this->page === 'infos') { + $this->showInfos(); + } else { + $this->showSettings(); + } + require_once __DIR__ . '/../../tpl/footer.php'; + $content = ob_get_contents(); + ob_end_clean(); + return $content; + } + + /** + * Displays information about the generated data. + * + * This method sets the start and end index for the data to display based on the + * provided parameters. It retrieves the data list, total count, error count, and + * queue count from the `DataBase` class. It calculates the start, maximum, next, + * and previous index values for pagination. It then requires the 'infos.php' + * template to display the information. + * + * @return void + */ + private function showInfos() { + if (!empty($this->params->start)) { + $this->start = $this->params->start; + } + + if (!empty($this->params->end)) { + $this->end = $this->max + $this->start; + } + + $conx = new DataBase(); + $genList = $conx->getList($this->start, $this->end); + $total = $conx->getTotal(); + $inError = $conx->getInError(); + $inQueue = $this->getInQueue(); + $start = $this->start; + $max = $this->max; + $next = $start + $max; + $previous = $start - ($max); + + if (count($genList) < $this->max) { + $next = $start; + } + + if ($previous < 0) { + $previous = 0; + } + + require __DIR__ . '/../../tpl/infos.php'; + } + + /** + * Displays the settings page. + * + * This method sets the start and end index for the data to display based on the + * provided parameters. It retrieves the data list and total count from the + * `DataBase` class. It calculates the start and maximum index values for + * pagination. It generates a CSRF token using the `Page::genToken` method. It + * then requires the 'settings.php' template to display the settings page. + * + * @return void + */ + private function showSettings() { + if (!empty($this->params->start)) { + $this->start = $this->params->start; + } + + if (!empty($this->params->end)) { + $this->end = $this->max + $this->start; + } + + if ($this->start < 0) { + $this->start = 0; + } + $conx = new DataBase(); + $genList = $conx->getList($this->start, $this->end); + $total = $conx->getTotal(); + $start = $this->start; + $max = $this->max; + $token = Page::genToken(); + + require __DIR__ . '/../../tpl/settings.php'; + } + + /** + * Sets and saves user configuration options. + * + * This method checks if the configuration file exists and creates an empty one if + * it doesn't. It then loads the user configuration from the file using the `Config` + * class. It sets various configuration options based on the provided `$post` + * parameter, such as server settings, logging, PDF generation, icon size, cache + * expiration, maximum generations per batch, permit types, file format, password, + * key, and Chrome path. It saves the updated configuration to the file using the + * `Config` class. Finally, it loads the updated configuration from the file and + * returns it as an object. + * + * @param object $post The POST data containing the configuration options. + * + * @return object The updated configuration object. + */ + private function setOption(object $post): object { + if (!file_exists(__DIR__ . '/../../datas/config.json')) { + file_put_contents(__DIR__ . '/../../datas/config.json', json_encode([])); + unset($_SESSION['login']); + unset($_SESSION['firstRun']); + } + + $userConfig = __DIR__ . '/../../datas/config.json'; + $uConfig = new Config($userConfig); + + if (empty($post->onlyLocalServer)) { + $uConfig['onlyLocalServer'] = false; + } else { + $uConfig['onlyLocalServer'] = true; + } + + if (empty($post->webPage)) { + $uConfig['webPage'] = false; + } else { + $uConfig['webPage'] = true; + } + + if (empty($post->log)) { + $uConfig['log'] = false; + } else { + $uConfig['log'] = true; + } + + if (empty($post->alwaysMakePdf)) { + $uConfig['alwaysMakePdf'] = false; + } else { + $uConfig['alwaysMakePdf'] = true; + } + + if (!empty($post->icoSize)) { + $uConfig['icoSize'] = (int)$post->icoSize; + } + + if (!empty($post->expireCache)) { + $uConfig['expireCache'] = (int)$post->expireCache; + } + + if (!empty($post->maxGenPerBatch)) { + $uConfig['maxGenPerBatch'] = (int)$post->maxGenPerBatch; + } + + if (!empty($post->permitType)) { + $uConfig['permitType'] = $post->permitType; + } else { + $uConfig['permitType'] = []; + } + + if (!empty($post->fileFormat)) { + $uConfig['fileFormat'] = $post->fileFormat; + } + + if (!empty($post->password)) { + $uConfig['password'] = password_hash($post->password, PASSWORD_DEFAULT); + } + + if (!empty($post->key)) { + $uConfig['key'] = $post->key; + } + + if (!empty($post->chromePath)) { + $uConfig['chromePath'] = $post->chromePath; + } else { + $uConfig['chromePath'] = ''; + } + + $uConfig->toFile($userConfig); + + $newConfig = new Config($userConfig); + return (object)$newConfig->all(); + } + + /** + * Gets the number of files in the queue directory. + * + * This method uses the `glob` function to search for JSON files in the queue + * directory. If any files are found, it returns the count of files. Otherwise, + * it returns 0. + * + * @return int The number of files in the queue directory. + */ + private function getInQueue(): int { + if (glob(__DIR__ . '/../../cache/queue/*.json') != false) { + $fileCount = count(glob(__DIR__ . '/../../cache/queue/*.json')); + } else { + $fileCount = 0; + } + return $fileCount; + } + + /** + * Displays the login page. + * + * This method generates a CSRF token using the `Page::genToken` method. It then + * requires the 'login.php' template to display the login page. Finally, it returns + * the generated HTML content as a string. + * + * @return string The generated HTML content for the login page. + */ + private function showLogin(): string { + ob_start(); + $token = Page::genToken(); + require_once __DIR__ . '/../../tpl/login.php'; + $content = ob_get_contents(); + ob_end_clean(); + return $content; + } +} diff --git a/app/Controllers/GenHmac.php b/app/Controllers/GenHmac.php new file mode 100644 index 0000000..3f6059e --- /dev/null +++ b/app/Controllers/GenHmac.php @@ -0,0 +1,8 @@ +url, $conf['key']); + } +} \ No newline at end of file diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php new file mode 100644 index 0000000..6e635d7 --- /dev/null +++ b/app/Controllers/Home.php @@ -0,0 +1,16 @@ +type) || + !isset($params->hmac) || + !isset($params->url) + ) { + $error = new Error(); + $error->index((object)['status' => 400, 'message' => 'Missing parameters']); + } + + if (!in_array($params->type, $conf->permitType)) { + $error = new Error(); + $error->index((object)['status' => 400, 'message' => 'Wrong type']); + } + + if ($params->type === 'fav') { + $favicon = new GetFav($params, $conf); + $favicon->show(); + } elseif ($params->type === 'og') { + $favicon = new GetOg($params, $conf); + $favicon->show(); + } else { + $result = new GetThumb($params, $conf); + $result->show(); + } + } +} diff --git a/app/DataBase/DataBase.php b/app/DataBase/DataBase.php new file mode 100644 index 0000000..7df577e --- /dev/null +++ b/app/DataBase/DataBase.php @@ -0,0 +1,273 @@ + '', + 'url' => '', + 'complete' => '', + 'full' => '', + 'hd' => '', + 'nhd' => '', + 'thumb' => '', + 'fav' => '', + 'og' => '', + 'pdf' => '', + 'created' => '' + ]; + + + /** + * Constructs a new instance of the DataBase class. + * + * This method creates a new SQLite database connection and sets the default fetch + * mode to PDO::FETCH_ASSOC. It also sets the error mode to PDO::ERRMODE_EXCEPTION. + * If the database file does not exist, it creates a new table named 'soshot' with + * the specified schema. If the $params parameter is not empty, the setParams() + * method is called to set the object's properties. + * + * @param object $params An associative array of parameters to set the object's + * properties. + * + * @return DataBase The constructed DataBase object. + */ + function __construct($params = null) { + try { + if (!file_exists($this->dataBase)) { + $this->db = new PDO('sqlite:' . $this->dataBase); + $this->db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); + $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION, PDO::ERRMODE_WARNING); // ERRMODE_WARNING | ERRMODE_EXCEPTION | ERRMODE_SILENT + + $this->db->query("CREATE TABLE IF NOT EXISTS soshot ( + id string PRIMARY KEY NOT NULL, + url text, + complete tinyint, + full tinyint, + hd tinyint, + nhd tinuyint, + thumb tinyint, + fav tinyint, + og tinyint, + pdf tinyint, + created DATETIME + );"); + } else { + $this->db = new PDO('sqlite:' . $this->dataBase); + $this->db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); + $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // ERRMODE_WARNING | ERRMODE_EXCEPTION | ERRMODE_SILENT + + $this->updateTable(); + } + } catch (Exception $e) { + echo $e->getMessage(); + die(); + } + + if (!empty($params)) { + $this->setParams($params); + } + return $this; + } + + + public function updateTable() { + $stmt = $this->db->prepare("SELECT * FROM soshot LIMIT 1;"); + $stmt->execute(); + $existingColumns = $stmt->fetch(PDO::FETCH_ASSOC); + + if (empty($existingColumns)) { + return true; + } + + $existingColumns = array_keys($existingColumns); + + $newColumns = array_diff(array_keys($this->params), $existingColumns); + + foreach ($newColumns as $column) { + $sql = "ALTER TABLE soshot ADD `{$column}` tinyint"; + $this->db->exec($sql); + } + } + + /** + * Sets the parameters for the database query. + * + * This method takes an object containing the parameters for the database query and + * sets the corresponding properties of the object. + * + * @param object $params An object containing the parameters for the database query. + * + * @return void + */ + public function setParams(object $params) { + $this->params = (object)$this->params; + $this->params->id = $params->hmac; + $this->params->url = $params->url; + $this->params->type = $params->type; + $this->params->created = date("Y-m-d H:i:s"); + $this->params = $this->params; + } + + /** + * Adds or updates a record in the database. + * + * This method takes an update value and an optional type parameter. If the type + * parameter is not empty, it sets the type property of the object. It then checks + * if a record with the same ID already exists in the database using the testExit + * method. If a record exists, it calls the update method to update the existing + * record. If no record exists, it calls the insert method to insert a new record. + * + * @param int $update The update value to be inserted or updated in the database. + * @param string $type The type of the update. + * + * @return void + */ + public function addUpdate(int $update, string $type = '') { + if (!empty($type)) { + $this->params->type = $type; + } + if ($this->testExit($this->params->id)) { + $this->update($update); + } else { + $this->insert($update); + } + } + + /** + * Inserts a new record into the database. + * + * This method prepares an SQL INSERT statement using the provided parameters, and + * executes it to insert a new record into the "soshot" table in the database. + * + * @param int $update The value to insert into the type column of the new record. + * + * @return void + */ + public function insert(int $update) { + $stmt = $this->db->prepare("INSERT INTO soshot (id, url, " . $this->params->type . ", created) VALUES + (:id, :url, :" . $this->params->type . ", :created)"); + //$stmt->debugDumpParams(); + + $result = $stmt->execute(array( + 'id' => $this->params->id, + 'url' => $this->params->url, + $this->params->type => $update, + 'created' => $this->params->created + )); + } + + /** + * Updates a record in the database. + * + * This method prepares an SQL UPDATE statement using the provided parameters, and + * executes it to update a record in the "soshot" table in the database. + * + * @param string $update The value to update in the type column of the record. + * + * @return void + */ + private function update(string $update) { + $stmt = $this->db->prepare("UPDATE soshot + SET " . $this->params->type . "=:" . $this->params->type . " + WHERE id=:id;"); + + $result = $stmt->execute([ + ':' . $this->params->type => $update, + ':id' => $this->params->id + ]); + } + + /** + * Checks if a record with the given ID exists in the database. + * + * This method prepares an SQL SELECT statement using the provided ID, and executes + * it to retrieve the corresponding record from the "soshot" table in the database. + * If a record is found, the method returns true. Otherwise, it returns false. + * + * @param string $id The ID of the record to check. + * + * @return bool True if a record with the given ID exists in the database, false otherwise. + */ + private function testExit(string $id): bool { + $stmt = $this->db->prepare("SELECT id FROM soshot WHERE id=:id LIMIT 1;"); + $stmt->execute(array(':id' => $id)); + $result = $stmt->fetchAll(PDO::FETCH_OBJ); + if (!empty($result)) { + return true; + } + return false; + } + + /** + * Retrieves the total number of records in the "soshot" table. + * + * This method prepares an SQL SELECT statement to retrieve the total number of + * records in the "soshot" table, executes the statement, and returns the result. + * + * @return int The total number of records in the "soshot" table. + */ + public function getTotal(): int { + $stmt = $this->db->prepare("SELECT COUNT(id) AS nb FROM soshot;"); + $stmt->execute(); + $result = $stmt->fetch(); + return $result['nb']; + } + + /** + * Retrieves the number of records with errors in the "soshot" table. + * + * This method prepares an SQL SELECT statement to retrieve the number of records + * with errors in the "soshot" table, executes the statement, and returns the result. + * + * @return int The number of records with errors in the "soshot" table. + */ + public function getInError(): int { + $stmt = $this->db->prepare("SELECT COUNT(DISTINCT id) AS nb FROM soshot WHERE + complete = 2 OR + full = 2 OR + hd = 2 OR + nhd = 2 OR + thumb = 2 OR + fav = 2 OR + og = 2 OR + pdf = 2;"); + $stmt->execute(); + $result = $stmt->fetch(); + return $result['nb']; + } + + /** + * Retrieves a list of records from the "soshot" table. + * + * This method prepares an SQL SELECT statement to retrieve a list of records from + * the "soshot" table, based on the specified start and end indices, orders the + * results by the "created" column in descending order, executes the statement, and + * returns the result set as an array of objects. + * + * @param int $start The starting index of the record to retrieve. + * @param int $end The ending index of the record to retrieve. + * + * @return array An array of objects representing the records in the "soshot" table. + */ + public function getList(int $start, int $end) { + $stmt = $this->db->prepare("SELECT * FROM soshot ORDER BY created DESC limit :start, :end;"); + $stmt->execute(array(':start' => $start, ':end' => $end)); + $result = $stmt->fetchAll(PDO::FETCH_OBJ); + return $result; + } +} diff --git a/app/Router.php b/app/Router.php new file mode 100644 index 0000000..1f84731 --- /dev/null +++ b/app/Router.php @@ -0,0 +1,71 @@ +routes = []; + } + + public function addRoute($paths, $controller, $method = 'GET') { + + if (!is_array($paths)) { + $paths = [$paths]; + } + + foreach ($paths as $path) { + $this->routes[$path] = [ + 'controller' => $controller, + 'method' => $method + ]; + } + } + + public function match() { + $path = $_SERVER['REQUEST_URI']; + $parts = parse_url($path); + $this->path = $parts['path']; + + $this->requestMethod = $_SERVER['REQUEST_METHOD']; + + if (isset($this->routes[$this->path])) { + return true; + } + return false; + } + + public function render($conf) { + if ($this->requestMethod === 'GET') { + $this->params = (object)$_GET; + } elseif ($this->requestMethod === 'POST') { + $this->params = (object)$_POST; + } else { + $error = new Error(); + $error->index((object)['status' => 405, 'message' => 'Method not allowed']); + } + + if ($conf->webPage === false && $this->path !== '/api') { + $error = new Error(); + $error->index((object)['status' => 404, 'message' => 'The page that you have requested could not be found.']); + } + + if ($this->path === '/debug') { + require_once __DIR__ . '/../bin/thumbShoter.php'; + exit(); + } + + $className = '\\' . $this->routes[$this->path]['controller']; + $controllerInstance = new $className(); + $content = $controllerInstance->index($this->params, $conf); + if (in_array($className, ['\App\Controllers\Home', '\App\Controllers\Backend']) && empty($this->params->showImg)) { + require_once __DIR__ . '/../tpl/bone.php'; + } + } +} diff --git a/app/Soshot/GetFav.php b/app/Soshot/GetFav.php new file mode 100644 index 0000000..febc379 --- /dev/null +++ b/app/Soshot/GetFav.php @@ -0,0 +1,104 @@ +filePath)) { + mkdir($this->demande->filePath); + } + + try { + $embed = new Embed(); + $info = $embed->get($this->demande->url); + + if (!is_null($info->favicon)) { + if (!$favicon = @file_get_contents($info->favicon)) { + copy(__DIR__ . '/../../src/images/error_fav.' . $this->fileFormat, $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + return true; + } + } elseif (!is_null($info->icon)) { + if (!$favicon = @file_get_contents($info->icon)) { + copy(__DIR__ . '/../../src/images/error_fav.' . $this->fileFormat, $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + return true; + } + } else { + copy(__DIR__ . '/../../src/images/error_fav.' . $this->fileFormat, $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + return true; + } + + file_put_contents($this->demande->requestImg, $favicon); + + $realMimeType = mime_content_type($this->demande->requestImg); + + if ($realMimeType === 'image/vnd.microsoft.icon') { + ConvertIco::convert($this->demande, $this->conf->icoSize); + } + + if ($realMimeType === 'image/svg+xml') { + ConvertIco::convert($this->demande, $this->conf->icoSize); + } + + $image = new Zebra_Image(); + $image->source_path = $this->demande->requestImg; + $image->target_path = $this->demande->requestImg; + $image->preserve_time = false; + $image->enlarge_smaller_images = false; + $image->resize($this->conf->icoSize, $this->conf->icoSize, ZEBRA_IMAGE_CROP_TOPLEFT); + } catch (\Exception $e) { + $this->db->addUpdate(2, $this->type); + copy(__DIR__ . '/../../src/images/error_fav.png', $this->demande->requestImg); + return true; + } + + if (!is_file($this->demande->requestImg)) { + copy(__DIR__ . '/../../src/images/error_fav.png', $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + return true; + } else { + $this->db->addUpdate(1, $this->type); + } + } + + /** + * Displays the requested image. + * + * This method checks if the requested image file exists. If the requested image is + * a favicon and does not exist, it calls the makeFavicon method to generate it. + * Then, it sets the appropriate headers for the image and outputs its contents. + * + * @return void + */ + public function show() { + if (!file_exists($this->requestImg) && $this->type === 'fav') { + $this->makeFavicon(); + } + //echo ''; + header("Content-type: image/$this->fileFormat"); + header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT'); + echo file_get_contents($this->requestImg); + exit(); + } +} diff --git a/app/Soshot/GetOg.php b/app/Soshot/GetOg.php new file mode 100644 index 0000000..7085662 --- /dev/null +++ b/app/Soshot/GetOg.php @@ -0,0 +1,89 @@ +filePath)) { + mkdir($this->demande->filePath); + } + + try { + $embed = new Embed(); + $info = $embed->get($this->demande->url); + + if (!is_null($info->image)) { + if (!$image = file_get_contents($info->image)) { + copy(__DIR__ . '/../../src/images/error_thumb.png', $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + return true; + } + } else { + copy(__DIR__ . '/../../src/images/error_thumb.png', $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + return true; + } + + if (empty($image)) { + copy(__DIR__ . '/../../src/images/error_thumb.png', $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + return true; + } + + file_put_contents($this->demande->requestImg, $image); + + if (in_array(mime_content_type($this->demande->requestImg), ['image/jpg', 'image/jpeg', 'image/bmp', 'image/webp']) && $this->fileFormat === 'png') { + // @todo convertToWebp convertToJpg + ConvertToPng::convertToPng($this->demande); + } + } catch (\Exception $e) { + copy(__DIR__ . '/../../src/images/error_thumb.png', $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + } + if (!is_file($this->demande->requestImg)) { + copy(__DIR__ . '/../../src/images/error_thumb.png', $this->demande->requestImg); + $this->db->addUpdate(2, $this->type); + } else { + $this->db->addUpdate(1, $this->type); + } + } + + /** + * Display the OG image for a given URL. + * + * This method checks if the OG image file exists and if the type is 'og'. If the + * file does not exist, it calls the makeOg() method to generate the OG image. It + * then sets the appropriate headers and outputs the contents of the OG image file. + * + * @return void + */ + public function show() { + if (file_exists($this->requestImg) && $this->type === 'og') { + } else { + $this->makeOg(); + } + + //echo ''; + header("Content-type: " . mime_content_type($this->requestImg)); + header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT'); + echo file_get_contents($this->requestImg); + exit(); + } +} diff --git a/app/Soshot/GetThumb.php b/app/Soshot/GetThumb.php new file mode 100644 index 0000000..22f9809 --- /dev/null +++ b/app/Soshot/GetThumb.php @@ -0,0 +1,163 @@ +key); + $this->conf = $conf; + $this->receiveHmac = $params->hmac; + + if ($hmac->checkHmac($this->receiveHmac, $params->url) === false) { + $message = (object) ['status' => 404, 'message' => 'Wrong Hmac']; + $error = new Error(); + $error->index($message); + } + + $this->params = $params; + $this->type = $params->type; + $this->fileFormat = $this->conf->fileFormat; + $this->filePath = $hmac->makeFilePath($this->receiveHmac); + if ($this->type === 'pdf') { + $this->requestImg = $this->filePath . $this->receiveHmac . '_' . $this->type . '.pdf'; + } else { + $this->requestImg = $this->filePath . $this->receiveHmac . '_' . $this->type . '.' . $this->fileFormat; + } + $this->complete = __DIR__ . '/../../cache/img/' . substr($this->params->hmac, 0, 4) . '/' . $this->params->hmac . '_complete.' . $this->fileFormat; + + $this->demande = (object)[ + 'url' => $this->params->url, + 'hmac' => $this->params->hmac, + 'filePath' => $this->filePath, + 'requestImg' => $this->requestImg, + 'type' => $this->params->type + ]; + + $this->db = new DataBase($this->demande); + + return $this; + } + + /** + * Display the requested image or PDF. + * + * This method checks if the requested file exists and serves it with the appropriate + * headers. If the requested file does not exist, it checks if a complete image exists + * and resizes it to the requested type. If neither the requested file nor a complete + * image exists, it adds a job to the queue to generate the requested image and serves + * a placeholder image. + * + * @return void + */ + public function show() { + if ($this->type === 'pdf' && file_exists($this->requestImg)) { + header("Content-type:application/pdf"); + header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT'); + header("Content-Disposition:attachment;filename=\"archive.pdf\""); + readfile($this->requestImg); + echo file_get_contents($this->requestImg); + exit(); + } else if (file_exists($this->requestImg) && in_array($this->type, ['complete', 'full', 'hd', 'nhd', 'thumb'])) { + header("Content-type: image/$this->fileFormat"); + header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT'); + echo file_get_contents($this->requestImg); + exit(); + } + if (file_exists($this->complete) && in_array($this->type, ['complete', 'full', 'hd', 'nhd', 'thumb'])) { + if (ResizeToDemande::makeDemande((object)[ + 'complete' => $this->complete, + 'filePath' => $this->requestImg, + 'type' => $this->type + ])) { + $this->db->addUpdate(1, $this->type); + header("Content-type: image/$this->fileFormat"); + header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT'); + echo file_get_contents($this->requestImg); + exit(); + } else { + // @todo log + } + exit(); + } else { + $json = json_encode([ + 'type' => $this->params->type, + 'hmac' => $this->params->hmac, + 'url' => $this->params->url, + 'filePath' => $this->requestImg, + 'complete' => __DIR__ . '/../../cache/img/' . substr($this->params->hmac, 0, 4) . '/' . $this->params->hmac . '_complete.' . $this->fileFormat + ]); + + $completeDemande = (object)[ + 'url' => $this->params->url, + 'hmac' => $this->params->hmac, + 'filePath' => $this->filePath, + 'requestImg' => $this->requestImg, + 'type' => 'complete' + ]; + $complete = new DataBase($completeDemande); + $complete->addUpdate(3, $this->type); + + if ($this->conf->alwaysMakePdf === true) { + $complete->addUpdate(3, 'pdf'); + } + + $this->addQueue($json); + + header("Content-type: image/png"); + header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT'); + if ($this->type === 'fav') { + echo file_get_contents(__DIR__ . '/../../src/images/error_fav.png'); + } else { + echo file_get_contents(__DIR__ . '/../../src/images/' . $this->type . '_generation_in_progress.jpg'); + } + exit(); + } + } + + /** + * Add a JSON object to the queue file. + * + * @param string $json The JSON object to add to the queue file. + * + * @return void + */ + private function addQueue($json) { + $file = $this->queuePath . $this->receiveHmac . '.json'; + $this->db->addUpdate(3, $this->type); + if (!file_exists($file)) { + file_put_contents($file, $json); + } + } +} diff --git a/app/Soshot/MakeThumb.php b/app/Soshot/MakeThumb.php new file mode 100644 index 0000000..640082a --- /dev/null +++ b/app/Soshot/MakeThumb.php @@ -0,0 +1,297 @@ +conf = (object)Config::load([__DIR__ . '/../../datas/config.default.json', '?' . __DIR__ . '/../../datas/config.json'])->all(); + $this->maxGenPerBatch = $this->conf->maxGenPerBatch; + + $this->chromePath = $this->conf->chromePath; + + foreach (array_slice(glob($this->queuePath . "*.json"), 0, $this->maxGenPerBatch) as $filename) { + $this->fileList[] = $filename; + } + + foreach ($this->fileList as $demande) { + $this->demandes[] = json_decode(file_get_contents($demande)); + } + $this->db = new DataBase(); + } + + /** + * Processes the demands in the queue. + * + * This method iterates over the list of demands in the `$demandes` property. + * For each demand, it sets the parameters for the `DataBase` object, writes the HMAC + * to a temporary file, and checks if the demand is already complete. + * + * If the demand is complete and not a PDF, it resizes the image to the demanded size using the + * `ResizeToDemande` class. + * + * If the demand is not complete, it generates the complete image using the `makeComplete` method. + * + * In either case, it deletes the demand from the queue using the `deleteQueue` method and + * updates the database using the `addUpdate` method. + * + * Finally, it sets the `$open` property to `true` to indicate that the queue is open. + * If the `$open` property is `true`, it generates a complete + * image for all demands in the queue using the `makeComplete` method. + * + * @return void + */ + public function compute() { + foreach ($this->demandes as $demande) { + $this->db->setParams($demande); + file_put_contents('/tmp/soshot_queue', $demande->hmac); + + // todo verif permit type + + if ($this->testComplete($demande->complete) && $demande->type !== 'pdf') { + if (ResizeToDemande::makeDemande($demande)) { + $this->deleteQueue($demande->hmac); + $this->db->addUpdate(1, $demande->type); + } + } else { + $this->makeComplete($demande); + if ($demande->type !== 'pdf') { + if (!ResizeToDemande::makeDemande($demande)) { + // todo log + } + } + $this->deleteQueue($demande->hmac); + $this->db->addUpdate(1, $demande->type); + + $completeDemande = (object)[ + 'hmac' => $demande->hmac, + 'url' => $demande->url, + 'type' => 'complete' + ]; + $complete = new DataBase($completeDemande); + $complete->addUpdate(1, $demande->type); + } + $this->open = true; + + if ($this->open === true) { + $this->makeComplete(null, true); + } + } + } + + /** + * Deletes a demand from the queue. + * + * This method takes an HMAC as a parameter and deletes the corresponding JSON file + * from the queue directory using the `unlink` function. + * + * @param string $hmac The HMAC of the demand to delete. + * + * @return void + */ + private function deleteQueue(string $hmac) { + if (file_exists($this->queuePath . $hmac . '.json')) { + unlink($this->queuePath . $hmac . '.json'); + } + } + + /** + * Checks if a file exists. + * + * This method takes a file path as a parameter and checks if the file exists using + * the `file_exists` function. It returns `true` if the file exists, and `false` + * otherwise. + * + * @param string $complete The file path to check. + * + * @return bool `true` if the file exists, `false` otherwise. + */ + private function testComplete(string $complete): bool { + if (file_exists($complete)) { + return true; + } + return false; + } + + /** + * Generates a complete image or PDF for a demand. + * + * This method takes a demand object as a parameter and generates a complete image + * or PDF for the demand. + * + * If the `$close` parameter is set to `true`, it closes the browser and deletes the socket file. + * The method first checks if a socket file exists and connects to an existing browser if it does. + * + * If not, it creates a new browser instance using the `BrowserFactory` class. + * + * It then navigates to the URL specified in the demand and takes a screenshot of the page. + * + * If the demand type is 'pdf' or the `alwaysMakePdf` configuration option is set to `true`, it also + * generates a PDF of the page. + * + * Finally, it saves the screenshot and PDF to the appropriate file paths and + * updates the database using the `addUpdate` method. + * + * If an `OperationTimedOut` exception is thrown, it logs the error, closes the browser, + * deletes the socket file, copies an error image to the file path, and updates the + * database with an error status. + * + * @param object|null $demande The demand object containing the URL, HMAC, file path, and type of the demand. + * @param bool $close Whether to close the browser and delete the socket file after + * generating the complete image or PDF. Defaults to `false`. + * + * @return void + */ + private function makeComplete(object|null $demande, bool $close = false) { + if (file_exists($this->fileSocket)) { + $socket = \file_get_contents($this->fileSocket); + try { + $browser = BrowserFactory::connectToBrowser($socket); + } catch (BrowserConnectionFailed $e) { + $browser = $this->openBrowser(); + } + } else { + $factory = new BrowserFactory($this->chromePath); + $browser = $factory->createBrowser([ + 'userAgent' => 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', + 'keepAlive' => true, + 'headless' => true, + 'windowSize' => [1920, 1080], + 'userDataDir' => $this->tmpDir, + 'customFlags' => [ + '--disable-dev-shm-usage', + '--disable-gpu' + ], + 'noSandbox' => true, + //'connectionDelay' => 0.8, // add 0.8 second of delay between each instruction sent to chrome, + //'debugLogger' => 'php://stdout', + ]); + \file_put_contents($this->fileSocket, $browser->getSocketUri(), LOCK_EX); + } + + if ($close === true) { + $socket = \file_get_contents($this->fileSocket); + $browser = BrowserFactory::connectToBrowser($socket); + $browser->close(); + unlink($this->fileSocket); + return true; + } + + $dir = $this->thumbPath . substr($demande->hmac, 0, 4) . '/'; + + if (!is_dir($dir)) { + mkdir($dir); + } + + try { + $page = $browser->createPage(); + $page->navigate($demande->url)->waitForNavigation(Page::LOAD, 15000); + sleep(4); + + $page->screenshot([ + 'captureBeyondViewport' => true, + 'clip' => $page->getFullPageClip(), + 'format' => $this->conf->fileFormat, + ])->saveToFile($demande->complete); + + if ($demande->type === 'pdf' || $this->conf->alwaysMakePdf === true) { + if ($this->conf->alwaysMakePdf === true) { + $pdfFile = str_replace($demande->type, 'pdf', $demande->filePath); + $pdfFile = str_replace($this->conf->fileFormat, 'pdf', $pdfFile); + } else { + $pdfFile = $demande->filePath; + } + + $page->pdf([ + 'printBackground' => true, + 'displayHeaderFooter' => true, + 'paperWidth' => 8.268, + 'paperHeight' => 11.693, + 'scale' => 1 + ])->saveToFile($pdfFile); + + if ($this->conf->alwaysMakePdf === true) { + $this->db->addUpdate(1, 'pdf'); + } + } + $this->db->addUpdate(1, 'complete'); + } catch (OperationTimedOut $e) { + // todo log + $socket = \file_get_contents($this->fileSocket); + $browser = BrowserFactory::connectToBrowser($socket); + $browser->close(); + unlink($this->fileSocket); + copy(__DIR__ . '/../../src/images/error_thumb.png', $demande->filePath); + $this->db->addUpdate(2, $demande->type); + } + } + + /** + * Creates and opens a new browser instance. + * + * This method creates a new browser instance using the `BrowserFactory` class with + * the specified configuration options. It then saves the socket URI to a file and + * returns the browser instance. + * + * @return Browser The created browser instance. + */ + private function openBrowser(): Browser { + $factory = new BrowserFactory($this->chromePath); + + // Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) + $browser = $factory->createBrowser([ + 'userAgent' => 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', + 'keepAlive' => true, + 'headless' => true, + 'windowSize' => [1920, 1080], + 'userDataDir' => $this->tmpDir, + 'customFlags' => [ + '--disable-dev-shm-usage', + '--disable-gpu' + ], + 'noSandbox' => true, + ]); + + \file_put_contents($this->fileSocket, $browser->getSocketUri(), LOCK_EX); + return $browser; + } +} \ No newline at end of file diff --git a/app/Utils/ConvertIco.php b/app/Utils/ConvertIco.php new file mode 100644 index 0000000..d858402 --- /dev/null +++ b/app/Utils/ConvertIco.php @@ -0,0 +1,28 @@ +requestImg, $demande->requestImg . '.ico'); + $icoFile = $demande->requestImg . '.ico'; + + if (empty(Imagick::queryFormats("ICO"))) { + throw new \Exception('Unsupported format'); + } + + $im = new Imagick($icoFile); + $targetWidth = $targetHeight = $size; + + if ($im->getImageWidth() <> $targetWidth || $im->getImageHeight() <> $targetHeight) { + $im->cropThumbnailImage($targetWidth, $targetHeight); + } + + $im->writeImage($demande->requestImg); + unlink($icoFile); + } +} diff --git a/app/Utils/ConvertStatus.php b/app/Utils/ConvertStatus.php new file mode 100644 index 0000000..66011b0 --- /dev/null +++ b/app/Utils/ConvertStatus.php @@ -0,0 +1,17 @@ +'; + } elseif ($status === 2) { + echo ''; + } elseif ($status === 3) { + echo ''; + } else { + echo ''; + } + } +} diff --git a/app/Utils/ConvertToPng.php b/app/Utils/ConvertToPng.php new file mode 100644 index 0000000..47ff874 --- /dev/null +++ b/app/Utils/ConvertToPng.php @@ -0,0 +1,17 @@ +requestImg, $demande->requestImg . '.tmp'); + $tmpFile = $demande->requestImg . '.tmp'; + + + if (!imagepng(imagecreatefromstring(file_get_contents($tmpFile)), $demande->requestImg)) { + } + unlink($tmpFile); + } +} diff --git a/app/Utils/Domains.php b/app/Utils/Domains.php new file mode 100644 index 0000000..e65cb9b --- /dev/null +++ b/app/Utils/Domains.php @@ -0,0 +1,11 @@ +status); + echo "

404 Not Found

"; + echo "$error->message"; + exit(); + } +} \ No newline at end of file diff --git a/app/Utils/Hmac.php b/app/Utils/Hmac.php new file mode 100644 index 0000000..440993c --- /dev/null +++ b/app/Utils/Hmac.php @@ -0,0 +1,36 @@ +key = $key; + } + + public function makeHmac($url) { + return hash_hmac('sha1', $url, $this->key); + } + + private function makeHashPath($hashUrl) { + $this->hashPath = substr($hashUrl, 0, 4) . '/'; + return $this->hashPath; + } + + public function makeFilePath($hmac) { + $this->filePath = $this->basePath . $this->makeHashPath($hmac); + return $this->filePath; + } + + public function checkHmac($receiveHmac, $url) { + if ($receiveHmac === $this->makeHmac($url, $this->key)) { + return true; + } else { + return false; + } + } +} diff --git a/app/Utils/Page.php b/app/Utils/Page.php new file mode 100644 index 0000000..82b8034 --- /dev/null +++ b/app/Utils/Page.php @@ -0,0 +1,43 @@ +source_path = $demande->complete; + $image->target_path = $demande->filePath; + $image->preserve_time = false; + $image->enlarge_smaller_images = false; + + if ($demande->type === 'full') { + $image->resize(1920, 1080, ZEBRA_IMAGE_CROP_TOPLEFT); + return true; + } + + if ($demande->type === 'hd') { + $image->resize(1280, 720, ZEBRA_IMAGE_CROP_TOPLEFT); + return true; + } + + if ($demande->type === 'nhd') { + $image->resize(640, 360, ZEBRA_IMAGE_CROP_TOPLEFT); + return true; + } + + if ($demande->type === 'thumb') { + $image->resize(160, 90, ZEBRA_IMAGE_CROP_TOPLEFT); + return true; + } + return false; + } +} diff --git a/app/Utils/ShowImg.php b/app/Utils/ShowImg.php new file mode 100644 index 0000000..58e8c1f --- /dev/null +++ b/app/Utils/ShowImg.php @@ -0,0 +1,24 @@ +thumbPath . substr($hmac, 0, 4) . '/' . $hmac . '_' . $type . '.'.$fileFormat; + + header("Content-type: image/$fileFormat"); + header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT'); + + if (file_exists($img)) { + echo file_get_contents($img); + } else { + // todo not gen + echo file_get_contents(__DIR__ . '/../../src/images/error_thumb.png'); + } + exit(); + } +} diff --git a/bin/.htaccess b/bin/.htaccess deleted file mode 100644 index b584d98..0000000 --- a/bin/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Allow from none -Deny from all diff --git a/bin/000.png b/bin/000.png deleted file mode 100644 index 020a30c..0000000 Binary files a/bin/000.png and /dev/null differ diff --git a/bin/404.png b/bin/404.png deleted file mode 100644 index 8361e04..0000000 Binary files a/bin/404.png and /dev/null differ diff --git a/bin/cleanChromeCache.sh b/bin/cleanChromeCache.sh new file mode 100644 index 0000000..06aaf27 --- /dev/null +++ b/bin/cleanChromeCache.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +FILE=/var/www/cache/tmp/chrome-php-socket +if [ ! -f "$FILE" ]; then + cd /tmp/chrome_soshot + rm -R Default +fi \ No newline at end of file diff --git a/bin/cronTask.sh b/bin/cronTask.sh deleted file mode 100644 index b070ea2..0000000 --- a/bin/cronTask.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -queueDir="../cache/cronTask/" - -for file in $queueDir*.hash -do - if [ -f $file ]; - then - while read site hashUrl thumbSize sizeNameDir onlyThumb - do - bash thumb_server.sh "$site" "$hashUrl" "$thumbSize" "$sizeNameDir" "$onlyThumb" "0" - rm $file - done < $file - fi -done diff --git a/bin/loadingGen.png b/bin/loadingGen.png deleted file mode 100644 index 8264e66..0000000 Binary files a/bin/loadingGen.png and /dev/null differ diff --git a/bin/loadingGen_thumb.png b/bin/loadingGen_thumb.png deleted file mode 100644 index 8264e66..0000000 Binary files a/bin/loadingGen_thumb.png and /dev/null differ diff --git a/bin/mon.sh b/bin/mon.sh deleted file mode 100644 index 568267d..0000000 --- a/bin/mon.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -while [ 1 ] -do - clear - echo "#################################################" - echo "#################################################" - echo "#### Total request thumbshot : " $(ps -e | grep -v grep | grep thumb_server.sh | wc -l) && # count thumb_server.sh process - echo "#### Number of thumbshot are made now : " $(ps -e | grep -v grep | grep phantomjs | wc -l) && # count phantomjs process - echo "#### Number of test error now : " $(ps -e | grep -v grep | grep curl | wc -l) # count thumb_server.sh => curl process - echo "#################################################" - echo "######### PRESS CTRL+C FOR STOP MONITOR #########" - echo "#################################################" - - sleep 3 # 3 second between two refresh -done diff --git a/bin/phantomjs_x64 b/bin/phantomjs_x64 deleted file mode 100755 index af9e4ab..0000000 Binary files a/bin/phantomjs_x64 and /dev/null differ diff --git a/bin/phantomjs_x86 b/bin/phantomjs_x86 deleted file mode 100755 index fe1c904..0000000 Binary files a/bin/phantomjs_x86 and /dev/null differ diff --git a/bin/rasterize.js b/bin/rasterize.js deleted file mode 100644 index a0056f8..0000000 --- a/bin/rasterize.js +++ /dev/null @@ -1,26 +0,0 @@ -var page = new WebPage(), - address, output, size; - -if (phantom.args.length < 2) { - //console.log('Usage: rasterize.js URL filename'); - phantom.exit(); -} else { - address = phantom.args[0]; - output = phantom.args[1]; - page.settings.userAgent = 'SoShot Agent'; - page.viewportSize = { width: 1280, height: 1024 }; - - page.open(address, function (status) { - if (status !== 'success') { - //console.log('Unable to load the address!'); - page.close(); - phantom.exit(); - } else { - window.setTimeout(function () { - page.render(output); - page.close(); - phantom.exit(); - }, 300); - } - }); -} diff --git a/bin/thumbShoter.php b/bin/thumbShoter.php new file mode 100644 index 0000000..f5b8364 --- /dev/null +++ b/bin/thumbShoter.php @@ -0,0 +1,16 @@ +compute(); \ No newline at end of file diff --git a/bin/thumb_server.sh b/bin/thumb_server.sh deleted file mode 100755 index 59c4864..0000000 --- a/bin/thumb_server.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash -# inspirated source http://www.cambus.net/creating-thumbnails-using-phantomjs-and-imagemagick/ for global idea -# https://gist.github.com/rsvp/1171304 for httpstatus code -# All info at http://forge.leslibres.org/projects/soshot - -site=$1 # url for thumbshot -hashUrl=$2 # hash(url) is the name of final image -thumbSize=$3 # size of thumb widthxheight ex : 190x90 -sizeNameDir=$4 # name of size dir -onlyThumb=$5 # make only thumbshot no full size image -waitForResult=$6 # if true we try to make soon as possible or add to queue - -########################################## -##### DON'T EDIT THIS PARAM USE ##### -##### cache/config/serverOptions.php ##### -##### for overwrite options ##### -########################################## -maxThread=1 # max parralle work. For me the best is nb core - 1 -timeOut=60 # default time out, after this time the site are declared in error -log=false # log all generation success and error -randomSleep=`echo $((RANDOM%20))` -optimizeTool='' # external tool form optimize png -maxQueue=50 # max process in queue -currentProcess=$(ps -e | grep -v grep | grep thumb_ | wc -l) -firstLevel=${hashUrl:0:2} -secondLevel=${hashUrl:2:2} -startPath=$sizeNameDir/$firstLevel/$secondLevel/ -getArch=$(getconf LONG_BIT) -echo $getArch -if [ $site == "manual" ] -then - site=$(cat "../cache/tmp/manual.txt") - echo '' > "../cache/tmp/manual.txt" -fi - -mkdir -p "../cache/img/$startPath" - -if [ -f "../cache/config/serverOptions.php" ] -then - source "../cache/config/serverOptions.php" -fi - -if [ $currentProcess -gt $maxQueue ] -then - exit -fi - -if [ ! $waitForResult ] -then - sleep `echo $((RANDOM%20))` - while [[ `ps -e | grep -v grep | grep phantomjs | wc -l` -ge $maxThread ]] - do - sleep `echo $((RANDOM%20))` - done -fi - -start_time=`date +%s` -if [ $getArch -eq 64 ] -then - timeout $timeOut ./phantomjs_x64 --disk-cache=false --local-storage-path=bin/ --ignore-ssl-errors=true rasterize.js "$site" "../cache/tmp/$hashUrl.png" -else - timeout $timeOut ./phantomjs_x86 --disk-cache=false --local-storage-path=bin/ --ignore-ssl-errors=true rasterize.js "$site" "../cache/tmp/$hashUrl.png" -fi - - -if [ ! -f "../cache/tmp/$hashUrl.png" ] -then - echo 0 - errorCode=`echo $(curl -k --write-out %{http_code} --silent -S --connect-timeout $timeOut \--no-keepalive --output /dev/null $site)` - if [ $site == 'manual' ] - then - errorCode='manual' - fi - case $errorCode in - 000) cp "../bin/000.png" "../cache/img/$startPath""$hashUrl""_thumb.png" && cp "../bin/000.png" "../cache/img/$startPath""$hashUrl.png" ;; - 200) cp "../bin/error.png" "../cache/img/$startPath""$hashUrl""_thumb.png" && cp "../bin/error.png" "../cache/img/$startPath""$hashUrl.png" ;; - 404) cp "../bin/404.png" "../cache/img/$startPath""$hashUrl""_thumb.png" && cp "../bin/404.png" "../cache/img/$startPath""$hashUrl.png" ;; - *) cp "..bin/error.png" "../cache/img/$startPath""$hashUrl""_thumb.png" && cp "../bin/error.png" "../cache/img/$startPath""$hashUrl.png" ;; - esac - if $log - then - end_time=`date +%s` - logDate=`date +'[%a %d %b %Y] [%H:%M:%S]'` - if [ $errorCode == 200 ] - then - echo "none --- "$site" --- "$hashUrl" --- "$thumbSize" --- "$sizeNameDir" --- "$onlyThumb" --- true --- "$errorCode > "../cache/logs/retry/"$hashUrl".log" - else - echo "none --- "$site" --- "$hashUrl" --- "$thumbSize" --- "$sizeNameDir" --- "$onlyThumb" --- true --- "$errorCode > "../cache/logs/other/"$hashUrl".log" - fi - fi - exit -fi -if [ $onlyThumb == 1 ] -then - convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 -filter Lanczos -thumbnail "$thumbSize" "../cache/img/$startPath""$hashUrl""_thumb.png" - if [ $optimizeTool ] - then - eval $optimizeTool "../cache/img/$startPath""$hashUrl""_thumb.png" - fi -else - convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 "../cache/img/$startPath""$hashUrl.png" - convert "../cache/img/$startPath""$hashUrl.png" -filter Lanczos -thumbnail "$thumbSize" "../cache/img/$startPath""$hashUrl""_thumb.png" - if [ $optimizeTool ] - then - eval $optimizeTool "../cache/img/$startPath""$hashUrl""_thumb.png" "../cache/img/$startPath""$hashUrl.png" - fi -fi -rm "../cache/tmp/$hashUrl.png" - -if [ $onlyThumb ] -then - if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" ]] - then - echo 1 - else - echo 0 - fi -else - if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" && -f "../cache/img/$startPath""$hashUrl.png" ]] - then - echo 1 - else - echo 0 - fi -fi -if $log -then - end_time=`date +%s` - logDate=`date +'[%a %d %b %Y] [%H:%M:%S]'` - echo $logDate `expr $end_time - $start_time`s >> '../cache/logs/success.txt' -fi diff --git a/bin/index.html b/cache/img/.gitkeep similarity index 100% rename from bin/index.html rename to cache/img/.gitkeep diff --git a/cache/index.html b/cache/queue/.gitkeep similarity index 100% rename from cache/index.html rename to cache/queue/.gitkeep diff --git a/cache/tmp/.gitkeep b/cache/tmp/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..29d223e --- /dev/null +++ b/composer.json @@ -0,0 +1,14 @@ +{ + "require": { + "embed/embed": "^4.4.8", + "hassankhan/config": "^3.1", + "chrome-php/chrome": "^1.9", + "stefangabos/zebra_image": "^2.8.2", + "guzzlehttp/psr7": "^2.5" + }, + "autoload": { + "psr-4": { + "App\\": "app/" + } + } +} diff --git a/datas/config.default.json b/datas/config.default.json new file mode 100644 index 0000000..c3f2d16 --- /dev/null +++ b/datas/config.default.json @@ -0,0 +1,13 @@ +{ + "key": "", + "onlyLocalServer": true, + "webPage": false, + "log": true, + "alwaysMakePdf": false, + "permitType": [], + "expireCache": 12, + "maxGenPerBatch": 5, + "icoSize": 48, + "chromePath" : "", + "fileFormat" : "jpeg" +} \ No newline at end of file diff --git a/inc/.htaccess b/inc/.htaccess deleted file mode 100644 index b584d98..0000000 --- a/inc/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Allow from none -Deny from all diff --git a/inc/admin.php b/inc/admin.php deleted file mode 100644 index 73f968a..0000000 --- a/inc/admin.php +++ /dev/null @@ -1,250 +0,0 @@ - - - -
'; -if (isset($ui['ac']) && $ui['ac'] === 'delete') { - if (isset($ui['deleteUrl']) && testValidUrl($ui['deleteUrl']) !== true) { - unset($ui['deleteUrl']); - echo '
Not a valid url.
'; - } - echo ' -
-

- '; - if (empty($ui['deleteUrl'])) { - echo ''; - } else { - echo ''; - } - echo '

-

- - - -

-
'; - if (!empty($ui['deleteUrl'])) { - $ui['deleteUrl'] = trim(rawurldecode($ui['deleteUrl'])); - $ui['deleteUrl'] = rtrim($ui['deleteUrl'], '/'); - $hashUrl = sha1($GLOBALS['config']['salt'].$ui['deleteUrl']); - $imgUrl = pathForFile('m', $hashUrl); - echo '
-
-

- -

- Delete this thumb -
'; - } - -} -if (isset($ui['log']) && $ui['log'] === 'success') { - $logs = parseSuccessLog(); - if (!empty($logs)) { - $nbThumb = 0; - $nbThumb = count($logs['genTime']); - echo 'Total request : ', $nbThumb, '
'; - echo 'Moyenne per request : ', round(array_sum($logs['genTime']) / $nbThumb, 2), 's (min (', min($logs['genTime']), 's) max (', max($logs['genTime']), 's))
'; - } else { - echo 'No result'; - } - echo '

Clear success log

'; -} -if (isset($ui['log']) && ($ui['log'] === 'suspect' || $ui['log'] === 'retry' || $ui['log'] === 'other')) { - if (isset($ui['hash']) && !empty($ui['hash'])) { - $ui['hash'] = validHash($ui['hash']); - if (isset($ui['root']) && (int)$ui['root'] === 1) { - $success = tryRootDomain($ui['hash'], $ui['log']); - } - if (isset($ui['cache']) && (int)$ui['cache'] === 1) { - $success['filePath'] = pathForFile($ui['s'], $ui['hash']).'.png'; - $success['base64'] = 'data:image/png;base64,'.base64_encode(file_get_contents($success['filePath'])); - if (!file_exists($success['filePath'])) { - $success['base64'] = 'data:image/png;base64,'.base64_encode(file_get_contents('bin/error.png')); - } - } - if (isset($ui['keep']) && (int)$ui['keep'] === 1) { - keepThisThumb($ui['hash'], $ui['log']); - } - if (isset($ui['mGen']) && (int)$ui['mGen'] === 1) - $success = manualGen($ui['hash'], $ui['log']); - } - $logs = parseFailLog($ui['log']); - if (!empty($logs)) { - echo ''; - } else { - echo 'No result'; - } -} -echo ''; -if (!empty($success)) { - echo '
'; - echo ''; - echo '

'; - echo 'Try with root domain / '; - echo 'Keep this thumbshot'; - echo '
'; -} -?> \ No newline at end of file diff --git a/inc/index.php b/inc/index.php deleted file mode 100644 index 817b9f8..0000000 --- a/inc/index.php +++ /dev/null @@ -1,41 +0,0 @@ -
-

- -

-

- - -

-

- - -

-

- - -

-

- Homepage Contact -

-
-'; - echo '

This image will be removed in ', $GLOBALS['config']['expireCache'], 'h

'; - echo ''; - echo '

'; - if ($GLOBALS['config']['onlyThumb'] === false) { - echo '

'; - } - echo ''; -} diff --git a/inc/install.php b/inc/install.php deleted file mode 100644 index 7d205bf..0000000 --- a/inc/install.php +++ /dev/null @@ -1,32 +0,0 @@ - -
- This is the key for generate thumbnail whith GET method. Save it ! -

- -

-
-
-

- - -

-

- - -

-

- - - -

-
diff --git a/inc/login.php b/inc/login.php deleted file mode 100644 index 82608b9..0000000 --- a/inc/login.php +++ /dev/null @@ -1,11 +0,0 @@ -
-

- - -

-

- - - -

-
\ No newline at end of file diff --git a/index.php b/index.php deleted file mode 100644 index 6dd6b0d..0000000 --- a/index.php +++ /dev/null @@ -1,608 +0,0 @@ - '120x90', - 'm' => '200x160', - 'l' => '300x240', - 'xl' => '400x320', - 'xxl' => '500x400' -); -// Remove image older than 12 hours -$GLOBALS['config']['expireCache'] = 12; -// Disable exec command and use cron task -$GLOBALS['config']['disableExec'] = true; -// Enable log for success, suspect, error -$GLOBALS['config']['log'] = false; - -if (file_exists('cache/config/options.php')) { - require 'cache/config/options.php'; -} - -if (get_magic_quotes_gpc()) { - function stripslashes_deep($value) { - $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); - return $value; - } - - $_POST = array_map('stripslashes_deep', $_POST); - $_GET = array_map('stripslashes_deep', $_GET); - $_COOKIE = array_map('stripslashes_deep', $_COOKIE); -} - -if (!empty($_POST)) { - $ui = $_POST; - $ui['request'] = 'form'; - $ui['iw'] = 1; - unset($_POST); -} -if (!empty($_GET)) { - $ui = $_GET; - $ui['request'] = 'api'; - unset($_GET); -} - -if (empty($ui['request'])) { - $ui['request'] = ''; -} - -if (empty($ui['p'])) { - $ui['p'] = 'index'; -} - -if (empty($ui['fr'])) { - $ui['fr'] = ''; -} - -if (isset($ui['logout']) && (int)$ui['logout'] === 1) { - session_destroy(); - header("Location:?"); - exit(); -} - -if (!file_exists('cache/config/genConf.php')) { - $serverKey = install(); - $ui['p'] = 'install'; -} - -require 'cache/config/genConf.php'; - -if ($GLOBALS['config']['pwd'] === 'install' && $ui['p'] !== 'install') { - reloadInstall(); - header("Location:?"); -} - -if (($GLOBALS['config']['onlyLocalServer'] === true && $_SERVER['REMOTE_ADDR'] !== '127.0.0.1') || checkIfBan() === true) { - header("HTTP/1.0 404 Not Found"); - echo "

404 Not Found

"; - echo "The page that you have requested could not be found."; - exit(); -} - -if ($GLOBALS['config']['NoWebPage'] === true && empty($_GET)) { - header("HTTP/1.0 404 Not Found"); - echo "

404 Not Found

"; - echo "The page that you have requested could not be found."; - exit(); -} - -function testExistImg($file) { - if ($GLOBALS['config']['onlyThumb'] === true) { - if (file_exists($file.'_thumb.png')) { - return true; - } else { - return false; - } - } else { - if (file_exists($file.'_thumb.png') && file_exists($file.'.png')) { - return true; - } else { - return false; - } - } -} - -/** - * Run the bash script for generate thumbnail - * - * @author Knah Tsaeb - * @date 2013-02-12 - * @param $url (string) url for thumbshot - * @param $hashUrl (hash) hash($url) - * @param $width (string) size of thumbnail 190x90 - * @param $onlyThumb (bool) - * @param $waitForResult (bool) - * @return - */ -function launchScript($url, $hashUrl, $width, $size, $onlyThumb, $waitForResult = false) { - $hashUrl = escapeshellarg($hashUrl); - $url = escapeshellarg($url); - $width = escapeshellarg($width); - if ($GLOBALS['config']['onlyThumb'] === true) { - $onlyThumb = 1; - } else { - $onlyThumb = 0; - } - - if ($GLOBALS['config']['disableExec'] === false) { - chdir('bin/'); - if ($waitForResult === false) { - exec('bash thumb_server.sh '.$url.' '.$hashUrl.' '.$width.' '.$size.' '.$onlyThumb.' > /dev/null &', $result); - } else { - exec('bash thumb_server.sh '.$url.' '.$hashUrl.' '.$width.' '.$size.' '.$onlyThumb.' 1', $result); - } - chdir('../'); - } else { - makeQueueFile($url, $hashUrl, $width, $size, $onlyThumb); - $result = 0; - } - return $result; -} - -function makeQueueFile($url, $hashUrl, $width, $size, $onlyThumb) { - $url = str_replace('\'', '', $url); - $hashUrl = str_replace('\'', '', $hashUrl); - $width = str_replace('\'', '', $width); - if (!file_exists('cache/cronTask/'.$hashUrl.'.hash')) { - $data = $url.' '.$hashUrl.' '.$width.' '.$size.' '.$onlyThumb. "\n"; - file_put_contents('cache/cronTask/'.$hashUrl.'.hash', $data); - } -} - -function testValidUrl($url) { - $url = trim($url); - if (filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED)) { - $url = parse_url($url); - if (!in_array($url['scheme'], array( - 'http', - 'https' - ))) { - return array('msg' => 'Url must be start by http or https.'); - } - return true; - } else { - return array('msg' => 'Not a valid url.'); - } -} - -function genToken() { - $token = sha1(uniqid(rand(), true).'_'.mt_rand()); - $_SESSION['token'] = $token; - $_SESSION['tokenTime'] = time(); - return $token; -} - -function verifToken($token) { - if ($token !== $_SESSION['token'] || $_SESSION['tokenTime'] <= time() - 24000) { - ban(); - die('So Long, and Thanks for All the Fish.'); - } -} - -function checkIfBan() { - require 'cache/logs/banUser.php'; - $userIp = $_SERVER['REMOTE_ADDR']; - if (isset($banList[$userIp]) && $banList[$userIp]['nbBan'] >= $GLOBALS['config']['maxErrorBeforeBan'] && $banList[$userIp]['lastBan'] + $GLOBALS['config']['banTime'] > time()) { - return true; - } elseif (isset($banList[$userIp]) && $banList[$userIp]['lastBan'] + $GLOBALS['config']['banTime'] < time()) { - unban(); - return false; - } else { - return false; - } -} - -function ban() { - require 'cache/logs/banUser.php'; - $userIp = $_SERVER['REMOTE_ADDR']; - if (isset($banList[$userIp])) { - $banList[$userIp]['lastBan'] = time(); - $banList[$userIp]['nbBan']++; - } else { - $banList[$userIp]['lastBan'] = time(); - $banList[$userIp]['nbBan'] = 1; - } - file_put_contents('cache/logs/banUser.php', ""); -} - -function unBan() { - require 'cache/logs/banUser.php'; - $userIp = $_SERVER['REMOTE_ADDR']; - unset($banList[$userIp]); - file_put_contents('cache/logs/banUser.php', ""); -} - -function install() { - if (!is_writable('cache')) { - die('Make dir "cache" writable'); - } - if (!is_dir('cache/config') && !mkdir('cache/config', 0705)) { - die('Error on create dir "cache/config".'); - } - if (!is_dir('cache/img') && !mkdir('cache/img', 0705)) { - die('Error on create dir "cache/img".'); - } - if (!is_dir('cache/logs') && !mkdir('cache/logs', 0705)) { - die('Error on create dir "cache/logs".'); - } - if (!is_dir('cache/logs/suspect') && !mkdir('cache/logs/suspect', 0705)) { - die('Error on create dir "cache/logs/suspect".'); - } - if (!is_dir('cache/logs/retry') && !mkdir('cache/logs/retry', 0705)) { - die('Error on create dir "cache/logs/retry".'); - } - if (!is_dir('cache/logs/other') && !mkdir('cache/logs/other', 0705)) { - die('Error on create dir "cache/logs/other".'); - } - if (!is_dir('cache/tmp') && !mkdir('cache/tmp', 0705)) { - die('Error on create dir "cache/tmp".'); - } - if (!is_dir('cache/cronTask') && !mkdir('cache/cronTask', 0705)) { - die('Error on create dir "cache/cronTask".'); - } - $salt = sha1(uniqid(rand(), true).'_'.mt_rand()); - $serverKey = substr(sha1(uniqid(rand(), true).'_'.mt_rand().$salt), 0, 12); - $encryptServerKey = sha1($serverKey.$salt); - - if (!is_file('cache/config/genConf.php')) { - file_put_contents('cache/config/genConf.php', ""); - } - if (!is_file('cache/config/serverOptions.php')) { - touch('cache/config/serverOptions.php'); - } - if (!is_file('cache/index.html')) { - touch('cache/index.html'); - } - if (!is_file('cache/config/options.php')) { - file_put_contents('cache/config/options.php', ""); - } - if (!is_file('cache/logs/banUser.php')) { - file_put_contents('cache/logs/banUser.php', ""); - } - $GLOBALS['config']['serverKey'] = $encryptServerKey; - $GLOBALS['config']['salt'] = $salt; - $GLOBALS['config']['pwd'] = 'install'; - return $serverKey; -} - -function checkInstall() { - if (!is_file('.htaccess')) { - file_put_contents('.htaccess', "AddDefaultCharset UTF-8\nOptions -Indexes\nDirectoryIndex index.php index.html\nFileETag none\nSetOutputFilter DEFLATE\n"); - } - if (!is_file('cache/logs/.htaccess')) { - file_put_contents('cache/logs/.htaccess', "Allow from none\nDeny from all\n"); - } - if (!is_file('cache/config/.htaccess')) { - file_put_contents('cache/config/.htaccess', "Allow from none\nDeny from all\n"); - } - if (!is_file('cache/cronTask/.htaccess')) { - file_put_contents('cache/config/.htaccess', "Allow from none\nDeny from all\n"); - } - if (!is_file('bin/.htaccess')) { - file_put_contents('bin/.htaccess', "Allow from none\nDeny from all\n"); - } -} - -function removeOlderThan($dir = 'cache/img/shortLive') { - if (is_dir($dir)) { - $objects = scandir($dir); - foreach ($objects as $object) { - if ($object !== '.' && $object !== '..' && $object) { - if (filetype($dir.'/'.$object) === 'dir') { - removeOlderThan($dir.'/'.$object); - } else { - if (fileatime($dir.'/'.$object) < time() - 3600 * $GLOBALS['config']['expireCache']) { - unlink($dir.'/'.$object); - } - } - } - } - reset($objects); - } -} - -function pathForFile($size, $hashUrl) { - $startPath = substr($hashUrl, 0, 2).'/'.substr($hashUrl, 2, 2).'/'; - $file = 'cache/img/'.$size.'/'.$startPath.$hashUrl; - return $file; -} - -function validHash($hash) { - if (empty($hash)) { - die('You talking to me'); - } - if (!preg_match('/^[0-9a-f]{40}$/i', $hash)) { - die('I don\'t understand biiip bip bip biiiip bip bip bip biiiiiiip biip ...'); - } - return $hash; -} - -function checkAdmin($pwd) { - $pwd = sha1($GLOBALS['config']['salt'].$pwd.$GLOBALS['config']['serverKey']); - if (validHash($pwd) !== $GLOBALS['config']['pwd']) { - ban(); - die('1, 2, 3, 4, 5 ? That\'s amazing ! I\'ve got the same combination on my luggage !'); - } - $_SESSION['login'] = true; - return true; -} - -function savePass($passOne, $passTwo, $token) { - verifToken($token); - if ($passOne !== $passTwo || empty($passOne) || empty($passTwo)) { - reloadInstall(); - } else { - $GLOBALS['config']['pwd'] = sha1($GLOBALS['config']['salt'].$passOne.$GLOBALS['config']['serverKey']); - $confServerKey = $GLOBALS['config']['serverKey']; - $confSalt = $GLOBALS['config']['salt']; - $confPwd = $GLOBALS['config']['pwd']; - $confFile = ' - '; - file_put_contents('cache/config/genConf.php', $confFile); - } - header("Location:?"); -} - -function reloadInstall() { - array_map('unlink', glob("cache/config/*")); -} - -/** - * Améliore la sortie print - * - * @author Tatane http://www.tatane.info/index.php/print_rn - * @author http://www.blog.cactuscrew.com/77-print_rn.html - * @param $data (array) tableau ou variable à examiner - * @param $name (string) nom a afficher - * @return false affiche les clef valeur du tableau $data - * @example n_print($array, 'Tableau de valeur'); - */ -function n_print($data, $name = '') { - $aBackTrace = debug_backtrace(); - echo '

', $name, '

'; - echo '
'; - echo ' - ', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], ' - '; - echo '
', htmlentities(print_r($data, 1)), '
'; - echo ' -
-
-'; -} - -function printThumbShot($file) { - ob_end_clean(); - header("Content-type: image/png"); - header('Expires: ', gmdate('D, d M Y H:i:s', time()).' GMT'); - echo file_get_contents($file.'_thumb.png'); - exit(); -} - -function getPage($page) { - $page = htmlspecialchars($page); - switch ($page) { - case 'login' : - return 'inc/login.php'; - break; - case 'install' : - return 'inc/install.php'; - break; - case 'admin' : - return 'inc/admin.php'; - break; - default : - return 'inc/index.php'; - break; - } -} - -function testIfImg($url) { - $ext = strtolower(pathinfo($url, PATHINFO_EXTENSION)); - if ($ext === 'jpg' || $ext === 'jpeg' || $ext === 'png' || $ext === 'gif') { - return $ext; - } else { - return false; - } -} - -function makeImgThumb($url, $ext, $hashUrl, $width, $path, $onlyThumb) { - if (!function_exists('imagecreatefromjpeg')) { - return false; - } - - $image = file_get_contents($url); - $fullSize = file_put_contents('cache/tmp/'.$hashUrl.'.'.$ext, $image); - if ($ext === 'jpg' || $ext === 'jpeg') { - $tmpImg = imagecreatefromjpeg('cache/tmp/'.$hashUrl.'.'.$ext); - } - if ($ext === 'png') { - $tmpImg = imagecreatefrompng('cache/tmp/'.$hashUrl.'.'.$ext); - } - if ($ext === 'gif') { - $tmpImg = imagecreatefromgif('cache/tmp/'.$hashUrl.'.'.$ext); - } - if (!$tmpImg) { - unlink('cache/tmp/'.$hashUrl.'.'.$ext); - return false; - } - - $w = imagesx($tmpImg); - $h = imagesy($tmpImg); - $ystart = 0; - $yheight = $h; - if ($h > $w) { $ystart = ($h / 2) - ($w / 2); - $yheight = $w / 2; - } - $nh = min(floor(($h * $width) / $w), $width); - $im2 = imagecreatetruecolor($width, $nh); - imagecopyresampled($im2, $tmpImg, 0, 0, 0, $ystart, $width, $nh, $w, $yheight); - $tempname = 'cache/tmp/'.$hashUrl.'_TEMP.png'; - imagepng($im2, $tempname, 9); - if (!is_dir($path)) { - mkdir($path, 0775, true); - } - imagedestroy($tmpImg); - imagedestroy($im2); - unlink('cache/tmp/'.$hashUrl.'.'.$ext); - rename($tempname, $path.$hashUrl.'_thumb.png'); - if (file_exists($path.$hashUrl.'_thumb.png')) { - return true; - } else { - return false; - } -} - -/* - $image = file_get_contents('http://www.url.com/image.jpg'); - file_put_contents('/images/image.jpg', $image); //save the image on your server - * - * - */ -checkInstall(); -removeOlderThan(); - -if (empty($defUrl)) { - $defUrl = $GLOBALS['config']['defaultUrl']; -} - -if (isset($ui['s']) && array_key_exists($ui['s'], $GLOBALS['config']['thumbSize'])) { - $width = $GLOBALS['config']['thumbSize'][$ui['s']]; -} else { - $width = $GLOBALS['config']['defaultThumbSize']; -} - -// Generate or return img -if (!empty($ui['request']) && $ui['p'] !== 'install' && $ui['p'] !== 'login' && $ui['p'] !== 'admin') { - if (empty($ui['url'])) { - die('You see in this world there\'s two kinds of people, my friend. Those with loaded guns, and those who dig. You dig.'); - } - $ui['url'] = trim(rawurldecode($ui['url'])); - $ui['url'] = rtrim($ui['url'], '/'); - $hashUrl = sha1($GLOBALS['config']['salt'].$ui['url']); - $startPath = substr($hashUrl, 0, 2).'/'.substr($hashUrl, 2, 2).'/'; - $file = 'cache/img/'.$ui['s'].'/'.$startPath.$hashUrl; - $testUrl = testValidUrl($ui['url']); - $defUrl = $ui['url']; - if ($ui['request'] === 'form') { - $file = 'cache/img/shortLive/'.$startPath.$hashUrl; - $file = 'cache/img/shortLive/'.$startPath.$hashUrl; - } - - if (testExistImg($file) === true && (int)$ui['fr'] !== 1) { - if ($ui['request'] === 'api') { - printThumbShot($file); - } - if ($ui['request'] === 'form') { - $success = array( - 'normal' => $file.'.png', - 'thumb' => $file.'_thumb.png' - ); - } - } else { - if ($ui['request'] === 'api') { - if (empty($ui['key']) || empty($ui['url'])) { - die('Are you Ken ?'); - } - if (sha1($ui['key'].$GLOBALS['config']['salt']) !== $GLOBALS['config']['serverKey']) { - ban(); - die('I take a chips and give it to Godzilla. I give high kick in Chuck Norris face and I go to ... Humm .... Ehh .... Arg ....... KAMOULOX ! Well done Jean Pierre.'); - } - } else { - verifToken($ui['token']); - } - if ($testUrl !== true) { - if (!file_exists('cache/logs/'.$hashUrl.'log')) { - file_put_contents('cache/logs/suspect/'.$hashUrl.'.log', $_SERVER['REMOTE_ADDR'].' --- '.$ui['url'].' --- '.$hashUrl.' --- '.$width.' --- '.$ui['s'].' --- '.$GLOBALS['config']['onlyThumb'].' --- true'."\n"); - } - if ($ui['request'] === 'api') { - printThumbShot('bin/error'); - } else { - $success = array( - 'normal' => 'bin/error.png', - 'thumb' => 'bin/error_thumb.png' - ); - } - } else { - $ext = testIfImg($ui['url']); - if ($ext !== false) { - $genWidth = explode("x", $width); - if ($ui['request'] === 'api') { - $makeImg = makeImgThumb($ui['url'], $ext, $hashUrl, $genWidth[0], 'cache/img/'.$ui['s'].'/'.$startPath, $GLOBALS['config']['onlyThumb']); - } else { - $makeImg = makeImgThumb($ui['url'], $ext, $hashUrl, $genWidth[0], 'cache/img/shortLive/'.$startPath, $GLOBALS['config']['onlyThumb']); - } - - if ($makeImg === true) { - $GLOBALS['config']['disableExec'] = true; - if ($ui['request'] === 'api') { - printThumbShot($file); - } else { - $success = array( - 'normal' => $file.'.png', - 'thumb' => $file.'_thumb.png' - ); - } - } - } - if ((isset($ui['iw']) && (int)$ui['iw'] === 1 && $ui['request'] === 'api')) { - $res = launchScript($defUrl, $hashUrl, $width, $ui['s'], $GLOBALS['config']['onlyThumb'], true); - } elseif (isset($ui['iw']) && (int)$ui['iw'] === 1 && $ui['request'] === 'form') { - $res = launchScript($defUrl, $hashUrl, $width, 'shortLive', $GLOBALS['config']['onlyThumb'], true); - } else { - $res = launchScript($defUrl, $hashUrl, $width, $ui['s'], $GLOBALS['config']['onlyThumb'], false); - } - if ($ui['request'] === 'api') { - $file = 'bin/loadingGen'; - printThumbShot($file); - } else { - if ($GLOBALS['config']['disableExec'] === true) { - $file = 'bin/loadingGen'; - } - $success = array( - 'normal' => $file.'.png', - 'thumb' => $file.'_thumb.png' - ); - } - } - } -} -?> - - - - - SoShot - - - - - - - \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..3170e46 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,12 @@ +AddDefaultCharset UTF-8 +Options -Indexes +DirectoryIndex index.php index.html +FileETag none +SetOutputFilter DEFLATE + + +RewriteEngine On + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php [QSA,L] \ No newline at end of file diff --git a/public/assets/css/fork-awesome.min.css b/public/assets/css/fork-awesome.min.css new file mode 100644 index 0000000..fd154dc --- /dev/null +++ b/public/assets/css/fork-awesome.min.css @@ -0,0 +1,12 @@ +/*! +Fork Awesome 1.2.0 +License - https://forkaweso.me/Fork-Awesome/license + +Copyright 2018 Dave Gandy & Fork Awesome + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */@font-face{font-family:ForkAwesome;src:url(../fonts/forkawesome-webfont.eot?v=1.2.0);src:url(../fonts/forkawesome-webfont.eot?#iefix&v=1.2.0) format('embedded-opentype'),url(../fonts/forkawesome-webfont.woff2?v=1.2.0) format('woff2'),url(../fonts/forkawesome-webfont.woff?v=1.2.0) format('woff'),url(../fonts/forkawesome-webfont.ttf?v=1.2.0) format('truetype'),url(../fonts/forkawesome-webfont.svg?v=1.2.0#forkawesomeregular) format('svg');font-weight:400;font-style:normal;font-display:block}.fa{display:inline-block;font:normal normal normal 14px/1 ForkAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before,.fa-sync:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before,.fa-video:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell-o:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-globe-e:before{content:"\f304"}.fa-globe-w:before{content:"\f305"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-community:before,.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus-g:before,.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before,.fa-utensils:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before,.fa-pound:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before,.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-desc:before,.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-asc:before,.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-desc:before,.fa-sort-amount-up:before{content:"\f161"}.fa-sort-numeric-asc:before,.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-desc:before,.fa-sort-numeric-up:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before,.fa-utensil-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before,.fa-heading:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before,.fa-closed-captioning:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before,.fa-gem:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-medium-square:before{content:"\f2f8"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo-v:before,.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-phone-volume:before,.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:"\f2a3"}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-sign-language:before,.fa-signing:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-address-card:before,.fa-vcard:before{content:"\f2bb"}.fa-address-card-o:before,.fa-vcard-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.fa-mastodon:before{content:"\f2e1"}.fa-mastodon-alt:before{content:"\f2e2"}.fa-fork-awesome:before,.fa-fork-circle:before{content:"\f2e3"}.fa-peertube:before{content:"\f2e4"}.fa-diaspora:before{content:"\f2e5"}.fa-friendica:before{content:"\f2e6"}.fa-gnu-social:before{content:"\f2e7"}.fa-liberapay-square:before{content:"\f2e8"}.fa-liberapay:before{content:"\f2e9"}.fa-scuttlebutt:before,.fa-ssb:before{content:"\f2ea"}.fa-hubzilla:before{content:"\f2eb"}.fa-social-home:before{content:"\f2ec"}.fa-artstation:before{content:"\f2ed"}.fa-discord:before{content:"\f2ee"}.fa-discord-alt:before{content:"\f2ef"}.fa-patreon:before{content:"\f2f0"}.fa-snowdrift:before{content:"\f2f1"}.fa-activitypub:before{content:"\f2f2"}.fa-ethereum:before{content:"\f2f3"}.fa-keybase:before{content:"\f2f4"}.fa-shaarli:before{content:"\f2f5"}.fa-shaarli-o:before{content:"\f2f6"}.fa-cut-key:before,.fa-key-modern:before{content:"\f2f7"}.fa-xmpp:before{content:"\f2f9"}.fa-archive-org:before{content:"\f2fc"}.fa-freedombox:before{content:"\f2fd"}.fa-facebook-messenger:before{content:"\f2fe"}.fa-debian:before{content:"\f2ff"}.fa-mastodon-square:before{content:"\f300"}.fa-tipeee:before{content:"\f301"}.fa-react:before{content:"\f302"}.fa-dogmazic:before{content:"\f303"}.fa-zotero:before{content:"\f309"}.fa-nodejs:before{content:"\f308"}.fa-nextcloud:before{content:"\f306"}.fa-nextcloud-square:before{content:"\f307"}.fa-hackaday:before{content:"\f30a"}.fa-laravel:before{content:"\f30b"}.fa-signalapp:before{content:"\f30c"}.fa-gnupg:before{content:"\f30d"}.fa-php:before{content:"\f30e"}.fa-ffmpeg:before{content:"\f30f"}.fa-joplin:before{content:"\f310"}.fa-syncthing:before{content:"\f311"}.fa-inkscape:before{content:"\f312"}.fa-matrix-org:before{content:"\f313"}.fa-pixelfed:before{content:"\f314"}.fa-bootstrap:before{content:"\f315"}.fa-dev-to:before{content:"\f316"}.fa-hashnode:before{content:"\f317"}.fa-jirafeau:before{content:"\f318"}.fa-emby:before{content:"\f319"}.fa-wikidata:before{content:"\f31a"}.fa-gimp:before{content:"\f31b"}.fa-c:before{content:"\f31c"}.fa-digitalocean:before{content:"\f31d"}.fa-att:before{content:"\f31e"}.fa-gitea:before{content:"\f31f"}.fa-file-epub:before{content:"\f321"}.fa-python:before{content:"\f322"}.fa-archlinux:before{content:"\f323"}.fa-pleroma:before{content:"\f324"}.fa-unsplash:before{content:"\f325"}.fa-hackster:before{content:"\f326"}.fa-spell-check:before{content:"\f327"}.fa-moon:before{content:"\f328"}.fa-sun:before{content:"\f329"}.fa-f-droid:before{content:"\f32a"}.fa-biometric:before{content:"\f32b"}.fa-wire:before{content:"\f32c"}.fa-tor-onion:before{content:"\f32e"}.fa-volume-mute:before{content:"\f32f"}.fa-bell-ringing:before{content:"\f32d"}.fa-bell-ringing-o:before{content:"\f330"}.fa-hal:before{content:"\f333"}.fa-jupyter:before{content:"\f335"}.fa-julia:before{content:"\f334"}.fa-classicpress:before{content:"\f331"}.fa-classicpress-circle:before{content:"\f332"}.fa-open-collective:before{content:"\f336"}.fa-orcid:before{content:"\f337"}.fa-researchgate:before{content:"\f338"}.fa-funkwhale:before{content:"\f339"}.fa-askfm:before{content:"\f33a"}.fa-blockstack:before{content:"\f33b"}.fa-boardgamegeek:before{content:"\f33c"}.fa-bunny:before{content:"\f35f"}.fa-buymeacoffee:before{content:"\f33d"}.fa-cc-by:before{content:"\f33e"}.fa-cc-cc:before,.fa-creative-commons-alt:before{content:"\f33f"}.fa-cc-nc-eu:before{content:"\f341"}.fa-cc-nc-jp:before{content:"\f342"}.fa-cc-nc:before{content:"\f340"}.fa-cc-nd:before{content:"\f343"}.fa-cc-pd:before{content:"\f344"}.fa-cc-remix:before{content:"\f345"}.fa-cc-sa:before{content:"\f346"}.fa-cc-share:before{content:"\f347"}.fa-cc-zero:before{content:"\f348"}.fa-conway-glider:before,.fa-conway-hacker:before{content:"\f349"}.fa-csharp:before{content:"\f34a"}.fa-email-bulk:before{content:"\f34b"}.fa-email-bulk-o:before{content:"\f34c"}.fa-gnu:before{content:"\f34d"}.fa-google-play:before{content:"\f34e"}.fa-heroku:before{content:"\f34f"}.fa-hassio:before,.fa-home-assistant:before{content:"\f350"}.fa-java:before{content:"\f351"}.fa-mariadb:before{content:"\f352"}.fa-markdown:before{content:"\f353"}.fa-mysql:before{content:"\f354"}.fa-nordcast:before{content:"\f355"}.fa-plume:before{content:"\f356"}.fa-postgresql:before{content:"\f357"}.fa-sass-alt:before{content:"\f359"}.fa-sass:before{content:"\f358"}.fa-skate:before{content:"\f35a"}.fa-sketchfab:before{content:"\f35b"}.fa-tex:before{content:"\f35c"}.fa-textpattern:before{content:"\f35d"}.fa-unity:before{content:"\f35e"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}/*# sourceMappingURL=fork-awesome.min.css.map */ \ No newline at end of file diff --git a/public/assets/css/fork-awesome.min.css.map b/public/assets/css/fork-awesome.min.css.map new file mode 100644 index 0000000..6aa141d --- /dev/null +++ b/public/assets/css/fork-awesome.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["fork-awesome.css"],"names":[],"mappings":";;;;;;;;;;;AAcA,WACE,YAAA,YACA,IAAS,8CACT,IAAS,qDAAoF,4BAAA,gDAAmE,gBAAA,+CAAiE,eAAA,8CAAoE,mBAAA,iEAArS,cACA,YAAA,IACA,WAAA,OACA,aAAA,MAEF,IACE,QAAA,aACA,KAAA,OAAA,OAAA,OAAA,KAAA,EAAA,YACA,UAAA,QACA,eAAA,KACA,uBAAA,YACA,wBAAA,UAGF,OACE,UAAA,aACA,YAAA,MACA,eAAA,KAEF,OACE,UAAA,IAEF,OACE,UAAA,IAEF,OACE,U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AEW,qBACX,QAAA,QAEO,iBACP,QAAA,QAEY,sBACZ,QAAA,QAEe,yBACf,QAAA,QAEO,iBACP,QAAA,QAEc,wBACd,QAAA,QAEO,iBACP,QAAA,QAGO,iBADe,gCAEtB,QAAA,QAEU,oBACV,QAAA,QAEU,oBACV,QAAA,QAEO,iBACP,QAAA,QAEO,iBACP,QAAA,QAEO,iBACP,QAAA,QAEU,oBACV,QAAA,QAEO,iBACP,QAAA,QAEU,oBACV,QAAA,QAES,mBACT,QAAA,QAGe,yBADA,yBAEf,QAAA,QAEQ,kBACR,QAAA,QAEY,sBACZ,QAAA,QAEc,wBACd,QAAA,QAEK,eACL,QAAA,QAEa,uBACb,QAAA,QAEQ,kBACR,QAAA,QAEQ,kBACQ,0BAChB,QAAA,QAEM,gBACN,QAAA,QAES,mBACT,QAAA,QAEU,oBACV,QAAA,QAEO,iBACP,QAAA,QAEU,oBACV,QAAA,QAEO,iBACP,QAAA,QAEY,sBACZ,QAAA,QAEU,oBACV,QAAA,QAEM,gBACN,QAAA,QAEO,iBACP,QAAA,QAEW,qBACX,QAAA,QAEK,eACL,QAAA,QAEa,uBACb,QAAA,QAEO,iBACP,QAAA,QAEF,SACE,SAAA,SACA,MAAA,IACA,OAAA,IACA,QAAA,EACA,OAAA,KACA,SAAA,OACA,KAAM,cACN,OAAA,EAEgB,0BACA,yBAChB,SAAA,OACA,MAAA,KACA,OAAA,KACA,OAAA,EACA,SAAA,QACA,KAAA"} \ No newline at end of file diff --git a/public/assets/css/style.css b/public/assets/css/style.css new file mode 100644 index 0000000..1be6d32 --- /dev/null +++ b/public/assets/css/style.css @@ -0,0 +1,110 @@ +html { + font-family: arial, sans-serif; + font-weight: bold; + line-height: 2em; + background-color: #ffffffcb; +} + +html, +body, +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Roboto", sans-serif; +} + +.w3-sidebar { + z-index: 3; + width: 250px; + top: 43px; + height: inherit; +} + +a { + text-decoration: none; + color: #8AC007; +} + +a:hover, +.title:hover { + text-decoration: none; +} + +a:visited { + color: #8AC007; +} + +.centerBlock { + margin: auto; +} + +.homeForm { + width: 49.9%; +} + +.w3-bar { + background-color: #333333 !important; +} + +#mySidebar { + top: inherit; + background-color: initial !important; +} + +#mySidebar a:hover { + text-decoration: none; +} + +.w3-bar-block .w3-bar-item { + padding: 4px 16px; +} + +.w3-bar { + background-color: #fff !important; +} + +#myFooter { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + text-align: center; +} + +.w3-main { + margin: 64px auto 46px 270px; +} + +.soshot-main { + padding-bottom: 16px; +} + +.fa { + color: #009688; +} + +form label { + width: 48% !important; + display: inline-block; + text-align: right; + margin-right: 16px; +} + +.w3-input, +.w3-select { + display: inline-block; + width: 48%; +} + +@media (max-width:768px) { + + #mySidebar { + background-color: #ffffffcb !important; + width: 100%; + height: 50%; + } + +} \ No newline at end of file diff --git a/public/assets/css/w3.css b/public/assets/css/w3.css new file mode 100644 index 0000000..5497b3f --- /dev/null +++ b/public/assets/css/w3.css @@ -0,0 +1,1994 @@ +/* W3.CSS 4.15 December 2020 by Jan Egil and Borge Refsnes */ +html { + box-sizing: border-box +} + +*, +*:before, +*:after { + box-sizing: inherit +} + +/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ +html { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100% +} + +body { + margin: 0 +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +menu, +nav, +section { + display: block +} + +summary { + display: list-item +} + +audio, +canvas, +progress, +video { + display: inline-block +} + +progress { + vertical-align: baseline +} + +audio:not([controls]) { + display: none; + height: 0 +} + +[hidden], +template { + display: none +} + +a { + background-color: transparent +} + +a:active, +a:hover { + outline-width: 0 +} + +abbr[title] { + border-bottom: none; + text-decoration: underline; + text-decoration: underline dotted +} + +b, +strong { + font-weight: bolder +} + +dfn { + font-style: italic +} + +mark { + background: #ff0; + color: #000 +} + +small { + font-size: 80% +} + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline +} + +sub { + bottom: -0.25em +} + +sup { + top: -0.5em +} + +figure { + margin: 1em 40px +} + +img { + border-style: none +} + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em +} + +hr { + box-sizing: content-box; + height: 0; + overflow: visible +} + +button, +input, +select, +textarea, +optgroup { + font: inherit; + margin: 0 +} + +optgroup { + font-weight: bold +} + +button, +input { + overflow: visible +} + +button, +select { + text-transform: none +} + +button, +[type=button], +[type=reset], +[type=submit] { + -webkit-appearance: button +} + +button::-moz-focus-inner, +[type=button]::-moz-focus-inner, +[type=reset]::-moz-focus-inner, +[type=submit]::-moz-focus-inner { + border-style: none; + padding: 0 +} + +button:-moz-focusring, +[type=button]:-moz-focusring, +[type=reset]:-moz-focusring, +[type=submit]:-moz-focusring { + outline: 1px dotted ButtonText +} + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: .35em .625em .75em +} + +legend { + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal +} + +textarea { + overflow: auto +} + +[type=checkbox], +[type=radio] { + padding: 0 +} + +[type=number]::-webkit-inner-spin-button, +[type=number]::-webkit-outer-spin-button { + height: auto +} + +[type=search] { + -webkit-appearance: textfield; + outline-offset: -2px +} + +[type=search]::-webkit-search-decoration { + -webkit-appearance: none +} + +::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit +} + +/* End extract */ +html, +body { + font-family: Verdana, sans-serif; + font-size: 15px; + line-height: 1.5 +} + +html { + overflow-x: hidden +} + +h1 { + font-size: 36px +} + +h2 { + font-size: 30px +} + +h3 { + font-size: 24px +} + +h4 { + font-size: 20px +} + +h5 { + font-size: 18px +} + +h6 { + font-size: 16px +} + +.w3-serif { + font-family: serif +} + +.w3-sans-serif { + font-family: sans-serif +} + +.w3-cursive { + font-family: cursive +} + +.w3-monospace { + font-family: monospace +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Segoe UI", Arial, sans-serif; + font-weight: 400; + margin: 10px 0 +} + +.w3-wide { + letter-spacing: 4px +} + +hr { + border: 0; + border-top: 1px solid #eee; + margin: 20px 0 +} + +.w3-image { + max-width: 100%; + height: auto +} + +img { + vertical-align: middle +} + +a { + color: inherit +} + +.w3-table, +.w3-table-all { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + display: table +} + +.w3-table-all { + border: 1px solid #ccc +} + +.w3-bordered tr, +.w3-table-all tr { + border-bottom: 1px solid #ddd +} + +.w3-striped tbody tr:nth-child(even) { + background-color: #f1f1f1 +} + +.w3-table-all tr:nth-child(odd) { + background-color: #fff +} + +.w3-table-all tr:nth-child(even) { + background-color: #f1f1f1 +} + +.w3-hoverable tbody tr:hover, +.w3-ul.w3-hoverable li:hover { + background-color: #ccc +} + +.w3-centered tr th, +.w3-centered tr td { + text-align: center +} + +.w3-table td, +.w3-table th, +.w3-table-all td, +.w3-table-all th { + padding: 8px 8px; + display: table-cell; + text-align: left; + vertical-align: top +} + +.w3-table th:first-child, +.w3-table td:first-child, +.w3-table-all th:first-child, +.w3-table-all td:first-child { + padding-left: 16px +} + +.w3-btn, +.w3-button { + border: none; + display: inline-block; + padding: 8px 16px; + vertical-align: middle; + overflow: hidden; + text-decoration: none; + color: inherit; + background-color: inherit; + text-align: center; + cursor: pointer; + white-space: nowrap +} + +.w3-btn:hover { + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19) +} + +.w3-btn, +.w3-button { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none +} + +.w3-disabled, +.w3-btn:disabled, +.w3-button:disabled { + cursor: not-allowed; + opacity: 0.3 +} + +.w3-disabled *, +:disabled * { + pointer-events: none +} + +.w3-btn.w3-disabled:hover, +.w3-btn:disabled:hover { + box-shadow: none +} + +.w3-badge, +.w3-tag { + background-color: #000; + color: #fff; + display: inline-block; + padding-left: 8px; + padding-right: 8px; + text-align: center +} + +.w3-badge { + border-radius: 50% +} + +.w3-ul { + list-style-type: none; + padding: 0; + margin: 0 +} + +.w3-ul li { + padding: 8px 16px; + border-bottom: 1px solid #ddd +} + +.w3-ul li:last-child { + border-bottom: none +} + +.w3-tooltip, +.w3-display-container { + position: relative +} + +.w3-tooltip .w3-text { + display: none +} + +.w3-tooltip:hover .w3-text { + display: inline-block +} + +.w3-ripple:active { + opacity: 0.5 +} + +.w3-ripple { + transition: opacity 0s +} + +.w3-input { + padding: 8px; + display: block; + border: none; + border-bottom: 1px solid #ccc; + width: 100% +} + +.w3-select { + padding: 9px 0; + width: 100%; + border: none; + border-bottom: 1px solid #ccc +} + +.w3-dropdown-click, +.w3-dropdown-hover { + position: relative; + display: inline-block; + cursor: pointer +} + +.w3-dropdown-hover:hover .w3-dropdown-content { + display: block +} + +.w3-dropdown-hover:first-child, +.w3-dropdown-click:hover { + background-color: #ccc; + color: #000 +} + +.w3-dropdown-hover:hover>.w3-button:first-child, +.w3-dropdown-click:hover>.w3-button:first-child { + background-color: #ccc; + color: #000 +} + +.w3-dropdown-content { + cursor: auto; + color: #000; + background-color: #fff; + display: none; + position: absolute; + min-width: 160px; + margin: 0; + padding: 0; + z-index: 1 +} + +.w3-check, +.w3-radio { + width: 24px; + height: 24px; + position: relative; + top: 6px +} + +.w3-sidebar { + height: 100%; + width: 200px; + background-color: #fff; + position: fixed !important; + z-index: 1; + overflow: auto +} + +.w3-bar-block .w3-dropdown-hover, +.w3-bar-block .w3-dropdown-click { + width: 100% +} + +.w3-bar-block .w3-dropdown-hover .w3-dropdown-content, +.w3-bar-block .w3-dropdown-click .w3-dropdown-content { + min-width: 100% +} + +.w3-bar-block .w3-dropdown-hover .w3-button, +.w3-bar-block .w3-dropdown-click .w3-button { + width: 100%; + text-align: left; + padding: 8px 16px +} + +.w3-main, +#main { + transition: margin-left .4s +} + +.w3-modal { + z-index: 3; + display: none; + padding-top: 100px; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.4) +} + +.w3-modal-content { + margin: auto; + background-color: #fff; + position: relative; + padding: 0; + outline: 0; + width: 600px +} + +.w3-bar { + width: 100%; + overflow: hidden +} + +.w3-center .w3-bar { + display: inline-block; + width: auto +} + +.w3-bar .w3-bar-item { + padding: 8px 16px; + float: left; + width: auto; + border: none; + display: block; + outline: 0 +} + +.w3-bar .w3-dropdown-hover, +.w3-bar .w3-dropdown-click { + position: static; + float: left +} + +.w3-bar .w3-button { + white-space: normal +} + +.w3-bar-block .w3-bar-item { + width: 100%; + display: block; + padding: 8px 16px; + text-align: left; + border: none; + white-space: normal; + float: none; + outline: 0 +} + +.w3-bar-block.w3-center .w3-bar-item { + text-align: center +} + +.w3-block { + display: block; + width: 100% +} + +.w3-responsive { + display: block; + overflow-x: auto +} + +.w3-container:after, +.w3-container:before, +.w3-panel:after, +.w3-panel:before, +.w3-row:after, +.w3-row:before, +.w3-row-padding:after, +.w3-row-padding:before, +.w3-cell-row:before, +.w3-cell-row:after, +.w3-clear:after, +.w3-clear:before, +.w3-bar:before, +.w3-bar:after { + content: ""; + display: table; + clear: both +} + +.w3-col, +.w3-half, +.w3-third, +.w3-twothird, +.w3-threequarter, +.w3-quarter { + float: left; + width: 100% +} + +.w3-col.s1 { + width: 8.33333% +} + +.w3-col.s2 { + width: 16.66666% +} + +.w3-col.s3 { + width: 24.99999% +} + +.w3-col.s4 { + width: 33.33333% +} + +.w3-col.s5 { + width: 41.66666% +} + +.w3-col.s6 { + width: 49.99999% +} + +.w3-col.s7 { + width: 58.33333% +} + +.w3-col.s8 { + width: 66.66666% +} + +.w3-col.s9 { + width: 74.99999% +} + +.w3-col.s10 { + width: 83.33333% +} + +.w3-col.s11 { + width: 91.66666% +} + +.w3-col.s12 { + width: 99.99999% +} + +@media (min-width:601px) { + .w3-col.m1 { + width: 8.33333% + } + + .w3-col.m2 { + width: 16.66666% + } + + .w3-col.m3, + .w3-quarter { + width: 24.99999% + } + + .w3-col.m4, + .w3-third { + width: 33.33333% + } + + .w3-col.m5 { + width: 41.66666% + } + + .w3-col.m6, + .w3-half { + width: 49.99999% + } + + .w3-col.m7 { + width: 58.33333% + } + + .w3-col.m8, + .w3-twothird { + width: 66.66666% + } + + .w3-col.m9, + .w3-threequarter { + width: 74.99999% + } + + .w3-col.m10 { + width: 83.33333% + } + + .w3-col.m11 { + width: 91.66666% + } + + .w3-col.m12 { + width: 99.99999% + } +} + +@media (min-width:993px) { + .w3-col.l1 { + width: 8.33333% + } + + .w3-col.l2 { + width: 16.66666% + } + + .w3-col.l3 { + width: 24.99999% + } + + .w3-col.l4 { + width: 33.33333% + } + + .w3-col.l5 { + width: 41.66666% + } + + .w3-col.l6 { + width: 49.99999% + } + + .w3-col.l7 { + width: 58.33333% + } + + .w3-col.l8 { + width: 66.66666% + } + + .w3-col.l9 { + width: 74.99999% + } + + .w3-col.l10 { + width: 83.33333% + } + + .w3-col.l11 { + width: 91.66666% + } + + .w3-col.l12 { + width: 99.99999% + } +} + +.w3-rest { + overflow: hidden +} + +.w3-stretch { + margin-left: -16px; + margin-right: -16px +} + +.w3-content, +.w3-auto { + margin-left: auto; + margin-right: auto +} + +.w3-content { + max-width: 980px +} + +.w3-auto { + max-width: 1140px +} + +.w3-cell-row { + display: table; + width: 100% +} + +.w3-cell { + display: table-cell +} + +.w3-cell-top { + vertical-align: top +} + +.w3-cell-middle { + vertical-align: middle +} + +.w3-cell-bottom { + vertical-align: bottom +} + +.w3-hide { + display: none !important +} + +.w3-show-block, +.w3-show { + display: block !important +} + +.w3-show-inline-block { + display: inline-block !important +} + +@media (max-width:1205px) { + .w3-auto { + max-width: 95% + } +} + +@media (max-width:600px) { + .w3-modal-content { + margin: 0 10px; + width: auto !important + } + + .w3-modal { + padding-top: 30px + } + + .w3-dropdown-hover.w3-mobile .w3-dropdown-content, + .w3-dropdown-click.w3-mobile .w3-dropdown-content { + position: relative + } + + .w3-hide-small { + display: none !important + } + + .w3-mobile { + display: block; + width: 100% !important + } + + .w3-bar-item.w3-mobile, + .w3-dropdown-hover.w3-mobile, + .w3-dropdown-click.w3-mobile { + text-align: center + } + + .w3-dropdown-hover.w3-mobile, + .w3-dropdown-hover.w3-mobile .w3-btn, + .w3-dropdown-hover.w3-mobile .w3-button, + .w3-dropdown-click.w3-mobile, + .w3-dropdown-click.w3-mobile .w3-btn, + .w3-dropdown-click.w3-mobile .w3-button { + width: 100% + } +} + +@media (max-width:768px) { + .w3-modal-content { + width: 500px + } + + .w3-modal { + padding-top: 50px + } +} + +@media (min-width:993px) { + .w3-modal-content { + width: 900px + } + + .w3-hide-large { + display: none !important + } + + .w3-sidebar.w3-collapse { + display: block !important + } +} + +@media (max-width:992px) and (min-width:601px) { + .w3-hide-medium { + display: none !important + } +} + +@media (max-width:992px) { + .w3-sidebar.w3-collapse { + display: none + } + + .w3-main { + margin-left: 0 !important; + margin-right: 0 !important + } + + .w3-auto { + max-width: 100% + } +} + +.w3-top, +.w3-bottom { + position: fixed; + width: 100%; + z-index: 1 +} + +.w3-top { + top: 0 +} + +.w3-bottom { + bottom: 0 +} + +.w3-overlay { + position: fixed; + display: none; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 2 +} + +.w3-display-topleft { + position: absolute; + left: 0; + top: 0 +} + +.w3-display-topright { + position: absolute; + right: 0; + top: 0 +} + +.w3-display-bottomleft { + position: absolute; + left: 0; + bottom: 0 +} + +.w3-display-bottomright { + position: absolute; + right: 0; + bottom: 0 +} + +.w3-display-middle { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%) +} + +.w3-display-left { + position: absolute; + top: 50%; + left: 0%; + transform: translate(0%, -50%); + -ms-transform: translate(-0%, -50%) +} + +.w3-display-right { + position: absolute; + top: 50%; + right: 0%; + transform: translate(0%, -50%); + -ms-transform: translate(0%, -50%) +} + +.w3-display-topmiddle { + position: absolute; + left: 50%; + top: 0; + transform: translate(-50%, 0%); + -ms-transform: translate(-50%, 0%) +} + +.w3-display-bottommiddle { + position: absolute; + left: 50%; + bottom: 0; + transform: translate(-50%, 0%); + -ms-transform: translate(-50%, 0%) +} + +.w3-display-container:hover .w3-display-hover { + display: block +} + +.w3-display-container:hover span.w3-display-hover { + display: inline-block +} + +.w3-display-hover { + display: none +} + +.w3-display-position { + position: absolute +} + +.w3-circle { + border-radius: 50% +} + +.w3-round-small { + border-radius: 2px +} + +.w3-round, +.w3-round-medium { + border-radius: 4px +} + +.w3-round-large { + border-radius: 8px +} + +.w3-round-xlarge { + border-radius: 16px +} + +.w3-round-xxlarge { + border-radius: 32px +} + +.w3-row-padding, +.w3-row-padding>.w3-half, +.w3-row-padding>.w3-third, +.w3-row-padding>.w3-twothird, +.w3-row-padding>.w3-threequarter, +.w3-row-padding>.w3-quarter, +.w3-row-padding>.w3-col { + padding: 0 8px +} + +.w3-container, +.w3-panel { + padding: 0.01em 16px +} + +.w3-panel { + margin-top: 16px; + margin-bottom: 16px +} + +.w3-code, +.w3-codespan { + font-family: Consolas, "courier new"; + font-size: 16px +} + +.w3-code { + width: auto; + background-color: #fff; + padding: 8px 12px; + border-left: 4px solid #4CAF50; + word-wrap: break-word +} + +.w3-codespan { + color: crimson; + background-color: #f1f1f1; + padding-left: 4px; + padding-right: 4px; + font-size: 110% +} + +.w3-card, +.w3-card-2 { + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12) +} + +.w3-card-4, +.w3-hover-shadow:hover { + box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19) +} + +.w3-spin { + animation: w3-spin 2s infinite linear +} + +@keyframes w3-spin { + 0% { + transform: rotate(0deg) + } + + 100% { + transform: rotate(359deg) + } +} + +.w3-animate-fading { + animation: fading 10s infinite +} + +@keyframes fading { + 0% { + opacity: 0 + } + + 50% { + opacity: 1 + } + + 100% { + opacity: 0 + } +} + +.w3-animate-opacity { + animation: opac 0.8s +} + +@keyframes opac { + from { + opacity: 0 + } + + to { + opacity: 1 + } +} + +.w3-animate-top { + position: relative; + animation: animatetop 0.4s +} + +@keyframes animatetop { + from { + top: -300px; + opacity: 0 + } + + to { + top: 0; + opacity: 1 + } +} + +.w3-animate-left { + position: relative; + animation: animateleft 0.4s +} + +@keyframes animateleft { + from { + left: -300px; + opacity: 0 + } + + to { + left: 0; + opacity: 1 + } +} + +.w3-animate-right { + position: relative; + animation: animateright 0.4s +} + +@keyframes animateright { + from { + right: -300px; + opacity: 0 + } + + to { + right: 0; + opacity: 1 + } +} + +.w3-animate-bottom { + position: relative; + animation: animatebottom 0.4s +} + +@keyframes animatebottom { + from { + bottom: -300px; + opacity: 0 + } + + to { + bottom: 0; + opacity: 1 + } +} + +.w3-animate-zoom { + animation: animatezoom 0.6s +} + +@keyframes animatezoom { + from { + transform: scale(0) + } + + to { + transform: scale(1) + } +} + +.w3-animate-input { + transition: width 0.4s ease-in-out +} + +.w3-animate-input:focus { + width: 100% !important +} + +.w3-opacity, +.w3-hover-opacity:hover { + opacity: 0.60 +} + +.w3-opacity-off, +.w3-hover-opacity-off:hover { + opacity: 1 +} + +.w3-opacity-max { + opacity: 0.25 +} + +.w3-opacity-min { + opacity: 0.75 +} + +.w3-greyscale-max, +.w3-grayscale-max, +.w3-hover-greyscale:hover, +.w3-hover-grayscale:hover { + filter: grayscale(100%) +} + +.w3-greyscale, +.w3-grayscale { + filter: grayscale(75%) +} + +.w3-greyscale-min, +.w3-grayscale-min { + filter: grayscale(50%) +} + +.w3-sepia { + filter: sepia(75%) +} + +.w3-sepia-max, +.w3-hover-sepia:hover { + filter: sepia(100%) +} + +.w3-sepia-min { + filter: sepia(50%) +} + +.w3-tiny { + font-size: 10px !important +} + +.w3-small { + font-size: 12px !important +} + +.w3-medium { + font-size: 15px !important +} + +.w3-large { + font-size: 18px !important +} + +.w3-xlarge { + font-size: 24px !important +} + +.w3-xxlarge { + font-size: 36px !important +} + +.w3-xxxlarge { + font-size: 48px !important +} + +.w3-jumbo { + font-size: 64px !important +} + +.w3-left-align { + text-align: left !important +} + +.w3-right-align { + text-align: right !important +} + +.w3-justify { + text-align: justify !important +} + +.w3-center { + text-align: center !important +} + +.w3-border-0 { + border: 0 !important +} + +.w3-border { + border: 1px solid #ccc !important +} + +.w3-border-top { + border-top: 1px solid #ccc !important +} + +.w3-border-bottom { + border-bottom: 1px solid #ccc !important +} + +.w3-border-left { + border-left: 1px solid #ccc !important +} + +.w3-border-right { + border-right: 1px solid #ccc !important +} + +.w3-topbar { + border-top: 6px solid #ccc !important +} + +.w3-bottombar { + border-bottom: 6px solid #ccc !important +} + +.w3-leftbar { + border-left: 6px solid #ccc !important +} + +.w3-rightbar { + border-right: 6px solid #ccc !important +} + +.w3-section, +.w3-code { + margin-top: 16px !important; + margin-bottom: 16px !important +} + +.w3-margin { + margin: 16px !important +} + +.w3-margin-top { + margin-top: 16px !important +} + +.w3-margin-bottom { + margin-bottom: 16px !important +} + +.w3-margin-left { + margin-left: 16px !important +} + +.w3-margin-right { + margin-right: 16px !important +} + +.w3-padding-small { + padding: 4px 8px !important +} + +.w3-padding { + padding: 8px 16px !important +} + +.w3-padding-large { + padding: 12px 24px !important +} + +.w3-padding-16 { + padding-top: 16px !important; + padding-bottom: 16px !important +} + +.w3-padding-24 { + padding-top: 24px !important; + padding-bottom: 24px !important +} + +.w3-padding-32 { + padding-top: 32px !important; + padding-bottom: 32px !important +} + +.w3-padding-48 { + padding-top: 48px !important; + padding-bottom: 48px !important +} + +.w3-padding-64 { + padding-top: 64px !important; + padding-bottom: 64px !important +} + +.w3-padding-top-64 { + padding-top: 64px !important +} + +.w3-padding-top-48 { + padding-top: 48px !important +} + +.w3-padding-top-32 { + padding-top: 32px !important +} + +.w3-padding-top-24 { + padding-top: 24px !important +} + +.w3-left { + float: left !important +} + +.w3-right { + float: right !important +} + +.w3-button:hover { + color: #000 !important; + background-color: #ccc !important +} + +.w3-transparent, +.w3-hover-none:hover { + background-color: transparent !important +} + +.w3-hover-none:hover { + box-shadow: none !important +} + +/* Colors */ +.w3-amber, +.w3-hover-amber:hover { + color: #000 !important; + background-color: #ffc107 !important +} + +.w3-aqua, +.w3-hover-aqua:hover { + color: #000 !important; + background-color: #00ffff !important +} + +.w3-blue, +.w3-hover-blue:hover { + color: #fff !important; + background-color: #2196F3 !important +} + +.w3-light-blue, +.w3-hover-light-blue:hover { + color: #000 !important; + background-color: #87CEEB !important +} + +.w3-brown, +.w3-hover-brown:hover { + color: #fff !important; + background-color: #795548 !important +} + +.w3-cyan, +.w3-hover-cyan:hover { + color: #000 !important; + background-color: #00bcd4 !important +} + +.w3-blue-grey, +.w3-hover-blue-grey:hover, +.w3-blue-gray, +.w3-hover-blue-gray:hover { + color: #fff !important; + background-color: #607d8b !important +} + +.w3-green, +.w3-hover-green:hover { + color: #fff !important; + background-color: #4CAF50 !important +} + +.w3-light-green, +.w3-hover-light-green:hover { + color: #000 !important; + background-color: #8bc34a !important +} + +.w3-indigo, +.w3-hover-indigo:hover { + color: #fff !important; + background-color: #3f51b5 !important +} + +.w3-khaki, +.w3-hover-khaki:hover { + color: #000 !important; + background-color: #f0e68c !important +} + +.w3-lime, +.w3-hover-lime:hover { + color: #000 !important; + background-color: #cddc39 !important +} + +.w3-orange, +.w3-hover-orange:hover { + color: #000 !important; + background-color: #ff9800 !important +} + +.w3-deep-orange, +.w3-hover-deep-orange:hover { + color: #fff !important; + background-color: #ff5722 !important +} + +.w3-pink, +.w3-hover-pink:hover { + color: #fff !important; + background-color: #e91e63 !important +} + +.w3-purple, +.w3-hover-purple:hover { + color: #fff !important; + background-color: #9c27b0 !important +} + +.w3-deep-purple, +.w3-hover-deep-purple:hover { + color: #fff !important; + background-color: #673ab7 !important +} + +.w3-red, +.w3-hover-red:hover { + color: #fff !important; + background-color: #f44336 !important +} + +.w3-sand, +.w3-hover-sand:hover { + color: #000 !important; + background-color: #fdf5e6 !important +} + +.w3-teal, +.w3-hover-teal:hover { + color: #fff !important; + background-color: #009688 !important +} + +.w3-yellow, +.w3-hover-yellow:hover { + color: #000 !important; + background-color: #ffeb3b !important +} + +.w3-white, +.w3-hover-white:hover { + color: #000 !important; + background-color: #fff !important +} + +.w3-black, +.w3-hover-black:hover { + color: #fff !important; + background-color: #000 !important +} + +.w3-grey, +.w3-hover-grey:hover, +.w3-gray, +.w3-hover-gray:hover { + color: #000 !important; + background-color: #9e9e9e !important +} + +.w3-light-grey, +.w3-hover-light-grey:hover, +.w3-light-gray, +.w3-hover-light-gray:hover { + color: #000 !important; + background-color: #f1f1f1 !important +} + +.w3-dark-grey, +.w3-hover-dark-grey:hover, +.w3-dark-gray, +.w3-hover-dark-gray:hover { + color: #fff !important; + background-color: #616161 !important +} + +.w3-pale-red, +.w3-hover-pale-red:hover { + color: #000 !important; + background-color: #ffdddd !important +} + +.w3-pale-green, +.w3-hover-pale-green:hover { + color: #000 !important; + background-color: #ddffdd !important +} + +.w3-pale-yellow, +.w3-hover-pale-yellow:hover { + color: #000 !important; + background-color: #ffffcc !important +} + +.w3-pale-blue, +.w3-hover-pale-blue:hover { + color: #000 !important; + background-color: #ddffff !important +} + +.w3-text-amber, +.w3-hover-text-amber:hover { + color: #ffc107 !important +} + +.w3-text-aqua, +.w3-hover-text-aqua:hover { + color: #00ffff !important +} + +.w3-text-blue, +.w3-hover-text-blue:hover { + color: #2196F3 !important +} + +.w3-text-light-blue, +.w3-hover-text-light-blue:hover { + color: #87CEEB !important +} + +.w3-text-brown, +.w3-hover-text-brown:hover { + color: #795548 !important +} + +.w3-text-cyan, +.w3-hover-text-cyan:hover { + color: #00bcd4 !important +} + +.w3-text-blue-grey, +.w3-hover-text-blue-grey:hover, +.w3-text-blue-gray, +.w3-hover-text-blue-gray:hover { + color: #607d8b !important +} + +.w3-text-green, +.w3-hover-text-green:hover { + color: #4CAF50 !important +} + +.w3-text-light-green, +.w3-hover-text-light-green:hover { + color: #8bc34a !important +} + +.w3-text-indigo, +.w3-hover-text-indigo:hover { + color: #3f51b5 !important +} + +.w3-text-khaki, +.w3-hover-text-khaki:hover { + color: #b4aa50 !important +} + +.w3-text-lime, +.w3-hover-text-lime:hover { + color: #cddc39 !important +} + +.w3-text-orange, +.w3-hover-text-orange:hover { + color: #ff9800 !important +} + +.w3-text-deep-orange, +.w3-hover-text-deep-orange:hover { + color: #ff5722 !important +} + +.w3-text-pink, +.w3-hover-text-pink:hover { + color: #e91e63 !important +} + +.w3-text-purple, +.w3-hover-text-purple:hover { + color: #9c27b0 !important +} + +.w3-text-deep-purple, +.w3-hover-text-deep-purple:hover { + color: #673ab7 !important +} + +.w3-text-red, +.w3-hover-text-red:hover { + color: #f44336 !important +} + +.w3-text-sand, +.w3-hover-text-sand:hover { + color: #fdf5e6 !important +} + +.w3-text-teal, +.w3-hover-text-teal:hover { + color: #009688 !important +} + +.w3-text-yellow, +.w3-hover-text-yellow:hover { + color: #d2be0e !important +} + +.w3-text-white, +.w3-hover-text-white:hover { + color: #fff !important +} + +.w3-text-black, +.w3-hover-text-black:hover { + color: #000 !important +} + +.w3-text-grey, +.w3-hover-text-grey:hover, +.w3-text-gray, +.w3-hover-text-gray:hover { + color: #757575 !important +} + +.w3-text-light-grey, +.w3-hover-text-light-grey:hover, +.w3-text-light-gray, +.w3-hover-text-light-gray:hover { + color: #f1f1f1 !important +} + +.w3-text-dark-grey, +.w3-hover-text-dark-grey:hover, +.w3-text-dark-gray, +.w3-hover-text-dark-gray:hover { + color: #3a3a3a !important +} + +.w3-border-amber, +.w3-hover-border-amber:hover { + border-color: #ffc107 !important +} + +.w3-border-aqua, +.w3-hover-border-aqua:hover { + border-color: #00ffff !important +} + +.w3-border-blue, +.w3-hover-border-blue:hover { + border-color: #2196F3 !important +} + +.w3-border-light-blue, +.w3-hover-border-light-blue:hover { + border-color: #87CEEB !important +} + +.w3-border-brown, +.w3-hover-border-brown:hover { + border-color: #795548 !important +} + +.w3-border-cyan, +.w3-hover-border-cyan:hover { + border-color: #00bcd4 !important +} + +.w3-border-blue-grey, +.w3-hover-border-blue-grey:hover, +.w3-border-blue-gray, +.w3-hover-border-blue-gray:hover { + border-color: #607d8b !important +} + +.w3-border-green, +.w3-hover-border-green:hover { + border-color: #4CAF50 !important +} + +.w3-border-light-green, +.w3-hover-border-light-green:hover { + border-color: #8bc34a !important +} + +.w3-border-indigo, +.w3-hover-border-indigo:hover { + border-color: #3f51b5 !important +} + +.w3-border-khaki, +.w3-hover-border-khaki:hover { + border-color: #f0e68c !important +} + +.w3-border-lime, +.w3-hover-border-lime:hover { + border-color: #cddc39 !important +} + +.w3-border-orange, +.w3-hover-border-orange:hover { + border-color: #ff9800 !important +} + +.w3-border-deep-orange, +.w3-hover-border-deep-orange:hover { + border-color: #ff5722 !important +} + +.w3-border-pink, +.w3-hover-border-pink:hover { + border-color: #e91e63 !important +} + +.w3-border-purple, +.w3-hover-border-purple:hover { + border-color: #9c27b0 !important +} + +.w3-border-deep-purple, +.w3-hover-border-deep-purple:hover { + border-color: #673ab7 !important +} + +.w3-border-red, +.w3-hover-border-red:hover { + border-color: #f44336 !important +} + +.w3-border-sand, +.w3-hover-border-sand:hover { + border-color: #fdf5e6 !important +} + +.w3-border-teal, +.w3-hover-border-teal:hover { + border-color: #009688 !important +} + +.w3-border-yellow, +.w3-hover-border-yellow:hover { + border-color: #ffeb3b !important +} + +.w3-border-white, +.w3-hover-border-white:hover { + border-color: #fff !important +} + +.w3-border-black, +.w3-hover-border-black:hover { + border-color: #000 !important +} + +.w3-border-grey, +.w3-hover-border-grey:hover, +.w3-border-gray, +.w3-hover-border-gray:hover { + border-color: #9e9e9e !important +} + +.w3-border-light-grey, +.w3-hover-border-light-grey:hover, +.w3-border-light-gray, +.w3-hover-border-light-gray:hover { + border-color: #f1f1f1 !important +} + +.w3-border-dark-grey, +.w3-hover-border-dark-grey:hover, +.w3-border-dark-gray, +.w3-hover-border-dark-gray:hover { + border-color: #616161 !important +} + +.w3-border-pale-red, +.w3-hover-border-pale-red:hover { + border-color: #ffe7e7 !important +} + +.w3-border-pale-green, +.w3-hover-border-pale-green:hover { + border-color: #e7ffe7 !important +} + +.w3-border-pale-yellow, +.w3-hover-border-pale-yellow:hover { + border-color: #ffffcc !important +} + +.w3-border-pale-blue, +.w3-hover-border-pale-blue:hover { + border-color: #e7ffff !important +} \ No newline at end of file diff --git a/public/assets/fonts/forkawesome-webfont.eot b/public/assets/fonts/forkawesome-webfont.eot new file mode 100644 index 0000000..c2c24b4 Binary files /dev/null and b/public/assets/fonts/forkawesome-webfont.eot differ diff --git a/public/assets/fonts/forkawesome-webfont.svg b/public/assets/fonts/forkawesome-webfont.svg new file mode 100644 index 0000000..bd45b30 --- /dev/null +++ b/public/assets/fonts/forkawesome-webfont.svg @@ -0,0 +1,3232 @@ + + + + + +Created by FontForge 20190801 at Fri Aug 27 00:07:49 2021 + By shine +The Fork Awesome font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/OFL). Fork Awesome is a fork based of off Font Awesome 4.7.0 by Dave Gandy. More info on licenses at https://forkawesome.github.io + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/fonts/forkawesome-webfont.ttf b/public/assets/fonts/forkawesome-webfont.ttf new file mode 100644 index 0000000..1f1d8f3 Binary files /dev/null and b/public/assets/fonts/forkawesome-webfont.ttf differ diff --git a/public/assets/fonts/forkawesome-webfont.woff b/public/assets/fonts/forkawesome-webfont.woff new file mode 100644 index 0000000..cca43af Binary files /dev/null and b/public/assets/fonts/forkawesome-webfont.woff differ diff --git a/public/assets/fonts/forkawesome-webfont.woff2 b/public/assets/fonts/forkawesome-webfont.woff2 new file mode 100644 index 0000000..c96e5bf Binary files /dev/null and b/public/assets/fonts/forkawesome-webfont.woff2 differ diff --git a/public/assets/img/wikipedia_logiciel_libre.png b/public/assets/img/wikipedia_logiciel_libre.png new file mode 100644 index 0000000..a5dda89 Binary files /dev/null and b/public/assets/img/wikipedia_logiciel_libre.png differ diff --git a/favicon.ico b/public/favicon.ico similarity index 100% rename from favicon.ico rename to public/favicon.ico diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..e83e4a9 --- /dev/null +++ b/public/index.php @@ -0,0 +1,68 @@ +', $name, ''; + echo '
'; + echo ' + ', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], ' + '; + echo '
', htmlentities(print_r($data, 1)), '
'; + echo ' +
+
+'; +} + +use App\Router; +use App\Utils\Error; +use Noodlehaus\Config; + +$router = new Router(); + +$router->addRoute(['/', '/index.php', '/index'], 'App\Controllers\Home', 'GET'); +$router->addRoute('/api', 'App\Controllers\Result', 'GET'); +$router->addRoute('/hmac', 'App\Controllers\GenHmac', 'GET'); +//$router->addRoute('/debug', 'App\Bin\ThumbShoter', 'GET'); +$router->addRoute('/backend', 'App\Controllers\Backend', 'GET'); +$router->addRoute('/logout', 'App\Controllers\Logout', 'GET'); + +$conf = (object)Config::load([__DIR__ . '/../datas/config.default.json', '?' . __DIR__ . '/../datas/config.json'])->all(); + +if (!file_exists(__DIR__ . '/../datas/config.json')) { + session_start(); + $conf->webPage = true; + $_SESSION['login'] = 1; + $_SESSION['firstRun'] = 1; + $_SESSION['webPage'] = 1; + if ($_SERVER['REQUEST_URI'] !== '/backend?page=settings') { + header("Location:/backend?page=settings"); + exit(); + } +} + +if ($conf->onlyLocalServer === true && $_SERVER['REMOTE_ADDR'] !== '127.0.0.1') { + $error = new Error(); + $error->index((object)['status' => 404, 'message' => 'The page that you have requested could not be found.']); + exit(); +} + +if ($router->match()) { + $router->render($conf); +} else { + $error = new Error(); + $error->index((object)['status' => 404, 'message' => 'The page that you have requested could not be found.']); +} diff --git a/robots.txt b/public/robots.txt similarity index 100% rename from robots.txt rename to public/robots.txt diff --git a/bin/error.png b/src/images/error.png similarity index 100% rename from bin/error.png rename to src/images/error.png diff --git a/src/images/error_fav.png b/src/images/error_fav.png new file mode 100644 index 0000000..069194d Binary files /dev/null and b/src/images/error_fav.png differ diff --git a/bin/error_thumb.png b/src/images/error_thumb.png similarity index 100% rename from bin/error_thumb.png rename to src/images/error_thumb.png diff --git a/src/images/full_generation_in_progress.jpg b/src/images/full_generation_in_progress.jpg new file mode 100644 index 0000000..87f4254 Binary files /dev/null and b/src/images/full_generation_in_progress.jpg differ diff --git a/src/images/generation_in_progress.svg b/src/images/generation_in_progress.svg new file mode 100644 index 0000000..a02d36e --- /dev/null +++ b/src/images/generation_in_progress.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + Generationin progress + + + diff --git a/src/images/hd_generation_in_progress.jpg b/src/images/hd_generation_in_progress.jpg new file mode 100644 index 0000000..b2eb9b7 Binary files /dev/null and b/src/images/hd_generation_in_progress.jpg differ diff --git a/src/images/thumb_generation_in_progress.jpg b/src/images/thumb_generation_in_progress.jpg new file mode 100644 index 0000000..9cb7934 Binary files /dev/null and b/src/images/thumb_generation_in_progress.jpg differ diff --git a/style.css b/style.css deleted file mode 100644 index c88d123..0000000 --- a/style.css +++ /dev/null @@ -1,125 +0,0 @@ -html { - padding: 1em; - font-family: arial, sans-serif; - font-weight: bold; - line-height: 2em; - background-color: #dedede; -} - -a { - text-decoration: none; - color:#8AC007; -} - -a:hover { - text-decoration: underline; -} - -a:visited { - color : #8AC007; -} - -form, #result, #header, .message, .hMenu, #log { - padding: 1em; - text-align: center; - width: 60%; - margin: 1em auto; - background-color: #ffffff; - border-radius: 5px; - box-shadow: 0 0 8px rgba(0, 0, 0, 0.50), 0 85px 180px 0 #FFFFFF, 0 12px 8px -5px rgba(0, 0, 0, 0.95); -} - -input, select { - height: 2em; -} - -#result input[type=text] { - width: 80%; - display: inline-block; -} - -input[type=url] { - width: 100%; -} - -#result label { - margin-right: 1em; - width: 15%; - display: inline-block; - text-align: center; -} - -form .info { - text-align: right; - margin: 0 0; - line-height: 0.8em; - font-size: 0.8em; -} - -#result, #header { - text-align: center; - padding: 1em; - margin: 1em auto; -} - -#result img { - box-shadow: 3px 3px 3px #cdcdcd; - border: 1px solid #cdcdcd; - border-radius: 5px; -} - -.message { - background-color: orange; -} - -.hMenu li { - display: inline-block; - font-size: 1.2em; -} - -.hMenu li:after { - content: " / "; -} - -.hMenu li:last-child:after { - content: ""; -} - -.clear { - text-align: right; -} - -#log li { - text-align: left; -} - -@media screen and (min-width: 320px) and (max-width: 800px) { - - html { - padding: 0.1em; - } - - form, #result { - width: 100%; - padding: 0.1em; - } - - input[type=url] { - width: 99%; - height: 2em; - } - input[type=submit] { - width: 99%; - height: 2em; - } - - label { - display: block; - } - - select { - width: 99%; - height: 2em; - display: block; - } -} \ No newline at end of file diff --git a/tpl/bone.php b/tpl/bone.php new file mode 100644 index 0000000..7062841 --- /dev/null +++ b/tpl/bone.php @@ -0,0 +1,19 @@ + + + + + SoShot + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tpl/footer.php b/tpl/footer.php new file mode 100644 index 0000000..6b35763 --- /dev/null +++ b/tpl/footer.php @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/tpl/home.php b/tpl/home.php new file mode 100644 index 0000000..abbf147 --- /dev/null +++ b/tpl/home.php @@ -0,0 +1,10 @@ +
+

SoShot

+

Personal webshoter

+
+ Thumbshot of french wikipedia home page +
+

+ Homepage | Contact +

+
\ No newline at end of file diff --git a/tpl/infos.php b/tpl/infos.php new file mode 100644 index 0000000..0d49cc2 --- /dev/null +++ b/tpl/infos.php @@ -0,0 +1,143 @@ + +
+
+

Infos

+ +
    +
  • Total :
  • +
  • Queue :
  • +
  • Error :
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DomainCreatedCompleteFullHDnHDThumbFaviconOgPDF
url); ?>created; ?>complete); ?>full); ?>hd); ?>nhd); ?>thumb); ?>fav); ?>og); ?>pdf); ?>
+ + +
+ +
+
+
+ × +

+ + +

+ + + + + + +
+
+
+ +
+ + diff --git a/tpl/login.php b/tpl/login.php new file mode 100644 index 0000000..8abcbc4 --- /dev/null +++ b/tpl/login.php @@ -0,0 +1,11 @@ +
+ + +
+
+ + + +
+
+
\ No newline at end of file diff --git a/tpl/nav.php b/tpl/nav.php new file mode 100644 index 0000000..32a22b9 --- /dev/null +++ b/tpl/nav.php @@ -0,0 +1,28 @@ + +
+
+ + SoShot + runningJob) : ?> +
+
+ + + + + +
+ + + +
\ No newline at end of file diff --git a/tpl/settings.php b/tpl/settings.php new file mode 100644 index 0000000..162d2c6 --- /dev/null +++ b/tpl/settings.php @@ -0,0 +1,82 @@ + + +
+
+

title; ?>

+
+ +

+ + conf->onlyLocalServer, true); ?>> +

+

+ + conf->webPage, true); ?>> +

+

+ + conf->log, true); ?>> +

+

+ + conf->alwaysMakePdf, true); ?>> +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+ +

+ + +

+ +

+ + passwordRequired; ?>> +

+ +

+ + +

+ +

+ + + +

+
+
+
\ No newline at end of file