Compare commits
71 Commits
Author | SHA1 | Date |
---|---|---|
Soper Aylamo | 249e6feceb | |
Soper Aylamo | 173516af89 | |
Soper Aylamo | 3f56508a26 | |
Soper Aylamo | 8127854d69 | |
Soper Aylamo | 156426df8e | |
Soper Aylamo | f3786d5a7a | |
Soper Aylamo | de7bec06ea | |
Soper Aylamo | 7865a7f776 | |
Soper Aylamo | 1cdfc1aade | |
Soper Aylamo | 31efe055af | |
Soper Aylamo | bf0242fb85 | |
Soper Aylamo | 8e1a926daa | |
Soper Aylamo | a77a4506ce | |
Soper Aylamo | b8e356c5d7 | |
Soper Aylamo | 472068b12c | |
Soper Aylamo | 9c91f53544 | |
Soper Aylamo | 7a606a437d | |
Soper Aylamo | d9812de384 | |
Soper Aylamo | a234ea4fd0 | |
Soper Aylamo | 3a3d33fa22 | |
Soper Aylamo | 175e58c9b4 | |
Soper Aylamo | e0eb08818a | |
Soper Aylamo | 62adbf330f | |
Soper Aylamo | e541067347 | |
Eric Johansson (neku) | 07da442141 | |
Eric Johansson (neku) | 6c25a2b1ac | |
nokonoko | d0b9cbdcac | |
nokonoko | 5e56fb981a | |
nokonoko | 6fb976d738 | |
nokonoko | 871ed5f37a | |
nokonoko | 9413fed93b | |
nokonoko | a24bf794b0 | |
nokonoko | ee3976f997 | |
nokonoko | 35c123932e | |
nokonoko | bab8d133ef | |
nokonoko | e96464c2c1 | |
Eric Johansson (neku) | 0b95d9d192 | |
Eric Johansson (neku) | 0908af85dd | |
Eric Johansson (neku) | ab5bedd351 | |
nokonoko | d37c73140b | |
Eric Johansson (neku) | 1cbe610065 | |
nokonoko | 8acaf8998f | |
nokonoko | 01eb4b5a12 | |
nokonoko | cef498522c | |
Eric Johansson (neku) | 56586decf4 | |
nokonoko | 05e3c435c3 | |
nokonoko | 7887c7e4b3 | |
nokonoko | e52293dd4a | |
nokonoko | cd738888ba | |
nokonoko | 60d1236769 | |
nokonoko | 13a9292fec | |
nokonoko | c036012e55 | |
nokonoko | d90f9e58e9 | |
nokonoko | 946c385baf | |
nokonoko | 9983c2dc93 | |
nokonoko | 03a91b2a85 | |
nokonoko | d3aa5eb9a6 | |
Eric Johansson (neku) | d3f3618ddb | |
Eric Johansson (neku) | 35d52f6343 | |
Eric Johansson (neku) | a906f6b027 | |
Eric Johansson (neku) | c05fb5b717 | |
Eric Johansson (neku) | a51784b69d | |
nokonoko | d9744300eb | |
Eric Johansson (neku) | 84c4a07100 | |
Eric Johansson (neku) | 1f6cac06b6 | |
nokonoko | 2bf99e4257 | |
nokonoko | 6f1e37470b | |
nokonoko | 55177426c0 | |
nokonoko | 5df9340f1a | |
Eric Johansson (neku) | f30af19661 | |
fredster33 | 7066bd2c43 |
|
@ -1,3 +1,2 @@
|
|||
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
|
|
|
@ -1,319 +0,0 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
Attribution 3.0 Unported
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
|
||||
DAMAGES RESULTING FROM ITS USE.
|
||||
|
||||
License
|
||||
|
||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
||||
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
||||
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
||||
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
||||
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
|
||||
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
|
||||
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
|
||||
CONDITIONS.
|
||||
|
||||
1. Definitions
|
||||
|
||||
a. "Adaptation" means a work based upon the Work, or upon the Work and
|
||||
other pre-existing works, such as a translation, adaptation,
|
||||
derivative work, arrangement of music or other alterations of a
|
||||
literary or artistic work, or phonogram or performance and includes
|
||||
cinematographic adaptations or any other form in which the Work may be
|
||||
recast, transformed, or adapted including in any form recognizably
|
||||
derived from the original, except that a work that constitutes a
|
||||
Collection will not be considered an Adaptation for the purpose of
|
||||
this License. For the avoidance of doubt, where the Work is a musical
|
||||
work, performance or phonogram, the synchronization of the Work in
|
||||
timed-relation with a moving image ("synching") will be considered an
|
||||
Adaptation for the purpose of this License.
|
||||
b. "Collection" means a collection of literary or artistic works, such as
|
||||
encyclopedias and anthologies, or performances, phonograms or
|
||||
broadcasts, or other works or subject matter other than works listed
|
||||
in Section 1(f) below, which, by reason of the selection and
|
||||
arrangement of their contents, constitute intellectual creations, in
|
||||
which the Work is included in its entirety in unmodified form along
|
||||
with one or more other contributions, each constituting separate and
|
||||
independent works in themselves, which together are assembled into a
|
||||
collective whole. A work that constitutes a Collection will not be
|
||||
considered an Adaptation (as defined above) for the purposes of this
|
||||
License.
|
||||
c. "Distribute" means to make available to the public the original and
|
||||
copies of the Work or Adaptation, as appropriate, through sale or
|
||||
other transfer of ownership.
|
||||
d. "Licensor" means the individual, individuals, entity or entities that
|
||||
offer(s) the Work under the terms of this License.
|
||||
e. "Original Author" means, in the case of a literary or artistic work,
|
||||
the individual, individuals, entity or entities who created the Work
|
||||
or if no individual or entity can be identified, the publisher; and in
|
||||
addition (i) in the case of a performance the actors, singers,
|
||||
musicians, dancers, and other persons who act, sing, deliver, declaim,
|
||||
play in, interpret or otherwise perform literary or artistic works or
|
||||
expressions of folklore; (ii) in the case of a phonogram the producer
|
||||
being the person or legal entity who first fixes the sounds of a
|
||||
performance or other sounds; and, (iii) in the case of broadcasts, the
|
||||
organization that transmits the broadcast.
|
||||
f. "Work" means the literary and/or artistic work offered under the terms
|
||||
of this License including without limitation any production in the
|
||||
literary, scientific and artistic domain, whatever may be the mode or
|
||||
form of its expression including digital form, such as a book,
|
||||
pamphlet and other writing; a lecture, address, sermon or other work
|
||||
of the same nature; a dramatic or dramatico-musical work; a
|
||||
choreographic work or entertainment in dumb show; a musical
|
||||
composition with or without words; a cinematographic work to which are
|
||||
assimilated works expressed by a process analogous to cinematography;
|
||||
a work of drawing, painting, architecture, sculpture, engraving or
|
||||
lithography; a photographic work to which are assimilated works
|
||||
expressed by a process analogous to photography; a work of applied
|
||||
art; an illustration, map, plan, sketch or three-dimensional work
|
||||
relative to geography, topography, architecture or science; a
|
||||
performance; a broadcast; a phonogram; a compilation of data to the
|
||||
extent it is protected as a copyrightable work; or a work performed by
|
||||
a variety or circus performer to the extent it is not otherwise
|
||||
considered a literary or artistic work.
|
||||
g. "You" means an individual or entity exercising rights under this
|
||||
License who has not previously violated the terms of this License with
|
||||
respect to the Work, or who has received express permission from the
|
||||
Licensor to exercise rights under this License despite a previous
|
||||
violation.
|
||||
h. "Publicly Perform" means to perform public recitations of the Work and
|
||||
to communicate to the public those public recitations, by any means or
|
||||
process, including by wire or wireless means or public digital
|
||||
performances; to make available to the public Works in such a way that
|
||||
members of the public may access these Works from a place and at a
|
||||
place individually chosen by them; to perform the Work to the public
|
||||
by any means or process and the communication to the public of the
|
||||
performances of the Work, including by public digital performance; to
|
||||
broadcast and rebroadcast the Work by any means including signs,
|
||||
sounds or images.
|
||||
i. "Reproduce" means to make copies of the Work by any means including
|
||||
without limitation by sound or visual recordings and the right of
|
||||
fixation and reproducing fixations of the Work, including storage of a
|
||||
protected performance or phonogram in digital form or other electronic
|
||||
medium.
|
||||
|
||||
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
|
||||
limit, or restrict any uses free from copyright or rights arising from
|
||||
limitations or exceptions that are provided for in connection with the
|
||||
copyright protection under copyright law or other applicable laws.
|
||||
|
||||
3. License Grant. Subject to the terms and conditions of this License,
|
||||
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
||||
perpetual (for the duration of the applicable copyright) license to
|
||||
exercise the rights in the Work as stated below:
|
||||
|
||||
a. to Reproduce the Work, to incorporate the Work into one or more
|
||||
Collections, and to Reproduce the Work as incorporated in the
|
||||
Collections;
|
||||
b. to create and Reproduce Adaptations provided that any such Adaptation,
|
||||
including any translation in any medium, takes reasonable steps to
|
||||
clearly label, demarcate or otherwise identify that changes were made
|
||||
to the original Work. For example, a translation could be marked "The
|
||||
original work was translated from English to Spanish," or a
|
||||
modification could indicate "The original work has been modified.";
|
||||
c. to Distribute and Publicly Perform the Work including as incorporated
|
||||
in Collections; and,
|
||||
d. to Distribute and Publicly Perform Adaptations.
|
||||
e. For the avoidance of doubt:
|
||||
|
||||
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme cannot be waived, the Licensor
|
||||
reserves the exclusive right to collect such royalties for any
|
||||
exercise by You of the rights granted under this License;
|
||||
ii. Waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme can be waived, the Licensor waives the
|
||||
exclusive right to collect such royalties for any exercise by You
|
||||
of the rights granted under this License; and,
|
||||
iii. Voluntary License Schemes. The Licensor waives the right to
|
||||
collect royalties, whether individually or, in the event that the
|
||||
Licensor is a member of a collecting society that administers
|
||||
voluntary licensing schemes, via that society, from any exercise
|
||||
by You of the rights granted under this License.
|
||||
|
||||
The above rights may be exercised in all media and formats whether now
|
||||
known or hereafter devised. The above rights include the right to make
|
||||
such modifications as are technically necessary to exercise the rights in
|
||||
other media and formats. Subject to Section 8(f), all rights not expressly
|
||||
granted by Licensor are hereby reserved.
|
||||
|
||||
4. Restrictions. The license granted in Section 3 above is expressly made
|
||||
subject to and limited by the following restrictions:
|
||||
|
||||
a. You may Distribute or Publicly Perform the Work only under the terms
|
||||
of this License. You must include a copy of, or the Uniform Resource
|
||||
Identifier (URI) for, this License with every copy of the Work You
|
||||
Distribute or Publicly Perform. You may not offer or impose any terms
|
||||
on the Work that restrict the terms of this License or the ability of
|
||||
the recipient of the Work to exercise the rights granted to that
|
||||
recipient under the terms of the License. You may not sublicense the
|
||||
Work. You must keep intact all notices that refer to this License and
|
||||
to the disclaimer of warranties with every copy of the Work You
|
||||
Distribute or Publicly Perform. When You Distribute or Publicly
|
||||
Perform the Work, You may not impose any effective technological
|
||||
measures on the Work that restrict the ability of a recipient of the
|
||||
Work from You to exercise the rights granted to that recipient under
|
||||
the terms of the License. This Section 4(a) applies to the Work as
|
||||
incorporated in a Collection, but this does not require the Collection
|
||||
apart from the Work itself to be made subject to the terms of this
|
||||
License. If You create a Collection, upon notice from any Licensor You
|
||||
must, to the extent practicable, remove from the Collection any credit
|
||||
as required by Section 4(b), as requested. If You create an
|
||||
Adaptation, upon notice from any Licensor You must, to the extent
|
||||
practicable, remove from the Adaptation any credit as required by
|
||||
Section 4(b), as requested.
|
||||
b. If You Distribute, or Publicly Perform the Work or any Adaptations or
|
||||
Collections, You must, unless a request has been made pursuant to
|
||||
Section 4(a), keep intact all copyright notices for the Work and
|
||||
provide, reasonable to the medium or means You are utilizing: (i) the
|
||||
name of the Original Author (or pseudonym, if applicable) if supplied,
|
||||
and/or if the Original Author and/or Licensor designate another party
|
||||
or parties (e.g., a sponsor institute, publishing entity, journal) for
|
||||
attribution ("Attribution Parties") in Licensor's copyright notice,
|
||||
terms of service or by other reasonable means, the name of such party
|
||||
or parties; (ii) the title of the Work if supplied; (iii) to the
|
||||
extent reasonably practicable, the URI, if any, that Licensor
|
||||
specifies to be associated with the Work, unless such URI does not
|
||||
refer to the copyright notice or licensing information for the Work;
|
||||
and (iv) , consistent with Section 3(b), in the case of an Adaptation,
|
||||
a credit identifying the use of the Work in the Adaptation (e.g.,
|
||||
"French translation of the Work by Original Author," or "Screenplay
|
||||
based on original Work by Original Author"). The credit required by
|
||||
this Section 4 (b) may be implemented in any reasonable manner;
|
||||
provided, however, that in the case of a Adaptation or Collection, at
|
||||
a minimum such credit will appear, if a credit for all contributing
|
||||
authors of the Adaptation or Collection appears, then as part of these
|
||||
credits and in a manner at least as prominent as the credits for the
|
||||
other contributing authors. For the avoidance of doubt, You may only
|
||||
use the credit required by this Section for the purpose of attribution
|
||||
in the manner set out above and, by exercising Your rights under this
|
||||
License, You may not implicitly or explicitly assert or imply any
|
||||
connection with, sponsorship or endorsement by the Original Author,
|
||||
Licensor and/or Attribution Parties, as appropriate, of You or Your
|
||||
use of the Work, without the separate, express prior written
|
||||
permission of the Original Author, Licensor and/or Attribution
|
||||
Parties.
|
||||
c. Except as otherwise agreed in writing by the Licensor or as may be
|
||||
otherwise permitted by applicable law, if You Reproduce, Distribute or
|
||||
Publicly Perform the Work either by itself or as part of any
|
||||
Adaptations or Collections, You must not distort, mutilate, modify or
|
||||
take other derogatory action in relation to the Work which would be
|
||||
prejudicial to the Original Author's honor or reputation. Licensor
|
||||
agrees that in those jurisdictions (e.g. Japan), in which any exercise
|
||||
of the right granted in Section 3(b) of this License (the right to
|
||||
make Adaptations) would be deemed to be a distortion, mutilation,
|
||||
modification or other derogatory action prejudicial to the Original
|
||||
Author's honor and reputation, the Licensor will waive or not assert,
|
||||
as appropriate, this Section, to the fullest extent permitted by the
|
||||
applicable national law, to enable You to reasonably exercise Your
|
||||
right under Section 3(b) of this License (right to make Adaptations)
|
||||
but not otherwise.
|
||||
|
||||
5. Representations, Warranties and Disclaimer
|
||||
|
||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
|
||||
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
|
||||
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
|
||||
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
|
||||
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
|
||||
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
|
||||
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
||||
|
||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
|
||||
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
|
||||
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
|
||||
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
|
||||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. Termination
|
||||
|
||||
a. This License and the rights granted hereunder will terminate
|
||||
automatically upon any breach by You of the terms of this License.
|
||||
Individuals or entities who have received Adaptations or Collections
|
||||
from You under this License, however, will not have their licenses
|
||||
terminated provided such individuals or entities remain in full
|
||||
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
|
||||
survive any termination of this License.
|
||||
b. Subject to the above terms and conditions, the license granted here is
|
||||
perpetual (for the duration of the applicable copyright in the Work).
|
||||
Notwithstanding the above, Licensor reserves the right to release the
|
||||
Work under different license terms or to stop distributing the Work at
|
||||
any time; provided, however that any such election will not serve to
|
||||
withdraw this License (or any other license that has been, or is
|
||||
required to be, granted under the terms of this License), and this
|
||||
License will continue in full force and effect unless terminated as
|
||||
stated above.
|
||||
|
||||
8. Miscellaneous
|
||||
|
||||
a. Each time You Distribute or Publicly Perform the Work or a Collection,
|
||||
the Licensor offers to the recipient a license to the Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
|
||||
offers to the recipient a license to the original Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
c. If any provision of this License is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of
|
||||
the remainder of the terms of this License, and without further action
|
||||
by the parties to this agreement, such provision shall be reformed to
|
||||
the minimum extent necessary to make such provision valid and
|
||||
enforceable.
|
||||
d. No term or provision of this License shall be deemed waived and no
|
||||
breach consented to unless such waiver or consent shall be in writing
|
||||
and signed by the party to be charged with such waiver or consent.
|
||||
e. This License constitutes the entire agreement between the parties with
|
||||
respect to the Work licensed here. There are no understandings,
|
||||
agreements or representations with respect to the Work not specified
|
||||
here. Licensor shall not be bound by any additional provisions that
|
||||
may appear in any communication from You. This License may not be
|
||||
modified without the mutual written agreement of the Licensor and You.
|
||||
f. The rights granted under, and the subject matter referenced, in this
|
||||
License were drafted utilizing the terminology of the Berne Convention
|
||||
for the Protection of Literary and Artistic Works (as amended on
|
||||
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
|
||||
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
|
||||
and the Universal Copyright Convention (as revised on July 24, 1971).
|
||||
These rights and subject matter take effect in the relevant
|
||||
jurisdiction in which the License terms are sought to be enforced
|
||||
according to the corresponding provisions of the implementation of
|
||||
those treaty provisions in the applicable national law. If the
|
||||
standard suite of rights granted under applicable copyright law
|
||||
includes additional rights not granted under this License, such
|
||||
additional rights are deemed to be included in the License; this
|
||||
License is not intended to restrict the license of any rights under
|
||||
applicable law.
|
||||
|
||||
|
||||
Creative Commons Notice
|
||||
|
||||
Creative Commons is not a party to this License, and makes no warranty
|
||||
whatsoever in connection with the Work. Creative Commons will not be
|
||||
liable to You or any party on any legal theory for any damages
|
||||
whatsoever, including without limitation any general, special,
|
||||
incidental or consequential damages arising in connection to this
|
||||
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
||||
Commons has expressly identified itself as the Licensor hereunder, it
|
||||
shall have all rights and obligations of Licensor.
|
||||
|
||||
Except for the limited purpose of indicating to the public that the
|
||||
Work is licensed under the CCPL, Creative Commons does not authorize
|
||||
the use by either party of the trademark "Creative Commons" or any
|
||||
related trademark or logo of Creative Commons without the prior
|
||||
written consent of Creative Commons. Any permitted use will be in
|
||||
compliance with Creative Commons' then-current trademark usage
|
||||
guidelines, as may be published on its website or otherwise made
|
||||
available upon request from time to time. For the avoidance of doubt,
|
||||
this trademark restriction does not form part of this License.
|
||||
|
||||
Creative Commons may be contacted at https://creativecommons.org/.<Paste>
|
5
Makefile
|
@ -32,17 +32,16 @@ ifneq (,$(findstring moe,$(MODULES)))
|
|||
endif
|
||||
|
||||
min-css:
|
||||
$(NODE) $(CURDIR)/node_modules/.bin/cleancss --skip-rebase --O1 specialComments:0 $(CURDIR)/static/css/uguu.css --output $(CURDIR)/build/uguu.min.css
|
||||
$(NODE) $(CURDIR)/node_modules/.bin/cleancss $(CURDIR)/static/css/uguu.css --output $(CURDIR)/build/uguu.min.css
|
||||
|
||||
min-js:
|
||||
echo "// @source https://github.com/nokonoko/uguu/tree/master/static/js" > $(CURDIR)/build/uguu.min.js
|
||||
echo "// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat" >> $(CURDIR)/build/uguu.min.js
|
||||
$(NODE) $(CURDIR)/node_modules/.bin/uglifyjs --screw-ie8 ./static/js/app.js >> $(CURDIR)/build/uguu.min.js
|
||||
$(NODE) $(CURDIR)/node_modules/.bin/uglifyjs ./static/js/app.js >> $(CURDIR)/build/uguu.min.js
|
||||
echo "// @license-end" >> $(CURDIR)/build/uguu.min.js
|
||||
|
||||
copy-img:
|
||||
cp -v $(CURDIR)/static/img/*.png $(CURDIR)/build/img/
|
||||
cp -v $(CURDIR)/static/img/favicon.ico $(CURDIR)/build/favicon.ico
|
||||
|
||||
copy-php:
|
||||
ifneq ($(wildcard $(CURDIR)/static/php/.),)
|
||||
|
|
41
README.md
|
@ -1,12 +1,19 @@
|
|||
# Uguu
|
||||
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nokonoko_Uguu&metric=alert_status)](https://sonarcloud.io/dashboard?id=nokonoko_Uguu)
|
||||
[![MIT
|
||||
licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nokonoko/uguu/master/LICENSE)
|
||||
[![Documentation Status](https://docs.uguu.se/img/flat.svg)](https://docs.uguu.se)
|
||||
|
||||
|
||||
# What is Uguu?
|
||||
|
||||
Uguu is a simple lightweight temporary file uploading and sharing platform where files get deleted after X amount of time.
|
||||
Uguu is a simple lightweight temporary file hosting and sharing platform, but can also be used as a permanent file host.
|
||||
|
||||
## Features
|
||||
|
||||
- One click uploading, no registration required
|
||||
- A minimal, modern web interface
|
||||
- Drag & drop supported
|
||||
- Drag & Drop & Paste supported
|
||||
- Upload API with multiple response choices
|
||||
- JSON
|
||||
- HTML
|
||||
|
@ -16,31 +23,20 @@ Uguu is a simple lightweight temporary file uploading and sharing platform where
|
|||
|
||||
### Demo
|
||||
|
||||
See the real world example at [uguu.se](https://uguu.se).
|
||||
See the real world site at [uguu.se](https://uguu.se).
|
||||
|
||||
## Requirements
|
||||
|
||||
Original development environment is Nginx + PHP5.3 + SQLite, but is confirmed to
|
||||
work with Apache 2.4 and newer PHP versions like PHP7.3.
|
||||
work with Apache 2.4 and newer PHP versions like PHP7.3 and PHP8.0
|
||||
|
||||
## Install
|
||||
Node is used to compile Uguu.
|
||||
|
||||
A detailed installation and configuration can be found at [Uguu/Pomf Documentation](https://blog.yeet.nu/blog/uguu-docs).
|
||||
## Installation
|
||||
|
||||
## API
|
||||
To upload using curl or make a tool you can post using:
|
||||
```
|
||||
curl -i -F files[]=@yourfile.jpeg https://uguu.se/upload.php (JSON Response)
|
||||
```
|
||||
```
|
||||
curl -i -F files[]=@yourfile.jpeg https://uguu.se/upload.php?output=text (Text Response)
|
||||
```
|
||||
```
|
||||
curl -i -F files[]=@yourfile.jpeg https://uguu.se/upload.php?output=csv (CSV Response)
|
||||
```
|
||||
```
|
||||
curl -i -F files[]=@yourfile.jpeg https://uguu.se/upload.php?output=html (HTML Response)
|
||||
```
|
||||
Installation and configuration can be found at [Uguu Documentation](https://docs.uguu.se).
|
||||
|
||||
If you need a admin panel check out [Moe Panel](https://github.com/pomf/MoePanel).
|
||||
|
||||
## Getting help
|
||||
|
||||
|
@ -54,8 +50,3 @@ Uguu is based on [Pomf](http://github.com/pomf/pomf) which was written by Emma L
|
|||
|
||||
Uguu is free software, and is released under the terms of the Expat license. See
|
||||
`LICENSE`.
|
||||
|
||||
## To do in release v1.1.0
|
||||
* Mod feature and interface
|
||||
* Blacklist DB (already exists on Uguu.se, but not in this code)
|
||||
* Code cleanup
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"allowErrors": false
|
||||
},
|
||||
"dest": "dist",
|
||||
"pkgVersion": "<%= pkg.version %>",
|
||||
"pkgVersion": "1.3.0",
|
||||
"banners": [
|
||||
"banners/malware_scans.swig",
|
||||
"banners/donations.swig"
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
CREATE TABLE `files` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`hash` char(40) DEFAULT NULL,
|
||||
`originalname` varchar(255) default NULL,
|
||||
`filename` varchar(30) default NULL,
|
||||
`size` int(15) DEFAULT NULL,
|
||||
`date` int(15) DEFAULT NULL,
|
||||
`ip` char(15) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `accounts` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`email` varchar(255) default NULL,
|
||||
`pass` varchar(255) default NULL,
|
||||
`level` int(15) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `blacklist` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`hash` char(40) DEFAULT NULL,
|
||||
`originalname` varchar(255) default NULL,
|
||||
`time` int(15) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
11
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "uguu",
|
||||
"version": "1.0.0",
|
||||
"version": "1.3.0",
|
||||
"description": "Kawaii file host",
|
||||
"homepage": "https://uguu.se/",
|
||||
"repository": {
|
||||
|
@ -9,16 +9,17 @@
|
|||
},
|
||||
"author": "Eric Johansson <neku@pomf.se>",
|
||||
"contributors": [
|
||||
"Pomf Community <github.com/pomf/pomf>"
|
||||
"Pomf Community <github.com/pomf/pomf>",
|
||||
"Uguu Community <github.com/nokonoko/uguu>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/nokonoko/uguu/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"clean-css": "^4.2.1",
|
||||
"clean-css-cli": "^4.3.0",
|
||||
"uglify-js": "^2.6.2",
|
||||
"clean-css": "^5.1.2",
|
||||
"clean-css-cli": "^5.3.0",
|
||||
"uglify-js": "^3.13.9",
|
||||
"swig": "^1.4.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -10,4 +10,16 @@ CREATE TABLE `files` (
|
|||
, `date` integer default NULL
|
||||
, `ip` char(15) default NULL
|
||||
);
|
||||
CREATE TABLE `accounts` (
|
||||
`id` integer NOT NULL PRIMARY KEY AUTOINCREMENT
|
||||
, `email` varchar(255) default NULL
|
||||
, `pass` varchar(255) default NULL
|
||||
, `level` integer default NULL
|
||||
);
|
||||
CREATE TABLE `blacklist` (
|
||||
`id` integer NOT NULL PRIMARY KEY AUTOINCREMENT
|
||||
, `hash` char(40) default NULL
|
||||
, `originalname` varchar(255) default NULL
|
||||
, `time` integer default NULL
|
||||
);
|
||||
END TRANSACTION;
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
*/
|
||||
body {
|
||||
background-attachment: fixed, fixed;
|
||||
background-color: #F7F7F7;
|
||||
background-color: #1b1b1b;
|
||||
background-image: url('grill.php'), url('img/bg.png');
|
||||
background-position: 85% 100%, top left;
|
||||
background-repeat: no-repeat, repeat;
|
||||
color: #333;
|
||||
color: #f7f7f7;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
height: 100%;
|
||||
|
@ -232,7 +232,7 @@ nav > ul > li:last-child:after {
|
|||
color: #891A18;
|
||||
}
|
||||
button.upload-clipboard-btn {
|
||||
height: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
.error#upload-filelist .progress-percent {
|
||||
color: #B94A48;
|
||||
|
|
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 47 KiB |
BIN
static/img/2.png
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
static/img/3.png
Before Width: | Height: | Size: 56 KiB |
BIN
static/img/4.png
Before Width: | Height: | Size: 13 KiB |
BIN
static/img/5.png
Before Width: | Height: | Size: 20 KiB |
BIN
static/img/6.png
Before Width: | Height: | Size: 28 KiB |
BIN
static/img/7.png
Before Width: | Height: | Size: 28 KiB |
BIN
static/img/8.png
Before Width: | Height: | Size: 47 KiB |
BIN
static/img/9.png
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 801 B |
Before Width: | Height: | Size: 4.0 KiB |
|
@ -1,6 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) 2016 Luminarys <postmaster@gensok.io>
|
||||
*
|
||||
* Copyright (c) 2021 Eric Johansson (Nekunekus) <neku@pomf.se>
|
||||
*
|
||||
* 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
|
||||
|
@ -20,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
/**
|
||||
* Sets up the elements inside file upload rows.
|
||||
*
|
||||
|
@ -251,6 +253,17 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
target.click();
|
||||
}
|
||||
|
||||
/* Handles the pasting function */
|
||||
window.addEventListener("paste", e =>{
|
||||
var len = e.clipboardData.files.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var file = e.clipboardData.files[i];
|
||||
var row = addRow(file);
|
||||
uploadFile(file, row);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/* Set-up the event handlers for the <button>, <input> and the window itself
|
||||
and also set the "js" class on selector "#upload-form", presumably to
|
||||
allow custom styles for clients running javascript. */
|
||||
|
@ -261,6 +274,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
window.addEventListener('drop', handleDragAway.bind(this, state, uploadButton), false);
|
||||
window.addEventListener('dragover', stopDefaultEvent, false);
|
||||
|
||||
|
||||
var uploadInput = document.getElementById('upload-input');
|
||||
uploadInput.addEventListener('change', uploadFiles);
|
||||
uploadButton.addEventListener('click', selectFiles.bind(this, uploadInput));
|
||||
|
|
|
@ -2,20 +2,8 @@
|
|||
|
||||
// Array of image paths, feel free to add/remove to/from this list
|
||||
$images = array(
|
||||
'img/1.png',
|
||||
'img/2.png',
|
||||
'img/3.png',
|
||||
'img/4.png',
|
||||
'img/5.png',
|
||||
'img/6.png',
|
||||
'img/7.png',
|
||||
'img/8.png',
|
||||
'img/9.png',
|
||||
'img/10.png',
|
||||
'img/11.png',
|
||||
'img/12.png',
|
||||
'img/13.png',
|
||||
'img/14.png',
|
||||
'img/15.png',
|
||||
);
|
||||
|
||||
// Redirect to a random image from the above array using status code "303 See Other"
|
||||
|
|
|
@ -25,8 +25,21 @@ define('UGUU_DB_USER', 'NULL');
|
|||
/* @param string UGUU_DB_PASS Database password */
|
||||
define('UGUU_DB_PASS', 'NULL');
|
||||
|
||||
/** Log IP of uploads */
|
||||
define('LOG_IP', 'no');
|
||||
/**
|
||||
* @param boolean Log IP of uploads
|
||||
*/
|
||||
define('LOG_IP', false);
|
||||
|
||||
/**
|
||||
* @param boolean anti-dupe
|
||||
*/
|
||||
define('ANTI_DUPE', false);
|
||||
|
||||
/**
|
||||
* @param boolean blacklist DB
|
||||
* ONLY ENABLE THIS IS YOU ARE USING THE LATEST DB SCHEMA!
|
||||
*/
|
||||
define('BLACKLIST_DB', false);
|
||||
|
||||
/*
|
||||
* File system location where to store uploaded files
|
||||
|
@ -70,20 +83,16 @@ define('ID_CHARSET', 'abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ');
|
|||
|
||||
/*
|
||||
* Filtered mime types
|
||||
* @param string[] $FILTER_MIME allowed/blocked mime types
|
||||
*/
|
||||
//$FILTER_MIME = array("application/octet-stream", "application/msword", "text/html", "application/x-dosexec", "application/zip", "application/java", "application/java-archive", "application/pdf", "application/x-executable");
|
||||
//$FILTER_EXT = array("exe", "scr", "com", "vbs", "bat", "cmd", "htm", "html", "zip", "jar", "msi", "apk", "pdf");
|
||||
|
||||
define('CONFIG_BLOCKED_EXTENSIONS', serialize(['exe', 'scr', 'com', 'vbs', 'bat', 'cmd', 'htm', 'html', 'jar', 'msi', 'apk', 'phtml', 'svg']));
|
||||
define('CONFIG_BLOCKED_MIME', serialize(['application/msword', 'text/html', 'application/x-dosexec', 'application/java', 'application/java-archive', 'application/x-executable', 'application/x-mach-binary', 'image/svg+xml']));
|
||||
|
||||
/**
|
||||
* Filter mode: whitelist (true) or blacklist (false).
|
||||
*
|
||||
* @param bool $FILTER_MODE mime type filter mode
|
||||
* Whitelist or blacklist mode
|
||||
* @param boolean blacklist (false) | whitelist (true)
|
||||
*/
|
||||
$FILTER_MODE = false;
|
||||
define('CONFIG_FILTER_MODE', false);
|
||||
|
||||
/**
|
||||
* Double dot file extensions.
|
||||
*
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* Handles POST uploads, generates filenames, moves files around and commits
|
||||
* uploaded metadata to database.
|
||||
*/
|
||||
|
||||
require_once 'classes/Response.class.php';
|
||||
require_once 'classes/UploadException.class.php';
|
||||
require_once 'classes/UploadedFile.class.php';
|
||||
|
@ -24,9 +23,11 @@ function generateName($file)
|
|||
// We start at N retries, and --N until we give up
|
||||
$tries = UGUU_FILES_RETRIES;
|
||||
$length = UGUU_FILES_LENGTH;
|
||||
|
||||
//Get EXT
|
||||
$ext = pathinfo($file->name, PATHINFO_EXTENSION);
|
||||
//Get mime
|
||||
|
||||
//Get MIME
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$type_mime = finfo_file($finfo, $file->tempfile);
|
||||
finfo_close($finfo);
|
||||
|
@ -42,8 +43,8 @@ function generateName($file)
|
|||
do {
|
||||
// Iterate until we reach the maximum number of retries
|
||||
if ($tries-- === 0) {
|
||||
http_response_code(500);
|
||||
throw new Exception(
|
||||
http_response_code(500);
|
||||
throw new Exception(
|
||||
'Gave up trying to find an unused name',
|
||||
500
|
||||
); // HTTP status code "500 Internal Server Error"
|
||||
|
@ -60,18 +61,66 @@ function generateName($file)
|
|||
$name .= '.'.$ext;
|
||||
}
|
||||
|
||||
//Check if mime is blacklisted
|
||||
if (in_array($type_mime, unserialize(CONFIG_BLOCKED_MIME))) {
|
||||
http_response_code(415);
|
||||
throw new Exception ('Extension type not allowed.');
|
||||
// Check if the file is blacklisted
|
||||
if(BLACKLIST_DB){
|
||||
$q = $db->prepare('SELECT hash, COUNT(*) AS count FROM blacklist WHERE hash = (:hash)');
|
||||
$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR);
|
||||
$q->execute();
|
||||
$result = $q->fetch();
|
||||
if ($result['count'] > 0) {
|
||||
http_response_code(415);
|
||||
throw new Exception(
|
||||
'File blacklisted!',
|
||||
415
|
||||
);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Check if EXT is blacklisted
|
||||
if (in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS))) {
|
||||
http_response_code(415);
|
||||
throw new Exception ('Extension type not allowed.');
|
||||
exit(0);
|
||||
// Check if file is whitelisted or blacklisted
|
||||
switch (CONFIG_FILTER_MODE) {
|
||||
|
||||
case false:
|
||||
//check if MIME is blacklisted
|
||||
if (in_array($type_mime, unserialize(CONFIG_BLOCKED_MIME))) {
|
||||
http_response_code(415);
|
||||
throw new Exception(
|
||||
'File type not allowed!',
|
||||
415
|
||||
);
|
||||
exit(0);
|
||||
}
|
||||
//Check if EXT is blacklisted
|
||||
if (in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS))) {
|
||||
http_response_code(415);
|
||||
throw new Exception(
|
||||
'File type not allowed!',
|
||||
415
|
||||
);
|
||||
exit(0);
|
||||
}
|
||||
break;
|
||||
|
||||
case true:
|
||||
//Check if MIME is whitelisted
|
||||
if (!in_array($type_mime, unserialize(CONFIG_BLOCKED_MIME))) {
|
||||
http_response_code(415);
|
||||
throw new Exception(
|
||||
'File type not allowed!',
|
||||
415
|
||||
);
|
||||
exit(0);
|
||||
}
|
||||
//Check if EXT is whitelisted
|
||||
if (!in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS))) {
|
||||
http_response_code(415);
|
||||
throw new Exception(
|
||||
'File type not allowed!',
|
||||
415
|
||||
);
|
||||
exit(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Check if a file with the same name does already exist in the database
|
||||
|
@ -80,9 +129,10 @@ function generateName($file)
|
|||
$q->execute();
|
||||
$result = $q->fetchColumn();
|
||||
// If it does, generate a new name
|
||||
} while ($result > 0);
|
||||
return $name;
|
||||
}
|
||||
} while ($result > 0);
|
||||
|
||||
return $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the uploading and db entry for a file.
|
||||
|
@ -94,27 +144,44 @@ function generateName($file)
|
|||
function uploadFile($file)
|
||||
{
|
||||
global $db;
|
||||
global $FILTER_MODE;
|
||||
global $FILTER_MIME;
|
||||
|
||||
// Handle file errors
|
||||
if ($file->error) {
|
||||
throw new UploadException($file->error);
|
||||
}
|
||||
|
||||
//fixes a bug
|
||||
$lol = $file->getSha1();
|
||||
|
||||
// Check if a file with the same hash and size (a file which is the same)
|
||||
// does already exist in the database; if it does, return the proper link
|
||||
// and data. PHP deletes the temporary file just uploaded automatically.
|
||||
if(ANTI_DUPE){
|
||||
$q = $db->prepare('SELECT filename, COUNT(*) AS count FROM files WHERE hash = (:hash) AND size = (:size)');
|
||||
$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR);
|
||||
$q->bindValue(':size', $file->size, PDO::PARAM_INT);
|
||||
$q->execute();
|
||||
$result = $q->fetch();
|
||||
if ($result['count'] > 0) {
|
||||
return [
|
||||
'hash' => $file->getSha1(),
|
||||
'name' => $file->name,
|
||||
'url' => UGUU_URL.rawurlencode($result['filename']),
|
||||
'size' => $file->size,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
// Generate a name for the file
|
||||
$newname = generateName($file);
|
||||
|
||||
// Get IP
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
// Store the file's full file path in memory
|
||||
$uploadFile = UGUU_FILES_ROOT . $newname;
|
||||
$uploadFile = UGUU_FILES_ROOT.$newname;
|
||||
|
||||
// Attempt to move it to the static directory
|
||||
if (!move_uploaded_file($file->tempfile, $uploadFile)) {
|
||||
http_response_code(500);
|
||||
throw new Exception(
|
||||
http_response_code(500);
|
||||
throw new Exception(
|
||||
'Failed to move file to destination',
|
||||
500
|
||||
); // HTTP status code "500 Internal Server Error"
|
||||
|
@ -122,47 +189,46 @@ function uploadFile($file)
|
|||
|
||||
// Need to change permissions for the new file to make it world readable
|
||||
if (!chmod($uploadFile, 0644)) {
|
||||
http_response_code(500);
|
||||
throw new Exception(
|
||||
http_response_code(500);
|
||||
throw new Exception(
|
||||
'Failed to change file permissions',
|
||||
500
|
||||
); // HTTP status code "500 Internal Server Error"
|
||||
}
|
||||
|
||||
// Add it to the database
|
||||
if(LOG_IP == 'yes'){
|
||||
$q = $db->prepare('INSERT INTO files (hash, originalname, filename, size, date, ip) VALUES (:hash, :orig, :name, :size, :date, :ip)');
|
||||
}else{
|
||||
$ip = '0';
|
||||
$q = $db->prepare('INSERT INTO files (hash, originalname, filename, size, date, ip) VALUES (:hash, :orig, :name, :size, :date, :ip)');
|
||||
// Log IP
|
||||
if(LOG_IP){
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
} else {
|
||||
$ip = null;
|
||||
}
|
||||
|
||||
// Common parameters binding
|
||||
$q = $db->prepare('INSERT INTO files (hash, originalname, filename, size, date, ip) VALUES (:hash, :orig, :name, :size, :date, :ip)');
|
||||
$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR);
|
||||
$q->bindValue(':orig', strip_tags($file->name), PDO::PARAM_STR);
|
||||
$q->bindValue(':name', $newname, PDO::PARAM_STR);
|
||||
$q->bindValue(':size', $file->size, PDO::PARAM_INT);
|
||||
$q->bindValue(':date', time(), PDO::PARAM_INT);
|
||||
$q->bindValue(':date', time(), PDO::PARAM_STR);
|
||||
$q->bindValue(':ip', $ip, PDO::PARAM_STR);
|
||||
$q->execute();
|
||||
|
||||
return array(
|
||||
return [
|
||||
'hash' => $file->getSha1(),
|
||||
'name' => $file->name,
|
||||
'url' => UGUU_URL.rawurlencode($newname),
|
||||
'size' => $file->size,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder files array by file.
|
||||
*
|
||||
* @param $_FILES
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function diverseArray($files)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
foreach ($files as $key1 => $value1) {
|
||||
foreach ($value1 as $key2 => $value2) {
|
||||
|
@ -176,13 +242,11 @@ function diverseArray($files)
|
|||
/**
|
||||
* Reorganize the $_FILES array into something saner.
|
||||
*
|
||||
* @param $_FILES
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function refiles($files)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
$files = diverseArray($files);
|
||||
|
||||
foreach ($files as $file) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends "layout.swig" %}
|
||||
{% extends "layout_index.swig" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="jumbotron">
|
||||
<h1>{{siteName}}~</h1>
|
||||
<h1>{{siteName}}!</h1>
|
||||
<p class="lead">Max upload size is {{max_upload_size}} MiB & files expire after 24H, read the <a href="faq.html"><abbr title="Frequently asked questions">FAQ</abbr></a></p>
|
||||
{% include "upload_form.swig" %}
|
||||
</div>
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="generator" content="Uguu {{pkgVersion}}">
|
||||
<meta name="Description" content="{{SiteMetaInfo}}">
|
||||
<title>{{siteName}} · {% block title %}Kawaii Temporary File Hosting{% endblock %}</title>
|
||||
<link rel="icon" href="favicon.ico">
|
||||
<title>{{siteName}} · {% block title %}Temporary File Hosting{% endblock %}</title>
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
<link rel="stylesheet" href="uguu.min.css">
|
||||
<script src="uguu.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="generator" content="Uguu {{pkgVersion}}">
|
||||
<meta name="Description" content="{{SiteMetaInfo}}">
|
||||
<title>{{siteName}} · {% block title %}Temporary File Hosting{% endblock %}</title>
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
<link rel="stylesheet" href="uguu.min.css">
|
||||
<script src="uguu.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
{% block body %}What the fuck are you doing here, <span lang="jp">baka</span>?{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -2,6 +2,6 @@
|
|||
<ul>
|
||||
<li><a href="/">{{siteName}}</a></li>
|
||||
<li><a href="tools.html">Tools</a></li>
|
||||
<li><a href="https://github.com/nokonoko/uguu">Github</a></li>
|
||||
<li><a href="https://git.soper.xyz/Soper/sugoi">Git</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name A.Y www.A.Y;
|
||||
return 301 https://A.Y$request_uri;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
server{
|
||||
listen 443 ssl http2;
|
||||
server_name A.Y www.A.Y;
|
||||
ssl on;
|
||||
ssl_certificate /etc/letsencrypt/live/A.Y/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/A.Y/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
root /var/www/uguu/files/;
|
||||
autoindex off;
|
||||
access_log off;
|
||||
index index.html;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name X.Y www.X.Y;
|
||||
return 301 https://X.Y$request_uri;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
server{
|
||||
listen 443 ssl http2;
|
||||
server_name www.X.Y X.Y;
|
||||
ssl on;
|
||||
ssl_certificate /etc/letsencrypt/live/X.Y/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/X.Y/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
|
||||
ssl_ecdh_curve secp384r1;
|
||||
ssl_buffer_size 2k;
|
||||
ssl_session_tickets off;
|
||||
|
||||
root /var/www/uguu/dist/;
|
||||
autoindex off;
|
||||
access_log off;
|
||||
index index.html index.php;
|
||||
etag on;
|
||||
|
||||
location ~* \.(?:css|js|jpg|jpeg|gif|png|ico|xml|eot|woff|woff2|ttf|svg|otf)$ {
|
||||
add_header Cache-Control "public";
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1000;
|
||||
gzip_comp_level 6;
|
||||
gzip_proxied any;
|
||||
gzip_types text/css text/js text/javascript application/javascript application/x-javascript;
|
||||
|
||||
location ~* \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
}
|
||||
Use
|
|
@ -1,72 +0,0 @@
|
|||
user www-data;
|
||||
worker_processes auto;
|
||||
worker_rlimit_nofile 40000;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 4096;
|
||||
multi_accept on;
|
||||
use epoll;
|
||||
|
||||
}
|
||||
|
||||
http {
|
||||
ssl_session_cache shared:SSL:5m;
|
||||
ssl_session_timeout 12h;
|
||||
ssl_session_tickets off;
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 10;
|
||||
types_hash_max_size 2048;
|
||||
server_tokens off;
|
||||
client_max_body_size 128m;
|
||||
|
||||
##
|
||||
# Mime Settings
|
||||
##
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
#access_log /var/log/nginx/access.log;
|
||||
#error_log /var/log/nginx/error.log;
|
||||
error_log off;
|
||||
access_log off;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
#gzip off;
|
||||
#gzip_vary on;
|
||||
#gzip_proxied any;
|
||||
#gzip_comp_level 6;
|
||||
#gzip_buffers 16 8k;
|
||||
#gzip_http_version 1.1;
|
||||
#gzip_types application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/javascript text/xml;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<form id="upload-form" enctype="multipart/form-data" method="post" action="upload.php?output=html">
|
||||
<button id="upload-btn" class="btn" type="button">Select or drop file(s)</button>
|
||||
<button id="upload-btn" class="btn" type="button">Drop or paste file(s)</button>
|
||||
<input type="file" id="upload-input" name="files[]" multiple data-max-size="{{max_upload_size}}MiB">
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
|
|