diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4fc224c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+/twig_cache/
+composer.phar
+/vendor/
+/config.php
+/scripts/images/*/
+/scripts/images/sym.txt
+/web/static/img/roms/*
+!/web/static/img/roms/README
\ No newline at end of file
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..c549321
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,106 @@
+# RetroGames Installation
+
+These instructions assume you have experience with installing, configuring, and securing web site software within Linux. Instructions have been tested with Ubuntu 16.04.4 LTS and Debian Stretch.
+
+That said, it is possible to run RetroGames on a Windows server.
+### Prerequisites
+
+- PHP >= 7.2
+
+ `apt-get install php`
+- MariaDB
+
+ `apt-get install mariadb-server`
+- memcached
+
+ `apt-get install memcached`
+- Composer
+
+ https://getcomposer.org/download/
+
+### Installing
+##### Getting the sauce:
+
+```bash
+git clone https://wherever.the/code/ends-up-on.git
+```
+
+##### Installing the PHP requirements:
+`cd` into the directory where the code now lies then install the site dependencies via Composer:
+```bash
+cd gg
+php composer.phar install
+```
+##### Configuring the site:
+Make a copy of config_blank.php named config.php and edit it.
+```bash
+cp config_blank.php config.php
+vi config.php
+```
+config.php explantion:
+```php
+ "/var/www/rg",
+ "LOGIN_PATH" => 'login',
+ "DEV" => true,
+
+ "DB" => [
+ "DBNAME" => "retro",
+ "DBUSER" => "root",
+ "DBPASS" => ""
+ ],
+
+ "USER" => [
+ "NAME" => "supersecretloginname",
+ "PASS" => "asdf",
+ "KEY" => "123-456-789"
+ ],
+ "MEMCACHED" => [
+ "SERVER" => "127.0.0.1",
+ "PORT" => 11211
+ ]
+];
+```
+
+##### Importing the empty database:
+Login to MySQL, create a database, then import db.sql.
+```
+MariaDB [(none)]> CREATE DATABASE `rg`;
+MariaDB [rg]> USE `rg`;
+MariaDB [rg]> SOURCE db.sql;
+```
+
+##### Configuring the Nginx:
+The Nginx config is pretty standard. I'll only list the relevant config values.
+```nginx
+server {
+ listen 443 ssl http2;
+ root /var/www/rg/web; # <-- must point to /web directory
+ index index.php
+ autoindex on;
+ location = /index.php {
+ try_files $uri =404;
+ fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include fastcgi_params;
+ }
+ location / {
+ try_files $uri /index.php$is_args$args;
+ }
+ location ~ \.php$ {
+ # prevent exposure of any other .php files!!!
+ return 404;
+ }
+ location ~ /\.ht {
+ deny all;
+ }
+}
+```
+
+### Running tests
+lol
+
+### Coding style
+hahaha
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d742cee
--- /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.
+
+ rg
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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:
+
+ rg Copyright (C) 2018 GoodOldDownloads
+ 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..4d65da0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+# RetroGames
+A site for ROMs and stuff.
+
+### Installing
+See [INSTALL.md](INSTALL.md)
+
+### Authors
+
+
+### Contributors
+Additional contributors are added in a comment at the top of the site in [main.twig](templates/main.twig)
+
+### License
+
+This project is licensed under the GNU General Public License v3.0 - see [LICENSE](LICENSE) for details.
+and/or this [tl;dr](https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3))
diff --git a/captcha/audios.json b/captcha/audios.json
new file mode 100644
index 0000000..2789070
--- /dev/null
+++ b/captcha/audios.json
@@ -0,0 +1,3 @@
+[
+ {}
+]
\ No newline at end of file
diff --git a/captcha/images.php b/captcha/images.php
new file mode 100644
index 0000000..1500335
--- /dev/null
+++ b/captcha/images.php
@@ -0,0 +1,51 @@
+ _("Click the Nintendo 64 Controller"),
+ "path" => "n64.png"
+ ],
+ [
+ "name" => _("Select the NES Controller"),
+ "path" => "nes.png"
+ ],
+ [
+ "name" => _("Select the PlayStation Controller"),
+ "path" => "ps1.png"
+ ],
+ [
+ "name" => _("Select the PlayStation 3 Controller"),
+ "path" => "ps3.png"
+ ],
+ [
+ "name" => _("Select the PlayStation 4 Controller"),
+ "path" => "ps4.png"
+ ],
+ [
+ "name" => _("Select the SNES Controller"),
+ "path" => "snes.png"
+ ],
+ [
+ "name" => _("Select the Xbone Controller"),
+ "path" => "xbox_one.png"
+ ],
+ [
+ "name" => _("Select the Xbox 360 Controller"),
+ "path" => "x360.png"
+ ],
+ [
+ "name" => _("Click Noctis"),
+ "path" => "noctis.png"
+ ],
+ [
+ "name" => _("Click Gladiolus"),
+ "path" => "gladiolus.png"
+ ],
+ [
+ "name" => _("Click Luna"),
+ "path" => "luna.png"
+ ],
+ [
+ "name" => _("(woof)"),
+ "path" => "annoying_dog.png"
+ ]
+];
\ No newline at end of file
diff --git a/captcha/images/annoying_dog.png b/captcha/images/annoying_dog.png
new file mode 100644
index 0000000..4341658
Binary files /dev/null and b/captcha/images/annoying_dog.png differ
diff --git a/captcha/images/gladiolus.png b/captcha/images/gladiolus.png
new file mode 100644
index 0000000..76b2b25
Binary files /dev/null and b/captcha/images/gladiolus.png differ
diff --git a/captcha/images/luna.png b/captcha/images/luna.png
new file mode 100644
index 0000000..e29cbea
Binary files /dev/null and b/captcha/images/luna.png differ
diff --git a/captcha/images/n64.png b/captcha/images/n64.png
new file mode 100644
index 0000000..17883d5
Binary files /dev/null and b/captcha/images/n64.png differ
diff --git a/captcha/images/nes.png b/captcha/images/nes.png
new file mode 100644
index 0000000..cfc96c3
Binary files /dev/null and b/captcha/images/nes.png differ
diff --git a/captcha/images/noctis.png b/captcha/images/noctis.png
new file mode 100644
index 0000000..8c5339b
Binary files /dev/null and b/captcha/images/noctis.png differ
diff --git a/captcha/images/ps1.png b/captcha/images/ps1.png
new file mode 100644
index 0000000..f597deb
Binary files /dev/null and b/captcha/images/ps1.png differ
diff --git a/captcha/images/ps3.png b/captcha/images/ps3.png
new file mode 100644
index 0000000..dd29090
Binary files /dev/null and b/captcha/images/ps3.png differ
diff --git a/captcha/images/ps4.png b/captcha/images/ps4.png
new file mode 100644
index 0000000..002dde1
Binary files /dev/null and b/captcha/images/ps4.png differ
diff --git a/captcha/images/snes.png b/captcha/images/snes.png
new file mode 100644
index 0000000..ec18c6f
Binary files /dev/null and b/captcha/images/snes.png differ
diff --git a/captcha/images/x360.png b/captcha/images/x360.png
new file mode 100644
index 0000000..7353339
Binary files /dev/null and b/captcha/images/x360.png differ
diff --git a/captcha/images/xbox_one.png b/captcha/images/xbox_one.png
new file mode 100644
index 0000000..1919553
Binary files /dev/null and b/captcha/images/xbox_one.png differ
diff --git a/class.retro.php b/class.retro.php
new file mode 100644
index 0000000..cf8646b
--- /dev/null
+++ b/class.retro.php
@@ -0,0 +1,237 @@
+.
+*/
+namespace GoodOldDownloads;
+
+require __DIR__ . '/db.php';
+
+class Retro
+{
+ public function __construct()
+ {
+ require __DIR__ . '/config.php';
+ $this->CONFIG = $CONFIG;
+ }
+
+ public function parseNoIntro($name)
+ {
+ global $dbh;
+ if (empty($name)) {
+ return false;
+ }
+ $regions = $dbh->prepare("SELECT * FROM `regions`");
+ $regions->execute();
+ $regions = $regions->fetchAll(\PDO::FETCH_COLUMN, 0);
+ preg_match("/^(?'title'[A-z0-9$!#&%'()+,\-.;=@[\]\^_{}~ ]+) \((?'region'".join("|" ,$regions).")\)(?: \((?'languages'[A-z]{2}(?:,[A-z]{2})*?)\))?(?: \(Disc (?'disc'[0-9]|[A-Z])\))?(?: \((?'devstatus'Sample|Proto|Beta[0-9]*?)\))?(?: \((?'additional'(?!v[0-9.,\-+ A-z]*|Rev [0-9A-Z.]+|Unl)[A-z0-9$!#&%'()+,\-.;=@[\]\^_{}~ ]+?)\))?(?: \((?'version'(?:v|V)[0-9.,\-+ A-z]*|Rev [0-9A-Z.]+)\))?(?: \((?'special'[A-z]{2})\))?(?: \((?'license'Unl)\))?(?: \((?'extratrash'Demo|Manual|iQue|Nintendo Channel.*?|(?:DS )?Download Station.*?|Satakore|Genteiban|Virtual Console|iDS|Wi-Fi Kiosk|Save Data|NDSi Enhanced|Kiosk.*?|(?:[0-9]+?[A-Z](?:, [0-9]+?[A-Z])*?))\))*(?: \[(?'status'b)\])?/",
+ trim($name), $matches, PREG_OFFSET_CAPTURE);
+
+ if (count($matches) === 0) {
+ return false;
+ }
+ if (trim($name) !== $matches[0][0]) {
+ // If whole string not parsed then consider it a fail
+ return false;
+ }
+
+ $output = [
+ 'title' => null,
+ 'disc' => null,
+ 'region' => null,
+ 'languages' => null,
+ 'version' => null,
+ 'devstatus' => null,
+ 'additional' => null,
+ 'special' => null,
+ 'license' => null,
+ 'status' => null
+ ];
+ foreach ($matches as $key => $value) {
+ if (is_int($key)) {
+ continue;
+ }
+ if (!isset($value[0]) || trim($value[0]) === "") {
+ $output[$key] = null;
+ } else {
+ $output[$key] = $value[0];
+ }
+ }
+
+ // Show original name in output
+ $output['original'] = $matches[0][0];
+
+ // Explode languages
+ if (isset($output['languages'])) {
+ $output['languages'] = explode(",", $output['languages']);
+ }
+
+ // return false if title or region not detected
+ if (($output['title'] === null) || ($output['region'] === null)) {
+ return false;
+ }
+ return $output;
+ }
+
+ public function insertNoIntro($name, $console, $dirInfo, $updateDupe = false, $custom = [])
+ {
+ global $dbh;
+ if (empty($name) || empty($console)) {
+ return false;
+ }
+
+ // Try to parse
+ $parsed = $this->parseNoIntro($name);
+ if ($parsed === false) {
+ return false;
+ }
+
+ if (!empty($custom)) {
+ $parsed = array_merge($parsed, $custom);
+ if (isset($custom['original'])) {
+ $name = $custom['original'];
+ }
+ }
+
+ // Check if console even exists
+ $checkConsole = $dbh->prepare("SELECT COUNT(*) FROM `consoles` WHERE `slug` = :slug");
+ $checkConsole->bindParam(':slug', $console, \PDO::PARAM_STR);
+ $checkConsole->execute();
+ $consoleCheck = $checkConsole->fetchColumn(0);
+ if ($consoleCheck != 1) {
+ return false;
+ }
+
+ // Put languages back in comma seperated list
+ $languages = $parsed['languages'];
+ if ($languages != null) {
+ $languages = join(",",$parsed['languages']);
+ }
+
+ // Build slug
+ $slugify = new \Cocur\Slugify\Slugify();
+ $discSlug = "";
+ if ($parsed['disc'] !== null) {
+ $discSlug = "disc {$parsed['disc']}";
+ }
+ $slug = $slugify->slugify(str_replace("'", "", $name));
+
+ //Insert ROM!
+ $sql = "
+ INSERT INTO `roms` (`dir_info_id`,
+ `slug`,
+ `console`,
+ `disc`,
+ `name_original`,
+ `name`,
+ `region`,
+ `languages`,
+ `version`,
+ `devstatus`,
+ `additional`,
+ `special`,
+ `license`,
+ `status`,
+ `last_upload`
+ )
+ VALUES (
+ :dir_info_id,
+ :slug,
+ :console,
+ :disc,
+ :original,
+ :name,
+ :region,
+ :languages,
+ :version,
+ :devstatus,
+ :additional,
+ :special,
+ :license,
+ :status,
+ UNIX_TIMESTAMP()
+ )";
+ if ($updateDupe) {
+ $sql .= "ON DUPLICATE KEY UPDATE
+ `dir_info_id` = :dir_info_id,
+ `slug` = :slug,
+ `console` = :console,
+ `disc` = :disc,
+ `name_original` = :original,
+ `name` = :name,
+ `region` = :region,
+ `languages` = :languages,
+ `version` = :version,
+ `devstatus` = :devstatus,
+ `additional` = :additional,
+ `special` = :special,
+ `license` = :license,
+ `status` = :status,
+ `last_upload` = UNIX_TIMESTAMP()";
+ }
+ $insertROM = $dbh->prepare($sql);
+ $insertROM->bindParam(':dir_info_id', $dirInfo, \PDO::PARAM_INT);
+ $insertROM->bindParam(':slug', $slug, \PDO::PARAM_STR);
+ $insertROM->bindParam(':console', $console, \PDO::PARAM_STR);
+ $insertROM->bindParam(':disc', $parsed['disc'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':original', $parsed['original'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':name', $parsed['title'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':region', $parsed['region'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':languages', $languages, \PDO::PARAM_STR);
+ $insertROM->bindParam(':version', $parsed['version'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':devstatus', $parsed['devstatus'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':additional', $parsed['additional'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':special', $parsed['special'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':license', $parsed['license'], \PDO::PARAM_STR);
+ $insertROM->bindParam(':status', $parsed['status'], \PDO::PARAM_STR);
+
+ // Try to parse
+ return $insertROM->execute();
+ }
+
+ public function insertLink($name_original, $console, $link, $filename, $host, $link_safe = null, $size = null)
+ {
+ global $dbh;
+
+ // Check if ROM exists
+ $checkRom = $dbh->prepare("SELECT `id` FROM `roms` WHERE `name_original` = :name_original AND `console` = :console");
+ $checkRom->bindParam(':name_original', $name_original, \PDO::PARAM_STR);
+ $checkRom->bindParam(':console', $console, \PDO::PARAM_STR);
+ $checkRom->execute();
+ $romId = $checkRom->fetchColumn(0);
+
+ if (!$romId) {
+ return false;
+ }
+
+ $romId = intval($romId);
+ $addLink = $dbh->prepare("INSERT INTO `links` (`rom_id`, `link`, `link_safe`, `file_name`, `status`, `host`) VALUES (:rom_id, :link, :safelink, :filename, 'DONE', :host)");
+ $addLink->bindParam(':rom_id', $romId, \PDO::PARAM_INT);
+ $addLink->bindParam(':link', $link, \PDO::PARAM_STR);
+ if ($linksafe !== null) {
+ $addLink->bindParam(':safelink', $linksafe, \PDO::PARAM_STR);
+ } else {
+ $addLink->bindValue(':safelink', null, \PDO::PARAM_INT);
+ }
+ if ($filename !== null) {
+ $addLink->bindParam(':filename', $filename, \PDO::PARAM_STR);
+ } else {
+ $addLink->bindValue(':filename', null, \PDO::PARAM_INT);
+ }
+ $addLink->bindParam(':host', $host, \PDO::PARAM_STR);
+
+ return $addLink->execute();
+ }
+}
\ No newline at end of file
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..a02eab2
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,13 @@
+{
+ "require": {
+ "twig/twig": "~2.0",
+ "twig/extensions": "^1.5",
+ "emotionloop/visualcaptcha": "^0.0.8",
+ "slim/slim": "3.0",
+ "slim/twig-view": "^2.3",
+ "ausi/slug-generator": "^1.0",
+ "cocur/slugify": "^3.1",
+ "guzzlehttp/guzzle": "^6.3",
+ "akrabat/ip-address-middleware": "^1.0"
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..834e61b
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,1449 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "420a4c7cae96699c7c3a9bf6edd59e85",
+ "packages": [
+ {
+ "name": "akrabat/ip-address-middleware",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/akrabat/ip-address-middleware.git",
+ "reference": "9b0bffcad90bd365c5bfbdb430563cd4e35a93ba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/akrabat/ip-address-middleware/zipball/9b0bffcad90bd365c5bfbdb430563cd4e35a93ba",
+ "reference": "9b0bffcad90bd365c5bfbdb430563cd4e35a93ba",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0",
+ "psr/http-message": "^1.0",
+ "psr/http-server-middleware": "^1.0"
+ },
+ "replace": {
+ "akrabat/rka-ip-address-middleware": "*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.5",
+ "squizlabs/php_codesniffer": "^3.2",
+ "zendframework/zend-diactoros": "^1.7"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "RKA\\Middleware\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Rob Allen",
+ "email": "rob@akrabat.com",
+ "homepage": "http://akrabat.com"
+ }
+ ],
+ "description": "PSR-15 middleware that determines the client IP address and stores it as a ServerRequest attribute",
+ "homepage": "http://github.com/akrabat/rka-ip-address-middleware",
+ "keywords": [
+ "IP",
+ "middleware",
+ "psr7"
+ ],
+ "time": "2018-07-03T06:53:57+00:00"
+ },
+ {
+ "name": "ausi/slug-generator",
+ "version": "v1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ausi/slug-generator.git",
+ "reference": "b0ad8d0438aabc198344724af45f583b44a31112"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ausi/slug-generator/zipball/b0ad8d0438aabc198344724af45f583b44a31112",
+ "reference": "b0ad8d0438aabc198344724af45f583b44a31112",
+ "shasum": ""
+ },
+ "require": {
+ "ext-intl": "*",
+ "ext-mbstring": "*",
+ "ext-pcre": "*",
+ "lib-icu": ">=4.6",
+ "php": "^7.1"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^2.4",
+ "phpunit/phpunit": "^6.2",
+ "satooshi/php-coveralls": "^1.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Ausi\\SlugGenerator\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Martin Auswöger",
+ "email": "martin@auswoeger.com"
+ }
+ ],
+ "description": "Slug Generator",
+ "keywords": [
+ "ascii",
+ "cldr",
+ "pretty-url",
+ "slug",
+ "slug-generator",
+ "slugify",
+ "transliteration",
+ "unicode"
+ ],
+ "time": "2018-02-18T09:54:34+00:00"
+ },
+ {
+ "name": "cocur/slugify",
+ "version": "v3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/cocur/slugify.git",
+ "reference": "b2ccf7b735f4f3df3979aef2e1ebf8e19ca772f7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/cocur/slugify/zipball/b2ccf7b735f4f3df3979aef2e1ebf8e19ca772f7",
+ "reference": "b2ccf7b735f4f3df3979aef2e1ebf8e19ca772f7",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "php": ">=5.5.9"
+ },
+ "require-dev": {
+ "laravel/framework": "~5.1",
+ "latte/latte": "~2.2",
+ "league/container": "^2.2.0",
+ "mikey179/vfsstream": "~1.6",
+ "mockery/mockery": "~0.9",
+ "nette/di": "~2.2",
+ "phpunit/phpunit": "~4.8|~5.2",
+ "pimple/pimple": "~1.1",
+ "plumphp/plum": "~0.1",
+ "silex/silex": "~1.3",
+ "symfony/config": "~2.4|~3.0",
+ "symfony/dependency-injection": "~2.4|~3.0",
+ "symfony/http-kernel": "~2.4|~3.0",
+ "twig/twig": "~1.26|~2.0",
+ "zendframework/zend-modulemanager": "~2.2",
+ "zendframework/zend-servicemanager": "~2.2",
+ "zendframework/zend-view": "~2.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Cocur\\Slugify\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ivo Bathke",
+ "email": "ivo.bathke@gmail.com"
+ },
+ {
+ "name": "Florian Eckerstorfer",
+ "email": "florian@eckerstorfer.co",
+ "homepage": "https://florian.ec"
+ }
+ ],
+ "description": "Converts a string into a slug.",
+ "keywords": [
+ "slug",
+ "slugify"
+ ],
+ "time": "2018-01-22T09:00:48+00:00"
+ },
+ {
+ "name": "container-interop/container-interop",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/container-interop/container-interop.git",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "shasum": ""
+ },
+ "require": {
+ "psr/container": "^1.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Interop\\Container\\": "src/Interop/Container/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
+ "homepage": "https://github.com/container-interop/container-interop",
+ "time": "2017-02-14T19:40:03+00:00"
+ },
+ {
+ "name": "emotionloop/visualcaptcha",
+ "version": "0.0.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/emotionLoop/visualCaptcha-packagist.git",
+ "reference": "cbccb9fb2f1eb65fb41bb5c3052847a50445896f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/emotionLoop/visualCaptcha-packagist/zipball/cbccb9fb2f1eb65fb41bb5c3052847a50445896f",
+ "reference": "cbccb9fb2f1eb65fb41bb5c3052847a50445896f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3",
+ "zendframework/zend-cache": "^2.0.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "*"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "visualCaptcha": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "emotionLoop",
+ "email": "hello@emotionloop.com",
+ "homepage": "http://emotionloop.com"
+ }
+ ],
+ "description": "PHP library for visualCaptcha. Still requires you to have the front-end companion.",
+ "homepage": "http://visualcaptcha.net",
+ "keywords": [
+ "captcha",
+ "security",
+ "visualCaptcha"
+ ],
+ "time": "2017-03-09T11:08:48+00:00"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "6.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
+ "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/promises": "^1.0",
+ "guzzlehttp/psr7": "^1.4",
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+ "psr/log": "^1.0"
+ },
+ "suggest": {
+ "psr/log": "Required for using the Log middleware"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.3-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "rest",
+ "web service"
+ ],
+ "time": "2018-04-22T15:46:56+00:00"
+ },
+ {
+ "name": "guzzlehttp/promises",
+ "version": "v1.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Guzzle promises library",
+ "keywords": [
+ "promise"
+ ],
+ "time": "2016-12-20T10:07:11+00:00"
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.4.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
+ "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": [
+ "http",
+ "message",
+ "request",
+ "response",
+ "stream",
+ "uri",
+ "url"
+ ],
+ "time": "2017-03-20T17:10:46+00:00"
+ },
+ {
+ "name": "nikic/fast-route",
+ "version": "v0.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/FastRoute.git",
+ "reference": "31fa86924556b80735f98b294a7ffdfb26789f22"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22",
+ "reference": "31fa86924556b80735f98b294a7ffdfb26789f22",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "FastRoute\\": "src/"
+ },
+ "files": [
+ "src/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Nikita Popov",
+ "email": "nikic@php.net"
+ }
+ ],
+ "description": "Fast request router for PHP",
+ "keywords": [
+ "router",
+ "routing"
+ ],
+ "time": "2015-06-18T19:15:47+00:00"
+ },
+ {
+ "name": "pimple/pimple",
+ "version": "v3.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/silexphp/Pimple.git",
+ "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32",
+ "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "psr/container": "^1.0"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^3.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Pimple": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "Pimple, a simple Dependency Injection Container",
+ "homepage": "http://pimple.sensiolabs.org",
+ "keywords": [
+ "container",
+ "dependency injection"
+ ],
+ "time": "2018-01-21T07:42:36+00:00"
+ },
+ {
+ "name": "psr/cache",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/cache.git",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for caching libraries",
+ "keywords": [
+ "cache",
+ "psr",
+ "psr-6"
+ ],
+ "time": "2016-08-06T20:24:11+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "time": "2017-02-14T16:28:37+00:00"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP messages",
+ "homepage": "https://github.com/php-fig/http-message",
+ "keywords": [
+ "http",
+ "http-message",
+ "psr",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "time": "2016-08-06T14:39:51+00:00"
+ },
+ {
+ "name": "psr/http-server-handler",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-server-handler.git",
+ "reference": "439d92054dc06097f2406ec074a2627839955a02"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/439d92054dc06097f2406ec074a2627839955a02",
+ "reference": "439d92054dc06097f2406ec074a2627839955a02",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0",
+ "psr/http-message": "^1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Server\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP server-side request handler",
+ "keywords": [
+ "handler",
+ "http",
+ "http-interop",
+ "psr",
+ "psr-15",
+ "psr-7",
+ "request",
+ "response",
+ "server"
+ ],
+ "time": "2018-01-22T17:04:15+00:00"
+ },
+ {
+ "name": "psr/http-server-middleware",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-server-middleware.git",
+ "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/ea17eb1fb2c8df6db919cc578451a8013c6a0ae5",
+ "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0",
+ "psr/http-message": "^1.0",
+ "psr/http-server-handler": "^1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Server\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP server-side middleware",
+ "keywords": [
+ "http",
+ "http-interop",
+ "middleware",
+ "psr",
+ "psr-15",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "time": "2018-01-22T17:08:31+00:00"
+ },
+ {
+ "name": "psr/simple-cache",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/simple-cache.git",
+ "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+ "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\SimpleCache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interfaces for simple caching",
+ "keywords": [
+ "cache",
+ "caching",
+ "psr",
+ "psr-16",
+ "simple-cache"
+ ],
+ "time": "2017-10-23T01:57:42+00:00"
+ },
+ {
+ "name": "slim/slim",
+ "version": "3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/slimphp/Slim.git",
+ "reference": "3b06f0f2d84dabbe81b6cea46ace46a3e883253e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/slimphp/Slim/zipball/3b06f0f2d84dabbe81b6cea46ace46a3e883253e",
+ "reference": "3b06f0f2d84dabbe81b6cea46ace46a3e883253e",
+ "shasum": ""
+ },
+ "require": {
+ "container-interop/container-interop": "^1.1",
+ "nikic/fast-route": "^0.6",
+ "php": ">=5.5.0",
+ "pimple/pimple": "^3.0",
+ "psr/http-message": "^1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Slim\\": "Slim"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Rob Allen",
+ "email": "rob@akrabat.com",
+ "homepage": "http://akrabat.com"
+ },
+ {
+ "name": "Josh Lockhart",
+ "email": "hello@joshlockhart.com",
+ "homepage": "https://joshlockhart.com"
+ },
+ {
+ "name": "Gabriel Manricks",
+ "email": "gmanricks@me.com",
+ "homepage": "http://gabrielmanricks.com"
+ },
+ {
+ "name": "Andrew Smith",
+ "email": "a.smith@silentworks.co.uk",
+ "homepage": "http://silentworks.co.uk"
+ }
+ ],
+ "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs",
+ "homepage": "http://slimframework.com",
+ "keywords": [
+ "api",
+ "framework",
+ "micro",
+ "router"
+ ],
+ "time": "2015-12-07T14:11:09+00:00"
+ },
+ {
+ "name": "slim/twig-view",
+ "version": "2.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/slimphp/Twig-View.git",
+ "reference": "78386c01a97f7870462b38fff759dad649da9efc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/slimphp/Twig-View/zipball/78386c01a97f7870462b38fff759dad649da9efc",
+ "reference": "78386c01a97f7870462b38fff759dad649da9efc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0",
+ "psr/http-message": "^1.0",
+ "twig/twig": "^1.18|^2.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8|^5.7",
+ "slim/slim": "^3.10"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Slim\\Views\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Josh Lockhart",
+ "email": "hello@joshlockhart.com",
+ "homepage": "http://joshlockhart.com"
+ }
+ ],
+ "description": "Slim Framework 3 view helper built on top of the Twig 2 templating component",
+ "homepage": "http://slimframework.com",
+ "keywords": [
+ "framework",
+ "slim",
+ "template",
+ "twig",
+ "view"
+ ],
+ "time": "2018-05-07T10:54:29+00:00"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.9.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.9-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ },
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "time": "2018-08-06T14:22:27+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.9.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
+ "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.9-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2018-08-06T14:22:27+00:00"
+ },
+ {
+ "name": "twig/extensions",
+ "version": "v1.5.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/twigphp/Twig-extensions.git",
+ "reference": "2c1a86526d0044065220d1b51ac08348bea5ca82"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/2c1a86526d0044065220d1b51ac08348bea5ca82",
+ "reference": "2c1a86526d0044065220d1b51ac08348bea5ca82",
+ "shasum": ""
+ },
+ "require": {
+ "twig/twig": "^1.27|^2.0"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^3.4",
+ "symfony/translation": "^2.7|^3.4"
+ },
+ "suggest": {
+ "symfony/translation": "Allow the time_diff output to be translated"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Twig_Extensions_": "lib/"
+ },
+ "psr-4": {
+ "Twig\\Extensions\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "Common additional features for Twig that do not directly belong in core",
+ "keywords": [
+ "i18n",
+ "text"
+ ],
+ "time": "2018-05-22T13:26:07+00:00"
+ },
+ {
+ "name": "twig/twig",
+ "version": "v2.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/twigphp/Twig.git",
+ "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/6a5f676b77a90823c2d4eaf76137b771adf31323",
+ "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0",
+ "symfony/polyfill-ctype": "^1.8",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "require-dev": {
+ "psr/container": "^1.0",
+ "symfony/debug": "^2.7",
+ "symfony/phpunit-bridge": "^3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Twig_": "lib/"
+ },
+ "psr-4": {
+ "Twig\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Armin Ronacher",
+ "email": "armin.ronacher@active-4.com",
+ "role": "Project Founder"
+ },
+ {
+ "name": "Twig Team",
+ "homepage": "https://twig.symfony.com/contributors",
+ "role": "Contributors"
+ }
+ ],
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
+ "homepage": "https://twig.symfony.com",
+ "keywords": [
+ "templating"
+ ],
+ "time": "2018-07-13T07:18:09+00:00"
+ },
+ {
+ "name": "zendframework/zend-cache",
+ "version": "2.8.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-cache.git",
+ "reference": "4983dff629956490c78b88adcc8ece4711d7d8a3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/4983dff629956490c78b88adcc8ece4711d7d8a3",
+ "reference": "4983dff629956490c78b88adcc8ece4711d7d8a3",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0",
+ "psr/cache": "^1.0",
+ "psr/simple-cache": "^1.0",
+ "zendframework/zend-eventmanager": "^2.6.3 || ^3.2",
+ "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
+ "zendframework/zend-stdlib": "^2.7.7 || ^3.1"
+ },
+ "provide": {
+ "psr/cache-implementation": "1.0",
+ "psr/simple-cache-implementation": "1.0"
+ },
+ "require-dev": {
+ "cache/integration-tests": "^0.16",
+ "phpbench/phpbench": "^0.13",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-serializer": "^2.6",
+ "zendframework/zend-session": "^2.7.4"
+ },
+ "suggest": {
+ "ext-apc": "APC or compatible extension, to use the APC storage adapter",
+ "ext-apcu": "APCU >= 5.1.0, to use the APCu storage adapter",
+ "ext-dba": "DBA, to use the DBA storage adapter",
+ "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter",
+ "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter",
+ "ext-mongo": "Mongo, to use MongoDb storage adapter",
+ "ext-mongodb": "MongoDB, to use the ExtMongoDb storage adapter",
+ "ext-redis": "Redis, to use Redis storage adapter",
+ "ext-wincache": "WinCache, to use the WinCache storage adapter",
+ "ext-xcache": "XCache, to use the XCache storage adapter",
+ "mongodb/mongodb": "Required for use with the ext-mongodb adapter",
+ "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement",
+ "zendframework/zend-serializer": "Zend\\Serializer component",
+ "zendframework/zend-session": "Zend\\Session component"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8.x-dev",
+ "dev-develop": "2.9.x-dev"
+ },
+ "zf": {
+ "component": "Zend\\Cache",
+ "config-provider": "Zend\\Cache\\ConfigProvider"
+ }
+ },
+ "autoload": {
+ "files": [
+ "autoload/patternPluginManagerPolyfill.php"
+ ],
+ "psr-4": {
+ "Zend\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output",
+ "keywords": [
+ "ZendFramework",
+ "cache",
+ "psr-16",
+ "psr-6",
+ "zf"
+ ],
+ "time": "2018-05-01T21:58:00+00:00"
+ },
+ {
+ "name": "zendframework/zend-eventmanager",
+ "version": "3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-eventmanager.git",
+ "reference": "a5e2583a211f73604691586b8406ff7296a946dd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd",
+ "reference": "a5e2583a211f73604691586b8406ff7296a946dd",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "athletic/athletic": "^0.1",
+ "container-interop/container-interop": "^1.1.0",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0"
+ },
+ "suggest": {
+ "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2-dev",
+ "dev-develop": "3.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\EventManager\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Trigger and listen to events within a PHP application",
+ "homepage": "https://github.com/zendframework/zend-eventmanager",
+ "keywords": [
+ "event",
+ "eventmanager",
+ "events",
+ "zf2"
+ ],
+ "time": "2018-04-25T15:33:34+00:00"
+ },
+ {
+ "name": "zendframework/zend-servicemanager",
+ "version": "3.3.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-servicemanager.git",
+ "reference": "9f35a104b8d4d3b32da5f4a3b6efc0dd62e5af42"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/9f35a104b8d4d3b32da5f4a3b6efc0dd62e5af42",
+ "reference": "9f35a104b8d4d3b32da5f4a3b6efc0dd62e5af42",
+ "shasum": ""
+ },
+ "require": {
+ "container-interop/container-interop": "^1.2",
+ "php": "^5.6 || ^7.0",
+ "psr/container": "^1.0",
+ "zendframework/zend-stdlib": "^3.1"
+ },
+ "provide": {
+ "container-interop/container-interop-implementation": "^1.2",
+ "psr/container-implementation": "^1.0"
+ },
+ "require-dev": {
+ "mikey179/vfsstream": "^1.6.5",
+ "ocramius/proxy-manager": "^1.0 || ^2.0",
+ "phpbench/phpbench": "^0.13.0",
+ "phpunit/phpunit": "^5.7.25 || ^6.4.4",
+ "zendframework/zend-coding-standard": "~1.0.0"
+ },
+ "suggest": {
+ "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services",
+ "zendframework/zend-stdlib": "zend-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances"
+ },
+ "bin": [
+ "bin/generate-deps-for-config-factory",
+ "bin/generate-factory-for-class"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.3-dev",
+ "dev-develop": "4.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\ServiceManager\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Factory-Driven Dependency Injection Container",
+ "keywords": [
+ "PSR-11",
+ "ZendFramework",
+ "dependency-injection",
+ "di",
+ "dic",
+ "service-manager",
+ "servicemanager",
+ "zf"
+ ],
+ "time": "2018-01-29T16:48:37+00:00"
+ },
+ {
+ "name": "zendframework/zend-stdlib",
+ "version": "3.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-stdlib.git",
+ "reference": "cd164b4a18b5d1aeb69be2c26db035b5ed6925ae"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cd164b4a18b5d1aeb69be2c26db035b5ed6925ae",
+ "reference": "cd164b4a18b5d1aeb69be2c26db035b5ed6925ae",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "phpbench/phpbench": "^0.13",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
+ "zendframework/zend-coding-standard": "~1.0.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2.x-dev",
+ "dev-develop": "3.3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Stdlib\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "SPL extensions, array utilities, error handlers, and more",
+ "keywords": [
+ "ZendFramework",
+ "stdlib",
+ "zf"
+ ],
+ "time": "2018-04-30T13:50:40+00:00"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": []
+}
diff --git a/config_blank.php b/config_blank.php
new file mode 100644
index 0000000..d380609
--- /dev/null
+++ b/config_blank.php
@@ -0,0 +1,21 @@
+ "/var/www/retro",
+ "LOGIN_PATH" => 'login',
+ "DEV" => false,
+
+ "DB" => [
+ "DBNAME" => "retro",
+ "DBUSER" => "root",
+ "DBPASS" => ""
+ ],
+ "USER" => [
+ "NAME" => "supersecretloginname",
+ "PASS" => "asdf",
+ "KEY" => "123-123-123" // Key used for API
+ ],
+ "MEMCACHED" => [
+ "SERVER" => "127.0.0.1",
+ "PORT" => 11211
+ ]
+];
\ No newline at end of file
diff --git a/db.php b/db.php
new file mode 100644
index 0000000..adcba14
--- /dev/null
+++ b/db.php
@@ -0,0 +1,10 @@
+'),
+ ('filecloud', 'filecloud.io', 7, ''),
+ ('filescdn', 'Filescdn', 8, ''),
+ ('gdrive', 'Google Drive', 2, ''),
+ ('gdrive_folder', 'Google Drive (Folder)', 1, ''),
+ ('gdrive_single', 'Google Drive (ISO Link)', 3, ''),
+ ('letsupload', 'LetsUpload', 3, ''),
+ ('megaup', 'MegaUp', 3, ''),
+ ('openload', 'Openload', 6, ''),
+ ('shareonline_biz', 'Share-Online', 12, ''),
+ ('uploaded', 'Uploaded.net', 11, ''),
+ ('uploadhaven', 'UploadHaven', 4, ''),
+ ('uploadhaven_single', 'UploadHaven (ISO Link)', 5, ''),
+ ('uptobox', 'UptoBox', 10, ''),
+ ('userscloud', 'Userscloud', 4, ''),
+ ('zippyshare', 'Zippyshare', 9, '');
+
+CREATE TABLE IF NOT EXISTS `languages` (
+ `id` varchar(3) NOT NULL,
+ `name` varchar(100) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `languages` (`id`, `name`) VALUES
+ ('aa', 'Afar'),
+ ('ab', 'Abkhazian'),
+ ('ae', 'Avestan'),
+ ('af', 'Afrikaans'),
+ ('ak', 'Akan'),
+ ('am', 'Amharic'),
+ ('an', 'Aragonese'),
+ ('ar', 'Arabic'),
+ ('as', 'Assamese'),
+ ('av', 'Avaric'),
+ ('ay', 'Aymara'),
+ ('az', 'Azerbaijani'),
+ ('ba', 'Bashkir'),
+ ('be', 'Belarusian'),
+ ('bg', 'Bulgarian'),
+ ('bh', 'Bihari languages'),
+ ('bi', 'Bislama'),
+ ('bm', 'Bambara'),
+ ('bn', 'Bengali'),
+ ('bo', 'Tibetan'),
+ ('br', 'Breton'),
+ ('bs', 'Bosnian'),
+ ('ca', 'Catalan'),
+ ('ce', 'Chechen'),
+ ('ch', 'Chamorro'),
+ ('co', 'Corsican'),
+ ('cr', 'Cree'),
+ ('cs', 'Czech'),
+ ('cu', 'Church Slavic'),
+ ('cv', 'Chuvash'),
+ ('cy', 'Welsh'),
+ ('da', 'Danish'),
+ ('de', 'German'),
+ ('dv', 'Divehi'),
+ ('dz', 'Dzongkha'),
+ ('ee', 'Ewe'),
+ ('el', 'Greek'),
+ ('en', 'English'),
+ ('eo', 'Esperanto'),
+ ('es', 'Spanish'),
+ ('et', 'Estonian'),
+ ('eu', 'Basque'),
+ ('fa', 'Persian'),
+ ('fi', 'Finnish'),
+ ('fj', 'Fiji'),
+ ('fo', 'Faeroese'),
+ ('fr', 'French'),
+ ('fy', 'Frisian'),
+ ('ga', 'Irish'),
+ ('gd', 'Scots Gaelic'),
+ ('gl', 'Galician'),
+ ('gn', 'Guarani'),
+ ('gu', 'Gujarati'),
+ ('ha', 'Hausa'),
+ ('he', 'Hebrew'),
+ ('hi', 'Hindi'),
+ ('hr', 'Croatian'),
+ ('hu', 'Hungarian'),
+ ('hy', 'Armenian'),
+ ('ia', 'Interlingua'),
+ ('id', 'Indonesian'),
+ ('ie', 'Interlingue'),
+ ('ik', 'Inupiak'),
+ ('in', 'former Indonesian'),
+ ('is', 'Icelandic'),
+ ('it', 'Italian'),
+ ('iu', 'Inuktitut (Eskimo)'),
+ ('iw', 'former Hebrew'),
+ ('ja', 'Japanese'),
+ ('ji', 'former Yiddish'),
+ ('jw', 'Javanese'),
+ ('ka', 'Georgian'),
+ ('kk', 'Kazakh'),
+ ('kl', 'Greenlandic'),
+ ('km', 'Cambodian'),
+ ('kn', 'Kannada'),
+ ('ko', 'Korean'),
+ ('ks', 'Kashmiri'),
+ ('ku', 'Kurdish'),
+ ('ky', 'Kirghiz'),
+ ('la', 'Latin'),
+ ('ln', 'Lingala'),
+ ('lo', 'Laothian'),
+ ('lt', 'Lithuanian'),
+ ('lv', 'Latvian, Lettish'),
+ ('mg', 'Malagasy'),
+ ('mi', 'Maori'),
+ ('mk', 'Macedonian'),
+ ('ml', 'Malayalam'),
+ ('mn', 'Mongolian'),
+ ('mo', 'Moldavian'),
+ ('mr', 'Marathi'),
+ ('ms', 'Malay'),
+ ('mt', 'Maltese'),
+ ('my', 'Burmese'),
+ ('na', 'Nauru'),
+ ('ne', 'Nepali'),
+ ('nl', 'Dutch'),
+ ('no', 'Norwegian'),
+ ('oc', 'Occitan'),
+ ('om', '(Afan) Oromo'),
+ ('or', 'Oriya'),
+ ('pa', 'Punjabi'),
+ ('pl', 'Polish'),
+ ('ps', 'Pashto, Pushto'),
+ ('pt', 'Portuguese'),
+ ('qu', 'Quechua'),
+ ('rm', 'Rhaeto-Romance'),
+ ('rn', 'Kirundi'),
+ ('ro', 'Romanian'),
+ ('ru', 'Russian'),
+ ('rw', 'Kinyarwanda'),
+ ('sa', 'Sanskrit'),
+ ('sd', 'Sindhi'),
+ ('sg', 'Sangro'),
+ ('sh', 'Serbo-Croatian'),
+ ('si', 'Singhalese'),
+ ('sk', 'Slovak'),
+ ('sl', 'Slovenian'),
+ ('sm', 'Samoan'),
+ ('sn', 'Shona'),
+ ('so', 'Somali'),
+ ('sq', 'Albanian'),
+ ('sr', 'Serbian'),
+ ('ss', 'Siswati'),
+ ('st', 'Sesotho'),
+ ('su', 'Sundanese'),
+ ('sv', 'Swedish'),
+ ('sw', 'Swahili'),
+ ('ta', 'Tamil'),
+ ('te', 'Telugu'),
+ ('tg', 'Tajik'),
+ ('th', 'Thai'),
+ ('ti', 'Tigrinya'),
+ ('tk', 'Turkmen'),
+ ('tl', 'Tagalog'),
+ ('tn', 'Tswana'),
+ ('to', 'Tonga (Tonga Islands)'),
+ ('tr', 'Turkish'),
+ ('ts', 'Tsonga'),
+ ('tt', 'Tatar'),
+ ('tw', 'Twi'),
+ ('ty', 'Tahitian'),
+ ('ug', 'Uighur'),
+ ('uk', 'Ukrainian'),
+ ('ur', 'Urdu'),
+ ('uz', 'Uzbek'),
+ ('ve', 'Venda'),
+ ('vi', 'Vietnamese'),
+ ('vo', 'Volapük'),
+ ('wa', 'Walloon'),
+ ('wo', 'Wolof'),
+ ('xh', 'Xhosa'),
+ ('yi', 'Yiddish'),
+ ('yo', 'Yoruba'),
+ ('za', 'Zhuang'),
+ ('zh', 'Chinese'),
+ ('zu', 'Zulu');
+
+CREATE TABLE IF NOT EXISTS `links` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `rom_id` int(11) unsigned NOT NULL,
+ `file_name` varchar(2000) DEFAULT NULL,
+ `link` varchar(2083) DEFAULT NULL,
+ `link_safe` varchar(2083) DEFAULT NULL,
+ `status` enum('UPLOADING','DONE') NOT NULL DEFAULT 'UPLOADING',
+ `host` varchar(50) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `rom_id` (`rom_id`),
+ KEY `file_name` (`file_name`(1024)),
+ KEY `status` (`status`),
+ KEY `host` (`host`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `regions` (
+ `name` varchar(100) NOT NULL,
+ `iso_3166_1_alpha_2` varchar(10) DEFAULT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `regions` (`name`, `iso_3166_1_alpha_2`) VALUES
+ ('Argentina', 'ar'),
+ ('Asia', 'asi'),
+ ('Asia, Europe', 'asi,eu'),
+ ('Asia, Korea', 'asi,kr'),
+ ('Australia', 'au'),
+ ('Austria', 'at'),
+ ('Brasil', 'br'),
+ ('Brazil', 'br'),
+ ('Brazil, Korea', 'br,kr'),
+ ('Brazil, Portugal', 'br,pt'),
+ ('Canada', 'ca'),
+ ('China', 'cn'),
+ ('Croatia', 'hr'),
+ ('Crotia', 'hr'),
+ ('Czech', 'cz'),
+ ('Denmark', 'dk'),
+ ('Europe', 'eu'),
+ ('Europe, Asia', 'eu,asi'),
+ ('Europe, Australia', 'eu,au'),
+ ('Europe, Brazil', 'eu,br'),
+ ('Europe, Canada', 'eu,ca'),
+ ('Europe, Korea', 'eu,kr'),
+ ('Finland', 'fi'),
+ ('France', 'fr'),
+ ('France, Spain', 'fr,es'),
+ ('Germany', 'de'),
+ ('Greece', 'gr'),
+ ('Hong Kong', 'hk'),
+ ('Hungary', 'hu'),
+ ('India', 'in'),
+ ('Ireland', 'ie'),
+ ('Italy', 'it'),
+ ('Japan', 'jp'),
+ ('Japan, Asia', 'sp,asi'),
+ ('Japan, Brazil', 'jp,br'),
+ ('Japan, Europe', 'jp,eu'),
+ ('Japan, Europe, Brazi', 'jp,eu,br'),
+ ('Japan, Europe, Brazil', 'jp,eu,br'),
+ ('Japan, Hong Kong', 'jp,hk'),
+ ('Japan, Korea', 'jp,kr'),
+ ('Japan, Korea, Asia', 'jp,kr,asi'),
+ ('Japan, USA', 'jp,us'),
+ ('Japan, USA, Brazil', 'jp,us,br'),
+ ('Japan, USA, Korea', 'jp,us,kr'),
+ ('Korea', 'kr'),
+ ('Latin America', 'unk'),
+ ('Netherlands', 'nl'),
+ ('Norway', 'no'),
+ ('Poland', 'pl'),
+ ('Portugal', 'pt'),
+ ('Russia', 'ru'),
+ ('Scandinavia', 'unk'),
+ ('Spain', 'es'),
+ ('Sweden', 'se'),
+ ('Taiwan', 'tw'),
+ ('UK', 'gb'),
+ ('Unknown', 'unk'),
+ ('USA', 'us'),
+ ('USA, Asia', 'us,asi'),
+ ('USA, Asia, Korea', 'us,asi,kr'),
+ ('USA, Australia', 'us,au'),
+ ('USA, Brazil', 'us,br'),
+ ('USA, Europe', 'us,eu'),
+ ('USA, Europe, Brazil', 'us,eu,br'),
+ ('USA, Europe, Korea', 'us,eu,kr'),
+ ('USA, Japan', 'us,jp'),
+ ('USA, Korea', 'us,kr'),
+ ('World', 'wor');
+
+CREATE TABLE IF NOT EXISTS `roms` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `dir_info_id` int(10) unsigned NOT NULL,
+ `uploading` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `last_upload` int(11) unsigned NOT NULL,
+ `slug` varchar(255) NOT NULL,
+ `console` varchar(255) NOT NULL,
+ `name_original` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `region` varchar(50) DEFAULT NULL,
+ `disc` int(2) unsigned DEFAULT NULL,
+ `languages` varchar(255) DEFAULT NULL,
+ `version` varchar(255) DEFAULT NULL,
+ `devstatus` varchar(255) DEFAULT NULL,
+ `additional` varchar(255) DEFAULT NULL,
+ `special` varchar(255) DEFAULT NULL,
+ `license` varchar(255) DEFAULT NULL,
+ `status` int(10) unsigned DEFAULT NULL,
+ `nointro_id` varchar(50) DEFAULT NULL,
+ `nointro_system_id` varchar(50) DEFAULT NULL,
+ `redump_id` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_per_system` (`slug`,`console`,`name_original`),
+ KEY `nointro_system_id` (`nointro_system_id`),
+ KEY `redump_id` (`redump_id`),
+ KEY `nointro-id` (`nointro_id`),
+ KEY `name_original` (`name_original`),
+ KEY `name` (`name`),
+ KEY `console` (`console`),
+ KEY `region` (`region`),
+ KEY `slug` (`slug`),
+ KEY `dir_info` (`dir_info_id`),
+ KEY `last_upload` (`last_upload`),
+ KEY `uploading` (`uploading`),
+ FULLTEXT KEY `fulltext` (`additional`,`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `site` (
+ `name` varchar(50) NOT NULL,
+ `value` text DEFAULT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `votes` (
+ `uid` varbinary(16) NOT NULL,
+ `rom_id` int(11) unsigned NOT NULL,
+ PRIMARY KEY (`uid`,`rom_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
\ No newline at end of file
diff --git a/locale/de_DE/LC_MESSAGES/messages.mo b/locale/de_DE/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..ea6b5cc
Binary files /dev/null and b/locale/de_DE/LC_MESSAGES/messages.mo differ
diff --git a/locale/de_DE/LC_MESSAGES/messages.po b/locale/de_DE/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..e239294
--- /dev/null
+++ b/locale/de_DE/LC_MESSAGES/messages.po
@@ -0,0 +1,365 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-11-02 01:07+0800\n"
+"PO-Revision-Date: 2018-11-06 11:02+0000\n"
+"Last-Translator: \n"
+"Language-Team: English\n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Loco-Source-Locale: en_DE\n"
+"X-Loco-Parser: loco_parse_po\n"
+"X-Poedit-Basepath: ../../..\n"
+"X-Generator: Loco https://localise.biz/\n"
+"X-Poedit-SearchPath-0: templates\n"
+"X-Poedit-SearchPath-1: web/routes.php\n"
+"X-Poedit-SearchPath-2: web/routes_api.php\n"
+"X-Poedit-SearchPath-3: captcha/images.php"
+
+#: captcha/images.php:4
+msgid "Click the Nintendo 64 Controller"
+msgstr "Klick auf den Nintento 64 Controller"
+
+#: captcha/images.php:8
+msgid "Select the NES Controller"
+msgstr "Wähle den NES Controller aus"
+
+#: captcha/images.php:12
+msgid "Select the PlayStation Controller"
+msgstr "Wähle den PlayStation Controller aus"
+
+#: captcha/images.php:16
+msgid "Select the PlayStation 3 Controller"
+msgstr "Wähle den PlayStation 3 Controller aus"
+
+#: captcha/images.php:20
+msgid "Select the PlayStation 4 Controller"
+msgstr "Wähle den PlayStation 4 Controller aus"
+
+#: captcha/images.php:24
+msgid "Select the SNES Controller"
+msgstr "Wähle den SNES Controller aus"
+
+#: captcha/images.php:28
+msgid "Select the Xbone Controller"
+msgstr "Wähle den Xbox One Controller aus"
+
+#: captcha/images.php:32
+msgid "Select the Xbox 360 Controller"
+msgstr "Wähle den Xbox 360 Controller aus"
+
+#: captcha/images.php:36
+msgid "Click Noctis"
+msgstr "Klick auf Noctis"
+
+#: captcha/images.php:40
+msgid "Click Gladiolus"
+msgstr "Klick auf Gladiolus"
+
+#: captcha/images.php:44
+msgid "Click Luna"
+msgstr "Klick auf Luna"
+
+#: captcha/images.php:48
+msgid "(woof)"
+msgstr "(woof)"
+
+#: web/routes_api.php:241 web/routes_api.php:253
+msgid "Invalid Captcha Data"
+msgstr "Ungültige Captcha-Daten"
+
+#: web/routes_api.php:247
+msgid "Incorrect Captcha Image. Please try again."
+msgstr "Falsches Captcha-Bild. Bitte versuche es erneut. "
+
+#: web/routes_api.php:266
+msgid ""
+"Your vote limit has exceeded. Wait for the ROMS you've voted on to finish "
+"uploading before voting again."
+msgstr ""
+"Dein Abstimmungslimit ist überschritten. Warte auf die ROMS, für die du "
+"abgestimmt hast hochgeladen zu werden, bevor du wieder abstimmst. "
+
+#: web/routes_api.php:280
+msgid "ROM not old enough to vote on."
+msgstr "ROM is nicht alt genug, um darüber abzustimmen."
+
+#: web/routes_api.php:289
+msgid "ROM is already uploading!"
+msgstr "ROM wird bereits hochgeladen!"
+
+#: web/routes_api.php:299
+msgid ""
+"You already voted on this, check the queue to see when it'll get uploaded!"
+msgstr ""
+"Du hast bereits dafür abgestimmt. Prüfe die Warteschlange, um zu sehen, wann "
+"es hochgeladen wird. "
+
+#: templates/admin.twig:3 templates/admin.twig:8
+msgid "Admin"
+msgstr "Administrator"
+
+#: templates/card.twig:13 templates/rom.twig:10
+msgid "Disc"
+msgstr "Diskette"
+
+#: templates/card.twig:16
+msgid "Additional"
+msgstr "Zusätzlich"
+
+#: templates/card.twig:22 templates/rom.twig:27
+msgid "Version"
+msgstr "Version"
+
+#: templates/card.twig:28
+msgid "Dev Status"
+msgstr "Dev Status"
+
+#: templates/card.twig:44 templates/rom.twig:14
+msgid "View game on redump.org"
+msgstr "Spiel ansehen auf redump.org"
+
+#: templates/card.twig:44 templates/rom.twig:15
+msgid "View game on the DAT-o-MATIC"
+msgstr "Spiel ansehen auf DAT-o-MATIC"
+
+#: templates/card.twig:48
+msgid "Filter by %console_name%"
+msgstr "Filter nach %console_name%"
+
+#: templates/console.twig:13
+msgid "Browse ROMs"
+msgstr "Dursuche ROMs"
+
+#: templates/console.twig:14
+msgid "ROM Pack"
+msgstr "ROM Paket"
+
+#: templates/console.twig:15
+msgid "BIOS Files"
+msgstr "BIOS Dateien"
+
+#: templates/console.twig:19
+msgid "Emulators"
+msgstr "Emulatoren"
+
+#: templates/console.twig:21
+msgid "Emulator"
+msgstr "Emulator"
+
+#: templates/drive_tutorial.twig:3 templates/drive_tutorial.twig:8
+msgid "Google Drive Quota Exceeded Bypass Tutorial"
+msgstr "Google Drive Quota überschritten Tutorial"
+
+#: templates/faq.twig:3 templates/faq.twig:8 templates/index.twig:31
+#: templates/top_bar.twig:33
+msgid "FAQ"
+msgstr "FAQ"
+
+#: templates/faq.twig:9
+msgid "What is Retro Games?"
+msgstr "Was ist Retro Games?"
+
+#: templates/faq.twig:10
+msgid ""
+"A site which automates the process of sharing verified redump/no-intro roms."
+msgstr ""
+"Eine Website, die den Prozess des Teilens von verifizierten Redump/No-Intro-"
+"Roms automatisiert."
+
+#: templates/faq.twig:12
+msgid "How does it work?"
+msgstr "Wie funktioniert das?"
+
+#: templates/faq.twig:13
+msgid ""
+"Simply vote for the roms you want and the site will upload them. Roms with "
+"more votes will be uploaded first."
+msgstr ""
+"Stimme einfach für die ROMs ab die du haben willst und die Webseite wird sie "
+"hochladen. Die ROMs mit den meisten Stimmen werden zuerst hochgeladen."
+
+#: templates/faq.twig:15
+msgid "What if the links go down?"
+msgstr "Was wenn die Links entfernt werden? "
+
+#: templates/faq.twig:16
+msgid ""
+"The system saves the upload date after a rom is uploaded. You'll be able to "
+"vote for the game to be re-uploaded 60 days later. Then the cycle starts "
+"over."
+msgstr ""
+"Das System speichert das Upload-Datum nachdem eine rom hochgeladen wurde. Du "
+"kannst für das Spiel stimmen, das 60 Tage später erneut hochgeladen wird. "
+"Dann beginnt der Zyklus von vorne."
+
+#: templates/faq.twig:18
+msgid "Why can't I find [insert game here] or [insert system here]?"
+msgstr ""
+"Warum kann ich [Spiel hier einfügen] oder [System hier einfügen] nicht "
+"finden?"
+
+#: templates/faq.twig:19
+msgid ""
+"We will continue to add new systems and additional games in the future. So "
+"be sure to check back!"
+msgstr ""
+"Wir werden auch in Zukunft neue Systeme und Spiele hinzufügen. Schau also "
+"unbedingt wieder vorbei!"
+
+#: templates/faq.twig:21
+msgid "How do I download or extract files?"
+msgstr "Wie lade ich die Dateien herunter und extrahiere diese anschließend?"
+
+#: templates/faq.twig:22
+msgid ""
+"We recommend %jdownloader2link% for downloading and %7ziplink% for "
+"extracting files."
+msgstr ""
+"Wir empfehlen %jdownloader2link% für das Herunterladen und %7ziplink% für "
+"die Extraktion."
+
+#: templates/faq.twig:24
+msgid "How can I make sure the files have not been tampered with?"
+msgstr "Wie kann ich sicher sein, dass die Dateien nicht manipuliert wurden?"
+
+#: templates/faq.twig:25
+msgid ""
+"Compare the hashes of the files with the hashes found in redump.org/No-Intro."
+"\n"
+" You can use a program like HashTab or HashCheck to check your files."
+msgstr ""
+"Vergleiche die Checksummen der Dateien mit den entsprechenden auf redump."
+"org/No-Intro mittels eines Programms wie beispielsweise HashTab oder "
+"HashCheck."
+
+#: templates/index.twig:15 templates/top_bar.twig:18
+msgid "Search..."
+msgstr "Suche..."
+
+#: templates/index.twig:17 templates/search.twig:3 templates/top_bar.twig:20
+msgid "All Consoles"
+msgstr "Alle Konsolen"
+
+#: templates/index.twig:23 templates/top_bar.twig:26
+msgid "Any Region"
+msgstr "Jede Region"
+
+#: templates/index.twig:24 templates/top_bar.twig:27
+msgid "America"
+msgstr "Amerika"
+
+#: templates/index.twig:25 templates/top_bar.twig:28
+msgid "Asia"
+msgstr "Asien"
+
+#: templates/index.twig:26 templates/top_bar.twig:29
+msgid "Europe"
+msgstr "Europa"
+
+#: templates/index.twig:32 templates/queue.twig:3 templates/queue.twig:9
+#: templates/top_bar.twig:34
+msgid "Queue"
+msgstr "Warteschlange"
+
+#: templates/index.twig:33 templates/top_bar.twig:35
+msgid "Change Language"
+msgstr "Sprache ändern"
+
+#: templates/login.twig:3 templates/login.twig:8 templates/login.twig:12
+msgid "Login"
+msgstr "Login"
+
+#: templates/login.twig:10
+msgid "Username"
+msgstr "Benutzername"
+
+#: templates/login.twig:11
+msgid "Password"
+msgstr "Passwort"
+
+#: templates/packs.twig:3 templates/packs.twig:8
+msgid "ROM Packs"
+msgstr "ROM-Pakete"
+
+#: templates/queue.twig:11
+msgid "Currently Uploading"
+msgstr "Wird derzeit hochgeladen"
+
+#: templates/queue.twig:19
+msgid "Up Next"
+msgstr "Nächste Seite"
+
+#: templates/rom.twig:19
+msgid "Region"
+msgstr "Region"
+
+#: templates/rom.twig:26
+msgid "System"
+msgstr "System"
+
+#: templates/rom.twig:31
+msgid "Languages"
+msgstr "Sprachen"
+
+#: templates/rom.twig:39
+msgid "Edition"
+msgstr "Edition"
+
+#: templates/rom.twig:40
+msgid "Original Name"
+msgstr "Originaler Name"
+
+#: templates/rom.twig:47
+msgid ""
+"There are no download links currently available. Click here to vote for this "
+"item to be uploaded."
+msgstr ""
+"Zur Zeit sind keine Download-Links verfügbar. Klicken Sie hier, um für "
+"diesen Artikel zu stimmen, der hochgeladen werden soll."
+
+#: templates/rom.twig:52
+msgid ""
+"Vote cast! Check the upload queue to see when it'll "
+"upload!"
+msgstr ""
+"Stimme abgegeben! Prüfe die Upload Warteschlange um "
+"zu sehen, wann es hochgeladen wird!"
+
+#: templates/rom.twig:53
+msgid "Vote"
+msgstr "Abstimmen"
+
+#: templates/rom.twig:58
+msgid ""
+"ROM is currently uploading. Check the upload queue!"
+msgstr ""
+"ROM wird derzeit hochgeladen. Prüfe die Upload "
+"Warteschlange!"
+
+#: templates/rom.twig:64
+msgid "Open all Links (Allow Popups)"
+msgstr "Öffne alle Links (Erlaube Pop-ups). "
+
+#: templates/rom.twig:65
+msgid "Copy Links to Clipboard"
+msgstr "Links in die Zwischenablage kopieren"
+
+#: templates/rom.twig:68
+msgid "Toggle Download Links"
+msgstr "Download-Links umschalten"
+
+#: templates/top_bar.twig:14
+msgid "Go to GOG Games"
+msgstr "Gehe zu GOG Games"
+
+#: templates/top_bar.twig:15
+msgid "Go to Scene Games"
+msgstr "Gehe zu Scene Games"
+
+msgid "BYPASS GOOGLE DRIVE QUOTA TUTORIAL"
+msgstr "Umgehung des Google Drive Quota Tutorial"
diff --git a/locale/el_GR/LC_MESSAGES/messages.mo b/locale/el_GR/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..55f0765
Binary files /dev/null and b/locale/el_GR/LC_MESSAGES/messages.mo differ
diff --git a/locale/el_GR/LC_MESSAGES/messages.po b/locale/el_GR/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..e3c2fc7
--- /dev/null
+++ b/locale/el_GR/LC_MESSAGES/messages.po
@@ -0,0 +1,368 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2018-11-03 16:28+0800\n"
+"PO-Revision-Date: 2018-11-03 16:28+0800\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.5\n"
+"X-Poedit-Basepath: ../../..\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-SearchPath-0: templates\n"
+"X-Poedit-SearchPath-1: web/routes.php\n"
+"X-Poedit-SearchPath-2: web/routes_api.php\n"
+"X-Poedit-SearchPath-3: captcha/images.php\n"
+
+#: captcha/images.php:4
+msgid "Click the Nintendo 64 Controller"
+msgstr "Επιλέξτε το χειριστήριο του Nintendo 64"
+
+#: captcha/images.php:8
+msgid "Select the NES Controller"
+msgstr "Επιλέξτε το χειριστήριο του NES"
+
+#: captcha/images.php:12
+msgid "Select the PlayStation Controller"
+msgstr "Επιλέξτε το χειριστήριο του PlayStation"
+
+#: captcha/images.php:16
+msgid "Select the PlayStation 3 Controller"
+msgstr "Επιλέξτε το χειριστήριο του PlayStation 3"
+
+#: captcha/images.php:20
+msgid "Select the PlayStation 4 Controller"
+msgstr "Επιλέξτε το χειριστήριο του PlayStation 4"
+
+#: captcha/images.php:24
+msgid "Select the SNES Controller"
+msgstr "Επιλέξτε το χειριστήριο του SNES"
+
+#: captcha/images.php:28
+msgid "Select the Xbone Controller"
+msgstr "Επιλέξτε το χειριστήριο του Xbone"
+
+#: captcha/images.php:32
+msgid "Select the Xbox 360 Controller"
+msgstr "Επιλέξτε το χειριστήριο του Xbox 360"
+
+#: captcha/images.php:36
+msgid "Click Noctis"
+msgstr "Επιλέξτε τον Noctis"
+
+#: captcha/images.php:40
+msgid "Click Gladiolus"
+msgstr "Επιλέξτε τον Gladiolus"
+
+#: captcha/images.php:44
+msgid "Click Luna"
+msgstr "Επιλέξτε την Luna"
+
+#: captcha/images.php:48
+msgid "(woof)"
+msgstr "(γάβ)"
+
+#: web/routes_api.php:241 web/routes_api.php:253
+msgid "Invalid Captcha Data"
+msgstr "Λανθασμένη Εισαγωγή Captcha"
+
+#: web/routes_api.php:247
+msgid "Incorrect Captcha Image. Please try again."
+msgstr "Λανθασμένη Εικόνα Captcha. Παρακαλούμε δοκιμάστε ξανά."
+
+#: web/routes_api.php:266
+msgid ""
+"Your vote limit has exceeded. Wait for the ROMS you've voted on to finish "
+"uploading before voting again."
+msgstr ""
+"Έχετε υπερβεί το όριο των ψήφων. Περιμένετε μέχρι τα ROM που ψηφίσατε να "
+"μεταφορτωθούν, πριν ψηφίσετε ξανά."
+
+#: web/routes_api.php:280
+msgid "ROM not old enough to vote on."
+msgstr "Αυτό το ROM δεν είναι αρκετά παλιό για να το ψηφίσετε."
+
+#: web/routes_api.php:289
+msgid "ROM is already uploading!"
+msgstr "Αυτό το ROM ήδη μεταφορτώνεται!"
+
+#: web/routes_api.php:299
+msgid ""
+"You already voted on this, check the queue to see when it'll get uploaded!"
+msgstr ""
+"Έχετε ήδη ψηφίσει για αυτό το ROM, ελέγξτε την ουρά για να δείτε πότε θα "
+"μεταφορτωθεί!"
+
+#: templates/admin.twig:3 templates/admin.twig:8
+msgid "Admin"
+msgstr "Διαχειριστής"
+
+#: templates/card.twig:13 templates/rom.twig:10
+msgid "Disc"
+msgstr "Δίσκος"
+
+#: templates/card.twig:16
+msgid "Additional"
+msgstr "Επιπλέον"
+
+#: templates/card.twig:22 templates/rom.twig:27
+msgid "Version"
+msgstr "Εκδοχή"
+
+#: templates/card.twig:28 templates/rom.twig:39
+msgid "Dev Status"
+msgstr "Κατάσταση Προγραμματιστή"
+
+#: templates/card.twig:44 templates/rom.twig:14
+msgid "View game on redump.org"
+msgstr "Προβολή του παιχνιδιού στο redump.org"
+
+#: templates/card.twig:44 templates/rom.twig:15
+msgid "View game on the DAT-o-MATIC"
+msgstr "Προβολή του παιχνιδιού στο DAT-o-MATIC"
+
+#: templates/card.twig:48
+msgid "Filter by %console_name%"
+msgstr "Φιλτράρισμα με βάση το %console_name%"
+
+#: templates/console.twig:13
+msgid "Browse ROMs"
+msgstr "Αναζήτηση ROMs"
+
+#: templates/console.twig:14
+msgid "ROM Pack"
+msgstr "Πακέτα ROM"
+
+#: templates/console.twig:15
+msgid "BIOS Files"
+msgstr "Αρχεία BIOS"
+
+#: templates/console.twig:19
+msgid "Emulators"
+msgstr "Εξομοιωτές"
+
+#: templates/console.twig:21
+msgid "Emulator"
+msgstr "Εξομοιωτής"
+
+#: templates/drive_tutorial.twig:3 templates/drive_tutorial.twig:8
+msgid "Google Drive Quota Exceeded Bypass Tutorial"
+msgstr "Οδηγός παράκαμψης ορίου του Google Drive"
+
+#: templates/faq.twig:3 templates/faq.twig:8 templates/index.twig:31
+#: templates/top_bar.twig:33
+msgid "FAQ"
+msgstr "Ε&Α"
+
+#: templates/faq.twig:9
+msgid "What is Retro Games?"
+msgstr "Τι είναι το Retro Games;"
+
+#: templates/faq.twig:10
+msgid ""
+"A site which automates the process of sharing verified redump/no-intro roms."
+msgstr ""
+"Μία ιστοσελίδα η οποία αυτοματοποιεί την διαδικασία διαμοιρασμού "
+"εγκεκριμένων roms των redump/no-intro."
+
+#: templates/faq.twig:12
+msgid "How does it work?"
+msgstr "Πώς λειτουργεί;"
+
+#: templates/faq.twig:13
+msgid ""
+"Simply vote for the roms you want and the site will upload them. Roms with "
+"more votes will be uploaded first."
+msgstr ""
+"Απλώς ψηφίσετε στα roms που θέλετε και η ιστοσελίδα θα τα μεταφορτώσει. Τα "
+"roms με τις περισσότερες ψήφους θα μεταφορτωθούν πρώτα."
+
+#: templates/faq.twig:15
+msgid "What if the links go down?"
+msgstr "Τι συμβαίνει αν οι σύνδεσμοι δε λειτουργούν;"
+
+#: templates/faq.twig:16
+msgid ""
+"The system saves the upload date after a rom is uploaded. You'll be able to "
+"vote for the game to be re-uploaded 60 days later. Then the cycle starts "
+"over."
+msgstr ""
+"Το σύστημα αποθηκεύει την ημερομηνία μεταφόρτωσης αμέσως μετά τη μεταφόρτωση "
+"ενός rom. Θα μπορείτε να ψηφίσετε για το παιχνίδι ώστε να ξαναμεταφορτωθεί "
+"60 ημέρες αργότερα."
+
+#: templates/faq.twig:18
+msgid "Why can't I find [insert game here] or [insert system here]?"
+msgstr "Γιατί δεν μπορώ να βρω [όνομα παιχνιδιού] ή [όνομα συστήματος];"
+
+#: templates/faq.twig:19
+msgid ""
+"We will continue to add new systems and additional games in the future. So "
+"be sure to check back!"
+msgstr ""
+"Θα συνεχίσουμε να προσθέτουμε νέα συστήματα και περισσότερα παιχνίδια στο "
+"μέλλον. Γι'αυτό βεβαιώστε πως θα ξανακοιτάξετε!"
+
+#: templates/faq.twig:21
+msgid "How do I download or extract files?"
+msgstr "Πώς κατεβάζω ή αποσυμπιέζω αρχεία;"
+
+#: templates/faq.twig:22
+msgid ""
+"We recommend %jdownloader2link% for downloading and %7ziplink% for "
+"extracting files."
+msgstr ""
+"Προτείνουμε το %jdownloader2link% για τη λήψη και το %7ziplink% για την "
+"αποσυμπίεση αρχείων."
+
+#: templates/faq.twig:24
+msgid "How can I make sure the files have not been tampered with?"
+msgstr "Πώς μπορώ να είμαι βέβαιος ότι τα αρχεία δεν έχουν αλλοιωθεί;"
+
+#: templates/faq.twig:25
+msgid ""
+"Compare the hashes of the files with the hashes found in redump.org/No-"
+"Intro.\n"
+" You can use a program like HashTab or HashCheck to check your files."
+msgstr ""
+"Μπορείτε να συγκρίνετε τα hashes των αρχείων με τα hashes που βρίσκονται στο "
+"redump.org/No-Intro.\n"
+"Μπορείτε να χρησιμοποιήσετε προγράμματα όπως το HashTab ή το HashCheck για "
+"να ελέγξετε τα αρχεία σας."
+
+#: templates/index.twig:15 templates/top_bar.twig:18
+msgid "Search..."
+msgstr "Αναζήτηση..."
+
+#: templates/index.twig:17 templates/search.twig:3 templates/top_bar.twig:20
+msgid "All Consoles"
+msgstr "Όλες οι Κονσόλες"
+
+#: templates/index.twig:23 templates/top_bar.twig:26
+msgid "Any Region"
+msgstr "Οποιαδήποτε Περιοχή"
+
+#: templates/index.twig:24 templates/top_bar.twig:27
+msgid "America"
+msgstr "Αμερική"
+
+#: templates/index.twig:25 templates/top_bar.twig:28
+msgid "Asia"
+msgstr "Ασία"
+
+#: templates/index.twig:26 templates/top_bar.twig:29
+msgid "Europe"
+msgstr "Ευρώπη"
+
+#: templates/index.twig:32 templates/queue.twig:3 templates/queue.twig:10
+#: templates/top_bar.twig:34
+msgid "Queue"
+msgstr "Ουρά"
+
+#: templates/index.twig:33 templates/top_bar.twig:35
+msgid "Change Language"
+msgstr "Αλλαγή Γλώσσας"
+
+#: templates/login.twig:3 templates/login.twig:8 templates/login.twig:12
+msgid "Login"
+msgstr "Είσοδος"
+
+#: templates/login.twig:10
+msgid "Username"
+msgstr "Όνομα Χρήστη"
+
+#: templates/login.twig:11
+msgid "Password"
+msgstr "Κωδικός"
+
+#: templates/packs.twig:3 templates/packs.twig:8
+msgid "ROM Packs"
+msgstr "Πακέτα ROM"
+
+#: templates/queue.twig:12
+msgid "Currently Uploading"
+msgstr "Ανεβαίνουν Αυτή τη Στιγμή"
+
+#: templates/queue.twig:21
+msgid "Up Next"
+msgstr "Επόμενα"
+
+#: templates/queue.twig:22
+msgid "Votes"
+msgstr "Ψήφοι"
+
+#: templates/rom.twig:19
+msgid "Region"
+msgstr "Περιοχή"
+
+#: templates/rom.twig:26
+msgid "System"
+msgstr "Σύστημα"
+
+#: templates/rom.twig:31
+msgid "Languages"
+msgstr "Γλώσσες"
+
+#: templates/rom.twig:40
+msgid "Edition"
+msgstr "Έκδοση"
+
+#: templates/rom.twig:41
+msgid "Original Name"
+msgstr "Γνήσιο Όνομα"
+
+#: templates/rom.twig:48
+msgid ""
+"There are no download links currently available. Click here to vote for this "
+"item to be uploaded."
+msgstr ""
+"Δεν υπάρχουν συνδέσμοι λήψεως αυτή τη στιγμή. Πατήστε εδώ ώστε να ψηφίσετε "
+"για τη μεταφόρτωση αυτού του αντικειμένου."
+
+#: templates/rom.twig:53
+msgid ""
+"Vote cast! Check the upload queue to see when it'll "
+"upload!"
+msgstr ""
+"Η ψήφος καταχωρήθηκε! Ελέγξτε την ουρά μεταφορτώσεων "
+"για να δείτε πότε θα ανέβει!"
+
+#: templates/rom.twig:54
+msgid "Vote"
+msgstr "Ψήφισε"
+
+#: templates/rom.twig:59
+msgid ""
+"ROM is currently uploading. Check the upload queue!"
+msgstr ""
+"Το ROM ανεβαίνει. Ελέγξτε την ουρά μεταφορτώσεων!"
+
+#: templates/rom.twig:65
+msgid "Open all Links (Allow Popups)"
+msgstr "Άνοιγμα όλων τον Συνδέσμων (Επιτροπή Αναδυόμενων)"
+
+#: templates/rom.twig:66
+msgid "Copy Links to Clipboard"
+msgstr "Αντιγραφή Συνδέσμων στο Πρόχειρο"
+
+#: templates/rom.twig:68
+msgid "BYPASS GOOGLE DRIVE QUOTA TUTORIAL"
+msgstr "ΠΑΡΑΚΑΜΨΗ ΟΡΙΟΥ ΤΟΥ GOOGLE DRIVE"
+
+#: templates/rom.twig:69
+msgid "Toggle Download Links"
+msgstr "Προβολή/Απόκρυψη Συνδέσμων"
+
+#: templates/top_bar.twig:14
+msgid "Go to GOG Games"
+msgstr "Πήγαινε στο GOG Games"
+
+#: templates/top_bar.twig:15
+msgid "Go to Scene Games"
+msgstr "Πήγαινε στο Scene Games"
+
+#~ msgid "Packs"
+#~ msgstr "Πακέτα"
diff --git a/locale/en_CA/LC_MESSAGES/messages.mo b/locale/en_CA/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..92b0906
Binary files /dev/null and b/locale/en_CA/LC_MESSAGES/messages.mo differ
diff --git a/locale/en_CA/LC_MESSAGES/messages.po b/locale/en_CA/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..e259a38
--- /dev/null
+++ b/locale/en_CA/LC_MESSAGES/messages.po
@@ -0,0 +1,347 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2018-11-02 01:00+0800\n"
+"PO-Revision-Date: 2018-11-02 01:04+0800\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: en_CA\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.0.5\n"
+
+#: captcha/images.php:4
+msgid "Click the Nintendo 64 Controller"
+msgstr "÷@*?* @$@? N64 # ÷^ =&@?%%"
+
+#: captcha/images.php:8
+msgid "Select the NES Controller"
+msgstr "@##^@@ £* NES ;= &=÷*;@£"
+
+#: captcha/images.php:12
+msgid "Select the PlayStation Controller"
+msgstr "=%!#!% &@@% PS1 ÷*@?#% #^$@$@£"
+
+#: captcha/images.php:16
+msgid "Select the PlayStation 3 Controller"
+msgstr "?^=*!; ;^# ;$? PS3 *!@!% ; =!??%%"
+
+#: captcha/images.php:20
+msgid "Select the PlayStation 4 Controller"
+msgstr "%=!÷=£ #!! *= PS4 $;*%%! # ;£$?*£"
+
+#: captcha/images.php:24
+msgid "Select the SNES Controller"
+msgstr "@^&*;# £* SNES #* ÷@!%?^?"
+
+#: captcha/images.php:28
+msgid "Select the Xbone Controller"
+msgstr "$%==@^ ; XB1 ÷@*@ ;*÷?$"
+
+#: captcha/images.php:32
+msgid "Select the Xbox 360 Controller"
+msgstr "!*÷÷ #;= XB360 $^& ?#%$@£"
+
+#: captcha/images.php:36
+msgid "Click Noctis"
+msgstr "$@£&@ ?^!@*"
+
+#: captcha/images.php:40
+msgid "Click Gladiolus"
+msgstr "%?=@? ?£!=$÷£^"
+
+#: captcha/images.php:44
+msgid "Click Luna"
+msgstr "£@$÷& @#!"
+
+#: captcha/images.php:48
+msgid "(woof)"
+msgstr "(÷?#^#)"
+
+#: web/routes_api.php:241 web/routes_api.php:253
+msgid "Invalid Captcha Data"
+msgstr "#@£#^% &@#$£%% ;$"
+
+#: web/routes_api.php:247
+msgid "Incorrect Captcha Image. Please try again."
+msgstr "£!÷*@%=&? #!!#$?% ;÷%!#. #^?^=! ÷=* ^"
+
+#: web/routes_api.php:266
+msgid ""
+"Your vote limit has exceeded. Wait for the ROMS you've voted on to finish "
+"uploading before voting again."
+msgstr ""
+"!^*$ £&$? ^@%£÷ =&$ @$#@#?=&. $!?÷ =;; $;# ÷££÷ *@^#;% !!÷?÷ £@ @? #*$;÷£ @;"
+"#^£*£!; $£%"
+
+#: web/routes_api.php:280
+msgid "ROM not old enough to vote on."
+msgstr "$#; $=; %£* =£%!?£ ?$ ^^"
+
+#: web/routes_api.php:289
+msgid "ROM is already uploading!"
+msgstr "@?; *; ;^?%#!@ $=^?=%#"
+
+#: web/routes_api.php:299
+msgid ""
+"You already voted on this, check the queue to see when it'll get uploaded!"
+msgstr " ÷£% £÷*#&£? ^?*^; &? ;&;=, £^=;÷ ££= #!?&? £÷ %?÷ ^%%# !;%$*"
+
+#: templates/admin.twig:3 templates/admin.twig:8
+msgid "Admin"
+msgstr "!%$?$"
+
+#: templates/card.twig:13 templates/rom.twig:10
+msgid "Disc"
+msgstr "%^$&"
+
+#: templates/card.twig:16
+msgid "Additional"
+msgstr "=%$*&*£;?#"
+
+#: templates/card.twig:22 templates/rom.twig:27
+msgid "Version"
+msgstr "*@£^@#!"
+
+#: templates/card.twig:28
+msgid "Dev Status"
+msgstr "@%* ^~@$!"
+
+#: templates/card.twig:44 templates/rom.twig:14
+msgid "View game on redump.org"
+msgstr "^#!& %÷@^!% redump.org."
+
+#: templates/card.twig:44 templates/rom.twig:15
+msgid "View game on the DAT-o-MATIC"
+msgstr "!&£? #÷!$ £% DAT-o-MATIC"
+
+#: templates/card.twig:48
+msgid "Filter by %console_name%"
+msgstr "!@£*=# ! %console_name%"
+
+#: templates/console.twig:13
+msgid "Browse ROMs"
+msgstr "*@? @!$"
+
+#: templates/console.twig:14
+msgid "ROM Pack"
+msgstr "$@= ;£?@"
+
+#: templates/console.twig:15
+msgid "BIOS Files"
+msgstr "@#£* ÷*;@£"
+
+#: templates/console.twig:19
+msgid "Emulators"
+msgstr "#!@%£%£@*!#^"
+
+#: templates/console.twig:21
+msgid "Emulator"
+msgstr "#!@%£%£@*!#"
+
+#: templates/drive_tutorial.twig:3 templates/drive_tutorial.twig:8
+msgid "Google Drive Quota Exceeded Bypass Tutorial"
+msgstr "&=!$#? £^ &%£#@ ;*@÷%÷ £%*;#÷;.!$"
+
+#: templates/faq.twig:3 templates/faq.twig:8 templates/index.twig:31
+#: templates/top_bar.twig:33
+msgid "FAQ"
+msgstr "#$!"
+
+#: templates/faq.twig:9
+msgid "What is Retro Games?"
+msgstr "&!#* #$ £=?*# ;÷&"
+
+#: templates/faq.twig:10
+msgid ""
+"A site which automates the process of sharing verified redump/no-intro roms."
+msgstr "#;!% &£!&^ $!!÷&÷#*= ;^% ;@&= ÷; ÷$==÷*# ==*@^@&£ ÷%&^&£?@=£"
+
+#: templates/faq.twig:12
+msgid "How does it work?"
+msgstr "$?£ @£@! £& #!"
+
+#: templates/faq.twig:13
+msgid ""
+"Simply vote for the roms you want and the site will upload them. Roms with "
+"more votes will be uploaded first."
+msgstr ""
+"@=;£ ?£## ÷$* $?÷ £=^£ ^%* &==# =!% £#* $@£% =?^# $@$&*÷ ;!*#. $£&^ $&@÷ "
+"$÷*! ?÷÷;# &£*"
+
+#: templates/faq.twig:15
+msgid "What if the links go down?"
+msgstr "*;@$ ?* *^* =%£%? ?; "
+
+#: templates/faq.twig:16
+msgid ""
+"The system saves the upload date after a rom is uploaded. You'll be able to "
+"vote for the game to be re-uploaded 60 days later. Then the cycle starts "
+"over."
+msgstr ""
+" #&? ÷@;@^; *!?# #=* £!÷%*^ &£= !%!$@ = ;=# !; %££=#^#. &&?^÷= %÷ £^£# ;# ;"
+"^* £££ @=? ^$^& ?;*;£&^?& #& =^?£ ^$!@"
+
+#: templates/faq.twig:18
+msgid "Why can't I find [insert game here] or [insert system here]?"
+msgstr "@;#&^&=÷^*$%?@?#"
+
+#: templates/faq.twig:19
+msgid ""
+"We will continue to add new systems and additional games in the future. So "
+"be sure to check back!"
+msgstr ""
+"!?# @÷ £ *;^#! @;÷@#=%&÷£÷ ?#* =;=%!£* #&* % ÷ ^&$#÷$@£^ @=&@ $& ?÷ ?# £$. "
+"#?? == !÷@& &;? !@^* ÷;@"
+
+#: templates/faq.twig:21
+msgid "How do I download or extract files?"
+msgstr "$%= !! ? &^;*%;#$ &@ *!#÷;÷"
+
+#: templates/faq.twig:22
+msgid ""
+"We recommend %jdownloader2link% for downloading and %7ziplink% for "
+"extracting files."
+msgstr ""
+"?; =£!@^÷÷@^ %jdownloader2link% &=;=£$& %!@ ?@#* %7ziplink% $@$=@!*£^= #@& ;?"
+"÷&?#!@"
+
+#: templates/faq.twig:24
+msgid "How can I make sure the files have not been tampered with?"
+msgstr "£?^ ;=$ @ ?=% %^!$ @?# &^£$@ %#÷% ÷=£ ;#=# #?!"
+
+#: templates/faq.twig:25
+msgid ""
+"Compare the hashes of the files with the hashes found in redump.org/No-"
+"Intro.\n"
+" You can use a program like HashTab or HashCheck to check your files."
+msgstr ""
+"%&@& &;? !$&!?# @÷ £ *;^&* %&£÷ ?#* =;=%!= !÷@\n"
+"?÷ ?# £#! @;÷@#=÷£* #$. #?? =^* ÷;@ ÷ ^#÷$@£^ @=&@ $"
+
+#: templates/index.twig:15 templates/top_bar.twig:18
+msgid "Search..."
+msgstr "%*?^@#..."
+
+#: templates/index.twig:17 templates/search.twig:3 templates/top_bar.twig:20
+msgid "All Consoles"
+msgstr "£#÷ =;÷*!*"
+
+#: templates/index.twig:23 templates/top_bar.twig:26
+msgid "Any Region"
+msgstr "$@ &£%÷*"
+
+#: templates/index.twig:24 templates/top_bar.twig:27
+msgid "America"
+msgstr "$%!;*&"
+
+#: templates/index.twig:25 templates/top_bar.twig:28
+msgid "Asia"
+msgstr "£?÷&"
+
+#: templates/index.twig:26 templates/top_bar.twig:29
+msgid "Europe"
+msgstr "*£%?$;"
+
+#: templates/index.twig:32 templates/queue.twig:3 templates/queue.twig:9
+#: templates/top_bar.twig:34
+msgid "Queue"
+msgstr "#^?÷@"
+
+#: templates/index.twig:33 templates/top_bar.twig:35
+msgid "Change Language"
+msgstr "&^$@$% &%$=^="
+
+#: templates/login.twig:3 templates/login.twig:8 templates/login.twig:12
+msgid "Login"
+msgstr "@#$^%"
+
+#: templates/login.twig:10
+msgid "Username"
+msgstr "@#&%&!^"
+
+#: templates/login.twig:11
+msgid "Password"
+msgstr "÷#*÷;=÷%"
+
+#: templates/packs.twig:3 templates/packs.twig:8
+msgid "ROM Packs"
+msgstr "$@= ;£?@"
+
+#: templates/queue.twig:11
+msgid "Currently Uploading"
+msgstr ";%=!#!;&; ;#£!=?=^"
+
+#: templates/queue.twig:19
+msgid "Up Next"
+msgstr "?;# @*£"
+
+#: templates/rom.twig:19
+msgid "Region"
+msgstr "#£^!;%"
+
+#: templates/rom.twig:26
+msgid "System"
+msgstr "%?!£="
+
+#: templates/rom.twig:31
+msgid "Languages"
+msgstr "%*!&£^÷%"
+
+#: templates/rom.twig:39
+msgid "Edition"
+msgstr "*;#&^$"
+
+#: templates/rom.twig:40
+msgid "Original Name"
+msgstr "#^÷^@#&= =!"
+
+#: templates/rom.twig:47
+msgid ""
+"There are no download links currently available. Click here to vote for this "
+"item to be uploaded."
+msgstr "!$ ;÷ !$#!#?&= !÷£÷? #*&%÷ £%*;#÷;. £^*@? %% £! #£#@ ;*& #*! @"
+
+#: templates/rom.twig:52
+msgid ""
+"Vote cast! Check the upload queue to see when it'll "
+"upload!"
+msgstr "?&?@ ^*^=; ^; %@%!=%!=*"
+
+#: templates/rom.twig:53
+msgid "Vote"
+msgstr "@;%*"
+
+#: templates/rom.twig:58
+msgid ""
+"ROM is currently uploading. Check the upload queue!"
+msgstr ""
+"%=÷&&%#$£ ?%££;^!.$#^#£ !@ &÷ %£@*!%#^?@@=*%@ £;"
+
+#: templates/rom.twig:64
+msgid "Open all Links (Allow Popups)"
+msgstr "@;% ?@?#= %÷!?$& ^"
+
+#: templates/rom.twig:65
+msgid "Copy Links to Clipboard"
+msgstr "!;÷# $?÷#* $£;*#="
+
+#: templates/rom.twig:68
+msgid "Toggle Download Links"
+msgstr "#@$%?÷ @!£=!% $@"
+
+#: templates/top_bar.twig:14
+msgid "Go to GOG Games"
+msgstr "#= !?* #£"
+
+#: templates/top_bar.twig:15
+msgid "Go to Scene Games"
+msgstr "&=!@%£# £?"
+
+msgid "BYPASS GOOGLE DRIVE QUOTA TUTORIAL"
+msgstr "*%@$! @!£=!% %£@*! !.$#^ !$#!#?&="
+
+msgid "Votes"
+msgstr "!*?£#"
\ No newline at end of file
diff --git a/locale/en_rg_dist.po b/locale/en_rg_dist.po
new file mode 100644
index 0000000..43d0885
--- /dev/null
+++ b/locale/en_rg_dist.po
@@ -0,0 +1,337 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2018-11-02 00:59+0800\n"
+"PO-Revision-Date: 2018-11-02 00:59+0800\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: en\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.0.5\n"
+"X-Poedit-Basepath: ..\n"
+"X-Poedit-SearchPath-0: templates\n"
+"X-Poedit-SearchPath-1: web/routes.php\n"
+"X-Poedit-SearchPath-2: web/routes_api.php\n"
+"X-Poedit-SearchPath-3: captcha/images.php\n"
+
+#: captcha/images.php:4
+msgid "Click the Nintendo 64 Controller"
+msgstr ""
+
+#: captcha/images.php:8
+msgid "Select the NES Controller"
+msgstr ""
+
+#: captcha/images.php:12
+msgid "Select the PlayStation Controller"
+msgstr ""
+
+#: captcha/images.php:16
+msgid "Select the PlayStation 3 Controller"
+msgstr ""
+
+#: captcha/images.php:20
+msgid "Select the PlayStation 4 Controller"
+msgstr ""
+
+#: captcha/images.php:24
+msgid "Select the SNES Controller"
+msgstr ""
+
+#: captcha/images.php:28
+msgid "Select the Xbone Controller"
+msgstr ""
+
+#: captcha/images.php:32
+msgid "Select the Xbox 360 Controller"
+msgstr ""
+
+#: captcha/images.php:36
+msgid "Click Noctis"
+msgstr ""
+
+#: captcha/images.php:40
+msgid "Click Gladiolus"
+msgstr ""
+
+#: captcha/images.php:44
+msgid "Click Luna"
+msgstr ""
+
+#: captcha/images.php:48
+msgid "(woof)"
+msgstr ""
+
+#: web/routes_api.php:241 web/routes_api.php:253
+msgid "Invalid Captcha Data"
+msgstr ""
+
+#: web/routes_api.php:247
+msgid "Incorrect Captcha Image. Please try again."
+msgstr ""
+
+#: web/routes_api.php:266
+msgid ""
+"Your vote limit has exceeded. Wait for the ROMS you've voted on to finish "
+"uploading before voting again."
+msgstr ""
+
+#: web/routes_api.php:280
+msgid "ROM not old enough to vote on."
+msgstr ""
+
+#: web/routes_api.php:289
+msgid "ROM is already uploading!"
+msgstr ""
+
+#: web/routes_api.php:299
+msgid ""
+"You already voted on this, check the queue to see when it'll get uploaded!"
+msgstr ""
+
+#: templates/admin.twig:3 templates/admin.twig:8
+msgid "Admin"
+msgstr ""
+
+#: templates/card.twig:13 templates/rom.twig:10
+msgid "Disc"
+msgstr ""
+
+#: templates/card.twig:16
+msgid "Additional"
+msgstr ""
+
+#: templates/card.twig:22 templates/rom.twig:27
+msgid "Version"
+msgstr ""
+
+#: templates/card.twig:28
+msgid "Dev Status"
+msgstr ""
+
+#: templates/card.twig:44 templates/rom.twig:14
+msgid "View game on redump.org"
+msgstr ""
+
+#: templates/card.twig:44 templates/rom.twig:15
+msgid "View game on the DAT-o-MATIC"
+msgstr ""
+
+#: templates/card.twig:48
+msgid "Filter by %console_name%"
+msgstr ""
+
+#: templates/console.twig:13
+msgid "Browse ROMs"
+msgstr ""
+
+#: templates/console.twig:14
+msgid "ROM Pack"
+msgstr ""
+
+#: templates/console.twig:15
+msgid "BIOS Files"
+msgstr ""
+
+#: templates/console.twig:19
+msgid "Emulators"
+msgstr ""
+
+#: templates/console.twig:21
+msgid "Emulator"
+msgstr ""
+
+#: templates/drive_tutorial.twig:3 templates/drive_tutorial.twig:8
+msgid "Google Drive Quota Exceeded Bypass Tutorial"
+msgstr ""
+
+#: templates/faq.twig:3 templates/faq.twig:8 templates/index.twig:31
+#: templates/top_bar.twig:33
+msgid "FAQ"
+msgstr ""
+
+#: templates/faq.twig:9
+msgid "What is Retro Games?"
+msgstr ""
+
+#: templates/faq.twig:10
+msgid ""
+"A site which automates the process of sharing verified redump/no-intro roms."
+msgstr ""
+
+#: templates/faq.twig:12
+msgid "How does it work?"
+msgstr ""
+
+#: templates/faq.twig:13
+msgid ""
+"Simply vote for the roms you want and the site will upload them. Roms with "
+"more votes will be uploaded first."
+msgstr ""
+
+#: templates/faq.twig:15
+msgid "What if the links go down?"
+msgstr ""
+
+#: templates/faq.twig:16
+msgid ""
+"The system saves the upload date after a rom is uploaded. You'll be able to "
+"vote for the game to be re-uploaded 60 days later. Then the cycle starts "
+"over."
+msgstr ""
+
+#: templates/faq.twig:18
+msgid "Why can't I find [insert game here] or [insert system here]?"
+msgstr ""
+
+#: templates/faq.twig:19
+msgid ""
+"We will continue to add new systems and additional games in the future. So "
+"be sure to check back!"
+msgstr ""
+
+#: templates/faq.twig:21
+msgid "How do I download or extract files?"
+msgstr ""
+
+#: templates/faq.twig:22
+msgid ""
+"We recommend %jdownloader2link% for downloading and %7ziplink% for "
+"extracting files."
+msgstr ""
+
+#: templates/faq.twig:24
+msgid "How can I make sure the files have not been tampered with?"
+msgstr ""
+
+#: templates/faq.twig:25
+msgid ""
+"Compare the hashes of the files with the hashes found in redump.org/No-"
+"Intro.\n"
+" You can use a program like HashTab or HashCheck to check your files."
+msgstr ""
+
+#: templates/index.twig:15 templates/top_bar.twig:18
+msgid "Search..."
+msgstr ""
+
+#: templates/index.twig:17 templates/search.twig:3 templates/top_bar.twig:20
+msgid "All Consoles"
+msgstr ""
+
+#: templates/index.twig:23 templates/top_bar.twig:26
+msgid "Any Region"
+msgstr ""
+
+#: templates/index.twig:24 templates/top_bar.twig:27
+msgid "America"
+msgstr ""
+
+#: templates/index.twig:25 templates/top_bar.twig:28
+msgid "Asia"
+msgstr ""
+
+#: templates/index.twig:26 templates/top_bar.twig:29
+msgid "Europe"
+msgstr ""
+
+#: templates/index.twig:32 templates/queue.twig:3 templates/queue.twig:9
+#: templates/top_bar.twig:34
+msgid "Queue"
+msgstr ""
+
+#: templates/index.twig:33 templates/top_bar.twig:35
+msgid "Change Language"
+msgstr ""
+
+#: templates/login.twig:3 templates/login.twig:8 templates/login.twig:12
+msgid "Login"
+msgstr ""
+
+#: templates/login.twig:10
+msgid "Username"
+msgstr ""
+
+#: templates/login.twig:11
+msgid "Password"
+msgstr ""
+
+#: templates/packs.twig:3 templates/packs.twig:8
+msgid "ROM Packs"
+msgstr ""
+
+#: templates/queue.twig:11
+msgid "Currently Uploading"
+msgstr ""
+
+#: templates/queue.twig:19
+msgid "Up Next"
+msgstr ""
+
+#: templates/rom.twig:19
+msgid "Region"
+msgstr ""
+
+#: templates/rom.twig:26
+msgid "System"
+msgstr ""
+
+#: templates/rom.twig:31
+msgid "Languages"
+msgstr ""
+
+#: templates/rom.twig:39
+msgid "Edition"
+msgstr ""
+
+#: templates/rom.twig:40
+msgid "Original Name"
+msgstr ""
+
+#: templates/rom.twig:47
+msgid ""
+"There are no download links currently available. Click here to vote for this "
+"item to be uploaded."
+msgstr ""
+
+#: templates/rom.twig:52
+msgid ""
+"Vote cast! Check the upload queue to see when it'll "
+"upload!"
+msgstr ""
+
+#: templates/rom.twig:53
+msgid "Vote"
+msgstr ""
+
+#: templates/rom.twig:58
+msgid ""
+"ROM is currently uploading. Check the upload queue!"
+msgstr ""
+
+#: templates/rom.twig:64
+msgid "Open all Links (Allow Popups)"
+msgstr ""
+
+#: templates/rom.twig:65
+msgid "Copy Links to Clipboard"
+msgstr ""
+
+#: templates/rom.twig:68
+msgid "Toggle Download Links"
+msgstr ""
+
+#: templates/top_bar.twig:14
+msgid "Go to GOG Games"
+msgstr ""
+
+#: templates/top_bar.twig:15
+msgid "Go to Scene Games"
+msgstr ""
+
+#: templates/top_bar.twig:15
+msgid "BYPASS GOOGLE DRIVE QUOTA TUTORIAL"
+msgstr ""
diff --git a/locale/ru_RU/LC_MESSAGES/messages.mo b/locale/ru_RU/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..f233cc7
Binary files /dev/null and b/locale/ru_RU/LC_MESSAGES/messages.mo differ
diff --git a/locale/ru_RU/LC_MESSAGES/messages.po b/locale/ru_RU/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..4bd3d8f
--- /dev/null
+++ b/locale/ru_RU/LC_MESSAGES/messages.po
@@ -0,0 +1,370 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2018-11-02 01:08+0800\n"
+"PO-Revision-Date: 2018-11-01 20:03+0200\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2\n"
+"X-Poedit-Basepath: ../../..\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-Basepath: ../../..\n"
+"X-Poedit-SearchPath-0: templates\n"
+"X-Poedit-SearchPath-1: web/routes.php\n"
+"X-Poedit-SearchPath-2: web/routes_api.php\n"
+"X-Poedit-SearchPath-3: captcha/images.php\n"
+
+#: captcha/images.php:4
+msgid "Click the Nintendo 64 Controller"
+msgstr "Выберите иконку контроллера Nintendo 64"
+
+#: captcha/images.php:8
+msgid "Select the NES Controller"
+msgstr "Выберите иконку контроллера NES"
+
+#: captcha/images.php:12
+msgid "Select the PlayStation Controller"
+msgstr "Выберите иконку контроллера PlayStation"
+
+#: captcha/images.php:16
+msgid "Select the PlayStation 3 Controller"
+msgstr "Выберите иконку контроллера PlayStation 3"
+
+#: captcha/images.php:20
+msgid "Select the PlayStation 4 Controller"
+msgstr "Выберите иконку контроллера PlayStation 4"
+
+#: captcha/images.php:24
+msgid "Select the SNES Controller"
+msgstr "Выберите иконку контроллера SNES"
+
+#: captcha/images.php:28
+msgid "Select the Xbone Controller"
+msgstr "Выберите иконку контроллера Xbone"
+
+#: captcha/images.php:32
+msgid "Select the Xbox 360 Controller"
+msgstr "Выберите иконку контроллера Xbox 360"
+
+#: captcha/images.php:36
+msgid "Click Noctis"
+msgstr "Нажмите на иконку персонажа Noctis"
+
+#: captcha/images.php:40
+msgid "Click Gladiolus"
+msgstr "Нажмите на иконку персонажа Gladioulus"
+
+#: captcha/images.php:44
+msgid "Click Luna"
+msgstr "Нажмите на иконку персонажа Luna"
+
+#: captcha/images.php:48
+msgid "(woof)"
+msgstr "(гав-гав)"
+
+#: web/routes_api.php:241 web/routes_api.php:253
+msgid "Invalid Captcha Data"
+msgstr "Неверная капча"
+
+#: web/routes_api.php:247
+msgid "Incorrect Captcha Image. Please try again."
+msgstr "Вы выбрали неверное изображение. Пожалуйста, попробуйте снова."
+
+#: web/routes_api.php:266
+msgid ""
+"Your vote limit has exceeded. Wait for the ROMS you've voted on to finish "
+"uploading before voting again."
+msgstr ""
+"Превышен лимит запросов. Подождите пока загрузятся ROMs, которые вы "
+"запросили, перед тем как делать новые запросы."
+
+#: web/routes_api.php:280
+msgid "ROM not old enough to vote on."
+msgstr "ROM не слишком стар, чтобы делать новый запрос."
+
+#: web/routes_api.php:289
+msgid "ROM is already uploading!"
+msgstr "ROM уже загружается!"
+
+#: web/routes_api.php:299
+msgid ""
+"You already voted on this, check the queue to see when it'll get uploaded!"
+msgstr ""
+"Вы уже сделали запрос на этот ROM, проверьте очередь на загрузку чтобы "
+"увидеть когда ROM будет загружен!"
+
+#: templates/admin.twig:3 templates/admin.twig:8
+msgid "Admin"
+msgstr "Админ"
+
+#: templates/card.twig:13 templates/rom.twig:10
+msgid "Disc"
+msgstr "Диск"
+
+#: templates/card.twig:16
+msgid "Additional"
+msgstr "Дополнительно"
+
+#: templates/card.twig:22 templates/rom.twig:27
+msgid "Version"
+msgstr "Версия"
+
+#: templates/card.twig:28
+msgid "Dev Status"
+msgstr "Стадия разработки"
+
+#: templates/card.twig:44 templates/rom.twig:14
+msgid "View game on redump.org"
+msgstr "Посмотреть игру на redump.org"
+
+#: templates/card.twig:44 templates/rom.twig:15
+msgid "View game on the DAT-o-MATIC"
+msgstr "Посмотреть игру на DAT-o-MATIC"
+
+#: templates/card.twig:48
+msgid "Filter by %console_name%"
+msgstr "Фильтр по %console_name%"
+
+#: templates/console.twig:13
+msgid "Browse ROMs"
+msgstr "Показать все ROMs"
+
+#: templates/console.twig:14
+msgid "ROM Pack"
+msgstr "ROM Архивы"
+
+#: templates/console.twig:15
+msgid "BIOS Files"
+msgstr "Файлы BIOS"
+
+#: templates/console.twig:19
+msgid "Emulators"
+msgstr "Эмуляторы"
+
+#: templates/console.twig:21
+msgid "Emulator"
+msgstr "Эмулятор"
+
+#: templates/drive_tutorial.twig:3 templates/drive_tutorial.twig:8
+msgid "Google Drive Quota Exceeded Bypass Tutorial"
+msgstr "Обход лимита скачиваний на Google Drive"
+
+#: templates/faq.twig:3 templates/faq.twig:8 templates/index.twig:31
+#: templates/top_bar.twig:33
+msgid "FAQ"
+msgstr "ЧАВО"
+
+#: templates/faq.twig:9
+msgid "What is Retro Games?"
+msgstr "Что такое Retro Games?"
+
+#: templates/faq.twig:10
+msgid ""
+"A site which automates the process of sharing verified redump/no-intro roms."
+msgstr ""
+"Сайт, который автоматизирует процесс распространения проверенных redump/no-"
+"intro roms."
+
+#: templates/faq.twig:12
+msgid "How does it work?"
+msgstr "Как это работает?"
+
+#: templates/faq.twig:13
+msgid ""
+"Simply vote for the roms you want and the site will upload them. Roms with "
+"more votes will be uploaded first."
+msgstr ""
+"Просто сделайте запрос на roms которые вы хотите и сайт загрузит их. Roms с "
+"наибольшим количеством запросов будут в приоритете."
+
+#: templates/faq.twig:15
+msgid "What if the links go down?"
+msgstr "Что если ссылки перестанут работать?"
+
+#: templates/faq.twig:16
+msgid ""
+"The system saves the upload date after a rom is uploaded. You'll be able to "
+"vote for the game to be re-uploaded 60 days later. Then the cycle starts "
+"over."
+msgstr ""
+"Система сохраняет дату загрузки после того как rom загружен на сайт. У Вас "
+"будет возможность делать запрос на перезагрузку игры, каждые 60 дней."
+
+#: templates/faq.twig:18
+msgid "Why can't I find [insert game here] or [insert system here]?"
+msgstr "Почему я не могу найти [вставьте имя игры] или [вставьте имя системы]?"
+
+#: templates/faq.twig:19
+msgid ""
+"We will continue to add new systems and additional games in the future. So "
+"be sure to check back!"
+msgstr ""
+"Мы будем продолжать добавлять новые системы и игры для них в будущем. "
+"Поэтому обязательно вернитесь!"
+
+#: templates/faq.twig:21
+msgid "How do I download or extract files?"
+msgstr "Как скачать или распаковать файлы?"
+
+#: templates/faq.twig:22
+msgid ""
+"We recommend %jdownloader2link% for downloading and %7ziplink% for "
+"extracting files."
+msgstr ""
+"Мы рекомендуем %jdownloader2link% для загрузок и %7ziplink% для распаковки "
+"файлов."
+
+#: templates/faq.twig:24
+msgid "How can I make sure the files have not been tampered with?"
+msgstr "Как я могу быть уверен в том что файлы не были подделаны?"
+
+#: templates/faq.twig:25
+msgid ""
+"Compare the hashes of the files with the hashes found in redump.org/No-"
+"Intro.\n"
+" You can use a program like HashTab or HashCheck to check your files."
+msgstr ""
+"Сравните хэши файлов с хэшами, которые могут быть найдены на сайте redump."
+"org/No-Intro.\n"
+" Вы можете использовать такие программы как HashTab или HashCheck для "
+"проверки ваших файлов."
+
+#: templates/index.twig:15 templates/top_bar.twig:18
+msgid "Search..."
+msgstr "Поиск..."
+
+#: templates/index.twig:17 templates/search.twig:3 templates/top_bar.twig:20
+msgid "All Consoles"
+msgstr "Все консоли"
+
+#: templates/index.twig:23 templates/top_bar.twig:26
+msgid "Any Region"
+msgstr "Любой регион"
+
+#: templates/index.twig:24 templates/top_bar.twig:27
+msgid "America"
+msgstr "Америка"
+
+#: templates/index.twig:25 templates/top_bar.twig:28
+msgid "Asia"
+msgstr "Азия"
+
+#: templates/index.twig:26 templates/top_bar.twig:29
+msgid "Europe"
+msgstr "Европа"
+
+#: templates/index.twig:32 templates/queue.twig:3 templates/queue.twig:9
+#: templates/top_bar.twig:34
+msgid "Queue"
+msgstr "Очередь"
+
+#: templates/index.twig:33 templates/top_bar.twig:35
+msgid "Change Language"
+msgstr "Изменить язык"
+
+#: templates/login.twig:3 templates/login.twig:8 templates/login.twig:12
+msgid "Login"
+msgstr "Вход"
+
+#: templates/login.twig:10
+msgid "Username"
+msgstr "Имя пользователя"
+
+#: templates/login.twig:11
+msgid "Password"
+msgstr "Пароль"
+
+#: templates/packs.twig:3 templates/packs.twig:8
+msgid "ROM Packs"
+msgstr "ROM архивы"
+
+#: templates/queue.twig:11
+msgid "Currently Uploading"
+msgstr "Загрузка в данный момент"
+
+#: templates/queue.twig:19
+msgid "Up Next"
+msgstr "Следующие игры в очереди"
+
+#: templates/rom.twig:19
+msgid "Region"
+msgstr "Регион"
+
+#: templates/rom.twig:26
+msgid "System"
+msgstr "Система"
+
+#: templates/rom.twig:31
+msgid "Languages"
+msgstr "Языки"
+
+#: templates/rom.twig:39
+msgid "Edition"
+msgstr "Издание"
+
+#: templates/rom.twig:40
+msgid "Original Name"
+msgstr "Оригинальное название"
+
+#: templates/rom.twig:47
+msgid ""
+"There are no download links currently available. Click here to vote for this "
+"item to be uploaded."
+msgstr ""
+"Ссылки для скачивания отсутствуют . Нажмите здесь чтобы сделать запрос на "
+"загрузку."
+
+#: templates/rom.twig:52
+msgid ""
+"Vote cast! Check the upload queue to see when it'll "
+"upload!"
+msgstr ""
+"Вы успешно сделали запрос! Проверьте очередь на загрузку"
+"a> чтобы узнать когда загрузка будет завершена!"
+
+#: templates/rom.twig:53
+msgid "Vote"
+msgstr "Сделать запрос"
+
+#: templates/rom.twig:58
+msgid ""
+"ROM is currently uploading. Check the upload queue!"
+msgstr ""
+"ROM в процессе загрузки. Проверьте очередь на загрузку"
+"a>!"
+
+#: templates/rom.twig:64
+msgid "Open all Links (Allow Popups)"
+msgstr "Открыть все ссылки (Разрешите всплывающие окна)"
+
+#: templates/rom.twig:65
+msgid "Copy Links to Clipboard"
+msgstr "Скопировать все ссылки"
+
+#: templates/rom.twig:68
+msgid "Toggle Download Links"
+msgstr "Показать все ссылки"
+
+#: templates/top_bar.twig:14
+msgid "Go to GOG Games"
+msgstr "Посетить GOG Games"
+
+#: templates/top_bar.twig:15
+msgid "Go to Scene Games"
+msgstr "Посетить Scene Games"
+
+msgid "BYPASS GOOGLE DRIVE QUOTA TUTORIAL"
+msgstr "ОБХОД ЛИМИТА СКАЧИВАНИЙ НА GOOGLE DRIVE"
+
+#~ msgid "Packs"
+#~ msgstr "Архивы"
+
+#~ msgid "All"
+#~ msgstr "Всё"
+
+#~ msgid "Any"
+#~ msgstr "Любой"
diff --git a/memcached.php b/memcached.php
new file mode 100644
index 0000000..16be5a6
--- /dev/null
+++ b/memcached.php
@@ -0,0 +1,26 @@
+connect($CONFIG["MEMCACHED"]["SERVER"], $CONFIG["MEMCACHED"]["PORT"]);
+ } else {
+ $Memcached = new Memcached();
+ $Memcached->addServer($CONFIG["MEMCACHED"]["SERVER"], $CONFIG["MEMCACHED"]["PORT"]);
+ }
+ } else {
+ $Memcached = new Memcached();
+ $Memcached->addServer($CONFIG["MEMCACHED"]["SERVER"], $CONFIG["MEMCACHED"]["PORT"]);
+ }
+} catch (Exception $e) {
+ echo base64_decode("c82ezKDNjcyvzLPNk8yZaM2AzY/MncyfzK3MusytzZnMr8y6ac2dzKfMtM2P0onNiMyjzJzMqcyvzLHMn82UzYnMpsyXzLzMncyszJ3MsMyzzKrMlnTNos2BzZ3Nn8ywzY3NmsyszKzMoMypzYXMqcyuzKbNls2UzLvMrc2JzKTMrsyfJ82fzY/NmsyszZTMmcyrzK3Mq8ytzLrMpnPMtc2hzK3MvMyvzJ0gzKfMt82PzLHMpcyYzKDNls2NzKDNhcyWzKBmzZ3Mm8y4zJ7MsMygzLHMn82TzKnNic2IdcybzJvNh8yjzJ7MpsyYzZPMu2PMuM2fzKLNiM2VzJ7Mr8yxzZTMnsyrzKTMsMywzKnNiMyya8ynzY/NocyhzZPMpMyrzKzMpsywzZXNk82TzZrMssyxzKnNms2IzZPMpGXNoM2ezY7MucykzLPMmMy7zJfMu8yqzKvNmc2aZM2ezY/Mp82YzLHMqsyYzLvNjcydIM2PzKDMqc2JzJbNmcyYzKnMo8y6zKrNiMyXzZnMscyWzY3MqnXNgc2dzaDMu8ygzY7Mu82VzLrNk8yezK7Mn8ykzJnMrc2UzKpwzLTMnsyczY3MqcyzzLnNic2azYXMs8yszKrMrcyfzLrMrsyWzKk=");
+ die;
+} catch (Error $e) {
+ echo base64_decode("c82ezKDNjcyvzLPNk8yZaM2AzY/MncyfzK3MusytzZnMr8y6ac2dzKfMtM2P0onNiMyjzJzMqcyvzLHMn82UzYnMpsyXzLzMncyszJ3MsMyzzKrMlnTNos2BzZ3Nn8ywzY3NmsyszKzMoMypzYXMqcyuzKbNls2UzLvMrc2JzKTMrsyfJ82fzY/NmsyszZTMmcyrzK3Mq8ytzLrMpnPMtc2hzK3MvMyvzJ0gzKfMt82PzLHMpcyYzKDNls2NzKDNhcyWzKBmzZ3Mm8y4zJ7MsMygzLHMn82TzKnNic2IdcybzJvNh8yjzJ7MpsyYzZPMu2PMuM2fzKLNiM2VzJ7Mr8yxzZTMnsyrzKTMsMywzKnNiMyya8ynzY/NocyhzZPMpMyrzKzMpsywzZXNk82TzZrMssyxzKnNms2IzZPMpGXNoM2ezY7MucykzLPMmMy7zJfMu8yqzKvNmc2aZM2ezY/Mp82YzLHMqsyYzLvNjcydIM2PzKDMqc2JzJbNmcyYzKnMo8y6zKrNiMyXzZnMscyWzY3MqnXNgc2dzaDMu8ygzY7Mu82VzLrNk8yezK7Mn8ykzJnMrc2UzKpwzLTMnsyczY3MqcyzzLnNic2azYXMs8yszKrMrcyfzLrMrsyWzKk=");
+ die;
+}
\ No newline at end of file
diff --git a/scripts/images/clone_link.php b/scripts/images/clone_link.php
new file mode 100644
index 0000000..eec5c44
--- /dev/null
+++ b/scripts/images/clone_link.php
@@ -0,0 +1,34 @@
+prepare("SELECT D.console as dir, R.console as slug FROM `directory_info` D
+ LEFT JOIN `roms` R ON D.id = R.dir_info_id
+ GROUP BY R.console");
+$consoles->execute();
+$consoles = $consoles->fetchAll(\PDO::FETCH_ASSOC);
+
+$client = new \GuzzleHttp\Client(['headers' => ['Accept' => 'application/vnd.github.v3+json']]);
+$res = $client->request('GET', 'https://api.github.com/users/libretro-thumbnails/repos?per_page=500');
+$repoList = json_decode($res->getBody());
+
+$gitList = [];
+foreach ($repoList as $repo) {
+ $gitList[str_replace("_", " ", $repo->name)] = $repo->clone_url;
+}
+//var_dump($gitList);
+foreach ($consoles as $console) {
+ if (isset($gitList[$console['dir']])) {
+ $cloneUrl = $gitList[$console['dir']];
+ $slug = $console['slug'];
+ exec("git clone $cloneUrl");
+ if (file_exists($CONFIG['BASEDIR']."scripts/images/".basename($cloneUrl, '.git')."/Named_Boxarts")) {
+ file_put_contents('sym.txt', 'ln -s "'.$CONFIG['BASEDIR']."scripts/images/".basename($cloneUrl, '.git').'/Named_Boxarts" '.'"'.$CONFIG['BASEDIR']."web/static/img/roms/$slug".'"'."\r\n", FILE_APPEND);
+ //file_put_contents('sym.txt', 'mklink /D "'.$CONFIG['BASEDIR']."web/static/img/roms/$slug".'" '.'"'.$CONFIG['BASEDIR']."scripts/images/".basename($cloneUrl, '.git').'/Named_Boxarts"'."\r\n", FILE_APPEND);
+ }
+ }
+}
\ No newline at end of file
diff --git a/scripts/images/update.sh b/scripts/images/update.sh
new file mode 100644
index 0000000..39f204d
--- /dev/null
+++ b/scripts/images/update.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# cd into each subdir and update images
+# only for updating, run "php clone_link.php" before using this
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+cd "$DIR"
+for dir in */ ; do
+ echo "$dir"
+ cd "$dir"
+ if [ -d ".git" ]; then
+ git reset --hard HEAD
+ git pull
+ cd "$DIR"
+ fi
+done
\ No newline at end of file
diff --git a/scripts/parse_internal.php b/scripts/parse_internal.php
new file mode 100644
index 0000000..ac6faea
--- /dev/null
+++ b/scripts/parse_internal.php
@@ -0,0 +1,47 @@
+.
+*/
+require '../config.php';
+require $CONFIG['BASEDIR'].'/vendor/autoload.php';
+require $CONFIG['BASEDIR'].'/db.php';
+require $CONFIG['BASEDIR'].'/class.retro.php';
+
+$Retro = new GoodOldDownloads\Retro();
+function addRom($name, $console, $dirInfo){
+ global $dbh;
+ global $Retro;
+ if ($Retro->insertNoIntro($name, $console, $dirInfo) === false) {
+ $err = $dbh->prepare("INSERT INTO `error_log` (`name`, `console`) VALUES (:name, :console)");
+ $err->bindParam(':name', $name, \PDO::PARAM_STR);
+ $err->bindParam(':console', $console, \PDO::PARAM_STR);
+ $err->execute();
+ return false;
+ } else {
+ return true;
+ }
+}
+
+$handle = fopen($argv[1], "r");
+if ($handle) {
+ while (($line = fgets($handle)) !== false) {
+ addRom($line, $argv[2], $argv[3]);
+ }
+ fclose($handle);
+} else {
+ echo "Nope";
+ die;
+}
\ No newline at end of file
diff --git a/scripts/parse_invalid.php b/scripts/parse_invalid.php
new file mode 100644
index 0000000..abd15a4
--- /dev/null
+++ b/scripts/parse_invalid.php
@@ -0,0 +1,89 @@
+.
+*/
+/*
+ Search via MD5
+ Add to Database if redirected directly to rom page
+*/
+require '../config.php';
+require $CONFIG['BASEDIR'].'/vendor/autoload.php';
+require $CONFIG['BASEDIR'].'/db.php';
+require $CONFIG['BASEDIR'].'/class.retro.php';
+$Retro = new GoodOldDownloads\Retro();
+
+$invalidInput = $argv[1];
+
+$list = explode("\n", file_get_contents($invalidInput));
+foreach ($list as $file) {
+ if ($file == null) {
+ continue;
+ }
+ $arr = explode('|', $file);
+ if ($arr[1] === 'Parseable') {
+ continue;
+ }
+ $data = [
+ 'name_parseable' => $arr[1],
+ 'name_original' => $arr[0],
+ 'console' => $arr[2],
+ 'dir_id' => intval($arr[3])
+ ];
+ $parseAdd = $Retro->insertNoIntro($data['name_parseable'], $data['console'], $data['dir_id'], true, [
+ 'original' => $data['name_original']
+ ]);
+
+ if(!$parseAdd){
+ var_dump($data);
+ } else {
+ $rmLog = $dbh->prepare("DELETE FROM `error_log` WHERE `name` LIKE ? AND `console` = ?");
+ $rmLog->execute([$data['name_original'].'%', $data['console']]);
+ }
+}
+
+/*$client = new \GuzzleHttp\Client(['headers' => ['User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0']]);
+foreach ($out as $rom) {
+ echo "${rom['name']}\n";
+ $res = $client->request('GET',
+ 'http://redump.org/discs/quicksearch/'.$rom["md5"].'/',
+ ['allow_redirects' => false]
+ );
+ if ($res->getStatusCode() === 302) { // If redirecting to rom page
+ preg_match('/\/disc\/([0-9]+)\//', $res->getHeader('Location')[0], $matches);
+ $redumpId = $matches[1];
+ if(updateRoms($redumpId, $rom['name'], $consoleSlug)){
+ echo "success\n";
+ } else {
+ echo "fail!\n";
+ }
+ } else {
+ if ($res->getStatusCode() !== 200) {
+ echo $res->getStatusCode();
+ die;
+ }
+ echo "Not redirected!\n";
+ }
+}
+
+function updateRoms($redumpId, $nameOrig, $console){
+ global $dbh;
+ // Set
+ $updateRom = $dbh->prepare("UPDATE `roms` SET `redump_id` = :redump_id WHERE `name_original` = :name_orig AND `console` = :console");
+ $updateRom->bindParam(':redump_id', $redumpId, \PDO::PARAM_INT);
+ $updateRom->bindParam(':name_orig', $nameOrig, \PDO::PARAM_STR);
+ $updateRom->bindParam(':console', $console, \PDO::PARAM_STR);
+ return $updateRom->execute();
+}*/
\ No newline at end of file
diff --git a/scripts/parse_nointro.php b/scripts/parse_nointro.php
new file mode 100644
index 0000000..8d8e579
--- /dev/null
+++ b/scripts/parse_nointro.php
@@ -0,0 +1,339 @@
+.
+*/
+/*
+ Parses info from https://datomatic.no-intro.org/?page=redump and inserts ids into database
+*/
+require '../config.php';
+require $CONFIG['BASEDIR'].'/vendor/autoload.php';
+require $CONFIG['BASEDIR'].'/db.php';
+
+$consoles = [
+/* [
+ 'slug' => 'n-gage',
+ 'id' =>
+ ],*/
+ [
+ 'slug' => 'adventure-vision',
+ 'id' => '5'
+ ],
+ [
+ 'slug' => 'amiga',
+ 'id' => '40'
+ ],
+ [
+ 'slug' => 'arcadia-2001',
+ 'id' => '4'
+ ],
+ [
+ 'slug' => 'atari-2600',
+ 'id' => '88'
+ ],
+ [
+ 'slug' => 'atari-5200',
+ 'id' => '1'
+ ],
+ [
+ 'slug' => 'atari-7800',
+ 'id' => '74'
+ ],
+ [
+ 'slug' => 'atari-st',
+ 'id' => '68'
+ ],
+ [
+ 'slug' => 'channel-f',
+ 'id' => '6'
+ ],
+ [
+ 'slug' => 'colecovision',
+ 'id' => '3'
+ ],
+ [
+ 'slug' => 'commodore-64',
+ 'id' => '42'
+ ],
+ [
+ 'slug' => 'commodore-64-pp',
+ 'id' => '43'
+ ],
+ [
+ 'slug' => 'commodore-64-tapes',
+ 'id' => '44'
+ ],
+ [
+ 'slug' => 'commodore-plus-4',
+ 'id' => '33'
+ ],
+ [
+ 'slug' => 'commodore-vic-20',
+ 'id' => '34'
+ ],
+ [
+ 'slug' => 'famicom',
+ 'id' => '31'
+ ],
+ [
+ 'slug' => 'game-com',
+ 'id' => '20'
+ ],
+ [
+ 'slug' => 'game-gear',
+ 'id' => '25'
+ ],
+ [
+ 'slug' => 'game-master',
+ 'id' => '8'
+ ],
+ [
+ 'slug' => 'gameboy',
+ 'id' => '46'
+ ],
+ [
+ 'slug' => 'gameboy-advance',
+ 'id' => '23'
+ ],
+ [
+ 'slug' => 'gameboy-color',
+ 'id' => '47'
+ ],
+ [
+ 'slug' => 'gp32',
+ 'id' => '58'
+ ],
+ [
+ 'slug' => 'intellivision',
+ 'id' => '105'
+ ],
+ [
+ 'slug' => 'jaguar',
+ 'id' => '2'
+ ],
+ [
+ 'slug' => 'loopy',
+ 'id' => '48'
+ ],
+ [
+ 'slug' => 'lynx',
+ 'id' => '30'
+ ],
+ [
+ 'slug' => 'msx',
+ 'id' => '10'
+ ],
+ [
+ 'slug' => 'msx2',
+ 'id' => '11'
+ ],
+ [
+ 'slug' => 'neo-geo-pocket',
+ 'id' => '35'
+ ],
+ [
+ 'slug' => 'neo-geo-pocket-color',
+ 'id' => '36'
+ ],
+ [
+ 'slug' => 'nes',
+ 'id' => '45'
+ ],
+ [
+ 'slug' => 'nintendo-64',
+ 'id' => '24'
+ ],
+ [
+ 'slug' => 'nintendo-ds',
+ 'id' => '28'
+ ],
+ [
+ 'slug' => 'nintendo-ds-download-play',
+ 'id' => '65'
+ ],
+ [
+ 'slug' => 'nintendo-dsi-dlc',
+ 'id' => '53'
+ ],
+ [
+ 'slug' => 'odyssey-2',
+ 'id' => '9'
+ ],
+ [
+ 'slug' => 'playstation-portable',
+ 'id' => '62'
+ ],
+ [
+ 'slug' => 'pokemon-mini',
+ 'id' => '14'
+ ],
+ [
+ 'slug' => 'pv-1000',
+ 'id' => '59'
+ ],
+ [
+ 'slug' => 'rca-studio-ii',
+ 'id' => '29'
+ ],
+ [
+ 'slug' => 'satellaview',
+ 'id' => '77'
+ ],
+ [
+ 'slug' => 'sega-32x',
+ 'id' => '17'
+ ],
+ [
+ 'slug' => 'sega-genesis',
+ 'id' => '32'
+ ],
+ [
+ 'slug' => 'sega-master-system',
+ 'id' => '26'
+ ],
+ [
+ 'slug' => 'sega-pico',
+ 'id' => '18'
+ ],
+ [
+ 'slug' => 'sega-sg-1000',
+ 'id' => '19'
+ ],
+ [
+ 'slug' => 'snes',
+ 'id' => '49'
+ ],
+ [
+ 'slug' => 'super-acan',
+ 'id' => '56'
+ ],
+ [
+ 'slug' => 'super-cassette-vision',
+ 'id' => '60'
+ ],
+ [
+ 'slug' => 'supergrafx',
+ 'id' => '13'
+ ],
+ [
+ 'slug' => 'turbografx-16',
+ 'id' => '12'
+ ],
+ [
+ 'slug' => 'vectrex',
+ 'id' => '7'
+ ],
+ [
+ 'slug' => 'videopac-plus',
+ 'id' => '16'
+ ],
+ [
+ 'slug' => 'virtual-boy',
+ 'id' => '15'
+ ],
+ [
+ 'slug' => 'vtech-creativision',
+ 'id' => '21'
+ ],
+ [
+ 'slug' => 'watara-supervision',
+ 'id' => '22'
+ ],
+ [
+ 'slug' => 'wonderswan',
+ 'id' => '50'
+ ],
+ [
+ 'slug' => 'wonderswan-color',
+ 'id' => '51'
+ ],
+ [
+ 'slug' => 'zx-spectrum-plus3',
+ 'id' => '73'
+ ],
+ [
+ 'slug' => 'picno',
+ 'id' => '101'
+ ],
+ [
+ 'slug' => 'v-smile',
+ 'id' => '76'
+ ]
+];
+
+foreach ($consoles as $console) {
+ $c = getNoIntro($console['id']);
+ updateRoms($c, $console['slug'], $console['id']);
+}
+
+function updateRoms($consoleArr, $console, $noIntroId){
+ global $dbh;
+ $consoleKeys = array_keys($consoleArr);
+
+ // Get
+ $roms = $dbh->prepare("SELECT `id`, `name_original` FROM `roms` WHERE `console` = :console AND ((`redump_id` IS NULL) AND (`nointro_system_id` IS NULL) AND (`nointro_id` IS NULL))");
+ $roms->bindParam(':console', $console, \PDO::PARAM_STR);
+ $roms->execute();
+ $roms = $roms->fetchAll(PDO::FETCH_ASSOC);
+
+ // Set
+ $updateRom = $dbh->prepare("UPDATE `roms` SET `nointro_system_id` = :sys_id, `nointro_id` = :noint_id WHERE `id` = :rom_id");
+ $updateRom->bindParam(':rom_id', $id, \PDO::PARAM_INT);
+ $updateRom->bindParam(':sys_id', $sys_id, \PDO::PARAM_STR);
+ $updateRom->bindParam(':noint_id', $noint_id, \PDO::PARAM_STR);
+ $fails = [];
+ foreach ($roms as $rom) {
+ if (array_key_exists($rom["name_original"], $consoleArr)) {
+ $id = $rom['id'];
+ $sys_id = $noIntroId;
+ $noint_id = $consoleArr[$rom["name_original"]];
+ $updateRom->execute();
+ } elseif (strrpos($rom["name_original"], "-")) {
+ $repalced = str_replace("-", "(-|~)", str_replace("(", "\\(", str_replace(")", "\\)", $rom["name_original"])));
+ $matched = preg_grep("/".$repalced."/", $consoleKeys);
+ if ($matched){
+ $id = $rom['id'];
+ $sys_id = $noIntroId;
+ $noint_id = $consoleArr[reset($matched)];
+ $updateRom->execute();
+ }
+ } else {
+ $fails[] = $rom["name_original"];
+ }
+ }
+
+ if (count($fails) > 0) {
+ foreach ($fails as $key => $fail) {
+ echo $fail."\n";
+ }
+ return false;
+ }
+ return true;
+}
+
+function getNoIntro($consoleId){
+ $client = new \GuzzleHttp\Client();
+ $res = $client->request('POST', 'https://datomatic.no-intro.org/index.php?page=redump&fun=download', ['form_params' => ['Download' => 'ho-ho-ho', 'datset_id' => $consoleId]]);
+ $sheet = explode("\n", $res->getBody());
+ foreach ($sheet as $row) {
+ if ($row == null) {
+ continue;
+ }
+ $split = str_getcsv($row, ';');
+ // name => id
+ $out[$split[1]] = $split[0];
+ }
+ return $out;
+}
\ No newline at end of file
diff --git a/scripts/parse_redump.php b/scripts/parse_redump.php
new file mode 100644
index 0000000..b82146c
--- /dev/null
+++ b/scripts/parse_redump.php
@@ -0,0 +1,85 @@
+.
+*/
+/*
+ Search via MD5
+ Add to Database if redirected directly to rom page
+*/
+require '../config.php';
+require $CONFIG['BASEDIR'].'/vendor/autoload.php';
+require $CONFIG['BASEDIR'].'/db.php';
+
+$md5Filename = $argv[1];
+$consoleSlug = $argv[2];
+
+$md5list = explode("\n", file_get_contents($md5Filename));
+foreach ($md5list as $file) {
+ if ($file == null) {
+ continue;
+ }
+ $split[0] = substr($file, 0, 32);
+ $split[1] = substr($file, 32);
+
+ $path = trim($split[1]);
+ $name = substr(trim($split[1]), 0, strpos(trim($split[1]), "/"));
+
+ // If path is just the filename and not in a dir
+ if ($name == null) {
+ $name = pathinfo($path)['filename'];
+ }
+
+ // name => id
+ $out[$split[0]] = [
+ 'md5' => $split[0],
+ 'path' => $path,
+ 'name' => $name
+ ];
+}
+
+$client = new \GuzzleHttp\Client(['headers' => ['User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0']]);
+foreach ($out as $rom) {
+ echo "${rom['name']}\n";
+ $res = $client->request('GET',
+ 'http://redump.org/discs/quicksearch/'.$rom["md5"].'/',
+ ['allow_redirects' => false]
+ );
+ if ($res->getStatusCode() === 302) { // If redirecting to rom page
+ preg_match('/\/disc\/([0-9]+)\//', $res->getHeader('Location')[0], $matches);
+ $redumpId = $matches[1];
+ if(updateRoms($redumpId, $rom['name'], $consoleSlug)){
+ echo "success\n";
+ } else {
+ echo "fail!\n";
+ }
+ } else {
+ if ($res->getStatusCode() !== 200) {
+ echo $res->getStatusCode();
+ die;
+ }
+ echo "Not redirected!\n";
+ }
+}
+
+function updateRoms($redumpId, $nameOrig, $console){
+ global $dbh;
+ // Set
+ $updateRom = $dbh->prepare("UPDATE `roms` SET `redump_id` = :redump_id WHERE `name_original` = :name_orig AND `console` = :console");
+ $updateRom->bindParam(':redump_id', $redumpId, \PDO::PARAM_INT);
+ $updateRom->bindParam(':name_orig', $nameOrig, \PDO::PARAM_STR);
+ $updateRom->bindParam(':console', $console, \PDO::PARAM_STR);
+ return $updateRom->execute();
+}
\ No newline at end of file
diff --git a/templates/404/mgs3.twig b/templates/404/mgs3.twig
new file mode 100644
index 0000000..28c0023
--- /dev/null
+++ b/templates/404/mgs3.twig
@@ -0,0 +1,302 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+
+
+
+
+
+
+ A Hideo Kojima 404 Page - Tactical 404 Operations - Designed by Hideo Kojima
+ {{ loadJS(['/static/js/modernizr-autoplay.js'], []) }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/404/ss2.twig b/templates/404/ss2.twig
new file mode 100644
index 0000000..dd6fca2
--- /dev/null
+++ b/templates/404/ss2.twig
@@ -0,0 +1,143 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+
+
+
+
+
+
+ re: Page Request
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/404/tekken3.twig b/templates/404/tekken3.twig
new file mode 100644
index 0000000..6b88713
--- /dev/null
+++ b/templates/404/tekken3.twig
@@ -0,0 +1,268 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+
+
+
+
+
+
+ 404 - K.O.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/404/zelda2.twig b/templates/404/zelda2.twig
new file mode 100644
index 0000000..58a885b
--- /dev/null
+++ b/templates/404/zelda2.twig
@@ -0,0 +1,197 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+
+
+
+
+
+
+ 404! RETURN OF GANON!
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/404/zerowing.twig b/templates/404/zerowing.twig
new file mode 100644
index 0000000..048b798
--- /dev/null
+++ b/templates/404/zerowing.twig
@@ -0,0 +1,155 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+
+
+
+
+
+
+ 404 - All Your Page Are Belong To Us
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/admin.twig b/templates/admin.twig
new file mode 100644
index 0000000..a27b2ea
--- /dev/null
+++ b/templates/admin.twig
@@ -0,0 +1,67 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{{ 'Admin'|trans }}{% endblock title %}
+
+{% block content %}
+
+ {% include 'top_bar.twig' %}
+
{{ 'Admin'|trans }}
+
Notice
+
+
Extra directory info
+ Directory info sent with each ROM set to the ID.
+
+
+
ID
+
Console
+
Region
+
+ {% for info in dir_info %}
+
+
{{ info.id }}
+
{{ info.console }}
+
{{ info.region }}
+
+ {% endfor %}
+
+
+
Error Log
+ ROMs that failed at parse for whatever reason.
+
Need to add in manually or fix parser.
+
+
+
Name
+
Console
+
+ {% for rom in rom_errors %}
+
+
{{ rom.name }}
+
{{ rom.console }}
+
+ {% endfor %}
+
+
+{% endblock content %}
+
+{% block scripts %}
+{% endblock scripts %}
\ No newline at end of file
diff --git a/templates/card.twig b/templates/card.twig
new file mode 100644
index 0000000..7c9df5b
--- /dev/null
+++ b/templates/card.twig
@@ -0,0 +1,75 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% macro input(rom, term = false) %}
+
+
+
+ {% for flag in rom.iso_3166_1_alpha_2|split(',') %} {# if region has a comma means multiple flags #}
+
+ {% endfor %}
+
+
+
{{ rom.name }}
+
+ {% if rom.disc %}
+ {% trans %}Disc{% endtrans %} {{ rom.disc }}
+ {% endif %}
+ {% if rom.additional %}
+
+ {% if rom.disc %}|{% endif %}
+ {{ rom.additional }}
+
+ {% endif %}
+ {% if rom.version %}
+
+ {% if rom.additional or rom.disc %}|{% endif %}
+ {{ rom.version }}
+
+ {% endif %}
+ {% if rom.devstatus %}
+
+ {% if rom.additional or rom.disc or rom.version %}|{% endif %}
+ {{ rom.devstatus }}
+
+ {% endif %}
+
+
{% spaceless %}
+ {% if rom.languages %}
+ {% set langs = rom.languages|split(',') %}
+ {% for lang in langs %}
+
+ {% endfor %}
+ {% endif %}
+ {% endspaceless %}
+
+
+ {% if rom.redump_id %}{% endif %}{% if rom.nointro_id %}{% endif %}
+ {% set console_name = rom.console_name %}
+ {% if term %}
+ {# if search page then filter by console #}
+
+
+
+ {% else %}
+ {# else, just link to console page #}
+
+
+
+ {% endif %}
+ {% if rom.votes %}
{{ rom.votes }}
{% endif %}
+
+{% endmacro %}
\ No newline at end of file
diff --git a/templates/console.twig b/templates/console.twig
new file mode 100644
index 0000000..57f99c7
--- /dev/null
+++ b/templates/console.twig
@@ -0,0 +1,47 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{{ console.name }}{% endblock title %}
+
+{% block content %}
+
+ {% include 'top_bar.twig' %}
+
{{ console.name }}
+
+
+
{% if console.description %}{{ console.description|nl2br }}{% endif %}
+ {% endif %}
+ {% for emulator in emulators %}
+ {{ emulator.name }}
+ {% endfor %}
+
+ {% endif %}
+
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/drive_tutorial.twig b/templates/drive_tutorial.twig
new file mode 100644
index 0000000..28a5ca3
--- /dev/null
+++ b/templates/drive_tutorial.twig
@@ -0,0 +1,57 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{{ 'Google Drive Quota Exceeded Bypass Tutorial'|trans }}{% endblock title %}
+
+{% block content %}
+
TL;DR: Click the arrow ( ) to open all Google Drive links -> Go to https://drive.google.com/drive/shared-with-me -> Right click and Make a Copy -> Go to My Drive to download the copied file -> Remove file and empty your trash in Google Drive after download to free up cloud storage space to continue for large games.
+
+
This tutorial will show you how to bypass the Google Drive download limit for files. This does require a Google account. You can get one for free here: https://accounts.google.com/SignUp
+
+ Please be aware: Google has implemented a user quota (or reduced) for the "Make a copy" option this tutorial uses to bypass file download quota. If your trash is empty and you recieve an error when making a copy of a file, you must create a new Google account and continue using the bypass or wait until your "Make a copy" quota resets (unknown amount of time until it resets -- it does seem to reset every day from our testing).
+
+
This is the error we want to bypass:
+
+
+
+
+
Steps to bypass:
+
+
First you must visit each Google Drive URL in your browser of the file(s) you want to make a copy of. This will make them appear in the "Shared with me" section of your Google Drive. The easiest way to do this with large games is to allow pop-ups for our site, then click the "Open all links" arrow.
+
+
Now go to https://drive.google.com/drive/shared-with-me. You will see the files we visited in the previous step which you can now click and select. If they are not listed, refresh the page and also make sure you have visited the URLs in your browser (see previous step)!
+
Next right click while your files are selected and choose MAKE A COPY from the drop down menu. DO NOT SELECT DOWNLOAD.
+ Please note that free Google accounts only have 15GB of cloud storage.
+ If a game is very large, you will have to download then remove the parts of the game you made a copy of from your Google Drive and repeat these steps (see step 7 and 8 on how to remove and delete files from your Google Drive) until you have all required files downloaded to install the game!
+
+
Next click "My Drive" found on the left hand side.
+
The items can now be found in your Google Drive.
+
Right click on the item you want to download, then select "Download" in the drop down menu.
+ For larger files, we recommend you download each one individually as Google will take time to zip the files if you select them all and try to download.
+
After your download finishes, you should remove the copies from your Google Drive to free up space in the event you need to do this bypass again (or need to copy and download additional files for larger games).
+ You can do this by selecting the copies you want to delete, then right click and select "Remove" at the bottom of the drop down menu.
+
Finally delete the copies from your trash. Click "Trash" found on the left hand side then click the "Trash" at the top and select "Empty Trash".
+
+
+{% endblock content %}
+
+{% block scripts %}
+{% endblock scripts %}
\ No newline at end of file
diff --git a/templates/fake_password.twig b/templates/fake_password.twig
new file mode 100644
index 0000000..af7653e
--- /dev/null
+++ b/templates/fake_password.twig
@@ -0,0 +1,111 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+
+
+
+
+
+
+ Retro Games | Good Old Downloads
+
+
+
+
Soon™
+
+
+
\ No newline at end of file
diff --git a/templates/faq.twig b/templates/faq.twig
new file mode 100644
index 0000000..6c23d42
--- /dev/null
+++ b/templates/faq.twig
@@ -0,0 +1,44 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{{'FAQ'|trans}}{% endblock title %}
+
+{% block content %}
+
+ {% include 'top_bar.twig' %}
+
{{'FAQ'|trans}}
+
{{'What is Retro Games?'|trans}}
+
{{'A site which automates the process of sharing verified redump/no-intro roms.'|trans}}
+
+
{{'How does it work?'|trans}}
+
{{'Simply vote for the roms you want and the site will upload them. Roms with more votes will be uploaded first.'|trans}}
+
+
{{'What if the links go down?'|trans }}
+
{{"The system saves the upload date after a rom is uploaded. You'll be able to vote for the game to be re-uploaded 60 days later. Then the cycle starts over."|trans}}
+
+
{{"Why can't I find [insert game here] or [insert system here]?"|trans}}
+
{{"We will continue to add new systems and additional games in the future. So be sure to check back!"|trans|nl2br}}
+
+
{{'How do I download or extract files?'|trans}}
+
{{ 'We recommend %jdownloader2link% for downloading and %7ziplink% for extracting files.'|trans|nl2br|replace({'%jdownloader2link%': 'JDownloader 2', '%7ziplink%': '7-Zip'})|raw }}
+
+
{{'How can I make sure the files have not been tampered with?'|trans}}
+
{{"Compare the hashes of the files with the hashes found in redump.org/No-Intro.
+ You can use a program like HashTab or HashCheck to check your files."|trans|nl2br}}
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/index.twig b/templates/index.twig
new file mode 100644
index 0000000..f9e4e6f
--- /dev/null
+++ b/templates/index.twig
@@ -0,0 +1,76 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% set currentPage = 'home' %}
+
+{% block title %}Retro Games{% endblock title %}
+
+{% block content %}
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/login.twig b/templates/login.twig
new file mode 100644
index 0000000..d5e098b
--- /dev/null
+++ b/templates/login.twig
@@ -0,0 +1,34 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{{ 'Login'|trans }}{% endblock title %}
+
+{% block content %}
+
+ {% include 'top_bar.twig' %}
+
{{ 'Login'|trans }}
+
+
+{% endblock content %}
+
+{% block scripts %}
+{% endblock scripts %}
\ No newline at end of file
diff --git a/templates/main.twig b/templates/main.twig
new file mode 100644
index 0000000..c0d341c
--- /dev/null
+++ b/templates/main.twig
@@ -0,0 +1,103 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+
+
+
+
+
+
+
+ {% block title %}{% endblock title %} | Good Old Downloads
+ {{ loadCSS(['/static/css/style.css'], []) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% block meta %}
+
+ {% endblock meta %}
+
+
+
+
+{% block content %}{% endblock content %}
+{{ loadJS(['/static/js/main.min.js'], []) }}
+{% block scripts %}{% endblock scripts %}
+
+
\ No newline at end of file
diff --git a/templates/packs.twig b/templates/packs.twig
new file mode 100644
index 0000000..a69f62a
--- /dev/null
+++ b/templates/packs.twig
@@ -0,0 +1,90 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{% trans %}ROM Packs{% endtrans %}{% endblock title %}
+
+{% block content %}
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/pagination.twig b/templates/pagination.twig
new file mode 100644
index 0000000..07f3a0b
--- /dev/null
+++ b/templates/pagination.twig
@@ -0,0 +1,96 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{# Welcome to hell #}
+{# ported from GG which was ported from SG (even worse now) #}
+{% macro input(pagination, path, adjacents = 2) %}
+ {% if pagination.page < 1 %}
+ {% set page = 1 %}
+ {% else %}
+ {% set page = pagination.page %}
+ {% endif %}
+
+ {% set lastpage = (pagination.total/pagination.limit)|round(0, 'ceil') %}
+
+ {% if lastpage <= 0 %}
+ {% set lastpage = 1 %}
+ {% endif %}
+
+ {% set prevpage = page - 1 %}
+
+ {% if page > 1 %}
+
+ {% else %}
+
+ {% endif %}
+
+ {% if lastpage < 7 + (adjacents * 2) %}
+ {% for i in 1..lastpage %}
+ {% if i == page %}
+ {{ i }}
+ {% else %}
+ {{ i }}
+ {% endif %}
+ {% endfor %}
+ {% elseif (pagination.total >= 7 + (adjacents * 2)) %} {# enough pages to hide some #}
+ {# close to beginning; only hide later pages #}
+ {% if page < 1 + (adjacents * 2) %}
+ {% for i in 1..(4 + (adjacents * 2)) %}
+ {% if i == page %}
+ {{ i }}
+ {% else %}
+ {{ i }}
+ {% endif %}
+ {% endfor %}
+ ...
+ {{ lastpage - 1 }}
+ {{ lastpage }}
+ {# in middle; hide some front and some back #}
+ {% elseif lastpage - (adjacents * 2) > page and page > (adjacents * 2) %}
+ 1
+ 2
+ ...
+ {% for i in (page - adjacents)..(page + adjacents) %}
+ {% if i == page %}
+ {{ i }}
+ {% else %}
+ {{ i }}
+ {% endif %}
+ {% endfor %}
+ ...
+ {{ lastpage - 1 }}
+ {{ lastpage }}
+ {% else %}
+ {# close to end; only hide early pages #}
+ 1
+ 2
+ ...
+ {% for i in (lastpage - (2 + (adjacents * 2)))..lastpage %}
+ {% if i == page %}
+ {{ i }}
+ {% else %}
+ {{ i }}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endif %}
+ {% if page < lastpage %}
+
+ {% else %}
+
+ {% endif %}
+
+{% endmacro %}
\ No newline at end of file
diff --git a/templates/queue.twig b/templates/queue.twig
new file mode 100644
index 0000000..87401ca
--- /dev/null
+++ b/templates/queue.twig
@@ -0,0 +1,47 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{{'Queue'|trans}}{% endblock title %}
+
+{% block content %}
+{% import "card.twig" as card %}
+{% import "pagination.twig" as pager %}
+
+ {% include 'top_bar.twig' %}
+
{{'Queue'|trans}}
+ {% if uploading is not empty %}
+
{{'Currently Uploading'|trans}}
+
+ {% for rom in uploading %}
+ {{ card.input(rom) }}
+ {% endfor %}
+
+ {% endif %}
+ {% if votes is not empty %}
+ {{ pager.input(pagination, '/queue') }}
+
{{'Up Next'|trans}}
+
{{'Votes'|trans}}
+
+ {% for rom in votes %}
+ {{ card.input(rom) }}
+ {% endfor %}
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/rom.twig b/templates/rom.twig
new file mode 100644
index 0000000..d75aa61
--- /dev/null
+++ b/templates/rom.twig
@@ -0,0 +1,106 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{{ rom.name }} ROM for {{ console.name }}{% endblock title %}
+
+{% block content %}
+
+ {% include 'top_bar.twig' %}
+
+
+
{{ rom.name }} {% if rom.disc %}({% trans %}Disc{% endtrans %} {{ rom.disc }}){% endif %}
+ {% if rom.additional %}{{ rom.additional }}{% endif %}
+
+
+ {% if rom.redump_id %}{% endif %}
+ {% if rom.nointro_id %}{% endif %}
+
+
+ {% if has_boxart %}{% endif %}
+
+
{% trans %}Region{% endtrans %}
+
+ {% for flag in rom.iso_3166_1_alpha_2|split(',') %} {# if region has a comma means multiple flags #}
+
+ {% endfor %}
+
+
{% endif %}
+ {% if rom.languages %}
+ {% set langs = rom.languages|split(',') %}
+
+ {% trans %}Languages{% endtrans %}
+
+ {% for lang in langs %}
+
+ {% endfor %}
+
+
+ {% endif %}
+ {% if rom.devstatus %}
{% trans %}Dev Status{% endtrans %}{{ rom.devstatus }}
{% endif %}
+ {% if rom.additional %}
{% trans %}Edition{% endtrans %}{{ rom.additional }}
{% endif %}
+
{% trans %}Original Name{% endtrans %}{{ rom.name_original }}
+
+
+
+
+
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/search.twig b/templates/search.twig
new file mode 100644
index 0000000..d784f56
--- /dev/null
+++ b/templates/search.twig
@@ -0,0 +1,42 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% extends 'main.twig' %}
+
+{% block title %}{% if term is not empty %}{{ term }}{% elseif console.name is not empty %}{{ console.name }}{% else %}{% trans %}All Consoles{% endtrans %}{% endif %}{% endblock title %}
+
+{% block content %}
+{% import "card.twig" as card %}
+{% import "pagination.twig" as pager %}
+
+ {% include 'top_bar.twig' %}
+
+ {# Must do this after top_bar #}
+ {% if pagination.term is empty %}
+ {% set term = 'all' %}
+ {% else %}
+ {% set term = pagination.term %}
+ {% endif %}
+
+ {{ pager.input(pagination, '/search/' ~ pagination.console ~ '/' ~ term ~ '/' ~ pagination.region) }}
+
+ {% for rom in roms %}
+ {{ card.input(rom, term) }}
+ {% endfor %}
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/top_bar.twig b/templates/top_bar.twig
new file mode 100644
index 0000000..e538450
--- /dev/null
+++ b/templates/top_bar.twig
@@ -0,0 +1,63 @@
+{#
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+#}
+{% set baseUrl = base_url()|replace({'http://': '', 'https://': ''}) %}
+{% if base_url()|slice(0, 5) == "http:" %}
+ {% set urlScheme = "http://" %}
+{% elseif base_url()|slice(0, 5) == "https" %}
+ {% set urlScheme = "https://" %}
+{% endif %}
+
\ No newline at end of file
diff --git a/twig.ext.php b/twig.ext.php
new file mode 100644
index 0000000..633f608
--- /dev/null
+++ b/twig.ext.php
@@ -0,0 +1,85 @@
+.
+*/
+class AppExtension extends \Twig_Extension implements Twig_Extension_GlobalsInterface{
+ public function getFunctions(){
+ return array(
+ new \Twig_SimpleFunction('loadCSS', array($this, 'loadCSS'), array('is_safe' => array('html'))),
+ new \Twig_SimpleFunction('loadJS', array($this, 'loadJS'), array('is_safe' => array('html'))),
+ );
+ }
+
+ public function getFilters(){
+ return array(
+ new \Twig_SimpleFilter('long2ip', array($this, 'long2ip')),
+ new \Twig_SimpleFilter('convertBytes', array($this, 'convertBytes')),
+ );
+ }
+
+ public function long2ip($int){
+ return long2ip($int);
+ }
+
+ public function convertBytes($bytes, $decimals = 2){
+ // Jeffrey Sambells
+ // http://jeffreysambells.com/2012/10/25/human-readable-filesize-php
+ $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');
+ $factor = floor((strlen($bytes) - 1) / 3);
+ return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor];
+ }
+
+ public function loadCSS($styles, $integrity = null){
+ $ret = array();
+ if (is_array($styles)) {
+ foreach ($styles as $key => $value) {
+ if ($integrity !== null) {
+ if (!empty($integrity[$key])) {
+ $integStr = ' integrity="'.$integrity[$key].'"';
+ } else {
+ $integStr = '';
+ }
+ }
+ if (file_exists(__DIR__.'/web/'.$value)) {
+ $ret[] = '';
+ }
+ }
+ }
+ return join($ret, "\n");
+ }
+ public function loadJS($scripts, $integrity = null){
+ $ret = array();
+ if (is_array($scripts)) {
+ foreach ($scripts as $key => $value) {
+ if ($integrity !== null) {
+ if (!empty($integrity[$key])) {
+ $integStr = ' integrity="'.$integrity[$key].'"';
+ } else {
+ $integStr = '';
+ }
+ }
+ if (file_exists(__DIR__.'/web/'.$value)) {
+ $ret[] = '';
+ }
+ }
+ }
+ return join($ret, "\n");
+ }
+ public function getGlobals()
+ {
+ return [];
+ }
+}
\ No newline at end of file
diff --git a/web/dependencies.php b/web/dependencies.php
new file mode 100644
index 0000000..757d1a2
--- /dev/null
+++ b/web/dependencies.php
@@ -0,0 +1,71 @@
+.
+*/
+
+// TODO: Move these properly
+
+$container['visualCaptcha'] = function ($container) {
+ global $CONFIG;
+ $session = new \visualCaptcha\Session();
+ require $CONFIG['BASEDIR'].'/captcha/images.php';
+ return new \visualCaptcha\Captcha($session, "{$CONFIG['BASEDIR']}/captcha", $captchaImages);
+};
+
+$container['memcached'] = function ($container) {
+ global $Memcached;
+ return $Memcached;
+};
+
+$container['site_config'] = function ($container) {
+ global $CONFIG;
+ return $CONFIG;
+};
+
+$container['dbh'] = function($container) {
+ global $dbh;
+ return $dbh;
+};
+
+// Register component on container
+$container['view'] = function ($container) {
+ $CONFIG = $container->get('site_config');
+ $view = new \Slim\Views\Twig("{$CONFIG['BASEDIR']}/templates", [
+ 'cache' => ($CONFIG['DEV'] ? false : "{$CONFIG['BASEDIR']}/twig_cache")
+ ]);
+ $twig = $view->getEnvironment();
+
+ // Add extensions
+ $uri = \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER));
+ $view->addExtension(new \Slim\Views\TwigExtension($container->get('router'), $uri->withPort(null)));
+
+ $twig->addExtension(new Twig_Extensions_Extension_I18n());
+ $twig->addExtension(new AppExtension());
+ $twig->addGlobal('config', $CONFIG);
+ $twig->addGlobal('session', $_SESSION);
+
+ $twig->addGlobal('nonce', ['script' => $nonceJS]);
+ $twig->addGlobal('was_user', isset($_COOKIE['was_user']));
+
+ return $view;
+};
+
+$container['notFoundHandler'] = function ($container) {
+ return function ($request, $response) use ($container) {
+ $notFoundTemplates = ['/404/mgs3.twig', '/404/zelda2.twig', '/404/ss2.twig', '/404/tekken3.twig', '/404/zerowing.twig'];
+ return $container->view->render($response->withStatus(404), $notFoundTemplates[array_rand($notFoundTemplates)]);
+ };
+};
\ No newline at end of file
diff --git a/web/index.php b/web/index.php
new file mode 100644
index 0000000..bfbc5c7
--- /dev/null
+++ b/web/index.php
@@ -0,0 +1,44 @@
+.
+*/
+require '../config.php';
+require $CONFIG['BASEDIR'].'/vendor/autoload.php';
+require $CONFIG['BASEDIR'].'/memcached.php';
+require $CONFIG['BASEDIR'].'/db.php';
+require $CONFIG['BASEDIR'].'/class.retro.php';
+require $CONFIG['BASEDIR'].'/twig.ext.php';
+
+session_start();
+
+$configuration = [
+ 'settings' => [
+ 'displayErrorDetails' => $CONFIG["DEV"],
+ ],
+];
+$container = new \Slim\Container($configuration);
+$app = new \Slim\App($container);
+
+require 'middleware.php';
+
+require 'dependencies.php';
+
+require 'routes_api.php';
+
+require 'routes.php';
+
+// Run, Forrest, Run!
+$app->run();
\ No newline at end of file
diff --git a/web/middleware.php b/web/middleware.php
new file mode 100644
index 0000000..403258c
--- /dev/null
+++ b/web/middleware.php
@@ -0,0 +1,180 @@
+.
+*/
+$app->add(new RKA\Middleware\IpAddress(false));
+
+// Remove slashes
+$app->add(function ($request, $response, callable $next) {
+ $uri = $request->getUri();
+ $path = $uri->getPath();
+ if ($path != '/' && substr($path, -1) == '/') {
+ $uri = $uri->withPath(substr($path, 0, -1))->withPort(null);
+ if ($request->getMethod() == 'GET') {
+ return $response->withRedirect((string)$uri, 301);
+ } else {
+ return $next($request->withUri($uri), $response);
+ }
+ }
+ return $next($request, $response);
+});
+
+if (date('U') < 1541257190) {
+ // Shitty password protection
+ $app->add(function ($request, $response, $next) {
+ if (preg_match('/^\/api\//', $request->getUri()->getPath())){
+ $response = $next($request, $response);
+ return $response;
+ }
+ if (preg_match('/^\/404/', $request->getUri()->getPath())){
+ throw new \Slim\Exception\NotFoundException($request, $response);
+ }
+ if ($request->getUri()->getQuery() === "cestlavie") {
+ setcookie("brittlebones", "uw#-wq]v>8efKn", time()+(1 * 24 * 60 * 60));
+ $response = $next($request, $response);
+ return $response;
+ }
+ if ($_COOKIE["brittlebones"] === "uw#-wq]v>8efKn") {
+ $response = $next($request, $response);
+ return $response;
+ }
+ $view = $this->get('view');
+ return $view->render($response, 'fake_password.twig');
+ });
+}
+
+// Set headers for all requests
+$app->add(function ($request, $response, $next) {
+ $nonceJS = base64_encode(random_bytes(24));
+ $nonceCSS = base64_encode(random_bytes(24));
+ // A little more loose for 404 pages, should have seperate CORS for 404 and the rest of the site.
+ $CORS = "default-src *; script-src 'self' 'unsafe-inline' https://www.youtube.com; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-ancestors 'none'; base-uri 'self'; connect-src 'self'; img-src 'self'";
+
+ // Add global variable to Twig
+/* $view = $this->get('view');
+ $view->getEnvironment()->addGlobal('nonce', ['script' => $nonceJS, 'style' => $nonceCSS]);*/
+
+ $response = $next($request, $response);
+ return $response
+ ->withHeader('Content-Security-Policy', $CORS)
+ ->withHeader('X-Content-Security-Policy', $CORS)
+ ->withHeader('X-WebKit-CSP', $CORS)
+ ->withHeader('Referrer-Policy', 'no-referrer')
+ ->withHeader('X-My-Body-Is-Ready', "https://www.youtube.com/watch?v=l4UmHKTX9H4");
+});
+
+// Need list of console always loaded in
+$app->add(function ($request, $response, $next) {
+ $Memcached = $this->get('memcached');
+ $consoleList = $Memcached->get('rg_console_list');
+ if ($consoleList === false) {
+ $dbh = $this->get('dbh');
+ $consoles = $dbh->prepare("SELECT * FROM `consoles` ORDER BY `name` ASC");
+ $consoles->execute();
+ $consoleList = $consoles->fetchAll(PDO::FETCH_ASSOC);
+ $Memcached->set('rg_console_list', $consoleList, 900);
+ }
+
+ // Add global variable to Twig
+ $view = $this->get('view');
+ $view->getEnvironment()->addGlobal('consoles', $consoleList);
+
+ $response = $next($request, $response);
+ return $response;
+});
+
+// Set theme
+$app->add(function ($request, $response, $next) {
+ $CONFIG = $this->get('site_config');
+ $allowedThemes = ['dark', 'light'];
+
+ if (isset($_POST['settheme'])) {
+ if (isset($_POST['settheme']) && in_array($_POST['settheme'], $allowedThemes)) {
+ setcookie('theme', $_POST['settheme'], time()+60*60*24*365, '/', $request->getUri()->getHost(), ($CONFIG["DEV"] ? false : true), true);
+ $_COOKIE['theme'] = $_POST['settheme']; // For current
+ } else {
+ unset($_COOKIE['theme']);
+ setcookie('theme', '', -1, '/', $request->getUri()->getHost());
+ }
+ }
+
+ // Add global variable to Twig
+ $view = $this->get('view');
+ if (isset($_COOKIE["theme"]) && in_array($_COOKIE["theme"], $allowedThemes)) {
+ $view->getEnvironment()->addGlobal('theme', $_COOKIE["theme"]);
+ } else {
+ $view->getEnvironment()->addGlobal('theme', 'light');
+ }
+
+ $response = $next($request, $response);
+ if (isset($_POST['settheme'])) {
+ return $response->withRedirect((string)$request->getUri()->withPort(null), 302);
+ }
+ return $response;
+});
+
+// Set language
+$app->add(function ($request, $response, $next) {
+ $CONFIG = $this->get('site_config');
+ $allowedLanguages = [
+ 'de_DE' => [
+ 'ISO-639-1' => 'de'
+ ],
+ 'ru_RU' => [
+ 'ISO-639-1' => 'ru'
+ ],
+ 'el_GR' => [
+ 'ISO-639-1' => 'el'
+ ],
+ 'en_CA' => [
+ 'ISO-639-1' => 'en'
+ ]
+ ];
+
+ if (isset($_POST['setlang'])) {
+ if (isset($_POST['setlang']) && isset($allowedLanguages[$_POST['setlang']])) { // isset() is faster than in_array()
+ setcookie('language', $_POST['setlang'], time()+60*60*24*365, '/', $request->getUri()->getHost(), ($CONFIG["DEV"] ? false : true), true);
+ $_COOKIE["language"] = $_POST['setlang']; // For current
+ } else {
+ unset($_COOKIE["language"]);
+ setcookie('language', '', -1, '/', $request->getUri()->getHost());
+ }
+ }
+
+ $language = null;
+ if (isset($_COOKIE["language"]) && isset($allowedLanguages[$_COOKIE["language"]])) {
+ $language = $_COOKIE["language"];
+ putenv("LC_ALL=$language");
+ setlocale(LC_ALL, $language);
+ bindtextdomain('messages', '../locale');
+ bind_textdomain_codeset('messages', 'UTF-8');
+ textdomain('messages');
+ }
+
+ // Add global variable to Twig
+ $view = $this->get('view');
+ if ($language !== null) {
+ $view->getEnvironment()->addGlobal('language', $allowedLanguages[$language]);
+ } else {
+ $view->getEnvironment()->addGlobal('language', ['ISO-639-1' => 'en']);
+ }
+
+ $response = $next($request, $response);
+ if (isset($_POST['setlang'])) {
+ return $response->withRedirect((string)$request->getUri()->withPort(null), 302);
+ }
+ return $response;
+});
\ No newline at end of file
diff --git a/web/opensearch.xml b/web/opensearch.xml
new file mode 100644
index 0000000..5f95a50
--- /dev/null
+++ b/web/opensearch.xml
@@ -0,0 +1,9 @@
+
+
+ Retro Games Search
+ Search for Retro games on Good Old Downloads
+
+ https://retrogames.goodolddownloads.com/static/img/favicon-16.png
+ UTF-8
+ https://retrogames.goodolddownloads.com/
+
\ No newline at end of file
diff --git a/web/routes.php b/web/routes.php
new file mode 100644
index 0000000..62c1af0
--- /dev/null
+++ b/web/routes.php
@@ -0,0 +1,387 @@
+.
+*/
+$app->get('/', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ // Notice
+ $notice = $dbh->prepare("SELECT `value` FROM `site` WHERE `name` = 'notice'");
+ $notice->execute();
+ $notice = $notice->fetchColumn();
+ return $this->view->render($response, 'index.twig', ['notice' => $notice, 'page_name' => 'index']);
+})->setName('index');
+
+$app->get('/'.$CONFIG['LOGIN_PATH'], function ($request, $response, $args) {
+ return $this->view->render($response, 'login.twig');
+});
+
+$app->post('/'.$CONFIG['LOGIN_PATH'], function ($request, $response, $args) {
+ $CONFIG = $this->get('site_config');
+ if ($request->getParam('login')) {
+ if (($CONFIG["USER"]["NAME"] === $request->getParam('username')) && ($CONFIG["USER"]["PASS"] === $request->getParam('password'))) {
+ $_SESSION['user'] = $CONFIG["USER"]["PASS"];
+ setcookie("was_user", "1", 2147483647, '/');
+ return $response->withRedirect('/admin');
+ }
+ }
+ return $this->view->render($response, 'login.twig');
+});
+
+$app->get('/admin', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $CONFIG = $this->get('site_config');
+ if ($_SESSION['user'] !== $CONFIG["USER"]["PASS"]) {
+ $notFoundHandler = $this['notFoundHandler'];
+ return $notFoundHandler($request, $response);
+ }
+ // Get directory_info
+ $dirInfo = $dbh->prepare("SELECT * FROM `directory_info` ORDER BY `id` ASC");
+ $dirInfo->execute();
+ $dirInfo = $dirInfo->fetchAll(\PDO::FETCH_ASSOC);
+
+ // ROM Errors
+ $romErrors = $dbh->prepare("SELECT * FROM `error_log`");
+ $romErrors->execute();
+ $romErrors = $romErrors->fetchAll(\PDO::FETCH_ASSOC);
+
+ // Notice
+ $notice = $dbh->prepare("SELECT `value` FROM `site` WHERE `name` = 'notice'");
+ $notice->execute();
+ $notice = $notice->fetchColumn();
+
+ return $this->view->render($response, 'admin.twig', [
+ 'notice' => $notice,
+ 'dir_info' => $dirInfo,
+ 'rom_errors' => $romErrors
+ ]);
+});
+
+$app->post('/admin', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $Retro = new GoodOldDownloads\Retro();
+ $CONFIG = $this->get('site_config');
+ if ($_SESSION['user'] !== $CONFIG["USER"]["PASS"]) {
+ $notFoundHandler = $this['notFoundHandler'];
+ return $notFoundHandler($request, $response);
+ }
+
+ if ($request->getParam('reparse') == true) {
+ set_time_limit(300);
+ // Get rom info
+ $getRoms = $dbh->prepare("SELECT `id`, `name_original`, `console`, `dir_info_id` FROM `roms`");
+ $getRoms->execute();
+ $roms = $getRoms->fetchAll(\PDO::FETCH_ASSOC);
+
+ foreach ($roms as $rom) {
+ $Retro->insertNoIntro($rom['name_original'], $rom['console'], $rom['dir_info_id'], true);
+ }
+ }
+
+ if ($request->getParam('save_notice') == true) {
+ // Get rom info
+ $setNotice = $dbh->prepare("INSERT INTO `site` (`name`, `value`) VALUES ('notice', :notice) ON DUPLICATE KEY UPDATE `value` = :notice");
+ $setNotice->bindParam(':notice', $request->getParam('notice_text'), \PDO::PARAM_STR);
+ $setNotice->execute();
+ }
+ return $response->withRedirect('/admin');
+});
+
+$app->get('/google-drive-bypass-tutorial', function ($request, $response, $args) {
+ return $this->view->render($response, 'drive_tutorial.twig');
+});
+
+$app->get('/faq', function ($request, $response, $args) {
+ return $this->view->render($response, 'faq.twig');
+});
+
+$app->get('/packs', function ($request, $response, $args) {
+ return $this->view->render($response, 'packs.twig');
+});
+
+$app->get('/queue[/{page}]', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $ipAddress = $request->getAttribute('ip_address');
+
+ $getUploading = $dbh->prepare("
+ SELECT `nointro_id`, `nointro_system_id`, `redump_id`, `region`, `iso_3166_1_alpha_2`, R.`name` as `name`, `name_original`, R.`slug`, `version`, `additional`, `disc`, `devstatus`, `languages`, `console` as `console_slug`, C.`name` as `console_name`, C.`image` as `console_image`
+ FROM `roms` R
+ JOIN `consoles` C ON R.`console` = C.`slug`
+ JOIN `regions` RE ON R.`region` = RE.`name`
+ WHERE `uploading` = 1
+ ");
+ $getUploading->execute();
+ $uploading = $getUploading->fetchAll(PDO::FETCH_ASSOC);
+
+ $limit = 15;
+ $pageCurrent = intval($args['page']);
+ if ($pageCurrent < 1) {
+ $pageCurrent = 1;
+ $offset = 0;
+ } else {
+ $offset = ($pageCurrent - 1) * $limit;
+ }
+
+ $getVoted = $dbh->prepare("
+ SELECT COUNT(`rom_id`) as `votes`, `nointro_id`, `nointro_system_id`, `redump_id`, `region`, `iso_3166_1_alpha_2`, R.`name` as `name`, `name_original`, R.`slug`, `version`, `additional`, `disc`, `devstatus`, `languages`, `console` as `console_slug`, C.`name` as `console_name`, C.`image` as `console_image`
+ FROM `votes` V
+ JOIN `roms` R ON V.`rom_id` = R.`id`
+ JOIN `consoles` C ON R.`console` = C.`slug`
+ JOIN `regions` RE ON R.`region` = RE.`name`
+ WHERE `uploading` = 0
+ GROUP BY V.`rom_id`
+ ORDER BY `votes` DESC, V.`rom_id` DESC
+ LIMIT $offset, $limit
+ ");
+ $getVoted->execute();
+ $votes = $getVoted->fetchAll(\PDO::FETCH_ASSOC);
+
+ $voteCount = $dbh->prepare("
+ SELECT COUNT(`rom_id`) as `count`
+ FROM `votes` V
+ JOIN `roms` R ON V.`rom_id` = R.`id`
+ WHERE `uploading` = 0
+ GROUP BY `rom_id`
+ ");
+ $voteCount->execute();
+ $countTotal = $voteCount->rowCount();
+
+ return $this->view->render($response, 'queue.twig', ['uploading' => $uploading, 'votes' => $votes, 'pagination' => [
+ 'total' => $countTotal,
+ 'page' => $pageCurrent,
+ 'offset' => $offset,
+ 'limit' => $limit
+ ]]);
+});
+
+$app->get('/search[/{console}[/{term}[/{region}[/{page}]]]]', function ($request, $response, $args) {
+ $CONFIG = $this->get('site_config');
+ $dbh = $this->get('dbh');
+
+ // Turn params into proper search (JS disabled)
+ if ($request->getParam('t') !== null) {
+ $term = $request->getParam('t');
+ } else {
+ $term = $args['term'];
+ }
+ if ($request->getParam('c') !== null) {
+ $consoleStr = $request->getParam('c');
+ } else {
+ $consoleStr = $args['console'];
+ }
+ if ($request->getParam('r') !== null) {
+ $region = $request->getParam('r');
+ } else {
+ $region = $args['region'];
+ }
+
+ $allowedRegions = ['europe', 'asia', 'america'];
+ if (!in_array($region, $allowedRegions)) {
+ $region = 'any';
+ }
+
+ $consoleStr = trim($consoleStr);
+ $term = trim($term);
+ if ($term === 'all') {
+ $term = '';
+ }
+
+ $limit = 15;
+
+ $pageCurrent = intval($args['page']);
+
+ // In case page is less than first page
+ if ($pageCurrent < 1) {
+ $pageCurrent = 1;
+ $offset = 0;
+ } else {
+ $offset = ($pageCurrent - 1) * $limit;
+ }
+
+ if ($consoleStr !== 'all') {
+ $console = $dbh->prepare("SELECT * FROM `consoles` WHERE `slug` = :slug");
+ $console->bindParam(':slug', $consoleStr, \PDO::PARAM_STR);
+ $console->execute();
+ $console = $console->fetch(PDO::FETCH_ASSOC);
+ if (!$console) {
+ $notFoundHandler = $this['notFoundHandler'];
+ return $notFoundHandler($request, $response);
+ }
+ }
+
+ $searchQuery = "
+ SELECT `nointro_id`, `nointro_system_id`, `redump_id`, `region`, `iso_3166_1_alpha_2`, R.`name` as `name`, `name_original`, R.`slug`, `version`, `additional`, `disc`, `devstatus`, `languages`, `console` as `console_slug`, C.`name` as `console_name`, C.`image` as `console_image`
+ ";
+ if ($term !== "") {
+ $searchQuery .= ",
+ CASE WHEN R.`name` = :term THEN 1 ELSE 0 END AS score,
+ MATCH (R.`name`,`additional`) AGAINST (:term) as score2";
+ }
+ $searchQuery .= " FROM `roms` R
+ JOIN `consoles` C ON R.`console` = C.`slug`
+ JOIN `regions` RE ON R.`region` = RE.`name`";
+ if ($term !== "") {
+ $searchQuery .= " WHERE MATCH (R.`name`,`additional`) AGAINST (:term) > 0";
+ }
+ if ($consoleStr !== 'all') {
+ $searchQuery .= " AND `console` = :console";
+ }
+ if ($region !== null) {
+ // wtf store this properly
+ $europe = ["Unknown", "USA, Europe", "USA, Australia", "UK", "Sweden", "Spain", "Scandinavia", "Russia", "Portugal", "Poland", "Norway", "Netherlands", "Japan, Europe", "Italy", "Ireland", "Hungary", "Greece", "Germany", "France", "Finland", "Europe, Australia", "Europe", "Denmark", "Crotia", "Brazil, Korea", "Brasil", "Brazil,", "Austria", "Australia", "Asia, Europe", "Argentina", "France, Spain", "USA, Europe, Brazil", "Europe, Brazil", "Japan, Europe, Brazi", "USA, Europe, Korea", "Japan, USA, Korea", "Europe, Asia", "Brazil, Portugal", "Japan, Europe, Brazil", "Europe, Canada", "Czech", "Brazil, Spain", "Belgium", "Belgium, Netherlands", "Switzerland", "South Africa", "Austria, Switzerland"];
+ $america = ["Unknown", "USA, Korea", "USA, Japan", "USA, Europe", "USA, Brazil", "USA, Australia", "USA, Asia", "USA", "Latin America", "Japan, USA", "Canada", "USA, Europe, Brazil", "Japan, USA, Brazil", "Japan, Brazil", "USA, Europe, Korea", "Europe, Korea", "USA, Asia, Korea", "Europe, Canada"];
+ $asia = ["Unknown", "USA, Korea", "USA, Japan", "USA, Asia", "Taiwan", "Korea", "Japan, USA", "Japan, Korea", "Japan, Europe", "Japan, Asia", "Japan", "Hong Kong", "China", "Brazil, Korea", "Asia, Europe", "Asia", "India", "Japan, USA, Brazil", "Japan, Europe, Brazi", "Japan, Brazil", "USA, Europe, Korea", "Asia, Korea", "Japan, Korea, Asia", "Japan, USA, Korea", "Europe, Korea", "Europe, Asia", "USA, Asia, Korea", "Japan, Hong Kong", "Japan, Europe, Brazil"];
+ $searchBy = ['europe' => $europe, 'america' => $america, 'asia' => $asia];
+ if (in_array($region, $allowedRegions)) {
+ $searchQuery .= ' AND ((`region` = "'.join('") OR (`region` = "', $searchBy[$region]).'"))';
+ }
+ }
+ if ($term !== "") {
+ $searchQuery .= " ORDER BY `score` DESC, score2 DESC";
+ } else {
+ $searchQuery .= " ORDER BY `name` ASC";
+ }
+
+ // Count first before adding LIMIT
+ $countQuery = "SELECT COUNT(*) FROM `roms` R ";
+
+ // If specific console and term
+ if ($consoleStr !== 'all' && $term !== "") {
+ $countQuery .= " WHERE MATCH (R.`name`,`additional`) AGAINST (:term) > 0 AND `console` = :console";
+ } else if ($consoleStr !== 'all' && $term === "") {
+ // If specific console and no term
+ $countQuery .= " WHERE `console` = :console";
+ } else if ($consoleStr === 'all' && $term !== "") {
+ // If both are filled
+ $countQuery .= " WHERE MATCH (R.`name`,`additional`) AGAINST (:term) > 0";
+ }
+ if (in_array($region, $allowedRegions)) {
+ $countQuery .= ' AND ((`region` = "'.join('") OR (`region` = "', $searchBy[$region]).'"))';
+ }
+
+ $romCount = $dbh->prepare($countQuery);
+ if ($consoleStr !== 'all') {
+ $romCount->bindParam(':console', $consoleStr, \PDO::PARAM_STR);
+ }
+ if ($term !== "") {
+ $romCount->bindParam(':term', $term, \PDO::PARAM_STR);
+ }
+ $romCount->execute();
+ $countTotal = intval($romCount->fetchColumn());
+
+ // Add limit and reuse query for actual search
+ $searchQuery .= " LIMIT $offset, $limit";
+ $roms = $dbh->prepare($searchQuery);
+ if ($consoleStr !== 'all') {
+ $roms->bindParam(':console', $consoleStr, \PDO::PARAM_STR);
+ }
+ if ($term !== "") {
+ $roms->bindParam(':term', $term, \PDO::PARAM_STR);
+ }
+ $roms->execute();
+ $roms = $roms->fetchAll(\PDO::FETCH_ASSOC);
+
+ return $this->view->render($response, 'search.twig', [
+ 'console' => $console,
+ 'roms' => $roms,
+ 'term' => $term,
+ 'region' => $region,
+ 'pagination' => [
+ 'total' => $countTotal,
+ 'page' => $pageCurrent,
+ 'offset' => $offset,
+ 'limit' => $limit,
+ 'term' => $term,
+ 'console' => $consoleStr,
+ 'region' => $region
+ ]
+ ]);
+});
+
+$app->get('/{console}', function ($request, $response, $args) {
+ $CONFIG = $this->get('site_config');
+ $dbh = $this->get('dbh');
+
+ // Get console info
+ $console = $dbh->prepare("SELECT * FROM `consoles` WHERE `slug` = :slug");
+ $console->bindParam(':slug', $args['console'], \PDO::PARAM_STR);
+ $console->execute();
+ $console = $console->fetch(\PDO::FETCH_ASSOC);
+ if ($console) {
+ // Get emulators
+ $emulators = $dbh->prepare("SELECT * FROM `consoles_emulators` CE
+ JOIN `emulators` E
+ ON CE.`emulator_id` = E.`id`
+ WHERE `console_id` = :console_id");
+ $emulators->bindParam(':console_id', $console['id'], \PDO::PARAM_INT);
+ $emulators->execute();
+ $emulators = $emulators->fetchAll(\PDO::FETCH_ASSOC);
+ return $this->view->render($response, 'console.twig', ['console' => $console, 'emulators' => $emulators, 'page_name' => 'console']);
+ } else {
+ throw new \Slim\Exception\NotFoundException($request, $response);
+ }
+});
+
+$app->get('/{console}/{slug}', function ($request, $response, $args) {
+ $CONFIG = $this->get('site_config');
+ $dbh = $this->get('dbh');
+ $rom = $dbh->prepare("SELECT roms.*, `iso_3166_1_alpha_2` FROM `roms` JOIN `regions` ON roms.`region` = regions.`name` WHERE `slug` = :slug AND `console` = :slug_console");
+ $rom->bindParam(':slug', $args['slug'], \PDO::PARAM_STR);
+ $rom->bindParam(':slug_console', $args['console'], \PDO::PARAM_STR);
+ $rom->execute();
+ $rom = $rom->fetch(PDO::FETCH_ASSOC);
+ if (!$rom) {
+ $notFoundHandler = $this['notFoundHandler'];
+ return $notFoundHandler($request, $response);
+ }
+ // Get console info
+ $console = $dbh->prepare("SELECT * FROM `consoles` WHERE `slug` = :slug_console");
+ $console->bindParam(':slug_console', $rom['console'], \PDO::PARAM_STR);
+ $console->execute();
+ $console = $console->fetch(PDO::FETCH_ASSOC);
+
+ // Get links
+ $links = $dbh->prepare("SELECT
+ IF(links.`file_name` IS NULL, IF(`link_safe` IS NULL, `link`, `link_safe`), links.`file_name`) as `name`,
+ IF(`link_safe` IS NULL, `link`, `link_safe`) as `link`,
+ `host`,
+ hosters.`name` as `host_name`,
+ `icon_html`
+ FROM `links`
+ LEFT JOIN `hosters`
+ ON links.`host` = hosters.`id`
+ WHERE links.rom_id = :rom_id
+ ORDER BY hosters.`order` ASC, `name` ASC
+ ");
+ $links->bindParam(':rom_id', $rom['id'], \PDO::PARAM_INT);
+ $links->execute();
+ $linkresults = $links->fetchAll(PDO::FETCH_ASSOC);
+
+ $linklist = [];
+ foreach ($linkresults as $key => $link) {
+ $newitem = [];
+ $newitem['name'] = $link['name'];
+ $newitem['link'] = $link['link'];
+ $linklist[$link['host']]['slug'] = $link['host'];
+ $linklist[$link['host']]['name'] = $link['host_name'];
+ $linklist[$link['host']]['icon'] = $link['icon_html'];
+ $linklist[$link['host']]['links'][] = $newitem;
+ }
+ $hasBoxart = false;
+ if (file_exists($CONFIG["BASEDIR"].'/web/static/img/roms/'.$console['slug'].'/'.$rom['name_original'].'.png')) {
+ $hasBoxart = true;
+ }
+ return $this->view->render($response, 'rom.twig', ['rom' => $rom, 'console' => $console, 'links' => $linklist, 'has_boxart' => $hasBoxart]);
+});
\ No newline at end of file
diff --git a/web/routes_api.php b/web/routes_api.php
new file mode 100644
index 0000000..ffb582d
--- /dev/null
+++ b/web/routes_api.php
@@ -0,0 +1,324 @@
+.
+*/
+/*
+ Private
+*/
+$checkApiKey = function($request, $response, $next) {
+ $CONFIG = $this->get('site_config');
+ if ($request->hasHeader('HTTP_X_API_KEY')) {
+ $key = $request->getHeader("HTTP_X_API_KEY")[0];
+ if ($CONFIG["USER"]["KEY"] === $key) {
+ return $next($request, $response);
+ }
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Invalid API key"], 500);
+ } else {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "API key not set"], 400);
+ }
+};
+
+$app->group('/api', function () {
+ $this->post('/rom/preupload', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $name = $request->getParam('name');
+ $console = $request->getParam('console');
+
+ if (!$name || !$console) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Insufficient params."]);
+ }
+
+ // Get rom info
+ $getRomInfo = $dbh->prepare("SELECT `id` FROM `roms` WHERE `name_original` = :name_original AND `console` = :console");
+ $getRomInfo->bindParam(':name_original', $name, \PDO::PARAM_STR);
+ $getRomInfo->bindParam(':console', $console, \PDO::PARAM_STR);
+ $getRomInfo->execute();
+ $romId = $getRomInfo->fetchColumn(0);
+ if ($romId === false) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Could not find ROM."]);
+ }
+
+ // Delete old links
+ $getRomInfo = $dbh->prepare("DELETE FROM `links` WHERE `rom_id` = :rom_id");
+ $getRomInfo->bindParam(':rom_id', $romId, \PDO::PARAM_INT);
+ $getRomInfo->execute();
+
+ // Set uploading = 1
+ $setUploading = $dbh->prepare("UPDATE `roms` SET `uploading` = 1 WHERE `id` = :rom_id");
+ $setUploading->bindParam(':rom_id', $romId, \PDO::PARAM_INT);
+ $setUploading->execute();
+ return $response->withJson(['SUCCESS' => true]);
+ });
+ $this->post('/rom/add', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $Retro = new GoodOldDownloads\Retro();
+ $name = $request->getParam('name');
+ $console = $request->getParam('console');
+ $dirInfo = $request->getParam('dirinfoid');
+ if (!$name || !$console || !$dirInfo) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Insufficient params."]);
+ }
+ $insert = $Retro->insertNoIntro($name, $console, $dirInfo);
+ if ($insert === false) {
+ $err = $dbh->prepare("INSERT INTO `error_log` (`name`, `console`) VALUES (:name, :console)");
+ $err->bindParam(':name', $name, \PDO::PARAM_STR);
+ $err->bindParam(':console', $console, \PDO::PARAM_STR);
+ $err->execute();
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Failed to insert ROM."]);
+ } else {
+ return $response->withJson(['SUCCESS' => true, 'MSG' => "$name inserted."]);
+ }
+ return $response->withJson(['SUCCESS' => false]);
+ });
+ $this->get('/rom/info', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $Retro = new GoodOldDownloads\Retro();
+ $name = $request->getParam('name');
+ $console = $request->getParam('console');
+ if (!$name || !$console) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Missing params."]);
+ }
+
+ $getRom = $dbh->prepare("SELECT `name_original` as `name`,
+ R.`console`,
+ R.`name_original`,
+ D.`console` as `dir_console`,
+ D.`region` as `dir_region`
+ FROM `roms` R
+ JOIN `directory_info` D ON `dir_info_id` = D.id
+ WHERE `name_original` = :name AND R.`console` = :console");
+ $getRom->bindParam(':name', $name, \PDO::PARAM_STR);
+ $getRom->bindParam(':console', $console, \PDO::PARAM_STR);
+ $getRom->execute();
+ $rom = $getRom->fetch(\PDO::FETCH_ASSOC);
+
+ if ($rom) {
+ $rom['dir_full'] = $rom['dir_console'].'/'.$rom['name_original'].'/';
+ if ($rom['dir_region']) {
+ $rom['dir_full'] = $rom['dir_console'].'/'.$rom['dir_region'].'/'.$rom['name_original'].'/';
+ }
+ return $response->withJson(['SUCCESS' => true, 'DATA' => $rom]);
+ } else {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "ROM doesn't exist."]);
+ }
+ return $response->withJson(['SUCCESS' => false]);
+ });
+ $this->post('/link/add', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $Retro = new GoodOldDownloads\Retro();
+ $name_original = $request->getParam('name');
+ $console = $request->getParam('console');
+ $link = $request->getParam('link');
+ $filename = $request->getParam('filename');
+ $host = $request->getParam('host');
+ $link_safe = $request->getParam('link_safe');
+ $size = $request->getParam('size');
+
+ if (count(array_unique([$name, $console, $link, $filename, $host])) === 1) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Insufficient params. Requires: name, console, link, filename, host. Optional: link_safe, size"]);
+ }
+
+ $insert = $Retro->insertLink($name_original, $console, $link, $filename, $host, $link_safe, $size);
+ if ($insert) {
+ return $response->withJson(['SUCCESS' => true, 'MSG' => "$link inserted."]);
+ } else {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Failed to add link."]);
+ }
+ return $response->withJson(['SUCCESS' => false]);
+ });
+ $this->post('/rom/postupload', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $name = $request->getParam('name');
+ $console = $request->getParam('console');
+
+ if (!$name || !$console) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Insufficient params."]);
+ }
+
+ // Get rom info
+ $getRomInfo = $dbh->prepare("SELECT `id` FROM `roms` WHERE `name_original` = :name_original AND `console` = :console");
+ $getRomInfo->bindParam(':name_original', $name, \PDO::PARAM_STR);
+ $getRomInfo->bindParam(':console', $console, \PDO::PARAM_STR);
+ $getRomInfo->execute();
+ $romId = $getRomInfo->fetchColumn(0);
+ if ($romId === false) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => "Could not find ROM."]);
+ }
+
+ // Clear votes
+ $deleteVotes = $dbh->prepare("DELETE FROM `votes` WHERE `rom_id` = :rom_id");
+ $deleteVotes->bindParam(':rom_id', $romId, \PDO::PARAM_INT);
+ $deleteVotes->execute();
+
+ // Set uploading = 0 and last_upload
+ $setUploading = $dbh->prepare("UPDATE `roms` SET `uploading` = 0, `last_upload` = UNIX_TIMESTAMP() WHERE `id` = :rom_id");
+ $setUploading->bindParam(':rom_id', $romId, \PDO::PARAM_INT);
+ $setUploading->execute();
+ return $response->withJson(['SUCCESS' => true]);
+ });
+ $this->post('/rom/reparse', function ($request, $response, $args) {
+ /*
+ Reparses all ROMS in database. (For when the parser gets updated.)
+ */
+ set_time_limit(300);
+ $dbh = $this->get('dbh');
+ $Retro = new GoodOldDownloads\Retro();
+
+ // Get rom info
+ $getRoms = $dbh->prepare("SELECT `id`, `name_original`, `console`, `dir_info_id` FROM `roms`");
+ $getRoms->execute();
+ $roms = $getRoms->fetchAll(\PDO::FETCH_ASSOC);
+
+ foreach ($roms as $rom) {
+ $Retro->insertNoIntro($rom['name_original'], $rom['console'], $rom['dir_info_id'], true);
+ }
+ return $response->withJson(['SUCCESS' => true]);
+ });
+ $this->get('/queue', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $game = [];
+ $get = $dbh->prepare("
+ SELECT COUNT(`rom_id`) as `votes`, `name_original`, R.`console`
+ FROM `votes` V
+ JOIN `roms` R ON V.`rom_id` = R.`id`
+ WHERE `uploading` = 0
+ GROUP BY V.`rom_id`
+ ORDER BY `votes` DESC, V.`rom_id` DESC
+ LIMIT 1
+ ");
+ $get->execute();
+ if ($get->rowCount() > 0) {
+ $game = $get->fetch(PDO::FETCH_ASSOC);
+ }
+ return $response->withJson($game);
+ });
+})->add($checkApiKey);
+
+/*
+ Public
+*/
+$app->group('/api', function () {
+ $this->get('/public/nointro/parse', function ($request, $response, $args) {
+ $Retro = new GoodOldDownloads\Retro();
+ $term = $request->getParam('term');
+ return $response->withJson($Retro->parseNoIntro($term));
+ });
+ /*
+ VisualCaptcha
+ */
+ $this->group('/captcha', function () {
+ $this->get('/begin/{howmany}', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $captcha = $this->get('visualCaptcha');
+ $captcha->generate($args['howmany']);
+ return $response->withJson($captcha->getFrontEndData());
+ });
+ $this->get('/img/{index}', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $captcha = $this->get('visualCaptcha');
+ $headers = [];
+ $image = $captcha->streamImage($headers, $args['index'], false);
+ if (!$image) {
+ throw new \Slim\Exception\NotFoundException($request, $response);
+ } else {
+ // Set headers
+ foreach ($headers as $key => $val) {
+ $response = $response->withHeader($key, $val);
+ }
+ return $response;
+ }
+ });
+ $this->post('/vote', function ($request, $response, $args) {
+ $dbh = $this->get('dbh');
+ $ipAddress = $request->getAttribute('ip_address');
+ if ($request->getParam('rom_id') != null && is_numeric($request->getParam('rom_id'))) { // Check if valid vote data
+ $session = new \visualCaptcha\Session();
+ $captcha = $this->get('visualCaptcha');
+
+ $id = $request->getParam('rom_id');
+
+ // check captcha
+ $frontendData = $captcha->getFrontendData();
+ $captchaError = false;
+ if (!$frontendData) {
+ $captchaError = _('Invalid Captcha Data');
+ } else {
+ // If an image field name was submitted, try to validate it
+ if ($imageAnswer = $request->getParam($frontendData['imageFieldName'])){
+ // If incorrect
+ if (!$captcha->validateImage($imageAnswer)){
+ $captchaError = _('Incorrect Captcha Image. Please try again.');
+ }
+ // Generate new captcha or else the user can just rety the old one
+ $howMany = count($captcha->getImageOptions());
+ $captcha->generate($howMany);
+ } else {
+ $captchaError = _('Invalid Captcha Data');
+ }
+ }
+
+ if ($captchaError !== false) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => $captchaError]);
+ }
+
+ // check ip + amount of times voted
+ $checkVoteCount = $dbh->prepare("SELECT COUNT(*) FROM `votes` WHERE `uid` = INET6_ATON(:ip)");
+ $checkVoteCount->bindParam(':ip', $ipAddress, \PDO::PARAM_STR);
+ $checkVoteCount->execute();
+ if ($checkVoteCount->fetchColumn() >= 3) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => _("Your vote limit has exceeded. Wait for the ROMS you've voted on to finish uploading before voting again.")]);
+ }
+
+ // Check if rom has links
+ $chcekLinksCount = $dbh->prepare("SELECT COUNT(*) FROM `links` WHERE `rom_id` = :rom_id");
+ $chcekLinksCount->bindParam(':rom_id', $id, \PDO::PARAM_INT);
+ $chcekLinksCount->execute();
+ if ($chcekLinksCount->fetchColumn() > 0) { // If has links
+ // check if game is old enough
+ $chechUploadAge = $dbh->prepare("SELECT `last_upload` FROM `roms` WHERE `id` = :rom_id
+ AND IF(DATE_ADD(FROM_UNIXTIME(`last_upload`), INTERVAL 60 DAY) >= NOW(), 0, 1)");
+ $chechUploadAge->bindParam(':rom_id', $id, \PDO::PARAM_INT);
+ $chechUploadAge->execute();
+ if ($chechUploadAge->rowCount() < 1) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => _('ROM not old enough to vote on.')]);
+ }
+ }
+
+ // check if uploading
+ $checkUploading = $dbh->prepare("SELECT `uploading` FROM `roms` WHERE `id` = :rom_id");
+ $checkUploading->bindParam(':rom_id', $id, \PDO::PARAM_INT);
+ $checkUploading->execute();
+ if (intval($checkUploading->fetchColumn()) === 1) {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => _('ROM is already uploading!')]);
+ }
+
+ // Check if last upload older than 60 days
+ // bleh do it after launch
+
+ // vote
+ $vote = $dbh->prepare("INSERT INTO `votes` (`uid`, `rom_id`) VALUES(INET6_ATON(:ip), :rom_id)");
+ $vote->bindParam(':ip', $ipAddress, \PDO::PARAM_STR);
+ $vote->bindParam(':rom_id', $id, \PDO::PARAM_INT);
+ if ($vote->execute()) {
+ return $response->withJson(['SUCCESS' => true]);
+ } else {
+ return $response->withJson(['SUCCESS' => false, 'MSG' => _("You already voted on this, check the queue to see when it'll get uploaded!")]);
+ }
+ }
+ return $response->withJson(['SUCCESS' => false, 'MSG' => 'Invalid ROM.']);
+ });
+ });
+});
\ No newline at end of file
diff --git a/web/static/css/_balloon.scss b/web/static/css/_balloon.scss
new file mode 100644
index 0000000..5e0a7b8
--- /dev/null
+++ b/web/static/css/_balloon.scss
@@ -0,0 +1,436 @@
+/*
+
+The MIT License (MIT)
+
+Copyright (c) 2016 Claudio Holanda
+
+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.
+
+*/
+
+/*
+
+ GOD Modifications:
+ - Remove unnecessary mixins
+ - Select [data-tip]
+ - Use static arrow images (CORS)
+ - Position tooltip top-left by default
+
+*/
+
+//
+// Variables
+// -----------------------------------------
+
+$balloon-bg: fade-out(#111, .1) !default;
+$balloon-base-size: 10px !default;
+$balloon-arrow-height: 6px;
+
+
+//
+// Mixins
+// -----------------------------------------
+
+ @mixin svg-arrow ($color, $position: up) {
+
+ $height: 6px;
+ $width: 18px;
+
+ background-image: url('/static/img/tooltip_arrow.svg'); // top-left
+ @if ($position == down) {
+ background-image: none;
+ } @else if ($position == left) {
+ background-image: none;
+ } @else if ($position == right) {
+ background-image: url('/static/img/tooltip_arrow_side.svg');
+ }
+ background-repeat: no-repeat;
+ background-size: 100% auto;
+ width: $width;
+ height: $height;
+ }
+
+ @mixin base-effects() {
+ opacity: 0;
+ pointer-events: none;
+ transition: all .18s ease-out .18s;
+ }
+
+ @mixin normalized-text() {
+ font-family: sans-serif !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ text-shadow: none !important;
+ font-size: $balloon-base-size + 2 !important;
+ }
+
+
+//
+// Styles
+// -----------------------------------------
+
+// IE 11 button bugfix
+button[data-tip] {
+ overflow: visible;
+}
+
+[data-tip] {
+ position: relative; // alt. absolute or fixed
+
+ // Fixing iOS Safari event issue.
+ // More info at: https://goo.gl/w8JF4W
+ cursor: pointer;
+
+ &:after {
+ @include base-effects();
+ @include normalized-text();
+ background: $balloon-bg;
+ border-radius: 4px;
+ color: #fff;
+ content: attr(data-tip);
+ padding: .5em 1em;
+ position: absolute;
+ white-space: nowrap;
+ z-index: 10;
+ }
+
+ &:before {
+ @include svg-arrow($balloon-bg);
+ @include base-effects();
+
+ content: '';
+ position: absolute;
+ z-index: 10;
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:before,
+ &:after {
+ opacity: 1;
+ pointer-events: auto;
+ }
+ }
+
+ &:not([data-balloon-pos]) {
+ &:after {
+ bottom: 100%;
+ left: 0;
+ margin-bottom: 5px + $balloon-arrow-height;
+ transform: translate(0, 10px);
+ transform-origin: top;
+ }
+ &:before {
+ bottom: 100%;
+ left: 0;
+ margin-bottom: 5px;
+ transform: translate(0, 10px);
+ transform-origin: top;
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(0, 0);
+ }
+
+ &:before {
+ transform: translate(0, 0);
+ }
+ }
+ }
+
+ &.font-awesome:after {
+ font-family: FontAwesome;
+ }
+
+ &[data-balloon-break] {
+ &:after {
+ white-space: pre;
+ }
+ }
+
+ &[data-balloon-blunt] {
+ &:before,
+ &:after {
+ transition: none;
+ }
+ }
+
+ &[data-balloon-pos="up"] {
+ &:after {
+ bottom: 100%;
+ left: 50%;
+ margin-bottom: 5px + $balloon-arrow-height;
+ transform: translate(-50%, 10px);
+ transform-origin: top;
+ }
+ &:before {
+ bottom: 100%;
+ left: 50%;
+ margin-bottom: 5px;
+ transform: translate(-50%, 10px);
+ transform-origin: top;
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(-50%, 0);
+ }
+
+ &:before {
+ transform: translate(-50%, 0);
+ }
+ }
+ }
+
+ &[data-balloon-pos="up-left"] {
+ &:after {
+ bottom: 100%;
+ left: 0;
+ margin-bottom: 5px + $balloon-arrow-height;
+ transform: translate(0, 10px);
+ transform-origin: top;
+ }
+ &:before {
+ bottom: 100%;
+ left: 5px;
+ margin-bottom: 5px;
+ transform: translate(0, 10px);
+ transform-origin: top;
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(0, 0);
+ }
+
+ &:before {
+ transform: translate(0, 0);
+ }
+ }
+ }
+
+ &[data-balloon-pos="up-right"] {
+ &:after {
+ bottom: 100%;
+ right: 0;
+ margin-bottom: 5px + $balloon-arrow-height;
+ transform: translate(0, 10px);
+ transform-origin: top;
+ }
+ &:before {
+ bottom: 100%;
+ right: 5px;
+ margin-bottom: 5px;
+ transform: translate(0, 10px);
+ transform-origin: top;
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(0, 0);
+ }
+
+ &:before {
+ transform: translate(0, 0);
+ }
+ }
+ }
+
+ &[data-balloon-pos='down'] {
+ &:after {
+ left: 50%;
+ margin-top: 5px + $balloon-arrow-height;
+ top: 100%;
+ transform: translate(-50%, -10px);
+ }
+
+ &:before {
+ @include svg-arrow($balloon-bg, 'down');
+
+ left: 50%;
+ margin-top: 5px;
+ top: 100%;
+ transform: translate(-50%, -10px);
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(-50%, 0);
+ }
+
+ &:before {
+ transform: translate(-50%, 0);
+ }
+ }
+ }
+
+ &[data-balloon-pos='down-left'] {
+ &:after {
+ left: 0;
+ margin-top: 5px + $balloon-arrow-height;
+ top: 100%;
+ transform: translate(0, -10px);
+ }
+
+ &:before {
+ @include svg-arrow($balloon-bg, 'down');
+
+ left: 5px;
+ margin-top: 5px;
+ top: 100%;
+ transform: translate(0, -10px);
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(0, 0);
+ }
+
+ &:before {
+ transform: translate(0, 0);
+ }
+ }
+ }
+
+ &[data-balloon-pos='down-right'] {
+ &:after {
+ right: 0;
+ margin-top: 5px + $balloon-arrow-height;
+ top: 100%;
+ transform: translate(0, -10px);
+ }
+
+ &:before {
+ @include svg-arrow($balloon-bg, 'down');
+
+ right: 5px;
+ margin-top: 5px;
+ top: 100%;
+ transform: translate(0, -10px);
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(0, 0);
+ }
+
+ &:before {
+ transform: translate(0, 0);
+ }
+ }
+ }
+
+ &[data-balloon-pos='left'] {
+ &:after {
+ margin-right: 5px + $balloon-arrow-height;
+ right: 100%;
+ top: 50%;
+ transform: translate(10px, -50%);
+ }
+
+ &:before {
+ @include svg-arrow($balloon-bg, 'left');
+
+ margin-right: 5px;
+ right: 100%;
+ top: 50%;
+ transform: translate(10px, -50%);
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(0, -50%);
+ }
+
+ &:before {
+ transform: translate(0, -50%);
+ }
+ }
+
+ }
+
+ &[data-balloon-pos='right'] {
+ &:after {
+
+ left: 100%;
+ margin-left: 5px + $balloon-arrow-height;
+ top: 50%;
+ transform: translate(-10px, -50%);
+ }
+
+ &:before {
+ @include svg-arrow($balloon-bg, 'right');
+
+ left: 100%;
+ margin-left: 0;
+ top: 50%;
+ transform: translate(-10px, -50%) rotate(90deg);
+ }
+
+ &:hover, &[data-balloon-visible] {
+ &:after {
+ transform: translate(0, -50%);
+ }
+
+ &:before {
+ transform: translate(0, -50%) rotate(90deg);
+ }
+ }
+ }
+
+ &[data-balloon-length='small'] {
+ &:after {
+ white-space: normal;
+ width: 80px;
+ }
+ }
+
+ &[data-balloon-length='medium'] {
+ &:after {
+ white-space: normal;
+ width: 150px;
+ }
+ }
+
+ &[data-balloon-length='large'] {
+ &:after {
+ white-space: normal;
+ width: 260px;
+ }
+ }
+
+ &[data-balloon-length='xlarge'] {
+ &:after {
+ white-space: normal;
+ width: 380px;
+
+ @media screen and (max-width: 768px) {
+ white-space: normal;
+ width: 90vw;
+ }
+ }
+ }
+
+ &[data-balloon-length='fit'] {
+ &:after {
+ white-space: normal;
+ width: 100%;
+ }
+ }
+}
diff --git a/web/static/css/_dark.scss b/web/static/css/_dark.scss
new file mode 100644
index 0000000..9332e5b
--- /dev/null
+++ b/web/static/css/_dark.scss
@@ -0,0 +1,397 @@
+/*
+ Copyright (C) 2018 GoodOldDownloads
+
+ 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 .
+*/
+
+$outrun-red: #d8061f;
+$outrun-yellow: #f2f224;
+
+& {
+ color: rgba(#fff, .85);
+ background: rgb(7,7,41);
+ background: linear-gradient(180deg, #070729, #212e58, #431e49);
+ &.index {
+ &:before {
+ content: '';
+ display: block;
+ position: absolute;
+ background: url(/static/img/stars.png) repeat;
+ animation: stars 100s linear infinite;
+ height: 50%;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: -6;
+ }
+ &:after {
+ content: '';
+ display: block;
+ position: absolute;
+ background: url(/static/img/stars2.png) repeat;
+ animation: stars2 150s linear infinite;
+ height: 50%;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: -6;
+ }
+ }
+}
+.container.index {
+ &:before {
+ content: '';
+ display: block;
+ position: absolute;
+ border-radius: 100%;
+ width: 50vw;
+ height: 50vw;
+ margin: 0 auto;
+ top: 5px;
+ left: 0;
+ right: 0;
+ background: linear-gradient(to bottom, #EFDF75 0%, #EF9BDC 50%, #f4bae7 100%);
+ z-index: -5;
+ @include mq($from: sm) {
+ top: 20px;
+ width: 50vh;
+ height: 50vh;
+ }
+ }
+ &:after {
+ content: '';
+ display: block;
+ position: absolute;
+ border-radius: 100%;
+ width: 50vw;
+ height: 50vw;
+ margin: 0 auto;
+ top: 5px;
+ left: 0;
+ right: 0;
+ background: linear-gradient(to bottom, transparent 0%, transparent 7%, #070729 7%, #070729 15%, transparent 15%, transparent 28%, #070729 28%, #070729 42%, transparent 42%, transparent 54%, #070729 54%, #070729 64%, transparent 64%, transparent 71%, #070729 71%, #070729 77%, transparent 77%, transparent 83%, #070729 83%, #070729 87%, transparent 87%, transparent 90%, #070729 90%, #070729 92%, transparent 92%, transparent 94%, #070729 94%, #070729 96%, transparent 96%, transparent 97%, #070729 97%);
+ z-index: -5;
+ @include mq($from: sm) {
+ top: 20px;
+ width: 50vh;
+ height: 50vh;
+ }
+ }
+}
+
+#notice {
+ > .contents {
+ border-color: #283b77;
+ background: rgba(0,0,0, .4);
+ }
+}
+
+#search-bar {
+ input[name="t"], select {
+ color: #fff;
+ text-shadow: 0 0 10px #fff;
+ border-color: $outrun-red;
+ box-shadow: 0px 0px 10px 0px rgba($outrun-red, .7), inset 0px 0px 15px 0px rgba($outrun-red, 1);
+ background: rgba(0,0,0, .4);
+ }
+ input[name="t"]::placeholder {
+ color: #fff;
+ }
+ select {
+ background: rgba(0,0,0,0.4) url('/static/img/arrow_dark.png') no-repeat right center;
+ option {
+ background-color: #0e1135;
+ }
+ }
+ > button {
+ background: $outrun-red;
+ }
+}
+nav {
+ .nav-item {
+ &:hover {
+ background: rgba($outrun-yellow, .1);
+ border: 1px solid $outrun-yellow;
+ box-shadow: $shadow-props;
+ }
+ &.dropdown {
+ min-width: 70px;
+ color: $outrun-yellow;
+ ul {
+ background: $body-bg;
+ &:last-child {
+ border-bottom: 1px solid $outrun-yellow;
+ }
+ li {
+ border: 1px solid $outrun-yellow;
+ border-bottom: 0;
+ button {
+ color: $body-color;
+ &:hover {
+ background: rgba($outrun-yellow, .1);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+.cards-wrap {
+ .rom-card {
+ background: transparent;
+ border: 2px solid lighten($outrun-yellow, 20%);
+ box-shadow: 0px 0px 2px 0px $outrun-yellow, inset 0px 0px 2px 0px $outrun-yellow;
+ &:hover {
+ animation: neon-pulse 70ms steps(2) infinite;
+ }
+ .region {
+ border-right: 1px solid lighten($outrun-yellow, 20%);
+ }
+ .console-mobile {
+ border-left: 1px solid lighten($outrun-yellow, 20%);
+ img {
+ filter: hue-rotate(180deg) brightness(220%) drop-shadow(0px 0px 10px rgba(239, 89, 232, 0.8));
+ }
+ &:hover {
+ background: rgba(#ffcaff, .1);
+ }
+ }
+ .votes {
+ border-left: 1px solid lighten($outrun-yellow, 20%);
+ }
+ }
+}
+
+.console-nav {
+ .console {
+ background: transparent;
+ border: 2px solid lighten($outrun-yellow, 20%);
+ box-shadow: 0px 0px 5px 0px $outrun-yellow, inset 0px 0px 5px 0px $outrun-yellow;
+ border-radius: 25px;
+ .image {
+ img {
+ filter: hue-rotate(180deg) brightness(220%) drop-shadow(0px 0px 10px rgba(239, 89, 232, 0.8));
+ }
+ }
+ &:hover {
+ animation: neon-pulse 70ms steps(2) infinite;
+ img {
+ animation: flicker 10s infinite alternate;
+ }
+ }
+ }
+}
+
+.container.console {
+ .console-details {
+ > img {
+ filter: drop-shadow(0px 0px 10px #F596FF);
+ }
+ }
+ .console-buttons {
+ border-color: $outrun-red;
+ > a, .expand {
+ border: 2px solid lighten($outrun-yellow, 20%);
+ box-shadow: 0px 0px 3px 0px $outrun-yellow, inset 0px 0px 3px 0px $outrun-yellow;
+ }
+ }
+}
+
+.container.index {
+ .search-container {
+ .links {
+ a, > .dropdown {
+ color: $outrun-red;
+ text-shadow: 0px 0px 2px $outrun-red;
+ }
+ > .dropdown {
+ ul {
+ background: rgba(0,0,0, .8);
+ border: 1px solid $outrun-red;
+ li {
+ button {
+ color: #fff;
+ &:hover {
+ text-decoration-skip-ink: none;
+ text-decoration: wavy underline;
+ }
+ }
+ &:hover {
+ background: #000;
+ }
+ }
+ }
+ }
+ }
+ > .logo-container {
+ margin: 0;
+ margin-bottom: 10px;
+ > img {
+ image-rendering: auto; // uncrisp
+ @include mq($from: sm) {
+ height: 180px;
+ }
+ }
+ }
+ }
+}
+
+a {
+ color: $outrun-yellow;
+ text-decoration-skip-ink: none;
+ text-shadow: 2px 0px 6px rgba($outrun-yellow, .8);
+ &:hover {
+ color: $outrun-yellow;
+ text-shadow: 2px 0px 10px rgba($outrun-yellow, 1);
+ text-decoration: wavy underline;
+ }
+}
+
+.pagination {
+ .btn {
+ color: #fff;
+ border: 1px solid $outrun-red;
+ background: transparent;
+ }
+ .active {
+ cursor: default;
+ color: rgba(#fff,.45);
+ }
+ a[disabled] {
+ color: #fff;
+ &:hover {
+ color: $link-hover-color;
+ }
+ }
+}
+
+.rom-wrap {
+ &:before {
+ display: none;
+ }
+ border: 1px solid $outrun-red;
+ box-shadow: 0px 0px 10px 0px rgba($outrun-red, .7), inset 0px 0px 200px 0px rgba($outrun-red, .5);
+ background: transparent;
+ .details {
+ .boxart {
+ box-sizing: content-box;
+ border: 1px solid $outrun-red;
+ box-shadow: 0px 0px 10px 0px rgba($outrun-red, .7);
+ padding: 5px;
+ > img {
+ border: 1px solid $outrun-red;
+ }
+ &:before {
+ display: none;
+ }
+ &:after {
+ display: none;
+ }
+ }
+ ul {
+ li {
+ > .content {
+ > a {
+ color: rgba(255,255,255,0.85);
+ }
+ }
+ }
+ }
+ }
+ .links-container {
+ form {
+ border: 1px solid $outrun-red;
+ box-shadow: 0px 0px 10px 0px rgba($outrun-red, .7);
+ }
+ .link, .host, .link-helper {
+ background: transparent;
+ }
+ .link > a:hover {
+ background: rgba($outrun-red, .1);
+ }
+ .host, .link-helper {
+ &:hover {
+ &:before {
+ background: rgba($outrun-red, .1);
+ }
+ }
+ }
+ }
+}
+
+#vote-captcha {
+ .visualCaptcha-possibilities {
+ .img {
+ &.visualCaptcha-selected {
+ border: 2px solid $outrun-red;
+ }
+ }
+ }
+}
+
+.srclogo > img,
+img.fac-hoster {
+ filter: invert(100%);
+}
+
+.btn, button {
+ color: #fff;
+ text-shadow: 0 0 10px #fff;
+ background: $outrun-red;
+}
+
+#theme-toggler {
+ background: #FFFDF1;
+ border: 2px solid #22b14c;
+ > button {
+ width: 100%;
+ height: 100%;
+ background: none;
+ }
+}
+
+@-webkit-keyframes neon-pulse {
+ 0% {
+ box-shadow: 0px 0px 15px 0px $outrun-yellow, inset 0px 0px 15px 0px $outrun-yellow;
+ }
+ 100% {
+ box-shadow: 0px 0px 18px 0px $outrun-yellow, inset 0px 0px 18px 0px $outrun-yellow;
+ }
+}
+
+@keyframes flicker {
+ 0%, 20%, 27%, 40%, 49%, 51%, 79%, 81%, 100% {
+ filter: sepia(1%) hue-rotate(180deg) brightness(220%) drop-shadow(0px 0px 10px rgba(239, 89, 232, 0.8));
+ }
+ 27.9999999999%, 39.99999999999%, 50%, 80% {
+ filter: sepia(1%) hue-rotate(180deg) brightness(60%);
+ }
+}
+
+@keyframes stars {
+ from {
+ background-position: 0 0;
+ } to {
+ background-position: 0 -5000px;
+ }
+}
+@keyframes stars2 {
+ from {
+ background-position: 20% 0;
+ } to {
+ background-position: 20% -5000px;
+ }
+}
\ No newline at end of file
diff --git a/web/static/css/_mq.scss b/web/static/css/_mq.scss
new file mode 100644
index 0000000..4dc7536
--- /dev/null
+++ b/web/static/css/_mq.scss
@@ -0,0 +1,287 @@
+@charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly
+ // See https://github.com/sass-mq/sass-mq/pull/10
+
+/// Base font size on the `` element
+/// @type Number (unit)
+$mq-base-font-size: 16px !default;
+
+/// Responsive mode
+///
+/// Set to `false` to enable support for browsers that do not support @media queries,
+/// (IE <= 8, Firefox <= 3, Opera <= 9)
+///
+/// You could create a stylesheet served exclusively to older browsers,
+/// where @media queries are rasterized
+///
+/// @example scss
+/// // old-ie.scss
+/// $mq-responsive: false;
+/// @import 'main'; // @media queries in this file will be rasterized up to $mq-static-breakpoint
+/// // larger breakpoints will be ignored
+///
+/// @type Boolean
+/// @link https://github.com/sass-mq/sass-mq#responsive-mode-off Disabled responsive mode documentation
+$mq-responsive: true !default;
+
+/// Breakpoint list
+///
+/// Name your breakpoints in a way that creates a ubiquitous language
+/// across team members. It will improve communication between
+/// stakeholders, designers, developers, and testers.
+///
+/// @type Map
+/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint Full documentation and examples
+$mq-breakpoints: (
+ mobile: 320px,
+ tablet: 740px,
+ desktop: 980px,
+ wide: 1300px
+) !default;
+
+/// Static breakpoint (for fixed-width layouts)
+///
+/// Define the breakpoint from $mq-breakpoints that should
+/// be used as the target width for the fixed-width layout
+/// (i.e. when $mq-responsive is set to 'false') in a old-ie.scss
+///
+/// @example scss
+/// // tablet-only.scss
+/// //
+/// // Ignore all styles above tablet breakpoint,
+/// // and fix the styles (e.g. layout) at tablet width
+/// $mq-responsive: false;
+/// $mq-static-breakpoint: tablet;
+/// @import 'main'; // @media queries in this file will be rasterized up to tablet
+/// // larger breakpoints will be ignored
+///
+/// @type String
+/// @link https://github.com/sass-mq/sass-mq#adding-custom-breakpoints Full documentation and examples
+$mq-static-breakpoint: desktop !default;
+
+/// Show breakpoints in the top right corner
+///
+/// If you want to display the currently active breakpoint in the top
+/// right corner of your site during development, add the breakpoints
+/// to this list, ordered by width, e.g. (mobile, tablet, desktop).
+///
+/// @type map
+$mq-show-breakpoints: () !default;
+
+/// Customize the media type (e.g. `@media screen` or `@media print`)
+/// By default sass-mq uses an "all" media type (`@media all and …`)
+///
+/// @type String
+/// @link https://github.com/sass-mq/sass-mq#changing-media-type Full documentation and examples
+$mq-media-type: all !default;
+
+/// Convert pixels to ems
+///
+/// @param {Number} $px - value to convert
+/// @param {Number} $base-font-size ($mq-base-font-size) - `` font size
+///
+/// @example scss
+/// $font-size-in-ems: mq-px2em(16px);
+/// p { font-size: mq-px2em(16px); }
+///
+/// @requires $mq-base-font-size
+/// @returns {Number}
+@function mq-px2em($px, $base-font-size: $mq-base-font-size) {
+ @if unitless($px) {
+ @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels.";
+ @return mq-px2em($px * 1px, $base-font-size);
+ } @else if unit($px) == em {
+ @return $px;
+ }
+ @return ($px / $base-font-size) * 1em;
+}
+
+/// Get a breakpoint's width
+///
+/// @param {String} $name - Name of the breakpoint. One of $mq-breakpoints
+///
+/// @example scss
+/// $tablet-width: mq-get-breakpoint-width(tablet);
+/// @media (min-width: mq-get-breakpoint-width(desktop)) {}
+///
+/// @requires {Variable} $mq-breakpoints
+///
+/// @returns {Number} Value in pixels
+@function mq-get-breakpoint-width($name, $breakpoints: $mq-breakpoints) {
+ @if map-has-key($breakpoints, $name) {
+ @return map-get($breakpoints, $name);
+ } @else {
+ @warn "Breakpoint #{$name} wasn't found in $breakpoints.";
+ }
+}
+
+/// Media Query mixin
+///
+/// @param {String | Boolean} $from (false) - One of $mq-breakpoints
+/// @param {String | Boolean} $until (false) - One of $mq-breakpoints
+/// @param {String | Boolean} $and (false) - Additional media query parameters
+/// @param {String} $media-type ($mq-media-type) - Media type: screen, print…
+///
+/// @ignore Undocumented API, for advanced use only:
+/// @ignore @param {Map} $breakpoints ($mq-breakpoints)
+/// @ignore @param {String} $static-breakpoint ($mq-static-breakpoint)
+///
+/// @content styling rules, wrapped into a @media query when $responsive is true
+///
+/// @requires {Variable} $mq-media-type
+/// @requires {Variable} $mq-breakpoints
+/// @requires {Variable} $mq-static-breakpoint
+/// @requires {function} mq-px2em
+/// @requires {function} mq-get-breakpoint-width
+///
+/// @link https://github.com/sass-mq/sass-mq#responsive-mode-on-default Full documentation and examples
+///
+/// @example scss
+/// .element {
+/// @include mq($from: mobile) {
+/// color: red;
+/// }
+/// @include mq($until: tablet) {
+/// color: blue;
+/// }
+/// @include mq(mobile, tablet) {
+/// color: green;
+/// }
+/// @include mq($from: tablet, $and: '(orientation: landscape)') {
+/// color: teal;
+/// }
+/// @include mq(950px) {
+/// color: hotpink;
+/// }
+/// @include mq(tablet, $media-type: screen) {
+/// color: hotpink;
+/// }
+/// // Advanced use:
+/// $my-breakpoints: (L: 900px, XL: 1200px);
+/// @include mq(L, $breakpoints: $my-breakpoints, $static-breakpoint: L) {
+/// color: hotpink;
+/// }
+/// }
+@mixin mq(
+ $from: false,
+ $until: false,
+ $and: false,
+ $media-type: $mq-media-type,
+ $breakpoints: $mq-breakpoints,
+ $responsive: $mq-responsive,
+ $static-breakpoint: $mq-static-breakpoint
+) {
+ $min-width: 0;
+ $max-width: 0;
+ $media-query: '';
+
+ // From: this breakpoint (inclusive)
+ @if $from {
+ @if type-of($from) == number {
+ $min-width: mq-px2em($from);
+ } @else {
+ $min-width: mq-px2em(mq-get-breakpoint-width($from, $breakpoints));
+ }
+ }
+
+ // Until: that breakpoint (exclusive)
+ @if $until {
+ @if type-of($until) == number {
+ $max-width: mq-px2em($until);
+ } @else {
+ $max-width: mq-px2em(mq-get-breakpoint-width($until, $breakpoints)) - .01em;
+ }
+ }
+
+ // Responsive support is disabled, rasterize the output outside @media blocks
+ // The browser will rely on the cascade itself.
+ @if $responsive == false {
+ $static-breakpoint-width: mq-get-breakpoint-width($static-breakpoint, $breakpoints);
+ $target-width: mq-px2em($static-breakpoint-width);
+
+ // Output only rules that start at or span our target width
+ @if (
+ $and == false
+ and $min-width <= $target-width
+ and (
+ $until == false or $max-width >= $target-width
+ )
+ ) {
+ @content;
+ }
+ }
+
+ // Responsive support is enabled, output rules inside @media queries
+ @else {
+ @if $min-width != 0 { $media-query: '#{$media-query} and (min-width: #{$min-width})'; }
+ @if $max-width != 0 { $media-query: '#{$media-query} and (max-width: #{$max-width})'; }
+ @if $and { $media-query: '#{$media-query} and #{$and}'; }
+
+ // Remove unnecessary media query prefix 'all and '
+ @if ($media-type == 'all' and $media-query != '') {
+ $media-type: '';
+ $media-query: str-slice(unquote($media-query), 6);
+ }
+
+ @media #{$media-type + $media-query} {
+ @content;
+ }
+ }
+}
+
+/// Add a breakpoint
+///
+/// @param {String} $name - Name of the breakpoint
+/// @param {Number} $width - Width of the breakpoint
+///
+/// @requires {Variable} $mq-breakpoints
+///
+/// @example scss
+/// @include mq-add-breakpoint(tvscreen, 1920px);
+/// @include mq(tvscreen) {}
+@mixin mq-add-breakpoint($name, $width) {
+ $new-breakpoint: ($name: $width);
+ $mq-breakpoints: map-merge($mq-breakpoints, $new-breakpoint) !global;
+}
+
+/// Show the active breakpoint in the top right corner of the viewport
+/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint
+///
+/// @param {List} $show-breakpoints ($mq-show-breakpoints) - List of breakpoints to show in the top right corner
+/// @param {Map} $breakpoints ($mq-breakpoints) - Breakpoint names and sizes
+///
+/// @requires {Variable} $mq-breakpoints
+/// @requires {Variable} $mq-show-breakpoints
+///
+/// @example scss
+/// // Show breakpoints using global settings
+/// @include mq-show-breakpoints;
+///
+/// // Show breakpoints using custom settings
+/// @include mq-show-breakpoints((L, XL), (S: 300px, L: 800px, XL: 1200px));
+@mixin mq-show-breakpoints($show-breakpoints: $mq-show-breakpoints, $breakpoints: $mq-breakpoints) {
+ body:before {
+ background-color: #FCF8E3;
+ border-bottom: 1px solid #FBEED5;
+ border-left: 1px solid #FBEED5;
+ color: #C09853;
+ font: small-caption;
+ padding: 3px 6px;
+ pointer-events: none;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 100;
+
+ // Loop through the breakpoints that should be shown
+ @each $show-breakpoint in $show-breakpoints {
+ $width: mq-get-breakpoint-width($show-breakpoint, $breakpoints);
+ @include mq($show-breakpoint, $breakpoints: $breakpoints) {
+ content: "#{$show-breakpoint} ≥ #{$width} (#{mq-px2em($width)})";
+ }
+ }
+ }
+}
+
+@if length($mq-show-breakpoints) > 0 {
+ @include mq-show-breakpoints;
+}
diff --git a/web/static/css/_reboot.scss b/web/static/css/_reboot.scss
new file mode 100644
index 0000000..17eb01c
--- /dev/null
+++ b/web/static/css/_reboot.scss
@@ -0,0 +1,505 @@
+// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
+
+// Reboot
+//
+// Normalization of HTML elements, manually forked from Normalize.css to remove
+// styles targeting irrelevant browsers while applying new styles.
+//
+// Normalize is licensed MIT. https://github.com/necolas/normalize.css
+
+
+// Document
+//
+// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
+// 2. Change the default font family in all browsers.
+// 3. Correct the line height in all browsers.
+// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
+// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
+// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
+// 6. Change the default tap highlight to be completely transparent in iOS.
+
+*,
+*::before,
+*::after {
+ box-sizing: border-box; // 1
+}
+
+html {
+ font-family: sans-serif; // 2
+ line-height: 1.15; // 3
+ -webkit-text-size-adjust: 100%; // 4
+ -ms-text-size-adjust: 100%; // 4
+ -ms-overflow-style: scrollbar; // 5
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 6
+}
+
+// IE10+ doesn't honor `` in some cases.
+@at-root {
+ @-ms-viewport {
+ width: device-width;
+ }
+}
+
+// stylelint-disable selector-list-comma-newline-after
+// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
+article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
+ display: block;
+}
+// stylelint-enable selector-list-comma-newline-after
+
+// Body
+//
+// 1. Remove the margin in all browsers.
+// 2. As a best practice, apply a default `background-color`.
+// 3. Set an explicit initial text-align value so that we can later use the
+// the `inherit` value on things like `
` elements.
+
+body {
+ margin: 0; // 1
+ font-family: $font-family-base;
+ font-size: $font-size-base;
+ font-weight: $font-weight-base;
+ line-height: $line-height-base;
+ color: $body-color;
+ text-align: left; // 3
+ background-color: $body-bg; // 2
+}
+
+// Suppress the focus outline on elements that cannot be accessed via keyboard.
+// This prevents an unwanted focus outline from appearing around elements that
+// might still respond to pointer events.
+//
+// Credit: https://github.com/suitcss/base
+[tabindex="-1"]:focus {
+ outline: 0 !important;
+}
+
+
+// Content grouping
+//
+// 1. Add the correct box sizing in Firefox.
+// 2. Show the overflow in Edge and IE.
+
+hr {
+ box-sizing: content-box; // 1
+ height: 0; // 1
+ overflow: visible; // 2
+}
+
+
+//
+// Typography
+//
+
+// Remove top margins from headings
+//
+// By default, `
`-`
` all receive top and bottom margins. We nuke the top
+// margin for easier control within type scales as it avoids margin collapsing.
+// stylelint-disable selector-list-comma-newline-after
+h1, h2, h3, h4, h5, h6 {
+ margin-top: 0;
+ margin-bottom: $headings-margin-bottom;
+}
+// stylelint-enable selector-list-comma-newline-after
+
+// Reset margins on paragraphs
+//
+// Similarly, the top margin on `
`s get reset. However, we also reset the
+// bottom margin to use `rem` units instead of `em`.
+p {
+ margin-top: 0;
+ margin-bottom: $paragraph-margin-bottom;
+}
+
+// Abbreviations
+//
+// 1. Remove the bottom border in Firefox 39-.
+// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+// 3. Add explicit cursor to indicate changed behavior.
+// 4. Duplicate behavior to the data-* attribute for our tooltip plugin
+
+abbr[title],
+abbr[data-original-title] { // 4
+ text-decoration: underline; // 2
+ text-decoration: underline dotted; // 2
+ cursor: help; // 3
+ border-bottom: 0; // 1
+}
+
+address {
+ margin-bottom: 1rem;
+ font-style: normal;
+ line-height: inherit;
+}
+
+ol,
+ul,
+dl {
+ margin-top: 0;
+ margin-bottom: 1rem;
+}
+
+ol ol,
+ul ul,
+ol ul,
+ul ol {
+ margin-bottom: 0;
+}
+
+dt {
+ font-weight: 600;
+}
+
+dd {
+ margin-bottom: .5rem;
+ margin-left: 0; // Undo browser default
+}
+
+blockquote {
+ margin: 0 0 1rem;
+}
+
+dfn {
+ font-style: italic; // Add the correct font style in Android 4.3-
+}
+
+// stylelint-disable font-weight-notation
+b,
+strong {
+ font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
+}
+// stylelint-enable font-weight-notation
+
+small {
+ font-size: 80%; // Add the correct font size in all browsers
+}
+
+//
+// Prevent `sub` and `sup` elements from affecting the line height in
+// all browsers.
+//
+
+sub,
+sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+
+sub { bottom: -.25em; }
+sup { top: -.5em; }
+
+
+//
+// Links
+//
+
+a {
+ color: $link-color;
+ text-decoration: $link-decoration;
+ background-color: transparent; // Remove the gray background on active links in IE 10.
+ -webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
+ &:hover {
+ color: $link-hover-color;
+ text-decoration: $link-hover-decoration;
+ }
+}
+
+// And undo these styles for placeholder links/named anchors (without href)
+// which have not been made explicitly keyboard-focusable (without tabindex).
+// It would be more straightforward to just use a[href] in previous block, but that
+// causes specificity issues in many other styles that are too complex to fix.
+// See https://github.com/twbs/bootstrap/issues/19402
+
+a:not([href]):not([tabindex]) {
+ color: inherit;
+ text-decoration: none;
+
+ &:focus,
+ &:hover {
+ color: inherit;
+ text-decoration: none;
+ }
+
+ &:focus {
+ outline: 0;
+ }
+}
+
+
+//
+// Code
+//
+
+// stylelint-disable font-family-no-duplicate-names
+pre,
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
+ font-size: 1em; // Correct the odd `em` font sizing in all browsers.
+}
+// stylelint-enable font-family-no-duplicate-names
+
+pre {
+ // Remove browser default top margin
+ margin-top: 0;
+ // Reset browser default of `1em` to use `rem`s
+ margin-bottom: 1rem;
+ // Don't allow content to break outside
+ overflow: auto;
+ // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
+ // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
+ -ms-overflow-style: scrollbar;
+}
+
+
+//
+// Figures
+//
+
+figure {
+ // Apply a consistent margin strategy (matches our type styles).
+ margin: 0 0 1rem;
+}
+
+
+//
+// Images and content
+//
+
+img {
+ vertical-align: middle;
+ border-style: none; // Remove the border on images inside links in IE 10-.
+}
+
+svg:not(:root) {
+ overflow: hidden; // Hide the overflow in IE
+}
+
+
+// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
+//
+// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
+// DON'T remove the click delay when `` is present.
+// However, they DO support removing the click delay via `touch-action: manipulation`.
+// See:
+// * https://getbootstrap.com/docs/4.0/content/reboot/#click-delay-optimization-for-touch
+// * https://caniuse.com/#feat=css-touch-action
+// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
+
+a,
+area,
+button,
+[role="button"],
+input:not([type="range"]),
+label,
+select,
+summary,
+textarea {
+ touch-action: manipulation;
+}
+
+
+//
+// Tables
+//
+
+table {
+ border-collapse: collapse; // Prevent double borders
+}
+
+caption {
+ padding-top: $table-cell-padding;
+ padding-bottom: $table-cell-padding;
+ color: $text-muted;
+ text-align: left;
+ caption-side: bottom;
+}
+
+th {
+ // Matches default `
` alignment by inheriting from the ``, or the
+ // closest parent with a set `text-align`.
+ text-align: inherit;
+}
+
+
+//
+// Forms
+//
+
+label {
+ // Allow labels to use `margin` for spacing.
+ display: inline-block;
+ margin-bottom: .5rem;
+}
+
+// Remove the default `border-radius` that macOS Chrome adds.
+//
+// Details at https://github.com/twbs/bootstrap/issues/24093
+button {
+ border-radius: 0;
+}
+
+// Work around a Firefox/IE bug where the transparent `button` background
+// results in a loss of the default `button` focus styles.
+//
+// Credit: https://github.com/suitcss/base/
+button:focus {
+ outline: 1px dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+}
+
+input,
+button,
+select,
+optgroup,
+textarea {
+ margin: 0; // Remove the margin in Firefox and Safari
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+button,
+input {
+ overflow: visible; // Show the overflow in Edge
+}
+
+button,
+select {
+ text-transform: none; // Remove the inheritance of text transform in Firefox
+}
+
+// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+// controls in Android 4.
+// 2. Correct the inability to style clickable types in iOS and Safari.
+button,
+html [type="button"], // 1
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button; // 2
+}
+
+// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ padding: 0;
+ border-style: none;
+}
+
+input[type="radio"],
+input[type="checkbox"] {
+ box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
+ padding: 0; // 2. Remove the padding in IE 10-
+}
+
+
+input[type="date"],
+input[type="time"],
+input[type="datetime-local"],
+input[type="month"] {
+ // Remove the default appearance of temporal inputs to avoid a Mobile Safari
+ // bug where setting a custom line-height prevents text from being vertically
+ // centered within the input.
+ // See https://bugs.webkit.org/show_bug.cgi?id=139848
+ // and https://github.com/twbs/bootstrap/issues/11266
+ -webkit-appearance: listbox;
+}
+
+textarea {
+ overflow: auto; // Remove the default vertical scrollbar in IE.
+ // Textareas should really only resize vertically so they don't break their (horizontal) containers.
+ resize: vertical;
+}
+
+fieldset {
+ // Browsers set a default `min-width: min-content;` on fieldsets,
+ // unlike e.g. `
',i={imageFieldName:t.imageFieldName(),explanation:a.explanation.replace(/ANSWER/,t.imageName()),images:r},e(n,i)},i=function(t){var a,n;return a='',n={audioFieldName:t.audioFieldName()},e(a,n)},r=function(t,a){var n,i;return n='',i={imageFieldName:t.imageFieldName(),value:t.imageValue(a)},e(n,i)},o=function(t){var a,n,i=t.namespace();return i&&0!==i.length?(a='',n={fieldName:t.namespaceFieldName(),value:i},e(a,n)):""},{buttons:t,accessibility:a,images:n,audioInput:i,imageInput:r,namespaceInput:o}}),a("visualcaptcha/language",[],function(){"use strict";return{accessibilityAlt:"Sound icon",accessibilityTitle:"Accessibility option: listen to a question and answer it!",accessibilityDescription:"Type below the answer to what you hear. Numbers or words:",explanation:"ANSWER",refreshAlt:"Refresh/reload icon",refreshTitle:"Refresh/reload images!"}}),a("visualcaptcha.vanilla",["visualcaptcha","visualcaptcha/deep-extend","visualcaptcha/helpers","visualcaptcha/templates","visualcaptcha/language"],function(e,t,a,n,i){"use strict";var r,o,s,c;return r=function(){},o=function(e,t){var i,r,o=e.config;i=n.namespaceInput(t)+n.accessibility(t,o.language)+n.images(t,o.language)+n.buttons(t,o.language,o.imgPath),e.innerHTML=i,r=a.findByClass(e,"visualCaptcha-possibilities",!0),a.bindClick(a.findByClass(r,"img"),s.bind(null,e,t))},function(e,t){var i,r,o,s,c=a.findByClass(e,"visualCaptcha-accessibility-wrapper",!0),l=a.findByClass(e,"visualCaptcha-possibilities",!0),u=a.findByClass(e,"visualCaptcha-explanation",!0),d=a.findByTag(c,"audio",!0);a.hasClass(c,"visualCaptcha-hide")?(a.addClass(l,"visualCaptcha-hide"),a.addClass(u,"visualCaptcha-hide"),i=a.findByClass(l,"img"),a.removeClass(i,"visualCaptcha-selected"),void 0!==(r=a.findByTag(u,"input",!0))&&(r.value=""),s=n.audioInput(t),c.innerHTML=c.innerHTML.replace("